summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2011-04-07 09:08:53 (GMT)
committeraxis <qt-info@nokia.com>2011-04-07 09:08:53 (GMT)
commitd54b3f04fa629fe031f1083073eef0145f0d6b1e (patch)
tree2a06736f812c478bdb21aa3781078fe88b5532fa
parent258c1a8537816f7b4c79e7cf4090a333768a10fa (diff)
parent8031eada2f81963865390b4d899631b09d4ca6f3 (diff)
downloadQt-d54b3f04fa629fe031f1083073eef0145f0d6b1e.zip
Qt-d54b3f04fa629fe031f1083073eef0145f0d6b1e.tar.gz
Qt-d54b3f04fa629fe031f1083073eef0145f0d6b1e.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt into earth-master
Conflicts: src/corelib/thread/qthread_unix.cpp
-rw-r--r--.commit-template2
-rw-r--r--.gitignore1
-rwxr-xr-xbin/createpackage.pl41
-rwxr-xr-xbin/patch_capabilities.pl50
-rwxr-xr-xconfigure14
-rw-r--r--demos/qtdemo/examplecontent.cpp6
-rw-r--r--demos/spectrum/spectrum.pri6
-rw-r--r--dist/changes-4.7.312
-rw-r--r--doc/src/classes.qdoc2
-rw-r--r--doc/src/classes/phonon-api.qdoc42
-rw-r--r--doc/src/declarative/anchor-layout.qdoc9
-rw-r--r--doc/src/declarative/animation.qdoc394
-rw-r--r--doc/src/declarative/basicelements.qdoc114
-rw-r--r--doc/src/declarative/basictypes.qdoc35
-rw-r--r--doc/src/declarative/declarativeui.qdoc139
-rw-r--r--doc/src/declarative/dynamicobjects.qdoc42
-rw-r--r--doc/src/declarative/elements.qdoc9
-rw-r--r--doc/src/declarative/example-slideswitch.qdoc4
-rw-r--r--doc/src/declarative/examples.qdoc1
-rw-r--r--doc/src/declarative/extending-tutorial.qdoc54
-rw-r--r--doc/src/declarative/extending.qdoc508
-rw-r--r--doc/src/declarative/focus.qdoc7
-rw-r--r--doc/src/declarative/integrating.qdoc19
-rw-r--r--doc/src/declarative/javascriptblocks.qdoc9
-rw-r--r--doc/src/declarative/modules.qdoc100
-rw-r--r--doc/src/declarative/mouseevents.qdoc120
-rw-r--r--doc/src/declarative/network.qdoc6
-rw-r--r--doc/src/declarative/positioners.qdoc17
-rw-r--r--doc/src/declarative/propertybinding.qdoc414
-rw-r--r--doc/src/declarative/qdeclarativedocument.qdoc52
-rw-r--r--doc/src/declarative/qdeclarativei18n.qdoc5
-rw-r--r--doc/src/declarative/qdeclarativemodels.qdoc200
-rw-r--r--doc/src/declarative/qdeclarativestates.qdoc233
-rw-r--r--doc/src/declarative/qml-intro.qdoc616
-rw-r--r--doc/src/declarative/qmlevents.qdoc127
-rw-r--r--doc/src/declarative/qmlreusablecomponents.qdoc143
-rw-r--r--doc/src/declarative/qmlruntime.qdoc42
-rw-r--r--doc/src/declarative/qmlsyntax.qdoc155
-rw-r--r--doc/src/declarative/qmltexthandling.qdoc76
-rw-r--r--doc/src/declarative/qmlviewer.qdoc60
-rw-r--r--doc/src/declarative/qmlviews.qdoc114
-rw-r--r--doc/src/declarative/qmlwebkit.qdoc52
-rw-r--r--doc/src/declarative/qtbinding.qdoc18
-rw-r--r--doc/src/declarative/qtprogrammers.qdoc5
-rw-r--r--doc/src/declarative/qtquick-intro.qdoc124
-rw-r--r--doc/src/declarative/scope.qdoc122
-rw-r--r--doc/src/declarative/tutorial.qdoc2
-rw-r--r--doc/src/deployment/deployment-plugins.qdoc2
-rw-r--r--doc/src/deployment/deployment.qdoc24
-rw-r--r--doc/src/development/activeqt-dumpcpp.qdoc10
-rw-r--r--doc/src/development/debug.qdoc6
-rw-r--r--doc/src/development/designer-manual.qdoc114
-rw-r--r--doc/src/development/moc.qdoc18
-rw-r--r--doc/src/development/qmake-manual.qdoc2149
-rw-r--r--doc/src/development/qtestlib.qdoc10
-rw-r--r--doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc68
-rw-r--r--doc/src/examples/activeqt/hierarchy-demo.qdocinc2
-rw-r--r--doc/src/examples/activeqt/hierarchy.qdoc4
-rw-r--r--doc/src/examples/arrowpad.qdoc2
-rw-r--r--doc/src/examples/containerextension.qdoc2
-rw-r--r--doc/src/examples/customwidgetplugin.qdoc2
-rw-r--r--doc/src/examples/editabletreemodel.qdoc4
-rw-r--r--doc/src/examples/fademessage.qdoc8
-rw-r--r--doc/src/examples/fancybrowser.qdoc4
-rw-r--r--doc/src/examples/globalVariables.qdoc61
-rw-r--r--doc/src/examples/icons.qdoc6
-rw-r--r--doc/src/examples/imageviewer.qdoc6
-rw-r--r--doc/src/examples/qml-examples.qdoc36
-rw-r--r--doc/src/examples/qtscriptcustomclass.qdoc12
-rw-r--r--doc/src/examples/rogue.qdoc4
-rw-r--r--doc/src/examples/simpledommodel.qdoc2
-rw-r--r--doc/src/examples/taskmenuextension.qdoc2
-rw-r--r--doc/src/examples/textfinder.qdoc2
-rw-r--r--doc/src/examples/trollprint.qdoc8
-rw-r--r--doc/src/examples/undoframework.qdoc3
-rw-r--r--doc/src/examples/worldtimeclockplugin.qdoc2
-rw-r--r--doc/src/external-resources.qdoc25
-rw-r--r--doc/src/files-and-resources/resources.qdoc4
-rw-r--r--doc/src/frameworks-technologies/accessible.qdoc2
-rw-r--r--doc/src/frameworks-technologies/activeqt-container.qdoc4
-rw-r--r--doc/src/frameworks-technologies/activeqt-server.qdoc36
-rw-r--r--doc/src/frameworks-technologies/containers.qdoc48
-rw-r--r--doc/src/frameworks-technologies/dbus-adaptors.qdoc26
-rw-r--r--doc/src/frameworks-technologies/graphicsview.qdoc14
-rw-r--r--doc/src/frameworks-technologies/implicit-sharing.qdoc4
-rw-r--r--doc/src/frameworks-technologies/model-view-programming.qdoc16
-rw-r--r--doc/src/frameworks-technologies/phonon.qdoc2
-rw-r--r--doc/src/frameworks-technologies/plugins-howto.qdoc10
-rw-r--r--doc/src/frameworks-technologies/qthelp.qdoc2
-rw-r--r--doc/src/frameworks-technologies/richtext.qdoc14
-rw-r--r--doc/src/frameworks-technologies/unicode.qdoc8
-rw-r--r--doc/src/getting-started/examples.qdoc1
-rw-r--r--doc/src/getting-started/gettingstartedqml.qdoc2
-rw-r--r--doc/src/getting-started/how-to-learn-qt.qdoc2
-rw-r--r--doc/src/getting-started/installation.qdoc250
-rw-r--r--doc/src/getting-started/tutorials.qdoc15
-rw-r--r--doc/src/howtos/appicon.qdoc6
-rw-r--r--doc/src/howtos/developmentsteps.qdoc186
-rw-r--r--doc/src/howtos/exceptionsafety.qdoc5
-rw-r--r--doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc97
-rw-r--r--doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc49
-rw-r--r--doc/src/howtos/scalabilityintro.qdoc324
-rw-r--r--doc/src/howtos/unix-signal-handlers.qdoc10
-rw-r--r--doc/src/images/guide.pngbin0 -> 7376 bytes
-rw-r--r--doc/src/images/listview-decorations.pngbin0 -> 12131 bytes
-rw-r--r--doc/src/images/listview-section.pngbin0 -> 11053 bytes
-rw-r--r--doc/src/images/listview-setup.pngbin0 -> 7117 bytes
-rw-r--r--doc/src/images/mobile.pngbin0 -> 31620 bytes
-rw-r--r--doc/src/images/qml-dial.pngbin43754 -> 0 bytes
-rw-r--r--doc/src/images/qml-intro-anchors1.pngbin15198 -> 0 bytes
-rw-r--r--doc/src/images/qml-intro-anchors2.pngbin15343 -> 0 bytes
-rw-r--r--doc/src/images/qml-intro-anchors3.pngbin16745 -> 0 bytes
-rw-r--r--doc/src/images/qml-intro-helloa.pngbin18246 -> 0 bytes
-rw-r--r--doc/src/images/qml-listview-snippet.pngbin2048 -> 0 bytes
-rw-r--r--doc/src/images/qml.pngbin0 -> 8662 bytes
-rw-r--r--doc/src/images/qmldesigner-visual-editor.pngbin0 -> 102238 bytes
-rw-r--r--doc/src/images/qt-logo_large.pngbin0 -> 11801 bytes
-rw-r--r--doc/src/images/qtcreator-target-selector.pngbin0 -> 36463 bytes
-rw-r--r--doc/src/images/thread_clock.pngbin0 -> 5964 bytes
-rw-r--r--doc/src/images/threads-examples.pngbin0 -> 7966 bytes
-rw-r--r--doc/src/images/threadvisual-example.pngbin0 -> 16823 bytes
-rw-r--r--doc/src/images/tools.pngbin0 -> 9684 bytes
-rw-r--r--doc/src/index.qdoc219
-rw-r--r--doc/src/internationalization/i18n.qdoc32
-rw-r--r--doc/src/internationalization/linguist-manual.qdoc323
-rw-r--r--doc/src/ja_JP/development/qmake-manual.qdoc30
-rw-r--r--doc/src/ja_JP/development/qtestlib.qdoc4
-rw-r--r--doc/src/ja_JP/examples/arrowpad.qdoc2
-rw-r--r--doc/src/ja_JP/examples/trollprint.qdoc8
-rw-r--r--doc/src/legal/3rdparty.qdoc199
-rw-r--r--doc/src/legal/qtquicklicense.qdoc40
-rw-r--r--doc/src/mainpage.qdoc232
-rw-r--r--doc/src/modules.qdoc66
-rw-r--r--doc/src/objectmodel/objecttrees.qdoc4
-rw-r--r--doc/src/objectmodel/properties.qdoc20
-rw-r--r--doc/src/objectmodel/signalsandslots.qdoc2
-rw-r--r--doc/src/overviews.qdoc63
-rw-r--r--doc/src/painting-and-printing/coordsys.qdoc12
-rw-r--r--doc/src/platforms/emb-performance.qdoc2
-rw-r--r--doc/src/platforms/emb-pointer.qdoc2
-rw-r--r--doc/src/platforms/mac-differences.qdoc4
-rw-r--r--doc/src/platforms/supported-platforms.qdoc700
-rw-r--r--doc/src/platforms/wince-customization.qdoc2
-rw-r--r--doc/src/porting/porting-qsa.qdoc28
-rw-r--r--doc/src/porting/porting4-canvas.qdoc20
-rw-r--r--doc/src/porting/porting4-designer.qdoc14
-rw-r--r--doc/src/porting/porting4-dnd.qdoc6
-rw-r--r--doc/src/porting/porting4.qdoc140
-rw-r--r--doc/src/porting/qt3to4.qdoc2
-rw-r--r--doc/src/porting/qt4-accessibility.qdoc8
-rw-r--r--doc/src/porting/qt4-arthur.qdoc22
-rw-r--r--doc/src/porting/qt4-mainwindow.qdoc20
-rw-r--r--doc/src/porting/qt4-sql.qdoc4
-rw-r--r--doc/src/porting/qt4-styles.qdoc8
-rw-r--r--doc/src/porting/qt4-tulip.qdoc22
-rw-r--r--doc/src/qt-webpages.qdoc15
-rw-r--r--doc/src/qt4-intro.qdoc38
-rw-r--r--doc/src/scripting/qtscriptextensions.qdoc2
-rw-r--r--doc/src/scripting/scripting.qdoc180
-rw-r--r--doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp (renamed from doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_appicon.pro53
-rw-r--r--doc/src/snippets/code/doc_src_appicon.qdoc14
-rw-r--r--doc/src/snippets/code/doc_src_containers.cpp (renamed from doc/src/snippets/code/doc_src_containers.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_coordsys.cpp (renamed from doc/src/snippets/code/doc_src_coordsys.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_debug.cpp (renamed from doc/src/snippets/code/doc_src_debug.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_deployment.cpp56
-rw-r--r--doc/src/snippets/code/doc_src_deployment.pro87
-rw-r--r--doc/src/snippets/code/doc_src_deployment.qdoc27
-rw-r--r--doc/src/snippets/code/doc_src_designer-manual.cpp (renamed from doc/src/snippets/code/doc_src_designer-manual.qdoc)26
-rw-r--r--doc/src/snippets/code/doc_src_designer-manual.js43
-rw-r--r--doc/src/snippets/code/doc_src_designer-manual.pro59
-rw-r--r--doc/src/snippets/code/doc_src_dnd.cpp (renamed from doc/src/snippets/code/doc_src_dnd.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_emb-performance.cpp71
-rw-r--r--doc/src/snippets/code/doc_src_emb-performance.qdoc33
-rw-r--r--doc/src/snippets/code/doc_src_emb-pointer.pro46
-rw-r--r--doc/src/snippets/code/doc_src_emb-pointer.qdoc10
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_examples_arrowpad.qdoc5
-rw-r--r--doc/src/snippets/code/doc_src_examples_containerextension.pro (renamed from doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro (renamed from doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp (renamed from doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_examples_icons.cpp44
-rw-r--r--doc/src/snippets/code/doc_src_examples_icons.qdoc6
-rw-r--r--doc/src/snippets/code/doc_src_examples_imageviewer.cpp54
-rw-r--r--doc/src/snippets/code/doc_src_examples_imageviewer.qdoc16
-rw-r--r--doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp (renamed from doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_examples_simpledommodel.cpp (renamed from doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_examples_taskmenuextension.pro (renamed from doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_examples_textfinder.pro (renamed from doc/src/snippets/code/doc_src_examples_textfinder.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_examples_trollprint.cpp (renamed from doc/src/snippets/code/doc_src_examples_trollprint.qdoc)2
-rw-r--r--doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro (renamed from doc/src/snippets/code/doc_src_examples_containerextension.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_graphicsview.cpp (renamed from doc/src/snippets/code/doc_src_graphicsview.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_groups.cpp (renamed from doc/src/snippets/code/doc_src_groups.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_i18n.cpp175
-rw-r--r--doc/src/snippets/code/doc_src_i18n.qdoc137
-rw-r--r--doc/src/snippets/code/doc_src_layout.cpp (renamed from doc/src/snippets/code/doc_src_layout.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_linguist-manual.cpp157
-rw-r--r--doc/src/snippets/code/doc_src_linguist-manual.pro62
-rw-r--r--doc/src/snippets/code/doc_src_linguist-manual.qdoc144
-rw-r--r--doc/src/snippets/code/doc_src_mac-differences.cpp52
-rw-r--r--doc/src/snippets/code/doc_src_mac-differences.pro43
-rw-r--r--doc/src/snippets/code/doc_src_moc.cpp144
-rw-r--r--doc/src/snippets/code/doc_src_moc.qdoc106
-rw-r--r--doc/src/snippets/code/doc_src_model-view-programming.cpp (renamed from doc/src/snippets/code/doc_src_model-view-programming.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_modules.pro (renamed from doc/src/snippets/code/doc_src_modules.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_objecttrees.cpp (renamed from doc/src/snippets/code/doc_src_objecttrees.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_phonon-api.cpp (renamed from doc/src/snippets/code/doc_src_phonon-api.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_phonon.pro43
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.cpp89
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.pro50
-rw-r--r--doc/src/snippets/code/doc_src_plugins-howto.qdoc63
-rw-r--r--doc/src/snippets/code/doc_src_porting-qsa.cpp89
-rw-r--r--doc/src/snippets/code/doc_src_porting-qsa.js117
-rw-r--r--doc/src/snippets/code/doc_src_porting-qsa.qdoc128
-rw-r--r--doc/src/snippets/code/doc_src_porting4-canvas.cpp (renamed from doc/src/snippets/code/doc_src_porting4-canvas.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_porting4-designer.cpp173
-rw-r--r--doc/src/snippets/code/doc_src_porting4-designer.pro43
-rw-r--r--doc/src/snippets/code/doc_src_porting4-designer.qdoc140
-rw-r--r--doc/src/snippets/code/doc_src_porting4.cpp (renamed from doc/src/snippets/code/doc_src_porting4.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_properties.cpp (renamed from doc/src/snippets/code/doc_src_properties.qdoc)1
-rw-r--r--doc/src/snippets/code/doc_src_q3asciidict.cpp (renamed from doc/src/snippets/code/doc_src_q3asciidict.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3dict.cpp (renamed from doc/src/snippets/code/doc_src_q3dict.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3intdict.cpp (renamed from doc/src/snippets/code/doc_src_q3intdict.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3memarray.cpp108
-rw-r--r--doc/src/snippets/code/doc_src_q3memarray.qdoc70
-rw-r--r--doc/src/snippets/code/doc_src_q3ptrdict.cpp (renamed from doc/src/snippets/code/doc_src_q3ptrdict.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3ptrlist.cpp (renamed from doc/src/snippets/code/doc_src_q3ptrlist.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3valuelist.cpp (renamed from doc/src/snippets/code/doc_src_q3valuelist.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3valuestack.cpp (renamed from doc/src/snippets/code/doc_src_q3valuestack.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_q3valuevector.cpp (renamed from doc/src/snippets/code/doc_src_q3valuevector.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qalgorithms.cpp (renamed from doc/src/snippets/code/doc_src_qalgorithms.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qaxcontainer.pro (renamed from doc/src/snippets/code/doc_src_qaxcontainer.qdoc)8
-rw-r--r--doc/src/snippets/code/doc_src_qaxserver.cpp218
-rw-r--r--doc/src/snippets/code/doc_src_qaxserver.pro64
-rw-r--r--doc/src/snippets/code/doc_src_qaxserver.qdoc206
-rw-r--r--doc/src/snippets/code/doc_src_qcache.cpp (renamed from doc/src/snippets/code/doc_src_qcache.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qdbusadaptors.cpp (renamed from doc/src/snippets/code/doc_src_qdbusadaptors.qdoc)152
-rw-r--r--doc/src/snippets/code/doc_src_qiterator.cpp (renamed from doc/src/snippets/code/doc_src_qiterator.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qmake-manual.cpp58
-rw-r--r--doc/src/snippets/code/doc_src_qmake-manual.pro (renamed from doc/src/snippets/code/doc_src_qmake-manual.qdoc)650
-rw-r--r--doc/src/snippets/code/doc_src_qnamespace.cpp59
-rw-r--r--doc/src/snippets/code/doc_src_qnamespace.qdoc21
-rw-r--r--doc/src/snippets/code/doc_src_qpair.cpp (renamed from doc/src/snippets/code/doc_src_qpair.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qplugin.cpp (renamed from doc/src/snippets/code/doc_src_qplugin.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qplugin.pro44
-rw-r--r--doc/src/snippets/code/doc_src_qset.cpp (renamed from doc/src/snippets/code/doc_src_qset.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qsignalspy.cpp (renamed from doc/src/snippets/code/doc_src_qsignalspy.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt3support.cpp (renamed from doc/src/snippets/code/doc_src_qt3support.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qt3support.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qt3to4.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_qt4-accessibility.cpp (renamed from doc/src/snippets/code/doc_src_qt4-accessibility.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-arthur.cpp (renamed from doc/src/snippets/code/doc_src_qt4-arthur.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-intro.cpp (renamed from doc/src/snippets/code/doc_src_qt4-intro.qdoc)35
-rw-r--r--doc/src/snippets/code/doc_src_qt4-intro.pro73
-rw-r--r--doc/src/snippets/code/doc_src_qt4-mainwindow.cpp (renamed from doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-sql.cpp (renamed from doc/src/snippets/code/doc_src_qt4-sql.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-styles.cpp (renamed from doc/src/snippets/code/doc_src_qt4-styles.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qt4-tulip.cpp (renamed from doc/src/snippets/code/doc_src_qt4-tulip.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qtcore.cpp (renamed from doc/src/snippets/code/doc_src_qtcore.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qtdbus.cpp (renamed from doc/src/snippets/code/doc_src_qtdbus.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtdbus.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtdesigner.cpp (renamed from doc/src/snippets/code/doc_src_qtdesigner.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtdesigner.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtestevent.cpp (renamed from doc/src/snippets/code/doc_src_qtestevent.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qtestlib.cpp88
-rw-r--r--doc/src/snippets/code/doc_src_qtestlib.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtestlib.qdoc55
-rw-r--r--doc/src/snippets/code/doc_src_qtgui.pro (renamed from doc/src/snippets/code/doc_src_qtgui.qdoc)4
-rw-r--r--doc/src/snippets/code/doc_src_qthelp.cpp63
-rw-r--r--doc/src/snippets/code/doc_src_qthelp.qdoc24
-rw-r--r--doc/src/snippets/code/doc_src_qtmultimedia.cpp (renamed from doc/src/snippets/code/doc_src_qtmultimedia.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtmultimedia.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtnetwork.cpp (renamed from doc/src/snippets/code/doc_src_qtnetwork.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtnetwork.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtopengl.cpp (renamed from doc/src/snippets/code/doc_src_qtopengl.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtopengl.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.cpp568
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.js444
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtscript.qdoc937
-rw-r--r--doc/src/snippets/code/doc_src_qtscriptextensions.js (renamed from doc/src/snippets/code/doc_src_qtscriptextensions.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_qtscripttools.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_qtscripttools.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtsql.cpp (renamed from doc/src/snippets/code/doc_src_qtsql.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtsql.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtsvg.cpp (renamed from doc/src/snippets/code/doc_src_qtsvg.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtsvg.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qttest.cpp (renamed from doc/src/snippets/code/doc_src_qttest.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qttest.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtuiloader.cpp (renamed from doc/src/snippets/code/doc_src_qtuiloader.qdoc)5
-rw-r--r--doc/src/snippets/code/doc_src_qtuiloader.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.cpp43
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.pro43
-rw-r--r--doc/src/snippets/code/doc_src_qtxml.qdoc15
-rw-r--r--doc/src/snippets/code/doc_src_qtxmlpatterns.cpp44
-rw-r--r--doc/src/snippets/code/doc_src_qtxmlpatterns.pro44
-rw-r--r--doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc9
-rw-r--r--doc/src/snippets/code/doc_src_qvarlengtharray.cpp (renamed from doc/src/snippets/code/doc_src_qvarlengtharray.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_resources.cpp (renamed from doc/src/snippets/declarative/qml-intro/hello-world1.qml)21
-rw-r--r--doc/src/snippets/code/doc_src_resources.qdoc16
-rw-r--r--doc/src/snippets/code/doc_src_richtext.cpp85
-rw-r--r--doc/src/snippets/code/doc_src_richtext.qdoc47
-rw-r--r--doc/src/snippets/code/doc_src_sql-driver.cpp82
-rw-r--r--doc/src/snippets/code/doc_src_sql-driver.qdoc44
-rw-r--r--doc/src/snippets/code/doc_src_styles.cpp (renamed from doc/src/snippets/code/doc_src_styles.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.cpp140
-rw-r--r--doc/src/snippets/code/doc_src_stylesheet.qdoc103
-rw-r--r--doc/src/snippets/code/doc_src_unicode.cpp (renamed from doc/src/snippets/code/doc_src_unicode.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_unix-signal-handlers.cpp (renamed from doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc)0
-rw-r--r--doc/src/snippets/code/doc_src_wince-customization.cpp (renamed from doc/src/snippets/declarative/animation-signalhandler.qml)27
-rw-r--r--doc/src/snippets/code/doc_src_wince-customization.qdoc19
-rw-r--r--doc/src/snippets/code/src_corelib_global_qglobal.cpp24
-rw-r--r--doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp2
-rw-r--r--doc/src/snippets/code/src_gui_painting_qpen.cpp2
-rw-r--r--doc/src/snippets/declarative/Button.qml (renamed from doc/src/snippets/declarative/qml-intro/anchors2.qml)33
-rw-r--r--doc/src/snippets/declarative/animation-elements.qml66
-rw-r--r--doc/src/snippets/declarative/animation-groups.qml104
-rw-r--r--doc/src/snippets/declarative/animation-propertyvaluesource.qml51
-rw-r--r--doc/src/snippets/declarative/animation.qml226
-rw-r--r--doc/src/snippets/declarative/bestpractices/group.qml (renamed from doc/src/snippets/declarative/animation-easing.qml)37
-rw-r--r--doc/src/snippets/declarative/events.qml141
-rw-r--r--doc/src/snippets/declarative/focus/advancedFocus.qml2
-rw-r--r--doc/src/snippets/declarative/focus/basicwidget.qml2
-rw-r--r--doc/src/snippets/declarative/focus/focusscopewidget.qml4
-rw-r--r--doc/src/snippets/declarative/focus/myclickablewidget.qml2
-rw-r--r--doc/src/snippets/declarative/focus/myfocusscopewidget.qml6
-rw-r--r--doc/src/snippets/declarative/focus/mywidget.qml4
-rw-r--r--doc/src/snippets/declarative/focus/widget.qml2
-rw-r--r--doc/src/snippets/declarative/grid-spacing.qml (renamed from doc/src/snippets/declarative/grid/grid-spacing.qml)0
-rw-r--r--doc/src/snippets/declarative/grid/grid-items.qml58
-rw-r--r--doc/src/snippets/declarative/grid/grid-no-spacing.qml57
-rw-r--r--doc/src/snippets/declarative/imports/best-practices.qml (renamed from doc/src/snippets/code/doc_src_phonon.qdoc)20
-rw-r--r--doc/src/snippets/declarative/imports/chart.qml46
-rw-r--r--doc/src/snippets/declarative/imports/installed-module.qml47
-rw-r--r--doc/src/snippets/declarative/imports/merged-named-imports.qml (renamed from doc/src/snippets/code/doc.src.qtscripttools.qdoc)13
-rw-r--r--doc/src/snippets/declarative/imports/named-imports.qml (renamed from doc/src/snippets/declarative/qml-intro/hello-world4.qml)30
-rw-r--r--doc/src/snippets/declarative/imports/network-imports.qml47
-rw-r--r--doc/src/snippets/declarative/imports/qtquick-1.0.qml46
-rw-r--r--doc/src/snippets/declarative/imports/timeexample.qml46
-rw-r--r--doc/src/snippets/declarative/listview-decorations.qml (renamed from doc/src/snippets/declarative/qml-intro/transformations1.qml)87
-rw-r--r--doc/src/snippets/declarative/listview-sections.qml (renamed from doc/src/snippets/declarative/qml-intro/states1.qml)91
-rw-r--r--doc/src/snippets/declarative/listview.qml (renamed from doc/src/snippets/declarative/qml-intro/number-animation1.qml)53
-rw-r--r--doc/src/snippets/declarative/listview/listview-snippet.qml52
-rw-r--r--doc/src/snippets/declarative/models/views-models-delegates.qml (renamed from doc/src/snippets/declarative/animation-behavioral.qml)47
-rw-r--r--doc/src/snippets/declarative/models/visual-model-and-view.qml (renamed from doc/src/snippets/declarative/animation-transitions.qml)31
-rw-r--r--doc/src/snippets/declarative/mousearea/mousearea-snippet.qml55
-rw-r--r--doc/src/snippets/declarative/pics/qt.pngbin514 -> 2991 bytes
-rw-r--r--doc/src/snippets/declarative/properties.qml315
-rw-r--r--doc/src/snippets/declarative/qml-intro/anchors3.qml65
-rw-r--r--doc/src/snippets/declarative/qml-intro/hello-world2.qml56
-rw-r--r--doc/src/snippets/declarative/qml-intro/hello-world3.qml57
-rw-r--r--doc/src/snippets/declarative/qml-intro/images/qt-logo.svg104
-rw-r--r--doc/src/snippets/declarative/qml-intro/number-animation2.qml66
-rw-r--r--doc/src/snippets/declarative/qml-intro/rectangle.qml50
-rw-r--r--doc/src/snippets/declarative/qml-intro/sequential-animation1.qml65
-rw-r--r--doc/src/snippets/declarative/qml-intro/sequential-animation2.qml73
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/Button.qml84
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/application.qml (renamed from doc/src/snippets/declarative/qml-intro/anchors1.qml)17
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/component.qml (renamed from doc/src/snippets/declarative/animation-standalone.qml)44
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/focusbutton.qml (renamed from doc/src/snippets/declarative/qml-intro/sequential-animation3.qml)84
-rw-r--r--doc/src/snippets/declarative/reusablecomponents/qmldir4
-rw-r--r--doc/src/snippets/declarative/states.qml85
-rw-r--r--doc/src/snippets/declarative/texthandling.qml (renamed from doc/src/snippets/declarative/qml-intro/hello-world5.qml)52
-rw-r--r--doc/src/snippets/declarative/webview/webview.qml2
-rw-r--r--doc/src/snippets/qtreeview-dnd/dragdropmodel.h11
-rw-r--r--doc/src/snippets/qtscript/evaluation/main.cpp4
-rw-r--r--doc/src/snippets/qtscript/registeringobjects/main.cpp4
-rw-r--r--doc/src/snippets/qtscript/registeringvalues/main.cpp4
-rw-r--r--doc/src/snippets/textblock-fragments/xmlwriter.cpp5
-rw-r--r--doc/src/snippets/textdocument-frames/xmlwriter.cpp2
-rw-r--r--doc/src/snippets/textdocument-tables/xmlwriter.cpp2
-rw-r--r--doc/src/sql-programming/sql-driver.qdoc12
-rw-r--r--doc/src/template/style/offline.css33
-rwxr-xr-xdoc/src/template/style/style.css199
-rw-r--r--doc/src/tutorials/modelview.qdoc2
-rw-r--r--doc/src/tutorials/threads.qdoc572
-rw-r--r--doc/src/tutorials/widgets-tutorial.qdoc83
-rw-r--r--doc/src/widgets-and-layouts/layout.qdoc16
-rw-r--r--doc/src/widgets-and-layouts/styles.qdoc14
-rw-r--r--doc/src/widgets-and-layouts/stylesheet.qdoc30
-rw-r--r--doc/src/windows-and-dialogs/mainwindow.qdoc8
-rw-r--r--doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc2
-rw-r--r--examples/declarative/cppextensions/qwidgets/qwidgets.cpp53
-rw-r--r--examples/declarative/screenorientation/Core/Bubble.qml53
-rw-r--r--examples/declarative/screenorientation/Core/Button.qml53
-rw-r--r--examples/declarative/screenorientation/Core/screenorientation.js53
-rw-r--r--examples/declarative/screenorientation/screenorientation.qml53
-rw-r--r--examples/declarative/text/textselection/textselection.qml53
-rw-r--r--examples/declarative/ui-components/tabwidget/TabWidget.qml2
-rw-r--r--examples/ja_JP/linguist/hellotr/main.cpp53
-rw-r--r--examples/scroller/graphicsview/main.cpp53
-rw-r--r--examples/scroller/plot/main.cpp53
-rw-r--r--examples/scroller/plot/plotwidget.cpp53
-rw-r--r--examples/scroller/plot/plotwidget.h53
-rw-r--r--examples/scroller/plot/settingswidget.cpp53
-rw-r--r--examples/scroller/plot/settingswidget.h53
-rw-r--r--examples/scroller/wheel/main.cpp53
-rw-r--r--examples/scroller/wheel/wheelwidget.cpp53
-rw-r--r--examples/scroller/wheel/wheelwidget.h53
-rw-r--r--examples/tools/undoframework/commands.cpp6
-rw-r--r--examples/tools/undoframework/commands.h1
-rwxr-xr-xexamples/tutorials/threads/clock/clock.pro14
-rw-r--r--examples/tutorials/threads/clock/clockthread.cpp66
-rw-r--r--examples/tutorials/threads/clock/clockthread.h64
-rwxr-xr-xexamples/tutorials/threads/clock/main.cpp67
-rwxr-xr-xexamples/tutorials/threads/helloconcurrent/helloconcurrent.cpp61
-rwxr-xr-xexamples/tutorials/threads/helloconcurrent/helloconcurrent.pro16
-rwxr-xr-xexamples/tutorials/threads/hellothread/hellothread.cpp53
-rwxr-xr-xexamples/tutorials/threads/hellothread/hellothread.h54
-rwxr-xr-xexamples/tutorials/threads/hellothread/hellothread.pro17
-rwxr-xr-xexamples/tutorials/threads/hellothread/main.cpp54
-rwxr-xr-xexamples/tutorials/threads/hellothreadpool/hellothreadpool.cpp65
-rwxr-xr-xexamples/tutorials/threads/hellothreadpool/hellothreadpool.pro17
-rwxr-xr-xexamples/tutorials/threads/movedobject/main.cpp69
-rwxr-xr-xexamples/tutorials/threads/movedobject/movedobject.pro18
-rw-r--r--examples/tutorials/threads/movedobject/thread.cpp101
-rw-r--r--examples/tutorials/threads/movedobject/thread.h67
-rw-r--r--examples/tutorials/threads/movedobject/workerobject.cpp87
-rw-r--r--examples/tutorials/threads/movedobject/workerobject.h64
-rw-r--r--examples/tutorials/threads/threads.pro8
-rw-r--r--examples/tutorials/tutorials.pro3
-rw-r--r--examples/webkit/fancybrowser/fancybrowser.pro2
-rw-r--r--mkspecs/common/symbian/symbian.conf41
-rw-r--r--mkspecs/features/symbian/default_post.prf4
-rw-r--r--mkspecs/features/symbian/sis_targets.prf22
-rw-r--r--mkspecs/unsupported/win32-g++-cross/qmake.conf4
-rw-r--r--mkspecs/win32-msvc2005/qmake.conf2
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf2
-rw-r--r--projects.pro8
-rw-r--r--qmake/generators/symbian/initprojectdeploy_symbian.cpp9
-rw-r--r--qmake/generators/symbian/symmake_sbsv2.cpp6
-rw-r--r--src/3rdparty/libjpeg/README15
-rw-r--r--src/3rdparty/libjpeg/change.log36
-rw-r--r--src/3rdparty/libjpeg/cjpeg.1325
-rw-r--r--src/3rdparty/libjpeg/djpeg.1252
-rw-r--r--src/3rdparty/libjpeg/jcapimin.c6
-rw-r--r--src/3rdparty/libjpeg/jcmarker.c36
-rw-r--r--src/3rdparty/libjpeg/jcmaster.c198
-rw-r--r--src/3rdparty/libjpeg/jconfig.cfg8
-rw-r--r--src/3rdparty/libjpeg/jconfig.h132
-rw-r--r--src/3rdparty/libjpeg/jconfig.mc62
-rw-r--r--src/3rdparty/libjpeg/jconfig.txt9
-rw-r--r--src/3rdparty/libjpeg/jdatasrc.c4
-rw-r--r--src/3rdparty/libjpeg/jddctmgr.c4
-rw-r--r--src/3rdparty/libjpeg/jidctflt.c57
-rw-r--r--src/3rdparty/libjpeg/jinclude.h4
-rw-r--r--src/3rdparty/libjpeg/jmorecfg.h5
-rw-r--r--src/3rdparty/libjpeg/jpeglib.h8
-rw-r--r--src/3rdparty/libjpeg/jversion.h6
-rw-r--r--src/3rdparty/libjpeg/libjpeg.map4
-rw-r--r--src/3rdparty/libjpeg/libjpeg.txt20
-rw-r--r--src/3rdparty/libjpeg/makcjpeg.st36
-rw-r--r--src/3rdparty/libjpeg/makdjpeg.st36
-rw-r--r--src/3rdparty/libjpeg/makeadsw.vc677
-rw-r--r--src/3rdparty/libjpeg/makeasln.vc933
-rw-r--r--src/3rdparty/libjpeg/makecdep.vc682
-rw-r--r--src/3rdparty/libjpeg/makecdsp.vc6130
-rw-r--r--src/3rdparty/libjpeg/makecmak.vc6159
-rw-r--r--src/3rdparty/libjpeg/makecvcp.vc9186
-rw-r--r--src/3rdparty/libjpeg/makeddep.vc682
-rw-r--r--src/3rdparty/libjpeg/makeddsp.vc6130
-rw-r--r--src/3rdparty/libjpeg/makedmak.vc6159
-rw-r--r--src/3rdparty/libjpeg/makedvcp.vc9186
-rw-r--r--src/3rdparty/libjpeg/makefile.ansi220
-rw-r--r--src/3rdparty/libjpeg/makefile.bcc291
-rw-r--r--src/3rdparty/libjpeg/makefile.dj226
-rw-r--r--src/3rdparty/libjpeg/makefile.manx220
-rw-r--r--src/3rdparty/libjpeg/makefile.mc6255
-rw-r--r--src/3rdparty/libjpeg/makefile.mms224
-rw-r--r--src/3rdparty/libjpeg/makefile.sas258
-rw-r--r--src/3rdparty/libjpeg/makefile.unix234
-rw-r--r--src/3rdparty/libjpeg/makefile.vc217
-rw-r--r--src/3rdparty/libjpeg/makefile.vms142
-rw-r--r--src/3rdparty/libjpeg/makefile.wat239
-rw-r--r--src/3rdparty/libjpeg/makejdep.vc6423
-rw-r--r--src/3rdparty/libjpeg/makejdsp.vc6285
-rw-r--r--src/3rdparty/libjpeg/makejdsw.vc629
-rw-r--r--src/3rdparty/libjpeg/makejmak.vc6425
-rw-r--r--src/3rdparty/libjpeg/makejsln.vc917
-rw-r--r--src/3rdparty/libjpeg/makejvcp.vc9328
-rw-r--r--src/3rdparty/libjpeg/makeproj.mac213
-rw-r--r--src/3rdparty/libjpeg/makerdep.vc66
-rw-r--r--src/3rdparty/libjpeg/makerdsp.vc678
-rw-r--r--src/3rdparty/libjpeg/makermak.vc6110
-rw-r--r--src/3rdparty/libjpeg/makervcp.vc9133
-rw-r--r--src/3rdparty/libjpeg/maketdep.vc643
-rw-r--r--src/3rdparty/libjpeg/maketdsp.vc6122
-rw-r--r--src/3rdparty/libjpeg/maketmak.vc6131
-rw-r--r--src/3rdparty/libjpeg/maketvcp.vc9178
-rw-r--r--src/3rdparty/libjpeg/makewdep.vc66
-rw-r--r--src/3rdparty/libjpeg/makewdsp.vc678
-rw-r--r--src/3rdparty/libjpeg/makewmak.vc6110
-rw-r--r--src/3rdparty/libjpeg/makewvcp.vc9133
-rw-r--r--src/3rdparty/libjpeg/makljpeg.st68
-rw-r--r--src/3rdparty/libjpeg/maktjpeg.st30
-rw-r--r--src/3rdparty/libjpeg/makvms.opt4
-rw-r--r--src/3rdparty/libjpeg/usage.txt18
-rw-r--r--src/3rdparty/libpng/ANNOUNCE408
-rw-r--r--src/3rdparty/libpng/CHANGES1888
-rw-r--r--src/3rdparty/libpng/CMakeLists.txt373
-rw-r--r--src/3rdparty/libpng/INSTALL46
-rw-r--r--src/3rdparty/libpng/LICENSE6
-rw-r--r--src/3rdparty/libpng/README84
-rw-r--r--src/3rdparty/libpng/TODO8
-rw-r--r--src/3rdparty/libpng/aclocal.m48949
-rwxr-xr-xsrc/3rdparty/libpng/autogen.sh25
-rw-r--r--[-rwxr-xr-x]src/3rdparty/libpng/config.guess196
-rw-r--r--[-rwxr-xr-x]src/3rdparty/libpng/config.sub43
-rwxr-xr-xsrc/3rdparty/libpng/configure13839
-rw-r--r--src/3rdparty/libpng/configure.ac57
-rwxr-xr-xsrc/3rdparty/libpng/depcomp630
-rw-r--r--src/3rdparty/libpng/example.c62
-rwxr-xr-xsrc/3rdparty/libpng/install-sh520
-rwxr-xr-xsrc/3rdparty/libpng/libpng-config.in127
-rw-r--r--src/3rdparty/libpng/libpng-manual.txt (renamed from src/3rdparty/libpng/libpng-1.4.0.txt)1311
-rw-r--r--src/3rdparty/libpng/libpng.31649
-rw-r--r--src/3rdparty/libpng/libpngpf.3798
-rwxr-xr-xsrc/3rdparty/libpng/ltmain.sh8406
-rwxr-xr-xsrc/3rdparty/libpng/missing376
-rwxr-xr-xsrc/3rdparty/libpng/mkinstalldirs162
-rw-r--r--src/3rdparty/libpng/png.54
-rw-r--r--src/3rdparty/libpng/png.c1720
-rw-r--r--src/3rdparty/libpng/png.h2154
-rw-r--r--src/3rdparty/libpng/pngbar.jpgbin2498 -> 0 bytes
-rw-r--r--src/3rdparty/libpng/pngbar.pngbin2399 -> 0 bytes
-rw-r--r--src/3rdparty/libpng/pngconf.h1675
-rw-r--r--src/3rdparty/libpng/pngdebug.h157
-rw-r--r--src/3rdparty/libpng/pngerror.c301
-rw-r--r--src/3rdparty/libpng/pngget.c695
-rw-r--r--src/3rdparty/libpng/pnginfo.h270
-rw-r--r--src/3rdparty/libpng/pnglibconf.h176
-rw-r--r--src/3rdparty/libpng/pngmem.c245
-rw-r--r--src/3rdparty/libpng/pngnow.pngbin2069 -> 0 bytes
-rw-r--r--src/3rdparty/libpng/pngpread.c455
-rw-r--r--src/3rdparty/libpng/pngpriv.h920
-rw-r--r--src/3rdparty/libpng/pngread.c391
-rw-r--r--src/3rdparty/libpng/pngrio.c41
-rw-r--r--src/3rdparty/libpng/pngrtran.c1545
-rw-r--r--src/3rdparty/libpng/pngrutil.c1618
-rw-r--r--src/3rdparty/libpng/pngset.c678
-rw-r--r--src/3rdparty/libpng/pngstruct.h308
-rw-r--r--src/3rdparty/libpng/pngtest.c347
-rw-r--r--src/3rdparty/libpng/pngtest.pngbin8608 -> 0 bytes
-rw-r--r--src/3rdparty/libpng/pngtrans.c139
-rw-r--r--src/3rdparty/libpng/pngvalid.c6658
-rw-r--r--src/3rdparty/libpng/pngwio.c61
-rw-r--r--src/3rdparty/libpng/pngwrite.c621
-rw-r--r--src/3rdparty/libpng/pngwtran.c152
-rw-r--r--src/3rdparty/libpng/pngwutil.c985
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/README.txt11
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.bpf22
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.bpg25
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.bpr157
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.cpp29
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpng.readme.txt25
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpf22
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpr109
-rw-r--r--src/3rdparty/libpng/projects/cbuilder5/zlib.readme.txt14
-rw-r--r--src/3rdparty/libpng/projects/visualc6/README.txt55
-rw-r--r--src/3rdparty/libpng/projects/visualc6/libpng.dsp328
-rw-r--r--src/3rdparty/libpng/projects/visualc6/libpng.dsw59
-rw-r--r--src/3rdparty/libpng/projects/visualc6/pngtest.dsp178
-rw-r--r--src/3rdparty/libpng/projects/visualc71/PRJ0041.mak21
-rw-r--r--src/3rdparty/libpng/projects/visualc71/README.txt55
-rw-r--r--src/3rdparty/libpng/projects/visualc71/README_zlib.txt42
-rw-r--r--src/3rdparty/libpng/projects/xcode/Info.plist26
-rw-r--r--src/3rdparty/libpng/projects/xcode/README.txt9
-rw-r--r--src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/.gitignore2
-rw-r--r--src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj353
-rw-r--r--src/3rdparty/libpng/scripts/README.txt67
-rw-r--r--src/3rdparty/libpng/scripts/SCOPTIONS.ppc7
-rw-r--r--src/3rdparty/libpng/scripts/descrip.mms52
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config-body.in96
-rwxr-xr-xsrc/3rdparty/libpng/scripts/libpng-config-head.in24
-rw-r--r--src/3rdparty/libpng/scripts/libpng.pc.in10
-rw-r--r--src/3rdparty/libpng/scripts/makefile.32sunu257
-rw-r--r--src/3rdparty/libpng/scripts/makefile.64sunu257
-rw-r--r--src/3rdparty/libpng/scripts/makefile.acorn50
-rw-r--r--src/3rdparty/libpng/scripts/makefile.aix116
-rw-r--r--src/3rdparty/libpng/scripts/makefile.amiga51
-rw-r--r--src/3rdparty/libpng/scripts/makefile.atari55
-rw-r--r--src/3rdparty/libpng/scripts/makefile.bc32145
-rw-r--r--src/3rdparty/libpng/scripts/makefile.beos230
-rw-r--r--src/3rdparty/libpng/scripts/makefile.bor156
-rw-r--r--src/3rdparty/libpng/scripts/makefile.cegcc113
-rw-r--r--src/3rdparty/libpng/scripts/makefile.cygwin293
-rw-r--r--src/3rdparty/libpng/scripts/makefile.darwin237
-rw-r--r--src/3rdparty/libpng/scripts/makefile.dec217
-rw-r--r--src/3rdparty/libpng/scripts/makefile.dj258
-rw-r--r--src/3rdparty/libpng/scripts/makefile.elf279
-rw-r--r--src/3rdparty/libpng/scripts/makefile.freebsd48
-rw-r--r--src/3rdparty/libpng/scripts/makefile.gcc83
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hp64239
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hpgcc248
-rw-r--r--src/3rdparty/libpng/scripts/makefile.hpux236
-rw-r--r--src/3rdparty/libpng/scripts/makefile.ibmc77
-rw-r--r--src/3rdparty/libpng/scripts/makefile.intel106
-rw-r--r--src/3rdparty/libpng/scripts/makefile.knr103
-rw-r--r--src/3rdparty/libpng/scripts/makefile.linux253
-rw-r--r--src/3rdparty/libpng/scripts/makefile.mingw280
-rw-r--r--src/3rdparty/libpng/scripts/makefile.mips87
-rw-r--r--src/3rdparty/libpng/scripts/makefile.msc91
-rw-r--r--src/3rdparty/libpng/scripts/makefile.ne12bsd46
-rw-r--r--src/3rdparty/libpng/scripts/makefile.netbsd46
-rw-r--r--src/3rdparty/libpng/scripts/makefile.openbsd76
-rw-r--r--src/3rdparty/libpng/scripts/makefile.os272
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sco232
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sggcc243
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sgi247
-rw-r--r--src/3rdparty/libpng/scripts/makefile.so9254
-rw-r--r--src/3rdparty/libpng/scripts/makefile.solaris251
-rw-r--r--src/3rdparty/libpng/scripts/makefile.solaris-x86251
-rw-r--r--src/3rdparty/libpng/scripts/makefile.std95
-rw-r--r--src/3rdparty/libpng/scripts/makefile.sunos100
-rw-r--r--src/3rdparty/libpng/scripts/makefile.tc389
-rw-r--r--src/3rdparty/libpng/scripts/makefile.vcwin32103
-rw-r--r--src/3rdparty/libpng/scripts/makefile.watcom112
-rw-r--r--src/3rdparty/libpng/scripts/makevms.com142
-rw-r--r--src/3rdparty/libpng/scripts/png32ce.def257
-rw-r--r--src/3rdparty/libpng/scripts/pngos2.def251
-rw-r--r--src/3rdparty/libpng/scripts/pngwin.def212
-rw-r--r--src/3rdparty/libpng/scripts/pngwin.rc112
-rw-r--r--src/3rdparty/libpng/scripts/smakefile.ppc33
-rwxr-xr-xsrc/3rdparty/libpng/test-pngtest.sh3
-rw-r--r--src/3rdparty/libtiff/libtiff/tif_config.h2
-rw-r--r--src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch433
-rw-r--r--src/3rdparty/zlib.pri6
-rw-r--r--src/3rdparty/zlib/CMakeLists.txt190
-rw-r--r--src/3rdparty/zlib/ChangeLog355
-rw-r--r--src/3rdparty/zlib/FAQ261
-rw-r--r--src/3rdparty/zlib/INDEX30
-rw-r--r--src/3rdparty/zlib/Makefile154
-rw-r--r--src/3rdparty/zlib/Makefile.in154
-rw-r--r--src/3rdparty/zlib/README86
-rw-r--r--src/3rdparty/zlib/adler32.c38
-rw-r--r--src/3rdparty/zlib/compress.c7
-rwxr-xr-xsrc/3rdparty/zlib/configure459
-rw-r--r--src/3rdparty/zlib/crc32.c35
-rw-r--r--src/3rdparty/zlib/deflate.c268
-rw-r--r--src/3rdparty/zlib/deflate.h35
-rw-r--r--src/3rdparty/zlib/doc/algorithm.txt (renamed from src/3rdparty/zlib/algorithm.txt)2
-rw-r--r--src/3rdparty/zlib/doc/rfc1950.txt619
-rw-r--r--src/3rdparty/zlib/doc/rfc1951.txt955
-rw-r--r--src/3rdparty/zlib/doc/rfc1952.txt675
-rw-r--r--src/3rdparty/zlib/doc/txtvsbin.txt107
-rw-r--r--src/3rdparty/zlib/example.c4
-rw-r--r--src/3rdparty/zlib/examples/README.examples42
-rw-r--r--src/3rdparty/zlib/examples/fitblk.c233
-rw-r--r--src/3rdparty/zlib/examples/gun.c693
-rw-r--r--src/3rdparty/zlib/examples/gzappend.c500
-rw-r--r--src/3rdparty/zlib/examples/gzjoin.c448
-rw-r--r--src/3rdparty/zlib/examples/gzlog.c413
-rw-r--r--src/3rdparty/zlib/examples/gzlog.h58
-rw-r--r--src/3rdparty/zlib/examples/zlib_how.html523
-rw-r--r--src/3rdparty/zlib/examples/zpipe.c191
-rw-r--r--src/3rdparty/zlib/examples/zran.c404
-rw-r--r--src/3rdparty/zlib/gzclose.c25
-rw-r--r--src/3rdparty/zlib/gzguts.h139
-rw-r--r--src/3rdparty/zlib/gzio.c1026
-rw-r--r--src/3rdparty/zlib/gzlib.c537
-rw-r--r--src/3rdparty/zlib/gzread.c653
-rw-r--r--src/3rdparty/zlib/gzwrite.c531
-rw-r--r--src/3rdparty/zlib/infback.c93
-rw-r--r--src/3rdparty/zlib/inffast.c80
-rw-r--r--src/3rdparty/zlib/inffast.h4
-rw-r--r--src/3rdparty/zlib/inflate.c282
-rw-r--r--src/3rdparty/zlib/inflate.h31
-rw-r--r--src/3rdparty/zlib/inftrees.c63
-rw-r--r--src/3rdparty/zlib/inftrees.h27
-rw-r--r--src/3rdparty/zlib/make_vms.com461
-rw-r--r--src/3rdparty/zlib/minigzip.c134
-rw-r--r--src/3rdparty/zlib/projects/README.projects41
-rw-r--r--src/3rdparty/zlib/projects/visualc6/README.txt73
-rw-r--r--src/3rdparty/zlib/projects/visualc6/example.dsp278
-rw-r--r--src/3rdparty/zlib/projects/visualc6/minigzip.dsp278
-rw-r--r--src/3rdparty/zlib/projects/visualc6/zlib.dsp609
-rw-r--r--src/3rdparty/zlib/projects/visualc6/zlib.dsw59
-rw-r--r--src/3rdparty/zlib/treebuild.xml116
-rw-r--r--src/3rdparty/zlib/trees.c93
-rw-r--r--src/3rdparty/zlib/trees.h4
-rw-r--r--src/3rdparty/zlib/uncompr.c6
-rw-r--r--src/3rdparty/zlib/win32/DLL_FAQ.txt397
-rw-r--r--src/3rdparty/zlib/win32/Makefile.bor107
-rw-r--r--src/3rdparty/zlib/win32/Makefile.emx69
-rw-r--r--src/3rdparty/zlib/win32/Makefile.gcc141
-rw-r--r--src/3rdparty/zlib/win32/Makefile.msc126
-rw-r--r--src/3rdparty/zlib/win32/VisualC.txt3
-rw-r--r--src/3rdparty/zlib/win32/zlib.def60
-rw-r--r--src/3rdparty/zlib/win32/zlib1.rc39
-rw-r--r--src/3rdparty/zlib/zconf.h190
-rw-r--r--src/3rdparty/zlib/zconf.h.cmakein430
-rw-r--r--src/3rdparty/zlib/zconf.h.in (renamed from src/3rdparty/zlib/zconf.in.h)190
-rw-r--r--src/3rdparty/zlib/zlib.366
-rw-r--r--src/3rdparty/zlib/zlib.3.pdfbin0 -> 8686 bytes
-rw-r--r--src/3rdparty/zlib/zlib.h1242
-rw-r--r--src/3rdparty/zlib/zlib.pc.in13
-rw-r--r--src/3rdparty/zlib/zutil.c32
-rw-r--r--src/3rdparty/zlib/zutil.h63
-rw-r--r--src/corelib/animation/qabstractanimation.cpp8
-rw-r--r--src/corelib/animation/qabstractanimation_p.h1
-rw-r--r--src/corelib/concurrent/qfutureinterface.cpp2
-rw-r--r--src/corelib/global/global.pri5
-rw-r--r--src/corelib/global/qglobal.cpp150
-rw-r--r--src/corelib/global/qglobal.h21
-rw-r--r--src/corelib/global/qnamespace.qdoc92
-rw-r--r--src/corelib/io/qfilesystemwatcher_symbian.cpp5
-rw-r--r--src/corelib/io/qiodevice.cpp9
-rw-r--r--src/corelib/io/qprocess.cpp48
-rw-r--r--src/corelib/io/qprocess.h4
-rw-r--r--src/corelib/io/qprocess_p.h2
-rw-r--r--src/corelib/io/qprocess_symbian.cpp15
-rw-r--r--src/corelib/io/qresource.cpp6
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp50
-rw-r--r--src/corelib/kernel/qtranslator.cpp13
-rw-r--r--src/corelib/plugin/qplugin.qdoc8
-rw-r--r--src/corelib/statemachine/qhistorystate.cpp3
-rw-r--r--src/corelib/thread/qmutex_p.h8
-rw-r--r--src/corelib/thread/qmutex_symbian.cpp101
-rw-r--r--src/corelib/thread/qthread_symbian.cpp599
-rw-r--r--src/corelib/thread/qthread_unix.cpp158
-rw-r--r--src/corelib/thread/qwaitcondition_symbian.cpp196
-rw-r--r--src/corelib/thread/qwaitcondition_unix.cpp2
-rw-r--r--src/corelib/thread/thread.pri28
-rw-r--r--src/corelib/tools/qalgorithms.qdoc52
-rw-r--r--src/corelib/tools/qbytearray.cpp2
-rw-r--r--src/corelib/tools/qcache.qdoc6
-rw-r--r--src/corelib/tools/qiterator.qdoc80
-rw-r--r--src/corelib/tools/qmap.cpp2
-rw-r--r--src/corelib/tools/qpair.qdoc6
-rw-r--r--src/corelib/tools/qset.qdoc30
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp30
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc8
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp11
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflipable.cpp14
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp3
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase.cpp15
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase_p.h3
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepincharea.cpp236
-rw-r--r--src/declarative/graphicsitems/qdeclarativepincharea_p.h7
-rw-r--r--src/declarative/graphicsitems/qdeclarativepincharea_p_p.h5
-rw-r--r--src/declarative/graphicsitems/qdeclarativepositioners.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativerectangle.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextlayout.cpp3
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp3
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp2
-rw-r--r--src/declarative/qml/qdeclarativecontext.cpp46
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp2
-rw-r--r--src/declarative/qml/qdeclarativetypeloader.cpp17
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp3
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp174
-rw-r--r--src/declarative/util/qdeclarativebehavior.cpp6
-rw-r--r--src/declarative/util/qdeclarativeconnections.cpp2
-rw-r--r--src/declarative/util/qdeclarativelistmodel.cpp6
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp3
-rw-r--r--src/declarative/util/qdeclarativepropertychanges.cpp13
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp12
-rw-r--r--src/declarative/util/qdeclarativespringanimation.cpp20
-rw-r--r--src/declarative/util/qdeclarativestate.cpp4
-rw-r--r--src/declarative/util/qdeclarativestategroup.cpp6
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp22
-rw-r--r--src/declarative/util/qdeclarativeview.cpp20
-rw-r--r--src/gui/dialogs/qabstractprintdialog.cpp18
-rw-r--r--src/gui/dialogs/qmessagebox.cpp48
-rw-r--r--src/gui/egl/qegl_x11.cpp11
-rw-r--r--src/gui/embedded/qscreen_qws.cpp3
-rw-r--r--src/gui/embedded/qscreen_qws.h4
-rw-r--r--src/gui/graphicsview/qgraphicsanchorlayout.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp20
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp13
-rw-r--r--src/gui/graphicsview/qgraphicstransform.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp2
-rw-r--r--src/gui/image/qicon.cpp13
-rw-r--r--src/gui/image/qimage.cpp8
-rw-r--r--src/gui/image/qpaintengine_pic.cpp2
-rw-r--r--src/gui/image/qpicture.cpp3
-rw-r--r--src/gui/image/qpixmap_blitter.cpp3
-rw-r--r--src/gui/image/qpixmap_raster.cpp5
-rw-r--r--src/gui/image/qpixmap_s60.cpp4
-rw-r--r--src/gui/image/qpnghandler.cpp1
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp5
-rw-r--r--src/gui/inputmethod/qinputcontext.cpp7
-rw-r--r--src/gui/itemviews/qheaderview.cpp8
-rw-r--r--src/gui/itemviews/qlistwidget.cpp7
-rw-r--r--src/gui/itemviews/qtreewidget.cpp6
-rw-r--r--src/gui/kernel/qapplication_s60.cpp68
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm11
-rw-r--r--src/gui/kernel/qkeymapper_s60.cpp13
-rw-r--r--src/gui/kernel/qsoftkeymanager.cpp31
-rw-r--r--src/gui/kernel/qsoftkeymanager_common_p.h3
-rw-r--r--src/gui/kernel/qsoftkeymanager_s60.cpp12
-rw-r--r--src/gui/kernel/qt_s60_p.h25
-rw-r--r--src/gui/kernel/qwidget.cpp4
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp55
-rw-r--r--src/gui/painting/qbackingstore.cpp8
-rw-r--r--src/gui/painting/qbackingstore_p.h3
-rw-r--r--src/gui/painting/qgraphicssystem_runtime.cpp9
-rw-r--r--src/gui/painting/qgraphicssystem_runtime_p.h3
-rw-r--r--src/gui/painting/qpaintbuffer.cpp2
-rw-r--r--src/gui/painting/qpaintengine_alpha.cpp4
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp2
-rw-r--r--src/gui/painting/qpaintengine_mac_p.h5
-rw-r--r--src/gui/painting/qpainter.cpp3
-rw-r--r--src/gui/painting/qpainterpath.cpp16
-rw-r--r--src/gui/painting/qpdf.cpp3
-rw-r--r--src/gui/painting/qprintengine_mac.mm1
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp2
-rw-r--r--src/gui/painting/qwindowsurface.cpp11
-rw-r--r--src/gui/painting/qwindowsurface_p.h19
-rw-r--r--src/gui/painting/qwindowsurface_raster.cpp5
-rw-r--r--src/gui/painting/qwindowsurface_raster_p.h2
-rw-r--r--src/gui/painting/qwindowsurface_s60.cpp4
-rw-r--r--src/gui/painting/qwindowsurface_s60_p.h2
-rw-r--r--src/gui/painting/qwindowsurface_x11.cpp9
-rw-r--r--src/gui/painting/qwindowsurface_x11_p.h3
-rw-r--r--src/gui/styles/qs60style.cpp85
-rw-r--r--src/gui/styles/qs60style_p.h2
-rw-r--r--src/gui/styles/qs60style_s60.cpp18
-rw-r--r--src/gui/styles/qs60style_simulated.cpp5
-rw-r--r--src/gui/text/qfont_p.h4
-rw-r--r--src/gui/text/qfontdatabase.cpp2
-rw-r--r--src/gui/text/qfontengine_ft.cpp109
-rw-r--r--src/gui/text/qfontengine_ft_p.h5
-rw-r--r--src/gui/text/qfontengine_p.h2
-rw-r--r--src/gui/text/qfontmetrics.cpp1
-rw-r--r--src/gui/text/qstatictext.cpp3
-rw-r--r--src/gui/text/qtextcontrol.cpp2
-rw-r--r--src/gui/text/qtextdocument.cpp3
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp2
-rw-r--r--src/gui/text/qtextengine.cpp4
-rw-r--r--src/gui/text/qtextimagehandler.cpp2
-rw-r--r--src/gui/text/qtextodfwriter.cpp2
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp2
-rw-r--r--src/gui/widgets/qabstractslider.cpp2
-rw-r--r--src/gui/widgets/qcombobox.cpp42
-rw-r--r--src/gui/widgets/qmenu.cpp36
-rw-r--r--src/gui/widgets/qscrollbar.cpp2
-rw-r--r--src/gui/widgets/qsplitter.cpp2
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp2
-rw-r--r--src/network/access/qftp.cpp4
-rw-r--r--src/network/access/qhttpthreaddelegate.cpp5
-rw-r--r--src/network/socket/qlocalsocket_win.cpp5
-rw-r--r--src/network/ssl/qsslcertificate.cpp34
-rw-r--r--src/network/ssl/qsslcertificate_p.h1
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp7
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp50
-rw-r--r--src/opengl/qgl.cpp61
-rw-r--r--src/opengl/qgl_egl.cpp7
-rw-r--r--src/opengl/qgl_p.h47
-rw-r--r--src/opengl/qgl_symbian.cpp44
-rw-r--r--src/opengl/qgl_x11egl.cpp3
-rw-r--r--src/opengl/qglframebufferobject.cpp4
-rw-r--r--src/opengl/qglfunctions.cpp4
-rw-r--r--src/opengl/qglpaintdevice.cpp2
-rw-r--r--src/opengl/qglpixelbuffer.cpp4
-rw-r--r--src/opengl/qpixmapdata_gl.cpp4
-rw-r--r--src/opengl/qpixmapdata_gl_p.h10
-rw-r--r--src/opengl/qpixmapdata_poolgl.cpp25
-rw-r--r--src/opengl/qwindowsurface_gl.cpp44
-rw-r--r--src/opengl/qwindowsurface_gl_p.h2
-rw-r--r--src/openvg/qpaintengine_vg.cpp3
-rw-r--r--src/openvg/qpixmapdata_vg.cpp11
-rw-r--r--src/openvg/qpixmapdata_vg_p.h2
-rw-r--r--src/openvg/qwindowsurface_vg.cpp7
-rw-r--r--src/openvg/qwindowsurface_vg_p.h2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp5
-rw-r--r--src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c5
-rw-r--r--src/plugins/graphicssystems/meego/qmeegographicssystem.cpp4
-rw-r--r--src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp12
-rw-r--r--src/plugins/s60/3_2/3_2.pro1
-rw-r--r--src/plugins/s60/5_0/5_0.pro1
-rw-r--r--src/plugins/s60/src/qlocale_3_2.cpp2
-rw-r--r--src/qt3support/tools/q3asciidict.qdoc6
-rw-r--r--src/qt3support/tools/q3dict.qdoc4
-rw-r--r--src/qt3support/tools/q3intdict.qdoc6
-rw-r--r--src/qt3support/tools/q3memarray.qdoc8
-rw-r--r--src/qt3support/tools/q3ptrdict.qdoc6
-rw-r--r--src/qt3support/tools/q3ptrlist.qdoc10
-rw-r--r--src/qt3support/tools/q3valuelist.qdoc10
-rw-r--r--src/qt3support/tools/q3valuestack.qdoc2
-rw-r--r--src/qt3support/tools/q3valuevector.qdoc10
-rw-r--r--src/s60installs/bwins/QtCoreu.def322
-rw-r--r--src/s60installs/bwins/QtGuiu.def1005
-rw-r--r--src/s60installs/bwins/QtOpenGLu.def287
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def4
-rw-r--r--src/s60installs/eabi/QtCoreu.def220
-rw-r--r--src/s60installs/eabi/QtGuiu.def9
-rw-r--r--src/s60installs/eabi/QtOpenGLu.def109
-rw-r--r--src/s60installs/eabi/QtOpenVGu.def19
-rw-r--r--src/s60installs/s60installs.pro2
-rw-r--r--src/sql/kernel/qsqldriver.cpp4
-rw-r--r--src/sql/kernel/qsqlfield.cpp3
-rw-r--r--src/sql/models/qsqlrelationaltablemodel.cpp10
-rw-r--r--src/sql/models/qsqltablemodel.cpp64
-rw-r--r--src/sql/models/qsqltablemodel_p.h4
-rw-r--r--src/testlib/qsignalspy.qdoc10
-rw-r--r--src/testlib/qtestevent.qdoc2
-rw-r--r--tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp22
-rw-r--r--tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp2
-rw-r--r--tests/auto/declarative/qdeclarativepincharea/data/flickresize.qml50
-rw-r--r--tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp73
-rw-r--r--tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp22
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/data/CursorRect.qml8
-rw-r--r--tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp32
-rw-r--r--tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp85
-rw-r--r--tests/auto/qdir/qdir.pro2
-rw-r--r--tests/auto/qftp/tst_qftp.cpp40
-rw-r--r--tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp4
-rw-r--r--tests/auto/qmutex/tst_qmutex.cpp69
-rw-r--r--tests/auto/qpainterpath/tst_qpainterpath.cpp4
-rw-r--r--tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp54
-rw-r--r--tests/auto/qsemaphore/tst_qsemaphore.cpp26
-rw-r--r--tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp34
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp7
-rw-r--r--tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp6
-rw-r--r--tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp6
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted1.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted2.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted3.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted4.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted5.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted6.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted7.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted8.pem19
-rw-r--r--tests/auto/qsslcertificate/more-certificates/blacklisted9.pem19
-rw-r--r--tests/auto/qsslcertificate/tst_qsslcertificate.cpp11
-rw-r--r--tests/auto/qsslsocket/certs/fake-login.live.com.key15
-rw-r--r--tests/auto/qsslsocket/certs/fake-login.live.com.pem19
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp45
-rw-r--r--tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp6
-rw-r--r--tests/auto/qthread/tst_qthread.cpp69
-rw-r--r--tests/auto/qthreadstorage/tst_qthreadstorage.cpp15
-rw-r--r--tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp21
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro5
-rw-r--r--tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp210
-rw-r--r--tools/designer/src/lib/sdk/membersheet.qdoc8
-rw-r--r--tools/designer/src/lib/sdk/propertysheet.qdoc8
-rw-r--r--tools/designer/src/lib/sdk/taskmenu.qdoc6
-rw-r--r--tools/designer/src/lib/shared/shared.pri2
-rw-r--r--tools/designer/src/lib/uilib/container.qdoc6
-rw-r--r--tools/designer/src/lib/uilib/customwidget.qdoc6
-rw-r--r--tools/qdoc3/atom.cpp8
-rw-r--r--tools/qdoc3/atom.h87
-rw-r--r--tools/qdoc3/cppcodeparser.cpp23
-rw-r--r--tools/qdoc3/ditaxmlgenerator.cpp2437
-rw-r--r--tools/qdoc3/ditaxmlgenerator.h232
-rw-r--r--tools/qdoc3/doc.cpp240
-rw-r--r--tools/qdoc3/doc/config/compat.qdocconf28
-rw-r--r--tools/qdoc3/doc/config/macros.qdocconf37
-rw-r--r--tools/qdoc3/doc/config/qdoc-online.qdocconf2
-rw-r--r--tools/qdoc3/doc/config/qdoc-project.qdocconf47
-rw-r--r--tools/qdoc3/doc/config/qdoc.qdocconf2
-rw-r--r--tools/qdoc3/doc/config/qt-cpp-ignore.qdocconf98
-rw-r--r--tools/qdoc3/doc/config/qt-defines.qdocconf17
-rw-r--r--tools/qdoc3/doc/config/qt-html-default-styles.qdocconf32
-rw-r--r--tools/qdoc3/doc/config/qt-html-online-styles.qdocconf72
-rw-r--r--tools/qdoc3/doc/config/qt-html-templates-online.qdocconf115
-rw-r--r--tools/qdoc3/doc/config/qt-html-templates.qdocconf54
-rwxr-xr-xtools/qdoc3/doc/config/scripts/functions.js258
-rwxr-xr-xtools/qdoc3/doc/config/scripts/jquery.js152
-rw-r--r--tools/qdoc3/doc/config/scripts/narrow.js133
-rw-r--r--tools/qdoc3/doc/config/scripts/superfish.js121
-rw-r--r--tools/qdoc3/doc/config/style/narrow.css271
-rw-r--r--tools/qdoc3/doc/config/style/offline.css673
-rw-r--r--tools/qdoc3/doc/config/style/style.css1733
-rw-r--r--tools/qdoc3/doc/config/style/style_ie6.css54
-rw-r--r--tools/qdoc3/doc/config/style/style_ie7.css19
-rw-r--r--tools/qdoc3/doc/config/style/style_ie8.css0
-rw-r--r--tools/qdoc3/doc/config/style/superfish.css51
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdoc10120
-rw-r--r--tools/qdoc3/doc/qdoc-manual.qdocconf234
-rw-r--r--tools/qdoc3/helpprojectwriter.cpp13
-rw-r--r--tools/qdoc3/htmlgenerator.cpp123
-rw-r--r--tools/qdoc3/node.cpp176
-rw-r--r--tools/qdoc3/node.h17
-rw-r--r--tools/qdoc3/qdoc3.pro18
-rw-r--r--tools/qdoc3/qmlcodeparser.cpp2
-rw-r--r--tools/qdoc3/test/qt-html-templates-online.qdocconf40
-rw-r--r--tools/shared/qtpropertybrowser/qtpropertybrowserutils.pri4
-rw-r--r--translations/translations.pri80
-rw-r--r--translations/translations.pro82
987 files changed, 59113 insertions, 86967 deletions
diff --git a/.commit-template b/.commit-template
index 6e0e3a4..589ca89 100644
--- a/.commit-template
+++ b/.commit-template
@@ -5,6 +5,6 @@
# ---[ Fields ]-----------------[ uncomment and edit as applicable ]---|
#Task-number:
-Reviewed-by: pending
+#Reviewed-by:
# ==================================[ please wrap at 72 characters ]===|
diff --git a/.gitignore b/.gitignore
index 462f8e4..11bc5b4 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@ examples/*/*/*
examples/*/*/*[.]app
!examples/declarative/*
!examples/tutorials/*
+!examples/tutorials/*/*
!examples/ja_JP/*/*
demos/*/*
!demos/spectrum/*
diff --git a/bin/createpackage.pl b/bin/createpackage.pl
index df91876..b7457e1 100755
--- a/bin/createpackage.pl
+++ b/bin/createpackage.pl
@@ -58,7 +58,7 @@ use File::Spec;
use File::Path;
# use CWD abs_bath, which is exported only on request
use Cwd 'abs_path';
-
+use File::Copy;
sub Usage() {
print <<ENDUSAGESTRING;
@@ -84,6 +84,8 @@ Where supported options are as follows:
[-g|gcce-is-armv5] = Convert gcce platform to armv5.
[-d|dont-patch] = Skip automatic patching of capabilities and pkg file if default certificate
is used. Instead non-self-signable capabilities just cause warnings.
+ [-t|tmp-dir <path>] = Specifies temporary directory to be used for package creation.
+ Defaults to 'createpackage_tmp' under same directory as templatepkg.
Where parameters are as follows:
templatepkg = Name of .pkg file template
target = Either debug or release
@@ -130,6 +132,7 @@ my $signed_sis_name = "";
my $onlyUnsigned = "";
my $convertGcce = "";
my $dontPatchCaps = "";
+my $tempPackageDir = "";
unless (GetOptions('i|install' => \$install,
'p|preprocess' => \$preprocessonly,
@@ -139,7 +142,8 @@ unless (GetOptions('i|install' => \$install,
's|stub' => \$stub,
'n|sisname=s' => \$signed_sis_name,
'g|gcce-is-armv5' => \$convertGcce,
- 'd|dont-patch' => \$dontPatchCaps,)) {
+ 'd|dont-patch' => \$dontPatchCaps,
+ 't|tmp-dir=s' => \$tempPackageDir,)) {
Usage();
}
@@ -190,18 +194,22 @@ $key = $ARGV[3] or $key = "";
my $passphrase;
$passphrase = $ARGV[4] or $passphrase = "";
+if ($tempPackageDir eq "") {
+ my ($templateVolume, $templatePath, $templateFileName) = File::Spec->splitpath($templatepkg);
+ $tempPackageDir = File::Spec->catpath($templateVolume, $templatePath."createpackage_tmp", "");
+}
+
+mkpath($tempPackageDir);
+
# Generate output pkg basename (i.e. file name without extension)
my $pkgoutputbasename = $templatepkg;
-my $preservePkgOutput = "";
$pkgoutputbasename =~ s/_template/_$targetplatform/g;
$pkgoutputbasename =~ s/_installer\.pkg/_installer___temp\.pkg/g;
-if ($pkgoutputbasename eq $templatepkg) {
- $preservePkgOutput = "1";
-}
$pkgoutputbasename =~ s/\.pkg//g;
# Store output file names to variables
-my $pkgoutput = $pkgoutputbasename.".pkg";
+my ($dummy1, $dummy2, $pkgoutput) = File::Spec->splitpath($pkgoutputbasename.".pkg");
+$pkgoutput = $tempPackageDir."/".$pkgoutput;
my $sisoutputbasename;
if ($signed_sis_name eq "") {
$sisoutputbasename = $pkgoutputbasename;
@@ -300,9 +308,7 @@ unlink $unsigned_sis_name;
if (!$onlyUnsigned) {
unlink $signed_sis_name;
}
-if (!$preservePkgOutput) {
- unlink $pkgoutput;
-}
+unlink $pkgoutput;
# Preprocess PKG
@@ -334,6 +340,11 @@ print OUTPUT $_;
close OUTPUT;
if ($preprocessonly) {
+ # Copy preprocessed file from tmp dir to pkg file dir
+ my ($templateVolume, $templatePath, $templateFileName) = File::Spec->splitpath($templatepkg);
+ my ($dummy1, $dummy2, $copyFileName) = File::Spec->splitpath($pkgoutput);
+ my $copyTarget = File::Spec->catpath($templateVolume, $templatePath, $copyFileName);
+ copy($pkgoutput, $copyTarget) or die "Preprocessed pkg file '$pkgoutput' cannot be copied.";
exit;
}
@@ -354,7 +365,7 @@ if($stub) {
system ("$patch_capabilities -c $pkgoutput") and print ("Warning: Package check for self-signing viability failed. Installing the package on a device will most likely fail!\n\n");
} else {
print("Auto-patching self-signed package.\n");
- system ("$patch_capabilities $pkgoutput") and die ("ERROR: Automatic patching failed");
+ system ("$patch_capabilities -t $tempPackageDir $pkgoutput") and die ("ERROR: Automatic patching failed");
}
}
@@ -377,9 +388,6 @@ if($stub) {
print ("\nUnsigned package creation failed!\n");
}
- if (!$preservePkgOutput) {
- unlink $pkgoutput;
- }
print ("\n");
exit;
}
@@ -405,10 +413,7 @@ if($stub) {
print ("\tAdditionally signed the SIS with certificate: $row->[0]!\n");
}
- # remove temporary pkg and unsigned sis
- if (!$preservePkgOutput) {
- unlink $pkgoutput;
- }
+ # remove temporary unsigned sis
if (!$preserveUnsigned) {
unlink $unsigned_sis_name;
}
diff --git a/bin/patch_capabilities.pl b/bin/patch_capabilities.pl
index 91ab4b8..40b6a17 100755
--- a/bin/patch_capabilities.pl
+++ b/bin/patch_capabilities.pl
@@ -53,6 +53,7 @@
use File::Copy;
use File::Spec;
+use File::Path;
sub Usage() {
print("This script can be used to set capabilities of all binaries\n");
@@ -63,11 +64,13 @@ sub Usage() {
print(" symbian-sbsv2 platform, 'target-platform' is REQUIRED. ***\n\n");
print(" *** NOTE2: When patching gcce binaries built with symbian-sbsv2 toolchain,\n");
print(" armv5 must be specified as platform.\n");
- print("\nUsage: patch_capabilities.pl [-c] pkg_filename [target-platform [capability list]]\n");
+ print("\nUsage: patch_capabilities.pl [-c|-t tmp_path] pkg_filename [target-platform [capability list]]\n");
print("\nE.g. patch_capabilities.pl myapp_template.pkg release-armv5 \"All -TCB\"\n");
print("\nThe parameter -c can be used to just check if package is compatible with self-signing\n");
print("without actually doing any patching.\n");
print("Explicit capability list cannot be used with -c parameter.\n");
+ print("\nThe parameter -t can be used to specify a dir under which the temporary files are created.\n");
+ print("Defaults to 'patch_capabilities_tmp' under the path to pkg file.\n");
exit();
}
@@ -101,6 +104,7 @@ if (@ARGV)
my $pkgFileName = shift(@ARGV);
my $justCheck = "";
my $msgPrefix = "Patching:";
+ my $tempPatchPath = "";
if ($pkgFileName eq "-c") {
$pkgFileName = shift(@ARGV);
@@ -108,6 +112,18 @@ if (@ARGV)
$msgPrefix = "Warning:";
}
+ if ($pkgFileName eq "-t") {
+ $tempPatchPath = shift(@ARGV);
+ $pkgFileName = shift(@ARGV);
+ }
+
+ my ($pkgVolume, $pkgPath, $pkgPlainFileName) = File::Spec->splitpath($pkgFileName);
+ if ($tempPatchPath eq "") {
+ $tempPatchPath = File::Spec->catpath($pkgVolume, $pkgPath."patch_capabilities_tmp", "");
+ }
+
+ mkpath($tempPatchPath);
+
# These variables will only be set for template .pkg files.
my $target;
my $platform;
@@ -165,8 +181,9 @@ if (@ARGV)
# Start with no binaries listed.
my @binaries = ();
+ my $binariesDelimeter = "///";
- my $tempPkgFileName = $pkgFileName."_@@TEMP@@";
+ my $tempPkgFileName = $tempPatchPath."/__TEMP__".$pkgPlainFileName;
if (!$justCheck) {
unlink($tempPkgFileName);
@@ -216,19 +233,23 @@ if (@ARGV)
$sourcePath =~ s/\$\(TARGET\)/$target/gm;
}
+ my ($dummy1, $dummy2, $binaryBaseName) = File::Spec->splitpath($sourcePath);
+
if ($justCheck) {
- push (@binaries, $sourcePath);
+ push (@binaries, $binaryBaseName.$binariesDelimeter.$sourcePath);
} else {
- # Change the source file name (but only if not already patched)
+ # Copy original files over to patching dir
+ # Patching dir will be flat to make it cleanable with QMAKE_CLEAN, so path
+ # will be collapsed into the file name to avoid name collisions in the rare
+ # case where custom pkg rules are used to install files with same names from
+ # different directories (probably using platform checks to choose only one of them.)
my $patchedSourcePath = $sourcePath;
- if ($patchedSourcePath !~ m/_patched_caps/)
- {
- $newLine =~ s/(^.*)(\.dll|\.exe)(.*)(\.dll|\.exe)/$1_patched_caps$2$3$4/i;
- $patchedSourcePath =~ s/(^.*)(\.dll|\.exe)/$1_patched_caps$2/i;
+ $patchedSourcePath =~ s/[\/\\:]/_/g;
+ $patchedSourcePath = "$tempPatchPath/$patchedSourcePath";
+ $newLine =~ s/^.*(\.dll|\.exe)(.*)(\.dll|\.exe)/\"$patchedSourcePath$2$3/i;
- copy($sourcePath, $patchedSourcePath) or die "$sourcePath cannot be copied for patching.";
- }
- push (@binaries, $patchedSourcePath);
+ copy($sourcePath, $patchedSourcePath) or die "$sourcePath cannot be copied for patching.";
+ push (@binaries, $binaryBaseName.$binariesDelimeter.$patchedSourcePath);
}
}
}
@@ -250,10 +271,13 @@ if (@ARGV)
my $baseCommandToExecute = "${epocToolsDir}elftran -vid 0x0 -capability \"%s\" ";
# Actually set the capabilities of the listed binaries.
- foreach my $binaryPath(@binaries)
+ foreach my $binariesItem(@binaries)
{
+ $binariesItem =~ m|^(.*)$binariesDelimeter(.*)$|;
+ my $binaryBaseName = $1;
+ my $binaryPath = $2;
+
# Create the command line for setting the capabilities.
- my ($binaryVolume, $binaryDirs, $binaryBaseName) = File::Spec->splitpath($binaryPath);
my $commandToExecute = $baseCommandToExecute;
my $executeNeeded = "";
if (@capabilitiesSpecified)
diff --git a/configure b/configure
index 382df60..1369b82 100755
--- a/configure
+++ b/configure
@@ -4780,12 +4780,7 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
#mkspecs/default is used as a (gasp!) default mkspec so QMAKESPEC needn't be set once configured
rm -rf mkspecs/default
- if [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
-#Link is not supported for Symbian build system
- cp -a mkspecs/`echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
- else
- ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
- fi
+ ln -s `echo $XQMAKESPEC | sed "s,^${relpath}/mkspecs/,,"` mkspecs/default
# fix makefiles
for mkfile in GNUmakefile Makefile; do
EXTRA_LFLAGS=
@@ -8256,12 +8251,7 @@ else
mv "$outpath/src/corelib/global/qconfig.h.new" "$outpath/src/corelib/global/qconfig.h"
chmod -w "$outpath/src/corelib/global/qconfig.h"
for conf in "$outpath/include/QtCore/qconfig.h" "$outpath/include/Qt/qconfig.h"; do
- if [ "$XPLATFORM_SYMBIAN_SBSV2" = "yes" ]; then
- [ -e "$conf" ] && rm -rf "$conf"
- cp -a "$outpath/src/corelib/global/qconfig.h" "$conf"
- elif [ '!' -f "$conf" ]; then
- ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
- fi
+ ln -s "$outpath/src/corelib/global/qconfig.h" "$conf"
done
fi
#-------------------------------------------------------------------------------
diff --git a/demos/qtdemo/examplecontent.cpp b/demos/qtdemo/examplecontent.cpp
index 64737c3..5385259 100644
--- a/demos/qtdemo/examplecontent.cpp
+++ b/demos/qtdemo/examplecontent.cpp
@@ -83,8 +83,10 @@ QString ExampleContent::loadDescription()
int errorLine, errorColumn;
QDomDocument exampleDoc;
- if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) {
- qDebug() << errorMsg << errorLine << errorColumn;
+ if (ba.isEmpty()) {
+ qDebug() << "No documentation found for" << name << "Is the documentation built?";
+ } else if (!exampleDoc.setContent(ba, false, &errorMsg, &errorLine, &errorColumn)) {
+ qDebug() << "Error loading documentation for " << name << ": " << errorMsg << errorLine << errorColumn;
}
QDomNodeList paragraphs = exampleDoc.elementsByTagName("p");
diff --git a/demos/spectrum/spectrum.pri b/demos/spectrum/spectrum.pri
index 5773900..75c0113 100644
--- a/demos/spectrum/spectrum.pri
+++ b/demos/spectrum/spectrum.pri
@@ -41,9 +41,9 @@ win32 {
# ..$${spectrum_build_dir}
# without the result having a trailing slash where spectrum_build_dir
# is undefined.
- spectrum_build_dir = /release
- if (!debug_and_release|build_pass): CONFIG(debug, debug|release) {
- spectrum_build_dir = /debug
+ build_pass {
+ CONFIG(release, release|debug): spectrum_build_dir = /release
+ CONFIG(debug, release|debug): spectrum_build_dir = /debug
}
}
diff --git a/dist/changes-4.7.3 b/dist/changes-4.7.3
index fa8a71e..1ff23c6 100644
--- a/dist/changes-4.7.3
+++ b/dist/changes-4.7.3
@@ -16,6 +16,16 @@ Qt Bug Tracker: http://bugreports.qt.nokia.com
Merge Request: http://qt.gitorious.org
****************************************************************************
+* Library *
+****************************************************************************
+
+QtNetwork
+---------
+
+- SSL
+* [QTBUG-18338] blacklist fraudulent SSL certificates
+
+****************************************************************************
* Platform Specific Changes *
****************************************************************************
@@ -38,6 +48,8 @@ QtMobility QtBearer depending applications
* [QTBUG-17786] BC between Qt 4.7.3 and 4.6.3 QTreeView::indexRowSizeHint
doesn't return correct value on Symbian for row when QPushButton widget is
inserted in the treeview
+* [QTBUG-4953] QMessageBox can not be closed/dismissed on touch phones if any
+widget is fullscreen
- Painting
* [QTBUG-17907] tst_QGraphicsTransform::rotation3d test case from
diff --git a/doc/src/classes.qdoc b/doc/src/classes.qdoc
index a1b5282..90a783e 100644
--- a/doc/src/classes.qdoc
+++ b/doc/src/classes.qdoc
@@ -153,7 +153,7 @@
\brief A Qt namespace contains enum types, functions, and sometimes classes.
- This is a list of the main namespaces in Qt.
+ This is a list of the main namespaces in Qt.
\generatelist{namespaces}
*/
diff --git a/doc/src/classes/phonon-api.qdoc b/doc/src/classes/phonon-api.qdoc
index c9f7a66..95e20dd 100644
--- a/doc/src/classes/phonon-api.qdoc
+++ b/doc/src/classes/phonon-api.qdoc
@@ -691,11 +691,11 @@
Example where data is written repeatedly.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 0
Example where data is written once:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 1
\sa Phonon::MediaSource, Phonon::MediaObject
@@ -811,7 +811,7 @@
The function is necessary for the case where a non-seekable MediaStream is
played more than once. For a seekable stream the implementation can simply call
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 2
\sa writeData(), needData()
*/
@@ -1003,7 +1003,7 @@
send an URL or filename directly to the constructors of the
\l{Phonon::}{MediaObject}.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 3
A MediaSource object cannot be reused for another multimedia
source. It is possible to play the same source again, and also
@@ -1382,7 +1382,7 @@
immediately after you call the play() function.
A play and forget code example:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 4
\sa {Phonon Module}, MediaObject
*/
@@ -1471,7 +1471,7 @@
If you need low latency between calling play() and the sound actually
starting to play on your output device you need to use MediaObject
and be able to set the URL before calling play(). Note that
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 5
doesn't make a difference: the application should be idle between the
load and play calls so that the backend can start preloading the
media and fill audio buffers.
@@ -1612,13 +1612,13 @@
queue; the new source is then removed from the queue. The
queue can be altered at any time.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 7
You can also make use of the
\l{Phonon::MediaObject::}{aboutToFinish()} signal, which is
guaranteed to be emitted in time for altering the queue.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 8
When playback is finishing, i.e., when a media source has been
played to the end and the queue is empty, several signals are
@@ -1715,9 +1715,9 @@
\warning The back-end is free to choose a different tick interval close
to what you asked for. This means that the following code \c may fail:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 9
On the other hand the following is guaranteed:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 10
\sa tick()
*/
@@ -1745,7 +1745,7 @@
media object gets a new source. Listen to the hasVideoChanged()
signal instead.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 11
Returns \c true if the media contains video data; otherwise,
returns \c false.
@@ -1763,7 +1763,7 @@
media object gets a new media source. The hasVideoChanged() signal
is emitted after this information is available.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 12
Returns \c true if the current media may be seeked; otherwise,
returns \c false.
@@ -1786,7 +1786,7 @@
A typical usage looks like this:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 13
*/
/*!
@@ -1867,7 +1867,7 @@
We show an example:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 14
\sa currentSource(), MediaSource
*/
@@ -2126,7 +2126,7 @@
You can use this signal to show a progress bar to the user when
in BufferingState:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 15
Note that the \l{Phonon::}{BufferingState} is commonly used when
waiting for data over a network connection, but this might not be
@@ -2270,7 +2270,7 @@
happen if the user has requested a backend change.
To connect to this signal do the following:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 16
\sa Notifier::capabilitiesChanged()
*/
@@ -2362,10 +2362,10 @@
An example use case would be to give the user a QComboBox to select
the output device:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 17
And to retrieve the selected AudioOutputDevice:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 18
*/
@@ -2565,7 +2565,7 @@
In order to use an effect, insert it into the path as follows:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 19
The effect will immediately begin applying it's transformations on
the path. To stop it, remove the Effect from the path.
@@ -3108,7 +3108,7 @@
The following code example shows how to create a path between two
media nodes and insert an effect on that path.
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 20
\sa Phonon::MediaNode, Phonon::MediaObject, Phonon::AudioOutput,
Phonon::VideoWidget, {Phonon Module}
@@ -4085,7 +4085,7 @@
A typical example of usage follows below:
- \snippet doc/src/snippets/code/doc_src_phonon-api.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_phonon-api.cpp 21
\sa {Phonon Module}
*/
diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc
index 0655fdb..4dd5eb9 100644
--- a/doc/src/declarative/anchor-layout.qdoc
+++ b/doc/src/declarative/anchor-layout.qdoc
@@ -28,15 +28,16 @@
/*!
\page qml-anchor-layout.html
\target anchor-layout
-\title Anchor-Based Layout in QML
-
-\section1 Overview
+\contentspage QML Features
+\previouspage {Using QML Positioner and Repeater Items}{Component Layouts}
+\nextpage {QML Mouse Events}{Mouse Events}
+\title Anchor-based Layout in QML
In addition to the more traditional \l Grid, \l Row, and \l Column,
QML also provides a way to layout items using the concept of \e anchors.
Each item can be thought of as having a set of 7 invisible "anchor lines":
\l {Item::anchors.left}{left}, \l {Item::anchors.horizontalCenter}{horizontalCenter},
-\l {Item::anchors.right}{right}, \l {Item::anchors.top}{top},
+\l {Item::anchors.right}{right}, \l {Item::anchors.top}{top},
\l {Item::anchors.verticalCenter}{verticalCenter}, \l {Item::anchors.baseline}{baseline},
and \l {Item::anchors.bottom}{bottom}.
diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc
index 59bf8f6..129fa34 100644
--- a/doc/src/declarative/animation.qdoc
+++ b/doc/src/declarative/animation.qdoc
@@ -27,308 +27,214 @@
/*!
\page qdeclarativeanimation.html
-\title QML Animation
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML States}{States}
+\nextpage {QML Data Models}{Structuring Data with Models}
+\title QML Animation and Transitions
+
+\keyword qml-animation-elements
+\section1 Animation and Transitions Elements
+\list
+\o \l {Transition} - Animates transitions during state changes
+\o \l {SequentialAnimation} - Runs animations sequentially
+\o \l {ParallelAnimation} - Runs animations in parallel
+\o \l {Behavior} - Specifies a default animation for property changes
+\o \l {PropertyAction} - Sets immediate property changes during animation
+\o \l {PauseAnimation} - Introduces a pause in an animation
+\o \l {SmoothedAnimation} - Allows a property to smoothly track a value
+\o \l {SpringAnimation} - Allows a property to track a value in a spring-like motion
+\o \l {ScriptAction} - Runs scripts during an animation
+\endlist
+\keyword qml-property-animation-elements
+Elements that animate properties based on data types
+\list
+\o \l {PropertyAnimation} - Animates property changes
+\o \l {NumberAnimation} - Animates properties of type qreal
+\o \l {Vector3dAnimation} - Animates properties of type QVector3d
+\o \l {ColorAnimation} - Animates color changes
+\o \l {RotationAnimation} - Animates rotations
+\o \l {ParentAnimation} - Animates parent changes
+\o \l {AnchorAnimation} - Animates anchor changes
+\endlist
-In QML, animations are created by applying animation objects to object property
-values to gradually change them over time. Animation objects are created from
-the built-in set of animation elements, which can be used to animate various
-types of property values. In addition, animation objects can be applied in
-different ways depending on the context in which they are required.
+In QML, animations are created by applying animation elements to property
+values. Animation elements will interpolate property values to create smooth
+transitions. As well, state transitions may assign animations to state changes.
To create an animation, use an appropriate animation element for the type of
the property that is to be animated, and apply the animation depending on the
-type of behavior that is required. This page describes the \l {Types of
-Animations} that can be created and the \l {Animation Elements} that are used
-to create these animations.
-
-
-\section1 Types of Animations
-
-An animation is created in different ways depending on the context in which it
-is required. Suppose a \l Rectangle's movement - that is, changes in its \c x
-or \c y property values - should be animated. The semantics of the animation
-differ depending on whether you want to create:
-
-\list
-\o An animation that moves the \l Rectangle as soon as it is created, to a
-known position
-\o An animation that only triggers when the \l Rectangle is moved by external
-sources - for example, when the mouse is clicked, animate the movement to the
-mouse position
-\o An animation that triggers when a particular signal is received
-\o A standalone animation that is not bound to the \l Rectangle's movement, but
-instead can be started and stopped from script as required
-\o An animation that only triggers during \l{QML States}{state changes}
-\endlist
+type of behavior that is required.
-To support these different types of animation methods, QML provides several
-methods for defining an animation. These are:
+\keyword qml-triggering-animations
+\section1 Triggering Animations
-\list
-\o Creating an \l{Animations as Property Value Sources}{animation using
-property value sources}, to immediately animate a specific property
-\o Using \l{Behavioral Animations}{behavioral animations}, which are triggered
-when a property changes value
-\o \l{Animations in a Signal Handler}{Within a signal handler}, to be triggered
-when a signal is received
-\o As a \l{Standalone Animation}{standalone animation}, that can be
-started/stopped from script and can be rebound to different objects
-\o Using \l{Transitions}{transitions}, to provide animations between \l{QML
-States}{state changes}
-\endlist
+There are several ways of setting animation to an object.
-These methods are demonstrated below. Notice these examples use
-PropertyAnimation, which is one of several QML elements that can be used to
-create an animation. See the \l {Animation Elements} section further below for
-details.
+\keyword qml-direct-animation
+\section2 Direct Property Animation
+To create an immediate movement or animated movement, set the property value
+directly. This may be done in signal handlers or attached properties.
+\snippet doc/src/snippets/declarative/animation.qml direct property change
-\section2 Animations as Property Value Sources
+However, to create more control, \e {property animations} apply smooth movements
+by interpolating values between property value changes. Property animations
+provide timing controls and allows different interpolations through
+\l{qml-easing-animation}{easing curves}.
-An animation is applied as a \l{QDeclarativePropertyValueSource}{property value
-source} using the \e Animation \bold on \e Property syntax. Here is a \l
-Rectangle whose movement is animated using this method:
+\snippet doc/src/snippets/declarative/animation.qml property animation
-\snippet doc/src/snippets/declarative/animation-propertyvaluesource.qml 0
-
-This applies a PropertyAnimation to the \l Rectangle's \c x and \c y properties
-to animate from their current values (i.e. zero) to 50, over 1000 milliseconds.
-The animation starts as soon as the \l Rectangle is loaded. To animate from
-specific values rather than the current \c x and \c y values, set the
-PropertyAnimation's \l {PropertyAnimation::}{from} property.
-
-Specifying an animation as a property value source is useful for animating a
-property to a particular value as soon as the object is loaded.
-
-
-\section2 Behavioral Animations
-
-Often an animation should be applied whenever a particular property value
-changes. In these cases, a \l Behavior can be used to specify a default
-animation for a property change. Here is an example:
-
-\snippet doc/src/snippets/declarative/animation-behavioral.qml 0
-
-This \l Rectangle has \l Behavior objects applied to its \c x and \c y
-properties. Whenever these properties change (in this case, when the mouse is
-clicked within the parent \l Item), the PropertyAnimation objects defined
-within the behaviors will be applied to these properties, thus animating the \l
-Rectangle's movement to its new position. Unlike the method of \l {Animations
-as Property Value Sources}{defining an animation as a property value source},
-which creates a one-time animation that animates a property to a known value, a
-behavioral animation is an animation that is triggered \e {in response to} a
-value change.
-
-Any changes to these properties will trigger their animations. If \c x or \c y
-were bound to other properties, and those properties changed, the animation
-would be triggered. The \l{Behavior::}{enabled} property can be used to force a
-\l Behavior to only apply under certain circumstances.
-
-Notice that unlike for property value source animations, the
-PropertyAnimation's \l {PropertyAnimation::}{from} and \l
-{PropertyAnimation::}{to} properties do not need to be defined because these
-values are already provided, respectively, by the \l Rectangle's current values
-and the new values set in the \c onClicked handler. If these properties were
-defined anyway, they would override the default values.
+Specialized \l{qml-property-animation-elements}{property animation elements}
+have more efficient implementations than the \l{PropertyAnimation} element. They
+are for setting animations to different QML types such as \c int, \c color, and
+rotations. Similarly, the \l{ParentAnimation} can animate parent changes.
-See the \l {declarative/animation/behaviors}{Behaviors example} for a
-demonstration of behavioral animations.
+See the \l {qml-controlling-animations}{Controlling Animations} section for more
+information about the different animation properties.
+\keyword qml-transition-animations
+\section2 Transitions during State Changes
-\section2 Animations in a Signal Handler
+\l{QML States}{States} are property configurations where a property may have different values to reflect different states. State changes introduce
+abrupt property changes; animations smooth transitions to produce visually
+appealing state changes.
-An animation can be created within a signal handler to be triggered when the
-signal is received. For example:
-
-\snippet doc/src/snippets/declarative/animation-signalhandler.qml 0
+The \l{Transition} element can contain
+\l{qml-animation-elements}{animation elements} to interpolate property changes
+caused by state changes. To assign the transition to an object, bind it to the
+\c transitions property.
-The PropertyAnimation is triggered when the MouseArea is clicked, animating the
-\c x and \c y properties to a value of 50 over 1000 milliseconds. Since the
-animation is not bound to a particular object or property, it must define the
-\l {PropertyAnimation::}{target} and \l {PropertyAnimation::}{property} (or \l
-{PropertyAnimation::}{targets} and \l{PropertyAnimation::}{properties}) values.
-The \l {PropertyAnimation::}{to} property is also required to specify the new
-\c x and \c y values.
+A button might have two states, the \c pressed state when the user clicks on the
+button and a \c released state when the user releases the button. We can assign
+different property configurations for each state. A transition would animate the
+change from the \c pressed state to the \c released state. Likewise, there would
+be an animation during the change from the \c released state to the \c pressed
+state.
+\snippet doc/src/snippets/declarative/animation.qml transition animation
-\section2 Standalone Animations
+Binding the \c to and \c from properties to the state's name will assign that
+particular transition to the state change. For simple or symmetric transitions,
+setting the to \c to property to the wild card symbol, "\c{*}", denotes
+that the transition applies to any state change.
-Animations can also be created as ordinary QML objects that are not bound to
-any particular objects and properties. Here is an example, using a
-PropertyAnimation object. The animation is explicitly started when the
-\l Rectangle is clicked:
+\snippet doc/src/snippets/declarative/animation.qml wildcard animation
-\snippet doc/src/snippets/declarative/animation-standalone.qml 0
+\section2 Default Animation as Behaviors
-A standalone animation object is not running by default and must be started explicitly
-using the \l {Animation::}{running} property or \l {Animation::}{start()} and
-\l {Animation::}{stop()} methods. Since the animation is not bound to a
-particular object or property, it must define the \l
-{PropertyAnimation::}{target} and \l {PropertyAnimation::}{property} (or \l
-{PropertyAnimation::}{targets} and \l{PropertyAnimation::}{properties}) values.
-The \l {PropertyAnimation::}{to} property is also required to specify the new
-\c x and \c y values. (The \l {PropertyAnimation::}{from} value can optionally
-be provided.)
+Default property animations are set using \e {behavior animations}. Animations
+declared in \l {Behavior} elements apply to the property and animates any
+property value changes. However, Behavior elements have an
+\c enabled property to purposely enable or disable the behavior animations.
-Standalone animations are useful when an animation is not targeted towards a
-single object property and the animation should be explicitly started and
-stopped.
+A ball component might have a behavior animation assigned to its \c x, \c y, and
+\c color properties. The behavior animation could be set up to simulate an
+elastic effect. In effect, this behavior animation would apply the elastic
+effect to the properties whenever the ball moves.
+\snippet doc/src/snippets/declarative/animation.qml behavior animation
-\section2 Transitions
+There are several methods of assigning behavior animations to properties. The
+\c{Behavior on <property>} declaration is a convenient way of assigning a
+behavior animation onto a property.
-Transitions are used to describe the animations to be applied when a \l {QML
-States}{state change} occurs. To create a transition, define a \l Transition
-object and add it to an item's \l {Item::}{transitions} property. An example:
+See the \l {declarative/animation/behaviors}{Behaviors example} for a
+demonstration of behavioral animations.
-\snippet doc/src/snippets/declarative/animation-transitions.qml 0
+\section1 Playing Animations in Parallel or in Sequence
-The PropertyChanges object in the \e moved state defines that when the
-\l Rectangle is in this state, its position should be changed
-to (50, 50). When the \l Rectangle changes to the \e moved state, the
-\l Transition will be triggered, and the transition's \l PropertyAnimation will
-animate the changes in the \c x and \c y properties to their new values.
-The animation will not be applied at any time other than during the state
-change.
+Animations can run \e {in parallel} or \e {in sequence}. Parallel animations
+will play a group of animations at the same time while sequential animations
+play a group of animations in order: one after the other. Grouping animations in
+\l{SequentialAnimation} and \l{ParallelAnimation} will play the animations in
+sequence or in parallel.
-Notice the example does not set any \l {PropertyAnimation::}{from} and \l
-{PropertyAnimation::}{to} values for the PropertyAnimation. As a convenience,
-these properties are automatically set to the values of \c x and \c y before
-and after the state change, respectively. However, they can be explicitly set
-if these values should be overrided.
+A banner component may have several icons or slogans to display, one after the
+other. The \c opacity property could transform to \c 1.0 denoting an opaque
+object. Using the \l{SequentialAnimation} element, the opacity animations will
+play after the preceding animation finishes. The \l{ParallelAnimation} element
+will play the animations at the same time.
-Also notice the PropertyAnimation does not need to specify a \l
-{PropertyAnimation::}{target} object; any \c x or \c y value of any object that
-has changed during the state change will be animated. However, the target can
-be set if the animation should be restricted to certain objects.
+\snippet doc/src/snippets/declarative/animation.qml sequential animation
-The top-level animations in a \l Transition are run in parallel. To run them
-one after the other, use a SequentialAnimation, as shown below in \l {Grouping
-Animations}.
+Once individual animations are placed into a SequentialAnimation or
+ParallelAnimation, they can no longer be started and stopped independently. The
+sequential or parallel animation must be started and stopped as a group.
-See the \l Transition documentation for more information.
+The \l SequentialAnimation element is also useful for playing
+\l{qml-transition-animations}{transition animations} because animations are
+played in parallel inside transitions.
+See the \l {declarative/animation/basics}{Animation basics example} for a
+demonstration of creating and combining multiple animations in QML.
-\section1 Animation Elements
+\keyword qml-controlling-animations
+\section1 Controlling Animations
-To create an animation, choose from one of the built-in QML animation elements.
-While the above examples are demonstrated using PropertyAnimation, they could
-have used other elements depending on the type of the property to be animated
-and whether a single or multiple animations are required.
+There are different methods to control animations.
-All animation elements inherit from the \l Animation element. It is not
+\section2 Animation Playback
+All \l{qml-animation-elements}{animation elements} inherit from the \l Animation element. It is not
possible to create \l Animation objects; instead, this element provides the
-essential properties and methods for animation elements. For example, it allows
-animations to be started and stopped through the \l {Animation::}{running}
-property and the \l{Animation::}{start()} and \l{Animation::}{stop()} methods.
-It can also define the number of \l {Animation::}{loops} for an animation.
+essential properties and methods for animation elements. Animation elements have
+\c{start()}, \c{stop()}, \c{resume()}, \c{pause()}, \c {restart()}, and
+\c{complete()} -- all of these methods control the execution of animations.
+\keyword qml-easing-animation
+\section2 Easing
-\section2 Property Animation Elements
+Easing curves define how the animation will interpolate between the start value
+and the end value. Different easing curves might go beyond the defined range of
+interpolation. The easing curves simplify the creation of animation effects such
+as bounce effects, acceleration, deceleration, and cyclical animations.
-PropertyAnimation is the most basic animation element for animating a property.
-It can be used to animate \c real, \c int, \c color, \c rect, \c point, \c size, and
-\c vector3d properties. It is inherited by NumberAnimation, ColorAnimation,
-RotationAnimation and Vector3dAnimation: NumberAnimation provides a more
-efficient implementation for animating \c real and \c int properties, and
-Vector3dAnimation does the same for \c vector3d properties. ColorAnimation
-and RotationAnimation provide more specific attributes for animating color
-and rotation changes.
+A QML object may have different easing curve for each property animation. There
+are also different parameters to control the curve, some of which are exclusive
+to a particular curve. For more information about the easing curves, visit the
+\l {PropertyAnimation::easing.type}{easing} documentation.
-A ColorAnimation allows color values for the \l {ColorAnimation::}{from}
-and \l {ColorAnimation::}{to} properties. The
-following animates the rectangle's \l {Rectangle::}{color} property:
-
-\snippet doc/src/snippets/declarative/animation-elements.qml color
+The \l{declarative/animation/easing}{easing example} visually demonstrates each
+of the different easing types.
-RotationAnimation allows a rotation's direction to be specified. The following
-animates the rectangle's \l {Item::rotation} property:
+\section2 Other Animation Elements
-\snippet doc/src/snippets/declarative/animation-elements.qml rotation
+In addition, QML provides several other elements useful for animation:
-In addition, the following specialized animation elements are available:
+\list
+\o PauseAnimation: enables pauses during animations
+\o ScriptAction: allows JavaScript to be executed during an animation, and can
+be used together with StateChangeScript to reused existing scripts
+\o PropertyAction: changes a property \e immediately during an animation,
+without animating the property change
+\endlist
+These are specialized animation elements that animate different property types
\list
-\o SmoothedAnimation: a specialized NumberAnimation that provides smooth
+\o SmoothedAnimation: a specialized NumberAnimation that provides smooth
changes in animation when the target value changes
-\o SpringAnimation: provides a spring-like animation with specialized
-attributes such as \l {SpringAnimation::}{mass},
+\o SpringAnimation: provides a spring-like animation with specialized
+attributes such as \l {SpringAnimation::}{mass},
\l{SpringAnimation::}{damping} and \l{SpringAnimation::}{epsilon}
\o ParentAnimation: used for animating a parent change (see ParentChange)
\o AnchorAnimation: used for animating an anchor change (see AnchorChanges)
\endlist
-See their respective documentation pages for more details.
-
-
-\section3 Easing
-
-Any PropertyAnimation-based animations can specify \l
-{PropertyAnimation::easing.type}{easing attributes} to control the
-easing curve applied when a property value is animated. These control the
-effect of the animation on the property value, to provide visual effects like
-bounce, acceleration and deceleration.
-
-For example, this modified version of an \l {Animations as Property Value
-Sources}{earlier example} uses \c Easing.OutBounce to create a bouncing effect
-when the animation reaches its target value:
-
-\snippet doc/src/snippets/declarative/animation-easing.qml 0
-
-The \l{declarative/animation/easing}{easing example} visually demonstrates each
-of the different easing types.
+*/
-\section2 Grouping Animations
-Multiple animations can be combined into a single animation using one of the
-animation group elements: ParallelAnimation or SequentialAnimation. As their
-names suggest, animations in a ParallelAnimation are run at the same time,
-while animations in a SequentialAnimation are run one after the other.
-To run multiple animations, define the animations within an animation group.
-The following example creates a SequentialAnimation that runs three animations
-one after the other: a NumberAnimation, a PauseAnimation and another
-NumberAnimation. The SequentialAnimation is applied as a \l{Animations as
-Property Value Sources}{property value source animation} on the image's \c y
-property, so that the animation starts as soon as the image is loaded, moving
-the image up and down:
+\snippet doc/src/snippets/declarative/animation-elements.qml color
+\snippet doc/src/snippets/declarative/animation-propertyvaluesource.qml 0
+\snippet doc/src/snippets/declarative/animation-signalhandler.qml 0
+\snippet doc/src/snippets/declarative/animation-standalone.qml 0
+\snippet doc/src/snippets/declarative/animation-transitions.qml 0
\snippet doc/src/snippets/declarative/animation-groups.qml 0
-\image propanim.gif
-
-Since the SequentialAnimation is applied to the \c y property, the individual
-animations within the group are automatically applied to the \c y property as
-well; it is not required to set their \l{PropertyAnimation::}{properties}
-values to a particular property.
-
-Animation groups can be nested. Here is a rather complex animation making use
-of both sequential and parallel animations:
\snippet doc/src/snippets/declarative/animation-groups.qml 1
+\snippet doc/src/snippets/declarative/animation-groups.qml 0
+\image propanim.gif
-Once individual animations are placed into a SequentialAnimation or
-ParallelAnimation, they can no longer be started and stopped independently. The
-sequential or parallel animation must be started and stopped as a group.
-
-See the \l {declarative/animation/basics}{Animation basics example} for a
-demonstration of creating and combining multiple animations in QML.
-
-
-
-\section2 Other Animation Elements
-
-In addition, QML provides several other elements useful for animation:
-
-\list
-\o PauseAnimation: enables pauses during animations
-\o ScriptAction: allows JavaScript to be executed during an animation, and can
-be used together with StateChangeScript to reused existing scripts
-\o PropertyAction: changes a property \e immediately during an animation,
-without animating the property change
-\endlist
-
-See their respective documentation pages for more details.
-
-*/
diff --git a/doc/src/declarative/basicelements.qdoc b/doc/src/declarative/basicelements.qdoc
new file mode 100644
index 0000000..0146591
--- /dev/null
+++ b/doc/src/declarative/basicelements.qdoc
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qmlbasicelements.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage QML Features
+\nextpage {QML Basic Types}{Data Types}
+
+\title QML Basic Elements
+
+QML's basic elements allow the easy inclusion of objects into the
+scene.
+
+\section1 Basic Elements
+This is a list of some of the elements readily available for users.
+\list
+\o \l {Item}
+\o \l {Rectangle}
+\o \l {Image}
+\o \l {Text}
+\o \l {TextInput}
+\o \l {TextEdit}
+\o \l {FocusScope}
+\o \l {Component}
+\o \l {MouseArea}
+\endlist
+
+For a complete list of QML elements, please visit the \l {QML Elements} page.
+
+\section1 Properties and Qt Declarative Module
+
+When using QML elements, keep in mind that elements may possess properties that
+other elements also possess. This is because QML and its underlying engine is
+implemented in C++ using Qt. More importantly, the chain of property inheritance
+is directly due to QML's use of the \l {Qt Declarative Module} and Qt's
+\l {Meta-Object System}{meta-object} and \l {The Property System}{property} systems. For example, visual elements that have C++ implementation are sublcasses of
+\l {QDeclarativeItem}. As a result, elements such as \l {Rectangle} and
+\l {Text} elements inherit properties such as \c clip and \c smooth.
+
+\section1 Item Element
+
+Many QML elements inherit \l Item properties. \c Item possesses important properties
+such as \c focus, \c children, and dimension properties such as \c width and
+\c height. Although \c Item has physical properties, it is not a visual element.
+Using \c Item as the top-level QML element (as the screen) will not produce a
+visual result, use the \l {Rectangle} element instead. Use the \c Item to create
+opacity effects, such as when creating an invisible container to hold other
+components.
+
+\section1 Rectangle Element
+
+The \l Rectangle element is the basic visual element, for displaying different
+types of items onto the screen. The \c Rectangle is customizable and utilizes
+other elements such as \l Gradient and \l BorderImage for displaying advanced
+customized graphics.
+
+\section1 Image Element
+
+To insert an image into a QML scene, merely declare an \l Image element. The
+\c Image element can load images in formats supported by Qt.
+
+\section1 Text Elements
+
+The \l Text and \l TextEdit elements display formatted text onto the screen.
+\c TextEdit features multi-line editing while the \l TextInput element is for
+single line text input.
+
+\keyword qml-top-level-component
+\section1 Using Elements as the Top-Level Component
+
+For creating components (or displaying a simple scene), there are different
+elements that could be used as the top-level component. To display a simple scene,
+a \l Rectangle as the top-level component may suffice. \l Rectangle,
+\l FocusScope, \l Component, \l {QML:QtObject} {QtObject}, \l Item, are some of
+the commonly used elements as the top-level component.
+
+When importing components, the top-level component is important because the
+top-level component's properties are the only properties exposed to the parent.
+
+For example, a \c Button component may be implemented using different elements as
+its top-level component. When this component is loaded into another QML scene,
+the component will retain the top-level component's properties. If a non-visual
+component is the top-level component, the visual properties should be aliased to
+the top-level to display the component properly.
+
+For more information on how to build upon QML elements, see the
+\l{Importing Reusable Components} document.
+*/
diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc
index 8503f4e..4792bba 100644
--- a/doc/src/declarative/basictypes.qdoc
+++ b/doc/src/declarative/basictypes.qdoc
@@ -27,23 +27,26 @@
/*!
\page qdeclarativebasictypes.html
+ \ingroup qml-features
+ \contentspage QML Features
+ \previouspage {QML Basic Elements}
+ \nextpage Property Binding
\title QML Basic Types
QML has a set of primitive types, as listed below, that are used throughout
the \l {QML Elements}.
- Some of these types can also be used for defining
- \c property values in QML. See \l{Writing QML Components: Properties, Methods and Signals} for the
- list of types that can be used for \c property values.
-
\annotatedlist qmlbasictypes
+
+ To create additional types, such as data types created in C++, read the
+ \l{Extending QML Functionalities using C++} article.
*/
/*!
\qmlbasictype int
\ingroup qmlbasictypes
- \brief An integer is a whole number, e.g. 0, 10, or -20.
+ \brief An integer is a whole number, e.g. 0, 10, or -20.
An integer is a whole number, e.g. 0, 10, or -20. The possible \c
int values range from around -2000000000 to around 2000000000,
@@ -137,7 +140,7 @@
\qmlbasictype url
\ingroup qmlbasictypes
- \brief A URL is a resource locator, like a file name.
+ \brief A URL is a resource locator, like a file name.
A URL is a resource locator, like a file name. It can be either
absolute, e.g. "http://qt.nokia.com", or relative, e.g.
@@ -150,9 +153,6 @@
Image { source: "pics/logo.png" }
\endqml
- \raw HTML
- \endraw
-
\sa {QML Basic Types}
*/
@@ -215,7 +215,7 @@
/*!
\qmlbasictype size
\ingroup qmlbasictypes
-
+
\brief A size type has width and height attributes
A \c size type has \c width and \c height attributes.
@@ -254,7 +254,7 @@
For example, to read the \l {Item::childrenRect.x}{Item::childrenRect} \c rect property:
\qml
- Rectangle {
+ Rectangle {
width: childrenRect.width
height: childrenRect.height
@@ -290,7 +290,7 @@
MyDatePicker { minDate: "2000-01-01"; maxDate: "2020-12-31" }
\endqml
- To read a date value returned from a C++ extension class, use
+ To read a date value returned from a C++ extension class, use
\l{QML:Qt::formatDate()}{Qt.formatDate()} and \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}.
\sa {QML Basic Types}
@@ -309,7 +309,7 @@
MyTimePicker { time: "14:22:15" }
\endqml
- To read a time value returned from a C++ extension class, use
+ To read a time value returned from a C++ extension class, use
\l{QML:Qt::formatTime()}{Qt.formatTime()} and \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}.
\sa {QML Basic Types}
@@ -399,8 +399,9 @@
\c child1, \c child2 and \c child3 will be added to the children list
in the order in which they appear.
- List \l {Adding Properties}{properties} can be declared as \c list<Type>
- type, where \c Type is the type of the object in the list:
+ List \l {Property Binding}{properties} can be created as a
+ \c variant type, or as a \c list<Type> type, where \c Type is the
+ type of the object in the list:
\qml
Item {
@@ -503,7 +504,7 @@
\qml
Item {
- property variant attributes: { ''color': 'red', 'width': 100 }
+ property variant attributes: { 'color': 'red', 'width': 100 }
Component.onCompleted: {
// Change the value of attributes.color to 'blue':
@@ -570,7 +571,7 @@
\qml
Text { horizontalAlignment: "AlignRight" }
\endqml
-
+
or as \c {<Element>.<value>}:
\qml
Text { horizontalAlignment: Text.AlignRight }
diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc
index 3962514..93571bd 100644
--- a/doc/src/declarative/declarativeui.qdoc
+++ b/doc/src/declarative/declarativeui.qdoc
@@ -31,12 +31,10 @@
\ingroup qt-gui-concepts
\brief Qt Quick provides a declarative framework for building highly
-dynamic, custom user interfaces.
-
-\section1 Introduction
+dynamic user interfaces.
Qt Quick is a collection of technologies that are designed to help
-developers create the kind of intuitive, modern-looking, fluid user
+developers create the kind of intuitive, modern, fluid user
interfaces that are increasingly used on mobile phones, media players,
set-top boxes and other portable devices.
@@ -45,115 +43,108 @@ language for describing user interfaces and a language runtime. A collection
of C++ APIs is used to integrate these high level features with classic
Qt applications.
-\section2 QML, Elements and the Qt Declarative Module
-
-User interfaces and their behavior are described using QML, an extension to
-\l{About JavaScript}{JavaScript} that lets developers and designers
-use a declarative syntax to specify each user interface in terms of
-\l{QML Elements}{QML elements}. These elements are a sophisticated set of
-graphical and behavioral building blocks that can be combined together in
-\l{QML Documents}{QML documents} to build components ranging in complexity
-from simple buttons and sliders, to complete Internet-enabled applications.
-
-QML improves the integration between JavaScript and Qt's existing
-QObject-based type system, adds support for automatic
-\l{Property Binding}{property bindings} and provides
-\l{Network Transparency}{network transparency} at the language level.
-
-The Qt Declarative module implements the interface between the QML language
-and the elements available to it. It also provides a C++ API that can be
-used to load and interact with QML files from within Qt applications.
-
-Qt Quick builds on \l{QML for Qt programmers}{Qt's existing strengths}.
-QML can be be used to incrementally extend an existing application or
-to build completely new applications. QML is fully
-\l{Extending QML in C++}{extensible from C++} through the Qt Declarative
-Module.
-
\section1 Getting Started
\list
-\o \l{What's new in Qt Quick}
-\o \l{Introduction to the QML language}
-\o \l{QML for Qt Programmers}
+\o \l{Intro to Qt Quick}{Introduction to Qt Quick}
+\o \l{QML for Qt Programmers}{QML Programming for Qt Programmers}
\o \l{Getting Started Programming with QML}
-\o \l{Intro to Qt Quick}
-\endlist
-\list
-\o \l{QML Tutorial}{Tutorial: "Hello World"}
-\o \l{QML Advanced Tutorial}{Tutorial: "Same Game"}
+\o \l{What's new in Qt Quick}{What's New in the Qt Quick Release}
\o \l{QML Examples and Demos}
\endlist
-\section1 QML Concepts
+\section1 QML Features
\list
-\o \l{QML Documents}
+\o \l{QML Basic Elements}{Basic Elements}
+\o \l{QML Basic Types}{Data Types}
\o \l{Property Binding}
-\o \l{Anchor-Based Layout in QML}
-\o \l{Writing QML Components: Properties, Methods and Signals}
-\o \l{QML Scope}
-\o \l{QML Modules}
+\o \l{Using QML Positioner and Repeater Items}{Component Layouts}
+\o \l{Anchor-based Layout in QML}{Layouts using Anchors}
+\o \l{QML Mouse Events}{Mouse Events}
+\o \l{QML Text Handling and Validators}{Text Handling and Validators}
+\o \l{Keyboard Focus in QML}{Keyboard Focus}
+\o \l{QML Signal and Handler Event System}{Signal and Handler Event System}
+\o \l{Importing Reusable Components}
+\o \l{QML States}{States}
+\o \l{QML Animation and Transitions}{Animation and Transitions}
+\o \l{QML Data Models}{Structuring Data with Models}
+\o \l{Presenting Data with Views}
+\o \l{Extending QML Functionalities using C++}
+\o \l{Using QML Bindings in C++ Applications}
+\o \l{Integrating QML Code with Existing Qt UI Code}
+\o \l{Dynamic Object Management in QML}{Dynamic Object Management}
+\o \l{Network Transparency}{Loading Resources in QML}
+\o \l{QML Internationalization}{Internationalization}
\endlist
-\section1 User Interaction
+\section1 QML Add-Ons
\list
-\o \l{Keyboard Focus in QML}
-\o \l{QML States}
-\o \l{QML Animation}
+\o \l{QtWebKit QML Module}
+\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins}
\endlist
-\section1 Handling Data
+\section1 Qt Quick Tools
\list
-\o \l{QML Basic Types}{QML Basic Data Types}
-\o \l{Using QML Positioner and Repeater Items}
-\o \l{QML Data Models}
-\o \l{Presenting Data with QML}
-\o \l{Network Transparency}
+\o \l{Debugging QML}
+\o \l{external: Developing Qt Quick Applications with Creator}{Developing with Qt Creator}
+\o \l{QML Viewer}
\endlist
-\section1 Architecture
+\section1 Reference
\list
-\o \l{Qt Declarative UI Runtime}
-\o \l{Integrating JavaScript}
-\o \l{Dynamic Object Management in QML}
+\o \l{Introduction to the QML language}{QML Syntax}
+\o \l{QML Elements}
+\o \l{Qt Declarative Module}
+\o \l{QML Basic Types}{QML Data Types}
+\o \l{QML Coding Conventions}
+\o \l{external: Qt Creator Manual}{Qt Creator Manual}
+\o \l{Programming with Qt}
+\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/index.html}{Qt Mobility Documentation}
\endlist
-\section1 Using QML with C++
+\section1 Architecture
\list
\o \l{Qt Declarative UI Runtime}
-\o \l{Using QML in C++ Applications}
-\o \l{Integrating QML with existing Qt UI code}
-\o \l{Tutorial: Writing QML extensions with C++}
-\o \l{Extending QML in C++}
-\endlist
-
-\section1 Reference
-
-\list
-\o \l{QML Elements}
-\o \l{QML Basic Types}
+\o \l{Integrating JavaScript}
+\o \l{QML Scope}
+\o \l{QML Modules}
+\o \l{QML Documents}
\o \l{QML Global Object}
\o \l{QML Internationalization}
\o \l{QML Right-to-left User Interfaces}
\o \l{QML Security}
\o \l{Qt Declarative Module}
-\o \l{Debugging QML}
-\o \l{QML Viewer}
-\o \l{QML Performance}
-\o \l{QML Coding Conventions}
\endlist
-\section1 Online Examples
+\section1 Examples
\list
+\o \l{QML Tutorial}{"Hello World" Tutorial}
+\o \l{Getting Started Programming with QML}
+\o \l{QML Advanced Tutorial}{Tutorial: "Same Game"}
+\o \l{Tutorial: Writing QML extensions with C++}
+\o \l{QML Examples and Demos}
+
\o Forum Nokia:
\l{http://wiki.forum.nokia.com/index.php/Qt_Quick_examples_for_porting}{Qt Quick
examples for porting}
\endlist
+
+\section1 Best Practices
+
+\list
+\o \l{QML Best Practices: Coding Conventions}{Coding Tips}
+\o \l{QML Performance}{Performance Tips}
+\endlist
+
+\section1 License Information
+\list
+\o \l{Qt Quick Licensing Information}
+\endlist
*/
diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc
index f2ca0fd..90fb715 100644
--- a/doc/src/declarative/dynamicobjects.qdoc
+++ b/doc/src/declarative/dynamicobjects.qdoc
@@ -27,13 +27,17 @@
/*!
\page qdeclarativedynamicobjects.html
+\ingroup qml-features
+\contentspage {QML Features}
+\previouspage {Integrating QML Code with Existing Qt UI Code}
+\nextpage {Network Transparency}{Loading Resources in QML}
\title Dynamic Object Management in QML
-QML provides a number of ways to dynamically create and manage QML objects.
+QML provides a number of ways to dynamically create and manage QML objects.
The \l{Loader}, \l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView} elements
-all support dynamic object management. Objects can also be created and managed
+all support dynamic object management. Objects can also be created and managed
from C++, and this is the preferred method for hybrid QML/C++ applications
-(see \l{Using QML in C++ Applications}).
+(see \l{Using QML Bindings in C++ Applications}).
QML also supports the dynamic creation of objects from within JavaScript
code. This is useful if the existing QML elements do not fit the needs of your
@@ -45,24 +49,24 @@ of the concepts discussed on this page.
\section1 Creating Objects Dynamically
-There are two ways to create objects dynamically from JavaScript. You can either call
+There are two ways to create objects dynamically from JavaScript. You can either call
\l {QML:Qt::createComponent()}{Qt.createComponent()} to dynamically create
a \l Component object, or use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
to create an item from a string of QML.
-Creating a component is better if you have an existing component defined in a \c .qml
+Creating a component is better if you have an existing component defined in a \c .qml
file, and you want to dynamically create instances of that component. Otherwise,
-creating an item from a string of QML is useful when the item QML itself is generated
+creating an item from a string of QML is useful when the item QML itself is generated
at runtime.
-\section2 Creating a Component dynamically
+\section2 Creating a Component Dynamically
-To dynamically load a component defined in a QML file, call the
-\l {QML:Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}.
+To dynamically load a component defined in a QML file, call the
+\l {QML:Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}.
This function takes the URL of the QML file as its only argument and creates
a \l Component object from this URL.
-Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of
+Once you have a \l Component, you can call its \l {Component::createObject()}{createObject()} method to create an instance of
the component. This function can take one or two arguments:
\list
\o The first is the parent for the new item. Since graphical items will not appear on the scene without a parent, it is
@@ -96,25 +100,27 @@ in case the QML file is loaded over a network and thus is not ready immediately.
\codeline
\snippet doc/src/snippets/declarative/componentCreation.js finishCreation
-If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation()
+If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation()
function and call \l {Component::createObject()}{createObject()} immediately:
\snippet doc/src/snippets/declarative/componentCreation.js func
\snippet doc/src/snippets/declarative/componentCreation.js local
\snippet doc/src/snippets/declarative/componentCreation.js func-end
-Notice in both instances, \l {Component::createObject()}{createObject()} is called with
+Notice in both instances, \l {Component::createObject()}{createObject()} is called with
\c appWindow passed as an argument so that the created object will become a child of the
\c appWindow item in \c main.qml. Otherwise, the new item will not appear in the scene.
When using files with relative paths, the path should
be relative to the file where \l {QML:Qt::createComponent()}{Qt.createComponent()} is executed.
-To connect signals to (or receive signals from) dynamically created objects, use the signal
-\c connect() method. See \l {Connecting signals to methods and other signals} for more information.
+To connect signals to (or receive signals from) dynamically created objects,
+use the signal \c connect() method. See
+\l{QML Signal and Handler Event System#Connecting Signals to Methods and Signals}
+{Connecting Signals to Methods and Signals} for more information.
-\section2 Creating an object from a string of QML
+\section2 Creating an Object from a String of QML
If the QML is not defined until runtime, you can create a QML item from
a string of QML using the \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} function, as in the following example:
@@ -164,7 +170,7 @@ items that you did not dynamically create yourself.
Items can be deleted using the \c destroy() method. This method has an optional
argument (which defaults to 0) that specifies the approximate delay in milliseconds
-before the object is to be destroyed.
+before the object is to be destroyed.
Here is an example. The \c application.qml creates five instances of the \c SelfDestroyingRect.qml
component. Each instance runs a NumberAnimation, and when the animation has finished, calls
@@ -198,7 +204,7 @@ Item {
}
\endqml
-This would result in an error, since items can only be dynamically
+This would result in an error, since items can only be dynamically
destroyed if they were dynamically created.
Objects created with \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}
@@ -206,6 +212,4 @@ can similarly be destroyed using \c destroy():
\snippet doc/src/snippets/declarative/createQmlObject.qml 0
\snippet doc/src/snippets/declarative/createQmlObject.qml destroy
-
*/
-
diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc
index e2d9350..8fb64c1 100644
--- a/doc/src/declarative/elements.qdoc
+++ b/doc/src/declarative/elements.qdoc
@@ -31,7 +31,8 @@
\title QML Elements
\brief A listing of standard QML elements.
-These are the functionally grouped lists of QML elements.
+These are the functionally grouped lists of QML elements as part of
+\l{Qt Quick}.
Elements are declared with the their name and two curly braces. Elements may
be nested in elements, thereby creating a parent-child relationship between the
@@ -44,7 +45,7 @@ To see the QML elements listed by functional area, see the
\list
\o \l {Item} - Basic item element inherited by QML elements
\o \l {Component} - Encapsulates QML elements during importing
-\o \l {QML:QtObject} {QtObject} - Basic element containing only the objectName property
+\o \l {QML:QtObject} {QtObject} - Basic element containing only the \c {objectName} property
\endlist
\section1 Graphics
@@ -54,7 +55,7 @@ To see the QML elements listed by functional area, see the
\o \l {BorderImage} - Allows the use of images as borders
\o \l {AnimatedImage} - For playing animations stored in a series of frames
\o \l {Gradient} - For defining a color gradient
-\o \l {GradientStop} - Used to define a color within a \l {Gradient}
+\o \l {GradientStop} - Used to define a color within a \l {Gradient}
\o \l {SystemPalette} - Provides access to the Qt palettes
\endlist
@@ -74,7 +75,7 @@ To see the QML elements listed by functional area, see the
\o \l {MouseArea} - Sets up an area for mouse interaction
\o \l {Keys} - Provides components with attached properties to handle key input.
\o \l {FocusScope} - Element that mediate keyboard focus changes
-\o \l {Flickable} - Provides a surface that can be "flicked"
+\o \l {Flickable} - Provides a surface that can be "flicked"
\o \l {Flipable} - Provides a surface that produces "flipping" effects
\o \l {PinchArea} - Enables simple pinch gesture handling
\endlist
diff --git a/doc/src/declarative/example-slideswitch.qdoc b/doc/src/declarative/example-slideswitch.qdoc
index 27c8f58..201ff2b 100644
--- a/doc/src/declarative/example-slideswitch.qdoc
+++ b/doc/src/declarative/example-slideswitch.qdoc
@@ -33,8 +33,6 @@ This example shows how to create a reusable switch component in QML.
The code for this example can be found in the \c $QTDIR/examples/declarative/ui-components/slideswitch directory.
-\section1 Overview
-
The elements that compose the switch are:
\list
@@ -123,7 +121,7 @@ For more information on scripts see \l{Integrating JavaScript}.
At this point, when the switch toggles between the two states the knob will instantly change its \c x position between 1 and 78.
In order for the the knob to move smoothly we add a transition that will animate the \c x property with an easing curve for a duration of 200ms.
-For more information on transitions see \l{qdeclarativeanimation.html#transitions}{QML Transitions}.
+For more information on transitions see \l{QML Animation and Transitions}.
\section1 Usage
The switch can be used in a QML file, like this:
diff --git a/doc/src/declarative/examples.qdoc b/doc/src/declarative/examples.qdoc
index b359877..b7420e0 100644
--- a/doc/src/declarative/examples.qdoc
+++ b/doc/src/declarative/examples.qdoc
@@ -146,7 +146,6 @@ The examples can be found in Qt's \c examples/declarative directory.
\section2 Touch Interaction
\list
-\o \l{declarative/touchinteraction/gestures}{Gestures}
\o \l{declarative/touchinteraction/mousearea}{MouseArea}
\endlist
diff --git a/doc/src/declarative/extending-tutorial.qdoc b/doc/src/declarative/extending-tutorial.qdoc
index 4caa631..0ddc430 100644
--- a/doc/src/declarative/extending-tutorial.qdoc
+++ b/doc/src/declarative/extending-tutorial.qdoc
@@ -27,13 +27,13 @@
/*!
\page qml-extending-tutorial-index.html
-\title Tutorial: Writing QML extensions with C++
+\title Tutorial: Writing QML Extensions with C++
The Qt Declarative module provides a set of APIs for extending QML through
C++ extensions. You can write extensions to add your own QML types, extend existing
Qt types, or call C/C++ functions that are not accessible from ordinary QML code.
-This tutorial shows how to write a QML extension using C++ that includes
+This tutorial shows how to write a QML extension using C++ that includes
core QML features, including properties, signals and bindings. It also shows how
extensions can be deployed through plugins.
@@ -45,7 +45,7 @@ Tutorial chapters:
\list 1
\o \l{declarative/tutorials/extending/chapter1-basics}{Creating a New Type}
\o \l{declarative/tutorials/extending/chapter2-methods}{Connecting to C++ Methods and Signals}
-\o \l{declarative/tutorials/extending/chapter3-bindings}{Adding Property Bindings}
+\o \l{declarative/tutorials/extending/chapter3-bindings}{Property Binding}
\o \l{declarative/tutorials/extending/chapter4-customPropertyTypes}{Using Custom Property Types}
\o \l{declarative/tutorials/extending/chapter5-listproperties}{Using List Property Types}
\o \l{declarative/tutorials/extending/chapter6-plugins}{Writing an Extension Plugin}
@@ -67,18 +67,18 @@ like network programming that are not accessible through built-in QML features.
In this tutorial, we will show how to use the C++ classes in the Qt Declarative
module to extend QML. The end result will be a simple Pie Chart display implemented by
-several custom QML types connected together through QML features like bindings and
+several custom QML types connected together through QML features like bindings and
signals, and made available to the QML runtime through a plugin.
To begin with, let's create a new QML type called "PieChart" that has two properties: a name
and a color. We will make it available in a \l {Modules}{module} called "Charts", with
-a module version of 1.0.
+a module version of 1.0.
We want this \c PieChart type to be usable from QML like this:
\code
import Charts 1.0
-
+
PieChart {
width: 100; height: 100
name: "A simple pie chart"
@@ -99,16 +99,16 @@ Here is our \c PieChart class, defined in \c piechart.h:
\snippet declarative/tutorials/extending/chapter1-basics/piechart.h 0
-The class inherits from QDeclarativeItem because we want to override
+The class inherits from QDeclarativeItem because we want to override
QDeclarativeItem::paint() in order to draw. If the class just represented some
data type and was not an item that actually needed to be displayed, it could simply inherit
-from QObject. Or, if we want to extend the functionality of an existing QObject-based
+from QObject. Or, if we want to extend the functionality of an existing QObject-based
class, it could inherit from that class instead.
The \c PieChart class defines the two properties, \c name and \c color, with the Q_PROPERTY macro,
-and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp
-simply sets and returns the \c m_name and \c m_color values as appropriate, and
-implements \c paint() to draw a simple pie chart. It also turns off the
+and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp
+simply sets and returns the \c m_name and \c m_color values as appropriate, and
+implements \c paint() to draw a simple pie chart. It also turns off the
QGraphicsItem::ItemHasNoContents flag to enable painting:
\snippet declarative/tutorials/extending/chapter1-basics/piechart.cpp 0
@@ -150,19 +150,19 @@ Try it yourself with the code in Qt's \c examples/tutorials/extending/chapter1-b
At the moment, the \c app.qml is run from within a C++ application.
This may seem odd if you're used to running QML files with the \l {QML Viewer}.
-Later on, we'll show how to create a plugin so that you can run \c app.qml using the
+Later on, we'll show how to create a plugin so that you can run \c app.qml using the
\l {QML Viewer} instead.
*/
/*!
-\title Chapter 2: Connecting to C++ Methods and Signals
+\title Chapter 2: Connecting to C++ Methods and Signals
\example declarative/tutorials/extending/chapter2-methods
Suppose we want \c PieChart to have a "clearChart()" method that erases the
-chart and then emits a "chartCleared" signal. Our \c app.qml would be able
+chart and then emits a "chartCleared" signal. Our \c app.qml would be able
to call \c clearChart() and receive \c chartCleared() signals like this:
\snippet declarative/tutorials/extending/chapter2-methods/app.qml 0
@@ -210,7 +210,7 @@ Property bindings is a powerful feature of QML that allows values of different
elements to be synchronized automatically. It uses signals to notify and update
other elements' values when property values are changed.
-Let's enable property bindings for the \c color property. That means
+Let's enable property bindings for the \c color property. That means
if we have code like this:
\snippet declarative/tutorials/extending/chapter3-bindings/app.qml 0
@@ -224,7 +224,7 @@ updates to the same value. When the window is clicked, the \c onClicked
handler in the MouseArea changes the color of \c chartA, thereby changing
both charts to the color blue.
-It's easy to enable property binding for the \c color property.
+It's easy to enable property binding for the \c color property.
We add a \l{Qt's Property System}{NOTIFY} feature to its Q_PROPERTY() declaration to indicate that a "colorChanged" signal
is emitted whenever the value changes.
@@ -244,7 +244,7 @@ It's important for \c setColor() to check that the color value has actually chan
before emitting \c colorChanged(). This ensures the signal is not emitted unnecessarily and
also prevents loops when other elements respond to the value change.
-The use of bindings is essential to QML. You should always add NOTIFY
+The use of bindings is essential to QML. You should always add NOTIFY
signals for properties if they are able to be implemented, so that your
properties can be used in bindings. Properties that cannot be bound cannot be
automatically updated and cannot be used as flexibly in QML. Also, since
@@ -286,7 +286,7 @@ int-type property to store an identifier for each chart:
\endcode
We can also use various other property types. QML has built-in support for the types
-listed in the \l{Adding Properties} documentation, which includes the following:
+listed in the \l{QML Basic Types} documentation, which includes the following:
\list
\o bool, unsigned int, int, float, double, qreal
@@ -299,7 +299,7 @@ listed in the \l{Adding Properties} documentation, which includes the following:
If we want to create a property whose type is not supported by QML by default,
we need to register the type with QML.
-For example, let's replace the use of the \c property with a type called
+For example, let's replace the use of the \c property with a type called
"PieSlice" that has a \c color property. Instead of assigning a color,
we assign an \c PieSlice value which itself contains a \c color:
@@ -358,10 +358,10 @@ have a \c slices property that accepts a list of \c PieSlice items:
\image extending-tutorial-chapter5.png
To do this, we replace the \c pieSlice property in \c PieChart with a \c slices property,
-declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the
+declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the
creation of list properties in QML extensions. We replace the \c pieSlice()
-function with a \c slices() function that returns a list of slices, and add
-an internal \c append_slice() function (discussed below). We also use a QList to
+function with a \c slices() function that returns a list of slices, and add
+an internal \c append_slice() function (discussed below). We also use a QList to
store the internal list of slices as \c m_slices:
\snippet declarative/tutorials/extending/chapter5-listproperties/piechart.h 0
@@ -409,7 +409,7 @@ To create a plugin library, we need:
\list
\o A plugin class that registers our QML types
-\o A project file that describes the plugin
+\o A project file that describes the plugin
\o A \l{Writing a qmldir file}{qmldir} file that tells the QML engine to load the plugin
\endlist
@@ -468,8 +468,9 @@ In this tutorial, we've shown the basic steps for creating a QML extension:
\endlist
-The \l {Extending QML in C++} reference documentation shows other useful features that can be added to
-QML extensions. For example, we could use \l{Default Property}{default properties} to allow
+The \l {Extending QML Functionalities using C++} reference documentation shows
+other useful features that can be added to QML extensions. For example, we
+could use \l{Default Property}{default properties} to allow
slices to be added without using the \c slices property:
\code
@@ -489,7 +490,8 @@ Or randomly add and remove slices from time to time using \l{Property Value Sour
\endcode
-See the \l{Extending QML in C++}{reference documentation} for more information.
+See the \l{Extending QML Functionalities using C++} reference documentation
+for more information.
*/
diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc
index 80b6e72..c417c04 100644
--- a/doc/src/declarative/extending.qdoc
+++ b/doc/src/declarative/extending.qdoc
@@ -27,7 +27,11 @@
/*!
\page qml-extending.html
-\title Extending QML in C++
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {Presenting Data with Views}
+\nextpage {Using QML Bindings in C++ Applications}
+\title Extending QML Functionalities using C++
The QML syntax declaratively describes how to construct an in-memory object
tree. In Qt, QML is mainly used to describe a visual scene graph, but it is
@@ -82,7 +86,7 @@ Types can be registered by libraries, application code, or by plugins
Once registered, all \l {Qt's Property System}{properties} of the
supported types are available in QML. QML has intrinsic support for
-properties of the types listed in the \l{Adding Properties}
+properties of the types listed in the \l{QML Basic Types}
document, which includes the following:
\list
@@ -429,28 +433,28 @@ pointers to invalid objects. QML makes the following guarentees:
\list
\o An object assigned to a QObject (or QObject-derived) pointer property will be
-valid at the time of assignment.
+valid at the time of assignment.
-Following assignment, it is the responsibility of the class to subsequently guard
+Following assignment, it is the responsibility of the class to subsequently guard
this pointer, either through a class specific method or the generic QPointer class.
-\o An object assigned to a QVariant will be valid at the time of assignment.
+\o An object assigned to a QVariant will be valid at the time of assignment.
-When assigning an object to a QVariant property, QML will always use a QMetaType::QObjectStar
-typed QVariant. It is the responsibility of the class to guard the pointer. A
-general rule when writing a class that uses QVariant properties is to check the
-type of the QVariant when it is set and if the type is not handled by your class,
+When assigning an object to a QVariant property, QML will always use a QMetaType::QObjectStar
+typed QVariant. It is the responsibility of the class to guard the pointer. A
+general rule when writing a class that uses QVariant properties is to check the
+type of the QVariant when it is set and if the type is not handled by your class,
reset it to an invalid variant.
-\o An object assigned to a QObject (or QObject-derived) list property will be
-valid at the time of assignment.
+\o An object assigned to a QObject (or QObject-derived) list property will be
+valid at the time of assignment.
-Following assignment, it is the responsibility of the class to subsequently guard
+Following assignment, it is the responsibility of the class to subsequently guard
this pointer, either through a class specific method or the generic QPointer class.
\endlist
Elements should assume that any QML assigned object can be deleted at any time, and
-respond accordingly. If documented as such an element need not continue to work in
+respond accordingly. If documented as such an element need not continue to work in
this situation, but it must not crash.
\section1 Signal Support
@@ -477,7 +481,7 @@ but different parameters cannot be distinguished.
Signal parameters become accessible by name to the assigned script. An
unnamed parameter cannot be accessed, so care should be taken to name all the
signal parameters in the C++ class declaration. The intrinsic types
-listed in \l {Adding Types}, as well registered object types are permitted as
+listed in \l{Adding Types}, as well registered object types are permitted as
signal parameter types. Using other types is not an error, but the parameter
value will not be accessible from script.
@@ -498,7 +502,7 @@ on<Property-name>Changed, regardless of the name used for the NOTIFY
signal in C++. We recommend using <property-name>Changed() for the
NOTIFY signal in C++.
-See also \l {Writing QML Components: Properties, Methods and Signals}
+See also \l {Importing Reusable Components}
\section1 Methods
@@ -701,478 +705,4 @@ public:
}
};
\endcode
-
-*/
-
-/*!
-\page qml-extending-types.html
-\title Writing QML Components: Properties, Methods and Signals
-
-One of the key concepts in QML is the ability to define your own QML components that suit
-the purposes of your application. The standard \l {QML Elements} provide the essential components
-for creating a QML application; beyond these, you can write your own custom components that can
-be created and reused, without the use of C++.
-
-Components are the building blocks of a QML project. When writing a QML application, whether
-large or small, it is best to separate QML code into smaller components that perform specific
-sets of operations, instead of creating mammoth QML files with large, combined functionality
-that is more difficult to manage and may contain duplicated code.
-
-
-\section1 Defining New Components
-
-A component is a reusable type with a well-defined interface, built entirely in QML.
-Any snippet of QML code can become a component, by placing the code in a file "<Name>.qml" where
-<Name> is the new component name, beginning with an uppercase letter. These QML files automatically
-become available as new QML element types to other QML components and applications in the same directory.
-
-For example, one of the simplest and most common components you can build in QML is a
-button-type component. Below, we implement this component as a \l Rectangle with a clickable
-\l MouseArea, in a file named \c Button.qml:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/components/Button.qml 0
-
-Now this component can be reused by another file within the same directory. Since the file is
-named \c Button.qml, the component is referred to as \c Button:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/components/application.qml 0
-\o \image qml-extending-types.png
-\endtable
-
-The root object in \c Button.qml defines the attributes that are available to users of the
-\c Button component. In this case, the root object is a \l Rectangle, so any properties, methods
-and signals of \l Rectangle are made available, allowing \c application.qml to
-customize the \c width, \c height, \c radius and \c color properties of \c Button objects.
-
-
-If \c Button.qml was not in the same directory, \c application.qml would need to load it as a
-\l {Modules}{module} from a specific filesystem path or \l{QDeclarativeExtensionPlugin}{plugin}.
-Also, note the letter case of the component file name is significant on some (notably UNIX)
-filesystems. It is recommended the file name case matches the case of the QML component name
-exactly - for example, \c Box.qml and not \c BoX.qml - regardless of the platform to which the
-QML component will be deployed.
-
-To write a useful component, it is generally necessary to provide it with custom attributes that store and
-communicate specific data. This is achieved by adding the following attributes to your components:
-
-\list
-\o \bold Properties that can be accessed externally to modify an object (for example, \l Item has
- \l {Item::}{width} and \l {Item::}{height} properties) and used in \l {Property Binding}
-\o \bold Methods of JavaScript code can be invoked internally or externally (for example,
- \l Animation has a \l {Animation::}{start()} method)
-\o \bold Signals to notify other objects when an event has occurred (for example, MouseArea has a
- \c clicked signal)
-\endlist
-
-The following sections show how these attributes can be added to QML components.
-
-
-\section1 Adding Properties
-
-A property is a value of a QML component that can be read and modified by other objects. For
-example, a \l Rectangle component has \l {Item::}{width}, \l {Item::}{height} and \l
-{Rectangle::}{color} properties. Significantly, properties be used with \l {Property Binding}, where
-a property value is automatically updated using the value of another property.
-
-The syntax for defining a new property is:
-
-\code
-[default] property <type> <name>[: defaultValue]
-\endcode
-
-A \c property declaration can appear anywhere within a QML component definition, but it is customary
-to place it at the top. A component cannot declare more than one property with the same name. (It is
-possible to have a property name that is the same as an existing property in a type, but this is not
-recommended as the existing property becomes hidden and inaccessible.)
-
-Below is an example. The \c ImageViewer component has defined a \c string type property named
-\c currentImage, and its initial value is "default-image.png". This property is used to set the image
-displayed in the child \l Image object. Another file, \c application.qml, can create
-an \c ImageViewer object and read or modify the \c currentImage value:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/ImageViewer.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/application.qml 0
-\endtable
-
-It is optional for a property to have a default value. The default value is a convenient shortcut, and is
-behaviorally identical to doing it in two steps, like this:
-
-\qml
-Item {
- // Use default value
- property int myProperty: 10
-
- // Longer, but behaviorally identical
- property int myProperty
- myProperty: 10
-}
-\endqml
-
-
-\section2 Supported property types
-
-All QML properties are typed. The examples above show properties with \c int and \c string types;
-notice that the type of the property must be declared. The type is used to determine the property
-behavior, and how the property is defined in C++.
-
-A number of property types are supported by default. These are listed in the table below,
-with their default values and the corresponding C++ type:
-
-\table
-\header \o QML Type Name \o Default value \o C++ Type Name
-\row \o \l int \o 0 \o int
-\row \o \l bool \o \c false \o bool
-\row \o \l double \o 0.0 \o double
-\row \o \l real \o 0.0 \o double
-\row \o \l string \o "" (empty string) \o QString
-\row \o \l url \o "" (empty url) \o QUrl
-\row \o \l color \o #000000 (black) \o QColor
-\row \o \l date \o \c undefined \o QDateTime
-\row \o \l variant \o \c undefined \o QVariant
-\endtable
-
-QML object types can also be used as property types. This includes
-\l {Defining new QML elements}{custom QML types} implemented in C++. Such properties are
-defined like this:
-
-\qml
-Item {
- property Item itemProperty
- property QtObject objectProperty
- property MyCustomType customProperty
-}
-\endqml
-
-Such object-type properties default to an \c undefined value.
-
-It is also possible to store a copy of a JavaScript object using the \c variant
-property type. This creates some restrictions on how the property should be used;
-see the \l {variant}{variant type documentation} for details.
-
-\l{list}{List properties} are created with the \c list<Type> syntax, and default to an empty
-list:
-
-\qml
-Item {
- property list<Item> listOfItems
-}
-\endqml
-
-Note that list properties cannot be modified like ordinary JavaScript
-arrays. See the \l {list}{list type documentation} for details.
-
-
-\section2 Property change signals
-
-Adding a \c property to an item automatically adds a \e {value changed}
-signal handler to the item. To connect to this signal, use a \l {Signal Handlers}{signal handler}
-named with the \c on<Property>Changed syntax, using upper case for the first letter of the
-property name.
-
-For example, the following \c onMyNumberChanged signal handler is automatically called whenever the
-\c myNumber property changes:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/property-signals.qml 0
-
-
-\section2 Default properties
-
-The optional \c default attribute for a property marks it as the \e {default property}
-for a type. This allows other items to specify the default property's value
-as child elements. For example, the \l Item element's default property is its
-\l{Item::children}{children} property. This allows the children of an \l Item
-to be set like this:
-
-\qml
-Item {
- Rectangle {}
- Rectangle {}
-}
-\endqml
-
-If the \l{Item::children}{children} property was not the default property for
-\l Item, its value would have to be set like this instead:
-
-\qml
-Item {
- children: [
- Rectangle {},
- Rectangle {}
- ]
-}
-\endqml
-
-See the \l{declarative/ui-components/tabwidget}{TabWidget} example for a
-demonstration of using default properties.
-
-Specifying a default property overrides any existing default property (for
-example, any default property inherited from a parent item). Using the
-\c default attribute twice in the same type block is an error.
-
-
-\section2 Property aliases
-
-Property aliases are a more advanced form of property declaration. Unlike a
-property definition, which allocates a new, unique storage space for the
-property, a property alias connects the newly declared property (called the
-aliasing property) as a direct reference to an existing property (the aliased property). Read
-operations on the aliasing property act as read operations on the aliased
-property, and write operations on the aliasing property as write operations on
-the aliased property.
-
-A property alias declaration looks a lot like an ordinary property definition:
-\code
- [default] property alias <name>: <alias reference>
-\endcode
-
-As the aliasing property has the same type as the aliased property, an explicit
-type is omitted, and the special "alias" keyword is used. Instead of a default
-value, a property alias includes a compulsory alias reference. The alias
-reference is used to locate the aliased property. While similar to a property
-binding, the alias reference syntax is highly restricted.
-
-An alias reference takes one of the following forms:
-\code
- <id>.<property>
- <id>
-\endcode
-
-where <id> must refer to an object id within the same component as the type
-declaring the alias, and, optionally, <property> refers to a property on that object.
-
-For example, below is a \c Button.qml component with a \c buttonText aliased property which is
-connected to the child Text object's \c text property:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias.qml 0
-
-The following code would create a \c Button with a defined text string for the
-child \l Text object:
-
-\qml
-Button { buttonText: "This is a button" }
-\endqml
-
-Here, modifying \c buttonText directly modifies the \c textItem.text value; it does not
-change some other value that then updates \c textItem.text.
-
-In this case, the use of aliased properties is essential. If \c buttonText was not an alias,
-changing its value would not actually change the displayed text at all, as
-\l {Property Binding}{property bindings} are not bi-directional: the \c buttonText value would
-change when \c textItem.text changes, but not the other way around.
-
-Aliased properties are also useful for allowing external objects to directly modify and
-access child objects in a component. For example, here is a modified version of the \c ImageViewer
-component shown \l {Adding Properties}{earlier} on this page. The \c currentImage property has
-been changed to an alias to the child \l Image object:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/ImageViewer.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/application.qml 0
-\endtable
-
-Instead of being limited to setting the \l Image source, \c application.qml can now directly
-access and modify the child \l Image object and its properties.
-
-Obviously, exposing child objects in this manner should be done with care, as it allows external
-objects to modify them freely. However, this use of aliased properties can be quite useful in
-particular situations, such as for the \l {declarative/ui-components/tabwidget}{TabWidget}
-example, where new tab items are actually parented to a child object that displays the current tab.
-
-
-\section3 Considerations for property aliases
-
-Aliases are only activated once the component specifying them is completed. The
-most obvious consequence of this is that the component itself cannot generally
-use the aliased property directly during creation. For example, this will not work:
-
-\code
- // Does NOT work
- property alias buttonText: textItem.text
- buttonText: "Some text" // buttonText is not yet defined when this value is set
-\endcode
-
-A second, much less significant, consequence of the delayed activation of
-aliases is that an alias reference cannot refer to another aliasing property
-declared within the same component. This will not work:
-
-\code
- // Does NOT work
- id: root
- property alias buttonText: textItem.text
- property alias buttonText2: root.buttonText
-\endcode
-
-At the time the component is created, the \c buttonText value has not yet been assigned,
-so \c root.buttonText would refer to an undefined value. (From outside the component,
-however, aliasing properties appear as regular Qt properties and consequently can be
-used in alias references.)
-
-It is possible for an aliased property to have the same name as an existing property. For example,
-the following component has a \c color alias property, named the same as the built-in
-\l {Rectangle::color} property:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias-override.qml 0
-
-Any objects that use this component and refer to its \c color property will be
-referring to the alias rather than the ordinary \l {Rectangle::color} property. Internally,
-however, the rectangle can correctly set this property to "red" and refer to the actual defined
-property rather than the alias.
-
-
-\section1 Adding Methods
-
-A QML component can define methods of JavaScript code. These methods can be invoked
-either internally or by other objects.
-
-The syntax for defining a method is:
-
-\code
-function <name>([<parameter name>[, ...]]) { <body> }
-\endcode
-
-This declaration may appear anywhere within a type body, but it is customary to
-include it at the top. Attempting to declare two methods or signals with the
-same name in the same type block is an error. However, a new method may reuse
-the name of an existing method on the type. (This should be done with caution,
-as the existing method may be hidden and become inaccessible.)
-
-Unlike \l{Adding Signals}{signals}, method parameter types do not have to be declared as they
-default to the \c variant type. The body of the method is written in JavaScript and may access
-the parameters by name.
-
-Here is an example of a component with a \c say() method that accepts a single \c text argument:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/methods/app.qml 0
-
-A method can be connected to a signal so that it is automatically invoked whenever the signal
-is emitted. See \l {Connecting signals to methods and other signals} below.
-
-Also see \l {Integrating JavaScript} for more information on using JavaScript with QML.
-
-
-\section1 Adding Signals
-
-Signals provide a way to notify other objects when an event has occurred. For example, the MouseArea
-\c clicked signal notifies other objects that the mouse has been clicked within the area.
-
-The syntax for defining a new signal is:
-
-\code
-signal <name>[([<type> <parameter name>[, ...]])]
-\endcode
-
-This declaration may appear anywhere within a type body, but it is customary to
-include it at the top. Attempting to declare two signals or methods with the
-same name in the same type block is an error. However, a new signal may reuse
-the name of an existing signal on the type. (This should be done with caution,
-as the existing signal may be hidden and become inaccessible.)
-
-Here are three examples of signal declarations:
-
-\code
-Item {
- signal clicked
- signal hovered()
- signal performAction(string action, variant actionArgument)
-}
-\endcode
-
-If the signal has no parameters, the "()" brackets are optional. If parameters are used, the
-parameter types must be declared, as for the \c string and \c variant arguments for the \c
-performAction signal above; the allowed parameter types are the same as those listed in the \l
-{Adding Properties} section on this page.
-
-Adding a signal to an item automatically adds a \l {Signal Handlers}{signal handler} as well.
-The signal hander is named \c on<SignalName>, with the first letter of the signal being upper
-cased. The above example item would now have the following signal handlers:
-
-\list
-\o onClicked
-\o onHovered
-\o onPerformAction
-\endlist
-
-To emit a signal, simply invoke it in the same way as a method. Below left, when the \l MouseArea is
-clicked, it emits the parent \c buttonClicked signal by invoking \c rect.buttonClicked(). The
-signal is received by \c application.qml through an \c onButtonClicked signal handler:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/basic.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/no-parameters.qml 0
-\endtable
-
-If the signal has parameters, they are accessible by parameter name in the signal handler.
-In the example below, \c buttonClicked is emitted with \c xPos and \c yPos parameters instead:
-
-\table
-\row
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/Button.qml 0
-\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/parameters.qml 0
-\endtable
-
-
-\section2 Connecting signals to methods and other signals
-
-Signal objects have a \c connect() method that can be used to a connect a signal to a method or
-another signal. When a signal is connected to a method, the method is automatically invoked
-whenever the signal is emitted. (In Qt terminology, the method is a \e slot that is connected
-to the \e signal; all methods defined in QML are created as Qt slots.) This enables a signal
-to be received by a method instead of a \l {Signal Handlers}{signal handler}.
-
-For example, the \c application.qml above could be rewritten as:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectslots.qml 0
-
-The \c myMethod() method will be called whenever the \c buttonClicked signal is received.
-
-In many cases it is sufficient to receive signals through signal handlers rather than using
-the \c connect() function; the above example does not provide any improvements over using a
-simple \c onButtonClicked handler. However, if you are \l{Dynamic Object Management in QML}{creating objects dynamically},
-or \l {Integrating JavaScript}{integrating JavaScript code}, then you will find the
-\c connect() method useful. For example, the component below creates three \c Button
-objects dynamically, and connects the \c buttonClicked signal of each object to the
-\c myMethod() function:
-
-\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectdynamic.qml 0
-
-In the same way, you could connect a signal to methods defined in a dynamically
-created object, or \l {Receiving QML Signals in JavaScript}{connect a signal to a JavaScript method}.
-
-There is also a corresponding \c disconnect() method for removing connected signals. The following
-code removes the connection created in \c application.qml above:
-
-\qml
-// application.qml
-Item {
- // ...
-
- function removeSignal() {
- button.clicked.disconnect(item.myMethod)
- }
-}
-\endqml
-
-
-\section3 Forwarding signals
-
-The \c connect() method can also connect a signal to other signals. This has the effect
-of "forwarding" a signal: it is automatically emitted whenever the relevant signal is emitted. For
-example, the MouseArea \c onClicked handler in \c Button.qml above could have been replaced with
-a call to \c connect():
-
-\qml
-MouseArea {
- anchors.fill: parent
- Component.onCompleted: clicked.connect(item.buttonClicked)
-}
-\endqml
-
-Whenever the \l MouseArea \c clicked signal is emitted, the \c rect.buttonClicked signal will
-automatically be emitted as well.
*/
diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc
index 599d63c..940f864 100644
--- a/doc/src/declarative/focus.qdoc
+++ b/doc/src/declarative/focus.qdoc
@@ -28,11 +28,16 @@
/*!
\target qmlfocus
\page qdeclarativefocus.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML Text Handling and Validators}{Text Handling and Validators}
+\nextpage {QML Signal and Handler Event System}{Signal and Handler Event System}
+
\title Keyboard Focus in QML
When a key is pressed or released, a key event is generated and delivered to the
focused QML \l Item. To facilitate the construction of reusable components
-and to address some of the cases unique to fluid user interfaces, the QML items add a
+and to address some of the cases unique to fluid user interfaces, the QML items add aged
\e scope based extension to Qt's traditional keyboard focus model.
\tableofcontents
diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc
index f0d3a37..c2f55f5 100644
--- a/doc/src/declarative/integrating.qdoc
+++ b/doc/src/declarative/integrating.qdoc
@@ -27,7 +27,11 @@
/*!
\page qml-integration.html
-\title Integrating QML with existing Qt UI code
+\ingroup qml-features
+\previouspage {Using QML Bindings in C++ Applications}
+\nextpage {Dynamic Object Management in QML}{Dynamic Object Management}
+\contentspage QML Features
+\title Integrating QML Code with Existing Qt UI Code
There are a number of ways to integrate QML into QWidget-based UI applications,
depending on the characteristics of your existing UI code.
@@ -37,8 +41,8 @@ depending on the characteristics of your existing UI code.
If you have an existing QWidget-based UI, QML widgets can be integrated into
it using QDeclarativeView. QDeclarativeView is a subclass of QWidget so you
-can add it to your user interface like any other QWidget. Use
-QDeclarativeView::setSource() to load a QML file into the view, then add the
+can add it to your user interface like any other QWidget. Use
+QDeclarativeView::setSource() to load a QML file into the view, then add the
view to your UI:
\code
@@ -52,7 +56,7 @@ layout->addWidget(qmlView);
The one drawback to this approach is that QDeclarativeView is slower to initialize
and uses more memory than a QWidget, and creating large numbers of QDeclarativeView
-objects may lead to performance degradation. If this is the case, it may be
+objects may lead to performance degradation. If this is the case, it may be
better to rewrite your widgets in QML, and load the widgets from a main QML widget
instead of using QDeclarativeView.
@@ -70,7 +74,7 @@ of simple and dynamic elements.
If you have an existing UI based on the \l{Graphics View Framework},
you can integrate QML widgets directly into your QGraphicsScene. Use
QDeclarativeComponent to create a QGraphicsObject from a QML file, and
-place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or
+place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or
reparent it to an item already in the \l{QGraphicsScene}.
For example:
@@ -95,12 +99,13 @@ of QML UIs:
\section2 Loading QGraphicsWidget objects in QML
-An alternative approach is to expose your existing QGraphicsWidget objects to
+An alternative approach is to expose your existing QGraphicsWidget objects to
QML and construct your scene in QML instead. See the \l {declarative-cppextensions-qgraphicslayouts.html}{graphics layouts example}
which shows how to expose Qt's graphics layout classes to QML in order
to use QGraphicsWidget with classes like QGraphicsLinearLayout and QGraphicsGridLayout.
To expose your existing QGraphicsWidget classes to QML, use \l {qmlRegisterType()}.
-See \l{Extending QML in C++} for further information on using C++ types in QML.
+See \l{Extending QML Functionalities using C++} for further information on
+how to use C++ types in QML.
*/
diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc
index 65877f9..f78f3c2 100644
--- a/doc/src/declarative/javascriptblocks.qdoc
+++ b/doc/src/declarative/javascriptblocks.qdoc
@@ -205,7 +205,7 @@ component destruction.
Property bindings can be created in JavaScript by assigning the property with a \c function
that returns the required value.
-See \l {Binding Properties from JavaScript} for details.
+See \l {qml-javascript-assignment}{Property Assignment versus Property Binding} for details.
\section1 Receiving QML Signals in JavaScript
@@ -224,7 +224,8 @@ in \c script.js:
The \c jsFunction() will now be called whenever MouseArea's \c clicked signal is emitted.
-See \l {Connecting signals to methods and other signals} for more information.
+See \l{QML Signal and Handler Event System#Connecting Signals to Methods and Signals}
+{Connecting Signals to Methods and Signals} for more information.
\section1 QML JavaScript Restrictions
@@ -292,8 +293,8 @@ To run code after the environment setup has completed, refer to
\o The value of \c this is currently undefined in QML in the majority of contexts
-The \c this keyword is supported when \l {Binding Properties from JavaScript}
-{binding properties from JavaScript}. In all other situations, the value of
+The \c this keyword is supported when binding properties from JavaScript.
+In all other situations, the value of
\c this is undefined in QML.
To refer to any element, provide an \c id. For example:
diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc
index f1ebd00..dbc8806 100644
--- a/doc/src/declarative/modules.qdoc
+++ b/doc/src/declarative/modules.qdoc
@@ -51,16 +51,14 @@ example, an \c import statement is required to use:
An \c import statement includes the module name, and possibly a version number.
This can be seen in the snippet commonly found at the top of QML files:
-\qml
-import QtQuick 1.0
-\endqml
+\snippet doc/src/snippets/declarative/imports/qtquick-1.0.qml import
This imports version 1.0 of the "QtQuick" module into the global namespace. (The QML
library itself must be imported to use any of the \l {QML Elements}, as they
are not included in the global namespace by default.)
The \c Qt module is an \e installed module; it is found in the
-\l{The QML import path}{import path}. There are two types of QML modules:
+\l{#import-path}{import path}. There are two types of QML modules:
located modules (defined by a URL) and installed modules (defined by a URI).
@@ -94,24 +92,25 @@ MyQMLProject
\endcode
\o
-\code
+\qml
import "../MyComponents"
Window {
- Slider { ... }
- CheckBox { ... }
+ Slider {
+ // ...
+ }
+ CheckBox {
+ // ...
+ }
}
-\endcode
+\endqml
\endtable
Similarly, if the directory resided on a network source, it could
be imported like this:
-\code
- import "http://www.my-server.com/MyQMLProject/MyComponents"
- import "http://www.my-server.com/MyQMLProject/MyComponents" 1.0
-\endcode
+\snippet doc/src/snippets/declarative/imports/network-imports.qml imports
A located module can also be imported as a network resource if it has a
\l{Writing a qmldir file}{qmldir file} in the directory that specifies the QML files
@@ -127,14 +126,18 @@ Window 1.0 Window.qml
If the \c MyComponents directory was then hosted as a network resource, it could
be imported as a module, like this:
-\code
+\qml
import "http://the-server-name.com/MyQMLProject/MyComponents"
Window {
- Slider { ... }
- CheckBox { ... }
+ Slider {
+ // ...
+ }
+ CheckBox {
+ // ...
+ }
}
-\endcode
+\endqml
with an optional "1.0" version specification. Notice the import would fail if
a later version was used, as the \c qmldir file specifies that these elements
@@ -145,7 +148,8 @@ defined in QML files; components defined by C++ \l{QDeclarativeExtensionPlugin}{
are not available.
-\section1 Installed modules
+\target import-path
+\section1 Installed Modules
Installed modules are modules that are made available through the QML import path,
as defined by QDeclarativeEngine::importPathList(), or modules defined within
@@ -156,10 +160,7 @@ path or network resource URL.
When importing an installed module, an un-quoted URI is
used, with a mandatory version number:
-\code
- import QtQuick 1.0
- import com.nokia.qml.mymodule 1.0
-\endcode
+\snippet doc/src/snippets/declarative/imports/installed-module.qml imports
When a module is imported, the QML engine searches the QML import path for a matching
module. The root directory of the module must contain a
@@ -190,7 +191,7 @@ Additional import paths can be added through QDeclarativeEngine::addImportPath()
can also use the \c -I option to add an import path.
-\section2 Creating installed modules
+\section2 Creating Installed Modules
As an example, suppose the \c MyQMLProject directory in the \l{Located Modules}{previous example}
was located on the local filesystem at \c C:\qml\projects\MyQMLProject. The \c MyComponents
@@ -211,8 +212,12 @@ without referring to the module's absolute filesystem location:
import projects.MyQMLProject.MyComponents 1.0
Window {
- Slider { ... }
- CheckBox { ... }
+ Slider {
+ // ...
+ }
+ CheckBox {
+ // ...
+ }
}
\endqml
@@ -225,22 +230,20 @@ defined in QML files; components defined by C++ \l{QDeclarativeExtensionPlugin}{
are not available.
-\section2 Creating installed modules in C++
+\section2 Creating Installed Modules in C++
C++ applications can define installed modules directly within the application using qmlRegisterType().
For example, the \l {Tutorial: Writing QML extensions with C++}{Writing QML extensions with C++ tutorial}
defines a C++ class named \c PieChart and makes this type available to QML by calling qmlRegisterType():
-\qml
+\code
qmlRegisterType<PieChart>("Charts", 1, 0, "PieChart");
-\endqml
+\endcode
This allows the application's QML files to use the \c PieChart type by importing the declared
\c Charts module:
-\qml
-import Charts 1.0
-\endqml
+\snippet doc/src/snippets/declarative/imports/chart.qml import
For \l{QDeclarativeExtensionPlugin}{QML plugins}, the
module URI is automatically passed to QDeclarativeExtensionPlugin::registerTypes(). This method
@@ -253,9 +256,7 @@ example:
Once the plugin is built and installed, and includes a \l{Writing a qmldir file}{qmldir file},
the module can be imported from QML, like this:
-\code
-import com.nokia.TimeExample 1.0
-\endcode
+\snippet doc/src/snippets/declarative/imports/timeexample.qml import
Unlike QML types defined by QML files, a QML type defined in a C++ extension plugin cannot be loaded by
a module that is imported as a network resource.
@@ -269,47 +270,34 @@ By default, when a module is imported, its contents are imported into the global
To import a module into a specific namespace, use the \e as keyword:
-\qml
- import QtQuick 1.0 as QtLibrary
- import "../MyComponents" as MyComponents
- import com.nokia.qml.mymodule 1.0 as MyModule
-\endqml
+\snippet doc/src/snippets/declarative/imports/named-imports.qml imports
Types from these modules can then only be used when qualified by the namespace:
-\qml
- QtLibrary.Rectangle { ... }
-
- MyComponents.Slider { ... }
-
- MyModule.SomeComponent { ... }
-\endqml
+\snippet doc/src/snippets/declarative/imports/named-imports.qml imported items
Multiple modules can be imported into the same namespace in the same way that multiple modules can be imported into the global namespace:
-\qml
- import QtQuick 1.0 as Nokia
- import Ovi 1.0 as Nokia
-\endqml
+\snippet doc/src/snippets/declarative/imports/merged-named-imports.qml imports
-\section2 JavaScript files
+\section2 JavaScript Files
JavaScript files must always be imported with a named import:
\qml
- import "somescript.js" as MyScript
+import "somescript.js" as MyScript
- Item {
- //...
- Component.onCompleted: MyScript.doSomething()
- }
+Item {
+ //...
+ Component.onCompleted: MyScript.doSomething()
+}
\endqml
The qualifier ("MyScript" in the above example) must be unique within the QML document.
Unlike ordinary modules, multiple scripts cannot be imported into the same namespace.
-\section1 Writing a qmldir file
+\section1 Writing a qmldir File
A \c qmldir file is a metadata file for a module that maps all type names in
the module to versioned QML files. It is required for installed modules, and
diff --git a/doc/src/declarative/mouseevents.qdoc b/doc/src/declarative/mouseevents.qdoc
new file mode 100644
index 0000000..ade6760
--- /dev/null
+++ b/doc/src/declarative/mouseevents.qdoc
@@ -0,0 +1,120 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page mouseevents.html
+\title QML Mouse Events
+\ingroup QML Features
+\previouspage {Anchor-based Layout in QML}{Layouts using Anchors}
+\nextpage {QML Text Handling and Validators}{Text Handling and Validators}
+\contentspage QML Features
+
+\tableofcontents
+
+\section1 Mouse Elements
+
+\list
+\o \l{MouseArea} Element
+\o \l{MouseEvent} Object
+\endlist
+
+\section1 Mouse Event Handling
+
+QML uses \l{QML Signal and Handler Event System}{signals and handlers} to
+deliver mouse interactions. Specifically, the \l MouseArea and \l MouseEvent
+elements provide QML components with signal handlers to accept mouse events
+within a defined area.
+
+\section1 Defining a Mouse Area
+
+The \l MouseArea element receives events within a defined area. One quick way
+to define this area is to anchor the \c MouseArea to its parent's area using the
+\c anchors.fill property. If the parent is a \l Rectangle (or any \l Item
+component), then the MouseArea will fill the area defined by the parent's
+dimensions. Alternatively, an area smaller or larger than the parent is
+definable.
+\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml anchor fill
+
+\section1 Receiving Events
+
+The MouseArea element provides
+\l{QML Signal and Handler Event System}{signals and handlers} to detect different
+mouse events. The \l MouseArea element documentation describes these
+gestures in greater detail:
+
+\list
+\o canceled
+\o clicked
+\o doubleClicked
+\o entered
+\o exited
+\o positionChanged
+\o pressAndHold
+\o pressed
+\o released
+\endlist
+
+These signals have signal handlers that are invoked when the signals are emitted.
+\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml mouse handlers
+
+\section1 Enabling Gestures
+Some mouse gestures and button clicks need to be enabled before they send or
+receive events. Certain \l MouseArea and \l MouseEvent properties enable these
+gestures.
+
+To listen to (or explicitly ignore) a certain mouse button, set the appropriate
+mouse button to the \l {MouseArea::acceptedButtons}{acceptedButtons} property.
+
+Naturally, the mouse events, such as button presses and mouse positions, are
+sent during a mouse click. For example, the \c containsMouse property will only
+retrieve its correct value during a mouse press. The
+\l {MouseArea::hoverEnabled}{hoverEnabled} will enable mouse events and
+positioning even when there are no mouse button presses. Setting the
+\c hoverEnabled property to \c true, in turn will enable the \c entered,
+\c exited, and \c positionChanged signal and their respective signal handlers.
+
+\snippet doc/src/snippets/declarative/mousearea/mousearea-snippet.qml enable handlers
+Additionally, to disable the whole mouse area, set the \c MouseArea
+element's \c enabled property to \c false.
+
+\section1 MouseEvent Object
+
+Signals and their handlers receive a \l MouseEvent object as a parameter. The
+\c mouse object contain information about the mouse event. For example, the
+mouse button that started the event is queried through the
+\l {MouseEvent::button}{mouse.button} property.
+
+The \c MouseEvent object can also ignore a mouse event using its \c accepted
+property.
+
+\section2 Accepting Further Signals
+Many of the signals are sent multiple times to reflect various mouse events
+such as double clicking. To facilitate the classification of mouse clicks, the
+MouseEvent object has an \c accepted property to disable the event propagation.
+
+To learn more about QML's event system, please read the \l {QML Signal and Handler Event System} document.
+*/
diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc
index 675a0aa..1b2934a 100644
--- a/doc/src/declarative/network.qdoc
+++ b/doc/src/declarative/network.qdoc
@@ -27,6 +27,10 @@
/*!
\page qdeclarativenetwork.html
+\ingroup qml-features
+\previouspage {Dynamic Object Management in QML}{Dynamic Object Management}
+\nextpage {QML Internationalization}{Internationalization}
+\contentspage QML Features
\title Network Transparency
QML supports network transparency by using URLs (rather than file names) for all
@@ -57,7 +61,7 @@ Network transparency is supported throughout QML, for example:
Even QML types themselves can be on the network - if the \l {QML Viewer} is used to load
\tt http://example.com/mystuff/Hello.qml and that content refers to a type "World", the engine
will load \tt http://example.com/mystuff/qmldir and resolve the type just as it would for a local file.
-For example if the qmldir file contains the line "World World.qml", it will load
+For example if the qmldir file contains the line "World World.qml", it will load
\tt http://example.com/mystuff/World.qml
Any other resources that \tt Hello.qml referred to, usually by a relative URL, would
similarly be loaded from the network.
diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc
index 5493d4a..763bc88 100644
--- a/doc/src/declarative/positioners.qdoc
+++ b/doc/src/declarative/positioners.qdoc
@@ -27,9 +27,12 @@
/*!
\page qml-positioners.html
+\ingroup qml-features
+\previouspage Property Binding
+\nextpage Anchor-based Layout in QML
+\contentspage QML Features
\title Using QML Positioner and Repeater Items
-\section1 Introduction
Positioner items are container items that manage the positions and sizes of
items in a declarative user interface. Positioners behave in a similar way to
@@ -53,7 +56,7 @@ graphical elements:
\section2 Column
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-column.png
\enddiv
@@ -70,7 +73,7 @@ must be added to a parent Rectangle, if desired.
\section2 Row
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-row.png
\enddiv
@@ -87,7 +90,7 @@ left around the edges of the horizontally centered Row item.
\section2 Grid
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-grid-spacing.png
\enddiv
@@ -97,7 +100,7 @@ in a 2-by-2 grid. As with the other positioners, the spacing between items
can be specified using the \l{Grid::spacing}{spacing} property.
\clearfloat
-\snippet doc/src/snippets/declarative/grid/grid-spacing.qml document
+\snippet doc/src/snippets/declarative/grid-spacing.qml document
There is no difference between horizontal and vertical spacing inserted
between items, so any additional space must be added within the items
@@ -108,7 +111,7 @@ at the appropriate places in the Grid definition.
\section2 Flow
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-flow-text1.png
\inlineimage qml-flow-text2.png
\enddiv
@@ -137,7 +140,7 @@ control of spacing between items and between lines of items.
\section1 Repeaters
-\div{float-right}
+\div {class="float-right"}
\inlineimage qml-repeater-grid-index.png
\enddiv
diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc
index 379a4ec..88ec5c3 100644
--- a/doc/src/declarative/propertybinding.qdoc
+++ b/doc/src/declarative/propertybinding.qdoc
@@ -27,192 +27,298 @@
/*!
\page propertybinding.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML Basic Types}{Data Types}
+\nextpage {Using QML Positioner and Repeater Items}{Component Layouts}
\title Property Binding
-Property binding is a declarative way of specifying the value of a property. Binding allows
-a property's value to be expressed as an JavaScript expression that defines the value relative
-to other property values or data accessible in the application. The property value is
-automatically kept up to date if the other properties or data values change.
+\section1 Properties
-Property bindings are created implicitly in QML whenever a property is assigned an JavaScript
-expression. The following QML uses two property bindings to connect the size of the rectangle
-to that of \c otherItem.
+QML components have \e properties that can be read and modified by other objects.
+In QML, properties serve many purposes but their main function is to bind to
+values. Values may be a \l{QML Basic Types}{basic type}, or other QML elements.
-\code
-Rectangle {
- width: otherItem.width
- height: otherItem.height
-}
-\endcode
+The syntax for properties is:
-QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be
-used as a property binding. Bindings can access object properties, make function calls and even
-use builtin JavaScript objects like \e {Date} and \e {Math}. Assigning a constant value to a
-property can even be thought of as a binding - after all, a constant is a valid JavaScript
-expression! Here are some examples of more complex bindings:
-
-\code
-Rectangle {
- function calculateMyHeight() {
- return Math.max(otherItem.height, thirdItem.height);
- }
-
- anchors.centerIn: parent
- width: Math.min(otherItem.width, 10)
- height: calculateMyHeight()
- color: { if (width > 10) "blue"; else "red" }
-}
-\endcode
+\tt{[default] property <type> <name>[: defaultValue]}
-While syntactically bindings can be of arbitrary complexity, if a binding starts to become
-overly complex - such as involving multiple lines, or imperative loops - it may be better
-to refactor the component entirely, or at least factor the binding out into a separate
-function.
+Elements already possess useful properties but, to create custom properties,
+precede the property name with the keyword \c property.
-\section1 Changing Bindings
-
-The \l PropertyChanges element can be used within a state change to modify the bindings on
-properties.
-
-This example modifies the \l Rectangle's width property binding to be \c {otherItem.height}
-when in the "square" state. When it returns to its default state, width's original property
-binding will have been restored.
-
-\code
-Rectangle {
- id: rectangle
- width: otherItem.width
- height: otherItem.height
-
- states: State {
- name: "square"
- PropertyChanges {
- target: rectangle
- width: otherItem.height
- }
- }
-}
-\endcode
+\snippet doc/src/snippets/declarative/properties.qml parent begin
+\snippet doc/src/snippets/declarative/properties.qml inherited properties
+\snippet doc/src/snippets/declarative/properties.qml custom properties
+\snippet doc/src/snippets/declarative/properties.qml parent end
+QML property rules coincide with many of JavaScript's property rules, for example,
+property names must begin with a lowercase letter.
+\l {JavaScript Reserved Words}{JavaScript reserved words} are not valid property
+names.
-\section1 Binding Properties from JavaScript
+\section1 Property Binding
-When working with both QML and JavaScript, it is important to differentiate between
-\l {Property Binding} syntax in QML and simple \e {property assignment} in JavaScript. Take
-the example below, which uses property binding to ensure the item's \c height is always twice
-its \c width:
-
-\qml
-Item {
- width: 100
- height: width * 2
-}
-\endqml
-
-On the other hand, take the following JavaScript code snippet, which \e assigns, rather
-than \e binds, the value of the \c height property:
-
-\code
-Item {
- width: 100
-
- Component.onCompleted: {
- height = width * 2 // if width changes later, height is not updated!
- }
-}
-\endcode
+Property binding is a declarative way of specifying the value of a property. Binding allows
+a property's value to be expressed as an JavaScript expression that defines the value relative
+to other property values or data accessible in the application. The property value is
+automatically kept up to date if the other properties or data values change.
-Instead of creating a property binding, this simply sets the \c height property to the correct
-value \e {at the time that} the JavaScript code is invoked. Unlike the first example, the
-\c height will never change if \c width changes.
+Property bindings are created in QML using the colon "\c {:}" before the value:
+\snippet doc/src/snippets/declarative/properties.qml property binding
+The property binding causes the width of the \c Rectangle to update whenever the
+\c {parent}'s width changes.
-The \e {property : value} syntax for property binding is QML-specific and cannot be used in
-JavaScript. Instead, to bind a property from JavaScript, assign a \e function to the property
-that returns the required value. The following code correctly sets the property binding
-created in the first example, but creates the binding in JavaScript rather than QML:
+QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be
+used as a property binding. Bindings can access object properties, make function calls and even
+use built-in JavaScript objects such as \c {Date} and \c {Math}.
+\snippet doc/src/snippets/declarative/properties.qml JavaScript sample
-\qml
-Item {
- width: 100
+While syntactically bindings can be of arbitrary complexity, if a binding starts to become
+overly complex - such as involving multiple lines, or imperative loops - it may be better
+to refactor the component entirely, or at least factor the binding out into a separate
+function.
- Component.onCompleted: {
- height = (function() { return width * 2 })
- }
-}
-\endqml
+\keyword qml-javascript-assignment
+\section1 Property Assignment versus Property Binding
+When working with both QML and JavaScript, it is important to differentiate between
+QML property binding and JavaScript value assignment. In QML, a property
+binding is created using the colon "\c {:}".
+\snippet doc/src/snippets/declarative/properties.qml property binding
+The property binding causes the width of the \c Rectangle to update whenever the
+\c {parent}'s width changes.
-\section2 Using \c this to create a binding
+Assigning a property value (using the equals sign "\c {=}") does not create a
+property binding.
+\snippet doc/src/snippets/declarative/properties.qml property assignment
-When creating a property binding from JavaScript, QML allows the use of the \c this keyword to
-refer to the object to which the property binding will be assigned. This allows one to
-explicitly refer to a property within an object when there may be ambiguity about the exact
-property that should be used for the binding.
+Instead of creating a property binding, the assignment simply sets the \c Rectangle
+\c width value to a number when the \c Component.onCompleted code is invoked.
-For example, the \c Component.onCompleted handler below is defined within the scope of the
-\l Item, and references to \c width within this scope would refer to the \l Item's width, rather
-than that of the \l Rectangle. To bind the \l Rectangle's \c height to its own \c width, the
-function needs to explicitly refer to \c this.width rather than just \c width. Otherwise, the
-height of the \l Rectangle would be bound to the width of the \l Item and not the \l Rectangle.
+Assigning a value to a property that is already bound will remove the previous binding.
+A property can only have one value at a time (a list of property is one value),
+and if any code explicitly re-sets this value, the property binding is removed.
-\qml
-Item {
- width: 500
- height: 500
+There is no way to create a property binding directly from imperative JavaScript code,
+although it is possible to use the \l {Using the Binding Element}{Binding} element.
- Rectangle {
- id: rect
- width: 100
- color: "yellow"
- }
+\section1 Types of Properties
- Component.onCompleted: {
- rect.height = (function() { return this.width * 2 })
- }
-}
-\endqml
+Properties may bind to different types, but they are are \e type-safe. That is,
+properties only allow you to assign a value that matches the property type. For
+example, if a property is a real, and if you try to assign a string to it you
+will get an error.
-(In this case, the function could also have referred to \c rect.width rather than \c this.width.)
+\badcode
+property real volume: "four" //generates an error
+\endcode
-Note that the value of \c this is not defined outside of its use in property binding.
-See \l {QML JavaScript Restrictions} for details.
+Certain properties bind to more complex types such as other elements and objects.
+
+\keyword qml-basic-property-types
+\section2 Basic Property Types
+Basic types such as \l int, \l real, and other Qt structures may be bound to
+properties. For a list of types, visit the \l {QML Basic Types} document.
-\section2 Effects of property assignment
+\keyword qml-id-property
+\section2 The \c id Property
+
+Each QML object may be given a special unique property called an \c id.
+No other object within the same QML component (see \l{QML Documents}) can have
+the same \c id value. QML objects may then access an object using the \c id
+property.
+\snippet doc/src/snippets/declarative/properties.qml id property
+A component may readily access its parent's properties by using the \c parent
+property.
-Note that assigning a value to a property that is currently bound will remove the binding.
-A property can only have one value at a time, and if any code explicitly sets this value, the
-binding is removed. In the following example, although \c width has been bound to \c height,
-the binding is removed by the JavaScript code that assigns \c width to 50:
+Note that an \c id must begin with a lower-case letter or an underscore. The
+\c id cannot contain characters other than letters, numbers, underscores, and
+\l {JavaScript Reserved Words}{JavaScript reserved words}.
+
+\section2 Elements and Objects as Property Values
-\code
-Item {
- width: height * 2
- height: 100
+Many properties bind to objects. For example, the \l Item element has a
+\c states property that can bind to \l State elements. This type of property
+binding allows elements to carry additional non-children elements. \c Item's
+\c transitions property behaves in a similar way; it can bind to \l Transition
+elements.
+
+Care must be taken when referring to the parent of an object property binding.
+Elements and components that are bound to properties are not necessarily set
+as children of the properties' component.
+
+\snippet doc/src/snippets/declarative/properties.qml object binding
+The code snippet has a \l Gradient element that attempts to print its parent's
+\c width value. However, the \c Gradient element is bound to the \c gradient
+property, not the \c children property of the \c Rectangle. As a result, the
+\c Gradient does not have the \c Rectangle as its parent. Printing the value
+of \c{parent.width} generates an error. Printing the \c Rectangle object's
+first child's \c name will print \c {childrectangle} because the second
+\c Rectangle is bound to the \c children property.
+
+For more information about the \c children property, please read the
+\l {Default Properties} section.
+
+\keyword attached-properties
+\section2 Attached Properties
+
+Certain objects provide additional properties by \e attaching properties to other
+objects. For example, the \l Keys element have properties that can \e attach to other QML
+objects to provide keyboard handling.
+
+\snippet doc/src/snippets/declarative/properties.qml list attached property
+The element \l ListView provides the delegate, \c listdelegate, the property
+\c isCurrentItem as an attached property. The \c ListView.isCurrentItem
+\e{attached property} provides highlight information to the delegate.
+Effectively, the \l ListView element attaches the \c ListView.isCurrentItem
+property to each delegate it creates.
+
+\keyword attached-signalhandlers
+\section2 Attached Signal Handlers
+
+\e {Attached signal handlers} are similar
+to \l{Attached Properties}{attached properties} in that they attach to objects
+to provide additional functionality to objects. Two prominent elements,
+\l Component and \l Keys element provide
+\l{QML Signal and Handler Event System}{signal handlers} as attached signal
+handlers.
+\snippet doc/src/snippets/declarative/properties.qml attached signal handler
+
+Read the \l{QML Signal and Handler Event System} and the \l{Keyboard Focus in QML}
+articles for more information.
+
+\section2 List properties
+
+Some properties may accept a binding to a list property, where more than one
+component can bind to the property. List properties allow multiple
+\l {State}{States}, \l {Gradient}{Gradients}, and other components to bind to a
+single property.
+\snippet doc/src/snippets/declarative/properties.qml list property
+The list is enclosed in square brackets, with a comma separating the
+list elements. In cases where you are only assigning a single item to a
+list, you may omit the square brackets.
+\snippet doc/src/snippets/declarative/properties.qml single property
+
+To access the list, use the \c index property.
+\snippet doc/src/snippets/declarative/properties.qml print list property
+The snippet code simply prints the name of the first state, \c FETCH.
+
+ See the \l{list}{list type} documentation
+for more details about list properties and their available operations.
+
+\keyword qml-grouped-properties
+\section2 Grouped Properties
+
+In some cases properties form a logical group and use either the \e dot notation
+or \e group notation.
+
+Grouped properties may be written both ways:
+\snippet doc/src/snippets/declarative/properties.qml grouped properties
+
+In the element documentation grouped properties are shown using the dot notation.
+
+\section2 Property Aliases
+
+Unlike a property definition, which allocates a new, unique storage space for
+the property, a property alias connects the newly declared property, called the
+\e{aliasing property} as a direct reference to an existing property, the
+\e{aliased property}. Read or write operations on the aliasing property results
+in a read or write operations on the aliased property, respectively.
+
+A property alias declaration is similar to an ordinary property definition:
+
+\tt{[default] property alias <name>: <alias reference>}
+
+As the aliasing property has the same type as the aliased property, an explicit
+type is omitted, and the special \c alias keyword is before the property name.
+Instead of a default value, a property alias has a compulsory alias reference.
+Accessing the aliasing property is similar to accessing a regular property. In
+addition, the optional \c default keyword indicates that the aliasing property
+is a \l{Default Properties}{default property}.
+
+\snippet doc/src/snippets/declarative/Button.qml property alias
+When importing the component as a \c Button, the \c buttonlabel is directly
+accessible through the \c label property.
+\snippet doc/src/snippets/declarative/properties.qml alias usage
+In addition, the \c id property may also be aliased and referred outside the
+component.
+\snippet doc/src/snippets/declarative/Button.qml parent begin
+\snippet doc/src/snippets/declarative/Button.qml id alias
+\snippet doc/src/snippets/declarative/Button.qml parent end
+The \c imagebutton component has the ability to modify the child \l Image object
+ and its properties.
+\snippet doc/src/snippets/declarative/properties.qml image alias
+
+Using aliases, properties may be exposed to the
+\l{qml-top-level-component}{top level component}. Exposing properties to the
+top-level component allows components to have interfaces similar to Qt widgets.
+
+\section3 Considerations for property aliases
+
+Aliases are only activated once the component
+\l{Component::onCompleted}{completes} its initialization. An error is generated
+when an uninitialized alias is referenced. Likewise, aliasing an aliasing
+property will also result in an error.
+
+\snippet doc/src/snippets/declarative/properties.qml alias complete
+
+When importing the component, however, aliasing properties appear as regular Qt
+properties and consequently can be used in alias references.
+
+It is possible for an aliasing property to have the same name as an existing
+property, effectively overwriting the existing property. For example,
+the following component has a \c color alias property, named the same as the built-in
+\l {Rectangle::color} property:
+
+\snippet doc/src/snippets/declarative/properties.qml alias overwrite
+
+Any object that use this component and refer to its \c color property will be
+referring to the alias rather than the ordinary \l {Rectangle::color} property.
+Internally, however, the \c coloredrectangle can correctly set its \c color
+property and refer to the actual defined property rather than the alias.
+
+The \l{declarative/ui-components/tabwidget}{TabWidget} example uses
+aliases to reassign children to the \l ListView, creating a tab effect.
+
+\keyword default-properties
+\section2 Default Properties
- Component.onCompleted: {
- width = 50;
- }
-}
-\endcode
+When imported, QML components will bind declared children to their designated
+\e{default properties}. The optional \c default attribute specifies a property
+as the \e {default property}. For example, the State element's default property
+is its \l{State::changes}{changes} property. \l PropertyChanges elements
+may simply be placed as the \c{State}'s children and they will be bound to the
+\c changes property.
+\snippet doc/src/snippets/declarative/properties.qml state default
+
+Similarly, the \l Item element's default property is its
+\l{Item::data}{data} property. The \c data property manages Item's
+\c children and \c resources properties. This way, different data types may be
+placed as direct children of the \c Item.
+\snippet doc/src/snippets/declarative/properties.qml default property
+Reassigning a default property is useful when a component is reused. For
+example, the \l{declarative/ui-components/tabwidget}{TabWidget} example uses
+the \c default attribute to reassign children to the \l ListView, creating
+a tab effect.
-\section1 The Binding Element
+\section1 Using the Binding Element
-The implicit binding syntax shown previously is easy to use and works perfectly for most uses
-of bindings. In some advanced cases, it is necessary to create bindings explicitly using the
-\l Binding element.
+In some advanced cases, it may be necessary to create bindings explicitly with
+the\l Binding element.
-For example, to bind a property exposed from C++ (\c system.brightness) to a value
-coming from QML (\c slider.value), you could use the Binding element as follows:
-\qml
-Binding {
- target: system
- property: "brightness"
- value: slider.value
-}
-\endqml
+For example, to bind a property exposed from C++ (\c system.brightness) to a
+value written in QML (\c slider.value), you could use the \l Binding element as
+follows:
+\snippet doc/src/snippets/declarative/properties.qml binding element
+\section1 Changing Property Values in States
+The \l PropertyChanges element is for setting property bindings within a
+\l State element to set a property binding.
+
+\snippet doc/src/snippets/declarative/properties.qml PropertyChanges element
+The rectangle's \c color property will bind to the \c warning component's
+\c color property when its \c state is set to the \c WARNING state.
*/
-
diff --git a/doc/src/declarative/qdeclarativedocument.qdoc b/doc/src/declarative/qdeclarativedocument.qdoc
index b94e32e..423d77c 100644
--- a/doc/src/declarative/qdeclarativedocument.qdoc
+++ b/doc/src/declarative/qdeclarativedocument.qdoc
@@ -30,8 +30,6 @@
\title QML Documents
\brief A description of QML documents and the kind of content they contain.
-\section1 Introduction
-
A QML document is a block of QML source code. QML documents generally correspond to files
stored on a disk or at a location on a network, but they can also be constructed directly
from text data.
@@ -42,17 +40,17 @@ Here is a simple QML document:
QML documents are always encoded in UTF-8 format.
-A QML document always begins with one or more import statements. To prevent elements
-introduced in later versions from affecting existing QML programs, the element types
-available within a document are controlled by the imported QML \l {Modules}. That is,
+A QML document always begins with one or more import statements. To prevent elements
+introduced in later versions from affecting existing QML programs, the element types
+available within a document are controlled by the imported QML \l {Modules}. That is,
QML is a \e versioned language.
-Syntactically a QML document is self contained; QML does \e not have a preprocessor that
-modifies the document prior to presentation to the QML runtime. \c import statements
-do not "include" code in the document, but instead instruct the QML runtime on how to
-resolve type references found in the document. Any type reference present in a QML
-document - such as \c Rectangle and \c ListView - including those made within an
-\l {Inline JavaScript}{JavaScript block} or \l {Property Binding}s, are \e resolved based exclusively on the
+Syntactically a QML document is self contained; QML does \e not have a preprocessor that
+modifies the document prior to presentation to the QML runtime. \c import statements
+do not "include" code in the document, but instead instruct the QML runtime on how to
+resolve type references found in the document. Any type reference present in a QML
+document - such as \c Rectangle and \c ListView - including those made within an
+\l {Inline JavaScript}{JavaScript block} or \l {Property Binding}s, are \e resolved based exclusively on the
import statements. QML does not import any modules by default, so at least one \c import
statement must be present or no elements will be available!
@@ -63,12 +61,12 @@ resolved according to the document scope.
\section1 Documents as Component Definitions
-A QML document defines a single, top-level \l {QDeclarativeComponent}{QML component}. A QML component
-is a template that is interpreted by the QML runtime to create an object with some predefined
-behaviour. As it is a template, a single QML component can be "run" multiple times to
-produce several objects, each of which are said to be \e instances of the component.
+A QML document defines a single, top-level \l {QDeclarativeComponent}{QML component}. A QML component
+is a template that is interpreted by the QML runtime to create an object with some predefined
+behaviour. As it is a template, a single QML component can be "run" multiple times to
+produce several objects, each of which are said to be \e instances of the component.
-Once created, instances are not dependent on the component that created them, so they can
+Once created, instances are not dependent on the component that created them, so they can
operate on independent data. Here is an example of a simple "Button" component (defined
in a \c Button.qml file) that is instantiated four times by \c application.qml.
Each instance is created with a different value for its \c text property:
@@ -80,7 +78,7 @@ Each instance is created with a different value for its \c text property:
\row
\o \snippet doc/src/snippets/declarative/qml-documents/qmldocuments.qml document
-\o
+\o
\qml
import QtQuick 1.0
@@ -112,23 +110,23 @@ to other QML components and applications in the same directory.
\section1 Inline Components
In addition to the top-level component that all QML documents define, and any reusable
-components placed in separate files, documents may also
-include \e inline components. Inline components are declared using the
-\l Component element, as can be seen in the first example above. Inline components share
+components placed in separate files, documents may also
+include \e inline components. Inline components are declared using the
+\l Component element, as can be seen in the first example above. Inline components share
all the characteristics of regular top-level components and use the same \c import list as their
-containing QML document. Components are one of the most basic building blocks in QML, and are
+containing QML document. Components are one of the most basic building blocks in QML, and are
frequently used as "factories" by other elements. For example, the \l ListView element uses the
\c delegate component as the template for instantiating list items - each list item is just a
new instance of the component with the item specific data set appropriately.
-Like other \l {QML Elements}, the \l Component element is an object and must be assigned to a
+Like other \l {QML Elements}, the \l Component element is an object and must be assigned to a
property. \l Component objects may also have an object id. In the first example on this page,
-the inline component is added to the \l Rectangle's \c resources list, and then
-\l {Property Binding} is used to assign the \l Component to the \l ListView's \c delegate
+the inline component is added to the \l Rectangle's \c resources list, and then
+\l {Property Binding} is used to assign the \l Component to the \l ListView's \c delegate
property. While using property binding allows the \l Component object to be shared (for example,
-if the QML document contained multiple \l ListView's with the same delegate), in this case the
-\l Component could have been assigned directly to the \l ListView's \c delegate. The QML
-language even contains a syntactic optimization when assigning directly to a component property
+if the QML document contained multiple \l ListView's with the same delegate), in this case the
+\l Component could have been assigned directly to the \l ListView's \c delegate. The QML
+language even contains a syntactic optimization when assigning directly to a component property
for this case where it will automatically insert the \l Component tag.
These final two examples are behaviorally identical to the original document.
diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc
index 9ca8938..bbee37c 100644
--- a/doc/src/declarative/qdeclarativei18n.qdoc
+++ b/doc/src/declarative/qdeclarativei18n.qdoc
@@ -27,9 +27,12 @@
/*!
\page qdeclarativei18n.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {Network Transparency}{Loading Resources in QML}
+\nextpage {QML Features}
\title QML Internationalization
-\section1 Overview
Strings in QML can be marked for translation using the qsTr(), qsTranslate(),
QT_TR_NOOP(), and QT_TRANSLATE_NOOP() functions.
diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc
index 9409eaf..23dd390 100644
--- a/doc/src/declarative/qdeclarativemodels.qdoc
+++ b/doc/src/declarative/qdeclarativemodels.qdoc
@@ -27,10 +27,14 @@
/*!
\page qdeclarativemodels.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML Animation and Transitions}{Animation and Transitions}
+\nextpage {Presenting Data with Views}
\target qmlmodels
\title QML Data Models
-QML items such as ListView, GridView and \l Repeater require Data Models
+QML items such as ListView, GridView and \l Repeater require Data Models
that provide the data to be displayed.
These items typically require a \e delegate component that
creates an instance for each item in the model. Models may be static, or
@@ -38,7 +42,7 @@ have items modified, inserted, removed or moved dynamically.
Data is provided to the delegate via named data roles which the
delegate may bind to. Here is a ListModel with two roles, \e type and \e age,
-and a ListView with a delegate that binds to these roles to display their
+and a ListView with a delegate that binds to these roles to display their
values:
\snippet doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml document
@@ -48,7 +52,7 @@ properties, the roles can be accessed with the qualified \e model name instead.
For example, if a \l Text element had \e type or \e age properties, the text in the
above example would display those property values instead of the \e type and \e age values
from the model item. In this case, the properties could have been referenced as
-\c model.type and \c model.age instead to ensure the delegate displays the
+\c model.type and \c model.age instead to ensure the delegate displays the
property values from the model item.
A special \e index role containing the index of the item in the model
@@ -68,11 +72,13 @@ QML provides several types of data models among the built-in set of
QML elements. In addition, models can be created with C++ and then
made available to QML components.
-The views used to access data models are described in \l{Presenting Data with QML}.
+The views used to access data models are described in the
+\l{Presenting Data with Views} overview.
The use of positioner items to arrange items from a model is covered in
\l{Using QML Positioner and Repeater Items}.
+\keyword qml-data-models
\section1 QML Data Models
\section2 ListModel
@@ -108,7 +114,7 @@ XmlListModel allows construction of a model from an XML data source. The roles
are specified via the \l XmlRole element.
The following model has three roles, \e title, \e link and \e description:
-\code
+\qml
XmlListModel {
id: feedModel
source: "http://rss.news.yahoo.com/rss/oceania"
@@ -117,7 +123,7 @@ XmlListModel {
XmlRole { name: "link"; query: "link/string()" }
XmlRole { name: "description"; query: "description/string()" }
}
-\endcode
+\endqml
The \l{demos/declarative/rssnews}{RSS News demo} shows how XmlListModel can
be used to display an RSS feed.
@@ -125,31 +131,19 @@ be used to display an RSS feed.
\section2 VisualItemModel
-VisualItemModel allows QML items to be provided as a model.
+VisualItemModel allows QML items to be provided as a model.
This model contains both the data and delegate; the child items of a
-VisualItemModel provide the contents of the delegate. The model
+VisualItemModel provide the contents of the delegate. The model
does not provide any roles.
-\code
- VisualItemModel {
- id: itemModel
- Rectangle { height: 30; width: 80; color: "red" }
- Rectangle { height: 30; width: 80; color: "green" }
- Rectangle { height: 30; width: 80; color: "blue" }
- }
-
- ListView {
- anchors.fill: parent
- model: itemModel
- }
-\endcode
+\snippet doc/src/snippets/declarative/models/visual-model-and-view.qml visual model and view
Note that in the above example there is no delegate required.
The items of the model itself provide the visual elements that
will be positioned by the view.
-
+\keyword qml-c++-models
\section1 C++ Data Models
Models can be defined in C++ and then made available to QML. This is useful
@@ -165,7 +159,7 @@ models.
A model may be a simple QStringList, which provides the contents of the list via the \e modelData role.
-Here is a ListView with a delegate that references its model item's
+Here is a ListView with a delegate that references its model item's
value using the \c modelData role:
\snippet examples/declarative/modelviews/stringlistmodel/view.qml 0
@@ -184,7 +178,7 @@ the model by calling QDeclarativeContext::setContextProperty() again.
\section2 QObjectList-based model
-A list of QObject* values can also be used as a model. A QList<QObject*> provides
+A list of QObject* values can also be used as a model. A QList<QObject*> provides
the properties of the objects in the list as roles.
The following application creates a \c DataObject class that with
@@ -205,7 +199,7 @@ the ListView delegate:
\snippet examples/declarative/modelviews/objectlistmodel/view.qml 0
-Note the use of the fully qualified access to the \c color property.
+Note the use of the fully qualified access to the \c color property.
The properties of the object are not replicated in the \c model
object, since they are easily available via the \c modelData
object.
@@ -221,10 +215,10 @@ the model by calling QDeclarativeContext::setContextProperty() again.
A model can be defined by subclassing QAbstractItemModel. This is the
best approach if you have a more complex model that cannot be supported
-by the other approaches. A QAbstractItemModel can also automatically
+by the other approaches. A QAbstractItemModel can also automatically
notify a QML view when the model data has changed.
-The roles of a QAbstractItemModel subclass can be exposed to QML by calling
+The roles of a QAbstractItemModel subclass can be exposed to QML by calling
QAbstractItemModel::setRoleNames(). The default role names set by Qt are:
\table
@@ -244,9 +238,9 @@ that has \e type and \e size roles. It calls QAbstractItemModel::setRoleNames()
role names for accessing the properties via QML:
\snippet examples/declarative/modelviews/abstractitemmodel/model.h 0
-\dots
+\dots
\snippet examples/declarative/modelviews/abstractitemmodel/model.h 1
-\dots
+\dots
\snippet examples/declarative/modelviews/abstractitemmodel/model.h 2
\codeline
\snippet examples/declarative/modelviews/abstractitemmodel/model.cpp 0
@@ -261,14 +255,14 @@ roles:
QML views are automatically updated when the model changes. Remember the model
must follow the standard rules for model changes and notify the view when
-the model has changed by using QAbstractItemModel::dataChanged(),
+the model has changed by using QAbstractItemModel::dataChanged(),
QAbstractItemModel::beginInsertRows(), etc. See the \l {Model subclassing reference} for
more information.
The complete example is available in Qt's \l {declarative/modelviews/abstractitemmodel}{examples/declarative/modelviews/abstractitemmodel} directory.
QAbstractItemModel presents a hierarchy of tables, but the views currently provided by QML
-can only display list data.
+can only display list data.
In order to display child lists of a hierarchical model
the VisualDataModel element provides several properties and functions for use
with models of type QAbstractItemModel:
@@ -283,14 +277,14 @@ with models of type QAbstractItemModel:
\section2 Exposing C++ Data Models to QML
-The above examples use QDeclarativeContext::setContextProperty() to set
-model values directly in QML components. An alternative to this is to
-register the C++ model class as a QML type from a QML C++ plugin using
-QDeclarativeExtensionPlugin. This would allow the model classes to be
+The above examples use QDeclarativeContext::setContextProperty() to set
+model values directly in QML components. An alternative to this is to
+register the C++ model class as a QML type from a QML C++ plugin using
+QDeclarativeExtensionPlugin. This would allow the model classes to be
created directly as elements within QML:
\table
-\row
+\row
\o
\code
@@ -299,7 +293,7 @@ class MyModelPlugin : public QDeclarativeExtensionPlugin
public:
void registerTypes(const char *uri)
{
- qmlRegisterType<MyModel>(uri, 1, 0,
+ qmlRegisterType<MyModel>(uri, 1, 0,
"MyModel");
}
}
@@ -339,7 +333,7 @@ An integer can be used to specify a model that contains a certain number
of elements. In this case, the model does not have any data roles.
The following example creates a ListView with five elements:
-\code
+\qml
Item {
width: 200; height: 250
@@ -355,7 +349,7 @@ Item {
}
}
-\endcode
+\endqml
\section2 An Object Instance
@@ -367,7 +361,7 @@ The example below creates a list with one item, showing the color of the
\e myText text. Note the use of the fully qualified \e model.color property
to avoid clashing with \e color property of the Text element in the delegate.
-\code
+\qml
Rectangle {
width: 200; height: 250
@@ -389,7 +383,7 @@ Rectangle {
delegate: myDelegate
}
}
-\endcode
+\endqml
\section1 Accessing Views and Models from Delegates
@@ -408,44 +402,7 @@ In the following example, the delegate shows the property \e{language}
of the model, and the color of one of the fields depends on the
property \e{fruit_color} of the view.
-\code
-Rectangle {
- width: 200; height: 200
-
- ListModel {
- id: fruitModel
- property string language: "en"
- ListElement {
- name: "Apple"
- cost: 2.45
- }
- ListElement {
- name: "Orange"
- cost: 3.25
- }
- ListElement {
- name: "Banana"
- cost: 1.95
- }
- }
-
- Component {
- id: fruitDelegate
- Row {
- Text { text: " Fruit: " + name; color: ListView.view.fruit_color }
- Text { text: " Cost: $" + cost }
- Text { text: " Language: " + ListView.view.model.language }
- }
- }
-
- ListView {
- property color fruit_color: "green"
- model: fruitModel
- delegate: fruitDelegate
- anchors.fill: parent
- }
-}
-\endcode
+\snippet doc/src/snippets/declarative/models/views-models-delegates.qml rectangle
Another important case is when some action (e.g. mouse click) in the
delegate should update data in the model. In this case you can define
@@ -457,92 +414,11 @@ a function in the model, e.g.:
...and call it from the delegate using:
-\code
+\js
ListView.view.model.setData(index, field, value)
-\endcode
+\endjs
...assuming that \e{field} holds the name of the field which should be
updated, and that \e{value} holds the new value.
*/
-
-/*!
-\page qml-presenting-data.html
-\title Presenting Data with QML
-
-\section1 Introduction
-
-Qt Quick contains a set of standard items that can be used to present data in a
-number of different ways. For simple user interfaces,
-\l{Using QML Positioner and Repeater Items#Repeaters}{Repeaters} can be used
-in combination with
-\l{Using QML Positioner and Repeater Items#Positioners}{Positioners}
-to obtain pieces of data and arrange them in a user interface. However, when
-large quantities of data are involved, it is often better to use models with
-the standard views since these contain many built-in display and navigation
-features.
-
-\section1 Views
-
-Views are scrolling containers for collections of items. They are feature-rich,
-supporting many of the use cases found in typical applications, and can be
-customized to meet requirements on style and behavior.
-
-A set of standard views are provided in the basic set of Qt Quick
-graphical elements:
-
-\list
-\o \l{#ListView}{ListView} arranges items in a horizontal or vertical list
-\o \l{#GridView}{GridView} arranges items in a grid within the available space
-\o \l{#PathView}{PathView} arranges items on a path
-\endlist
-
-Unlike these items, \l WebView is not a fully-featured view item, and needs
-to be combined with a \l Flickable item to create a view that performs like
-a Web browser.
-
-\section2 ListView
-
-\l ListView shows a classic list of items with horizontal or vertical placing
-of items.
-
-\div{float-right}
-\inlineimage qml-listview-snippet.png
-\enddiv
-
-The following example shows a minimal ListView displaying a sequence of
-numbers (using an \l{QML Data Models#An Integer}{integer as a model}).
-A simple delegate is used to define an items for each piece of data in the
-model.
-
-\clearfloat
-\snippet doc/src/snippets/declarative/listview/listview-snippet.qml document
-
-
-
-\section2 GridView
-
-\l GridView displays items in a grid like an file manager's icon view.
-
-\section2 PathView
-
-\l PathView displays items on a path, where the selection remains in
-the same place and the items move around it.
-
-\section1 Decorating Views
-
-\section2 Headers and Footers
-
-\section2 Sections
-
-\section2 Navigation
-
-In traditional user interfaces, views can be scrolled using standard
-controls, such as scroll bars and arrow buttons. In some situations, it
-is also possible to drag the view directly by pressing and holding a
-mouse button while moving the cursor. In touch-based user interfaces,
-this dragging action is often complemented with a flicking action, where
-scrolling continues after the user has stopped touching the view.
-
-\section1 Further Reading
-*/
diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc
index 6d5aebc..655b647 100644
--- a/doc/src/declarative/qdeclarativestates.qdoc
+++ b/doc/src/declarative/qdeclarativestates.qdoc
@@ -27,197 +27,110 @@
/*!
\page qdeclarativestates.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {Importing Reusable Components}
+\nextpage {QML Animation and Transitions}{Animation and Transitions}
\target qmlstates
\title QML States
-\section1 Overview
-
-User interfaces are designed to present different interface configurations in
-different scenarios, or to modify their appearances in response to user
-interaction. Often, there are a set of changes that are made concurrently, such
-that the interface could be seen to be internally changing from one \e state to
-another.
+\section1 States Elements
+\list
+\o \l State
+\o \l PropertyChanges
+\o \l StateGroup
+\o \l StateChangeScript
+\o \l ParentChange
+\o \l AnchorChanges
+\endlist
-This applies generally to interface elements regardless of their complexity.
-A photo viewer may initially present images in a grid, and when an image is
-clicked, change to a "detailed" state where the individual image is expanded
-and the interface is changed to present new options for image editing. On the
-other end of the scale, when a simple button is pressed, it may change to a
-"pressed" state in which its color and position is modified to give a pressed
-appearance.
+Many user interface designs are \e state driven; interfaces have configurations
+that differ depending on the current state. For example, a traffic signal will
+configure its flags or lights depending on its state. While in the signal's
+\c stop state, a red light will turn on while the yellow and the green lights
+will turn off. In the \c caution state, the yellow light is on while the other
+lights are turned off.
-In QML, any object can change between different \e states to apply sets of
-changes that modify the properties of relevant items. Each \e state could
-present a different configuration that could, for example:
+In QML, \e states are a set of property configurations defined in a \l State
+element. Different configurations could, for example:
\list
\o Show some UI elements and hide others
\o Present different available actions to the user
-\o Start, stop or pause animations
+\o Start, stop, or pause animations
\o Execute some script required in the new state
\o Change a property value for a particular item
-\o Show a different view or "screen"
+\o Show a different view or screen
\endlist
-Changes between states can be animated using \l {Transitions}{transitions}, as
-discussed further below.
-
-All \l {Item}-based objects have a \e {default state}, and can specify additional
-states by adding new \l State objects to the item's \l {Item::}{states}
-property. Each state has a \e name that is unique for all states within that
-item; the default state's name is an empty string. To change the current state
+All \l {Item}-based objects have a \c state property, and can specify additional
+states by adding new \c State objects to the item's \l {Item::}{states}
+property. Each state within a component has a unique \c name, an empty string
+being the default. To change the current state
of an item, set the \l {Item::}{state} property to the name of the state.
-Non-Item objects can use states through the StateGroup element.
-
+Non-Item objects may use states through the \l StateGroup element.
\section1 Creating States
To create a state, add a \l State object to the item's \l {Item::}{states} property,
which holds a list of states for that item.
-Following is an example. Here, the \l Rectangle is initially placed in the
-default (0, 0) position. It has defined an additional state named "moved", in
-which a PropertyChanges object repositions the rectangle to (50, 50). Clicking
-within the MouseArea changes the state to the "moved" state, thus moving the \l
-Rectangle.
-
-\snippet doc/src/snippets/declarative/states.qml 0
-
-The \l State item defines all the changes to be made in the new state. It
-could specify additional properties to be changed, or create additional
-PropertyChanges for other objects. It can also modify the properties of other
-objects, not just the object that owns the state. For example:
-
-\qml
-Rectangle {
- // ...
- states: [
- State {
- name: "moved"
- PropertyChanges { target: myRect; x: 50; y: 50; color: "blue" }
- PropertyChanges { target: someOtherItem; width: 1000 }
- }
- ]
-}
-\endqml
-
-As a convenience, if an item only has one state, its \l {Item::}{states}
-property can be defined as a single \l State, without the square-brace list
-syntax:
-
-\snippet doc/src/snippets/declarative/propertyanimation.qml single state
-
-A \l State is not limited to performing modifications on property values. It
-can also:
-
+A warning \c signal component may have two states, the \c NORMAL and the
+\c CRITICAL state. Suppose that in the \c NORMAL state, the \c color of the
+signal should be \c green and the warning \c flag is down. Meanwhile, in the
+\c CRITICAL state, the \c color should be \c red and the flag is \c up. We may
+model the states using the \c State element and the color and flag
+configurations with the \c PropertyChanges element.
+\snippet doc/src/snippets/declarative/states.qml signal states
+The \l PropertyChanges element will change the values of object properties.
+Objects are referenced through their \l {qml-id-property}{id}. Objects outside
+the component are also referenced using the \c id property, exemplified by the
+property change to the external \c flag object.
+
+Further, the state may change by assigning the \c state property with the
+appropriate signal state. A state switch could be in a \l MouseArea element,
+assigning a different state whenever the signal receives a mouse click.
+\snippet doc/src/snippets/declarative/states.qml switch states
+
+The State element is not limited to performing modifications on property values.
+It can also:
\list
-\o Run some script using StateChangeScript
-\o Override an existing signal handler for an object using PropertyChanges
-\o Re-parent an \l Item using ParentChanges
-\o Modify anchor values using AnchorChanges
+\o Run some script using \l StateChangeScript
+\o Override an existing signal handler for an object using \l PropertyChanges
+\o Re-parent an \l Item using \l ParentChange
+\o Modify anchor values using \l AnchorChanges
\endlist
-The \l {declarative/animation/states}{States and Transitions example}
-demonstrates how to declare a basic set of states and apply animated
-transitions between them.
-
-
\section1 The Default State
-Of course, the \l Rectangle in the example above could have simply been moved
-by setting its position to (50, 50) in the mouse area's \c onClicked handler.
-However, aside from enabling batched property changes, one of the features of
-QML states is the ability of an item to revert to its \e {default state}.
-The default state contains all of an item's initial property values before
-they were modified in a state change.
-
-For example, suppose the \l Rectangle should move to (50,50) when the mouse is
-pressed, and then move back to its original position when the mouse is
-released. This can be achieved by using the \l {State::}{when} property,
-like this:
-
-\qml
-Rectangle {
- // ...
-
- MouseArea {
- id: mouseArea
- anchors.fill: parent
- }
-
- states: State {
- name: "moved"
- when: mouseArea.pressed
- // ...
- }
-}
-\endqml
-
-The \l {State::}{when} property is set to an expression that evaluates to
-\c true when the item should be set to that state. When the mouse is pressed,
-the state is changed to \e moved. When it is released, the item reverts to its
-\e default state, which defines all of the item's original property values.
-
-Alternatively, an item can be explicitly set to its default state by setting its
-\l {Item::}{state} property to an empty string (""). For example, instead of
-using the \l {State::}{when} property, the above code could be changed to:
-
-\qml
-Rectangle {
- // ...
-
- MouseArea {
- anchors.fill: parent
- onPressed: myRect.state = 'moved';
- onReleased: myRect.state = '';
- }
-
- states: State {
- name: "moved"
- // ...
- }
-}
-\endqml
-
-Obviously it makes sense to use the \l {State::}{when} property when possible
-as it provides a simpler (and a better, more declarative) solution than
-assigning the state from signal handlers.
-
-
-\section1 Animating State Changes
+Every \l Item based component has a \c state property and a \e{default state}.
+The default state is the empty string (\c{""}) and contains all of an item's
+initial property values. The default state is useful for managing property
+values before state changes. Setting the \c state property to an empty string
+will load the default state.
+\section1 The \c when Property
-State changes can be easily animated through \l {Transitions}{transitions}. A
-\l Transition defines the animations that should be applied when an item
-changes from one state to another.
+For convenience, the \l State element has a \c when property that can bind to
+expressions to change the state whenever the bound expression evaluates to
+\c true. The \c when property will revert the state back to the
+\l {The Default State}{default state} when the expression evaluates to false.
-If the above example was modified to include the following \l Transition, the
-movement of the \l Rectangle would be animated:
+\snippet doc/src/snippets/declarative/states.qml when property
+The \c bell component will change to the \c RINGING state whenever the
+\c signal.state is \c CRITICAL.
-\qml
-Rectangle {
- // ...
-
- MouseArea {
- // Handle mouse events...
- }
+\section1 Animating State Changes
- states: [
- // States are defined here...
- ]
-
- transitions: [
- Transition {
- NumberAnimation { properties: "x,y"; duration: 500 }
- }
- ]
- }
-\endqml
+State changes induce abrupt value changes. The \l Transition element allow
+smoother changes during state changes. In transitions, animations and
+interpolation behaviors are definable. The
+\l {QML Animation and Transitions}{Animation and Transitions} article has more
+information about creating state animations.
-This \l Transition defines that if any \c x or \c y properties have changed
-during a state change within this item, their values should be animated over 500
-milliseconds.
+The \l {declarative/animation/states}{States and Transitions example}
+demonstrates how to declare a basic set of states and apply animated
+transitions between them.
-See the \l Transitions documentation for more information.
*/
diff --git a/doc/src/declarative/qml-intro.qdoc b/doc/src/declarative/qml-intro.qdoc
deleted file mode 100644
index 3f3e0e4..0000000
--- a/doc/src/declarative/qml-intro.qdoc
+++ /dev/null
@@ -1,616 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Free Documentation License
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of this
-** file.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-
-
-/*!
-\page qml-intro.html
-\title Intro to Qt Quick
-
-\section1 Overview
-
-QML is a high level, scripted language. Its commands, more correctly \e elements,
-leverage the power and efficiency of the Qt libraries to make easy to use
-commands that perform intuitive functions. Draw a rectangle, display an image at
-a position and so on. Behind these elements are complex C++ libraries that
-efficiently perform the action. As with any graphical application, always
-consider that this ability to easily build graphically rich applications means
-that some care may be needed to prevent performance problems.
-
-The language also allows more flexibility of these commands by using
-Javascript rather than C++ to add new layers of logic to your application.
-Javascript is easier to learn than C++ and can be embedded into the QML
-files or imported from a separate file.
-
-\bold{In QML the types of various 'objects' are referred to as \l {QML
-Elements}{elements}}.
-
-An element usually has various \e properties that help define the element. For
-example, if we created an element called Circle then the radius of the circle
-would be a property.
-
-
-\section1 A First Look
-
-The basic syntax of an \l{QML Elements}{element} is
-
-\qml
-SomeElement {
- id: myObject
- // ... some other things here ...
-}
-\endqml
-
-Here we are defining a new object. We specify its 'type' first as SomeElement.
-Then within matching braces { ... } we specify the various parts of our
-element.
-
-The \c id is a unique identifier for the element, it must start with a lower
-case letter and only contain letters, numbers and underscores. It is this
-particular object's name. If this SomeElement \l {QML Elements}{element} was
-a Rectangle instead and it was one of many then the \e optional unique id
-would allow us to manipulate each element individually.
-
-Each visual element is ultimately based on, or inherits from, an element
-called \l Item. \l Item has certain properties and actions that may be
-useful. The properties have default values so you need only specify the
-ones you will need.
-
-Take a simple element such as a \l Rectangle. It has an \c id, we will call
-it \e myRectangle, it has a \c width and a \c height. Imagine that we
-want a rectangle that is 500 pixels by 400 pixels in the x and y directions
-(horizontal by vertical).
-
-We can implement this \l Rectangle with these properties this way
-
-\snippet doc/src/snippets/declarative/qml-intro/rectangle.qml document
-
-This is a valid QML script. To run it, copy it and save it to a file, say
-myexample.qml, and on the command line run the following command:
-
-\code
-qmlviewer myexample.qml
-\endcode
-
-On Mac OS X, open the "QMLViewer" application instead and open the
-\c myexample.qml file, or run it from the command line:
-
-\code
-QMLViewer.app/Contents/MacOS/QMLViewer myexample.qml
-\endcode
-
-It will create a very boring rectangle in its own window.
-
-
-\section1 Hello World!
-
-We can now add some color and text to make a Hello World QML program.
-
-\l Rectangle has the property \l{Rectangle::color}{color} to produce a
-background color.
-
-Text is handled by a different element called \l Text. We need to create a
-\l Text object inside the \l Rectangle and set its \l{Text::}{text}
-property to "Hello World!". So to set the text to "Hello world" and the
-background colour to light gray,
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world1.qml document
-
-
-\section1 Hello World Again
-
-From now on we will not always show the import statement for Qt but it
-should still be there when you create your QML scripts.
-
-To make our Hello World example a little nicer set the position of the text
-to be at pixel position x = 100, y = 100 within the displayed window. This
-position belongs to the \l Text element so we set the position inside its
-definition. Note that we separate different QML statements on the same line
-with a semi-colon, or we could have simply put each statement on a new line
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world2.qml updated text
-
-Not only did we reposition the text, but the text was altered by adding
-HTML tags to change the font size. The text color was also changed from the
-default black to dark green by using a standard string for the color's SVG
-name.
-
-We could also have used a hexadecimal string for the RGB (red-green-blue, as
-#rrggbb) values of the color similar to the method used in HTML. For
-example, mostly blue with a green tint,
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world3.qml updated text
-
-All of these changes occurred within the \l Text object which is the scope
-of these property changes.
-
-Other objects may use the information but it belongs to the element where
-the property has been defined.
-
-
-\section1 Images
-
-To add an image to our little application we use the \l Image element. An
-\l Image uses a path to an image file, and has properties to control
-the aspect ratio, the image size, to tile the area amongst others. The
-source of the image, the path to the file, is a URL. Therefore the file can
-be local: \e {mydir/myimage1.png}. Or it can be remote:
-\e {"http://www.example.com/images/myimage1.png"}.
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world4.qml added an image
-
-This displays the image, as we would expect, at the top left of the window.
-The position of the default x = 0, y = 0 coordinate. The example here uses
-a PNG file, but it could have been one of various supported formats,
-including JPG and GIF.
-
-Let us reposition the image and enlarge it. Place it at the same 'x' offset
-as the "Hello world again" text, but put it another 50 pixels below the
-text, also make it 150 by 150 pixels in size,
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world5.qml positioning the image
-
-Adding the Hello World example, with the text and the image example we can
-write a simple piece of QML that starts to look a bit better.
-
-\snippet doc/src/snippets/declarative/qml-intro/hello-world5.qml document
-
-The result is still quite simple
-
-\image qml-intro-helloa.png
-
-
-\section1 Anchors: Aligning Elements
-
-Using absolute positioning, such as saying x = 100 and y = 150, works well
-until the user or developer stretches or increases the size of the window.
-Then the positions need to be recalculated. What would be nice would be a
-relative means of positioning of objects in a window or rectangle. For
-example, we want to place an image at the bottom of a rectangle, we would
-like to specify the image's location as the 'bottom of the window', not a
-specific coordinate. We can do this with the anchors property, which
-objects inherit from Item.
-
-The anchors property is really a property group. It is a collection of
-related properties. It has properties within it which can be used by means
-of the dot notation.
-
-The dot notation uses object \c{id}s and property names to use a particular
-object or property. Say I have a rectangle r1, which contains a rectangle
-r2, which contains an Item item1, which has an 'x' property I want to
-change. I just use the dot notation to identify it: r1.r2.item1.x
-
-If we want to position an image at the bottom of the rectangle it is
-inside. I have to specify that the bottom of the image is also at the
-bottom of the rectangle
-
-\snippet doc/src/snippets/declarative/qml-intro/anchors1.qml document
-
-This places the logo at the bottom left of the window.
-
-\image qml-intro-anchors1.png "A simple anchor"
-
-We would like it centered and not touching the bottom of the window, for
-aesthetic reasons. For the centering we use the horizontalCenter property,
-and to prevent the touching of the image to the bottom of the rectangle,
-the bottomMargin property is used. So the new actions for the script are
-
- \list
- \o set the bottom of the image (anchors.bottom) to be the bottom of the window
- \o move the image to be in the horizontal center of the window
- \o set a margin of 10 pixels so that the image does not touch the bottom window border
- \endlist
-
-Encoded into QML the script becomes
-
-\snippet doc/src/snippets/declarative/qml-intro/anchors2.qml document
-
-Run this and resize the window. You will see that now the position of the
-image adjusts during the resize.
-
-\image qml-intro-anchors2.png "Image Centered at the Bottom"
-
-You can also add another object say a block of descriptive text and place
-it above or below the image or to the side. This code places some text just
-above the image
-
-\snippet doc/src/snippets/declarative/qml-intro/anchors3.qml adding some text
-
-\image qml-intro-anchors3.png
-
-\note \e anchors is a property group, to be used within the object. When
-referencing these properties from another object we use the property
-directly, instead of saying:
-
-\qml
-Item {
- anchors.bottom: myRectangle.anchors.top // Wrong
-}
-\endqml
-
-we use
-
-\qml
-Item {
- anchors.bottom: myRectangle.top // Correct
-}
-\endqml
-
-
-\section1 Transformations
-
-We can transform a graphical object to get additional effects. Rotate a
-piece of text by 180 degrees to display upside-down text. Rotate an image
-by 90 degrees to lay it on its side. These transformations require
-additional information.
-
-For rotation, the additional information includes: the origin relative to
-the object being rotated, the axis of rotation, and the angle in degrees to
-rotate the image through in a clockwise direction. The axis does not have
-to be the z-axis, the line between your eyes and the image, it could be
-along the vertical y-axis or the horizontal x-axis. We have three
-dimensions to play with. For simplicity in this example we will rotate
-about the z-axis by 90 degrees in a negative direction, anti-clockwise.
-
-Rotation of text was also suggested. It could also be useful to scale the
-text. We can do both. The \l {Item::transform}{transform} property is a
-\e list of \l Transform elements, so using the list syntax
-\c{myList: [ listElement1, listElement2, ... } ]}
-we can produce a list of transformations.
-
-The text will be rotated by 45 degrees anti-clockwise and scaled
-vertically by a factor of 1.5 and by 1.2 horizontally.
-
-Using the example above as the basis for this we have,
-
-\snippet doc/src/snippets/declarative/qml-intro/transformations1.qml document
-
-The code block in \c image1 starting with \c transform specifies that the
-\l {Item::transform}{transform} property will be a Rotation through -90
-degrees, which is anti-clockwise, about the z-axis running through the
-center of the image at (75,75), since the image is 150 x 150 pixels.
-
-The other transformation available is \l Translate. This produces a change
-in position of the item.
-
-\note In a list of transformations the order of the transformations is
-important. In the above example try swapping around the Scale transform with
-the Rotation transform, remember to remove or add the comma. The results are
-acceptable for our little test but not the same.
-
-
-\section1 Animations
-
-Animation in QML is done by animating properties of objects. Properties
-that are numbers, colors, Rectangles, points and directions. In QML these
-are \l {QML Basic Types} named as real, int, color, rect, point, size, and
-vector3d. There are a number of different ways to do animation. Here we
-will look at a few of them.
-
-\section2 Number Animation
-
-Previously we have used a rotation transformation to change the orientation
-of an image. We could easily animate this rotation so that instead of a
-straight rotation counter-clockwise of 90 degrees we could rotate the image
-through a full 360 degrees in an animation. The axis of rotation wont
-change, the position of the center of the image will not change, only the
-angle will change. Therefore, a NumberAnimation of a rotation's angle should
-be enough for the task. If we wish for a simple rotation about the center
-of the image then we can use the \c rotation property that is inherited
-from \l Item. The rotation property is a real number that specifies the
-angle in a clockwise direction for the rotation of the object. Here is the
-code for our animated rotating image.
-
-\snippet doc/src/snippets/declarative/qml-intro/number-animation1.qml document
-
-The \c {transformOrigin: Item.Center} is redundant since this is the default
-axis of rotation anyway. But if you change \c Center to \c BottomRight you
-will see an interesting variation.
-
-Also if instead the \l Rotation transformation had been used then we would have
-more control over the various parameters. We could vary the axis, to be not
-just a different offset from the z-axis but along the y-axis, x-axis or
-combination. For example, if the task had been to animate the rotation
-about the y-axis passing through the center of the image then the following
-code would do it.
-
-\snippet doc/src/snippets/declarative/qml-intro/number-animation2.qml document
-
-Here there is a rectangle 600 by 400 pixels. Placed within that rectangle
-is an image 100 by 100 pixels. It is rotated about the center of the image
-about the y-axis so that it looks as if it is rotating about an invisible
-vertical string holding it up. The time it takes to complete the rotation is 3
-seconds (3,000 milliseconds). The NumberAnimation is applied to the angle
-taking it from 0 (no change) to 360 degrees, back where it started.
-Strictly speaking it isn't necessary to go from 0 to 360 since the same
-location is duplicated, but it makes it easier to read in this example and
-it has no visible effect on the animation. The number of loops that the
-animation will execute is set to \c {Animation.Infinite} which means that the
-animation is in an endless loop.
-
-To see an interesting variation. Change the axis to \c {axis { x:1; y:1; z:1
-}}. This is a line coming from the center of the image downwards to the
-right and out of the screen. Although the change is simple the rotation
-seems complex.
-
-\section2 Sequential Animation
-
-For a more complex animation we will need two images. The first image will
-be placed at the center of a window (Rectangle) and the second image will
-be at the upper left of the window. The animation will move the second
-image from the top left of the window to the bottom right. In doing so we
-will be animating the position and the size of the image.
-
-First create two images
-
-\snippet doc/src/snippets/declarative/qml-intro/sequential-animation1.qml document
-
-We will add to 'image1' a SequentialAnimation from x = 20 to the target of
-x = 450. The 'from' values will be used because we will be repeating the
-animation, so the object needs to know where the original position is, both
-x and y. The SequentialAnimation of x will set it to repeat by indicating
-that the number of animation loops is infinite, meaning that the 'loop'
-counter will be set to a value Animation.Infinite that indicates an endless
-cycle. Also there will be a NumberAnimation to vary the numeric property
-between the x values and over a given duration. After the NumberAnimation
-there will be a PauseAnimation that will pause the animation for 500
-milliseconds (half a second) simply for the visual effect.
-
-\snippet doc/src/snippets/declarative/qml-intro/sequential-animation2.qml adding a sequential animation
-
-A similar block of code is written for the animation of the 'y' value of
-the position.
-
-We will also animate the scale of the object, so as it goes from top left
-to bottom right of the window it will become smaller until about midway,
-and then become larger. To complete the animation we will set the 'z'
-values of the images. 'z' is the stacking order, the z-axis effectively
-points out from the screen to your eyes with the default value of 'z' being
-0. So if we set the Rectangle to have z with value zero, just to be sure,
-and image1 to 1 and image2 to 2 then image2 will be in the foreground and
-image1 in the background. When image1 passes image2 it will pass behind it.
-The completed code looks like
-
-\snippet doc/src/snippets/declarative/qml-intro/sequential-animation3.qml document
-
-The \c {easing.type} has many options, expressed as a string. It specifies the
-kind of equation that describes the acceleration of the property value, not
-necessarily position, over time.
-
-For example, \e InOutQuad means that at the start and the end of the animation the
-'velocity' is low but the acceleration or deceleration is high. Much like a car
-accelerating from stop, and decelerating to stop at the end of a journey,
-with the maximum speed being in the middle. Examine the \l {PropertyAnimation::easing.type}
-{easing} documentation and the various graphs that show the effect. The horizontal
-axis, 'progress', can be thought of as time. The vertical axis is the value
-of the particular property.
-
-In discussing animation we need to describe three objects: State, MouseArea
-and Signals. Although independent of the animation elements, animation
-delivers some of the best examples that illustrate these new elements.
-
-
-
-\section2 Animation Summary
-
-\table
- \header
- \o Name
- \o Description
- \row
- \o PropertyAnimation
- \o a property value on a target object is varied to a specified value over a given time.
-
- \row
- \o NumberAnimation
- \o animate a numeric property from one value to another over a given time.
-
- \row
- \o PauseAnimation
- \o results in the task waiting for the specified duration, in milliseconds.
-
- \row
- \o SequentialAnimation
- \o allows us to list in order the animation events we want to occur, first A then B then C and so on.
-
- \row
- \o ParallelAnimation
- \o enables us to run different animations at the same time instead of sequentially.
-
-\endtable
-
-
-\section1 Using States
-
-A state is a defined set of values in the configuration of an object and
-often depends on the previous state. For example, a glass could be in a
-state we call 'HalfFull' if it is being filled with a liquid and has
-reached half of its total capacity. We could also have a state called
-HalfEmpty which is the state that occurs when the amount of liquid drops to
-half of the glass's capacity. Both states represent the same amount of
-liquid, but we consider them different. Likewise, states in a program
-represent not just values but may include how the current values were
-reached.
-
-When a state changes a \e transition occurs. This is an opportunity to make
-changes or take actions that depend on the movement to the new state. For
-example, if we had a scene in the country where the state variable has two
-states "daylight" and "night". Then when the state changes to "night" at
-this transition the sky would be made dark, stars would be shown, the
-countryside would be darkened. And when the state changes to "daylight" the
-opposite changes would be made: the sky is now blue, the scenery is green,
-there is a sun in the sky.
-
-Here is a simple QML program that shows the change of state in the above
-example. We have two rectangles, the top one is the 'sky' and the bottom
-one is the 'ground'. We will animate the change from daylight to night.
-There will be two states, but we only need to define one since 'daylight'
-will be the default state. We will just go to 'night' by clicking and
-holding the left mouse button down, releasing the mouse button will reverse
-the process
-
-\snippet doc/src/snippets/declarative/qml-intro/states1.qml document
-
-Several new things appear in this sample. Firstly, we use a \l MouseArea
-element to detect mouse clicks in the \e mainRectangle. Secondly, we use
-the list notation [ thing1 , thing2, ... ] to build a list of states and a
-list of transitions.
-
-\l MouseArea defines a region that will respond to mouse clicks. In this case
-we are only concerned with when the mouse is pressed or not pressed, not
-the particular button or other details. The area of the MouseArea is the
-entire main window, mainRectangle, so that clicking anywhere in this region
-will start the animation. Since we are using the 'pressed' mouse state,
-then the animation will move from 'daylight' to 'night' only while the mouse
-button remains pressed.
-
-When the button is released the 'daylight' state is entered and the
-transition from 'night' to 'daylight' is triggered causing the animation to
-run. The transition specifies the duration in milliseconds of the
-ColorAnimation, while the state specifies the color of the new state.
-
-The PropertyChanges command is the way that we nominate which properties
-will change in a change of state, and what new value the property will
-take. Since, for example, we want the 'sky' region to turn to dark blue and
-the 'ground' region to turn to black for the 'night' state, then the
-rectangles for those regions are the 'target' and the property in the target
-is 'color'.
-
-
-\section1 Signals
-
-Signals are simply events that can be hooked up to actions we want performed.
-In QML they are usually preceded by the word 'on', for example in the animation
-using a MouseArea the signal was \l {MouseArea::onPressed}{onPressed}. If
-you look at the C++ documentation you will see a lot of talk about
-\l {Signals & Slots}{Signals and Slots}. Signals are connected to Slots. The
-signal represents an event and the Slot is the function that does something
-based on that event. You can also have Signals connected to other Signals, so
-that one Signal (event) triggers another Signal (event), and so forth. It is
-nice to know this is what happens beneath the QML layer but not essential for
-using QML.
-
-Most elements do not have Signals associated with them. However, a few like
-the \l Audio element have many signals. Some of the \l Audio signals are
-used to represent events such as when the audio is stopped, play is pressed,
-paused, and reaching the end of the media. They allow the developer to connect,
- for example, the press of a user interface button (perhaps a MouseArea) to
- some QML that will handle this event.
-
-
-\section1 Analyzing An Example: Dial Control
-
-In the Qt \e {examples/declarative/ui-components} folder you will find a folder
-\e {dialcontrol} which contains the \e dialcontrol example.
-
-\image qml-dial.png "QML Dial example with Slider"
-
-In essence this small application has a sliding bar that you can slide using
-a mouse, and a graphical dial that responds to the position of the slider.
-
-The code for the example is in two parts: Dial.qml and dialcontrol.qml.
-
-\e {Dial.qml} can be found in the \e content sub-directory. It defines a \c Dial
-component similar to an odometer. Eventually, the example will hook up a slider
-component so that moving the slider will change the position of a needle on the
-dial.
-
-The code for the \c Dial, identified by the name of the file, contains four images
-in overlapping order: the background (numbers and divisions), the shadow of the
-needle, the needle itself, and finally the 'glass' overlay (containing
-transparent layers).
-
-The \c needle_shadow.png image has a \l Rotation assigned to the \e transform
-attribute of the \l Image. The rotation is set to match the angle of the needle
-image angle value \e {needleRotation.angle}. Both the needle and the
-needle_shadow have the same default \e x and \e y values but the rotation origin
-for the needle is slightly different so that a shadow will be evident as the
-needle moves.
-
-\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle_shadow
-
-And the needle
-
-\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle
-
-The final image is the overlay which simply has a position defined.
-
-\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml overlay
-
-\e {dialcontrol.qml} in the \e {examples/declarative/ui-components/dialcontrol} directory is the
-main file of the example. It defines the visual environment that the Dial
-will fit into. Because the \e Dial component and the images live in the \e
-content sub-directory we will have to import this into \e dialcontrol.qml. So the
-start of the file looks like
-
-\snippet examples/declarative/ui-components/dialcontrol/dialcontrol.qml imports
-
-The visual space is bound by a 300 by 300 pixel \l Rectangle which is given
-a gray color. Inside this rectangle is our component \e Dial and a \l Rectangle.
-Inside the rectangle called 'container' is another rectangle with the
-interesting name 'slider'.
-
-\snippet examples/declarative/ui-components/dialcontrol/dialcontrol.qml 0
-
-The Dial component, named 'dial, is \e anchored to the center of the main
-rectangle. The \c value attribute of 'dial' is set to a value based on the
-'slider' horizontal position and the 'container' width. So changes to the
-'slider' position will change the Dial \c value which is used in Dial to compute
-the rotation of the needle image. Notice this piece of code in Dial where
-the change in \c value modifies the position of the needle.
-
-\snippet examples/declarative/ui-components/dialcontrol/content/Dial.qml needle angle
-
-This is part of the \c needleRotation that rotates the needle and causes the
-rotation of its shadow. \l SpringAnimation is an element that modifies the value
-of that rotation \e angle and mimics the oscillatory behavior of a spring,
-with the appropriate \e spring constant to control the acceleration and the \e
-damping to control how quickly the effect dies away.
-
-The 'container' is light gray with a color gradient defined using
-\l GradientStop. The gradient is applied vertically. If you need a horizontal
-gradient then you could apply the vertical gradient and then rotate the item
-by 90 degrees.
-
-The 'slider' is dark gray and also has a vertical color gradient. The most
-important thing about the 'slider' is that it has a MouseArea defined, which
-specifies a \c {drag.target} on itself along the X-axis. With minimum
-and maximum values on the X-axis defined. So we can click on the 'slider' and
-drag it left and right within the confines of the 'container'. The motion of
-the 'slider' will then change the \c value attribute in \e Dial as discussed
-already.
-
-Also notice the use of a \c radius value for a rectangle. This produces rounded
-corners. That is how the 'container' and 'slider' are displayed with a
-pleasant rounded look.
-
-
-
-*/
-
-
-
diff --git a/doc/src/declarative/qmlevents.qdoc b/doc/src/declarative/qmlevents.qdoc
new file mode 100644
index 0000000..566f71c
--- /dev/null
+++ b/doc/src/declarative/qmlevents.qdoc
@@ -0,0 +1,127 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qmlevents.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {Keyboard Focus in QML}{Keyboard Focus}
+\nextpage Importing Reusable Components
+
+\title QML Signal and Handler Event System
+
+QML utilizes Qt's \l{The Meta-Object System}{meta-object} and
+\l{Signals & Slots}{signals} systems. Signals and slots created using Qt in C++
+are inheritely valid in QML.
+
+\keyword qml-signals-and-handlers
+\section1 Signals and Handlers
+
+Signals provide a way to notify other objects when an event has occurred. For
+example, the MouseArea \c clicked signal notifies other objects that the mouse
+has been clicked within the area.
+
+The syntax for defining a new signal is:
+
+\tt{signal <name>[([<type> <parameter name>[, ...]])]}
+
+Attempting to declare two signals or methods with the same name in the same type
+block generates an error. However, a new signal may reuse the name of an existing signal on the type. (This should be done with caution, as the existing signal may be hidden and become inaccessible.)
+
+Here are various examples of signal declarations:
+\snippet doc/src/snippets/declarative/events.qml parent begin
+\snippet doc/src/snippets/declarative/events.qml signal declaration
+\snippet doc/src/snippets/declarative/events.qml parent end
+
+If the signal has no parameters, the "\c{()}" brackets are optional. If
+parameters are used, the parameter types must be declared, as for the \c string
+and \c variant arguments of the \c perform signal.
+
+Adding a signal to an item automatically adds a \e{signal handler} as well. The
+signal hander is named \c on<SignalName>, with the first letter of the signal in
+uppercase. The previous signals have the following signal handlers:
+\snippet doc/src/snippets/declarative/events.qml signal handler declaration
+
+Further, each QML properties have a \c{<property_name>Changed} signal and its
+corresponding \c{on<property_name>Changed} signal handler. As a result, property
+changes may notify other components for any changes.
+\snippet doc/src/snippets/declarative/events.qml automatic signals
+
+To emit a signal, invoke it as a method. The signal handler binding is similar
+to a property binding and it is invoked when the signal is emitted. Use the
+defined argument names to access the respective arguments.
+\snippet doc/src/snippets/declarative/events.qml signal emit
+Note that the \c Component.onCompleted is an
+\l{attached-signalhandlers}{attached signal handler}; it is invoked when the
+\l Component initialization is complete.
+
+\keyword qml-connect-signals-to-method
+\section2 Connecting Signals to Methods and Signals
+
+Signal objects have a \c connect() method to a connect a signal either to a
+method or another signal. When a signal is connected to a method, the method is
+automatically invoked whenever the signal is emitted. (In Qt terminology, the
+method is a \e slot that is connected to the \e signal; all methods defined in
+QML are created as \l{Signals & Slots}{Qt slots}.) This enables a signal
+to be received by a method instead of a \l {Signal Handlers}{signal handler}.
+
+\snippet doc/src/snippets/declarative/events.qml connect method
+The \c {connect()} method is appropriate when connecting a JavaScript method to
+a signal.
+
+There is a corresponding \c disconnect() method for removing connected
+signals.
+
+\section3 Signal to Signal Connect
+
+By connecting signals to other signals, the \c connect() method can form different
+signal chains.
+\snippet doc/src/snippets/declarative/events.qml forward signal
+
+
+Whenever the \l MouseArea \c clicked signal is emitted, the \c send
+signal will automatically be emitted as well.
+
+\code
+output:
+ MouseArea clicked
+ Send clicked
+\endcode
+
+\section1 C++ Additions
+
+Because QML uses Qt, a signal defined in C++ also works as a QML signal. The
+signal may be emitted in QML code or called as a method. In addition, the QML
+runtime automatically creates signal handlers for the C++ signals. For more
+signal control, the \c connect() method and the \l Connections element may connect
+a C++ signal to another signal or method.
+
+For complete information on how to call C++ functions in QML, read the
+\l{Extending QML - Signal Support Example}.
+
+
+*/
diff --git a/doc/src/declarative/qmlreusablecomponents.qdoc b/doc/src/declarative/qmlreusablecomponents.qdoc
new file mode 100644
index 0000000..ee360eb
--- /dev/null
+++ b/doc/src/declarative/qmlreusablecomponents.qdoc
@@ -0,0 +1,143 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qmlreusablecomponents.html
+\ingroup qml-features
+\previouspage {QML Signal and Handler Event System}{Signal and Handler Event System}
+\nextpage {QML States}{States}
+\contentspage QML Features
+
+\title Importing Reusable Components
+
+A \e component is an instantiable QML definition, typically contained in a
+\c .qml file. For instance, a Button \e component may be defined in
+\c Button.qml. The QML runtime may instantiate this Button component to create
+Button \e objects. Alternatively, a component may be defined inside a
+\l Component element.
+
+Moreover, the Button definition may also contain other components. A Button
+component could use a Text element for its label and other components to
+implement its functions. Compounding components to form new components
+(and effectively new interfaces) is the emphasis in QML.
+
+\keyword qml-define-components
+\section1 Defining New Components
+
+Any snippet of QML code may become a component, by placing the code in a QML
+file (extension is \c .qml). A complete Button component that responds to user
+input may be in a Button.qml file.
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml document
+
+Alternatively, a \l Component element may encapsulate a QML object to form a
+component.
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml parent begin
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml define inline component
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml parent end
+
+\keyword qml-loading-components
+\section1 Loading a Component
+
+The initialization of inline components is different from loading a component
+from a \c .qml file.
+
+\section2 Importing a Component
+
+A component defined in a \c .qml file is directly usable by declaring the name
+of the component. For example, a button defined in \c Button.qml is created by
+declaring a \c Button. The button is defined in the
+\l {qml-define-components}{Defining New Components} section.
+\snippet doc/src/snippets/declarative/reusablecomponents/application.qml document
+
+Note that the component name, \c Button, matches the QML filename, \c Button.qml.
+Also, the first character is in upper case. Matching the names allow
+components in the same directory to be in the direct import path of the
+application.
+
+For flexibility, a \c qmldir file is for dictating which additional components,
+plugins, or directories should be imported. By using a \c qmldir file,
+component names do not need to match the filenames. The \c qmldir file should,
+however, be in an imported path.
+\snippet doc/src/snippets/declarative/reusablecomponents/qmldir document
+
+\section2 Loading an Inline Component
+
+A consequence of inline components is that initialization may be deferred or
+delayed. A component may be created during a MouseArea event or by using a
+\l Loader element. The component can create an object, which is addressable in a
+similar way as an \l {qml-id-property}{id property}. Thus, the created object may
+have its bindings set and read like a normal QML object.
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml define inline component
+\snippet doc/src/snippets/declarative/reusablecomponents/component.qml create inline component
+
+\keyword qml-component-properties
+\section1 Component Properties
+
+Initializing a component, either from a .qml file or initializing an inline
+component, have several properties to facilitate component execution.
+Specifically, there are \l{attached-properties}{attached properties} and
+\l{attached-signalhandlers}{attached signal handlers} for setting properties
+during the lifetime of a component.
+
+The \c{Component.onCompleted} attached signal handler is called when the
+component completes initialization. It is useful for executing any commands
+after component initialization. Similarly, the \c{Component.onDestruction}
+signal handler executes when the component finishes destruction.
+
+\keyword qml-top-level
+\section1 Top-Level Component
+
+Choosing the \e{top-level} or the \e{root} object of components is an important
+design aspect because the top-level object dictates which properties are
+accessible outside the component. Some elements are not visual elements and
+will not have visual properties exposed outside the component. Likewise, some
+elements add functionality that are not available to visual elements.
+
+Consider the Button component from the
+\l{qml-define-components}{Defining New Components} section; it's top-level
+object is a \l Rectangle. When imported, the Button component will possess the
+Rectangle's properties, methods, signals, and any custom properties.
+
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent begin
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml ellipses
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml properties
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml ellipses
+\snippet doc/src/snippets/declarative/reusablecomponents/Button.qml parent end
+
+The Button's \c text alias is accessible from outside the component as well as
+the Rectangle's visual properties and signals such as \c x, \c y, \c anchors,
+and \c states.
+
+Alternatively, we may choose a \l {Keyboard Focus in QML}{FocusScope} as our
+top-level object. The \l FocusScope element manage keyboard focus for its
+children which is beneficial for certain types of interfaces. However, since
+\c FocusScopes are not visual elements, the visual properties of its child need
+to be exposed.
+
+\snippet doc/src/snippets/declarative/reusablecomponents/focusbutton.qml document
+*/
+
diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc
index f6604fb..a1f3f96 100644
--- a/doc/src/declarative/qmlruntime.qdoc
+++ b/doc/src/declarative/qmlruntime.qdoc
@@ -29,13 +29,13 @@
\page qmlruntime.html
\title Qt Declarative UI Runtime
-QML documents are loaded and executed by the QML runtime. This includes the
+QML documents are loaded and executed by the QML runtime. This includes the
Declarative UI engine along with the built-in QML elements and plugin modules,
and it also provides access to third-party QML elements and modules.
-Applications that use QML need to invoke the QML runtime in order to
-execute QML documents. This can be done by creating a QDeclarativeView
-or a QDeclarativeEngine, as described below. In addition, the Declarative UI
+Applications that use QML need to invoke the QML runtime in order to
+execute QML documents. This can be done by creating a QDeclarativeView
+or a QDeclarativeEngine, as described below. In addition, the Declarative UI
package includes the \QQV tool, which loads \c .qml files. This tool is
useful for developing and testing QML code without the need to write
a C++ application to load the QML runtime.
@@ -44,7 +44,7 @@ a C++ application to load the QML runtime.
\section1 Deploying QML-based applications
-To deploy an application that uses QML, the QML runtime must be invoked by
+To deploy an application that uses QML, the QML runtime must be invoked by
the application. This is done by writing a Qt C++ application that loads the
QDeclarativeEngine by either:
@@ -61,12 +61,12 @@ For example, if there is a QML file, \c application.qml, like this:
\qml
import QtQuick 1.0
-
+
Rectangle { width: 100; height: 100; color: "red" }
\endqml
It can be loaded in a Qt application's \c main.cpp file like this:
-
+
\code
#include <QApplication>
#include <QDeclarativeView>
@@ -82,10 +82,10 @@ It can be loaded in a Qt application's \c main.cpp file like this:
return app.exec();
}
\endcode
-
-This creates a QWidget-based view that displays the contents of
+
+This creates a QWidget-based view that displays the contents of
\c application.qml.
-
+
The application's \c .pro \l{qmake Project Files}{project file} must specify
the \c declarative module for the \c QT variable. For example:
@@ -97,36 +97,36 @@ the \c declarative module for the \c QT variable. For example:
\section2 Creating a QDeclarativeEngine directly
-
-If \c application.qml does not have any graphical components, or if it is
+
+If \c application.qml does not have any graphical components, or if it is
preferred to avoid QDeclarativeView for other reasons, the QDeclarativeEngine
can be constructed directly instead. In this case, \c application.qml is
loaded as a QDeclarativeComponent instance rather than placed into a view:
\code
#include <QApplication>
- #include <QDeclarativeEngine>
+ #include <QDeclarativeEngine>
#include <QDeclarativeContext>
#include <QDeclarativeComponent>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
-
+
QDeclarativeEngine engine;
QDeclarativeContext *objectContext = new QDeclarativeContext(engine.rootContext());
-
+
QDeclarativeComponent component(&engine, "application.qml");
QObject *object = component.create(objectContext);
-
+
// ... delete object and objectContext when necessary
-
+
return app.exec();
}
\endcode
-See \l {Using QML in C++ Applications} for more information about using
-QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well
+See \l {Using QML Bindings in C++ Applications} for more information about using
+QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well
as details on including QML files through \l{The Qt Resource System}{Qt's Resource system}.
@@ -135,8 +135,8 @@ as details on including QML files through \l{The Qt Resource System}{Qt's Resour
The Declarative UI package includes a QML runtime tool, the \QQV, which loads
and displays QML documents. This is useful during the application development
-phase for prototyping QML-based applications without writing your own C++
-applications to invoke the QML runtime.
+phase for prototyping QML-based applications without writing your own C++
+applications to invoke the QML runtime.
See the \l{QML Viewer} documentation for more details.
diff --git a/doc/src/declarative/qmlsyntax.qdoc b/doc/src/declarative/qmlsyntax.qdoc
new file mode 100644
index 0000000..fc25bce
--- /dev/null
+++ b/doc/src/declarative/qmlsyntax.qdoc
@@ -0,0 +1,155 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qmlsyntax.html
+\title QML Syntax
+\ingroup QML Reference
+\contentspage QML Reference
+
+\tableofcontents
+
+QML is a declarative language designed to describe the user interface of a
+program: both what it looks like, and how it behaves. In QML, a user
+interface is specified as a tree of objects with properties.
+
+JavaScript is used as a scripting language in QML, so you may want
+to learn a bit more about it (\l{Javascript Guide}) before diving
+deeper into QML.
+
+\section1 Basic QML Syntax
+
+QML looks like this:
+
+\code
+import QtQuick 1.0
+
+Rectangle {
+ width: 200
+ height: 200
+ color: "blue"
+
+ Image {
+ source: "pics/logo.png"
+ anchors.centerIn: parent
+ }
+}
+\endcode
+
+Objects are specified by their type, followed by a pair of braces. Object
+types always begin with a capital letter. In the above example, there are
+two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify
+information about the object, such as its properties.
+
+Properties are specified as \c {propertyname: value}. In the above example, we
+can see the Image has a property named \c source, which has been assigned the
+value \c "pics/logo.png". The property and its value are separated by a colon.
+
+Properties can be specified one-per-line:
+
+\code
+Rectangle {
+ width: 100
+ height: 100
+}
+\endcode
+
+or you can put multiple properties on a single line:
+
+\code
+Rectangle { width: 100; height: 100 }
+\endcode
+
+When multiple property/value pairs are specified on a single line, they
+must be separated by a semicolon.
+
+The \c import statement imports the \c Qt \l{QML Modules}{module}, which contains all of the
+standard \l {QML Elements}. Without this import statement, the \l Rectangle
+and \l Image elements would not be available.
+
+\section1 Expressions
+
+In addition to assigning values to properties, you can also assign
+expressions written in JavaScript.
+
+\code
+Rotation {
+ angle: 360 * 3
+}
+\endcode
+
+These expressions can include references to other objects and properties, in which case
+a \e binding is established: when the value of the expression changes, the property the
+expression has been assigned to is automatically updated to that value.
+
+\code
+Item {
+ Text {
+ id: text1
+ text: "Hello World"
+ }
+ Text {
+ id: text2
+ text: text1.text
+ }
+}
+\endcode
+
+In the example above, the \c text2 object will display the same text as \c text1. If \c text1 is changed,
+\c text2 is automatically changed to the same value.
+
+Note that to refer to other objects, we use their \e id values. (See below for more
+information on the \e id property.)
+
+\section1 QML Comments
+
+Commenting in QML is similar to JavaScript.
+\list
+\o Single line comments start with // and finish at the end of the line.
+\o Multiline comments start with /* and finish with *\/
+\endlist
+
+\snippet doc/src/snippets/declarative/comments.qml 0
+
+Comments are ignored by the engine. They are useful for explaining what you
+are doing; for referring back to at a later date, or for others reading
+your QML files.
+
+Comments can also be used to prevent the execution of code, which is
+sometimes useful for tracking down problems.
+
+\code
+Text {
+ text: "Hello world!"
+ //opacity: 0.5
+}
+\endcode
+
+In the above example, the Text object will have normal opacity, since the
+line opacity: 0.5 has been turned into a comment.
+
+*/
diff --git a/doc/src/declarative/qmltexthandling.qdoc b/doc/src/declarative/qmltexthandling.qdoc
new file mode 100644
index 0000000..7906193
--- /dev/null
+++ b/doc/src/declarative/qmltexthandling.qdoc
@@ -0,0 +1,76 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page texthandling.html
+\title QML Text Handling and Validators
+\ingroup QML Features
+\previouspage {QML Mouse Events}{Mouse Events}
+\nextpage {Keyboard Focus in QML}{Keyboard Focus}
+\contentspage QML Features
+
+\tableofcontents
+
+\section1 Text Elements
+
+\list
+\o \l{Text}
+\o \l{TextInput}
+\o \l{TextEdit}
+\endlist
+
+\section1 Validators
+\list
+\o \l{IntValidator}
+\o \l{DoubleValidator}
+\o \l{RegExpValidator}
+\endlist
+
+\section1 Displaying Text in QML
+QML provides several elements to display text onto the screen. The \l Text
+element will display formatted text onto the screen, the \l TextEdit element
+will place a multiline line edit onto the screen, and the \l TextInput will
+place a single editable line field onto the screen.
+
+To learn more about their specific features and properties, visit their
+respective element documentation.
+
+\section1 Validating Input Text
+The \l {Validators}{validator} elements enforce the type and format of
+\l TextInput objects.
+
+\snippet doc/src/snippets/declarative/texthandling.qml int validator
+The validator elements bind to \c {TextInput}'s \c validator property.
+
+\snippet doc/src/snippets/declarative/texthandling.qml regexp validator
+The regular expression in the snippet will only allow the inputted text to be
+\c {fruit basket}.
+
+Note that QML parses JavaScript regular expressions, while Qt's
+\l {QRegExp} class' regular expressions are based on Perl regular expressions.
+
+*/
diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc
index 585b402..2e3cdc7 100644
--- a/doc/src/declarative/qmlviewer.qdoc
+++ b/doc/src/declarative/qmlviewer.qdoc
@@ -31,34 +31,34 @@
\title QML Viewer
\ingroup qttools
-The Declarative UI package includes \QQV, a tool for loading QML documents that
-makes it easy to quickly develop and debug QML applications. It invokes the QML
-runtime to load QML documents and also includes additional features useful for
+The Declarative UI package includes \QQV, a tool for loading QML documents that
+makes it easy to quickly develop and debug QML applications. It invokes the QML
+runtime to load QML documents and also includes additional features useful for
the development of QML-based applications.
-The QML Viewer is a tool for testing and developing QML applications. It is
-\e not intended for use in a production environment and should not be used for the
+The QML Viewer is a tool for testing and developing QML applications. It is
+\e not intended for use in a production environment and should not be used for the
deployment of QML applications. In those cases, the QML runtime should be invoked
from a Qt application instead; see \l {Qt Declarative UI Runtime} for more
information.
The viewer is located at \c QTDIR/bin/qmlviewer. To load a \c .qml file
-with the viewer, run the viewer and select the file to be opened, or provide the
+with the viewer, run the viewer and select the file to be opened, or provide the
file path on the command line:
\code
qmlviewer myqmlfile.qml
\endcode
-
+
On Mac OS X, the QML Viewer application is named "QMLViewer" instead. You
-can launch the viewer by opening the QMLViewer application from the Finder, or
+can launch the viewer by opening the QMLViewer application from the Finder, or
from the command line:
\code
QMLViewer.app/Contents/MacOS/QMLViewer myqmlfile.qml
\endcode
-The QML Viewer has a number of configuration options involving features such as
+The QML Viewer has a number of configuration options involving features such as
fullscreen display, module import path configurations, video recording of QML
animations, and OpenGL support.
@@ -68,7 +68,7 @@ To see the configuration options, run \c qmlviewer with the \c -help argument.
\section1 Adding module import paths
Additional module import paths can be provided using the \c -I flag.
-For example, the \l{declarative/cppextensions/plugins}{QML plugins example} creates
+For example, the \l{declarative/cppextensions/plugins}{QML plugins example} creates
a C++ plugin identified as \c com.nokia.TimeExample. Since this has a namespaced
identifier, the viewer has to be run with the \c -I flag from the example's
base directory:
@@ -87,16 +87,16 @@ the path is explicitly added.
\section1 Loading translation files
-When the QML Viewer loads a QML file, it installs a translation file from a
-"i18n" subdirectory relative to that initial file. This directory should contain
+When the QML Viewer loads a QML file, it installs a translation file from a
+"i18n" subdirectory relative to that initial file. This directory should contain
translation files named "qml_<language>.qm", where <language> is a two-letter
ISO 639 language, such as "qml_fr.qm", optionally followed by an underscore and
an uppercase two-letter ISO 3166 country code, such as "qml_fr_FR.qm" or
-"qml_fr_CA.qm".
+"qml_fr_CA.qm".
Such files can be created using \l {Qt Linguist}.
-The actual translation file that is loaded depends on the system locale.
+The actual translation file that is loaded depends on the system locale.
Additionally, the viewer will load any translation files specified on the command
line via the \c -translation option.
@@ -110,7 +110,7 @@ shows how JavaScript code in QML files can be made to use translatable strings.
Often, QML applications are prototyped with fake data that is later replaced
by real data sources from C++ plugins. QML Viewer assists in this aspect by
loading fake data into the application context: it looks for a directory named
-"dummydata" in the same directory as the target QML file, and any \c .qml
+"dummydata" in the same directory as the target QML file, and any \c .qml
files in that directory are loaded as QML objects and bound to the root context
as properties named after the files.
@@ -124,7 +124,7 @@ ListView {
width: 200; height: 300
model: lottoNumbers
delegate: Text { text: number }
-}
+}
\endqml
If within the document's directory, there is a "dummydata" directory which
@@ -146,30 +146,30 @@ Child properties are included when loaded from dummy data. The following documen
refers to a \c clock.time property:
\qml
-import QtQuick 1.0
+import QtQuick 1.0
Text { text: clock.time }
\endqml
-
+
The text value could be filled by a \c dummydata/clock.qml file with a \c time
property in the root context:
\qml
-import QtQuick 1.0
+import QtQuick 1.0
QtObject { property int time: 54321 }
\endqml
To replace this with real data, you can simply bind the real data object to
the root context in C++ using QDeclarativeContext::setContextProperty(). This
-is detailed in \l {Using QML in C++ Applications}.
+is detailed in \l {Using QML Bindings in C++ Applications}.
\section1 Using the \c runtime object
QML applications that are loaded with the QML Viewer have access to a special
-\c runtime property on the root context. This property provides additional
+\c runtime property on the root context. This property provides additional
information about the application's runtime environment through the following properties:
\table
-\row
+\row
\o \c runtime.isActiveWindow
@@ -177,9 +177,9 @@ information about the application's runtime environment through the following pr
window on the system. It is useful for "pausing" an application, particularly
animations, when the QML Viewer loses focus or moves to the background.
-For example, the following animation is only played when the QML Viewer is
+For example, the following animation is only played when the QML Viewer is
the active window:
-
+
\qml
Rectangle {
width: 200; height: 200
@@ -200,9 +200,9 @@ through the \c active property of the \l {QML:Qt::application}{Qt.application} o
\o \c runtime.orientation
\o This property indicates the current orientation of the QML Viewer. On the
-N900 platform and most S60 5.0-based or newer Symbian devices, this property
-automatically updates to reflect the device's actual orientation; on other platforms,
-this indicates the orientation currently selected in the QML Viewer's
+N900 platform and most S60 5.0-based or newer Symbian devices, this property
+automatically updates to reflect the device's actual orientation; on other platforms,
+this indicates the orientation currently selected in the QML Viewer's
\e {Settings -> Properties} menu. The \c orientation value can be one of the following:
\list
@@ -213,7 +213,7 @@ this indicates the orientation currently selected in the QML Viewer's
\endlist
When the viewer's orientation changes, the appearance of the loaded QML document
-does not change unless it has been set to respond to changes in
+does not change unless it has been set to respond to changes in
\c runtime.orientation. For example, the following Rectangle changes its
aspect ratio depending on the orientation of the QML Viewer:
@@ -221,12 +221,12 @@ aspect ratio depending on the orientation of the QML Viewer:
Rectangle {
id: window
width: 640; height: 480
-
+
states: State {
name: "landscape"
PropertyChanges { target: window; width: 480; height: 640 }
}
- state: (runtime.orientation == Orientation.Landscape
+ state: (runtime.orientation == Orientation.Landscape
|| runtime.orientation == Orientation.LandscapeInverted) ? 'landscape' : ''
}
\endqml
diff --git a/doc/src/declarative/qmlviews.qdoc b/doc/src/declarative/qmlviews.qdoc
new file mode 100644
index 0000000..53ce4b9
--- /dev/null
+++ b/doc/src/declarative/qmlviews.qdoc
@@ -0,0 +1,114 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-views.html
+\ingroup qml-features
+\contentspage QML Features
+\previouspage {QML Data Models}{Structuring Data with Models}
+\nextpage {Extending QML Functionalities using C++}
+\title Presenting Data with Views
+
+Views are containers for collections of items. They are feature-rich and can be
+customizable to meet style or behavior requirements.
+
+\keyword qml-view-elements
+A set of standard views are provided in the basic set of Qt Quick
+graphical elements:
+
+\list
+\o \l{ListView} arranges items in a horizontal or vertical list
+\o \l{GridView} arranges items in a grid within the available space
+\o \l{PathView} arranges items on a path
+\o \l{WebView}{WebView} - available from the \l {QtWebKit QML Module}.
+\endlist
+Unlike other views, \l WebView is not a fully-featured view item, and needs
+to be combined with a \l Flickable item to create a view that performs like
+a Web browser.
+
+These elements have properties and behaviors exclusive to each element. Visit
+their respective documentation for more information.
+
+\section1 Models
+
+Views display \l{qml-data-models}{models} onto the screen. A model could be a simple list of \l{QML Data Models#An Integer}{integer} or a \l{qml-c++-models}{C++ model}.
+
+To assign a model to a view, bind the view's \c model property to a model.
+\snippet doc/src/snippets/declarative/listview.qml model
+\snippet doc/src/snippets/declarative/listview.qml model
+
+For more information, consult the \l {QML Data Models} article.
+
+\keyword qml-view-delegate
+\section1 View Delegates
+
+Views need a \e delegate to visually represent an item in a list. A view will
+visualize each item list according to the template defined by the delegate.
+Items in a model are accessible through the \c index property as well as the
+item's properties.
+\snippet doc/src/snippets/declarative/listview.qml delegate
+\image listview-setup.png
+
+\section1 Decorating Views
+
+Views allow visual customization through \e decoration properties such as the \c header, \c footer, and \c section properties. By binding an object, usually
+another visual object, to these properties, the views are decoratable. A footer
+may include a \l Rectangle element showcasing borders or a header that displays
+a logo on top of the list.
+
+Suppose that a specific club wants to decorate its members list with its brand
+colors. A member list is in a \c model and the \c delegate will display the
+model's content.
+\snippet doc/src/snippets/declarative/listview-decorations.qml model
+\snippet doc/src/snippets/declarative/listview-decorations.qml delegate
+
+The club may decorate the members list by binding visual objects to the
+\c header and \c footer properties. The visual object may be defined inline, in another file, or in a
+\l {Component} element.
+\snippet doc/src/snippets/declarative/listview-decorations.qml decorations
+\image listview-decorations.png
+
+\section1 ListView Sections
+
+\l {ListView} contents may be grouped into \e sections, where related list items
+are labeled according to their sections. Further, the sections may be decorated
+with \l{qml-view-delegate}{delegates}.
+
+A list may contain a list indicating people's names and the team on which team
+the person belongs.
+\snippet doc/src/snippets/declarative/listview-sections.qml model
+\snippet doc/src/snippets/declarative/listview-sections.qml delegate
+
+The ListView element has the \c section
+\l{Property Binding#Attached Properties}{attached property} that can combine
+adjacent and related elements into a section. The section's \c property
+property is for selecting which list element property to use as sections.
+The \c criteria can dictate how the section names are displayed and the
+\c delegate is similar to the views' \l {qml-view-delegate}{delegate} property.
+\snippet doc/src/snippets/declarative/listview-sections.qml section
+\image listview-section.png
+*/
diff --git a/doc/src/declarative/qmlwebkit.qdoc b/doc/src/declarative/qmlwebkit.qdoc
new file mode 100644
index 0000000..840f24d
--- /dev/null
+++ b/doc/src/declarative/qmlwebkit.qdoc
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qmlwebkit.html
+
+\title QtWebKit QML Module
+
+Qt WebKit QML
+
+\section1 WebKit QML Elements
+\list
+\o \l WebView
+\endlist
+
+\section1 QtWebKit Module
+The QtWebKit Module has a QML element, \l{WebView} for displaying web content
+from a \c URL.
+
+Import the QtWebKit module before declaring a \c WebView element:
+\snippet doc/src/snippets/declarative/webview/webview.qml import
+
+\section1 Simple Usage
+\snippet doc/src/snippets/declarative/webview/webview.qml document
+\image webview.png
+
+\sa {Models and Views: WebView Example}{WebView Example}, {QML Web Browser}
+*/
diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc
index 03290aa..d11825e 100644
--- a/doc/src/declarative/qtbinding.qdoc
+++ b/doc/src/declarative/qtbinding.qdoc
@@ -27,10 +27,13 @@
/*!
\page qtbinding.html
-\target qtbinding
-\title Using QML in C++ Applications
+\ingroup qml-features
+\previouspage {Extending QML Functionalities using C++}
+\nextpage {Integrating QML Code with Existing Qt UI Code}
+\contentspage QML Features
+\title Using QML Bindings in C++ Applications
-QML is designed to be easily extensible from C++. The classes in the
+QML is designed to be easily extensible to and from C++. The classes in the
Qt Declarative module allow QML components to be loaded and manipulated from C++, and through
Qt's \l{The Meta-Object System}{meta-object system}, QML and C++ objects can easily
communicate through Qt signals and slots. In addition, QML plugins can be written to create
@@ -85,7 +88,7 @@ delete rectangleInstance;
QML documents can also be loaded using QDeclarativeView. This class provides a convenient
QWidget-based view for embedding QML components into QGraphicsView-based applications. (For other
-methods of integrating QML into QWidget-based applications, see \l {Integrating QML with existing Qt
+methods of integrating QML into QWidget-based applications, see \l {Integrating QML Code with existing Qt
UI code}.)
@@ -262,8 +265,8 @@ Note that custom C++ types do not have to inherit from QDeclarativeItem; this is
a displayable item. If the item is not displayable, it can simply inherit from QObject.
For more information on defining new QML elements, see the \l {Tutorial: Writing QML extensions with C++}
-{Writing QML extensions with C++} tutorial and the \l {Extending QML in C++} reference
-documentation.
+{Writing QML extensions with C++} tutorial and the
+\l {Extending QML Functionalities using C++} reference documentation.
@@ -496,7 +499,8 @@ can be registered using qmlRegisterUncreatableType(). To be accessible from QML
must begin with a capital letter.
See the \l {Tutorial: Writing QML extensions with C++}{Writing QML extensions with C++} tutorial and
-the \l {Extending QML in C++} reference documentation for more information.
+the \l {Extending QML Functionalities using C++} reference documentation for
+more information.
\section2 Automatic type conversion from strings
diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc
index b7d09a1..e48dc9a 100644
--- a/doc/src/declarative/qtprogrammers.qdoc
+++ b/doc/src/declarative/qtprogrammers.qdoc
@@ -30,8 +30,6 @@
\target qtprogrammers
\title QML for Qt Programmers
-\section1 Overview
-
While QML does not require Qt knowledge to use, if you \e are already familiar with Qt,
much of your knowledge is directly relevant to learning and using QML. Of course,
an application with a UI defined in QML also uses Qt for all the non-UI logic.
@@ -48,7 +46,8 @@ QML provides direct access to the following concepts from Qt:
\o Qt models - used directly in data binding (QAbstractItemModel)
\endlist
-Qt knowledge is \e required for \l {Extending QML in C++}, and also for \l{Integrating QML with existing Qt UI code}.
+Qt knowledge is \e required for \l {Extending QML Functionalities using C++},
+and also for \l{Integrating QML Code with existing Qt UI code}.
\section1 QML Items compared with QWidgets
diff --git a/doc/src/declarative/qtquick-intro.qdoc b/doc/src/declarative/qtquick-intro.qdoc
new file mode 100644
index 0000000..75236e6
--- /dev/null
+++ b/doc/src/declarative/qtquick-intro.qdoc
@@ -0,0 +1,124 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-intro.html
+\title Intro to Qt Quick
+
+Qt Quick is a collection of technologies that are designed to help developers
+create the kind of intuitive, modern, and fluid user interfaces that are
+increasingly used on mobile phones, media players, set-top boxes, and other
+portable devices. Qt Quick consists of a rich set of user interface
+\l{QML Elements}{elements}, a \l{QML Syntax}{declarative} language for
+describing user interfaces, and a language \l{QtDeclarative Module}{runtime}. A
+collection of C++ APIs is used to integrate these high level features with
+classic Qt applications. Version 2.1 of the Qt Creator integrated development
+environment (IDE) introduces tools for developing Qt Quick applications.
+
+\image qml-clocks-example.png
+
+\section1 The QML Language
+
+QML is a high level, scripted language. Its commands, more correctly
+\e elements, leverage the power and efficiency of the Qt libraries to make easy
+to use commands that perform intuitive functions. Drawing a rectangle,
+displaying an image, and application events -- all are possible with declarative
+programming.
+
+The language also allows more flexibility of these commands by using
+\l{About JavaScript}{JavaScript} to implement the high level user interface
+logic.
+
+A QML element usually has various \e properties that help define the element.
+For example, if we created an element called Circle then the radius of the
+circle would be a property. Building user interfaces by importing these elements
+is one of the great feature of QML and Qt Quick.
+\image qml-texteditor5_newfile.png
+
+\section1 QtDeclarative Module
+
+To make Qt Quick possible, Qt introduces the \l {QtDeclarative} module. The
+module creates a JavaScript runtime that QML runs under with a Qt based backend.
+Because QtDeclarative and QML are built upon Qt, they inherit many of Qt's
+technology, namely the \l{Signals and Slots}{signals and slots} mechanism and
+the \l{The Meta-Object System}{meta-object} system. Data created using C++ are
+directly accessible from QML and QML objects are also accessible from C++ code.
+
+In conjunction with the QML language, the QtDeclarative module separates the
+interface logic in QML from the application logic in C++.
+
+\section1 Creator Tools
+
+Qt Creator is a complete integrated development environment (IDE) for creating
+applications with Qt Quick and the Qt application framework.
+
+\image qmldesigner-visual-editor.png
+
+The main goal for Qt Creator is meeting the development needs of Qt Quick
+developers who are looking for simplicity, usability, productivity,
+extendibility and openness, while aiming to lower the barrier of entry for
+newcomers to Qt Quick and Qt. The key features of Qt Creator allow UI designers
+and developers to accomplish the following tasks:
+\list
+\o Get started with Qt Quick application development quickly and easily with
+examples, tutorials, and project wizards.
+\o Design application user interface with the integrated editor, Qt Quick
+Designer, or use graphics software to design the user interface and use scripts
+to export the design to Qt Quick Designer.
+\o Develop applications with the advanced code editor that provides new powerful
+features for completing code snippets, refactoring code, and viewing the element
+hierarchy of QML files.
+\o Build and deploy Qt Quick applications that target multiple desktop and
+mobile platforms, such as Microsoft Windows, Mac OS X, Linux, Symbian, and
+Maemo.
+\o Debug JavaScript functions and execute JavaScript expressions in the current
+context, and inspect QML at runtime to explore the object structure, debug
+animations, and inspect colors.
+\o Deploy applications to mobile devices and create application installation
+packages for Symbian and Maemo devices that can be published in the Ovi Store
+and other channels.
+\o Easily access information with the integrated context-sensitive Qt Help
+system.
+\endlist
+
+\image qtcreator-target-selector.png
+
+\section1 Where to Go from Here
+
+The \l {Qt Quick} page has links to various Qt Quick topics such as QML
+features, addons, and tools.
+
+The \l {QML Examples and Demos} page has a gallery of QML applications.
+
+\section1 License Information
+\list
+\o \l{Qt Quick Licensing Information}
+\endlist
+*/
+
+
+
diff --git a/doc/src/declarative/scope.qdoc b/doc/src/declarative/scope.qdoc
index 3317037..9a9934a 100644
--- a/doc/src/declarative/scope.qdoc
+++ b/doc/src/declarative/scope.qdoc
@@ -24,41 +24,17 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-/*
-
-
-
-and requires extension to
-fit naturally with QML.
-
-
-JavaScript has only b
-JavaScript has a very simple built in scope is very simple
-
-script, and the precede d
-
-and \l {Integrating JavaScript}{JavaScript} are executed in a scope chain
-automatically established by QML when a component instance is constructed. QML is a \e {dynamically scoped}
-language. Different object instances instantiated from the same component can exist in
-different scope chains.
-
-\image qml-scope.png
-
-
-*/
-
/*!
\page qdeclarativescope.html
\title QML Scope
\tableofcontents
-QML property bindings, inline functions and imported JavaScript files all
-run in a JavaScript scope. Scope controls which variables an expression can
+QML property bindings, inline functions and imported JavaScript files all
+run in a JavaScript scope. Scope controls which variables an expression can
access, and which variable takes precedence when two or more names conflict.
-As JavaScript's built-in scope mechanism is very simple, QML enhances it to fit
+As JavaScript's built-in scope mechanism is very simple, QML enhances it to fit
more naturally with the QML language extensions.
\section1 JavaScript Scope
@@ -67,8 +43,8 @@ QML's scope extensions do not interfere with JavaScript's natural scoping.
JavaScript programmers can reuse their existing knowledge when programming
functions, property bindings or imported JavaScript files in QML.
-In the following example, the \c {addConstant()} method will add 13 to the
-parameter passed just as the programmer would expect irrespective of the
+In the following example, the \c {addConstant()} method will add 13 to the
+parameter passed just as the programmer would expect irrespective of the
value of the QML object's \c a and \c b properties.
\code
@@ -83,8 +59,8 @@ QtObject {
}
\endcode
-That QML respects JavaScript's normal scoping rules even applies in bindings.
-This totally evil, abomination of a binding will assign 12 to the QML object's
+That QML respects JavaScript's normal scoping rules even applies in bindings.
+This totally evil, abomination of a binding will assign 12 to the QML object's
\c a property.
\code
@@ -101,13 +77,13 @@ with local variables declared in another.
\section1 Element Names and Imported JavaScript Files
-\l {QML Document}s include import statements that define the element names
-and JavaScript files visible to the document. In addition to their use in the
-QML declaration itself, element names are used by JavaScript code when accessing
-\l {Attached Properties} and enumeration values.
+\l {QML Document}s include import statements that define the element names
+and JavaScript files visible to the document. In addition to their use in the
+QML declaration itself, element names are used by JavaScript code when accessing
+\l {Attached Properties} and enumeration values.
-The effect of an import applies to every property binding, and JavaScript
-function in the QML document, even those in nested inline components. The
+The effect of an import applies to every property binding, and JavaScript
+function in the QML document, even those in nested inline components. The
following example shows a simple QML file that accesses some enumeration
values and calls an imported JavaScript function.
@@ -130,10 +106,10 @@ ListView {
\section1 Binding Scope Object
-Property bindings are the most common use of JavaScript in QML. Property
+Property bindings are the most common use of JavaScript in QML. Property
bindings associate the result of a JavaScript expression with a property of an
-object. The object to which the bound property belongs is known as the binding's
-scope object. In this QML simple declaration the \l Item object is the
+object. The object to which the bound property belongs is known as the binding's
+scope object. In this QML simple declaration the \l Item object is the
binding's scope object.
\code
@@ -144,21 +120,21 @@ Item {
Bindings have access to the scope object's properties without qualification.
In the previous example, the binding accesses the \l Item's \c parent property
-directly, without needing any form of object prefix. QML introduces a more
-structured, object-oriented approach to JavaScript, and consequently does not
+directly, without needing any form of object prefix. QML introduces a more
+structured, object-oriented approach to JavaScript, and consequently does not
require the use of the JavaScript \c this property.
Care must be used when accessing \l {Attached Properties} from bindings due
to their interaction with the scope object. Conceptually attached properties
exist on \e all objects, even if they only have an effect on a subset of those.
-Consequently unqualified attached property reads will always resolve to an
-attached property on the scope object, which is not always what the programmer
+Consequently unqualified attached property reads will always resolve to an
+attached property on the scope object, which is not always what the programmer
intended.
-For example, the \l PathView element attaches interpolated value properties to
+For example, the \l PathView element attaches interpolated value properties to
its delegates depending on their position in the path. As PathView only
-meaningfully attaches these properties to the root element in the delegate, any
-sub-element that accesses them must explicitly qualify the root object, as shown
+meaningfully attaches these properties to the root element in the delegate, any
+sub-element that accesses them must explicitly qualify the root object, as shown
below.
\code
@@ -181,7 +157,7 @@ the unset \c {PathView.scale} attached property on itself.
Each QML component in a QML document defines a logical scope. Each document
has at least one root component, but can also have other inline sub-components.
-The component scope is the union of the object ids within the component and the
+The component scope is the union of the object ids within the component and the
component's root element's properties.
\code
@@ -195,7 +171,7 @@ Item {
anchors.top: parent.top
}
- Text {
+ Text {
text: titleElement.text
font.pixelSize: 18
anchors.bottom: parent.bottom
@@ -203,7 +179,7 @@ Item {
}
\endcode
-The example above shows a simple QML component that displays a rich text title
+The example above shows a simple QML component that displays a rich text title
string at the top, and a smaller copy of the same text at the bottom. The first
\c Text element directly accesses the component's \c title property when
forming the text to display. That the root element's properties are directly
@@ -211,18 +187,18 @@ accessible makes it trivial to distribute data throughout the component.
The second \c Text element uses an id to access the first's text directly. IDs
are specified explicitly by the QML programmer so they always take precedence
-over other property names (except for those in the \l {JavaScript Scope}). For
-example, in the unlikely event that the binding's \l {Binding Scope Object}{scope
-object} had a \c titleElement property in the previous example, the \c titleElement
+over other property names (except for those in the \l {JavaScript Scope}). For
+example, in the unlikely event that the binding's \l {Binding Scope Object}{scope
+object} had a \c titleElement property in the previous example, the \c titleElement
id would still take precedence.
\section1 Component Instance Hierarchy
-In QML, component instances connect their component scopes together to form a
-scope hierarchy. Component instances can directly access the component scopes of
+In QML, component instances connect their component scopes together to form a
+scope hierarchy. Component instances can directly access the component scopes of
their ancestors.
-The easiest way to demonstrate this is with inline sub-components whose component
+The easiest way to demonstrate this is with inline sub-components whose component
scopes are implicitly scoped as children of the outer component.
\code
@@ -239,16 +215,16 @@ Item {
}
\endcode
-The component instance hierarchy allows instances of the delegate component
+The component instance hierarchy allows instances of the delegate component
to access the \c defaultColor property of the \c Item element. Of course,
-had the delegate component had a property called \c defaultColor that would
-have taken precedence.
+had the delegate component had a property called \c defaultColor that would
+have taken precedence.
The component instance scope hierarchy extends to out-of-line components, too.
-In the following example, the \c TitlePage.qml component creates two
-\c TitleText instances. Even though the \c TitleText element is in a separate
-file, it still has access to the \c title property when it is used from within
-the \c TitlePage. QML is a dynamically scoped language - depending on where it
+In the following example, the \c TitlePage.qml component creates two
+\c TitleText instances. Even though the \c TitleText element is in a separate
+file, it still has access to the \c title property when it is used from within
+the \c TitlePage. QML is a dynamically scoped language - depending on where it
is used, the \c title property may resolve differently.
\code
@@ -256,13 +232,13 @@ is used, the \c title property may resolve differently.
import QtQuick 1.0
Item {
property string title
-
- TitleText {
+
+ TitleText {
size: 22
anchors.top: parent.top
}
- TitleText {
+ TitleText {
size: 18
anchors.bottom: parent.bottom
}
@@ -277,10 +253,10 @@ Text {
}
\endcode
-Dynamic scoping is very powerful, but it must be used cautiously to prevent
+Dynamic scoping is very powerful, but it must be used cautiously to prevent
the behavior of QML code from becoming difficult to predict. In general it
-should only be used in cases where the two components are already tightly
-coupled in another way. When building reusable components, it is preferable
+should only be used in cases where the two components are already tightly
+coupled in another way. When building reusable components, it is preferable
to use property interfaces, like this:
\code
@@ -289,14 +265,14 @@ import QtQuick 1.0
Item {
id: root
property string title
-
- TitleText {
+
+ TitleText {
title: root.title
size: 22
anchors.top: parent.top
}
- TitleText {
+ TitleText {
title: root.title
size: 18
anchors.bottom: parent.bottom
@@ -322,7 +298,7 @@ QML specific tasks a little easier. These extensions are described in the
\l {QML Global Object} documentation.
QML disallows element, id and property names that conflict with the properties
-on the global object to prevent any confusion. Programmers can be confident
+on the global object to prevent any confusion. Programmers can be confident
that \c Math.min(10, 9) will always work as expected!
*/
diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc
index 1ee5e61..dc08ba0 100644
--- a/doc/src/declarative/tutorial.qdoc
+++ b/doc/src/declarative/tutorial.qdoc
@@ -144,7 +144,7 @@ An \l Item is the most basic visual element in QML and is often used as a contai
We declare a \c cellColor property. This property is accessible from \e outside our component, this allows us
to instantiate the cells with different colors.
-This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{Adding Properties}).
+This property is just an alias to an existing property - the color of the rectangle that compose the cell (see \l{Property Binding}).
\snippet examples/declarative/tutorials/helloworld/Cell.qml 5
diff --git a/doc/src/deployment/deployment-plugins.qdoc b/doc/src/deployment/deployment-plugins.qdoc
index 12a3b0c..03685e5 100644
--- a/doc/src/deployment/deployment-plugins.qdoc
+++ b/doc/src/deployment/deployment-plugins.qdoc
@@ -104,7 +104,7 @@
plugins to be built in release mode, add the following line to the plugin's
project file:
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.pro 3
This will ensure that the plugin is compatible with the version of the library
used in the application.
diff --git a/doc/src/deployment/deployment.qdoc b/doc/src/deployment/deployment.qdoc
index bc80ed3..50f873f 100644
--- a/doc/src/deployment/deployment.qdoc
+++ b/doc/src/deployment/deployment.qdoc
@@ -336,7 +336,7 @@
are many ways to solve this:
\list
-
+
\o You can install the Qt libraries in one of the system
library paths (e.g. \c /usr/lib on most systems).
@@ -345,7 +345,7 @@
linker to look in this directory when starting your application.
\o You can write a startup script for your application, where you
- modify the dynamic linker configuration (e.g. adding your
+ modify the dynamic linker configuration (e.g., adding your
application's directory to the \c LD_LIBRARY_PATH environment
variable. \note If your application will be running with "Set
user ID on execution," and if it will be owned by root, then
@@ -375,7 +375,7 @@
\c plugins directory, or you can set the \c DESTDIR in the
plugins' project files:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 8
An archive distributing all the Qt libraries, and all the plugins,
required to run the \l {tools/plugandpaint}{Plug & Paint}
@@ -422,7 +422,7 @@
application using QApplication::addLibraryPath() or
QApplication::setLibraryPaths().
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_deployment.cpp 9
\section1 Application Dependencies
@@ -718,7 +718,7 @@
using QApplication::addLibraryPath() or
QApplication::setLibraryPaths().
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_deployment.cpp 19
One benefit of using plugins is that they can easily be made
available to a whole family of applications.
@@ -753,7 +753,7 @@
To use the options, add
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 21
to your .pro file. The \c embed_manifest_dll option is enabled by default.
The \c embed_manifest_exe option is NOT enabled by default.
@@ -965,7 +965,7 @@
command line application on Unix and Windows. You probably don't
want to run it in a bundle: Add this to your application's .pro:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 26
This will tell \c qmake not to put the executable inside a
bundle. Please refer to the \l{Deploying an Application on
@@ -1249,7 +1249,7 @@
to look for the new plugins. After constructing the
QApplication, we add the following code:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 49
+ \snippet doc/src/snippets/code/doc_src_deployment.cpp 49
First, we tell the application to only look for plugins in this
directory. In our case, this is what we want since we only want to
@@ -1366,7 +1366,7 @@
variable to get \e{weak linking} to work for your application. You
can add:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 51
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 51
to your .pro file, and qmake will take care of this for you.
@@ -1416,7 +1416,7 @@
add both to the \c CONFIG line. PowerPC users also need an
SDK. For example:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 53
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 53
Besides \c lipo, you can also check your binaries with the \c file(1)
command line tool or the Finder.
@@ -1513,12 +1513,12 @@
First, we will change the vendor statement to something more meaningful. The application
vendor is visible to end-user during the installation.
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 56
Second we will tell the Symbian application installer that this application supports
only S60 5.0 based devices:
- \snippet doc/src/snippets/code/doc_src_deployment.qdoc 57
+ \snippet doc/src/snippets/code/doc_src_deployment.pro 57
You can find a list of platform and device indentification codes from
\l {http://wiki.forum.nokia.com/index.php/S60_Platform_and_device_identification_codes}{Forum Nokia Wiki}.
diff --git a/doc/src/development/activeqt-dumpcpp.qdoc b/doc/src/development/activeqt-dumpcpp.qdoc
index 504b3b4..54581e1 100644
--- a/doc/src/development/activeqt-dumpcpp.qdoc
+++ b/doc/src/development/activeqt-dumpcpp.qdoc
@@ -83,24 +83,24 @@
as \c noncreatable) have a default constructor; this is typically a single class
of type \c Application.
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 0
All other classes can only be created by passing an IDispatch interface pointer
to the constructor; those classes should however not be created explicitly.
Instead, use the appropriate API of already created objects.
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 1
All coclass wrappers also have one constructors taking an interface wrapper class
for each interface implemented.
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 2
You have to create coclasses to be able to connect to signals of the subobject.
Note that the constructor deletes the interface object, so the following will
cause a segmentation fault:
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 3
If the return type is of a coclass or interface type declared in another type
library you have to include the namespace header for that other type library
@@ -115,7 +115,7 @@
In this case, create the correct wrapper class explicitly:
- \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp 4
You can of course use the IDispatch* returned directly, in which case you have to
call \c Release() when finished with the interface.
diff --git a/doc/src/development/debug.qdoc b/doc/src/development/debug.qdoc
index 044ad0d..1669b00 100644
--- a/doc/src/development/debug.qdoc
+++ b/doc/src/development/debug.qdoc
@@ -142,7 +142,7 @@
If you include the <QtDebug> header file, the \c qDebug() function
can also be used as an output stream. For example:
- \snippet doc/src/snippets/code/doc_src_debug.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_debug.cpp 0
The Qt implementation of these functions prints the text to the
\c stderr output under Unix/X11 and Mac OS X. With Windows, if it
@@ -199,14 +199,14 @@
These macros are useful for detecting program errors, e.g. like this:
- \snippet doc/src/snippets/code/doc_src_debug.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_debug.cpp 1
Q_ASSERT(), Q_ASSERT_X(), and Q_CHECK_PTR() expand to nothing if
\c QT_NO_DEBUG is defined during compilation. For this reason,
the arguments to these macro should not have any side-effects.
Here is an incorrect usage of Q_CHECK_PTR():
- \snippet doc/src/snippets/code/doc_src_debug.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_debug.cpp 2
If this code is compiled with \c QT_NO_DEBUG defined, the code in
the Q_CHECK_PTR() expression is not executed and \e alloc returns
diff --git a/doc/src/development/designer-manual.qdoc b/doc/src/development/designer-manual.qdoc
index 9a6220f..0f38c61 100644
--- a/doc/src/development/designer-manual.qdoc
+++ b/doc/src/development/designer-manual.qdoc
@@ -1385,17 +1385,13 @@
\target CreatingAMenu
- \raw HTML
- <div style="float: left; margin-right: 2em">
- \endraw
+ \div {class="float-left"}
\inlineimage designer-creating-menu1.png
\inlineimage designer-creating-menu2.png
\br
\inlineimage designer-creating-menu3.png
\inlineimage designer-creating-menu4.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Creating a Menu
@@ -1410,9 +1406,8 @@
\key Escape to reject it. You can undo the editing operation later if
required.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
Menus can also be rearranged in the menu bar simply by dragging and
dropping them in the preferred location. A vertical red line indicates the
@@ -1423,17 +1418,13 @@
navigating the menu structure in the usual way.
\target CreatingAMenuEntry
- \raw HTML
- <div style="float: right; margin-left: 2em">
- \endraw
+ \div {class="float-right"}
\inlineimage designer-creating-menu-entry1.png
\inlineimage designer-creating-menu-entry2.png
\br
\inlineimage designer-creating-menu-entry3.png
\inlineimage designer-creating-menu-entry4.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Creating a Menu Entry
@@ -1453,9 +1444,8 @@
be accessible via the \l{#TheActionEditor}{Action Editor}, and any
associated keyboard shortcut can be set there.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
Just like with menus, entries can be moved around simply by dragging and
dropping them in the preferred location. When an entry is dragged over a
@@ -1465,13 +1455,9 @@
\section1 Toolbars
- \raw HTML
- <div style="float: left; margin-right: 2em">
- \endraw
+ \div {class="float-left"}
\inlineimage designer-creating-toolbar.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Creating and Removing a Toolbar
@@ -1483,9 +1469,8 @@
Toolbars are removed from the form via an entry in the toolbar's context
menu.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
\section2 Adding and Removing Toolbar Buttons
@@ -1494,14 +1479,10 @@
Since actions can be represented by menu entries and toolbar buttons,
they can be moved between menus and toolbars.
- \raw HTML
- <div style="float: right; margin-left: 2em">
- \endraw
+ \div {class="float-right"}
\inlineimage designer-adding-toolbar-action.png
\inlineimage designer-removing-toolbar-action.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
To share an action between a menu and a toolbar, drag its icon from the
action editor to the toolbar rather than from the menu where its entry is
@@ -1510,9 +1491,8 @@
Toolbar buttons are removed via the toolbar's context menu.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
\section1 Actions
@@ -1521,13 +1501,9 @@
action editor window, simplifying the creation and management of actions.
\target TheActionEditor
- \raw HTML
- <div style="float: left; margin-right: 2em">
- \endraw
+ \div {class="float-left"}
\inlineimage designer-action-editor.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 The Action Editor
@@ -1543,9 +1519,8 @@
\gui{Detailed View}. You can also copy and paste actions between menus,
toolbars and forms.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
\section2 Creating an Action
@@ -1560,19 +1535,14 @@
Once the action is created, it can be used wherever actions are applicable.
- \raw HTML
- <div style="clear: left" />
- \endraw
+ \div {class="clear-left"}
+ \enddiv
\target AddingAnAction
- \raw HTML
- <div style="float: right; margin-left: 2em">
- \endraw
+ \div {class="float-right"}
\inlineimage designer-adding-menu-action.png
\inlineimage designer-adding-toolbar-action.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Adding an Action
@@ -1584,9 +1554,8 @@
will be added. Release the mouse button to add the action when you have
found the right spot.
- \raw HTML
- <div style="clear: right" />
- \endraw
+ \div {class="clear-right"}
+ \enddiv
\section1 Dock Widgets
@@ -1598,13 +1567,9 @@
\target AddingADockWidget
- \raw HTML
- <div style="float: left; margin-right: 2em">
- \endraw
+ \div {class="float-left"}
\inlineimage designer-adding-dockwidget.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
\section2 Adding a Dock Widget
@@ -1623,9 +1588,8 @@
\l{QDockWidget::}{windowTitle} property. This also helps to identify them on the
form.
- \raw HTML
- <div style="clear: both" />
- \endraw
+ \div {class="clear-both"}
+ \enddiv
*/
@@ -2044,7 +2008,7 @@ pixmap property in the property editor.
project file, ensuring that the application is compiled and linked
appropriately.
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_designer-manual.pro 0
The QUiLoader class provides a form loader object to construct the user
interface. This user interface can be retrieved from any QIODevice, e.g.,
@@ -2054,7 +2018,7 @@ pixmap property in the property editor.
The QtUiTools module classes can be included using the following directive:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 1
The QUiLoader::load() function is invoked as shown in this code from the
\l{Text Finder Example}{Text Finder} example:
@@ -2126,7 +2090,7 @@ pixmap property in the property editor.
\c setupUi() function to do this, so we only need to declare and
implement a slot with a name that follows a standard convention:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 2
Using this convention, we can define and implement a slot that responds to
mouse clicks on the \gui OK button:
@@ -2588,7 +2552,7 @@ pixmap property in the property editor.
plugins are also built in release mode. To do this, include the following
declaration in the plugin's \c{.pro} file:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_designer-manual.pro 3
If plugins are built in a mode that is incompatible with \QD, they will
not be loaded and installed. For more information about plugins, see the
@@ -2597,7 +2561,7 @@ pixmap property in the property editor.
It is also necessary to ensure that the plugin is installed together with
other \QD widget plugins:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_designer-manual.pro 4
The \c $[QT_INSTALL_PLUGINS] variable is a placeholder to the location of
the installed Qt plugins. You can configure \QD to look for plugins in
@@ -2756,7 +2720,7 @@ pixmap property in the property editor.
using the Q_INTERFACES() macro in the extension class's definition. For
example:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 7
This enables \QD to use the qobject_cast() function to query for supported
interfaces using a QObject pointer only.
@@ -2791,13 +2755,13 @@ pixmap property in the property editor.
You can either create a new QExtensionFactory and reimplement the
QExtensionFactory::createExtension() function:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 8
or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to enable the factory to
create your custom extension as well:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 9
\section2 Accessing Qt Designer's Extension Manager
@@ -2809,7 +2773,7 @@ pixmap property in the property editor.
an extension factory is typically made in the
QDesignerCustomWidgetInterface::initialize() function:
- \snippet doc/src/snippets/code/doc_src_designer-manual.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_designer-manual.cpp 10
The \c formEditor parameter in the
QDesignerCustomWidgetInterface::initialize() function is a pointer to \QD's
diff --git a/doc/src/development/moc.qdoc b/doc/src/development/moc.qdoc
index fc0165b..5d524b2 100644
--- a/doc/src/development/moc.qdoc
+++ b/doc/src/development/moc.qdoc
@@ -136,7 +136,7 @@
This guarantees that make will run the moc before it compiles
\c foo.cpp. You can then put
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 3
at the end of \c foo.cpp, where all the classes declared in that
file are fully known.
@@ -223,7 +223,7 @@
file. \c moc defines the preprocessor symbol \c Q_MOC_RUN. Any
code surrounded by
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 4
is skipped by the \c moc.
@@ -245,7 +245,7 @@
\c moc does not handle all of C++. The main problem is that class
templates cannot have signals or slots. Here is an example:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 5
Another limitation is that moc does not expand macros, so you
for example cannot use a macro to declare a signal/slot
@@ -261,7 +261,7 @@
first inherited class is a subclass of QObject. Also, be sure
that only the first inherited class is a QObject.
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 6
Virtual inheritance with QObject is \e not supported.
@@ -271,11 +271,11 @@
signal or slot parameters, we think inheritance is a better
alternative. Here is an example of illegal syntax:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 7
You can work around this restriction like this:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 8
It may sometimes be even better to replace the function pointer
with inheritance and virtual functions.
@@ -289,7 +289,7 @@
fully qualify the data types when declaring signals and slots,
and when establishing connections. For example:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 9
\section2 Type Macros Cannot Be Used for Signal and Slot Parameters
@@ -297,7 +297,7 @@
an argument will not work in signals and slots. Here is an
illegal example:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 10
A macro without parameters will work.
@@ -305,7 +305,7 @@
Here's an example of the offending construct:
- \snippet doc/src/snippets/code/doc_src_moc.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_moc.cpp 11
\section2 Signal/Slot return types cannot be references
diff --git a/doc/src/development/qmake-manual.qdoc b/doc/src/development/qmake-manual.qdoc
index 1c5d903..2bc8a34 100644
--- a/doc/src/development/qmake-manual.qdoc
+++ b/doc/src/development/qmake-manual.qdoc
@@ -34,26 +34,26 @@
\ingroup qttools
\keyword qmake
- \l {qmake}{ \c qmake} is a tool that helps simplify the build
- process for development project across different platforms. \l {qmake}{ \c qmake}
+ \l{qmake}{\c qmake} is a tool that helps simplify the build process for
+ development project across different platforms. \l{qmake}{\c qmake}
automates the generation of Makefiles so that only a few lines of
- information are needed to create each Makefile. \l {qmake}{ \c qmake} can be used for
- any software project, whether it is written in Qt or not.
-
- \l {qmake}{ \c qmake} generates a Makefile based on the information in a project
- file. Project files are created by the developer, and are usually
- simple, but more sophisticated project files can be created for
- complex projects.
- \l {qmake}{ \c qmake} contains additional features to support development with Qt,
- automatically including build rules for \l{moc.html}{moc}
+ information are needed to create each Makefile. \l{qmake}{\c qmake} can be
+ used for any software project, whether it is written in Qt or not.
+
+ \l{qmake}{\c qmake} generates a Makefile based on the information in a
+ project file. Project files are created by the developer, and are usually
+ simple, but more sophisticated project files can be created for complex
+ projects.
+ \l{qmake}{\c qmake} contains additional features to support development
+ with Qt, automatically including build rules for \l{moc.html}{moc}
and \l{uic.html}{uic}.
- \l {qmake}{ \c qmake} can also generate projects for Microsoft Visual studio
+ \l{qmake}{\c qmake} can also generate projects for Microsoft Visual studio
without requiring the developer to change the project file.
\section1 Getting Started
The \l{qmake Tutorial} and guide to \l{qmake Common Projects} provide overviews
- that aim to help new users get started with \l {qmake}{ \c qmake}.
+ that aim to help new users get started with \l{qmake}{\c qmake}.
\list
\o \l{qmake Tutorial}
@@ -98,23 +98,24 @@
\previouspage qmake Manual
\nextpage qmake Project Files
- \l {qmake}{ \c qmake} provides a project-oriented system for managing the build
- process for applications, libraries, and other components. This
- approach gives developers control over the source files used, and
+ \l{qmake Manual#qmake}{\c qmake} provides a project-oriented system for
+ managing the buildprocess for applications, libraries, and other components.
+ This approach gives developers control over the source files used, and
allows each of the steps in the process to be described concisely,
- typically within a single file. \l {qmake}{ \c qmake} expands the information in
- each project file to a Makefile that executes the necessary commands
- for compiling and linking.
+ typically within a single file. \l{qmake Manual#qmake}{\c qmake} expands
+ the information in each project file to a Makefile that executes the necessary
+ commands for compiling and linking.
In this document, we provide a basic introduction to project files,
- describe some of the main features of \l {qmake}{ \c qmake}, and show how to use
- \l {qmake}{ \c qmake} on the command line.
+ describe some of the main features of \l{qmake Manual#qmake}{\c qmake},
+ and show how to use \l{qmake Manual#qmake}{\c qmake} on the command line.
\section1 Describing a Project
Projects are described by the contents of project (\c .pro) files.
- The information within these is used by \l {qmake}{ \c qmake} to generate a Makefile
- containing all the commands that are needed to build each project.
+ The information within these is used by \l{qmake Manual#qmake}{\c qmake}
+ to generate a Makefile containing all the commands that are needed to
+ build each project.
Project files typically contain a list of source and header files,
general configuration information, and any application-specific details,
such as a list of extra libraries to link against, or a list of extra
@@ -134,13 +135,14 @@
\section1 Building a Project
- For simple projects, you only need to run \l {qmake}{ \c qmake} in the top
- level directory of your project. By default, \l {qmake}{ \c qmake} generates a
- Makefile that you then use to build the project, and you can then
- run your platform's \c make tool to build the project.
+ For simple projects, you only need to run \l{qmake Manual#qmake}{\c qmake}
+ in the top level directory of your project. By default,
+ \l{qmake Manual#qmake}{\c qmake} generates a Makefile that you then use
+ to build the project, and you can then run your platform's \c make tool
+ to build the project.
- \l {qmake}{ \c qmake} can also be used to generate project files. A full
- description of \c{qmake}'s command line options can be found in the
+ \l{qmake Manual#qmake}{\c qmake} can also be used to generate project files.
+ A full description of \c{qmake}'s command line options can be found in the
\l{Running qmake} chapter of this manual.
\section1 Using Precompiled Headers
@@ -157,38 +159,40 @@
\previouspage Using qmake
\nextpage Running qmake
- Project files contain all the information required by \l {qmake}{ \c qmake} to build
- your application, library, or plugin. The resources used by your project
- are generally specified using a series of declarations, but support for
- simple programming constructs allow you to describe different build
- processes for different platforms and environments.
+ Project files contain all the information required by
+ \l{qmake Manual#qmake}{\c qmake} to build your application, library,
+ or plugin. The resources used by your project are generally specified
+ using a series of declarations, but support for simple programming
+ constructs allow you to describe different build processes for different
+ platforms and environments.
\tableofcontents
\section1 Project File Elements
- The project file format used by \l {qmake}{ \c qmake} can be used to support both
- simple and fairly complex build systems. Simple project files will
- use a straightforward declarative style, defining standard variables
- to indicate the source and header files that are used in the project.
- Complex projects may use the control flow structures to fine-tune the
- build process.
+ The project file format used by \l{qmake Manual#qmake}{\c qmake} can be
+ used to support both simple and fairly complex build systems.
+ Simple project files will use a straightforward declarative style,
+ defining standard variables to indicate the source and header files
+ that are used in the project. Complex projects may use the control flow
+ structures to fine-tune the build process.
The following sections describe the different types of elements used
in project files.
\section2 Variables
- In a project file, variables are used to hold lists of strings.
- In the simplest projects, these variables inform \l {qmake}{ \c qmake} about the
- configuration options to use, or supply filenames and paths to use
- in the build process.
+ In a project file, variables are used to hold lists of strings. In the
+ simplest projects, these variables inform \l{qmake Manual#qmake}{\c qmake}
+ about the configuration options to use, or supply filenames and paths to
+ use in the build process.
- \l {qmake}{ \c qmake} looks for certain variables in each project file, and it
- uses the contents of these to determine what it should write to a
- Makefile. For example, the list of values in the \c HEADERS and
- \c SOURCES variables are used to tell \l {qmake}{ \c qmake} about header and
- source files in the same directory as the project file.
+ \l{qmake Manual#qmake}{\c qmake} looks for certain variables in each
+ project file, and it uses the contents of these to determine what it
+ should write to a Makefile. For example, the list of values in the
+ \c HEADERS and \c SOURCES variables are used to tell
+ \l{qmake Manual#qmake}{\c qmake} about header and source files in the
+ same directory as the project file.
Variables can also be used internally to store temporary lists of values,
and existing lists of values can be overwritten or extended with new
@@ -206,14 +210,15 @@
\snippet doc/src/snippets/qmake/variables.pro 1
- The \c CONFIG variable is another special variable that \l {qmake}{ \c qmake}
- uses when generating a Makefile. It is discussed in the section on
+ The \c CONFIG variable is another special variable that
+ \l{qmake Manual#qmake}{\c qmake} uses when generating a Makefile.
+ It is discussed in the section on
\l{#GeneralConfiguration}{general configuration} later in this chapter.
In the above line, \c qt is added to the list of existing values
contained in \c CONFIG.
- The following table lists the variables that \l {qmake}{ \c qmake} recognizes, and
- describes what they should contain.
+ The following table lists the variables that \l{qmake Manual#qmake}{\c qmake}
+ recognizes, and describes what they should contain.
\table
\header \o Variable \o Contents
@@ -273,8 +278,9 @@
\section2 Built-in Functions and Control Flow
- \l {qmake}{ \c qmake} provides a number of built-in functions to allow the contents
- of variables to be processed. The most commonly used function in simple
+ \l{qmake Manual#qmake}{\c qmake} provides a number of built-in functions
+ to allow the contents of variables to be processed.
+ The most commonly used function in simple
project files is the \c include function which takes a filename as an
argument. The contents of the given file are included in the project
file at the place where the \c include function is used.
@@ -292,7 +298,8 @@
The assignments inside the braces are only made if the condition is
true. In this case, the special \c win32 variable must be set; this
happens automatically on Windows, but this can also be specified on
- other platforms by running \l {qmake}{ \c qmake} with the \c{-win32} command line
+ other platforms by running \l{qmake Manual#qmake}{\c qmake}
+ with the \c{-win32} command line
option (see \l{Running qmake} for more information). The opening
brace must stand on the same line as the condition.
@@ -313,15 +320,17 @@
\section1 Project Templates
The \c TEMPLATE variable is used to define the type of project that will
- be built. If this is not declared in the project file, \l {qmake}{ \c qmake} assumes
- that an application should be built, and will generate an appropriate
- Makefile (or equivalent file) for the purpose.
+ be built. If this is not declared in the project file,
+ \l{qmake Manual#qmake}{\c qmake} assumes that an application should be
+ built, and will generate an appropriate Makefile (or equivalent file)
+ for the purpose.
The types of project available are listed in the following table with
- information about the files that \l {qmake}{ \c qmake} will generate for each of them:
+ information about the files that \l{qmake Manual#qmake}{\c qmake}
+ will generate for each of them:
\table
- \header \o Template \o Description of \l {qmake}{ \c qmake}output
+ \header \o Template \o Description of \l{qmake Manual#qmake}{\c qmake} output
\row \o app (default) \o Creates a Makefile to build an application.
\row \o lib \o Creates a Makefile to build a library.
\row \o subdirs \o Creates a Makefile containing rules for the
@@ -336,9 +345,10 @@
See the \l{qmake Tutorial} for advice on writing project files for
projects that use the \c app and \c lib templates.
- When the \c subdirs template is used, \l {qmake}{ \c qmake} generates a Makefile
- to examine each specified subdirectory, process any project file it finds
- there, and run the platform's \c make tool on the newly-created Makefile.
+ When the \c subdirs template is used, \l{qmake Manual#qmake}{\c qmake}
+ generates a Makefile to examine each specified subdirectory,
+ process any project file it finds there, and run the platform's
+ \c make tool on the newly-created Makefile.
The \l{qmake Variable Reference#SUBDIRS}{SUBDIRS} variable is used to
contain a list of all the subdirectories to be processed.
@@ -348,7 +358,8 @@
The \l{qmake Variable Reference#CONFIG}{CONFIG variable} specifies the
options and features that the compiler should use and the libraries that
should be linked against. Anything can be added to the \c CONFIG variable,
- but the options covered below are recognized by \l {qmake}{ \c qmake} internally.
+ but the options covered below are recognized by
+ \l{qmake Manual#qmake}{\c qmake} internally.
The following options control the compiler flags that are used to build the
project:
@@ -360,11 +371,11 @@
\row \o debug \o The project is to be built in debug mode.
\row \o debug_and_release \o The project is built in \e both debug and
release modes.
- \row \o debug_and_release_target \o The project is built in \e both debug
+ \row \o debug_and_release_target \o The project is built in \e both debug
and release modes. TARGET is built into \e both the debug and release directories.
\row \o build_all \o If \c debug_and_release is specified, the project is
built in both debug and release modes by default.
- \row \o autogen_precompile_source \o Automatically generates a \c .cpp file that includes
+ \row \o autogen_precompile_source \o Automatically generates a \c .cpp file that includes
the precompiled header file specified in the .pro file.
\row \o ordered \o When using the \c subdirs template, this option
specifies that the directories listed should be processed in the
@@ -372,15 +383,15 @@
\row \o warn_on \o The compiler should output as many warnings as possible.
This is ignored if \c warn_off is specified.
\row \o warn_off \o The compiler should output as few warnings as possible.
- \row \o copy_dir_files \o Enables the install rule to also copy directories, not just files.
+ \row \o copy_dir_files \o Enables the install rule to also copy directories, not just files.
\endtable
The \c debug_and_release option is special in that it enables \e both debug and
release versions of a project to be built. In such a case, the Makefile that
- \l {qmake}{ \c qmake} generates includes a rule that builds both versions, and this can be
- invoked in the following way:
+ \l{qmake Manual#qmake}{\c qmake} generates includes a rule that builds both versions,
+ and this can be invoked in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 0
Adding the \c build_all option to the \c CONFIG variable makes this rule
the default when building the project, and installation targets will be
@@ -423,10 +434,11 @@
build it as a multi-threaded application in \c debug mode, your project
file will contain the following line:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 1
- Note, that you must use "+=", not "=", or \l {qmake}{ \c qmake} will not be able to
- use Qt's configuration to determine the settings needed for your project.
+ Note, that you must use "+=", not "=", or \l{qmake Manual#qmake}{\c qmake}
+ will not be able to use Qt's configuration to determine the settings
+ needed for your project.
\section1 Declaring Qt Libraries
@@ -436,21 +448,21 @@
variable which can be used to declare the required extension modules.
For example, we can enable the XML and network modules in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 2
Note that \c QT includes the \c core and \c gui modules by default, so the
above declaration \e adds the network and XML modules to this default list.
The following assignment \e omits the default modules, and will lead to
errors when the application's source code is being compiled:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 3
If you want to build a project \e without the \c gui module, you need to
exclude it with the "-=" operator. By default, \c QT contains both
\c core and \c gui, so the following line will result in a minimal
Qt project being built:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 4
The table below shows the options that can be used with the \c QT variable
and the features that are associated with each of them:
@@ -475,18 +487,18 @@
\section1 Configuration Features
- \l {qmake}{ \c qmake} can be set up with extra configuration features that are specified
- in feature (.prf) files. These extra features often provide support for
- custom tools that are used during the build process. To add a feature to
- the build process, append the feature name (the stem of the feature filename)
- to the \c CONFIG variable.
+ \l{qmake Manual#qmake}{\c qmake} can be set up with extra configuration
+ features that are specified in feature (.prf) files. These extra features
+ often provide support for custom tools that are used during the build
+ process. To add a feature to the build process, append the feature name
+ (the stem of the feature filename) to the \c CONFIG variable.
- For example, \l {qmake}{ \c qmake} can configure the build process to take advantage
- of external libraries that are supported by
+ For example, \l{qmake Manual#qmake}{\c qmake} can configure the build
+ process to take advantage of external libraries that are supported by
\l{http://www.freedesktop.org/wiki/Software_2fpkgconfig}{pkg-config},
such as the D-Bus and ogg libraries, with the following lines:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 5
More information about features can be found in the
\l{qmake Advanced Usage#Adding New Configuration Features}
@@ -498,15 +510,15 @@
If you are using other libraries in your project in addition to those
supplied with Qt, you need to specify them in your project file.
- The paths that \l {qmake}{ \c qmake} searches for libraries and the specific libraries
- to link against can be added to the list of values in the
+ The paths that \l{qmake Manual#qmake}{\c qmake} searches for libraries
+ and the specific libraries to link against can be added to the list of values in the
\l{qmake Variable Reference#LIBS}{LIBS} variable. The paths to the libraries
themselves can be given, or the familiar Unix-style notation for specifying
libraries and paths can be used if preferred.
For example, the following lines show how a library can be specified:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 6
The paths containing header files can also be specified in a similar way
using the \l{qmake Variable Reference#INCLUDEPATH}{INCLUDEPATH} variable.
@@ -514,7 +526,7 @@
For example, it is possible to add several paths to be searched for header
files:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 7
*/
/*!
@@ -524,8 +536,8 @@
\previouspage qmake Project Files
\nextpage qmake Platform Notes
- The behavior of \l {qmake}{ \c qmake} can be customized when it is run by
- specifying various options on the command line. These allow the
+ The behavior of \l{qmake Manual#qmake}{\c qmake} can be customized when it
+ is run by specifying various options on the command line. These allow the
build process to be fine-tuned, provide useful diagnostic
information, and can be used to specify the target platform for
your project.
@@ -537,21 +549,23 @@
\section2 Syntax
- The syntax used to run \l {qmake}{ \c qmake} takes the following simple form:
+ The syntax used to run \l{qmake Manual#qmake}{\c qmake} takes the
+ following simple form:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 8
- \l {qmake}{ \c qmake} supports two different modes of operation: In the default mode,
- \l {qmake}{ \c qmake} will use the description in a project file to generate a Makefile,
- but it is also possible to use \l {qmake}{ \c qmake} to generate project files.
+ \l{qmake Manual#qmake}{\c qmake} supports two different modes of operation:
+ In the default mode,\l{qmake Manual#qmake}{\c qmake} will use the
+ description in a project file to generate a Makefile, but it is also
+ possible to use \l{qmake Manual#qmake}{\c qmake} to generate project files.
If you want to explicitly set the mode, you must specify it before all
other options. The \c mode can be either of the following two values:
\list
\o \c -makefile \BR
- \c qmake output will be a Makefile.
+ \l{qmake Manual#qmake}{\c qmake} output will be a Makefile.
\o \c -project \BR
- \c qmake output will be a project file. \BR
+ \l{qmake Manual#qmake}{\c qmake} output will be a project file. \BR
\bold{Note:} It is likely that the created file will need to be edited; for example,
adding the \c QT variable to suit what modules are required for the project.
\endlist
@@ -567,42 +581,48 @@
\section2 Options
- A wide range of options can be specified on the command line to \l {qmake}{ \c qmake} in
- order to customize the build process, and to override default settings for
- your platform. The following basic options provide usage information, specify
- where \l {qmake}{ \c qmake} writes the output file, and control the level of debugging
- information that will be written to the console:
+ A wide range of options can be specified on the command line to
+ \l{qmake Manual#qmake}{\c qmake} in order to customize the build process,
+ and to override default settings for your platform. The following basic
+ options provide usage information, specify where
+ \l{qmake Manual#qmake}{\c qmake} writes the output file, and control the
+ level of debugging information that will be written to the console:
\list
\o \c -help \BR
- \c qmake will go over these features and give some useful help.
+ \l{qmake Manual#qmake}{\c qmake} will go over these features and give some
+ useful help.
\o \c -o file \BR
- \c qmake output will be directed to \e file. If this option
- is not specified, \c qmake will try to use a suitable file name for its
- output, depending on the mode it is running in.\BR
+ \l{qmake Manual#qmake}{\c qmake} output will be directed to \e file. If
+ this option is not specified, \l{qmake Manual#qmake}{\c qmake} will try
+ to use a suitable file name for its output, depending on the mode it is
+ running in.\BR
If '-' is specified, output is directed to stdout.
\o \c -d \BR
- \c qmake will output debugging information.
+ \l{qmake Manual#qmake}{\c qmake} will output debugging information.
\endlist
- For projects that need to be built differently on each target platform, with
- many subdirectories, you can run \l {qmake}{ \c qmake} with each of the following
- options to set the corresponding platform-specific variable in each
- project file:
+ For projects that need to be built differently on each target platform,
+ with many subdirectories, you can run \l{qmake Manual#qmake}{\c qmake} with
+ each of the following options to set the corresponding platform-specific
+ variable in each project file:
\list
\o \c -unix \BR
- \c qmake will run in unix mode. In this mode, Unix file
- naming and path conventions will be used, additionally testing for \c unix
- (as a scope) will succeed. This is the default mode on all Unices.
+ \l{qmake Manual#qmake}{\c qmake} will run in unix mode. In this mode,
+ Unix file naming and path conventions will be used, additionally
+ testing for \c unix (as a scope) will succeed. This is the default
+ mode on all Unices.
\o \c -macx \BR
- \c qmake will run in Mac OS X mode. In this mode, Unix file
- naming and path conventions will be used, additionally testing for \c macx
- (as a scope) will succeed. This is the default mode on Mac OS X.
+ \l{qmake Manual#qmake}{\c qmake} will run in Mac OS X mode. In this
+ mode, Unix file naming and path conventions will be used, additionally
+ testing for \c macx (as a scope) will succeed. This is the default mode
+ on Mac OS X.
\o \c -win32 \BR
- \c qmake will run in win32 mode. In this mode, Windows file naming and path
- conventions will be used, additionally testing for \c win32 (as a scope)
- will succeed. This is the default mode on Windows.
+ \l{qmake Manual#qmake}{\c qmake} will run in win32 mode. In this mode,
+ Windows file naming and path conventions will be used, additionally
+ testing for \c win32 (as a scope) will succeed. This is the default
+ mode on Windows.
\endlist
The template used for the project is usually specified by the \c TEMPLATE
@@ -611,10 +631,11 @@
\list
\o \c -t tmpl \BR
- \c qmake will override any set \c TEMPLATE variables with tmpl, but only
- \e after the .pro file has been processed.
+ \l{qmake Manual#qmake}{\c qmake} will override any set \c TEMPLATE
+ variables with tmpl, but only \e after the .pro file has been processed.
\o \c -tp prefix \BR
- \c qmake will add the prefix to the \c TEMPLATE variable.
+ \l{qmake Manual#qmake}{\c qmake} will add the prefix to the \c TEMPLATE
+ variable.
\endlist
The level of warning information can be fine-tuned to help you find problems in
@@ -622,54 +643,59 @@
\list
\o \c -Wall \BR
- \c qmake will report all known warnings.
+ \l{qmake Manual#qmake}{\c qmake} will report all known warnings.
\o \c -Wnone \BR
- No warning information will be generated by \c qmake.
+ No warning information will be generated by \
+ l{qmake Manual#qmake}{\c qmake}.
\o \c -Wparser \BR
- \c qmake will only generate parser warnings. This will alert
- you to common pitfalls and potential problems in the parsing of your
- project files.
+ \l{qmake Manual#qmake}{\c qmake} will only generate parser warnings.
+ This will alert you to common pitfalls and potential problems in the
+ parsing of your project files.
\o \c -Wlogic \BR
- \c qmake will warn of common pitfalls and potential problems in your
- project file. For example, \c qmake will report whether a file is placed
- into a list of files multiple times, or if a file cannot be found.
+ \l{qmake Manual#qmake}{\c qmake} will warn of common pitfalls and
+ potential problems in your project file. For example,
+ \l{qmake Manual#qmake}{\c qmake} will report whether a file is placed
+ into a list of files multiple times, or if a file cannot be found.
\endlist
\target MakefileMode
\section2 Makefile Mode Options
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 9
- In Makefile mode, \l {qmake}{ \c qmake} will generate a Makefile that is used to build the
- project. Additionally, the following options may be used in this mode to
- influence the way the project file is generated:
+ In Makefile mode, \l{qmake Manual#qmake}{\c qmake} will generate a Makefile
+ that is used to build the project. Additionally, the following options may
+ be used in this mode to influence the way the project file is generated:
\list
\o \c -after \BR
- \c qmake will process assignments given on the command line after
- the specified files.
+ \l{qmake Manual#qmake}{\c qmake} will process assignments given on the
+ command line after the specified files.
\o \c -nocache \BR
- \c qmake will ignore the .qmake.cache file.
+ \l{qmake Manual#qmake}{\c qmake} will ignore the .qmake.cache file.
\o \c -nodepend \BR
- \c qmake will not generate any dependency information.
+ \l{qmake Manual#qmake}{\c qmake} will not generate any dependency
+ information.
\o \c -cache file \BR
- \c qmake will use \e file as the cache file, ignoring any other
- .qmake.cache files found.
+ \l{qmake Manual#qmake}{\c qmake} will use \e file as the cache file,
+ ignoring any other .qmake.cache files found.
\o \c -spec spec \BR
- \c qmake will use \e spec as a path to platform and compiler information,
- and the value of \c QMAKESPEC will be ignored.
+ \l{qmake Manual#qmake}{\c qmake} will use \e spec as a path to
+ platform and compiler information, and the value of \c QMAKESPEC will
+ be ignored.
\endlist
- You may also pass \l {qmake}{ \c qmake} assignments on the command line;
- they will be processed before all of the files specified. For example:
+ You may also pass \l{qmake Manual#qmake}{\c qmake} assignments on the
+ command line; they will be processed before all of the files specified.
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 10
This will generate a Makefile, from test.pro with Unix pathnames. However
many of the specified options aren't necessary as they are the default.
Therefore, the line can be simplified on Unix to:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 11
If you are certain you want your variables processed after the
files specified, then you may pass the \c -after option. When this
@@ -679,17 +705,18 @@
\target ProjectMode
\section2 Project Mode Options
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 12
- In project mode, \l {qmake}{ \c qmake} will generate a project file. Additionally, you
- may supply the following options in this mode:
+ In project mode, \l{qmake Manual#qmake}{\c qmake} will generate a project
+ file. Additionally, you may supply the following options in this mode:
\list
\o \c -r \BR
- \c qmake will look through supplied directories recursively
+ \l{qmake Manual#qmake}{\c qmake} will look through supplied directories
+ recursively
\o \c -nopwd \BR
- \c qmake will not look in your current working directory for
- source code and only use the specified \c files
+ \l{qmake Manual#qmake}{\c qmake} will not look in your current working
+ directory for source code and only use the specified \c files
\endlist
In this mode, the \c files argument can be a list of files or directories.
@@ -712,9 +739,10 @@
Many cross-platform projects can be handled by the \c{qmake}'s basic
configuration features. On some platforms, it is sometimes useful, or even
- necessary, to take advantage of platform-specific features. \l {qmake}{ \c qmake} knows
- about many of these features, and these can be accessed via specific
- variables that only have an effect on the platforms where they are relevant.
+ necessary, to take advantage of platform-specific features.
+ \l{qmake Manual#qmake}{\c qmake} knows about many of these features, and
+ these can be accessed via specific variables that only have an effect on
+ the platforms where they are relevant.
\tableofcontents
@@ -725,38 +753,39 @@
\section2 Source and Binary Packages
- The version of \l {qmake}{ \c qmake} supplied in source packages is configured slightly
- differently to that supplied in binary packages in that it uses a different
- feature specification. Where the source package typically uses the
- \c macx-g++ specification, the binary package is typically configured to
- use the \c macx-xcode specification.
+ The version of \l{qmake Manual#qmake}{\c qmake} supplied in source packages
+ is configured slightly differently to that supplied in binary packages in
+ that it uses a different feature specification. Where the source package
+ typically uses the \c macx-g++ specification, the binary package is
+ typically configured to use the \c macx-xcode specification.
- Users of each package can override this configuration by invoking \l {qmake}{ \c qmake}
- with the \c -spec option (see \l{Running qmake} for more information). This
- makes it possible, for example, to use \l {qmake}{ \c qmake} from a binary package to
+ Users of each package can override this configuration by invoking
+ \l{qmake Manual#qmake}{\c qmake} with the \c -spec option (see
+ \l{Running qmake} for more information). This makes it possible, for
+ example, to use \l{qmake Manual#qmake}{\c qmake} from a binary package to
create a Makefile in a project directory with the following command line
invocation:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 13
\section2 Using Frameworks
- \l {qmake}{ \c qmake} is able to automatically generate build rules for linking against
- frameworks in the standard framework directory on Mac OS X, located at
- \c{/Library/Frameworks/}.
+ \l{qmake Manual#qmake}{\c qmake} is able to automatically generate build
+ rules for linking against frameworks in the standard framework directory on
+ Mac OS X, located at \c{/Library/Frameworks/}.
Directories other than the standard framework directory need to be specified
to the build system, and this is achieved by appending linker options to the
\l{qmake Variable Reference#QMAKE_LFLAGS}{QMAKE_LFLAGS} variable, as shown
in the following example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 14
The framework itself is linked in by appending the \c{-framework} options and
the name of the framework to the \l{qmake Variable Reference#LIBS}{LIBS}
variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 15
\section2 Creating Frameworks
@@ -768,7 +797,7 @@
\c lib_bundle option to the
\l{qmake Variable Reference#CONFIG}{CONFIG} variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 16
The data associated with the library is specified using the
\l{qmake Variable Reference#QMAKE_BUNDLE_DATA}{QMAKE_BUNDLE_DATA}
@@ -776,7 +805,7 @@
bundle, and is often used to specify a collection of header files,
as in the following example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 17
Here, the \c FRAMEWORK_HEADERS variable is a user-defined variable that
is used to define the headers required to use a particular framework.
@@ -801,10 +830,11 @@
The architectures to be supported in the binary are specified with the
\l{qmake Variable Reference#CONFIG}{CONFIG} variable. For example, the
- following assignment causes \l {qmake}{ \c qmake} to generate build rules to create
- a universal binary for both PowerPC and x86 architectures:
+ following assignment causes \l{qmake Manual#qmake}{\c qmake} to generate
+ build rules to create a universal binary for both PowerPC and x86
+ architectures:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 18
Additionally, developers using a PowerPC-based platform need to set the
\l{qmake Variable Reference#QMAKE_MAC_SDK}{QMAKE_MAC_SDK} variable.
@@ -816,13 +846,15 @@
Developers on Mac OS X can take advantage of \c{qmake}'s support for Xcode
project files, as described in
\l{Qt is Mac OS X Native#Development Tools}{Qt is Mac OS X Native},
- by running \l {qmake}{ \c qmake} to generate an Xcode project from an existing \l {qmake}{ \c qmake}
- project files. For example:
+ by running \l{qmake Manual#qmake}{\c qmake} to generate an Xcode project
+ from an existing \l{qmake Manual#qmake}{\c qmake} project files. For
+ example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 19
- Note that, if a project is later moved on the disk, \l {qmake}{ \c qmake} must be run
- again to process the project file and create a new Xcode project file.
+ Note that, if a project is later moved on the disk,
+ \l{qmake Manual#qmake}{\c qmake} must be run again to process the project
+ file and create a new Xcode project file.
\section2 On supporting two build targets simultaneously
@@ -860,24 +892,27 @@
\l{Qt Commercial Edition} and do not need to worry about how
project dependencies are managed.
- However, some developers may need to import an existing \l {qmake}{ \c qmake} project
- into Visual Studio. \l {qmake}{ \c qmake} is able to take a project file and create a
- Visual Studio project that contains all the necessary information required
- by the development environment. This is achieved by setting the \c qmake
+ However, some developers may need to import an existing
+ \l{qmake Manual#qmake}{\c qmake} project into Visual Studio.
+ \l{qmake Manual#qmake}{\c qmake} is able to take a project file and create
+ a Visual Studio project that contains all the necessary information
+ required by the development environment. This is achieved by setting the
+ \l{qmake Manual#qmake}{\c qmake}
\l{qmake Variable Reference#TEMPLATE}{project template} to either \c vcapp
(for application projects) or \c vclib (for library projects).
This can also be set using a command line option, for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 20
It is possible to recursively generate \c{.vcproj} files in subdirectories
and a \c{.sln} file in the main directory, by typing:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 21
- Each time you update the project file, you need to run \l {qmake}{ \c qmake} to generate
- an updated Visual Studio project.
+ Each time you update the project file, you need to run
+ \l{qmake Manual#qmake}{\c qmake} to generate an updated Visual Studio
+ project.
\note If you are using the Visual Studio Add-in, you can import \c .pro
files via the \gui{Qt->Import from .pro file} menu item.
@@ -893,25 +928,25 @@
the following assignment to the \l{qmake Variable Reference#CONFIG}
{CONFIG} variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 22
Also, the manifest embedding for DLLs can be removed with the following
assignment to the \l{qmake Variable Reference#CONFIG}{CONFIG} variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 23
This is discussed in more detail in the
\l{Deploying an Application on Windows#Visual Studio 2005 Onwards}
{deployment guide for Windows}.
- \section1 Symbian platform
+ \section1 Symbian Platform
Features specific to this platform include handling of static data,
capabilities, stack and heap size, compiler specific options, and unique
identifiers for the application or library.
- \section2 Handling of static data
+ \section2 Handling of Static Data
If the application uses any static data, the build system needs to be
informed about it. This is because Symbian tries to save memory if no
@@ -919,11 +954,11 @@
To specify that static data support is desired, add this to the project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 129
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 129
The default value is zero.
- \section2 Stack and heap size
+ \section2 Stack and Heap Size
The Symbian platform uses predefined sizes for stacks and heaps. If an
application exceeds either limit, it may crash or fail to complete its
@@ -935,13 +970,13 @@
prevents the application from starting if that amount of memory is not available. The
minimum and maximum values are separated by a space. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 130
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 130
The default values depend on the version of the Symbian SDK you're using,
- however, the Qt toolchain sets this to the maximum possible value and this
- should not be changed.
+ however, the Qt toolchain sets this to the maximum possible value and this
+ should not be changed.
- \section2 Compiler specific options
+ \section2 Compiler-Specific Options
General compiler options can as usual be set using \c QMAKE_CFLAGS and \c QMAKE_CXXFLAGS.
In order to set specific compiler options, \c QMAKE_CFLAGS.<compiler> and
@@ -951,9 +986,9 @@
Here is an example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 131
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 131
- \section2 Unique identifiers
+ \section2 Unique Identifiers
Symbian applications may have unique identifiers attached to them.
Here is how to define them in a project file:
@@ -961,37 +996,38 @@
There are four available types of IDs supported: \c UID2, \c UID3, \c SID, and \c VID. They
are specified like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 132
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 132
If \c SID is not specified, it defaults to the same value as \c UID3.
If \c UID3 is not specified, qmake will automatically generate a \c UID3
suitable for development and debugging. This value should be manually
- specified for applications that are to be released. In order to obtain
- an official UID, please contact \l{Symbian}{http:\\www.symbiansigned.com}.
- Both \c SID and \c VID default to empty values.
+ specified for applications that are to be released. See the
+ \l{Symbian Signed} Web site for information about obtaining an official
+ UID. Both \c SID and \c VID default to empty values.
There exists one UID1 too, but this should not be touched by any application.
-
- The UID2 has a specific value for different types of files - e.g. apps/exes
- are always 0x100039CE. The toolchain will set this for value for the most common file types like,
- EXE/APP and shared library DLL.
-
- For more information about unique identifiers and their meaning for Symbian applications,
- please refer to the \l{Symbian SDK documentation}{http://developer.symbian.org/main/documentation/reference/s3/pdk/GUID-380A8C4F-3EB6-5E1C-BCFB-ED5B866136D9.html}
-
+
+ The UID2 has a specific value for different types of files; e.g. apps/exes
+ are always 0x100039CE. The toolchain will set this for value for the most common file types like,
+ EXE/APP and shared library DLL.
+
+ For more information about unique identifiers and their meaning for
+ Symbian applications, please refer to the \l{UID Q&As (Symbian Signed)}
+ page in the \l{Forum Nokia Wiki} for more information.
+
\section2 Capabilities
Capabilities define extra privileges for the application, such as the
ability to list all files on the file system. Capabilities are defined
in the project file like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 133
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 133
It is also possible to specify which capabilities \e not to have,
by first specifying \c ALL and then list the unwanted capabilities
with a minus in front of them, like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 134
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 134
For more information about capabilities, please refer to the Symbian SDK documentation.
*/
@@ -1003,14 +1039,14 @@
\previouspage Using Precompiled Headers
\nextpage qmake Variable Reference
- This reference is a detailed index of all the variables and function
- that are available for use in \c qmake project files.
+ This reference is a detailed index of all the variables and function that
+ are available for use in \l{qmake Manual#qmake}{\c qmake} project files.
\section1 Variable Reference
The \l{qmake Variable Reference} describes the variables that are
- recognized by \l {qmake}{ \c qmake}when configuring the build process for
- projects.
+ recognized by \l{qmake Manual#qmake}{\c qmake}when configuring the build
+ process for projects.
\section1 Function Reference
@@ -1059,8 +1095,8 @@
\section1 Environment Variables and Configuration
The \l{Configuring qmake's Environment} chapter of this manual
- describes the environment variables that \l {qmake}{ \c qmake} uses when
- configuring the build process.
+ describes the environment variables that \l{qmake Manual#qmake}{\c qmake}
+ uses when configuring the build process.
*/
/*!
@@ -1089,23 +1125,23 @@
\e {This is only used on the Symbian platform.}
- Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables.
- The section of \c bld.inf file where each rule goes is appended to
+ Generic \c bld.inf file content can be specified with \c BLD_INF_RULES variables.
+ The section of \c bld.inf file where each rule goes is appended to
\c BLD_INF_RULES with a dot.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 152
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 152
- This will add the specified statements to the \c prj_exports section of the
+ This will add the specified statements to the \c prj_exports section of the
generated \c bld.inf file.
It is also possible to add multiple rows in a single block. Each double
quoted string will be placed on a new row in the generated \c bld.inf file.
- For example:
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 143
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 143
Any rules you define will be added after automatically generated
rules in each section.
@@ -1115,7 +1151,7 @@
The \c CONFIG variable specifies project configuration and
compiler options. The values will be recognized internally by
- \l {qmake}{ \c qmake} and have special meaning. They are as follows.
+ \l{qmake Manual#qmake}{\c qmake} and have special meaning. They are as follows.
These \c CONFIG values control compilation flags:
@@ -1151,25 +1187,28 @@
defined in the \c CONFIG variable, it is necessary to use the
\c debug_and_release option if you want to allow both debug and release
versions of a project to be built. In such a case, the Makefile that
- \l {qmake}{ \c qmake} generates includes a rule that builds both versions, and this can
- be invoked in the following way:
+ \l{qmake Manual#qmake}{\c qmake} generates includes a rule that builds both
+ versions, and this can be invoked in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 24
- When linking a library, \l {qmake}{ \c qmake} relies on the underlying platform to know
- what other libraries this library links against. However, if linking
- statically, \l {qmake}{ \c qmake} will not get this information unless we use the following
- \c CONFIG options:
+ When linking a library, \l{qmake Manual#qmake}{\c qmake} relies on the
+ underlying platform to know what other libraries this library links
+ against. However, if linking statically, \l{qmake Manual#qmake}{\c qmake}
+ will not get this information unless we use the following \c CONFIG
+ options:
\table 95%
\header \o Option \o Description
- \row \o create_prl \o This option enables \l {qmake}{ \c qmake} to track these
- dependencies. When this option is enabled, \l {qmake}{ \c qmake} will create a file
+ \row \o create_prl \o This option enables
+ \l{qmake Manual#qmake}{\c qmake} to track these dependencies. When this
+ option is enabled, \l{qmake Manual#qmake}{\c qmake} will create a file
ending in \c .prl which will save meta-information about the library
(see \l{LibDepend}{Library Dependencies} for more info).
- \row \o link_prl \o When this is enabled, \l {qmake}{ \c qmake} will process all
- libraries linked to by the application and find their meta-information
- (see \l{LibDepend}{Library Dependencies} for more info).
+ \row \o link_prl \o When this is enabled,
+ \l{qmake Manual#qmake}{\c qmake} will process all libraries linked to
+ by the application and find their meta-information(see
+ \l{LibDepend}{Library Dependencies} for more info).
\endtable
Please note that \c create_prl is required when \e {building} a
@@ -1189,7 +1228,7 @@
will be set for each of these mode, and you can test for this to perform
build-specific tasks. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 25
As a result, it may be useful to define mode-specific variables, such as
\l{#QMAKE_LFLAGS_RELEASE}{QMAKE_LFLAGS_RELEASE}, instead of general
@@ -1287,7 +1326,7 @@
\row \o stdbinary \o Builds an Open C binary (i.e. STDDLL, STDEXE, or STDLIB,
depending on the target binary type.)
\row \o no_icon \o Doesn't generate resources needed for displaying an icon
- for executable in application menu (app only).
+ for executable in application menu (app only).
\row \o symbian_test \o Places mmp files and extension makefiles under
test sections in generated bld.inf instead of their regular sections.
Note that this only affects automatically generated bld.inf content;
@@ -1316,17 +1355,17 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 26
\target DEFINES
\section1 DEFINES
- \l {qmake}{ \c qmake} adds the values of this variable as compiler C
- preprocessor macros (-D option).
+ \l{qmake Manual#qmake}{\c qmake} adds the values of this variable as
+ compiler C preprocessor macros (-D option).
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 27
\target DEF_FILE
\section1 DEF_FILE
@@ -1360,7 +1399,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 28
This will upload all PNG images in \c path to the same directory your
build target will be deployed to.
@@ -1376,7 +1415,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 29
\note In Windows CE all linked Qt libraries will be deployed to the path
specified by \c{myFiles.path}. On Symbian platform all libraries and executables
@@ -1387,7 +1426,7 @@
dynamically loadable libraries need special handling. When deploying
extra executables or dynamically loadable libraries, the target path
must specify \\sys\\bin. For plugins, the target path must specify the
- location where the plugin stub will be deployed to (see the
+ location where the plugin stub will be deployed to (see the
\l{How to Create Qt Plugins} document for more information about plugins).
If the binary cannot be found from the indicated source path,
the directory Symbian build process moves the executables to is
@@ -1395,10 +1434,10 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 128
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 128
On the Symbian platform, generic PKG file content can also be specified with this
- variable. You can use either \c pkg_prerules or \c pkg_postrules to
+ variable. You can use either \c pkg_prerules or \c pkg_postrules to
pass raw data to PKG file. The strings in \c pkg_prerules are added before
package-body and \c pkg_postrules after. \c pkg_prerules is used for
defining vendor information, dependencies, custom package headers, and the
@@ -1411,7 +1450,7 @@
For example, to deploy DLL and add a new dependency:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 140
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 140
Please note that \c pkg_prerules can also replace default statements in
pkg file. If no pkg_prerules is defined, qmake makes sure that PKG file
@@ -1445,7 +1484,7 @@
targeted to only one of above files by appending listed rules suffix
to the variable name:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 153
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 153
On the Symbian platform, the \c default_deployment item specifies
default platform and package dependencies. Those dependencies can be
@@ -1462,7 +1501,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 141
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 141
On the Symbian platform, a default deployment is generated for all
application projects. You can modify the autogenerated default
@@ -1476,7 +1515,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 154
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 154
This will entirely remove the default application deployment.
@@ -1486,7 +1525,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 155
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 155
This will show a message box that gives user an option to cancel the
installation and then automatically runs the application after
@@ -1502,19 +1541,19 @@
Often the default is not optimal for displaying to end user. To set a better
display name for these purposes, use \c{DEPLOYMENT.display_name} variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 156
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 156
On the Symbian platform, you can use \c{DEPLOYMENT.installer_header}
variable to generate smart installer wrapper for your application.
If you specify just UID of the installer package as the value, then
installer package name and version will be autogenerated:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 146
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 146
If autogenerated values are not suitable, you can also specify the sis
header yourself using this variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 147
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 147
\target DEPLOYMENT_PLUGIN
\section1 DEPLOYMENT_PLUGIN
@@ -1525,8 +1564,8 @@
available in Qt can be explicitly deployed to the device. See
\l{Static Plugins}{Static Plugins} for a complete list.
- \note In Windows CE, No plugins will be deployed automatically.
- If the application depends on plugins, these plugins have to be specified
+ \note In Windows CE, No plugins will be deployed automatically.
+ If the application depends on plugins, these plugins have to be specified
manually.
\note On the Symbian platform, all plugins supported by this variable
@@ -1535,7 +1574,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 142
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 142
This will upload the jpeg imageformat plugin to the plugins directory
on the Windows CE device.
@@ -1547,15 +1586,16 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 30
\target DESTDIR_TARGET
\section1 DESTDIR_TARGET
- This variable is set internally by \l {qmake}{ \c qmake}, which is basically the
- \c DESTDIR variable with the \c TARGET variable appened at the end.
- The value of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable is set internally by \l{qmake Manual#qmake}{\c qmake}, which
+ is basically the \c DESTDIR variable with the \c TARGET variable appened at
+ the end. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target DLLDESTDIR
\section1 DLLDESTDIR
@@ -1570,15 +1610,16 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 31
\target DSP_TEMPLATE
\section1 DSP_TEMPLATE
- This variable is set internally by \l {qmake}{ \c qmake}, which specifies where the
- dsp template file for basing generated dsp files is stored. The value
- of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable is set internally by \l{qmake Manual#qmake}{\c qmake}, which
+ specifies where the dsp template file for basing generated dsp files is
+ stored. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target FORMS
\section1 FORMS
@@ -1590,7 +1631,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 32
If FORMS3 is defined in your project, then this variable must contain
forms for uic, and not uic3. If CONFIG contains uic3, and FORMS3 is not
@@ -1606,7 +1647,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 33
\target GUID
\section1 GUID
@@ -1623,16 +1664,16 @@
Defines the header files for the project.
- \l {qmake}{ \c qmake} will generate dependency information (unless \c -nodepend
- is specified on the \l{Running qmake#Commands}{command line})
- for the specified headers. \l {qmake}{ \c qmake} will also automatically detect if
- \c moc is required by the classes in these headers, and add the
- appropriate dependencies and files to the project for generating and
- linking the moc files.
+ \l{qmake Manual#qmake}{\c qmake} will generate dependency information (unless
+ \c -nodepend is specified on the \l{Running qmake#Commands}{command line})
+ for the specified headers. \l{qmake Manual#qmake}{\c qmake} will also
+ automatically detect if \c moc is required by the classes in these headers,
+ and add the appropriate dependencies and files to the project for generating
+ and linking the moc files.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 34
See also \l{#SOURCES}{SOURCES}.
@@ -1651,7 +1692,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 35
To specify a path containing spaces, quote the path using the technique
mentioned in the \l{qmake Project Files#Whitespace}{qmake Project Files}
@@ -1671,24 +1712,25 @@
build target will be installed, and the \c INSTALLS assignment adds the
build target to the list of existing resources to be installed:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 36
- Note that \l {qmake}{ \c qmake} will skip files that are executable. If you need to install
- executable files, you can unset the files' executable flags.
+ Note that \l{qmake Manual#qmake}{\c qmake} will skip files that are
+ executable. If you need to install executable files, you can unset the
+ files' executable flags.
\target LEXIMPLS
\section1 LEXIMPLS
This variable contains a list of lex implementation files. The value
- of this variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
- needs to be modified.
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target LEXOBJECTS
\section1 LEXOBJECTS
This variable contains the names of intermediate lex object
files.The value of this variable is typically handled by
- \l {qmake}{ \c qmake} and rarely needs to be modified.
+ \l{qmake Manual#qmake}{\c qmake} and rarely needs to be modified.
\target LEXSOURCES
\section1 LEXSOURCES
@@ -1699,7 +1741,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 37
\target LIBS
\section1 LIBS
@@ -1713,7 +1755,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 38
To specify a path containing spaces, quote the path using the technique
mentioned in the \l{qmake Project Files#Whitespace}{qmake Project Files}
@@ -1741,7 +1783,7 @@
unique names before it is used. To change this behavior, add the
\c no_lflags_merge option to the \c CONFIG variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 39
\target LITERAL_HASH
\section1 LITERAL_HASH
@@ -1761,9 +1803,10 @@
\section1 MAKEFILE
This variable specifies the name of the Makefile which
- \l {qmake}{ \c qmake} should use when outputting the dependency information
- for building a project. The value of this variable is typically
- handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ \l{qmake Manual#qmake}{\c qmake} should use when outputting the dependency
+ information for building a project. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\bold{Note:} On the Symbian platform, this variable is ignored.
@@ -1772,44 +1815,45 @@
This variable contains the name of the Makefile generator to use
when generating a Makefile. The value of this variable is typically
- handled internally by \l {qmake}{ \c qmake} and rarely needs to be modified.
+ handled internally by \l{qmake Manual#qmake}{\c qmake} and rarely needs to
+ be modified.
\target MMP_RULES
\section1 MMP_RULES
\e {This is only used on the Symbian platform.}
- Generic MMP file content can be specified with this variable.
+ Generic MMP file content can be specified with this variable.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 137
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 137
This will add the specified statement to the end of the generated MMP file.
It is also possible to add multiple rows in a single block. Each double
quoted string will be placed on a new row in the generated MMP file.
- For example:
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 138
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 138
If you need to include a hash (\c{#}) character inside the
- \c MMP_RULES statement, it can be done with the variable
+ \c MMP_RULES statement, it can be done with the variable
\c LITERAL_HASH as follows:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 139
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 139
There is also a convenience function for adding conditional rules
called \c{addMMPRules}. Suppose you need certain functionality
to require different library depending on architecture. This
can be specified with \c{addMMPRules} as follows:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 148
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 148
\note You should not use this variable to add MMP statements that are
explicitly supported by their own variables, such as
- \c TARGET.EPOCSTACKSIZE.
+ \c TARGET.EPOCSTACKSIZE.
Doing so could result in duplicate statements in the MMP file.
\target MOC_DIR
@@ -1820,7 +1864,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 40
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 40
\target OBJECTS
\section1 OBJECTS
@@ -1828,8 +1872,8 @@
This variable is generated from the \link #SOURCES SOURCES
\endlink variable. The extension of each source file will have been
replaced by .o (Unix) or .obj (Win32). The value of this variable is
- typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
- rarely needs to be modified.
+ typically handled by \l {qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target OBJECTS_DIR
\section1 OBJECTS_DIR
@@ -1839,16 +1883,16 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 41
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 41
\target OBJMOC
\section1 OBJMOC
- This variable is set by \l {qmake}{ \c qmake} if files can be found that
- contain the Q_OBJECT macro. \c OBJMOC contains the
- name of all intermediate moc object files. The value of this variable
- is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable is set by \l{qmake Manual#qmake}{\c qmake} if files can be
+ found that contain the Q_OBJECT macro. \c OBJMOC contains the name of all
+ intermediate moc object files. The value of this variable is typically
+ handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
\target POST_TARGETDEPS
\section1 POST_TARGETDEPS
@@ -1887,8 +1931,8 @@
This variable contains a list of header files that require some
sort of pre-compilation step (such as with moc). The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target PWD
\section1 PWD
@@ -1909,54 +1953,58 @@
\section1 OUT_PWD
This variable contains the full path leading to the directory where
- \l {qmake}{ \c qmake} places the generated Makefile.
+ \l{qmake Manual#qmake}{\c qmake} places the generated Makefile.
\target QMAKE_systemvariable
\section1 QMAKE
- This variable contains the name of the \l {qmake}{ \c qmake} program
- itself and is placed in generated Makefiles. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable contains the name of the \l{qmake Manual#qmake}{\c qmake}
+ program itself and is placed in generated Makefiles. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKESPEC_systemvariable
\section1 QMAKESPEC
- This variable contains the name of the \l {qmake}{ \c qmake}
- configuration to use when generating Makefiles. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} and rarely needs to be modified.
+ This variable contains the name of the \l{qmake Manual#qmake}{\c qmake}
+ configuration to use when generating Makefiles. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} and rarely needs
+ to be modified.
- Use the \c{QMAKESPEC} environment variable to override the \l {qmake}{ \c qmake} configuration.
- Note that, due to the way \l {qmake}{ \c qmake} reads project files, setting the \c{QMAKESPEC}
- environment variable from within a project file will have no effect.
+ Use the \c{QMAKESPEC} environment variable to override the
+ \l{qmake Manual#qmake}{\c qmake} configuration. Note that, due to the way
+ \l{qmake Manual#qmake}{\c qmake} reads project files, setting the
+ \c{QMAKESPEC} environment variable from within a project file will have no
+ effect.
\target QMAKE_APP_FLAG
\section1 QMAKE_APP_FLAG
This variable is empty unless the \c app
\l{#TEMPLATE}{TEMPLATE} is specified. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified. Use the following instead:
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. Use the
+ following instead:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 42
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 42
\target QMAKE_APP_OR_DLL
\section1 QMAKE_APP_OR_DLL
- This variable is empty unless the \c app or \c dll
- \l{#TEMPLATE}{TEMPLATE} is specified. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable is empty unless the \c app or \c dll \l{#TEMPLATE}{TEMPLATE}
+ is specified. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_AR_CMD
\section1 QMAKE_AR_CMD
\e {This is used on Unix platforms only.}
- This variable contains the command for invoking the program which
- creates, modifies and extracts archives. The value of this variable is
- typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ This variable contains the command for invoking the program which creates,
+ modifies and extracts archives. The value of this variable is typically
+ handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_BUNDLE_DATA
\section1 QMAKE_BUNDLE_DATA
@@ -1968,7 +2016,7 @@
and \c path/to/header_two.h to a group containing information about the
headers supplied with the framework:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 43
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 43
The last line adds the information about the headers to the collection of
resources that will be installed with the library bundle.
@@ -1990,7 +2038,7 @@
For example, the following definition will result in a framework with the
\c{.myframework} extension:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 44
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 44
\e{This is used on Mac OS X only.}
@@ -2004,9 +2052,10 @@
\target QMAKE_CFLAGS_DEBUG
\section1 QMAKE_CFLAGS_DEBUG
- This variable contains the flags for the C compiler in debug mode.The value of this variable is
- typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ This variable contains the flags for the C compiler in debug mode. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_MT
\section1 QMAKE_CFLAGS_MT
@@ -2014,7 +2063,7 @@
This variable contains the compiler flags for creating a
multi-threaded application or when the version of Qt that you link
against is a multi-threaded statically linked library. The value of
- this variable is typically handled by \l {qmake}{ \c qmake} or
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_CFLAGS_MT_DBG
@@ -2023,8 +2072,9 @@
This variable contains the compiler flags for creating a debuggable
multi-threaded application or when the version of Qt that you link
against is a debuggable multi-threaded statically linked library. The
- value of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_MT_DLL
\section1 QMAKE_CFLAGS_MT_DLL
@@ -2034,8 +2084,8 @@
This variable contains the compiler flags for creating a
multi-threaded dll or when the version of Qt that you link
against is a multi-threaded dll. The value of this variable is typically
- handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
- rarely needs to be modified.
+ handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
\target QMAKE_CFLAGS_MT_DLLDBG
\section1 QMAKE_CFLAGS_MT_DLLDBG
@@ -2045,16 +2095,17 @@
This variable contains the compiler flags for creating a debuggable
multi-threaded dll or when the version of Qt that you link
against is a debuggable multi-threaded statically linked library.
- The value of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_RELEASE
\section1 QMAKE_CFLAGS_RELEASE
This variable contains the compiler flags for creating a non-debuggable
application. The value of this variable is typically
- handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and
- rarely needs to be modified.
+ handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
\target QMAKE_CFLAGS_SHLIB
\section1 QMAKE_CFLAGS_SHLIB
@@ -2063,33 +2114,32 @@
This variable contains the compiler flags for creating a shared
library. The value of this variable is typically handled by
- \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_THREAD
\section1 QMAKE_CFLAGS_THREAD
This variable contains the compiler flags for creating a multi-threaded
application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CFLAGS_WARN_OFF
\section1 QMAKE_CFLAGS_WARN_OFF
This variable is not empty if the warn_off
\l{#CONFIG}{CONFIG} option is specified. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_CFLAGS_WARN_ON
\section1 QMAKE_CFLAGS_WARN_ON
- This variable is not empty if the warn_on
- \l{#CONFIG}{CONFIG} option is specified.
- The value of this variable is typically handled by
- \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable is not empty if the warn_on \l{#CONFIG}{CONFIG} option is
+ specified. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CLEAN
\section1 QMAKE_CLEAN
@@ -2107,17 +2157,17 @@
\section1 QMAKE_CXXFLAGS
This variable contains the C++ compiler flags that are used when building
- a project. The value of this variable is typically handled by \l {qmake}{ \c qmake} or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The flags
- specific to debug and release modes can be adjusted by modifying
- the \c QMAKE_CXXFLAGS_DEBUG and \c QMAKE_CXXFLAGS_RELEASE variables,
- respectively.
+ a project. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified. The flags specific to debug and release modes can be
+ adjusted by modifying the \c QMAKE_CXXFLAGS_DEBUG and
+ \c QMAKE_CXXFLAGS_RELEASE variables, respectively.
\bold{Note:} On the Symbian platform, this variable can be used to pass
architecture specific options to each compiler in the Symbian build system.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 131
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 131
For more information, see
\l{qmake Platform Notes#Compiler specific options}{qmake Platform Notes}.
@@ -2127,24 +2177,24 @@
This variable contains the C++ compiler flags for creating a debuggable
application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_MT
\section1 QMAKE_CXXFLAGS_MT
This variable contains the C++ compiler flags for creating a multi-threaded
application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_MT_DBG
\section1 QMAKE_CXXFLAGS_MT_DBG
- This variable contains the C++ compiler flags for creating a debuggable multi-threaded
- application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating a debuggable
+ multi-threaded application. The value of this variable is typically handled
+ by \l{qmake Manual#qmake}{\c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_MT_DLL
\section1 QMAKE_CXXFLAGS_MT_DLL
@@ -2153,56 +2203,58 @@
This variable contains the C++ compiler flags for creating a multi-threaded
dll. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_MT_DLLDBG
\section1 QMAKE_CXXFLAGS_MT_DLLDBG
\c {This is used on Windows only.}
- This variable contains the C++ compiler flags for creating a multi-threaded debuggable
- dll. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating a multi-threaded
+ debuggable dll. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_RELEASE
\section1 QMAKE_CXXFLAGS_RELEASE
- This variable contains the C++ compiler flags for creating an
- application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating an application.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_SHLIB
\section1 QMAKE_CXXFLAGS_SHLIB
- This variable contains the C++ compiler flags for creating a
- shared library. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating a shared library.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_THREAD
\section1 QMAKE_CXXFLAGS_THREAD
- This variable contains the C++ compiler flags for creating a
- multi-threaded application. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs
- to be modified.
+ This variable contains the C++ compiler flags for creating a multi-threaded
+ application. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_WARN_OFF
\section1 QMAKE_CXXFLAGS_WARN_OFF
- This variable contains the C++ compiler flags for suppressing compiler warnings.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the C++ compiler flags for suppressing compiler
+ warnings. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_CXXFLAGS_WARN_ON
\section1 QMAKE_CXXFLAGS_WARN_ON
This variable contains C++ compiler flags for generating compiler warnings.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_DISTCLEAN
\section1 QMAKE_DISTCLEAN
@@ -2212,9 +2264,9 @@
\target QMAKE_EXTENSION_SHLIB
\section1 QMAKE_EXTENSION_SHLIB
- This variable contains the extention for shared libraries. The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ This variable contains the extention for shared libraries. The value of
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
Note that platform-specific variables that change the extension will override
the contents of this variable.
@@ -2286,16 +2338,18 @@
\target QMAKE_FAILED_REQUIREMENTS
\section1 QMAKE_FAILED_REQUIREMENTS
- This variable contains the list of requirements that were failed to be met when
- \l {qmake}{ \c qmake}was used. For example, the sql module is needed and wasn't compiled into Qt. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified.
+ This variable contains the list of requirements that were failed to be met
+ when \l{qmake Manual#qmake}{\c qmake} was used. For example, the sql module
+ is needed and wasn't compiled into Qt. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_FILETAGS
\section1 QMAKE_FILETAGS
- This variable contains the file tags needed to be entered into the Makefile, such as SOURCES
- and HEADERS. The value of this variable is typically handled by \l {qmake}{ \c qmake}or
+ This variable contains the file tags needed to be entered into the
+ Makefile, such as SOURCES and HEADERS. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
\l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_FRAMEWORK_BUNDLE_NAME
@@ -2329,26 +2383,28 @@
\target QMAKE_INCDIR
\section1 QMAKE_INCDIR
- This variable contains the location of all known header files to be added to
- INCLUDEPATH when building an application. The value of this variable is
- typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
- needs to be modified.
+ This variable contains the location of all known header files to be added
+ to INCLUDEPATH when building an application. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_INCDIR_EGL
\section1 QMAKE_INCDIR_EGL
- This variable contains the location of EGL header files to be added
- to INCLUDEPATH when building an application with OpenGL/ES or
- OpenVG support. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of EGL header files to be added to
+ INCLUDEPATH when building an application with OpenGL/ES or OpenVG support.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target QMAKE_INCDIR_OPENGL
\section1 QMAKE_INCDIR_OPENGL
This variable contains the location of OpenGL header files to be added
to INCLUDEPATH when building an application with OpenGL support. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_INCDIR_EGL may also need to be set.
@@ -2359,8 +2415,9 @@
to INCLUDEPATH when building an application with OpenGL ES 1
or OpenGL ES 2 support respectively.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by \
+ l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_INCDIR_EGL may also need to be set.
@@ -2370,8 +2427,9 @@
This variable contains the location of OpenVG header files to be added
to INCLUDEPATH when building an application with OpenVG support. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenVG implementation uses EGL then QMAKE_INCDIR_EGL may also
need to be set.
@@ -2379,28 +2437,28 @@
\target QMAKE_INCDIR_QT
\section1 QMAKE_INCDIR_QT
- This variable contains the location of all known header file
- paths to be added to INCLUDEPATH when building a Qt application. The value
- of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of all known header file paths to be
+ added to INCLUDEPATH when building a Qt application. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_INCDIR_THREAD
\section1 QMAKE_INCDIR_THREAD
- This variable contains the location of all known header file
- paths to be added to INCLUDEPATH when building a multi-threaded application.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of all known header file paths to be
+ added to INCLUDEPATH when building a multi-threaded application. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_INCDIR_X11
\section1 QMAKE_INCDIR_X11
\e {This is used on Unix platforms only.}
- This variable contains the location of X11 header file paths to be
- added to INCLUDEPATH when building a X11 application. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of X11 header file paths to be added
+ to INCLUDEPATH when building a X11 application. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target QMAKE_INFO_PLIST
\section1 QMAKE_INFO_PLIST
@@ -2428,31 +2486,30 @@
\e {This is used on Windows only.}
- This variable contains link flags when building console
- programs. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building console programs. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LFLAGS_CONSOLE_DLL
\e {This is used on Windows only.}
- This variable contains link flags when building console
- dlls. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building console dlls. The value of
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LFLAGS_DEBUG
- This variable contains link flags when building debuggable applications. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building debuggable applications.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_PLUGIN
- This variable contains link flags when building plugins. The value
- of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building plugins. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LFLAGS_RPATH
@@ -2463,122 +2520,125 @@
\section1 QMAKE_LFLAGS_QT_DLL
- This variable contains link flags when building programs that
- use the Qt library built as a dll. The value of this variable is
- typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building programs that use the Qt
+ library built as a dll. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_RELEASE
- This variable contains link flags when building applications for
- release. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building applications for release.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_SHAPP
- This variable contains link flags when building applications which are using
- the \c app template. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building applications which are
+ using the \c app template. The value of this variable is typically
+ handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LFLAGS_SHLIB
This variable contains link flags when building shared libraries
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_SONAME
This variable specifies the link flags to set the name of shared objects,
- such as .so or .dll. The value of this variable is typically handled by \c
- qmake or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ such as .so or .dll. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_THREAD
This variable contains link flags when building multi-threaded projects.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_WINDOWS
\e {This is used on Windows only.}
- This variable contains link flags when building Windows GUI projects
- (i.e. non-console applications).
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building Windows GUI projects (i.e.
+ non-console applications). The value of this variable is typically handled
+ by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LFLAGS_WINDOWS_DLL
\e {This is used on Windows only.}
- This variable contains link flags when building Windows DLL projects.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains link flags when building Windows DLL projects. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBDIR
- This variable contains the location of all known library
- directories.The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of all known library directories. The
+ value of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBDIR_FLAGS
\e {This is used on Unix platforms only.}
- This variable contains the location of all library
- directory with -L prefixed. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of all library directory with -L
+ prefixed. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBDIR_EGL
- This variable contains the location of the EGL library
- directory, when EGL is used with OpenGL/ES or OpenVG. The value
- of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the EGL library directory, when EGL
+ is used with OpenGL/ES or OpenVG. The value of this variable is typically
+ handled by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf}
+ and rarely needs to be modified.
\section1 QMAKE_LIBDIR_OPENGL
- This variable contains the location of the OpenGL library
- directory.The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the OpenGL library directory. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_LIBDIR_EGL may also need to be set.
\section1 QMAKE_LIBDIR_OPENVG
- This variable contains the location of the OpenVG library
- directory. The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the OpenVG library directory. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenVG implementation uses EGL, then QMAKE_LIBDIR_EGL
may also need to be set.
\section1 QMAKE_LIBDIR_QT
- This variable contains the location of the Qt library
- directory.The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the Qt library directory. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBDIR_X11
\e {This is used on Unix platforms only.}
- This variable contains the location of the X11 library
- directory.The value of this variable is typically handled by
- \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of the X11 library directory. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS
- This variable contains all project libraries. The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all project libraries. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_CONSOLE
@@ -2591,42 +2651,44 @@
\section1 QMAKE_LIBS_EGL
- This variable contains all EGL libraries when building Qt with
- OpenGL/ES or OpenVG. The value of this variable is typically
- handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely
+ This variable contains all EGL libraries when building Qt with OpenGL/ES
+ or OpenVG. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
needs to be modified. The usual value is \c{-lEGL}.
\section1 QMAKE_LIBS_OPENGL
- This variable contains all OpenGL libraries. The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all OpenGL libraries. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_LIBS_EGL may also need to be set.
\section1 QMAKE_LIBS_OPENGL_QT
- This variable contains all OpenGL Qt libraries.The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all OpenGL Qt libraries.The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_OPENGL_ES1, QMAKE_LIBS_OPENGL_ES2
These variables contain all the OpenGL libraries for OpenGL ES 1
and OpenGL ES 2.
- The value of these variables is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of these variables is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
If the OpenGL implementation uses EGL (most OpenGL/ES systems),
then QMAKE_LIBS_EGL may also need to be set.
\section1 QMAKE_LIBS_OPENVG
- This variable contains all OpenVG libraries. The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf}
- and rarely needs to be modified. The usual value is \c{-lOpenVG}.
+ This variable contains all OpenVG libraries. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified. The usual
+ value is \c{-lOpenVG}.
Some OpenVG engines are implemented on top of OpenGL. This will
be detected at configure time and QMAKE_LIBS_OPENGL will be implicitly
@@ -2637,95 +2699,96 @@
\section1 QMAKE_LIBS_QT
- This variable contains all Qt libraries.The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all Qt libraries.The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_QT_DLL
\e {This is used on Windows only.}
- This variable contains all Qt libraries when Qt is built as a dll. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all Qt libraries when Qt is built as a dll. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBS_QT_OPENGL
- This variable contains all the libraries needed to link against if
- OpenGL support is turned on. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all the libraries needed to link against if OpenGL
+ support is turned on. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBS_QT_THREAD
- This variable contains all the libraries needed to link against if
- thread support is turned on. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all the libraries needed to link against if thread
+ support is turned on. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LIBS_RT
\e {This is used with Borland compilers only.}
This variable contains the runtime library needed to link against when
- building an application. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ building an application. The value of this variable is typically handled
+ by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and
+ rarely needs to be modified.
\section1 QMAKE_LIBS_RTMT
\e {This is used with Borland compilers only.}
This variable contains the runtime library needed to link against when
- building a multi-threaded application. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ building a multi-threaded application. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_THREAD
\e {This is used on Unix and Symbian platforms only.}
- This variable contains all libraries that need to be linked against
- when building a multi-threaded application. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all libraries that need to be linked against when
+ building a multi-threaded application. The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_WINDOWS
\e {This is used on Windows only.}
- This variable contains all windows libraries.The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all windows libraries. The value of this variable
+ is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_X11
\e {This is used on Unix platforms only.}
- This variable contains all X11 libraries.The value of this
- variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all X11 libraries.The value of this variable is
+ typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIBS_X11SM
\e {This is used on Unix platforms only.}
- This variable contains all X11 session management libraries. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains all X11 session management libraries. The value of
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LIB_FLAG
- This variable is not empty if the \c lib template is specified. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable is not empty if the \c lib template is specified. The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_LINK_SHLIB_CMD
- This variable contains the command to execute when creating a
- shared library. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the command to execute when creating a shared
+ library. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_LN_SHLIB
@@ -2754,8 +2817,8 @@
This variable determines the name of the project when generating project
files for IDEs. The default value is the target name. The value of this
- variable is typically handled by \l {qmake}{ \c qmake} and rarely needs
- to be modified.
+ variable is typically handled by \l {qmake Manual#qmake}{ \c qmake} and
+ rarely needs to be modified.
\section1 QMAKE_MAC_SDK
@@ -2774,28 +2837,29 @@
\section1 QMAKE_MAKEFILE
- This variable contains the name of the Makefile to create. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the name of the Makefile to create. The value of
+ this variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_MOC_SRC
- This variable contains the names of all moc source files to
- generate and include in the project. The value of this variable is
- typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the names of all moc source files to generate and
+ include in the project. The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_QMAKE
- This variable contains the location of qmake if it is not in the path.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of qmake if it is not in the path. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_QT_DLL
- This variable is not empty if Qt was built as a dll. The
- value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable is not empty if Qt was built as a dll. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_RESOURCE_FLAGS
@@ -2805,7 +2869,7 @@
\c{-compress} options are used with particular values each time that
\c rcc is invoked:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 45
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 45
\section1 QMAKE_RPATH
@@ -2823,44 +2887,49 @@
\section1 QMAKE_RUN_CC
- This variable specifies the individual rule needed to build an object.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable specifies the individual rule needed to build an object. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_RUN_CC_IMP
- This variable specifies the individual rule needed to build an object.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable specifies the individual rule needed to build an object. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_RUN_CXX
- This variable specifies the individual rule needed to build an object.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable specifies the individual rule needed to build an object. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_RUN_CXX_IMP
- This variable specifies the individual rule needed to build an object.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable specifies the individual rule needed to build an object. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 QMAKE_TARGET
- This variable contains the name of the project target. The value of
- this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the name of the project target. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 QMAKE_UIC
- This variable contains the location of uic if it is not in the path.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains the location of uic if it is not in the path. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
It can be used to specify arguments to uic as well, such as additional plugin
paths. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 46
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 46
\section1 QT
@@ -2891,7 +2960,7 @@
exclude the \c gui value with the "-=" operator; the following line will
result in a minimal Qt project being built:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 47
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 47
Note that adding the \c opengl option to the \c QT variable automatically
causes the equivalent option to be added to the \c CONFIG variable.
@@ -2927,8 +2996,9 @@
\section1 RC_FILE
This variable contains the name of the resource file for the application.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target RCC_DIR
\section1 RCC_DIR
@@ -2938,13 +3008,13 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 48
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 48
\target REQUIRES
\section1 REQUIRES
- This is a special variable processed by \c qmake. If the
- contents of this variable do not appear in CONFIG by the time this
+ This is a special variable processed by \l{qmake Manual#qmake}{\c qmake}.
+ If the contents of this variable do not appear in CONFIG by the time this
variable is assigned, then a minimal Makefile will be generated that
states what dependencies (the values assigned to REQUIRES) are
missing.
@@ -2953,27 +3023,28 @@
\section1 RESOURCES
- This variable contains the name of the resource collection file (qrc)
+ This variable contains the name of the resource collection file (qrc)
for the application. Further information about the resource collection
file can be found at \l{The Qt Resource System}.
\section1 RES_FILE
This variable contains the name of the resource file for the application.
- The value of this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target RSS_RULES
\section1 RSS_RULES
- \e {This is only used on the Symbian platform.}
+ \e {This is only used on the Symbian platform.}
- Generic RSS file content can be specified with this variable. The syntax is
+ Generic RSS file content can be specified with this variable. The syntax is
similar to \c MMP_RULES and \c BLD_INF_RULES.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 144
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 144
This will add the specified statement to the end of the \c APP_REGISTRATION_INFO
resource struct in the generated registration resource file.
@@ -2982,9 +3053,9 @@
It is also possible to add multiple rows in a single block. Each double
quoted string will be placed on a new row in the registration resource file.
- For example:
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 145
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 145
This example will install the application to MyFolder in the Symbian
platform application shell. In addition it will make the application to
@@ -3016,7 +3087,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 151
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 151
This example will define service information for a fictional service that requires
an icon to be supplied via the \c opaque_data of the service information.
@@ -3045,17 +3116,17 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 49
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 49
See also \l{#HEADERS}{HEADERS}
\section1 SRCMOC
- This variable is set by \l {qmake}{ \c qmake}if files can be found that
- contain the Q_OBJECT macro. \c SRCMOC contains the
- name of all the generated moc files. The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable is set by \l{qmake Manual#qmake}{\c qmake} if files can be
+ found that contain the Q_OBJECT macro. \c SRCMOC contains the name of all
+ the generated moc files. The value of this variable is typically handled
+ by \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and
+ rarely needs to be modified.
\target SUBDIRS
\section1 SUBDIRS
@@ -3067,18 +3138,18 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 50
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 50
It is essential that the project file in each subdirectory has the same
- name as the subdirectory itself, so that \l {qmake}{ \c qmake}can find it.
- For example, if the subdirectory is called \c myapp then the project file
- in that directory should be called \c myapp.pro.
+ name as the subdirectory itself, so that \l{qmake Manual#qmake}{\c qmake}
+ can find it. For example, if the subdirectory is called \c myapp then the
+ project file in that directory should be called \c myapp.pro.
If you need to ensure that the subdirectories are built in the order in
which they are specified, update the \l{#CONFIG}{CONFIG} variable to
include the \c ordered option:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 51
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 51
It is possible to modify this default behavior of \c SUBDIRS by giving
additional modifiers to \c SUBDIRS elements. Supported modifiers are:
@@ -3102,11 +3173,11 @@
For example, define two subdirectories, both of which reside in a different directory
than the \c SUBDIRS value, and one of the subdirectories must be built before the other:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 149
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 149
For example, define a subdirectory that is only build for emulator builds in Qt for Symbian:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 150
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 150
\target SYMBIAN_VERSION
\section1 SYMBIAN_VERSION
@@ -3122,7 +3193,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 52
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 52
The project file above would produce an executable named \c myapp on
unix and 'myapp.exe' on windows.
@@ -3132,8 +3203,34 @@
\e {This is only used on the Symbian platform.}
- Specifies which platform capabilities the application should have. For more
- information, please refer to the Symbian SDK documentation.
+ Specifies which platform capabilities the application should have. These
+ include the following basic capabilities, but others are also available
+ for signed applications.
+
+ \table
+ \header \o Capability \o Description
+ \row \o LocalServices \o The ability to use local services running on the
+ phone or device, including those which provide
+ local connectivity to other devices.
+ \row \o Location \o Access to the service that provides information
+ about the user's location, from GPS, phone
+ network, or other sources.
+ \row \o NetworkServices \o Use of services that access the phone network,
+ such as dialling a phone number, sending an SMS,
+ or other operations that result in network
+ traffic.
+ \row \o ReadUserData \o Access to the user's private data, such as
+ contact information.
+ \row \o UserEnvironment \o The ability to use services that provide from the
+ user's physical environment, such as the camera or
+ microphone.
+ \row \o WriteUserData \o The ability to write or modify the user's private
+ data.
+ \endtable
+
+ For more information, and a comprehensive list of capabilities, please refer
+ to the Symbian SDK documentation or the \l{Symbian Capabilities} page of
+ the \l{Forum Nokia Wiki}.
\target TARGET.EPOCALLOWDLLDATA
\section1 TARGET.EPOCALLOWDLLDATA
@@ -3152,7 +3249,7 @@
will refuse to run if the minimum size is not available when it starts. For
example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 135
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 135
\target TARGET.EPOCSTACKSIZE
\section1 TARGET.EPOCSTACKSIZE
@@ -3161,7 +3258,7 @@
Specifies the maximum stack size of the application. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 136
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 136
\target TARGET.SID
\section1 TARGET.SID
@@ -3201,21 +3298,23 @@
\section1 TARGET_EXT
- This variable specifies the target's extension. The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable specifies the target's extension. The value of this variable
+ is typically handled by \l {qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 TARGET_x
- This variable specifies the target's extension with a major version number. The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable specifies the target's extension with a major version number.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 TARGET_x.y.z
- This variable specifies the target's extension with version number. The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ This variable specifies the target's extension with version number. The
+ value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\target TEMPLATE
\section1 TEMPLATE
@@ -3242,7 +3341,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 53
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 53
The template can be overridden by specifying a new template type with the
\c -t command line option. This overrides the template type \e after the .pro
@@ -3261,16 +3360,16 @@
\section1 UICIMPLS
This variable contains a list of the generated implementation files by UIC.
- The value of this variable
- is typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be
- modified.
+ The value of this variable is typically handled by
+ \l{qmake Manual#qmake}{\c qmake} or \l{#QMAKESPEC}{qmake.conf} and rarely
+ needs to be modified.
\section1 UICOBJECTS
- This variable is generated from the UICIMPLS variable. The extension of each
- file will have been replaced by .o (Unix) or .obj (Win32). The value of this variable is
- typically handled by \l {qmake}{ \c qmake}or \l{#QMAKESPEC}{qmake.conf} and
- rarely needs to be modified.
+ This variable is generated from the UICIMPLS variable. The extension of
+ each file will have been replaced by .o (Unix) or .obj (Win32). The value
+ of this variable is typically handled by \l{qmake Manual#qmake}{\c qmake}
+ or \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target UI_DIR
\section1 UI_DIR
@@ -3281,7 +3380,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 54
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 54
\target UI_HEADERS_DIR
\section1 UI_HEADERS_DIR
@@ -3291,7 +3390,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 55
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 55
\target UI_SOURCES_DIR
\section1 UI_SOURCES_DIR
@@ -3301,7 +3400,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 56
\target VERSION
\section1 VERSION
@@ -3312,7 +3411,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 57
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 57
\section1 VER_MAJ
@@ -3331,36 +3430,36 @@
\section1 VPATH
- This variable tells \l {qmake}{ \c qmake}where to search for files it cannot
- open. With this you may tell \l {qmake}{ \c qmake}where it may look for things
- like SOURCES, and if it finds an entry in SOURCES that cannot be
- opened it will look through the entire VPATH list to see if it can
- find the file on its own.
+ This variable tells \l{qmake Manual#qmake}{\c qmake} where to search for
+ files it cannot open. With this you may tell
+ \l{qmake Manual#qmake}{\c qmake} where it may look for things like SOURCES,
+ and if it finds an entry in SOURCES that cannot be opened it will look
+ through the entire VPATH list to see if it can find the file on its own.
See also \l{#DEPENDPATH}{DEPENDPATH}.
\section1 YACCIMPLS
- This variable contains a list of yacc source files. The value of
- this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains a list of yacc source files. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\section1 YACCOBJECTS
- This variable contains a list of yacc object files. The value of
- this variable is typically handled by \l {qmake}{ \c qmake}or
- \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
+ This variable contains a list of yacc object files. The value of this
+ variable is typically handled by \l{qmake Manual#qmake}{\c qmake} or
+ \l{#QMAKESPEC}{qmake.conf} and rarely needs to be modified.
\target YACCSOURCES
\section1 YACCSOURCES
This variable contains a list of yacc source files to be included
- in the project. All dependencies, headers and source files will
+ in the project. All dependencies, headers and source files will
automatically be included in the project.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 58
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 58
\section1 _PRO_FILE_
@@ -3389,8 +3488,8 @@
\previouspage qmake Variable Reference
\nextpage Configuring qmake's Environment
- \l {qmake}{ \c qmake}provides built-in functions to allow the contents of
- variables to be processed, and to enable tests to be performed
+ \l{qmake Manual#qmake}{\c qmake} provides built-in functions to allow the
+ contents of variables to be processed, and to enable tests to be performed
during the configuration process. Functions that process the
contents of variables typically return values that can be assigned
to other variables, and these values are obtained by prefixing
@@ -3417,7 +3516,7 @@
Returns the basename of the file specified. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 59
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 59
\section1 CONFIG(config)
[Conditional]
@@ -3430,7 +3529,7 @@
mutually exclusive values) a second parameter can be used to specify a set
of values to consider. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 60
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 60
Because release is considered the active setting (for feature parsing)
it will be the CONFIG used to generate the build file. In the common
@@ -3446,7 +3545,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 61
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 61
The contents of the scope are only processed if the \c drivers
variable contains the value, \c network. If this is the case, the
@@ -3473,19 +3572,19 @@
\section1 error(string)
- This function never returns a value. \l {qmake}{ \c qmake}displays the given
- \e string to the user, and exits. This function should only be used
- for unrecoverable errors.
+ This function never returns a value. \l{qmake Manual#qmake}{\c qmake}
+ displays the given \e string to the user, and exits. This function
+ should only be used for unrecoverable errors.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 62
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 62
\section1 eval(string)
[Conditional]
- Evaluates the contents of the string using \c qmake's syntax rules
- and returns true.
+ Evaluates the contents of the string using
+ \l{qmake Manual#qmake}{\c qmake}'s syntax rules and returns true.
Definitions and assignments can be used in the string to modify the
values of existing variables or create new definitions.
@@ -3504,7 +3603,7 @@
succeeds if any file matches the regular expression specified.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 63
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 63
Note that "/" can be used as a directory separator, regardless of the
platform in use.
@@ -3514,7 +3613,7 @@
Places all the values in \e variablename that match \e substr. \e
substr may be a regular expression, and will be matched accordingly.
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 64
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 64
MY_VAR2 will contain '-Lone -Ltwo -Lthree -Lfour -Lfive', and MY_VAR3 will
contains 'three two three'.
@@ -3531,7 +3630,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 65
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 65
\section1 include(filename)
[Conditional]
@@ -3544,15 +3643,16 @@
You can check whether the file was included by using this function as
the condition for a scope; for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 66
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 66
\section1 infile(filename, var, val)
[Conditional]
- Succeeds if the file \e filename (when parsed by \l {qmake}{ \c qmake}itself)
- contains the variable \e var with a value of \e val; otherwise fails.
- If you do not specify a third argument (\e val), the function will
- only test whether \e var has been declared in the file.
+ Succeeds if the file \e filename (when parsed by
+ \l{qmake Manual#qmake}{\c qmake} itself) contains the variable \e var with
+ a value of \e val; otherwise fails. If you do not specify a third argument
+ (\e val), the function will only test whether \e var has been declared in
+ the file.
\section1 isEmpty(variablename)
[Conditional]
@@ -3562,7 +3662,7 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 67
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 67
\section1 join(variablename, glue, before, after)
@@ -3586,7 +3686,7 @@
This function simply writes a message to the console. Unlike the
\c error() function, this function allows processing to continue.
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 68
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 68
The above line causes "This is a message" to be written to the console.
The use of quotation marks is optional.
@@ -3597,7 +3697,7 @@
\l{qmake Advanced Usage}{in conjunction with a scope} to filter out
messages during builds; for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 69
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 69
\section1 prompt(question)
@@ -3618,7 +3718,7 @@
prints the message:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 70
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 70
\section1 sprintf(string, arguments...)
@@ -3634,13 +3734,13 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 71
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 71
Alternatively, you can use this function to obtain stdout and stderr
from the command, and assign it to a variable. For example, you can
use this to interrogate information about the platform:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 72
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 72
\target unique
\section1 unique(variablename)
@@ -3648,7 +3748,7 @@
This will return a list of values in variable that are unique (that is
with repetitive entries removed). For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 73
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 73
\section1 warning(string)
@@ -3668,18 +3768,19 @@
\target Properties
\section1 Properties
- \l {qmake}{ \c qmake}has a system of persistent information, this allows you to
- \c set a variable in qmake once, and each time qmake is invoked this
- value can be queried. Use the following to set a property in qmake:
+ \l{qmake Manual#qmake}{\c qmake} has a system of persistent information,
+ this allows you to \c set a variable in qmake once, and each time qmake is
+ invoked this value can be queried. Use the following to set a property in
+ qmake:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 74
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 74
The appropriate variable and value should be substituted for
\c VARIABLE and \c VALUE.
To retrieve this information back from qmake you can do:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 75
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 75
\note \c{qmake -query} will only list variables that you have
previously set with \c{qmake -set VARIABLE VALUE}.
@@ -3687,24 +3788,26 @@
This information will be saved into a QSettings object (meaning it
will be stored in different places for different platforms). As
\c VARIABLE is versioned as well, you can set one value in an older
- version of \c qmake, and newer versions will retrieve this value. However,
- if you set \c VARIABLE for a newer version of \c qmake, the older version
- will not use this value. You can however query a specific version of a
- variable if you prefix that version of \l {qmake}{ \c qmake}to \c VARIABLE, as in
- the following example:
+ version of \l{qmake Manual#qmake}{\c qmake}, and newer versions will
+ retrieve this value. However, if you set \c VARIABLE for a newer version
+ of \l{qmake Manual#qmake}{\c qmake}, the older version will not use this
+ value. You can however query a specific version of a variable if you
+ prefix that version of \l{qmake Manual#qmake}{\c qmake} to \c VARIABLE,
+ as in the following example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 76
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 76
- \l {qmake}{ \c qmake}also has the notion of \c builtin properties, for example you can
- query the installation of Qt for this version of \l {qmake}{ \c qmake}with the
+ \l{qmake Manual#qmake}{\c qmake} also has the notion of \c builtin
+ properties, for example you can query the installation of Qt for this
+ version of \l{qmake Manual#qmake}{\c qmake} with the
\c QT_INSTALL_PREFIX property:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 77
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 77
- These built-in properties cannot have a version prefixed to them as
- they are not versioned, and each version of \l {qmake}{ \c qmake}will have its own
- built-in set of these values. The list below outlines the built-in
- properties:
+ These built-in properties cannot have a version prefixed to them as they
+ are not versioned, and each version of \l{qmake Manual#qmake}{\c qmake}
+ will have its own built-in set of these values. The list below outlines
+ the built-in properties:
\list
\o \c QT_INSTALL_PREFIX - Where the version of Qt this qmake is built for resides
@@ -3715,27 +3818,27 @@
Finally, these values can be queried in a project file with a special
notation such as:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 78
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 78
\target QMAKESPEC
\section1 QMAKESPEC
- \l {qmake}{ \c qmake}requires a platform and compiler description file which
- contains many default values used to generate appropriate Makefiles.
- The standard Qt distribution comes with many of these files, located
- in the \c mkspecs subdirectory of the Qt installation.
+ \l{qmake Manual#qmake}{\c qmake}requires a platform and compiler
+ description file which contains many default values used to generate
+ appropriate Makefiles. The standard Qt distribution comes with many of
+ these files, located in the \c mkspecs subdirectory of the Qt installation.
The \c QMAKESPEC environment variable can contain any of the following:
\list
\o A complete path to a directory containing a \c{qmake.conf} file.
- In this case \l {qmake}{ \c qmake}will open the \c{qmake.conf} file from within that
- directory. If the file does not exist, \l {qmake}{ \c qmake}will exit with an
- error.
- \o The name of a platform-compiler combination. In this case, \c qmake
- will search in the directory specified by the \c mkspecs subdirectory
- of the data path specified when Qt was compiled (see
- QLibraryInfo::DataPath).
+ In this case \l{qmake Manual#qmake}{\c qmake} will open the
+ \c{qmake.conf} file from within that directory. If the file does not
+ exist, \l{qmake Manual#qmake}{\c qmake} will exit with an error.
+ \o The name of a platform-compiler combination. In this case,
+ \l{qmake Manual#qmake}{\c qmake} will search in the directory specified
+ by the \c mkspecs subdirectory of the data path specified when Qt was
+ compiled (see QLibraryInfo::DataPath).
\endlist
\bold{Note:} The \c QMAKESPEC path will automatically be added to the
@@ -3746,31 +3849,32 @@
It is common on Unix to also use the build tool to install applications
and libraries; for example, by invoking \c{make install}. For this reason,
- \l {qmake}{ \c qmake}has the concept of an install set, an object which contains
- instructions about the way part of a project is to be installed.
- For example, a collection of documentation files can be described in the
- following way:
+ \l{qmake Manual#qmake}{\c qmake}has the concept of an install set, an
+ object which contains instructions about the way part of a project is to
+ be installed. For example, a collection of documentation files can be
+ described in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 79
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 79
- The \c path member informs \l {qmake}{ \c qmake}that the files should be installed in
- \c /usr/local/program/doc (the path member), and the \c files member
- specifies the files that should be copied to the installation directory.
- In this case, everything in the \c docs directory will be coped to
- \c /usr/local/program/doc.
+ The \c path member informs \l{qmake Manual#qmake}{\c qmake} that the files
+ should be installed in \c /usr/local/program/doc (the path member), and the
+ \c files member specifies the files that should be copied to the
+ installation directory. In this case, everything in the \c docs directory
+ will be coped to \c /usr/local/program/doc.
Once an install set has been fully described, you can append it to the
install list with a line like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 80
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 80
- \l {qmake}{ \c qmake}will ensure that the specified files are copied to the installation
- directory. If you require greater control over this process, you can also
- provide a definition for the \c extra member of the object. For example,
- the following line tells \l {qmake}{ \c qmake}to execute a series of commands for this
+ \l{qmake Manual#qmake}{\c qmake} will ensure that the specified files are
+ copied to the installation directory. If you require greater control over
+ this process, you can also provide a definition for the \c extra member of
+ the object. For example, the following line tells
+ \l{qmake Manual#qmake}{\c qmake} to execute a series of commands for this
install set:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 81
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 81
The \c unix scope
(see \l{qmake Advanced Usage#Scopes and Conditions}{Scopes and Conditions})
@@ -3782,23 +3886,24 @@
in the other members of the object are performed.
If you append a built-in install set to the \c INSTALLS variable and do
- not specify \c files or \c extra members, \l {qmake}{ \c qmake}will decide what needs to
- be copied for you. Currently, the only supported built-in install set is
- \c target:
+ not specify \c files or \c extra members, \l{qmake Manual#qmake}{\c qmake}
+ will decide what needs to be copied for you. Currently, the only supported
+ built-in install set is \c target:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 82
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 82
- In the above lines, \l {qmake}{ \c qmake}knows what needs to be copied, and will handle
- the installation process automatically.
+ In the above lines, \l{qmake Manual#qmake}{\c qmake} knows what needs to
+ be copied, and will handle the installation process automatically.
\target cache
\section1 Cache File
- The cache file is a special file \l {qmake}{ \c qmake}reads to find settings not specified
- in the \c qmake.conf file, project files, or at the command line. If
- \c -nocache is not specified when \l {qmake}{ \c qmake}is run, it will try to find a file
- called \c{.qmake.cache} in parent directories of the current directory. If
- it fails to find this file, it will silently ignore this step of processing.
+ The cache file is a special file \l{qmake Manual#qmake}{\c qmake} reads to
+ find settings not specified in the \c qmake.conf file, project files, or
+ at the command line. If \c -nocache is not specified when
+ \l{qmake Manual#qmake}{\c qmake} is run, it will try to find a file called
+ \c{.qmake.cache} in parent directories of the current directory. If it
+ fails to find this file, it will silently ignore this step of processing.
If it finds a \c{.qmake.cache} file then it will process this file first before
it processes the project file.
@@ -3806,67 +3911,73 @@
\target LibDepend
\section1 Library Dependencies
- Often when linking against a library, \l {qmake}{ \c qmake}relies on the underlying
- platform to know what other libraries this library links against, and
- lets the platform pull them in. In many cases, however, this is not
- sufficent. For example, when statically linking a library, no other
- libraries are linked to, and therefore no dependencies to those
- libraries are created. However, an application that later links
+ Often when linking against a library, \l{qmake Manual#qmake}{\c qmake}
+ relies on the underlying platform to know what other libraries this
+ library links against, and lets the platform pull them in. In many cases,
+ however, this is not sufficent. For example, when statically linking a
+ library, no other libraries are linked to, and therefore no dependencies
+ to those libraries are created. However, an application that later links
against this library will need to know where to find the symbols that
- the static library will require. To help with this situation, \c qmake
- attempts to follow a library's dependencies where appropriate, but
- this behavior must be explicitly enabled by following two steps.
+ the static library will require. To help with this situation,
+ \l{qmake Manual#qmake}{\c qmake} attempts to follow a library's
+ dependencies where appropriate, but this behavior must be explicitly
+ enabled by following two steps.
The first step is to enable dependency tracking in the library itself.
- To do this you must tell \l {qmake}{ \c qmake}to save information about the library:
+ To do this you must tell \l{qmake Manual#qmake}{\c qmake} to save
+ information about the library:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 83
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 83
- This is only relevant to the \c lib template, and will be ignored for
- all others. When this option is enabled, \l {qmake}{ \c qmake}will create a file
- ending in .prl which will save some meta-information about the
- library. This metafile is just like an ordinary project file, but only
+ This is only relevant to the \c lib template, and will be ignored for all
+ others. When this option is enabled, \l{qmake Manual#qmake}{\c qmake} will
+ create a file ending in .prl which will save some meta-information about
+ the library. This metafile is just like an ordinary project file, but only
contains internal variable declarations. You are free to view this file
- and, if it is deleted, \l {qmake}{ \c qmake}will know to recreate it when necessary,
- either when the project file is later read, or if a dependent library
- (described below) has changed. When installing this library, by
- specifying it as a target in an \c INSTALLS declaration, \l {qmake}{ \c qmake}will
- automatically copy the .prl file to the installation path.
+ and, if it is deleted, \l{qmake Manual#qmake}{\c qmake} will know to
+ recreate it when necessary, either when the project file is later read, or
+ if a dependent library (described below) has changed. When installing this
+ library, by specifying it as a target in an \c INSTALLS declaration,
+ \l{qmake Manual#qmake}{\c qmake} will automatically copy the .prl file to
+ the installation path.
The second step in this process is to enable reading of this meta
information in the applications that use the static library:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 84
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 84
- When this is enabled, \l {qmake}{ \c qmake}will process all libraries linked to
- by the application and find their meta-information. \l {qmake}{ \c qmake}will use
- this to determine the relevant linking information, specifically adding
- values to the application project file's list of \c DEFINES as well as
- \c LIBS. Once \l {qmake}{ \c qmake}has processed this file, it will then look through
- the newly introduced libraries in the \c LIBS variable, and find their
- dependent .prl files, continuing until all libraries have been resolved.
- At this point, the Makefile is created as usual, and the libraries are
- linked explicitly against the application.
+ When this is enabled, \l{qmake Manual#qmake}{\c qmake} will process all
+ libraries linked to by the application and find their meta-information.
+ \l{qmake Manual#qmake}{\c qmake} will use this to determine the relevant
+ linking information, specifically adding values to the application project
+ file's list of \c DEFINES as well as \c LIBS. Once
+ \l{qmake Manual#qmake}{\c qmake} has processed this file, it will then
+ look through the newly introduced libraries in the \c LIBS variable, and
+ find their dependent .prl files, continuing until all libraries have been
+ resolved. At this point, the Makefile is created as usual, and the
+ libraries are linked explicitly against the application.
The internals of the .prl file are left closed so they can easily
change later. They are not designed to be changed by hand, should only
- be created by \c qmake, and should not be transferred between operating
- systems as they may contain platform-dependent information.
+ be created by \{qmake Manual#qmake}{\c qmake}, and should not be
+ transferred between operating systems as they may contain
+ platform-dependent information.
\target Extensions
\section1 File Extensions
- Under normal circumstances \l {qmake}{ \c qmake}will try to use appropriate file extensions
- for your platform. However, it is sometimes necessary to override the default
- choices for each platform and explicitly define file extensions for \l {qmake}{ \c qmake}to use.
- This is achieved by redefining certain built-in variables; for example the extension
- used for \l moc files can be redefined with the following assignment in a project
- file:
+ Under normal circumstances \l{qmake Manual#qmake}{\c qmake} will try to
+ use appropriate file extensions for your platform. However, it is
+ sometimes necessary to override the default choices for each platform and
+ explicitly define file extensions for \l{qmake Manual#qmake}{\c qmake} to
+ use. This is achieved by redefining certain built-in variables; for
+ example the extension used for \l moc files can be redefined with the
+ following assignment in a project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 85
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 85
The following variables can be used to redefine common file extensions recognized
- by \c qmake:
+ by \l{qmake Manual#qmake}{\c qmake}:
\list
\o QMAKE_EXT_MOC - This modifies the extension placed on included moc files.
@@ -3884,45 +3995,47 @@
accept a list of values:
\list
- \o QMAKE_EXT_CPP - Causes \l {qmake}{ \c qmake}to interpret all files with these suffixes as
- C++ source files.
- \o QMAKE_EXT_H - Causes \l {qmake}{ \c qmake}to interpret all files with these suffixes as
- C and C++ header files.
+ \o QMAKE_EXT_CPP - Causes \l{qmake Manual#qmake}{\c qmake} to interpret
+ all files with these suffixes as C++ source files.
+ \o QMAKE_EXT_H - Causes \l qmake Manual#{qmake}{\c qmake} to interpret
+ all files with these suffixes as C and C++ header files.
\endlist
\target Customizing
\section1 Customizing Makefile Output
- \l {qmake}{ \c qmake}tries to do everything expected of a cross-platform build tool.
- This is often less than ideal when you really need to run special
- platform-dependent commands. This can be achieved with specific instructions
- to the different \l {qmake}{ \c qmake}backends.
+ \l{qmake Manual#qmake}{\c qmake} tries to do everything expected of a
+ cross-platform build tool. This is often less than ideal when you really
+ need to run special platform-dependent commands. This can be achieved with
+ specific instructions to the different \l{qmake Manual#qmake}{\c qmake}
+ backends.
Customization of the Makefile output is performed through an object-style
- API as found in other places in \c qmake. Objects are defined automatically
- by specifying their members; for example:
+ API as found in other places in \l{qmake Manual#qmake}{\c qmake}. Objects
+ are defined automatically by specifying their members; for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 86
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 86
- The definitions above define a \l {qmake}{ \c qmake}target called \c mytarget, containing
- a Makefile target called \c{.buildfile} which in turn is generated with
- the \c touch command. Finally, the \c{.depends} member specifies that
- \c mytarget depends on \c mytarget2, another target that is defined afterwards.
- \c mytarget2 is a dummy target; it is only defined to echo some text to
- the console.
+ The definitions above define a \l{qmake Manual#qmake}{\c qmake} target
+ called \c mytarget, containing a Makefile target called \c{.buildfile}
+ which in turn is generated with the \c touch command. Finally, the
+ \c{.depends} member specifies that \c mytarget depends on \c mytarget2,
+ another target that is defined afterwards. \c mytarget2 is a dummy target;
+ it is only defined to echo some text to the console.
- The final step is to instruct \l {qmake}{ \c qmake}that this object is a target to be built:
+ The final step is to instruct \l{qmake Manual#qmake}{\c qmake} that this
+ object is a target to be built:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 87
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 87
- This is all you need to do to actually build custom targets. Of course, you may
- want to tie one of these targets to the
- \l{qmake Variable Reference#TARGET}{qmake build target}. To do this, you simply need to
- include your Makefile target in the list of
+ This is all you need to do to actually build custom targets. Of course,
+ you may want to tie one of these targets to the
+ \l{qmake Variable Reference#TARGET}{qmake build target}. To do this, you
+ simply need to include your Makefile target in the list of
\l{qmake Variable Reference#PRE_TARGETDEPS}{PRE_TARGETDEPS}.
- The following tables are an overview of the options available to you with the QMAKE_EXTRA_TARGETS
- variable.
+ The following tables are an overview of the options available to you with
+ the QMAKE_EXTRA_TARGETS variable.
\table
\header
@@ -3967,15 +4080,16 @@
For convenience, there is also a method of customizing projects
for new compilers or preprocessors:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 88
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 88
With the above definitions, you can use a drop-in replacement for moc if one
is available. The commands is executed on all arguments given to the
\c NEW_HEADERS variable (from the \c input member), and the result is written
to the file defined by the \c output member; this file is added to the
other source files in the project.
- Additionally, \l {qmake}{ \c qmake}will execute \c depend_command to generate dependency
- information, and place this information in the project as well.
+ Additionally, \l{qmake Manual#qmake}{\c qmake} will execute
+ \c depend_command to generate dependency information, and place this
+ information in the project as well.
These commands can easily be placed into a cache file, allowing subsequent
project files to add arguments to \c NEW_HEADERS.
@@ -4024,71 +4138,71 @@
\table
\header
- \o Member
- \o Description
- \row
- \o commands
- \o The commands used for for generating the output from the input.
- \row
- \o CONFIG
- \o Specific configuration options for the custom compiler. See the CONFIG table for details.
- \row
- \o depend_command
- \o Specifies a command used to generate the list of dependencies for the output.
- \row
- \o dependency_type
- \o Specifies the type of file the output is, if it is a known type (such as TYPE_C,
- TYPE_UI, TYPE_QRC) then it is handled as one of those type of files.
- \row
- \o depends
- \o Specifies the dependencies of the output file.
- \row
- \o input
- \o The variable that contains the files that should be processed with the custom compiler.
- \row
- \o name
- \o A description of what the custom compiler is doing. This is only used in some backends.
- \row
- \o output
- \o The filename that is created from the custom compiler.
- \row
- \o output_function
- \o Specifies a custom qmake function that is used to specify the filename to be created.
- \row
- \o variables
- \o Indicates that the variables specified here are replaced with $(QMAKE_COMP_VARNAME) when refered to
- in the pro file as $(VARNAME).
- \row
- \o variable_out
- \o The variable that the files created from the output should be added to.
- \endtable
-
- List of members specific to the CONFIG option:
-
- \table
- \header
- \o Member
- \o Description
- \row
- \o combine
- \o Indicates that all of the input files are combined into a single output file.
- \row
- \o target_predeps
- \o Indicates that the output should be added to the list of PRE_TARGETDEPS.
- \row
- \o explicit_dependencies
- \o The dependencies for the output only get generated from the depends member and from
- nowhere else.
- \row
- \o no_link
- \o Indicates that the output should not be added to the list of objects to be linked in.
- \endtable
+ \o Member
+ \o Description
+ \row
+ \o commands
+ \o The commands used for for generating the output from the input.
+ \row
+ \o CONFIG
+ \o Specific configuration options for the custom compiler. See the CONFIG table for details.
+ \row
+ \o depend_command
+ \o Specifies a command used to generate the list of dependencies for the output.
+ \row
+ \o dependency_type
+ \o Specifies the type of file the output is, if it is a known type (such as TYPE_C,
+ TYPE_UI, TYPE_QRC) then it is handled as one of those type of files.
+ \row
+ \o depends
+ \o Specifies the dependencies of the output file.
+ \row
+ \o input
+ \o The variable that contains the files that should be processed with the custom compiler.
+ \row
+ \o name
+ \o A description of what the custom compiler is doing. This is only used in some backends.
+ \row
+ \o output
+ \o The filename that is created from the custom compiler.
+ \row
+ \o output_function
+ \o Specifies a custom qmake function that is used to specify the filename to be created.
+ \row
+ \o variables
+ \o Indicates that the variables specified here are replaced with $(QMAKE_COMP_VARNAME) when refered to
+ in the pro file as $(VARNAME).
+ \row
+ \o variable_out
+ \o The variable that the files created from the output should be added to.
+ \endtable
+
+ List of members specific to the CONFIG option:
+
+ \table
+ \header
+ \o Member
+ \o Description
+ \row
+ \o combine
+ \o Indicates that all of the input files are combined into a single output file.
+ \row
+ \o target_predeps
+ \o Indicates that the output should be added to the list of PRE_TARGETDEPS.
+ \row
+ \o explicit_dependencies
+ \o The dependencies for the output only get generated from the depends member and from
+ nowhere else.
+ \row
+ \o no_link
+ \o Indicates that the output should not be added to the list of objects to be linked in.
+ \endtable
\note Symbian platform specific: Generating objects to be linked in is
not supported on the Symbian platform, so either the \c CONFIG option
\c no_link or variable \c variable_out should always be defined for
extra compilers.
-
+
*/
/*!
@@ -4098,12 +4212,13 @@
\previouspage qmake Platform Notes
\nextpage Using Precompiled Headers
- Many \l {qmake}{ \c qmake}project files simply describe the sources and header files used
- by the project, using a list of \c{name = value} and \c{name += value}
- definitions. \l {qmake}{ \c qmake}also provides other operators, functions, and scopes
- that can be used to process the information supplied in variable declarations.
- These advanced features allow Makefiles to be generated for multiple platforms
- from a single project file.
+ Many \l{qmake Manual#qmake}{\c qmake} project files simply describe the
+ sources and header files used by the project, using a list of
+ \c{name = value} and \c{name += value} definitions.
+ \l{qmake Manual#qmake}{\c qmake} also provides other operators, functions,
+ and scopes that can be used to process the information supplied in
+ variable declarations. These advanced features allow Makefiles to be
+ generated for multiple platforms from a single project file.
\tableofcontents
@@ -4112,28 +4227,29 @@
In many project files, the assignment (\c{=}) and append (\c{+=}) operators can
be used to include all the information about a project. The typical pattern of
use is to assign a list of values to a variable, and append more values
- depending on the result of various tests. Since \l {qmake}{ \c qmake}defines certain
- variables using default values, it is sometimes necessary to use the removal
- (\c{-=}) operator to filter out values that are not required. The following
- operators can be used to manipulate the contents of variables.
+ depending on the result of various tests. Since
+ \l{qmake Manual#qmake}{\c qmake} defines certain variables using default
+ values, it is sometimes necessary to use the removal (\c{-=}) operator to
+ filter out values that are not required. The following operators can be
+ used to manipulate the contents of variables.
The \c = operator assigns a value to a variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 89
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 89
The above line sets the \c TARGET variable to \c myapp. This will overwrite any
values previously set for \c TARGET with \c myapp.
The \c += operator appends a new value to the list of values in a variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 90
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 90
The above line appends \c QT_DLL to the list of pre-processor defines to be put
in the generated Makefile.
The \c -= operator removes a value from the list of values in a variable:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 91
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 91
The above line removes \c QT_DLL from the list of pre-processor defines to be
put in the generated Makefile.
@@ -4142,7 +4258,7 @@
if it is not already present. This prevents values from being included many
times in a variable. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 92
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 92
In the above line, \c QT_DLL will only be added to the list of pre-processor
defines if it is not already defined. Note that the
@@ -4153,7 +4269,7 @@
The \c ~= operator replaces any values that match a regular expression with
the specified value:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 93
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 93
In the above line, any values in the list that start with \c QT_D or \c QT_T are
replaced with \c QT.
@@ -4161,7 +4277,7 @@
The \c $$ operator is used to extract the contents of a variable, and can be
used to pass values between variables or supply them to functions:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 94
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 94
\target Scopes
\section1 Scopes
@@ -4188,9 +4304,9 @@
\snippet doc/src/snippets/qmake/scopes.pro 0
The above code will add the \c paintwidget_win.cpp file to the sources listed
- in the generated Makefile if \l {qmake}{ \c qmake}is used on a Windows platform.
- If \l {qmake}{ \c qmake}is used on a platform other than Windows, the define will be
- ignored.
+ in the generated Makefile if \l{qmake Manual#qmake}{\c qmake} is used on a
+ Windows platform. If \l{qmake Manual#qmake}{\c qmake} is used on a
+ platform other than Windows, the define will be ignored.
The conditions used in a given scope can also be negated to provide an
alternative set of declarations that will be processed only if the
@@ -4215,17 +4331,17 @@
You may also use the \c : operator to perform single line conditional
assignments; for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 95
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 95
The above line adds \c QT_DLL to the \c DEFINES variable only on the
Windows platform.
Generally, the \c : operator behaves like a logical AND operator, joining
together a number of conditions, and requiring all of them to be true.
- There is also the \c | operator to act like a logical OR operator, joining
- together a number of conditions, and requiring only one of them to be true.
+ There is also the \c | operator to act like a logical OR operator, joining
+ together a number of conditions, and requiring only one of them to be true.
- \snippet doc/src/snippets/qmake/scopes.pro 4
+ \snippet doc/src/snippets/qmake/scopes.pro 4
You can also provide alternative declarations to those within a scope by
using an \c else scope. Each \c else scope is processed if the conditions
@@ -4233,15 +4349,15 @@
This allows you to write complex tests when combined with other scopes
(separated by the \c : operator as above). For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 96
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 96
\section2 Configuration and Scopes
The values stored in the
- \l{qmake-project-files.html#GeneralConfiguration}{\c CONFIG variable}
- are treated specially by \c qmake. Each of the possible values can be
- used as the condition for a scope. For example, the list of values
- held by \c CONFIG can be extended with the \c opengl value:
+ \l{qmake-project-files.html#GeneralConfiguration}{\c CONFIG variable} are
+ treated specially by \l{qmake Manual#qmake}{\c qmake}. Each of the possible
+ values can be used as the condition for a scope. For example, the list of
+ values held by \c CONFIG can be extended with the \c opengl value:
\snippet doc/src/snippets/qmake/configscopes.pro 0
@@ -4284,12 +4400,13 @@
\section1 Variables
Many of the variables used in project files are special variables that
- \l {qmake}{ \c qmake}uses when generating Makefiles, such as \c DEFINES, \c SOURCES,
- and \c HEADERS. It is possible for you to create variables for your own
- use; \l {qmake}{ \c qmake}creates new variables with a given name when it encounters
- an assignment to that name. For example:
+ \l{qmake Manual#qmake}{\c qmake} uses when generating Makefiles, such as
+ \c DEFINES, \c SOURCES, and \c HEADERS. It is possible for you to create
+ variables for your own use; \l{qmake Manual#qmake}{\c qmake} creates new
+ variables with a given name when it encounters an assignment to that name.
+ For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 97
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 97
There are no restricitions on what you do to your own variables, as \c
qmake will ignore them unless it needs to evaluate them when processing
@@ -4298,26 +4415,27 @@
You can also assign the value of a current variable to another
variable by prefixing $$ to the variable name. For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 98
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 98
Now the MY_DEFINES variable contains what is in the DEFINES variable at
this point in the project file. This is also equivalent to:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 99
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 99
The second notation allows you to append the contents of the variable to
another value without separating the two with a space. For example, the
following will ensure that the final executable will be given a name
that includes the project template being used:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 100
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 100
Variables can be used to store the contents of environment variables.
- These can be evaluated at the time that \l {qmake}{ \c qmake}is run, or included
- in the generated Makefile for evaluation when the project is built.
+ These can be evaluated at the time that \l{qmake Manual#qmake}{\c qmake}
+ is run, or included in the generated Makefile for evaluation when the
+ project is built.
- To obtain the contents of an environment value when \l {qmake}{ \c qmake}is run,
- use the \c $$(...) operator:
+ To obtain the contents of an environment value when
+ \l{qmake Manual#qmake}{\c qmake}is run, use the \c $$(...) operator:
\snippet doc/src/snippets/qmake/environment.pro 0
@@ -4345,17 +4463,17 @@
For example, a \QD plugin can be installed alongside \QD's built-in
plugins if the following declaration is made in its project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 101
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 101
\target VariableProcessingFunctions
\section1 Variable Processing Functions
- \l {qmake}{ \c qmake}provides a selection of built-in functions to allow the
- contents of variables to be processed. These functions process the
- arguments supplied to them and return a value, or list of values, as
- a result. In order to assign a result to a variable, it is necessary
- to use the \c $$ operator with this type of function in the same way
- used to assign contents of one variable to another:
+ \l{qmake Manual#qmake}{\c qmake} provides a selection of built-in
+ functions to allow the contents of variables to be processed. These
+ functions process the arguments supplied to them and return a value, or
+ list of values, as a result. In order to assign a result to a variable,
+ it is necessary to use the \c $$ operator with this type of function in
+ the same way used to assign contents of one variable to another:
\snippet doc/src/snippets/qmake/functions.pro 1
@@ -4366,7 +4484,7 @@
contents of variables. These functions can be defined in the following
way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 102
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 102
The following example function takes a variable name as its only
argument, extracts a list of values from the variable with the
@@ -4378,9 +4496,9 @@
\target ConditionalFunctions
\section1 Conditional Functions
- \l {qmake}{ \c qmake}provides built-in functions that can be used as conditions
- when writing scopes. These functions do not return a value, but
- instead indicate "success" or "failure":
+ \l{qmake Manual#qmake}{\c qmake} provides built-in functions that can be
+ used as conditions when writing scopes. These functions do not return a
+ value, but instead indicate "success" or "failure":
\snippet doc/src/snippets/qmake/functions.pro 3
@@ -4395,13 +4513,13 @@
\section1 Adding New Configuration Features
- \l {qmake}{ \c qmake}lets you create your own \e features that can be included in
- project files by adding their names to the list of values specified by
- the \c CONFIG variable. Features are collections of custom functions and
- definitions in \c{.prf} files that can reside in one of many standard
- directories. The locations of these directories are defined in a number
- of places, and \l {qmake}{ \c qmake}checks each of them in the following order when
- it looks for \c{.prf} files:
+ \l{qmake Manual#qmake}{\c qmake} lets you create your own \e features that
+ can be included in project files by adding their names to the list of
+ values specified by the \c CONFIG variable. Features are collections of
+ custom functions and definitions in \c{.prf} files that can reside in one
+ of many standard directories. The locations of these directories are
+ defined in a number of places, and \l{qmake Manual#qmake}{\c qmake} checks
+ each of them in the following order when it looks for \c{.prf} files:
\list 1
\o In a directory listed in the \c QMAKEFEATURES environment variable;
@@ -4435,12 +4553,12 @@
For example, consider the following assignment in a project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 103
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 103
- With this addition to the \c CONFIG variable, \l {qmake}{ \c qmake}will search the
- locations listed above for the \c myfeatures.prf file after it has
- finished parsing your project file. On Unix systems, it will look for
- the following file:
+ With this addition to the \c CONFIG variable,
+ \l{qmake Manual#qmake}{\c qmake} will search the locations listed above for
+ the \c myfeatures.prf file after it has finished parsing your project file.
+ On Unix systems, it will look for the following file:
\list 1
\o \c $QMAKEFEATURES/myfeatures.prf (for each directory listed in the
@@ -4480,8 +4598,8 @@
specified file. Each subsequent compilation is faster because the
stable code does not need to be recompiled.
- \l {qmake}{ \c qmake}supports the use of precompiled headers (PCH) on some
- platforms and build environments, including:
+ \l{qmake Manual#qmake}{\c qmake} supports the use of precompiled headers
+ (PCH) on some platforms and build environments, including:
\list
\o Windows
\list
@@ -4512,7 +4630,7 @@
\section3 Example: \c stable.h
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 104
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.cpp 104
Note that a precompiled header file needs to separate C includes from
C++ includes, since the precompiled header file for C files may not
@@ -4524,11 +4642,12 @@
To make your project use PCH, you only need to define the
\c PRECOMPILED_HEADER variable in your project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 105
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 105
- \l {qmake}{ \c qmake}will handle the rest, to ensure the creation and use of the
- precompiled header file. You do not need to include the precompiled
- header file in \c HEADERS, as \l {qmake}{ \c qmake}will do this if the configuration
+ \l{qmake Manual#qmake}{\c qmake} will handle the rest, to ensure the
+ creation and use of the precompiled header file. You do not need to
+ include the precompiled header file in \c HEADERS, as
+ \l{qmake Manual#qmake}{\c qmake} will do this if the configuration
supports PCH.
All platforms that support precompiled headers have the configuration
@@ -4536,7 +4655,7 @@
conditional blocks in your project file to add settings when using PCH.
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 106
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 106
\section1 Notes on Possible Issues
@@ -4545,7 +4664,7 @@
declarations may cause two different object files with the same name to
be generated:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 107
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 107
To avoid potential conflicts like these, it is good practice to ensure
that header files that will be precompiled are given distinctive names.
@@ -4593,8 +4712,9 @@
\previouspage qmake Manual
\nextpage qmake Common Projects
- This tutorial teaches you how to use \c qmake. We recommend that
- you read the \l {qmake}{ \c qmake}user guide after completing this tutorial.
+ This tutorial teaches you how to use \l{qmake Manual#qmake}{\c qmake}. We
+ recommend that you read the \l{qmake Manual#qmake}{\c qmake} user guide
+ after completing this tutorial.
\section1 Starting off Simple
@@ -4612,25 +4732,25 @@
the application is that it's written in Qt. First, using your favorite
plain text editor, create a file called \c hello.pro in
\c{examples/qmake/tutorial}. The first thing you need to do is add the
- lines that tell \l {qmake}{ \c qmake}about the source and header files that are part
- of your development project.
+ lines that tell \l{qmake Manual#qmake}{\c qmake} about the source and
+ header files that are part of your development project.
We'll add the source files to the project file first. To do this you
need to use the \l{qmake Variable Reference#SOURCES}{SOURCES} variable.
Just start a new line with \c {SOURCES +=} and put hello.cpp after it.
You should have something like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 108
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 108
We repeat this for each source file in the project, until we end up
with the following:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 109
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 109
If you prefer to use a Make-like syntax, with all the files listed in
one go you can use the newline escaping like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 110
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 110
Now that the source files are listed in the project file, the header
files must be added. These are added in exactly the same way as source
@@ -4640,7 +4760,7 @@
Once you have done this, your project file should look something like
this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 111
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 111
The target name is set automatically; it is the same as the project
file, but with the suffix appropriate to the platform. For example, if
@@ -4648,29 +4768,30 @@
on Windows and \c hello on Unix. If you want to use a different name
you can set it in the project file:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 112
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 112
The final step is to set the \l{qmake Variable Reference#CONFIG}{CONFIG}
variable. Since this is a Qt application, we need to put \c qt on the
- \c CONFIG line so that \l {qmake}{ \c qmake}will add the relevant libraries to be
- linked against and ensure that build lines for \c moc and \c uic are
- included in the generated Makefile.
+ \c CONFIG line so that \l{qmake Manual#qmake}{\c qmake} will add the
+ relevant libraries to be linked against and ensure that build lines for
+ \c moc and \c uic are included in the generated Makefile.
The finished project file should look like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 113
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 113
- You can now use \l {qmake}{ \c qmake}to generate a Makefile for your application.
- On the command line, in your project's directory, type the following:
+ You can now use \l{qmake Manual#qmake}{\c qmake} to generate a Makefile
+ for your application. On the command line, in your project's directory,
+ type the following:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 114
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 114
Then type \c make or \c nmake depending on the compiler you use.
- For Visual Studio users, \l {qmake}{ \c qmake}can also generate \c .dsp or
- \c .vcproj files, for example:
+ For Visual Studio users, \l{qmake Manual#qmake}{\c qmake} can also
+ generate \c .dsp or \c .vcproj files, for example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 115
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 115
\section1 Making an Application Debuggable
@@ -4682,11 +4803,11 @@
For example:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 116
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 116
- Use \l {qmake}{ \c qmake}as before to generate a Makefile and you will be able to
- obtain useful information about your application when running it in
- a debugging environment.
+ Use \l{qmake Manual#qmake}{\c qmake} as before to generate a Makefile and
+ you will be able to obtain useful information about your application when
+ running it in a debugging environment.
\section1 Adding Platform-Specific Source Files
@@ -4697,44 +4818,46 @@
hellounix.cpp. We can't just add these to the \c SOURCES
variable since this will put both files in the Makefile. So, what we
need to do here is to use a scope which will be processed depending on
- which platform \l {qmake}{ \c qmake}is run on.
+ which platform \l{qmake Manual#qmake}{\c qmake} is run on.
A simple scope that will add in the platform-dependent file for
Windows looks like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 117
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 117
- So if \l {qmake}{ \c qmake}is run on Windows, it will add \c hellowin.cpp to the
- list of source files. If \l {qmake}{ \c qmake}is run on any other platform, it
+ So if \l{qmake Manual#qmake}{\c qmake} is run on Windows, it will add
+ \c hellowin.cpp to the list of source files. If
+ \l{qmake Manual#qmake}{\c qmake} is run on any other platform, it
will simply ignore it. Now all that is left to be done is to create a
scope for the Unix-specific file.
When you have done that, your project file should now look
something like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 118
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 118
- Use \l {qmake}{ \c qmake}as before to generate a Makefile.
+ Use \l{qmake Manual#qmake}{\c qmake} as before to generate a Makefile.
\section1 Stopping qmake If a File Doesn't Exist
You may not want to create a Makefile if a certain file doesn't exist.
We can check if a file exists by using the exists() function. We can
- stop \l {qmake}{ \c qmake}from processing by using the error() function. This
- works in the same way as scopes do. Simply replace the scope condition
- with the function. A check for a \c main.cpp file looks like this:
+ stop \l{qmake Manual#qmake}{\c qmake} from processing by using the error()
+ function. This works in the same way as scopes do. Simply replace the
+ scope condition with the function. A check for a \c main.cpp file looks
+ like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 119
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 119
The \c{!} symbol is used to negate the test; i.e. \c{exists( main.cpp )}
is true if the file exists, and \c{!exists( main.cpp )} is true if the
file doesn't exist.
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 120
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 120
- Use \l {qmake}{ \c qmake}as before to generate a makefile. If you rename \c
- main.cpp temporarily, you will see the message and \l {qmake}{ \c qmake}will stop
- processing.
+ Use \l{qmake Manual#qmake}{\c qmake} as before to generate a makefile.
+ If you rename \c main.cpp temporarily, you will see the message and
+ \l{qmake Manual#qmake}{\c qmake} will stop processing.
\section1 Checking for More than One Condition
@@ -4749,15 +4872,16 @@
the other inside it. Put the settings to be processed inside the last
scope, like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 121
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 121
Nested scopes can be joined together using colons, so the final
project file looks like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 122
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 122
- That's it! You have now completed the tutorial for \c qmake, and are
- ready to write project files for your development projects.
+ That's it! You have now completed the tutorial for
+ \l{qmake Manual#qmake}{\c qmake}, and are ready to write project files for
+ your development projects.
*/
/*!
@@ -4767,10 +4891,10 @@
\previouspage qmake Tutorial
\nextpage Using qmake
- This chapter describes how to set up \l {qmake}{ \c qmake}project files for three
- common project types that are based on Qt. Although all kinds of
- projects use many of the same variables, each of them use project-specific
- variables to customize output files.
+ This chapter describes how to set up \l{qmake Manual#qmake}{\c qmake}
+ project files for three common project types that are based on Qt.
+ Although all kinds of projects use many of the same variables, each of
+ them use project-specific variables to customize output files.
Platform-specific variables are not described here; we refer the reader to
the \l{Deploying Qt Applications} document for information on issues such as
@@ -4786,9 +4910,10 @@
\section2 The app Template
- The \c app template tells \l {qmake}{ \c qmake}to generate a Makefile that will build
- an application. With this template, the type of application can be specified
- by adding one of the following options to the \c CONFIG variable definition:
+ The \c app template tells \l{qmake Manual#qmake}{\c qmake} to generate a
+ Makefile that will build an application. With this template, the type of
+ application can be specified by adding one of the following options to the
+ \c CONFIG variable definition:
\table
\header \o Option \o Description
@@ -4797,9 +4922,9 @@
application.
\endtable
- When using this template the following \l {qmake}{ \c qmake}system variables are recognized.
- You should use these in your .pro file to specify information about your
- application.
+ When using this template the following \l{qmake Manual#qmake}{\c qmake}
+ system variables are recognized. You should use these in your .pro file to
+ specify information about your application.
\list
\o HEADERS - A list of all the header files for the application.
@@ -4821,12 +4946,12 @@
\o RES_FILE - Windows only: A resource file to be linked against for the application.
\endlist
- You only need to use the system variables that you have values for,
- for instance, if you do not have any extra INCLUDEPATHs then you do not
- need to specify any, \l {qmake}{ \c qmake}will add in the default ones needed.
- For instance, an example project file might look like this:
+ You only need to use the system variables that you have values for, for
+ instance, if you do not have any extra INCLUDEPATHs then you do not need
+ to specify any, \l{qmake Manual#qmake}{\c qmake} will add in the default
+ ones needed. For instance, an example project file might look like this:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 123
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 123
For items that are single valued, e.g. the template or the destination
directory, we use "="; but for multi-valued items we use "+=" to \e
@@ -4839,11 +4964,11 @@
\section2 The lib Template
- The \c lib template tells \l {qmake}{ \c qmake}to generate a Makefile that will
- build a library. When using this template, in addition to the system variables
- mentioned above for the \c app template the \c VERSION variable is
- supported. You should use these in your .pro file to specify
- information about the library.
+ The \c lib template tells \l{qmake Manual#qmake}{\c qmake} to generate a
+ Makefile that will build a library. When using this template, in addition
+ to the system variables mentioned above for the \c app template the
+ \c VERSION variable is supported. You should use these in your .pro file
+ to specify information about the library.
When using the \c lib template, the following options can be added to the
\c CONFIG variable to determine the type of library that is built:
@@ -4870,10 +4995,10 @@
\section1 Building a Plugin
Plugins are built using the \c lib template, as described in the previous
- section. This tells \l {qmake}{ \c qmake}to generate a Makefile for the project that will
- build a plugin in a suitable form for each platform, usually in the form of a
- library. As with ordinary libraries, the \c VERSION variable is used to specify
- information about the plugin.
+ section. This tells \l{qmake Manual#qmake}{\c qmake} to generate a
+ Makefile for the project that will build a plugin in a suitable form for
+ each platform, usually in the form of a library. As with ordinary
+ libraries, the \c VERSION variable is used to specify information about the plugin.
\list
\o VERSION - The version number of the target library, for example, 2.3.1.
@@ -4908,11 +5033,11 @@
ensure that the resulting targets have different names. Providing different
names for targets ensures that one will not overwrite the other.
- When \l {qmake}{ \c qmake}processes the project file, it will generate a Makefile rule
- to allow the project to be built in both modes. This can be invoked in the
- following way:
+ When \l{qmake Manual#qmake}{\c qmake} processes the project file, it will
+ generate a Makefile rule to allow the project to be built in both modes.
+ This can be invoked in the following way:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 124
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 124
The \c build_all option can be added to the \c CONFIG variable in the
project file to ensure that the project is built in both modes by default:
@@ -4921,14 +5046,14 @@
This allows the Makefile to be processed using the default rule:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 125
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 125
\section2 Installing in Both Modes
The \c build_all option also ensures that both versions of the target
will be installed when the installation rule is invoked:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 126
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 126
It is possible to customize the names of the build targets depending on
the target platform. For example, a library or plugin may be named using a
@@ -4938,7 +5063,7 @@
Note: This was originally used in the customwidgetplugin.pro file, but is
no longer needed there.
\endomit
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 127
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 127
The default behavior in the above snippet is to modify the name used for
the build target when building in debug mode. An \c else clause could be
diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc
index 8924bdb..44b682a 100644
--- a/doc/src/development/qtestlib.qdoc
+++ b/doc/src/development/qtestlib.qdoc
@@ -119,7 +119,7 @@
testfunction.
Example:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 0
For more examples, refer to the \l{QTestLib Tutorial}.
@@ -128,7 +128,7 @@
If you are using \c qmake as your build tool, just add the
following to your project file:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtestlib.pro 1
If you are using other build tools, make sure that you add the location
of the QTestLib header files to your include path (usually \c{include/QtTest}
@@ -217,7 +217,7 @@
To create a benchmark, follow the instructions for creating a test and then add a
QBENCHMARK macro to the test function that you want to benchmark.
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 12
The code inside the QBENCHMARK macro will be measured, and possibly also repeated
several times in order to get an accurate measurement. This depends on the selected
@@ -410,7 +410,7 @@
Then you need to implement the test function itself. The
implementation could look like this:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 8
The \l QVERIFY() macro evaluates the expression passed as its
argument. If the expression evaluates to true, the execution of
@@ -475,7 +475,7 @@
test function. If we add more test data, the function might look like
this:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 11
To prevent that the function ends up being cluttered by repetitive
code, QTestLib supports adding test data to a test function. All
diff --git a/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
new file mode 100644
index 0000000..a36ebbb
--- /dev/null
+++ b/doc/src/examples/activeqt/hierarchy-demo-snippet.qdoc
@@ -0,0 +1,68 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [script]
+<script language="javascript">
+function createSubWidget( form )
+{
+ ParentWidget.createSubWidget( form.nameEdit.value );
+}
+
+function renameSubWidget( form )
+{
+ var SubWidget = ParentWidget.subWidget( form.nameEdit.value );
+ if ( !SubWidget ) {
+ alert( "No such widget " + form.nameEdit.value + "!" );
+ return;
+ }
+ SubWidget.label = form.labelEdit.value;
+ form.nameEdit.value = SubWidget.label;
+}
+
+function setFont( form )
+{
+ ParentWidget.font = form.fontEdit.value;
+}
+</script>
+
+<p>
+This widget can have many children!
+</p>
+<object ID="ParentWidget" CLASSID="CLSID:d574a747-8016-46db-a07c-b2b4854ee75c"
+CODEBASE="http://qt.nokia.com/demos/hierarchy.cab">
+[Object not available! Did you forget to build and register the server?]
+</object><br />
+<form>
+<input type="edit" ID="nameEdit" value="&lt;enter object name&gt;" />
+<input type="button" value="Create" onClick="createSubWidget(this.form)" />
+<input type="edit" ID="labelEdit" />
+<input type="button" value="Rename" onClick="renameSubWidget(this.form)" />
+<br />
+<input type="edit" ID="fontEdit" value="MS Sans Serif" />
+<input type="button" value = "Set Font" onClick="setFont(this.form)" />
+</form>
+//! [script]
diff --git a/doc/src/examples/activeqt/hierarchy-demo.qdocinc b/doc/src/examples/activeqt/hierarchy-demo.qdocinc
index e7cb56e..86bfd87 100644
--- a/doc/src/examples/activeqt/hierarchy-demo.qdocinc
+++ b/doc/src/examples/activeqt/hierarchy-demo.qdocinc
@@ -1,5 +1,4 @@
\raw HTML
-//! [0]
<script language="javascript">
function createSubWidget( form )
{
@@ -39,5 +38,4 @@ CODEBASE="http://qt.nokia.com/demos/hierarchy.cab">
<input type="edit" ID="fontEdit" value="MS Sans Serif" />
<input type="button" value = "Set Font" onClick="setFont(this.form)" />
</form>
-//! [0]
\endraw
diff --git a/doc/src/examples/activeqt/hierarchy.qdoc b/doc/src/examples/activeqt/hierarchy.qdoc
index eb6cc71..791af1f 100644
--- a/doc/src/examples/activeqt/hierarchy.qdoc
+++ b/doc/src/examples/activeqt/hierarchy.qdoc
@@ -25,7 +25,7 @@
**
****************************************************************************/
-/*!
+/*!
\page qaxserver-demo-hierarchy.html
\title Qt Widget Hierarchy
@@ -84,5 +84,5 @@
your WebBrowser to support ActiveX controls, and scripting to be
enabled.
- \snippet examples/activeqt/hierarchy-demo.qdocinc 0
+ \snippet examples/activeqt/hierarchy-demo-snippet.qdoc script
*/
diff --git a/doc/src/examples/arrowpad.qdoc b/doc/src/examples/arrowpad.qdoc
index bb22f83..5e9cc9a 100644
--- a/doc/src/examples/arrowpad.qdoc
+++ b/doc/src/examples/arrowpad.qdoc
@@ -66,7 +66,7 @@
context: it is the context of the texts in the \c ArrowPad class.
The \c Q_OBJECT macro defines \c tr(x) in \c ArrowPad like this:
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.cpp 0
Knowing which class each source text appears in enables \e {Qt
Linguist} to group texts that are logically related together, e.g.
diff --git a/doc/src/examples/containerextension.qdoc b/doc/src/examples/containerextension.qdoc
index 818547c..57295de 100644
--- a/doc/src/examples/containerextension.qdoc
+++ b/doc/src/examples/containerextension.qdoc
@@ -138,7 +138,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_containerextension.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_containerextension.pro 0
The container extension is created as a library, and will be
installed alongside the other \QD plugins when the project is
diff --git a/doc/src/examples/customwidgetplugin.qdoc b/doc/src/examples/customwidgetplugin.qdoc
index f972500..5b6aab6 100644
--- a/doc/src/examples/customwidgetplugin.qdoc
+++ b/doc/src/examples/customwidgetplugin.qdoc
@@ -89,7 +89,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro 0
The custom widget is created as a library, and will be installed
alongside the other \QD plugins when the project is installed
diff --git a/doc/src/examples/editabletreemodel.qdoc b/doc/src/examples/editabletreemodel.qdoc
index 042b745..5edc91b 100644
--- a/doc/src/examples/editabletreemodel.qdoc
+++ b/doc/src/examples/editabletreemodel.qdoc
@@ -131,14 +131,14 @@
In the case shown in the diagram, the piece of information represented
by \bold{a} can be obtained using the standard model/view API:
- \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 0
Since each items holds pieces of data for each column in a given row,
there can be many model indexes that map to the same \c TreeItem object.
For example, the information represented by \bold{b} can be obtained
using the following code:
- \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp 1
The same underlying \c TreeItem would be accessed to obtain information
for the other model indexes in the same row as \bold{b}.
diff --git a/doc/src/examples/fademessage.qdoc b/doc/src/examples/fademessage.qdoc
index b8a09e8..09c1d94 100644
--- a/doc/src/examples/fademessage.qdoc
+++ b/doc/src/examples/fademessage.qdoc
@@ -29,13 +29,9 @@
\example effects/fademessage
\title Fade Message Effect Example
- \raw HTML
- <div style="text-align: center">
- \endraw
+ \div { style="text-align: center"}
\inlineimage fademessageeffect-example.png
\inlineimage fademessageeffect-example-faded.png
- \raw HTML
- </div>
- \endraw
+ \enddiv
*/
diff --git a/doc/src/examples/fancybrowser.qdoc b/doc/src/examples/fancybrowser.qdoc
index b46903d..bc30988 100644
--- a/doc/src/examples/fancybrowser.qdoc
+++ b/doc/src/examples/fancybrowser.qdoc
@@ -26,8 +26,8 @@
****************************************************************************/
/*!
- \example webkit/fancybrowser
- \title Fancy Browser Example
+ \example webkit/fancybrowser
+ \title Fancy Browser Example
The Fancy Browser example shows how to use jQuery with QtWebKit to
create a web browser with special effects and content
diff --git a/doc/src/examples/globalVariables.qdoc b/doc/src/examples/globalVariables.qdoc
index 4629801..224a3a7 100644
--- a/doc/src/examples/globalVariables.qdoc
+++ b/doc/src/examples/globalVariables.qdoc
@@ -101,48 +101,25 @@
The \c xmlpatterns command loads and parses \c globals.gccxml,
runs the XQuery \c reportGlobals.xq, and generates this report:
- \raw HTML
-<html xmlns="http://www.w3.org/1999/xhtml/" xml:lang="en" lang="en">
- <head>
- <title>Global variables report for globals.gccxml</title>
- </head>
- <style type="text/css">
- .details
- {
- text-align: left;
- font-size: 80%;
- color: blue
- }
- .variableName
- {
- font-family: courier;
- color: blue
- }
- </style>
- <body>
- <p class="details">Start report: 2008-12-16T13:43:49.65Z</p>
- <p>Global variables with complex types:</p>
- <ol>
- <li>
- <span class="variableName">mutableComplex1</span> in globals.cpp at line 14</li>
- <li>
- <span class="variableName">mutableComplex2</span> in globals.cpp at line 15</li>
- <li>
- <span class="variableName">constComplex1</span> in globals.cpp at line 16</li>
- <li>
- <span class="variableName">constComplex2</span> in globals.cpp at line 17</li>
- </ol>
- <p>Mutable global variables with primitives types:</p>
- <ol>
- <li>
- <span class="variableName">mutablePrimitive1</span> in globals.cpp at line 1</li>
- <li>
- <span class="variableName">mutablePrimitive2</span> in globals.cpp at line 2</li>
- </ol>
- <p class="details">End report: 2008-12-16T13:43:49.65Z</p>
- </body>
-</html>
- \endraw
+ \div {class="details"}
+ Start report: 2008-12-16T13:43:49.65Z
+ \enddiv
+
+ Global variables with complex types:
+ \list 1
+ \o \span {class="variableName"} {mutableComplex1} in globals.cpp at line 14
+ \o \span {class="variableName"} {mutableComplex2} in globals.cpp at line 15
+ \o \span {class="variableName"} {constComplex1} in globals.cpp at line 16
+ \o \span {class="variableName"} {constComplex2} in globals.cpp at line 17
+ \endlist
+
+ Mutable global variables with primitives types:
+ \list 1
+ \o \span {class="variableName"} {mutablePrimitive1} in globals.cpp at line 1
+ \o \span {class="variableName"} {mutablePrimitive2} in globals.cpp at line 2
+ \endlist
+
+ \div {class="details"} End report: 2008-12-16T13:43:49.65Z \enddiv
\section1 XQuery Code Walk-Through
diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc
index 4210859..3966bf4 100644
--- a/doc/src/examples/icons.qdoc
+++ b/doc/src/examples/icons.qdoc
@@ -147,8 +147,8 @@
render the other six mode/state combinations, QIcon uses the
search algorithm described in the table below:
- \table
- \header \o{2,1} Requested Pixmap \o{8,1} Preferred Alternatives (mode/state)
+ \table 100%
+ \header \o{2,1} Requested Pixmap \o {8,1} Preferred Alternatives (mode/state)
\header \o Mode \o State \o 1 \o 2 \o 3 \o 4 \o 5 \o 6 \o 7 \o 8
\row \o{1,2} Normal \o Off \o \bold N0 \o A0 \o N1 \o A1 \o D0 \o S0 \o D1 \o S1
\row \o On \o N1 \o \bold A1 \o N0 \o A0 \o D1 \o S1 \o D0 \o S0
@@ -278,7 +278,7 @@
If the application is built in debug mode, the \c Q_ASSERT()
macro will expand to
- \snippet doc/src/snippets/code/doc_src_examples_icons.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_icons.cpp 0
In release mode, the macro simply disappear. The mode can be set
in the application's \c .pro file. One way to do so is to add an
diff --git a/doc/src/examples/imageviewer.qdoc b/doc/src/examples/imageviewer.qdoc
index 70f71c8..f1d02c3 100644
--- a/doc/src/examples/imageviewer.qdoc
+++ b/doc/src/examples/imageviewer.qdoc
@@ -149,7 +149,7 @@
\{QWidget::adjustSize()}{adjustSize()} to achieve this, which is
essentially the same as
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 0
In the \c print() slot, we first make sure that an image has been
loaded into the application:
@@ -160,7 +160,7 @@
If the application is built in debug mode, the \c Q_ASSERT() macro
will expand to
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 1
In release mode, the macro simply disappear. The mode can be set
in the application's \c .pro file. One way to do so is to add an
@@ -318,7 +318,7 @@
Whenever we zoom in or out, we need to adjust the scroll bars in
consequence. It would have been tempting to simply call
- \snippet doc/src/snippets/code/doc_src_examples_imageviewer.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_examples_imageviewer.cpp 4
but this would make the top-left corner the focal point, not the
center. Therefore we need to take into account the scroll bar
diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc
index 3439b09..68deae7 100644
--- a/doc/src/examples/qml-examples.qdoc
+++ b/doc/src/examples/qml-examples.qdoc
@@ -29,7 +29,7 @@
\title Animation: Basics Example
\example declarative/animation/basics
- This example shows how to create and combine \l{QML Animation}{animations} in QML.
+ This example shows how to create and combine \l{QML Animation and Transitions}{animations} in QML.
\table
\row
@@ -50,16 +50,16 @@
\title Animation: Behavior Examples
\example declarative/animation/behaviors
- This example shows how to use QML behaviors.
+ This example shows how to use QML behaviors.
\image qml-behaviors-example.png
*/
/*!
- \title Animation: Easing Example
+ \title Animation: Easing Example
\example declarative/animation/easing
- This example shows the different easing modes available for \l{QML Animation}{animations}.
+ This example shows the different easing modes available for \l{QML Animation and Transitions}{animations}.
\image qml-easing-example.png
*/
@@ -122,9 +122,9 @@
\page declarative-cppextensions-reference.html
\title C++ Extensions: Reference examples
- These examples show how QML can be extended from C++ in various ways.
-
- The code for these examples is used throughout the \l {Extending QML in C++} reference
+ These examples show how QML can be extended from C++ in various ways.
+
+ The code for these examples is used throughout the \l {Extending QML Functionalities using C++} reference
documentation, which highlights the main principles demonstrated in each example.
Furthermore, here are additional pages that discuss each example in detail:
@@ -160,7 +160,7 @@
\title LayoutItem Example
\example declarative/cppextensions/qgraphicslayouts/layoutitem
- This example show how to use the LayoutItem element to integrate QML items into an existing
+ This example show how to use the LayoutItem element to integrate QML items into an existing
\l{Graphics View Framework}{Graphics View}-based application.
\image qml-layoutitem-example.png
@@ -169,7 +169,7 @@
\title QGraphicsGridLayout Example
\example declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout
- This example shows how to use QGraphicsGridLayout to lay out QML items. This is
+ This example shows how to use QGraphicsGridLayout to lay out QML items. This is
useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with
QML.
@@ -179,10 +179,10 @@
\title QGraphicsLinearLayout Example
\example declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout
- This example shows how to use QGraphicsLinearLayout to lay out QML items. This is
+ This example shows how to use QGraphicsLinearLayout to lay out QML items. This is
useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with
QML.
-
+
\image qml-qgraphicslinearlayout-example.png
*/
/*!
@@ -198,7 +198,7 @@
\o \l{declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout}{QGraphicsLinearLayout}
\endlist
- Also see \l {Integrating QML with existing Qt UI code} for information on using QML
+ Also see \l {Integrating QML Code with Existing Qt UI Code} for information on using QML
in Qt applications that use the Graphics View framework or ordinary QWidget-based views.
*/
@@ -215,7 +215,7 @@
\title C++ Extensions: Image Provider Example
\example declarative/cppextensions/imageprovider
- This examples shows how to use QDeclarativeImageProvider to serve images
+ This examples shows how to use QDeclarativeImageProvider to serve images
to QML image elements.
\image qml-imageprovider-example.png
@@ -232,6 +232,7 @@
/*!
\title Internationalization Example
\example declarative/i18n
+ \ingroup internationalization
This example shows how to enable text translation in QML.
@@ -567,7 +568,7 @@
\example declarative/toys/clocks
This example displays a set of clocks with different times for different cities.
- Each clock is created by combining \l Image elements with \l Rotation transforms
+ Each clock is created by combining \l Image elements with \l Rotation transforms
and \l SpringAnimation behaviors.
\image qml-clocks-example.png
@@ -615,13 +616,6 @@
*/
/*!
- \title Touch Interaction: Gestures Example
- \example declarative/touchinteraction/gestures
-
- This example shows how to use the GestureArea element.
-*/
-
-/*!
\title Touch Interaction: MouseArea Example
\example declarative/touchinteraction/mousearea
diff --git a/doc/src/examples/qtscriptcustomclass.qdoc b/doc/src/examples/qtscriptcustomclass.qdoc
index f2b4f36..3ee6c95 100644
--- a/doc/src/examples/qtscriptcustomclass.qdoc
+++ b/doc/src/examples/qtscriptcustomclass.qdoc
@@ -46,7 +46,7 @@
scripting environment, \c{ByteArray} objects can be constructed like
so:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 0
\c{ByteArray} objects behave similar to normal \c{Array} objects. Every \c{ByteArray} object has
a \c{length} property, that holds the length of the array. If a new value is assigned to the \c{length}
@@ -55,22 +55,22 @@
Use normal array operations to read or write bytes in the array. The following code sets all the
bytes of an array to a certain value:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 1
When assigning a value to an array element, the value is truncated to eight bits:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 2
Like normal \c{Array} objects, if the array index is greater than the current length
of the array, the array is resized accordingly:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 3
Property names that aren't valid array indexes are treated
like normal object properties (again, the same is the case for normal \c{Array} objects);
in other words, it's perfectly fine to do something like this:
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 4
The above assignment won't affect the contents of the array, but will rather assign a value
to the object property named "foo".
@@ -78,7 +78,7 @@
\c{ByteArray} objects have a set of methods: chop(), equals(), left(), mid(), toBase64() and so on.
These map directly onto the corresponding methods in QByteArray.
- \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp 5
\section1 ByteArray Class Implementation
diff --git a/doc/src/examples/rogue.qdoc b/doc/src/examples/rogue.qdoc
index 94539ad..4df0910 100644
--- a/doc/src/examples/rogue.qdoc
+++ b/doc/src/examples/rogue.qdoc
@@ -190,8 +190,8 @@
\snippet examples/statemachine/rogue/movementtransition.h 2
When \c onTransition() is invoked, we know that we have a
- \l{QEvent::}{KeyPress} event with 2, 4, 6, or 8, i.e., the event
- is already unwrapped.
+ \l{QEvent::}{KeyPress} event with 2, 4, 6, or 8, and can ask \c
+ Window to move the player.
\section1 The Roguelike Tradition
diff --git a/doc/src/examples/simpledommodel.qdoc b/doc/src/examples/simpledommodel.qdoc
index ea380bd..9b4d80e 100644
--- a/doc/src/examples/simpledommodel.qdoc
+++ b/doc/src/examples/simpledommodel.qdoc
@@ -53,7 +53,7 @@
snippet reads the contents of a file into a QDomDocument object and traverses the
document, reading all the plain text that can be found:
- \snippet doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_simpledommodel.cpp 0
In principle, the functions provided by QDomNode can be used to navigate from any
given starting point in a document to the piece of data requested by another component.
diff --git a/doc/src/examples/taskmenuextension.qdoc b/doc/src/examples/taskmenuextension.qdoc
index 0200c2f..b557b8b 100644
--- a/doc/src/examples/taskmenuextension.qdoc
+++ b/doc/src/examples/taskmenuextension.qdoc
@@ -139,7 +139,7 @@
target path for the project and adding it to the list of items to
install:
- \snippet doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_taskmenuextension.pro 0
The task menu extension is created as a library, and will be
installed alongside the other \QD plugins when the project is
diff --git a/doc/src/examples/textfinder.qdoc b/doc/src/examples/textfinder.qdoc
index e92bb98..f5f41d7 100644
--- a/doc/src/examples/textfinder.qdoc
+++ b/doc/src/examples/textfinder.qdoc
@@ -70,7 +70,7 @@
QtUiTools module library. This is done in the \c{textfinder.pro} file
that contains the following lines:
- \snippet doc/src/snippets/code/doc_src_examples_textfinder.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_textfinder.pro 0
\section1 TextFinder Class Definition
diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc
index 3a77a71..a93811e 100644
--- a/doc/src/examples/trollprint.qdoc
+++ b/doc/src/examples/trollprint.qdoc
@@ -132,12 +132,12 @@
second argument "two-sided" in the appropriate \c tr() calls to the
first pair of radio buttons:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 0
and add the second argument "colors" in the appropriate \c tr() calls
for the second pair of radio buttons:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 1
Now run \c lupdate and open \c trollprint_pt.ts with \e {Qt Linguist}. You
should now see two changes.
@@ -177,7 +177,7 @@
the translations. This can be achieved by using a \c TRANSLATOR comment
in the source code:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 2
Try adding these comments to some source files, particularly to
dialog classes, describing the navigation necessary to reach the
@@ -192,7 +192,7 @@
correct. Comments that provide good navigation information can save
them time:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 3
\section1 Troll Print 1.1
diff --git a/doc/src/examples/undoframework.qdoc b/doc/src/examples/undoframework.qdoc
index c5bc279..65104bd 100644
--- a/doc/src/examples/undoframework.qdoc
+++ b/doc/src/examples/undoframework.qdoc
@@ -199,8 +199,7 @@
\snippet examples/tools/undoframework/commands.cpp 8
- \c undo() removes the item from the scene. We need to update the
- scene as ...(ask Andreas)
+ \c undo() removes the item from the scene.
\snippet examples/tools/undoframework/commands.cpp 9
diff --git a/doc/src/examples/worldtimeclockplugin.qdoc b/doc/src/examples/worldtimeclockplugin.qdoc
index 61a214c..8a17004 100644
--- a/doc/src/examples/worldtimeclockplugin.qdoc
+++ b/doc/src/examples/worldtimeclockplugin.qdoc
@@ -176,7 +176,7 @@
is searched by \QD. We do this by specifying a target path for the project
and adding it to the list of items to install:
- \snippet doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro 0
The custom widget is created as a library, and will be installed
alongside the other \QD plugins when the project is installed
diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc
index 7639324..1abeae9 100644
--- a/doc/src/external-resources.qdoc
+++ b/doc/src/external-resources.qdoc
@@ -455,6 +455,31 @@
*/
/*!
+ \externalpage https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words
+ \title JavaScript Reserved Words
+*/
+
+/*!
\externalpage http://publicsuffix.org/
\title publicsuffix.org
*/
+
+/*!
+ \externalpage http://wiki.forum.nokia.com/index.php/Capabilities
+ \title Symbian Capabilities
+*/
+
+/*!
+ \externalpage http://wiki.forum.nokia.com/
+ \title Forum Nokia Wiki
+*/
+
+/*!
+ \externalpage http://wiki.forum.nokia.com/index.php/UID_Q&As_(Symbian_Signed)
+ \title UID Q&As (Symbian Signed)
+*/
+
+/*!
+ \externalpage http://www.symbiansigned.com
+ \title Symbian Signed
+*/
diff --git a/doc/src/files-and-resources/resources.qdoc b/doc/src/files-and-resources/resources.qdoc
index ecf343d..35e6a90 100644
--- a/doc/src/files-and-resources/resources.qdoc
+++ b/doc/src/files-and-resources/resources.qdoc
@@ -130,7 +130,7 @@
In the application, this resource would be registered with code like this:
- \snippet doc/src/snippets/code/doc_src_resources.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_resources.cpp 4
\section2 Compiled-In Resources
@@ -205,7 +205,7 @@
Q_INIT_RESOURCE() with the base name of the \c .qrc file. For
example:
- \snippet doc/src/snippets/code/doc_src_resources.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_resources.cpp 5
Similarly, if you must unload a set of resources explicitly
(because a plugin is being unloaded or the resources are not valid
diff --git a/doc/src/frameworks-technologies/accessible.qdoc b/doc/src/frameworks-technologies/accessible.qdoc
index 1d15dbd..e7bf171 100644
--- a/doc/src/frameworks-technologies/accessible.qdoc
+++ b/doc/src/frameworks-technologies/accessible.qdoc
@@ -256,7 +256,7 @@
variable set to 1. For example, this is set in the following way with
the bash shell:
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc environment
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp environment
Accessibility features are built into Qt by default when the libraries
are configured and built.
diff --git a/doc/src/frameworks-technologies/activeqt-container.qdoc b/doc/src/frameworks-technologies/activeqt-container.qdoc
index 436f375..862408b 100644
--- a/doc/src/frameworks-technologies/activeqt-container.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-container.qdoc
@@ -67,7 +67,7 @@
To build Qt applications that can host COM objects and ActiveX controls
link the application against the QAxContainer module by adding
- \snippet doc/src/snippets/code/doc_src_qaxcontainer.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qaxcontainer.pro 0
to your application's \c .pro file.
@@ -128,7 +128,7 @@
want to use, or integrate it into the build system by adding the type
libraries to the \c TYPELIBS variable in your application's \c .pro file:
- \snippet doc/src/snippets/code/doc_src_qaxcontainer.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qaxcontainer.pro 1
Note that \l dumpcpp might not be able to expose all APIs in the type
library.
diff --git a/doc/src/frameworks-technologies/activeqt-server.qdoc b/doc/src/frameworks-technologies/activeqt-server.qdoc
index 9af2b65..77cacf8 100644
--- a/doc/src/frameworks-technologies/activeqt-server.qdoc
+++ b/doc/src/frameworks-technologies/activeqt-server.qdoc
@@ -60,10 +60,10 @@
An out-of-process executable server is generated from a \c .pro
file like this:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qaxserver.pro 0
To build an in-process server, use a \c .pro file like this:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qaxserver.pro 1
The files \c qaxserver.rc and \c qaxserver.def are part of the
framework and can be used from their usual location (specify a
@@ -91,7 +91,7 @@
Additionally you can specify a version number using the \c VERSION
variable, e.g.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qaxserver.pro 2
The version number specified will be used as the version of the type
library and of the server when registering.
@@ -186,12 +186,12 @@
or any existing QObject subclass. If the class is a subclass of QWidget,
the COM object will be an ActiveX control.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 3
The Q_OBJECT macro is required to provide the meta object information
about the widget to the ActiveQt framework.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 4
Use the Q_CLASSINFO() macro to specify the COM identifiers for the COM
object. \c ClassID and \c InterfaceID are required, while \c EventsID is
@@ -201,7 +201,7 @@
You can specify additional attributes for each of your classes; see
\l{Class Information and Tuning} for details.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 5
Use the Q_PROPERTY() macro to declare properties for the ActiveX control.
@@ -216,7 +216,7 @@
your implementation of QAxFactory::create.
\endfootnote
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 6
The ActiveQt framework will expose properties and public slots as ActiveX
properties and methods, and signals as ActiveX events, and convert between
@@ -428,7 +428,7 @@
To make the properties bindable for the ActiveX client, use multiple
inheritance from the QAxBindable class:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 7
When implementing the property write functions, use the
QAxBindable class's requestPropertyChange() and propertyChanged()
@@ -453,7 +453,7 @@
an implementation of a QAxFactory. The easist way to do this is to use a set
of macros:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 8
This will export \c MyWidget and \c MyWidget2 as COM objects that can be
created by COM clients, and will register \c MySubType as a type that can
@@ -470,7 +470,7 @@
server. Use QAxFactory::isServer() to create and run a standard
application interface, or to prevent a stand-alone execution:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 9
This is however not necessary as ActiveQt provides a default implementation
of a main function. The default implemenation calls QAxFactory::startServer(),
@@ -512,7 +512,7 @@
macro, the QAxFactory subclass had no appropriate constructor.
Provide a public class constructor like
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 10
for your factory class.
@@ -560,7 +560,7 @@
your installer process, resolve the \c DllRegisterServer symbol and
call the function:
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 11
\section3 Distributing Servers over the Internet
@@ -766,7 +766,7 @@
own API, and is available in the "Insert Objects" dialog of Microsoft
Office applications.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 15
\section2 Developing Licensed Components
@@ -782,7 +782,7 @@
To mark a Qt class as licensed specify a "LicenseKey" using the
Q_CLASSINFO() macro.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 16
The key is required to be able to create an instance of \c MyLicensedControl
on a machine that is not licensed itself. The licensed developer can now
@@ -805,12 +805,12 @@
Create a new subclass of QAxAggregated and use multiple inheritance
to subclass additional COM interface classes.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 17
Reimplement the QAxAggregated::queryInterface() function to
support the additional COM interfaces.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 18
Since \c ISomeCOMInterface is a subclass of \c IUnknown you will
have to implement the \c QueryInterface(), \c AddRef(), and \c
@@ -820,7 +820,7 @@
returned by the QAxAggregated::controllingUnknown() function,
e.g.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 19
Do not support the \c IUnknown interface itself in your
\l{QAxAggregated::queryInterface()}{queryInterface()}
@@ -833,5 +833,5 @@
QAxBindable::createAggregate() to return a new object of the
QAxAggregated subclass.
- \snippet doc/src/snippets/code/doc_src_qaxserver.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qaxserver.cpp 20
*/
diff --git a/doc/src/frameworks-technologies/containers.qdoc b/doc/src/frameworks-technologies/containers.qdoc
index 991588e..f28e5dc 100644
--- a/doc/src/frameworks-technologies/containers.qdoc
+++ b/doc/src/frameworks-technologies/containers.qdoc
@@ -205,7 +205,7 @@
Here's an example custom data type that meets the requirement of
an assignable data type:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 0
If we don't provide a copy constructor or an assignment operator,
C++ provides a default implementation that performs a
@@ -306,7 +306,7 @@
Here's a typical loop for iterating through all the elements of a
QList<QString> in order and printing them to the console:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 1
It works as follows: The QList to iterate over is passed to the
QListIterator constructor. At that point, the iterator is located
@@ -319,7 +319,7 @@
Here's how to iterate backward in a QList:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 2
The code is symmetric with iterating forward, except that we
start by calling \l{QListIterator::toBack()}{toBack()}
@@ -358,7 +358,7 @@
QMutableListIterator. Here's an example where we remove all
odd numbers from a QList<int> using QMutableListIterator:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 3
The next() call in the loop is made every time. It jumps over the
next item in the list. The
@@ -368,13 +368,13 @@
the iterator, so it is safe to continue using it. This works just
as well when iterating backward:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 4
If we just want to modify the value of an existing item, we can
use \l{QMutableListIterator::setValue()}{setValue()}. In the code
below, we replace any value larger than 128 with 128:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 5
Just like \l{QMutableListIterator::remove()}{remove()},
\l{QMutableListIterator::setValue()}{setValue()} operates on the
@@ -387,7 +387,7 @@
operations, we don't even need
\l{QMutableListIterator::setValue()}{setValue()}:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 6
As mentioned above, QLinkedList's, QVector's, and QSet's iterator
classes have exactly the same API as QList's. We will now turn to
@@ -410,7 +410,7 @@
The following example removes all (capital, country) pairs where
the capital's name ends with "City":
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 7
QMapIterator also provides a key() and a value() function that
operate directly on the iterator and that return the key and
@@ -418,7 +418,7 @@
example, the following code copies the contents of a QMap into a
QHash:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 8
If we want to iterate through all the items with the same
value, we can use \l{QMapIterator::findNext()}{findNext()}
@@ -426,7 +426,7 @@
Here's an example where we remove all the items with a particular
value:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 9
\section2 STL-Style Iterators
@@ -473,7 +473,7 @@
Here's a typical loop for iterating through all the elements of a
QList<QString> in order and converting them to lowercase:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 10
Unlike \l{Java-style iterators}, STL-style iterators point
directly at items. The begin() function of a container returns an
@@ -493,7 +493,7 @@
decrement the iterator \e before we access the item. This
requires a \c while loop:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 11
In the code snippets so far, we used the unary \c * operator to
retrieve the item (of type QString) stored at a certain iterator
@@ -504,7 +504,7 @@
For read-only access, you can use const_iterator, constBegin(),
and constEnd(). For example:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 12
The following table summarizes the STL-style iterators' API:
@@ -536,7 +536,7 @@
value() function to retrieve the value. For example, here's how
we would print all items in a QMap to the console:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 13
Thanks to \l{implicit sharing}, it is very inexpensive for a
function to return a container per value. The Qt API contains
@@ -545,7 +545,7 @@
using an STL iterator, you should always take a copy of the
container and iterate over the copy. For example:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 14
This problem doesn't occur with functions that return a const or
non-const reference to a container.
@@ -567,35 +567,35 @@
statement. For example, here's how to use \c foreach to iterate
over a QLinkedList<QString>:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 15
The \c foreach code is significantly shorter than the equivalent
code that uses iterators:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 16
Unless the data type contains a comma (e.g., \c{QPair<int,
int>}), the variable used for iteration can be defined within the
\c foreach statement:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 17
And like any other C++ loop construct, you can use braces around
the body of a \c foreach loop, and you can use \c break to leave
the loop:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 18
With QMap and QHash, \c foreach accesses the value component of
the (key, value) pairs. If you want to iterate over both the keys
and the values, you can use iterators (which are fastest), or you
can write code like this:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 19
For a multi-valued map:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 20
Qt automatically takes a copy of the container when it enters a
\c foreach loop. If you modify the container as you are
@@ -611,12 +611,12 @@
In addition to \c foreach, Qt also provides a \c forever
pseudo-keyword for infinite loops:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 21
If you're worried about namespace pollution, you can disable
these macros by adding the following line to your \c .pro file:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 22
\section1 Other Container-Like Classes
@@ -736,7 +736,7 @@
Consider the following code, which builds a QString from another
QString:
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 23
We build the string \c out dynamically by appending one character
to it at a time. Let's assume that we append 15000 characters to
diff --git a/doc/src/frameworks-technologies/dbus-adaptors.qdoc b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
index 7494f2d..82545db 100644
--- a/doc/src/frameworks-technologies/dbus-adaptors.qdoc
+++ b/doc/src/frameworks-technologies/dbus-adaptors.qdoc
@@ -85,14 +85,14 @@
using an adaptor.
A sample usage of QDBusAbstractAdaptor is as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 0
The code above would create an interface that could be represented more or less in the following
canonical representation:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 1
This adaptor could be used in the application's main function as follows
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 2
Break-down analysis:
\tableofcontents
@@ -100,7 +100,7 @@
\section1 The header
The header of the example is:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 3
The code does the following:
\list
@@ -112,10 +112,10 @@
\section1 The properties
The properties are declared as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 4
And are implemented as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 5
The code declares three properties: one of them is a read-write property called "caption" of
string type. The other two are read-only, also of the string type.
@@ -129,7 +129,7 @@
\section1 The constructor
The constructor:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 6
The constructor does the following:
\list
@@ -149,7 +149,7 @@
\section1 Slots/methods
The public slots in the example (which will be exported as D-Bus methods) are the following:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 7
This snippet of code defines 4 methods with different properties each:
\list 1
@@ -176,7 +176,7 @@
\section1 Signals
The signals in this example are defined as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 8
However, signal definition isn't enough: signals have to be emitted. One simple way of emitting
signals is to connect another signal to them, so that Qt's signal handling system chains them
@@ -187,7 +187,7 @@
When simple signal-to-signal connection isn't enough, one can use a private slot do do some
work. This is what was done for the mainWindowHasFocus signal:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 9
This private slot (which will not be exported as a method via D-Bus) was connected to the
\c focusChanged signal in the adaptor's constructor. It is therefore able to shape the
@@ -291,7 +291,7 @@
\l{QDBusMessage::setDelayedReply()}{QDBusMessage::setDelayedReply(true)}
that the response will be sent later.
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 10
The use of
\l{QDBusConnection::send()}{QDBusConnection::sessionBus().send(data->reply)}
@@ -303,7 +303,7 @@
using the \c QDBusMessage object that was obtained. In our example, the
reply code could be something as follows:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 11
As can be seen in the example, when a delayed reply is in place,
the return value(s) from the slot will be ignored by QtDBus. They
@@ -473,7 +473,7 @@
You can use this macro in your own adaptors by placing it before your method's return value
(which must be "void") in the class declaration, as shown in the example:
- \snippet doc/src/snippets/code/doc_src_qdbusadaptors.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qdbusadaptors.cpp 12
Its presence in the method implementation (outside the class declaration) is optional.
diff --git a/doc/src/frameworks-technologies/graphicsview.qdoc b/doc/src/frameworks-technologies/graphicsview.qdoc
index f689446..1903df5 100644
--- a/doc/src/frameworks-technologies/graphicsview.qdoc
+++ b/doc/src/frameworks-technologies/graphicsview.qdoc
@@ -95,7 +95,7 @@
descending stacking order (i.e., the first returned item is topmost,
and the last item is bottom-most).
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 0
QGraphicsScene's event propagation architecture schedules scene events
for delivery to items, and also manages propagation between items. If
@@ -126,7 +126,7 @@
enable OpenGL support, you can set a QGLWidget as the viewport by
calling QGraphicsView::setViewport().
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 1
The view receives input events from the keyboard and mouse, and
translates these to scene events (converting the coordinates used
@@ -333,7 +333,7 @@
Here is an example of how to implement zoom and rotate slots in a
subclass of QGraphicsView:
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 2
The slots could be connected to \l{QToolButton}{QToolButtons} with
\l{QAbstractButton::autoRepeat}{autoRepeat} enabled.
@@ -353,7 +353,7 @@
a QPainter to either of the rendering functions. This example shows
how to print the whole scene into a full page, using QPrinter.
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 3
The difference between the scene and view rendering functions is that
one operates in scene coordinates, and the other in view coordinates.
@@ -364,7 +364,7 @@
is to render the exact contents of the viewport using the provided
painter.
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 4
When the source and target areas' sizes do not match, the source
contents are stretched to fit into the target area. By passing a
@@ -390,7 +390,7 @@
so in mousePressEvent() or mouseMoveEvent(), you can get the
originating widget pointer from the event. For example:
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 5
To intercept drag and drop events for the scene, you reimplement
QGraphicsScene::dragEnterEvent() and whichever event handlers your
@@ -449,7 +449,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_graphicsview.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_graphicsview.cpp 6
\section2 Item Groups
diff --git a/doc/src/frameworks-technologies/implicit-sharing.qdoc b/doc/src/frameworks-technologies/implicit-sharing.qdoc
index 8938d9e..46567e9 100644
--- a/doc/src/frameworks-technologies/implicit-sharing.qdoc
+++ b/doc/src/frameworks-technologies/implicit-sharing.qdoc
@@ -109,7 +109,7 @@
data in all member functions that change the internal data.
Code fragment:
- \snippet doc/src/snippets/code/doc_src_groups.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_groups.cpp 0
\section1 List of Classes
@@ -124,7 +124,7 @@
concern for the copying overhead.
Example:
- \snippet doc/src/snippets/code/doc_src_groups.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_groups.cpp 1
In this example, \c p1 and \c p2 share data until QPainter::begin()
is called for \c p2, because painting a pixmap will modify it.
diff --git a/doc/src/frameworks-technologies/model-view-programming.qdoc b/doc/src/frameworks-technologies/model-view-programming.qdoc
index 92067b9..58b51e5 100644
--- a/doc/src/frameworks-technologies/model-view-programming.qdoc
+++ b/doc/src/frameworks-technologies/model-view-programming.qdoc
@@ -32,7 +32,7 @@
/*!
\page model-view-programming.html
- \ingroup qt-basic-concepts
+ \ingroup qt-basic-concepts
\title Model/View Programming
\brief A guide to Qt's extensible model/view architecture.
@@ -328,7 +328,7 @@
contain a pointer to the model that created them, and this prevents
confusion when working with more than one model.
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 0
Model indexes provide \e temporary references to pieces of information, and
can be used to retrieve or modify data via the model. Since models may
@@ -355,7 +355,7 @@
item by specifying its row and column numbers to the model, and we receive
an index that represents the item:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 1
Models that provide interfaces to simple, single level data structures like
lists and tables do not need any other information to be provided but, as
@@ -371,7 +371,7 @@
index that refers to an item of data by passing the relevant row and
column numbers to the model.
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 2
Top level items in a model are always referenced by specifying
\c QModelIndex() as their parent item. This is discussed in the next
@@ -392,7 +392,7 @@
about the item's parent. Outside the model, the only way to refer to an
item is through a model index, so a parent model index must also be given:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 3
\table
\row \i \inlineimage modelview-treemodel.png
@@ -403,12 +403,12 @@
Items "A" and "C" are represented as top-level siblings in the model:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 4
Item "A" has a number of children. A model index for item "B" is
obtained with the following code:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 5
\endtable
\section3 Item roles
@@ -423,7 +423,7 @@
corresponding to the item, and by specifying a role to obtain the type
of data we want:
- \snippet doc/src/snippets/code/doc_src_model-view-programming.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_model-view-programming.cpp 6
\table
\row \i \inlineimage modelview-roles.png
diff --git a/doc/src/frameworks-technologies/phonon.qdoc b/doc/src/frameworks-technologies/phonon.qdoc
index 1456eae6..9eb56ea 100644
--- a/doc/src/frameworks-technologies/phonon.qdoc
+++ b/doc/src/frameworks-technologies/phonon.qdoc
@@ -165,7 +165,7 @@
The \c .pro file for a project needs the following line to be added:
- \snippet doc/src/snippets/code/doc_src_phonon.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_phonon.pro 0
Phonon comes with several widgets that provide functionality
commonly associated with multimedia players - notably SeekSlider
diff --git a/doc/src/frameworks-technologies/plugins-howto.qdoc b/doc/src/frameworks-technologies/plugins-howto.qdoc
index b332d57..15b1547 100644
--- a/doc/src/frameworks-technologies/plugins-howto.qdoc
+++ b/doc/src/frameworks-technologies/plugins-howto.qdoc
@@ -109,12 +109,12 @@
straightforward, here is the class definition (\c
mystyleplugin.h):
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.cpp 0
Ensure that the class implementation is located in a \c .cpp file
(including the class definition):
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.cpp 1
(Note that QStylePlugin is case insensitive, and the lower-case
version of the key is used in our
@@ -127,7 +127,7 @@
you might want to set a style explicitly in code. To apply a
style, use code like this:
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.cpp 2
Some plugin classes require additional functions to be
implemented. See the class documentation for details of the
@@ -284,12 +284,12 @@
the required plugins to your build using \c QTPLUGIN.
For example, in your \c main.cpp:
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.cpp 4
In the \c .pro file for your application, you need the following
entry:
- \snippet doc/src/snippets/code/doc_src_plugins-howto.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_plugins-howto.pro 5
It is also possible to create your own static plugins, by
following these steps:
diff --git a/doc/src/frameworks-technologies/qthelp.qdoc b/doc/src/frameworks-technologies/qthelp.qdoc
index 42bc482..f4d75b6 100644
--- a/doc/src/frameworks-technologies/qthelp.qdoc
+++ b/doc/src/frameworks-technologies/qthelp.qdoc
@@ -218,7 +218,7 @@
we get the actual help contents by calling fileData() and display
the document to the user.
- \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qthelp.cpp 6
For further information on how to use the API, have a look at
the QHelpEngine class reference.
diff --git a/doc/src/frameworks-technologies/richtext.qdoc b/doc/src/frameworks-technologies/richtext.qdoc
index 089f84d..313cf46 100644
--- a/doc/src/frameworks-technologies/richtext.qdoc
+++ b/doc/src/frameworks-technologies/richtext.qdoc
@@ -145,11 +145,11 @@
Although QTextEdit makes it easy to display and edit rich text, documents
can also be used independently of any editor widget, for example:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 0
Alternatively, they can be extracted from an existing editor:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 1
This flexibility enables applications to handle multiple rich text
documents without the overhead of multiple editor widgets, or requiring
@@ -728,24 +728,24 @@
A text editor widget can be constructed and used to display HTML in the
following way:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 2
By default, the text editor contains a document with a root frame, inside
which is an empty text block. This document can be obtained so that it can
be modified directly by the application:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 3
The text editor's cursor may also be used to edit a document:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 4
Although a document can be edited using many cursors at once, a QTextEdit
only displays a single cursor at a time. Therefore, if we want to update the
editor to display a particular cursor or its selection, we need to set the
editor's cursor after we have modified the document:
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 5
\section1 Selecting Text
@@ -833,7 +833,7 @@
We give an example of the latter technique from the list. We assume that
the text edit is visible.
- \snippet doc/src/snippets/code/doc_src_richtext.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_richtext.cpp 6
\omit
Ideas for other sections:
diff --git a/doc/src/frameworks-technologies/unicode.qdoc b/doc/src/frameworks-technologies/unicode.qdoc
index b4a9347..d2a6500 100644
--- a/doc/src/frameworks-technologies/unicode.qdoc
+++ b/doc/src/frameworks-technologies/unicode.qdoc
@@ -125,12 +125,12 @@
QString provides implicit casting from \c{const char *}
so that things like
- \snippet doc/src/snippets/code/doc_src_unicode.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_unicode.cpp 0
will work. There is also a function, QObject::tr(), that provides
translation support, like this:
- \snippet doc/src/snippets/code/doc_src_unicode.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_unicode.cpp 1
QObject::tr() maps from \c{const char *} to a Unicode string, and
uses installable QTranslator objects to do the mapping.
@@ -151,11 +151,11 @@
fast functions for mapping to and from them. For example, to open an
application's icon one might do this:
- \snippet doc/src/snippets/code/doc_src_unicode.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_unicode.cpp 2
or
- \snippet doc/src/snippets/code/doc_src_unicode.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_unicode.cpp 3
Regarding output, Qt will do a best-effort conversion from
Unicode to whatever encoding the system and fonts provide.
diff --git a/doc/src/getting-started/examples.qdoc b/doc/src/getting-started/examples.qdoc
index ad97836..ede8a5b 100644
--- a/doc/src/getting-started/examples.qdoc
+++ b/doc/src/getting-started/examples.qdoc
@@ -699,6 +699,7 @@
/*!
\page examples-linguist.html
\ingroup all-examples
+ \ingroup internationalization
\title Qt Linguist Examples
\brief Using Qt Linguist to internationalize your Qt application.
diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc
index ccb9771..8054fc8 100644
--- a/doc/src/getting-started/gettingstartedqml.qdoc
+++ b/doc/src/getting-started/gettingstartedqml.qdoc
@@ -631,7 +631,7 @@
Now that we have our text editor layout, we may now implement the text editor
functionalities in C++. Using QML with C++ enables us to create our application
logic using Qt. We can create a QML context in a C++ application using the
- \l {Using QML in C++ Applications}{Qt's Declarative} classes and display the QML
+ \l {Using QML Bindings in C++ Applications}{Qt's Declarative} classes and display the QML
elements using a Graphics Scene. Alternatively, we can export our C++ code into
a plugin that the \l {QML Viewer}{qmlviewer} tool can read. For our application,
we shall implement the load and save functions in C++ and export it as a plugin.
diff --git a/doc/src/getting-started/how-to-learn-qt.qdoc b/doc/src/getting-started/how-to-learn-qt.qdoc
index 239c8a1..8d9508b 100644
--- a/doc/src/getting-started/how-to-learn-qt.qdoc
+++ b/doc/src/getting-started/how-to-learn-qt.qdoc
@@ -51,7 +51,7 @@
key overviews to deepen your understanding of Qt: The Qt \l{Object
Model} and \l{Signals and Slots}.
- \div{float-left}
+ \div {class="float-left"}
\inlineimage qtdemo-small.png
\enddiv
diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc
index 6d0256e..26ccf88 100644
--- a/doc/src/getting-started/installation.qdoc
+++ b/doc/src/getting-started/installation.qdoc
@@ -1009,78 +1009,113 @@ We hope you will enjoy using Qt.
\image x11_dependencies.png Qt for X11 Dependencies
- \raw HTML
- <style type="text/css" id="colorstyles">
- #QtGuiColor { background-color: #98fd00; color: black }
- #QtCoreColor { background-color: #9c9cff; color: black }
- #DefaultColor { background-color: #f6f6dc; color: black }
- #FreetypeColor { background-color: #e6e6fa; color: black }
- #GLColor { background-color: #ffc0cb; color: black }
- #PthreadColor { background-color: #bdb76b; color: black }
- #OptionalColor { background-color: #cae1ff; color: black }
- #SMColor { background-color: #c2fafa; color: black }
- #MiscColor { background-color: #f0f9ff; color: black }
- #GlibColor { background-color: #b3b3b3; color: black }
- </style>
- \endraw
-
The QtGui module and the QtCore module, which provides the non-GUI features required
by QtGui, depend on the libraries described in the following table. To build
Qt from its source code, you will also need to install the development
packages for these libraries for your system.
- \raw HTML
- <table class="generic">
- <thead><tr class="qt-style topAlign"><th>Name</th><th>Library</th><th>Notes</th><th>Configuration options</th><th>Minimum working version
- <tr id="OptionalColor">
- <td> XRender </td><td> libXrender </td><td> X Rendering Extension; used for anti-aliasing</td>
- <td><tt>-xrender</tt> or auto-detected</td><td>0.9.0</td>
- </tr><tr id="OptionalColor">
- <td> Xrandr </td><td> libXrandr </td><td> X Resize and Rotate Extension</td>
- <td><tt>-xrandr</tt> or auto-detected</td><td>1.0.2</td>
- </tr><tr id="OptionalColor">
- <td> Xcursor </td><td> libXcursor </td><td> X Cursor Extension</td>
- <td><tt>-xcursor</tt> or auto-detected</td><td>1.1.4</td>
- </tr><tr id="OptionalColor">
- <td> Xfixes </td><td> libXfixes </td><td> X Fixes Extension</td>
- <td><tt>-xfixes</tt> or auto-detected</td><td>3.0.0</td>
- </tr><tr id="OptionalColor">
- <td> Xinerama </td><td> libXinerama </td><td> Multi-head support</td>
- <td><tt>-xinerama</tt> or auto-detected</td><td>1.1.0</td>
-
- </tr><tr id="OptionalColor">
- <td> Fontconfig </td><td> libfontconfig </td><td> Font customization and configuration</td>
- <td><tt>-fontconfig</tt> or auto-detected</td><td>2.1</td>
- </tr><tr id="OptionalColor">
- <td> FreeType </td><td> libfreetype </td><td> Font engine</td>
- <td></td><td>2.1.3</td>
-
- </tr><tr id="DefaultColor">
- <td> Xi </td><td> libXi </td><td> X11 Input Extensions</td>
- <td><tt>-xinput</tt> or auto-detected</td><td>1.3.0</td>
- </tr><tr id="DefaultColor">
- <td> Xt </td><td> libXt </td><td> Xt Intrinsics</td><td></td><td>0.99</td>
- </tr><tr id="DefaultColor">
- <td> Xext </td><td> libXext </td><td> X Extensions</td><td></td><td>6.4.3</td>
- </tr><tr id="DefaultColor">
- <td> X11 </td><td> libX11 </td><td> X11 Client-Side Library</td><td></td><td>6.2.1</td>
-
- </tr><tr id="SMColor">
- <td> SM </td><td> libSM </td><td> X Session Management</td>
- <td><tt>-sm</tt> or auto-detected</td><td>6.0.4</td>
- </tr><tr id="SMColor">
- <td> ICE </td><td> libICE </td><td> Inter-Client Exchange</td>
- <td><tt>-sm</tt> or auto-detected</td><td>6.3.5</td>
-
- </tr><tr id="GlibColor">
- <td> glib </td><td> libglib-2.0 </td><td> Common event loop handling</td>
- <td><tt>-glib</tt> or auto-detected</td><td>2.8.3</td>
- </tr><tr id="PthreadColor">
- <td> pthread </td><td> libpthread </td><td> Multithreading</td>
- <td></td><td>2.3.5</td>
- </tr></th></tr></thead>
- </table>
- \endraw
+ \table 100%
+ \header
+ \o Name
+ \o Library
+ \o Notes
+ \o Configuration options
+ \o Minimum working version
+ \row {id="OptionalColor"}
+ \o XRender
+ \o libXrender
+ \o X Rendering Extension; used for anti-aliasing
+ \o \tt{-xrender} or auto-detected
+ \o 0.9.0
+ \row {id="OptionalColor"}
+ \o Xrandr
+ \o libXrandr
+ \o X Resize and Rotate Extension
+ \o \tt{-xrandr} or auto-detected
+ \o 1.0.2
+ \row {id="OptionalColor"}
+ \o Xcursor
+ \o libXcursor
+ \o X Cursor Extension
+ \o \tt{-xcursor} or auto-detected
+ \o 1.1.4
+ \row {id="OptionalColor"}
+ \o Xfixes
+ \o libXfixes
+ \o X Fixes Extension
+ \o \tt{-xfixes} or auto-detected
+ \o 3.0.0
+ \row {id="OptionalColor"}
+ \o Xinerama
+ \o libXinerama
+ \o Multi-head support
+ \o \tt{-xinerama} or auto-detected
+ \o 1.1.0
+
+ \row {id="OptionalColor"}
+ \o Fontconfig
+ \o libfontconfig
+ \o Font customization and configuration
+ \o \tt{-fontconfig} or auto-detected
+ \o 2.1
+ \row {id="OptionalColor"}
+ \o FreeType
+ \o libfreetype
+ \o Font engine
+ \o
+ \o 2.1.3
+
+ \row {id="DefaultColor"}
+ \o Xi
+ \o libXi
+ \o X11 Input Extensions
+ \o \tt{-xinput} or auto-detected
+ \o 1.3.0
+ \row {id="DefaultColor"}
+ \o Xt
+ \o libXt
+ \o Xt Intrinsics
+ \o
+ \o 0.99
+ \row {id="DefaultColor"}
+ \o Xext
+ \o libXext
+ \o X Extensions
+ \o
+ \o 6.4.3
+ \row {id="DefaultColor"}
+ \o X11
+ \o libX11
+ \o X11 Client-Side Library
+ \o
+ \o 6.2.1
+
+ \row {id="SMColor"}
+ \o SM
+ \o libSM
+ \o X Session Management
+ \o \tt{-sm} or auto-detected
+ \o 6.0.4
+ \row {id="SMColor"}
+ \o ICE
+ \o libICE
+ \o Inter-Client Exchange
+ \o \tt{-sm} or auto-detected
+ \o 6.3.5
+
+ \row {id="GlibColor"}
+ \o glib
+ \o libglib-2.0
+ \o Common event loop handling
+ \o \tt{-glib} or auto-detected
+ \o 2.8.3
+ \row {id="PthreadColor"}
+ \o pthread
+ \o libpthread
+ \o Multithreading
+ \o
+ \o 2.3.5
+ \endtable
\note You must compile with XRender support to get alpha transparency
support for pixmaps and images.
@@ -1142,7 +1177,7 @@ We hope you will enjoy using Qt.
\brief Setting up the Windows CE environment for Qt.
\previouspage General Qt Requirements
- Qt is known to work with Visual Studio 2005/2008 and the following SDKs for
+ Qt is known to work with Visual Studio 2005/2008/2010 and the following SDKs for
Windows CE development on Windows XP and Windows Vista:
\list
@@ -1180,14 +1215,37 @@ We hope you will enjoy using Qt.
\endlist
\endtable
-
Device manufacturers may prefer to make their own customized version of
Windows CE using Platform Builder. In order for Qt for Windows CE to
support a custom SDK, a build specification needs to be created. More
information on Windows CE Customization can be found
\l{Windows CE - Working with Custom SDKs}{here}.
- \sa {Known Issues}
+ \section3 Requirements
+ \list
+ \o Development environment:
+ \list
+ \o Microsoft Visual Studio 2005 (Standard Edition) or higher
+ \o ActivePerl
+ \endlist
+ \o Footprint
+ \list
+ \o Lean configuration - 4.8 MB
+ \o Full configuration - 8.4 MB
+ \endlist
+ \o Operating Systems
+ \list
+ \o Windows CE 5 or higher
+ \o Windows Mobile 5 or higher
+ \endlist
+ \o Hardware Platform
+ \list
+ \o Supported on ARM, x86
+ \o (Compiles on SH4 and MIPS)
+ \endlist
+ \endlist
+
+ \sa {Known Issues}
*/
/*!
@@ -1332,7 +1390,7 @@ We hope you will enjoy using Qt.
load those that have a matching <key>. \o
\row \o \c {-release } \o Compile and link Qt with debugging turned off. \o
\row \o \c {-debug } \o Compile and link Qt with debugging turned on.
- \o Defualt value.
+ \o Default value.
\row \o \c {-debug-and-release} \o Compile and link two Qt libraries,
with and without debugging turned on. \o This option denotes a default
value and needs to be evaluated. If the evaluation succeeds, the
@@ -1343,28 +1401,28 @@ We hope you will enjoy using Qt.
of Qt. \o
\row \o \c {-developer-build} \o Compile and link Qt with Qt developer
options including auto-tests exporting) \o
- \row \o \c {-shared} \o Create and use shared Qt libraries. \o Defualt
+ \row \o \c {-shared} \o Create and use shared Qt libraries. \o Default
value.
\row \o \c {-static} \o Create and use static Qt libraries. \o
\row \o \c {-ltcg} \o Use Link Time Code Generation. \o Apply to release
builds only.
- \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Defualt
+ \row \o \c {-no-ltcg} \o Do not use Link Time Code Generation. \o Default
value.
\row \o \c {-no-fast} \o Configure Qt normally by generating Makefiles for
- all project files. \o Defualt value.
+ all project files. \o Default value.
\row \o \c {-fast} \o Configure Qt quickly by generating Makefiles only for
library and subdirectory targets. \o All other Makefiles are created as
wrappers which will in turn run qmake.
\row \o \c {-no-exceptions} \o Disable exceptions on platforms that support
it. \o
\row \o \c {-exceptions} \o Enable exceptions on platforms that support it.
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-accessibility} \o Do not compile Windows Active
Accessibility support. \o
\row \o \c {-accessibility} \o Compile Windows Active Accessibility
- support. \o Defualt value.
+ support. \o Default value.
\row \o \c {-no-stl} \o Do not compile STL support. \o
- \row \o \c {-stl} \o Compile STL support. \o Defualt value.
+ \row \o \c {-stl} \o Compile STL support. \o Default value.
\row \o \c {-no-sql-<driver>} \o Disable SQL <driver> entirely, by default
none are turned on. \o
\row \o \c {-qt-sql-<driver>} \o Enable a SQL <driver> in the Qt Library.
@@ -1380,14 +1438,14 @@ We hope you will enjoy using Qt.
version. \o Available values for <api>: desktop - Enable support for
Desktop OpenGL (Default), es1 - Enable support for OpenGL ES Common
Profile, es2 - Enable support for OpenGL ES 2.0.
- \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Defualt value.
+ \row \o \c {-no-openvg} \o Disables OpenVG functionality \o Default value.
\row \o \c {-openvg} \o Enables OpenVG functionality \o Requires EGL
support, typically supplied by an OpenGL or other graphics
implementation.
\row \o \c {-platform <spec> } \o The operating system and compiler you
are building on. \o The default value is %QMAKESPEC%.
\row \o \c {-xplatform <spec> } \o The operating system and compiler you
- are cross compiling to. \o See the README file for a list of supported
+ are cross compiling for. \o See the README file for a list of supported
operating systems and compilers.
\row \o \c {-qtnamespace <namespace>} \o Wraps all Qt library code in
'namespace name {..} \o
@@ -1399,7 +1457,7 @@ We hope you will enjoy using Qt.
\row \o \c {-L <librarypath>} \o Add an explicit library path. \o
\row \o \c {-l <libraryname>} \o Add an explicit library name, residing
in a librarypath. \o
- \row \o \c {-graphicssystem <sys>} \o Specify which graphicssystem should
+ \row \o \c {-graphicssystem <sys>} \o Specify which graphics system should
be used. \o Available values for <sys>: * raster - Software rasterizer,
opengl - Using OpenGL acceleration, experimental!, openvg - Using
OpenVG acceleration, experimental!
@@ -1428,7 +1486,7 @@ We hope you will enjoy using Qt.
succeeds, the feature is included.
\row \o \c {-qt-libmng} \o Use the libmng bundled with Qt. \o
\row \o \c {-system-libmng} \o Use libmng from the operating system.
- \o See See http://www.libmng.com
+ \o See http://www.libmng.com
\row \o \c {-no-libtiff} \o Do not compile TIFF support. \o This option
denotes a default value and needs to be evaluated. If the evaluation
succeeds, the feature is included.
@@ -1450,10 +1508,10 @@ We hope you will enjoy using Qt.
\header \o Option \o Description \o Note
\row \o \c {-no-dsp} \o Do not generate VC++ .dsp files. \o
\row \o \c {-dsp} \o Generate VC++ .dsp files, only if spec "win32-msvc".
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-vcproj} \o Do not generate VC++ .vcproj files. \o
\row \o \c {-vcproj} \o Generate VC++ .vcproj files, only if platform
- "win32-msvc.net". \o Defualt value.
+ "win32-msvc.net". \o Default value.
\row \o \c {-no-incredibuild-xge} \o Do not add IncrediBuild XGE distribution
commands to custom build steps. \o
\row \o \c {-incredibuild-xge} \o Add IncrediBuild XGE distribution commands
@@ -1464,14 +1522,14 @@ We hope you will enjoy using Qt.
If the evaluation succeeds, the feature is included.
\row \o \c {-no-plugin-manifests} \o Do not embed manifests in plugins. \o
\row \o \c {-plugin-manifests} \o Embed manifests in plugins.
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-qmake} \o Do not compile qmake. \o
- \row \o \c {-qmake} \o Compile qmake. \o Defualt value
+ \row \o \c {-qmake} \o Compile qmake. \o Default value
\row \o \c {-dont-process} \o Do not generate Makefiles/Project files. This
will override -no-fast if specified. \o
- \row \o \c {-process} \o Generate Makefiles/Project files. \o Defualt value.
+ \row \o \c {-process} \o Generate Makefiles/Project files. \o Default value.
\row \o \c {-no-rtti} \o Do not compile runtime type information. \o
- \row \o \c {-rtti} \o Compile runtime type information. \o Defualt value.
+ \row \o \c {-rtti} \o Compile runtime type information. \o Default value.
\row \o \c {-no-mmx} \o Do not compile with use of MMX instructions \o
\row \o \c {-mmx} \o Compile with use of MMX instructions \o This option
denotes a default value and needs to be evaluated. If the evaluation
@@ -1506,9 +1564,9 @@ We hope you will enjoy using Qt.
\row \o \c {-no-phonon-backend} \o Do not compile the platform-specific
Phonon backend-plugin \o
\row \o \c {-phonon-backend} \o Compile in the platform-specific Phonon
- backend-plugin \o Defualt value.
+ backend-plugin \o Default value.
\row \o \c {-no-multimedia} \o Do not compile the multimedia module \o
- \row \o \c {-multimedia} \o Compile in multimedia module \o Defualt value.
+ \row \o \c {-multimedia} \o Compile in multimedia module \o Default value.
\row \o \c {-no-audio-backend} \o Do not compile in the platform audio
backend into QtMultimedia \o
\row \o \c {-audio-backend} \o Compile in the platform audio backend into
@@ -1536,7 +1594,7 @@ We hope you will enjoy using Qt.
\row \o \c {-no-declarative-debug} \o Do not build the declarative debugging
support \o
\row \o \c {-declarative-debug} \o Build the declarative debugging support
- \o Defualt value.
+ \o Default value.
\row \o \c {-arch <arch>} \o Specify an architecture. \o Available values for
<arch>: * windows, windowsce, symbian, boundschecker, generic.
\row \o \c {-no-style-<style>} \o Disable <style> entirely. \o
@@ -1547,9 +1605,9 @@ We hope you will enjoy using Qt.
\row \o \c {-no-native-gestures} \o Do not use native gestures on Windows 7.
\o
\row \o \c {-native-gestures} \o Use native gestures on Windows 7.
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-mp} \o Do not use multiple processors for compiling with MSVC
- \o Defualt value.
+ \o Default value.
\row \o \c {-mp} \o Use multiple processors for compiling with MSVC (-MP) \o
\row \o \c {-loadconfig <config>} \o Run configure with the parameters from file
configure_<config>.cache. \o
@@ -1566,7 +1624,7 @@ We hope you will enjoy using Qt.
for Qt for Windows CE on Arm only. This option denotes a default value and
needs to be evaluated. If the evaluation succeeds, the feature is included.
\row \o \c {-no-crt} \o Do not add the C runtime to default deployment rules.
- \o Defualt value.
+ \o Default value.
\row \o \c {-qt-crt} \o Qt identifies C runtime during project generation \o
\row \o \c {-crt <path>} \o Specify path to C runtime used for project
generation. \o
@@ -1576,20 +1634,20 @@ We hope you will enjoy using Qt.
succeeds, the feature is included.
\row \o \c {-signature <file>} \o Use file for signing the target project \o
\row \o \c {-phonon-wince-ds9} \o Enable Phonon Direct Show 9 backend for
- Windows CE \o Defualt value
+ Windows CE \o Default value
\endtable
\section2 Qt for Symbian OS only:
\table
\header \o Option \o Description \o Note
\row \o \c {-no-freetype} \o Do not compile in Freetype2 support.
- \o Defualt value.
+ \o Default value.
\row \o \c {-qt-freetype} \o Use the libfreetype bundled with Qt. \o
\row \o \c {-fpu <flags>} \o VFP type on ARM, supported options:
softvfp(default) |vfpv2 | softvfp+vfpv2 \o
\row \o \c {-no-s60} \o Do not compile in S60 support. \o
\row \o \c {-s60} \o Compile with support for the S60 UI Framework
- \o Defualt value.
+ \o Default value.
\row \o \c {-no-usedeffiles} \o Disable the usage of DEF files. \o
\row \o \c {-usedeffiles} \o Enable the usage of DEF files. \o
\endtable
diff --git a/doc/src/getting-started/tutorials.qdoc b/doc/src/getting-started/tutorials.qdoc
index 5cde056..9fc6699 100644
--- a/doc/src/getting-started/tutorials.qdoc
+++ b/doc/src/getting-started/tutorials.qdoc
@@ -61,7 +61,7 @@
\o{2,1} \l{A Quick Start to Qt Designer}{\bold{Qt Designer}}
\o{2,1} \l{Qt Linguist Manual: Programmers#Tutorials}{\bold {Qt Linguist}}
\row
- \o \image designer-examples.png QtDesigner
+ \o \image designer-examples.png
\o
A quick guide through \QD showing the basic steps to create a
form with this interactive tool.
@@ -72,17 +72,18 @@
tools provided for developers, translators and release managers.
- \row
+\row
\o{2,1} \l{modelview.html}{\bold{ModelView}}
- \o{2,1}
-
+ \o{2,1} \l{thread-basics.html}{\bold {Threads}}
\row
\o \image treeview_sml.png ModelView
- \o This tutorial gives an introduction to ModelView programming using the Qt cross-platform framework
-
\o
+ This tutorial gives an introduction to ModelView programming using the Qt cross-platform framework
+
+ \o \image threads-examples.png Threads
\o
-
+ A short tutorial about thread concepts in general and basic Qt classes to handle threads.
+
\row
\o{2,1} \l{QML Tutorial}{\bold QML Tutorial}
\o{2,1} \l{QML Advanced Tutorial}{\bold SameGame}
diff --git a/doc/src/howtos/appicon.qdoc b/doc/src/howtos/appicon.qdoc
index 86934bc..6d86b22 100644
--- a/doc/src/howtos/appicon.qdoc
+++ b/doc/src/howtos/appicon.qdoc
@@ -62,7 +62,7 @@
Finally, assuming you are using \c qmake to generate your
makefiles, add this line to your \c myapp.pro file:
- \snippet doc/src/snippets/code/doc_src_appicon.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_appicon.pro 1
Regenerate your makefile and your application. The \c .exe file
will now be represented with your icon in Explorer.
@@ -96,7 +96,7 @@
if the name of your icon file is \c{myapp.icns}, and your project
file is \c{myapp.pro}, add this line to \c{myapp.pro}:
- \snippet doc/src/snippets/code/doc_src_appicon.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_appicon.pro 2
This will ensure that \c qmake puts your icons in the proper
place and creates an \c{Info.plist} entry for the icon.
@@ -213,6 +213,6 @@
icon file is \c{myapp.svg}, and your project file is \c{myapp.pro},
add this line to \c{myapp.pro}:
- \snippet doc/src/snippets/code/doc_src_appicon.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_appicon.pro 5
*/
diff --git a/doc/src/howtos/developmentsteps.qdoc b/doc/src/howtos/developmentsteps.qdoc
new file mode 100644
index 0000000..e898bf5
--- /dev/null
+++ b/doc/src/howtos/developmentsteps.qdoc
@@ -0,0 +1,186 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+\page qtdevelopment-steps.html
+\title Qt Development: The Steps from Challenge to Achievement
+
+\section1 The Challenge
+
+One day, your boss runs into your cubicle and exclaims to you, "The board blew
+millions on a new enterprise HelloWorld application. The new one does not work
+and we need a solution quickly before this disaster brings down the company! I'm
+putting you in charge of the whole project while I go on vacation -- see you in
+2 weeks."
+
+\section1 Brainstorming Ideas - It is time to play!
+
+Never one to shy away from a challenge (especially when your job might be on the
+line), you first set out try come up with an idea about what your options are.
+
+You ask around a bit and discover that the broken application was intended to
+replace one that has been living on a dusty mainframe for the past 25 years. The
+machine is nearing end of life and, rather than invest in replacement hardware
+to run a legacy HelloWorld program, the board decided to invest in new software
+that could be run on desktops, web, mobile devices and embedded into the
+company's main product line -- a pocket size device with a small LCD screen,
+which flashes the message "Hello World" every full moon.
+
+The vendor that was chosen to handle this task was a well known multinational
+company that specialized in enterprise CRM/ERP systems. The project missed
+several delivery deadlines over a 2 year period, and was 500% over budget. There
+was not going to be much margin for error trying to fix the problem, and there
+would likely be no budget either.
+
+You begin researching dozens of possible possible approaches to the problem. One
+of the biggest challenges is that there are very few options that will allow you
+to create native applications that use the same framework for targeting
+\l{qt-creator-configure-target}{multiple platforms}.
+
+Some years ago you had coded a small desktop application using the Qt framework,
+without realizing that it also can be used for targeting the web, mobile devices
+and embedded devices. Since that time, Qt has added a new feature called \l{Qt
+Quick}, which provides the ability to easily design applications with intuitive,
+modern-looking, fluid user interfaces.
+
+\section1 Creating an Objective
+
+You quickly realize that you might need two, three, or more interfaces for your
+application -- one for each of the target platforms you are aiming for.
+Thankfully Qt has options well suited for each of them.
+
+For your mobile application the choice seems obvious enough. The new Qt Quick
+technology looks very promising, but you do not know QML; the declarative
+language that helps define the interface in a Qt Quick program. You still want
+to give it a try, but worry that you might not have something complete before
+your boss returns from vacation in two weeks. You also wonder if Qt Quick is
+applicable to desktop and embedded targets -- and then of course there is the
+need for something targeting the web. You decide to give Qt Quick a try first
+and \l{QML Examples and Demos}{see where it takes you}.
+
+\section1 Developing Plans
+
+One thing you realize after reading up on \l{Qt Quick} is that things are very
+different from the desktop when designing an interface. Qt Quick doesn't contain
+ready made UI 'chrome'; the widgets and other design elements that define the
+application interface. A new technology, called Qt Quick Components, looks like
+a promising solution, but the components will only be available at a later date.
+For now you'll have to come up with something on your own -- but you are keen to
+give your design skills a work out, and learning to use Qt Quick seems to be a
+great way to do it.
+
+Not knowing a better place to start, you begin by taking a cue from web design
+and plan a wireframe, which helps
+\l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-visual-editor.html}{define the application layout},
+content and user interaction. You decide on breaking the field of the screen
+space into three roughly equal size parts. There will be one section across the
+top, which will span the width of the screen, and two sections in the lower
+have, which will be approximately as tall as the top section is wide (when in
+portrait mode).
+
+The top section will be a simple text representation of the phrase "Hello World"
+in English. In the lower left you would like to place some kind of audio
+playback feature that repeats back the phrase in the top section of the screen.
+Finally, in the lower right hand side of the screen will be four links to
+similar views for additional languages -- Mandarin Chinese, Brazilian
+Portuguese, Arabic, and Russian. When the user clicks one of the links the text
+at the top is then translated, and the playback corresponds to the appropriate
+language.
+
+While the wireframe is effective in dealing with one part of the design
+challenge, it does not cover visual aspects other than layout and content. This
+means that you still need to define colours, white space, and typography (among
+other things). This is where a style guide would come in handy, if your company
+already had one that is. In the absence of one you decide to again get some
+inspiration from the web, and you mimic some of the company's website design
+into your application -- a sans-serif font for white text on a blue field across
+the top, black text on white for the bottom two sections, and a small company
+logo to the left of the "Hello World" message.
+
+
+\section1 Execution: The Coding Begins!
+
+At long last you sit down to \l{qt-technologies}{implement} your plans and
+designs. The first few steps go according to plan, and creating the basic layout
+and text goes fairly smoothly -- but you run into a few challenges quite
+quickly:
+
+Devising a user friendly interface to audio playback is not as intuitive as you
+first thought. Since there exist a ready made component for
+\l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-multimedia.html}{multimedia},
+you remove the bottom left field and now have the screen split in two. You add
+textual links for each of the five target languages, and when the user clicks
+one of them the message text changes and the appropriate audio plays back. It is
+a small sacrifice to make for now, and you are sure there is a solution to be
+found once you have become more proficient with QML.
+
+The next challenge you run into is that \l{qt-deployment}{deploying} the
+application to a Symbian phone is not as clearly understood as you expected.
+Again you are sure there is something you are missing, but for the time being
+you manually copy the .sis file to the "Installs" directory on the phone
+(connected to the development machine by USB) and then install it through the
+Application Manager.
+
+When you finally manage to install the application on the device you notice
+something that looks rather peculiar, and something you had not thought of. When
+the phone is turned into landscape mode, your text remains at the same absolute
+coordinates as when it was in portrait mode. You had not realized you needed to
+anchor it in order to achieve the centering you wanted. There was an
+\l{qt-testing}{easy fix} for this, but you were glad you saw this earlier rather
+than later.
+
+
+\section1 Innovating
+
+After the ups and downs of learning to develop a basic application
+using Qt Quick, you start to see greater possibilities for using Qt technologies
+for your current and future projects:
+
+\list
+\o Extending HTML5 based applications that tie Javascript to a Qt C++ back end
+using \l{Qt WebKit}
+\o An \l{qt-rendering-painting-system}{OpenGL} based UI for embedded platforms
+\o \l{Gestures Programming}{Touch} screen support
+\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/location-overview.html}{Location} based applications
+\o \l{qt-technologies}{Much, much more}
+\endlist
+
+
+\section1 The Achievement
+
+After your boss returned from vacation you presented him with the finished Qt
+Quick application, demonstrating it on both a mobile device as well as desktop
+(it happened to work well on both with little modification). You also provided
+him a presentation that detailed your road map for taking things to the next
+level -- targeting other platforms, such as the web, as well as improving on the
+existing application you just completed.
+
+Even though the final product did not turn out the way you originally planned,
+your boss was still sufficiently impressed. Not only was the go ahead given for
+future projects, but ramping up a small team of developers and designers was
+also suggested to help support your efforts.
+
+*/
diff --git a/doc/src/howtos/exceptionsafety.qdoc b/doc/src/howtos/exceptionsafety.qdoc
index c4b5ebc..b3795d6 100644
--- a/doc/src/howtos/exceptionsafety.qdoc
+++ b/doc/src/howtos/exceptionsafety.qdoc
@@ -100,8 +100,9 @@
if any allocation fails. Allocations can fail if the system runs out of memory or
doesn't have enough continuous memory to allocate the requested size.
- Exceptions to that rule are documented. As an example, \l QImage::create()
- returns false if not enough memory exists instead of throwing an exception.
+ Exceptions to that rule are documented. As an example, QImage constructors will
+ create a \l{QImage::isNull()}{null} image if not enough memory exists instead
+ of throwing an exception.
\section1 Recovering from exceptions
diff --git a/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc b/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc
new file mode 100644
index 0000000..246c4e4
--- /dev/null
+++ b/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page qml-best-practices-coding.html
+\ingroup qml-best-practices
+\contentspage QML Best Practices Guides
+\previouspage QML Best Practices Guides
+\startpage QML Best Practices Guides
+\title QML Best Practices: Coding Conventions
+
+\brief QML Coding Conventions and Importing Files
+
+There are many different ways to code using QML. These are a set of
+guidelines to help your code look better and consistent.
+
+\section1 Coding Conventions
+
+The official QML Coding Conventions may be found at
+\l {QML Coding Conventions}. This is the recommended convention that will be
+used throughout the QML documentation.
+
+In addition, Qt's official code style may be found at the \l {Qt Coding Style}.
+
+\section1 Importing Files into QML
+
+To import items such as directories, use the "import" keyword, similar to
+the way the \c {import QtQuick 1.0} statement is used.
+
+\snippet doc/src/snippets/declarative/imports/best-practices.qml imports
+
+To facilitate the import of QML components, it is best to begin the QML
+file with an uppercase character. This way, the user can simply declare the
+component using the file name as the component name. For example, if a QML
+component is in a file named \c Button.qml, then the user may import the
+component by declaring a \c {Button {}}. Note that this method only works if
+the QML files are in the same directory.
+
+It is also possible to import QML files which have file names that begin in
+lower case or files in a different directory by using a \c qmldir file.
+
+A \c qmldir file tells your QML application which QML components, plugins,
+or directories to import. The \c qmldir file must reside in an imported
+directory. By using the \c qmldir file, users may import any QML file and assign any
+valid QML component name to the component.
+
+For more information, read the section on
+\l{qml-loading-components}{Loading a Component}.
+
+\section1 Commenting Code
+
+Commenting code allows others to read the source code better. As well, comments
+allow the programmer to think about his or her code; a confusing comment may
+mean the code is confusing.
+
+Similar to JavaScript or C++, there are two ways of commenting QML code:
+\list
+\o Single line comments start with \c{//} and finish at the end of the line
+\o Multiline comments start with \c{/*} and finish with *\/
+\endlist
+
+\section1 Group Properties
+
+Many QML properties are \l{attached-properties}{attached} or
+\l {qml-grouped-properties}{group} properties. For convenience, you may treat
+them as another element when dealing with multiple properties belonging to the
+same group.
+
+\snippet doc/src/snippets/declarative/bestpractices/group.qml not grouped
+Treating groups of properties as a block can ease confusion and help relate the
+properties with other properties.
+\snippet doc/src/snippets/declarative/bestpractices/group.qml grouped
+*/
diff --git a/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc b/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc
new file mode 100644
index 0000000..0f6d74b
--- /dev/null
+++ b/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc
@@ -0,0 +1,49 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+ \page qml-best-practices-datatypes.html
+ \ingroup qml-best-practices
+ \contentspage QML Best Practices Guides
+ \previouspage QML Best Practices Guides
+ \startpage QML Best Practices Guides
+ \title QML Best Practices: Data Types
+
+ \brief Using Basic Data Types and Custom Types in QML
+
+ QML supports many basic data types, Qt data types, and custom data types.
+
+ \section1 Basic Data Types
+
+ \section1 Qt Data Types
+
+ \section1 Exporting Qt Types to QML
+
+ Programmers may create C++ data structures and expose them to QML, making
+ data accessible from QML.
+
+ \section2 Using QStringLists in QML
+*/
diff --git a/doc/src/howtos/scalabilityintro.qdoc b/doc/src/howtos/scalabilityintro.qdoc
new file mode 100644
index 0000000..5b4e58b
--- /dev/null
+++ b/doc/src/howtos/scalabilityintro.qdoc
@@ -0,0 +1,324 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \title Scalability
+ \page scalability.html
+ \preliminary
+
+ \omit preliminary docs for next SDK release \endomit
+ \omit Somewhere I need to mention applications with more than
+ one page (top-level layouts). \endomit
+
+ A scalable application is an application that can run on more than
+ one form factor. In particular, it can cope with different screen
+ sizes, DPI, and aspect ratios. You need to consider scalability
+ when:
+
+ \list
+ \o your application will be deployed to more than one device
+ handset, or more than one device form factor.
+ \o your application will be deployed for a long period of time,
+ so that new device handsets might appear on the market after
+ your initial deployment.
+ \endlist
+
+ This document discusses how scalable applications can be created.
+
+ \section1 Developing Scalable UIs
+
+ This section shows the basics of how we advice scalable
+ applications to be implemented using QML. We recommend that you
+ follow these techniques:
+
+ \list
+ \o Create separate top-level layout
+ definitions for each form factor.
+ \o Keep the layouts small and let components
+ scale relative to their immediate parent.
+ \o Define device independent measurements, such as dp
+ (device independent pixels), and use
+ these to scale components and for layout measurement.
+ \o Define layouts in a
+ proportional way using the built-in layout features of QML.
+ \endlist
+
+ Using small top-level layouts makes your codebase smaller and
+ easier to maintain. Also, components that scales relative to their
+ parent are more reusable. The layouts should be children of the
+ application's root item. You can change between them by, for
+ instance, using the opacity property of Item; that is, if your
+ application has more tham one top-level layout. Such a top-level
+ layout is also often referred to as a page, i.e., a layout that
+ uses the entire screen. For instance, an organizer application
+ will typically have separate pages for showing the calender and
+ editing todo items.
+
+ You should define the measurements separate from the UI, for
+ instance by using a JavaScript object that you fill in with a
+ script on application start up.
+
+ QML provides several ways of laying out components, e.g, using
+ anchor based layout, the more classic Grid; Column; and Row
+ elements, and by setting the dimensions of Items directly. When
+ laying out components in scalable applications, you should
+ generally prefer using anchors and set width and height based on
+ parent size where possible. Layouts are not only relevant to
+ top-level layouts; components often contain child Items.
+
+ The following sections describe in more detail the different
+ aspects of scalability that should be considered in order to
+ achieve the desired level of flexibility within your application.
+
+ \section1 Implementing the Top-Level Layouts
+
+ As mentioned, each application should use separate top-level
+ layout QML definitions to support separate layout configurations /
+ form factors.
+
+ Consider an application that has to be deployed to at least two
+ devices, which both have very different screen sizes and DPI
+ values. The two form factors of the application will share many
+ common components and attributes, and will most likely connect to
+ the same data model.
+
+ Therefore, the top-level definitions should be quite
+ straightforward and short, with the majority of the functionality
+ refactored into contained Components. It is important to try to
+ avoid unnecessary duplication between these top-level definitions,
+ in order to improve maintainability.
+
+ There are some patterns that you might consider when designing
+ your top level layouts:
+
+ \list
+ \o In some cases, the contents of an entire page in a smaller
+ handset could form a component element of a layout in a
+ larger device. Therefore, consider making that a separate
+ component (i.e. defined in a separate QML file), and in the
+ smaller handset, the Page will simply contain an instance of
+ that component. On the larger device, there may be enough
+ space to show two separate items. For example, in an email
+ viewer, if the screen is large enough, it may be possible to
+ show the email list view, and the email reader view side by
+ side.
+ \o In some cases, the contents of a view might be quite similar
+ on all screen sizes, but with an expanded content area. In
+ this case, it may be possible to re-use the same layout
+ definition, if defined appropriately using anchors.
+ \endlist
+
+ The \l{Loader} component can be used to load separate QML files
+ based on some criteria, such as Device Profile (configuration of
+ screen pixel resolution and DPI density). In the case of form
+ factor, this information will not change during the application's
+ lifetime, therefore there is no issue with memory usage or
+ performance.
+
+ \section1 Defining Measurements
+
+ When you are defining the measurements within an application or
+ component layout, there are a number aspects to consider:
+
+ \list
+ \o The layout structure, the high-level relationship between
+ items. Which item is the parent? How are the items arranged
+ relatively on the screen? Are they in a grid or column?
+ \o The layout measurements. How big is an item, or a margin
+ inside the edge of an item, or an anchor between items?
+ \o The implicit size of contained items. Some child items will
+ require a certain amount of space, such as a button
+ containing a text. That may also depend on the current
+ platform and style. How do you ensure that you leave enough
+ space, and what happens if your children change size?
+ \endlist
+
+ These aspects combine together to resolve the final layout for a
+ given Device Profile. However, although there are dependencies
+ between them, it is important to manage and control the different
+ aspects separately.
+
+ It is strongly recommended that Layout measurements should be
+ stored in a separate place from the component layout structure
+ definition files. The reason for this is that layout structure,
+ for a given form factor, can be re-used for different Device
+ Profiles. However, measurements will almost always vary between
+ Device Profiles or Device Categories.
+
+ If the opposite approach (complete duplication of entire QML
+ files) was taken, then all of the layout states and structure
+ definitions would be duplicated between the copied QML files, and
+ only the measurement values would change.
+
+ The main benefit of using separate measurement definition files
+ are:
+
+ \list
+ \o To reduce the amount of duplication, and hence increase
+ maintainability.
+ \o It becomes much easier to change the layout structure,
+ perhaps due to subsequent specification changes. In that
+ case, the layout structure can be modified once, and many or
+ all of the layout measurements would remain unchanged.
+ \o It becomes much easier to add support for additional Device
+ Profiles, simply by adding another measurement definition
+ file.
+ \endlist
+
+ \section1 Using QML's Layout Features
+
+ For a given form factor, top-level Layouts structure definitions,
+ or component layout structure definitions, should in general be
+ defined in a proportional way using a combination of
+
+ \list
+ \o \l{Item::anchors.top}{anchors} within an Item
+ \o \l{Row} / \l{Column} / \l{Grid}
+ \o simple javascript expressions such as width: Math.round(parent.width / 3.0).
+ \endlist
+
+ These basic building blocks, along with the powerful evaluation
+ capabilities of javascript expressions within every QML binding,
+ are designed to allow the majority of the layout structure
+ definition to be defined in a Device Profile independent way.
+
+ There are some limitations of the basic grid type layouts. They
+ are designed to accommodate a number of Items, but use the current
+ sizes of those items. There is a similar issue with the basic
+ anchor type layout. In particular, it can be difficult to spread a
+ number of child items proportionately across an area of their
+ container.
+
+ By combining the features of the layout managers with simple
+ javascript expressions, a richer variety of designs can be
+ expressed, without having to resort to additional layout
+ measurement parameters or measurement values.
+
+ Here are some things not to do with layouts:
+
+ \list
+ \o Don't define complex javascript functions that are regularly
+ evaluated. This will cause poor performance, particularly
+ during animated transitions.
+ \o Don't define all of your layouts using x, y, width and
+ height. Reserve this for items that cannot easily be defined
+ using anchors (anchors are evaluated in a more efficient
+ way).
+ \o Don't make assumptions about the container size, or about
+ the size of child items. Try to make flexible layout
+ definitions that can absorb changes in the available space.
+ \endlist
+
+ \section1 Orientation Switches
+
+ Application top-level page definitions, and reusable component
+ definitions, should use one QML layout definition for the layout
+ structure. This single definition should include the layout design
+ for separate Device Orientations and Aspect Ratios. The reason for
+ this is that performance during an orientation switch is critical,
+ and it is therefore a good idea to ensure that all of the
+ components needed by both orientations are loaded when the
+ orientation changes.
+
+ On the contrary, you should perform thorough tests if you choose
+ to use a \l{Loader} to load additional QML that is needed in separate
+ orientations, as this will affect the performance of the
+ orientation change.
+
+ In order to enable layout animations between the orientations, the
+ anchor definitions must reside within the same containing
+ component. Therefore the structure of a page or a component
+ should consist of a common set of child components, a common set
+ of anchor definitions, and a collection of states (defined in a
+ StateGroup) representing the different aspect ratios supported by
+ the component. (However note that orientation change animations
+ are not possible on Symbian due to compatibility support for S60
+ applications).
+
+ If a component contained within a page needs to be
+ hosted in numerous different form factor definitions, then the
+ layout states of the view should depend on the aspect ratio of the
+ page (its immediate container). Similarly, different instances of
+ a component might be situated within numerous different containers
+ in a UI, and so its layout states should be determined by the
+ aspect ratio of its parent. The conclusion is that layout states
+ should always follow the aspect ratio of the direct container (not
+ the "orientation" of the current device screen).
+
+ Within each layout \l{State}, you should define the relationships
+ between items using native QML layout definitions. See below for
+ more information. During transitions between the states (triggered
+ by the top level orientation change), in the case of anchor
+ layouts, AnchorAnimation elements can be used to control the
+ transitions. In some cases, you can also use a NumberAnimation on
+ e.g. the width of an item. Remember to avoid complex javascript
+ calculations during each frame of animation. Using simple anchor
+ definitions and anchor animations can help with this in the
+ majority of cases.
+
+ There are a few additional cases to consider:
+
+ \list
+ \o What if you have a single page that looks completely
+ different between landscape and portrait, i.e. all of the
+ child items are different? For each page, have two child
+ components, with separate layout definitions, and make one
+ or other of the items have zero opacity in each state. You
+ can use a cross-fade animation by simply applying a
+ NumberAnimation transition to the opacity.
+ \o What if you have a single page that shares 30% or more of
+ the same layout contents between portrait and landscape? In
+ that case, consider having one component with landscape and
+ portrait states, and a collection of separate child items
+ whose opacity (or position) depends on the orientation
+ state. This will enable you to use layout animations for the
+ items that are shared between the orientations, whilst the
+ other items are either faded in/out, or animated on/off
+ screen.
+ \o What if you have two pages on a handheld device that need to
+ be on screen at the same time, for example on a larger form
+ factor device? In this case, notice that your view component
+ will no longer be occupying the full screen. Therefore it's
+ important to remember in all components (in particular, list
+ delegate items) should depend on the size of the containing
+ component width, not on the screen width. It may be
+ necessary to set the width in a Component.onCompleted()
+ handler in this case, to ensure that the list item delegate
+ has been constructed before the value is set.
+ \o What if the two orientations take up too much memory to have
+ them both in memory at once? Use a \l{Loader} if necessary, if
+ you cannot keep both versions of the view in memory at once,
+ but beware performance on the cross-fade animation during
+ layout switch. One solution could be to have two "splash
+ screen" items that are children of the Page, then you cross
+ fade between those during rotation. Then you can use a
+ \l{Loader} to load another child component that loads the actual
+ model data to another child Item, and cross-fade to that
+ when the \l{Loader} has completed.
+ \endlist
+ */
+
diff --git a/doc/src/howtos/unix-signal-handlers.qdoc b/doc/src/howtos/unix-signal-handlers.qdoc
index 2fa558e..20beb38 100644
--- a/doc/src/howtos/unix-signal-handlers.qdoc
+++ b/doc/src/howtos/unix-signal-handlers.qdoc
@@ -59,7 +59,7 @@
sigaction(2) man pages before plowing through the following code
snippets.
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 0
In the MyDaemon constructor, use the socketpair(2) function to
initialize each file descriptor pair, and then create the
@@ -68,24 +68,24 @@
appropriate slot function, which effectively converts the Unix
signal to the QSocketNotifier::activated() signal.
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 1
Somewhere else in your startup code, you install your Unix signal
handlers with sigaction(2).
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 2
In your Unix signal handlers, you write a byte to the \e write end
of a socket pair and return. This will cause the corresponding
QSocketNotifier to emit its activated() signal, which will in turn
cause the appropriate Qt slot function to run.
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 3
In the slot functions connected to the
QSocketNotifier::activated() signals, you \e read the byte. Now
you are safely back in Qt with your signal, and you can do all the
Qt stuff you weren'tr allowed to do in the Unix signal handler.
- \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_unix-signal-handlers.cpp 4
*/
diff --git a/doc/src/images/guide.png b/doc/src/images/guide.png
new file mode 100644
index 0000000..f4b0df1
--- /dev/null
+++ b/doc/src/images/guide.png
Binary files differ
diff --git a/doc/src/images/listview-decorations.png b/doc/src/images/listview-decorations.png
new file mode 100644
index 0000000..445c648
--- /dev/null
+++ b/doc/src/images/listview-decorations.png
Binary files differ
diff --git a/doc/src/images/listview-section.png b/doc/src/images/listview-section.png
new file mode 100644
index 0000000..a3664fc
--- /dev/null
+++ b/doc/src/images/listview-section.png
Binary files differ
diff --git a/doc/src/images/listview-setup.png b/doc/src/images/listview-setup.png
new file mode 100644
index 0000000..5293d05
--- /dev/null
+++ b/doc/src/images/listview-setup.png
Binary files differ
diff --git a/doc/src/images/mobile.png b/doc/src/images/mobile.png
new file mode 100644
index 0000000..af460e2
--- /dev/null
+++ b/doc/src/images/mobile.png
Binary files differ
diff --git a/doc/src/images/qml-dial.png b/doc/src/images/qml-dial.png
deleted file mode 100644
index da5c031..0000000
--- a/doc/src/images/qml-dial.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors1.png b/doc/src/images/qml-intro-anchors1.png
deleted file mode 100644
index fdb301e..0000000
--- a/doc/src/images/qml-intro-anchors1.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors2.png b/doc/src/images/qml-intro-anchors2.png
deleted file mode 100644
index 84f43bd..0000000
--- a/doc/src/images/qml-intro-anchors2.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-intro-anchors3.png b/doc/src/images/qml-intro-anchors3.png
deleted file mode 100644
index 21ae97b..0000000
--- a/doc/src/images/qml-intro-anchors3.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-intro-helloa.png b/doc/src/images/qml-intro-helloa.png
deleted file mode 100644
index 00b34b0..0000000
--- a/doc/src/images/qml-intro-helloa.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml-listview-snippet.png b/doc/src/images/qml-listview-snippet.png
deleted file mode 100644
index 0ee0ffc..0000000
--- a/doc/src/images/qml-listview-snippet.png
+++ /dev/null
Binary files differ
diff --git a/doc/src/images/qml.png b/doc/src/images/qml.png
new file mode 100644
index 0000000..b1e4ab6
--- /dev/null
+++ b/doc/src/images/qml.png
Binary files differ
diff --git a/doc/src/images/qmldesigner-visual-editor.png b/doc/src/images/qmldesigner-visual-editor.png
new file mode 100644
index 0000000..9cd4b8b
--- /dev/null
+++ b/doc/src/images/qmldesigner-visual-editor.png
Binary files differ
diff --git a/doc/src/images/qt-logo_large.png b/doc/src/images/qt-logo_large.png
new file mode 100644
index 0000000..4e230bd
--- /dev/null
+++ b/doc/src/images/qt-logo_large.png
Binary files differ
diff --git a/doc/src/images/qtcreator-target-selector.png b/doc/src/images/qtcreator-target-selector.png
new file mode 100644
index 0000000..1f26138
--- /dev/null
+++ b/doc/src/images/qtcreator-target-selector.png
Binary files differ
diff --git a/doc/src/images/thread_clock.png b/doc/src/images/thread_clock.png
new file mode 100644
index 0000000..b8a8aa0
--- /dev/null
+++ b/doc/src/images/thread_clock.png
Binary files differ
diff --git a/doc/src/images/threads-examples.png b/doc/src/images/threads-examples.png
new file mode 100644
index 0000000..b6e4bcc
--- /dev/null
+++ b/doc/src/images/threads-examples.png
Binary files differ
diff --git a/doc/src/images/threadvisual-example.png b/doc/src/images/threadvisual-example.png
new file mode 100644
index 0000000..2a49874
--- /dev/null
+++ b/doc/src/images/threadvisual-example.png
Binary files differ
diff --git a/doc/src/images/tools.png b/doc/src/images/tools.png
new file mode 100644
index 0000000..4d717b5
--- /dev/null
+++ b/doc/src/images/tools.png
Binary files differ
diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc
index be59c2f..079a03b 100644
--- a/doc/src/index.qdoc
+++ b/doc/src/index.qdoc
@@ -26,94 +26,141 @@
****************************************************************************/
/*!
- \page index.html
- \keyword Qt Reference Documentation
+\page index.html
+\keyword Qt Reference Documentation
- \div {indexbox guide}
- \div {heading}
- Qt Developer Guide
- \enddiv
- \div {indexboxcont indexboxbar}
- \div {section indexIcon} \emptyspan
- \enddiv
- \div {section}
- Qt is a cross-platform application and UI
- framework. Using Qt, you can write web-enabled
- applications once and deploy them across desktop,
- mobile and embedded operating systems without
- rewriting the source code.
- \enddiv
- \div {section sectionlist}
- \list
- \o \l{Getting Started Guides}{Getting started}
- \o \l{Installation}{Installation}
- \o \l{how-to-learn-qt.html}{How to learn Qt}
- \o \l{tutorials.html}{Tutorials}
- \o \l{Qt Examples}{Examples}
- \o \l{qt4-7-intro.html}{What's new in Qt 4.7}
- \endlist
- \enddiv
+\div {class="indexbox guide"}
+ \div {class="heading"}
+ Qt Developer Guide
+ \enddiv
+\enddiv
+\div {class="indexbox tools"}
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ What is Qt
+ \enddiv
+ \image qt-logo_large.png
+ Qt is a cross-platform application and UI framework. Using Qt, you can
+ write applications once and deploy them across desktop, mobile, and
+ embedded operating systems without rewriting the source code.
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \list
+ \o \l{http://doc.qt.nokia.com/nokia-qtsdk-1.0/index.html}{Qt SDK}
+ \o \l{http://developer.qt.nokia.com/wiki/QtCreatorWhitepaper}{Qt Creator}
+ \o \l{http://doc.qt.nokia.com/qtsimulator-1.1/index.html}{Qt Simulator}
+ \endlist
+ \list
+ \o \l{http://developer.qt.nokia.com/wiki/QtWhitepaper}{Qt C++ Framework}
+ \o \l{Qt Quick}
+ \o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/index.html}{Qt Mobility}
+ \o \l{Qt WebKit}
+ \endlist
+ \list
+ \o \l{Supported Platforms}{Platform Support}
+ \o \l{What's New in Qt 4.7} - latest release
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ See Qt
\enddiv
- \enddiv
- \div {indexbox api}
- \div {heading}
- Qt API
- \enddiv
- \div {indexboxcont indexboxbar }
- \div {sectionlist tricol}
- \list
- \o \l{All Classes}{All Classes}
- \o \l{All Functions}{All Functions}
- \o \l{All Modules}{All Modules}
- \o \l{All Namespaces}{All Namespaces}
- \o \l{Global Qt Declarations}{Global Declarations}
- \o \l{Qt Licenses and Credits}{Licenses and Credits}
- \endlist
- \enddiv
- \div {sectionlist tricol}
- \list
- \o \l{Programming with Qt}
- \o \l{UI Design with Qt}
- \o \l{Cross-Platform and Platform-Specific Development}
- \o \l{Qt and Key Technologies}
- \o \l{Best Practice Guides}
- \endlist
- \enddiv
- \div {sectionlist}
- \list
- \o \l{qtquick.html}{Qt Quick}
- \o \l{qdeclarativeintroduction.html}{Introduction to QML}
- \o \l{qdeclarativeelements.html}{QML Elements}
- \o \l{qdeclarativeexamples.html}{QML Examples and Demos}
- \endlist
- \enddiv
+ \image mobile.png
+ \list
+ \o \l{Qt Demonstrations}{Application Gallery}
+ \o \l{Tutorials}
+ \o \l{Qt Examples}{Examples}
+ \o \l{QML Examples and Demos}
+ \endlist
+ \enddiv
+ \enddiv
+\enddiv
+\div {class="indexbox tools"}
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Develop with Qt
\enddiv
- \enddiv
- \div {indexbox tools}
- \div {heading}
- Qt Tools
- \enddiv
- \div {indexboxcont}
- \div {section indexIcon} \emptyspan
- \enddiv
- \div {section}
- Qt offers a selection of development tools for
- different tasks. Use Qt Creator for project and code
- management as well as building powerfull UIs.
- \enddiv
- \div {section sectionlist}
- \list
- \o \l{http://doc.qt.nokia.com/qtcreator-2.0/index.html}{Qt Creator}
- \o \l{designer-manual.html}{Qt Designer}
- \o \l{linguist-manual.html}{Qt Linguist}
- \o \l{assistant-manual.html}{Qt Assistant}
- \o \l{qmake-manual.html}{Qt qmake}
- \o \l{http://doc.qt.nokia.com/qtsimulator-1.0/index.html}{Qt Simulator}
- \o \l{http://qt.nokia.com/developer/eclipse-integration}{Eclipse Integration}
- \o \l{http://qt.nokia.com/products/appdev}{Add-On Products and Services}
- \o \l{qvfb.html}{Virtual Framebuffer}
- \endlist
- \enddiv
+ \image tools.png
+ \list
+ \o \l{Develop with Qt}{Steps to Programming Qt Applications}
+ \o \l{qt-creator-configure-target}{Configure Qt and Creator for Platforms}
+ \o \l{qt-technologies}{Qt Features and Technologies}
+ \o \l{qt-utilities}{Utilities and Testing}
+ \o \l{qt-deployment}{Deploying Applications and Publish to Ovi Store}
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Featured Articles
\enddiv
- \enddiv
+ \image guide.png
+ \list
+ \o \l{Scalability}{How to Create Scalable Applications}
+ \o \l{http://doc.qt.nokia.com/nokia-qtsdk-1.0/creator-developing-symbian.html}{Setting Up Development Environment for Symbian}
+ \o \l{http://doc.qt.nokia.com/nokia-qtsdk-1.0/creator-developing-maemo.html}{Setting Up Development Environment for Maemo}
+ \o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-publish-ovi.html}{Publishing Qt Applications to Ovi Store}
+ \endlist
+ \list
+ \o \l{Qt Development: The Steps from Challenge to Achievement}{The Steps from Challenge to Achievement}
+ A case analysis of a business development problem and a search for
+innovative solutions using Qt.
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ UI Creation with Qt
+ \enddiv
+ \image qml.png
+ \list
+ \o \l{qt-ui-creation}{Create UI with Qt}
+ \o \l{qt-rendering-painting-system}{Qt's Rendering and Painting Systems}
+ \o \l{Qt Quick} - develop fluid UIs with QML
+ \o \l{Widgets and Layouts} - elements for C++ interfaces
+ \endlist
+ \enddiv
+ \enddiv
+\enddiv
+\div {class="indexbox tools"}
+ \div {class="heading"}
+ Reference
+ \enddiv
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Qt API
+ \enddiv
+ \list
+ \o \l{All Classes}{All Classes}
+ \o \l{All Functions}{All Functions}
+ \o \l{All Modules}{All Modules}
+ \o \l{All Namespaces}{All Namespaces}
+ \o \l{Global Qt Declarations}{Global Declarations}
+
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \list
+ \o \l{Qt Quick}
+ \o \l{QML Elements}
+ \endlist
+ \list
+ \o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/index.html}{Qt Mobility APIs}
+ \o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins}
+ \endlist
+ \enddiv
+ \div {class="sectionlist normallist"}
+ \div {class="heading"}
+ Qt Manuals
+ \enddiv
+ \list
+ \o \l{http://doc.qt.nokia.com/qtcreator-2.0/index.html}{Qt Creator}
+ \o \l{http://doc.qt.nokia.com/qtsimulator/index.html}{Qt Simulator}
+ \o \l{linguist-manual.html}{Qt Linguist}
+ \o \l{assistant-manual.html}{Qt Assistant}
+ \endlist
+ \enddiv
+ \enddiv
+\enddiv
*/
diff --git a/doc/src/internationalization/i18n.qdoc b/doc/src/internationalization/i18n.qdoc
index e22f953..f58a9a5 100644
--- a/doc/src/internationalization/i18n.qdoc
+++ b/doc/src/internationalization/i18n.qdoc
@@ -34,13 +34,13 @@
*/
/*!
- \page internationalization.html
\title Internationalization with Qt
\brief Information about Qt's support for internationalization and multiple languages.
\nextpage Writing Source Code for Translation
\ingroup qt-basic-concepts
-
+ \group internationalization
+
\keyword internationalization
\keyword i18n
@@ -192,7 +192,7 @@
to achieve this is to use QObject::tr(). For example, assuming the
\c LoginWidget is a subclass of QWidget:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 0
This accounts for 99% of the user-visible strings you're likely to
write.
@@ -202,7 +202,7 @@
appropriate class, or the QCoreApplication::translate() function
directly:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 1
If you need to have translatable text completely
outside a function, there are two macros to help: QT_TR_NOOP()
@@ -212,11 +212,11 @@
Example of QT_TR_NOOP():
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 2
Example of QT_TRANSLATE_NOOP():
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 3
If you disable the \c{const char *} to QString automatic
conversion by compiling your software with the macro \c
@@ -244,13 +244,13 @@
The QString::arg() functions offer a simple means for substituting
arguments:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 4
In some languages the order of arguments may need to change, and this
can easily be achieved by changing the order of the % arguments. For
example:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 5
produces the correct output in English and Norwegian:
\snippet doc/src/snippets/code/doc_src_i18n.qdoc 6
@@ -325,7 +325,7 @@
Typically, your application's \c main() function will look like
this:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 8
Note the use of QLibraryInfo::location() to locate the Qt translations.
Developers should request the path to the translations at run-time by
@@ -346,7 +346,7 @@
need to output Cyrillic in the ISO 8859-5 encoding. Code for this
would be:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 9
For converting Unicode to local 8-bit encodings, a shortcut is
available: the QString::toLocal8Bit() function returns such 8-bit
@@ -360,7 +360,7 @@
demonstrated by this conversion from ISO 8859-5 Cyrillic to Unicode
conversion:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 10
Ideally Unicode I/O should be used as this maximizes the portability
of documents between users around the world, but in reality it is
@@ -392,7 +392,7 @@
formats. Such localizations can be accomplished using appropriate tr()
strings.
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 11
In the example, for the US we would leave the translation of
"AMPM" as it is and thereby use the 12-hour clock branch; but in
@@ -417,7 +417,7 @@
the text displayed by widgets using the \l{QObject::tr()}{tr()} function
in the usual way. For example:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 12
All other change events should be passed on by calling the default
implementation of the function.
@@ -511,7 +511,7 @@
/*!
\page i18n-source-translation.html
\title Writing Source Code for Translation
- \ingroup i18n
+ \ingroup internationalization
\previouspage Internationalization with Qt
\contentspage Internationalization with Qt
\nextpage Translation Rules for Plurals
@@ -708,7 +708,7 @@
Typically, your application's \c main() function will look like
this:
- \snippet doc/src/snippets/code/doc_src_i18n.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_i18n.cpp 8
Note the use of QLibraryInfo::location() to locate the Qt translations.
Developers should request the path to the translations at run-time by
@@ -723,7 +723,7 @@
/*!
\page i18n-plural-rules.html
\title Translation Rules for Plurals
- \ingroup i18n
+ \ingroup internationalization
\previouspage Writing Source Code for Translation
\contentspage Internationalization with Qt
\brief A summary of the translation rules for plurals produced by Qt's i18n tools.
diff --git a/doc/src/internationalization/linguist-manual.qdoc b/doc/src/internationalization/linguist-manual.qdoc
index 1f413f9..7932fe8 100644
--- a/doc/src/internationalization/linguist-manual.qdoc
+++ b/doc/src/internationalization/linguist-manual.qdoc
@@ -29,6 +29,7 @@
\page linguist-manual.html
\title Qt Linguist Manual
\ingroup qttools
+ \ingroup internationalization
\startpage {index.html}{Qt Reference Documentation}
\nextpage Qt Linguist Manual: Release Manager
@@ -46,10 +47,10 @@
at the person with overall responsibility for the release of the
application. They will typically coordinate the work of the
software engineers and the translator. The chapter describes the
- use of two tools. The \l{lupdate} tool is used to synchronize
- source code and translations. The \l{lrelease} tool is used to
- create run-time translation files for use by the released
- application.
+ use of two tools. The \l{linguist-manager.html#lupdate}{lupdate}
+ tool is used to synchronize source code and translations. The
+ \l{linguist-manager.html#lrelease}{lrelease} tool is used to create
+ run-time translation files for use by the released application.
The \l{linguist-translators.html}{Translators} chapter is for
translators. It describes the use of the \QL tool.
@@ -77,7 +78,7 @@
programmer is able to add additional context information to phrases
when necessary. The release manager generates a set of translation
files that are produced from the source files and passes these to the
- translator. The translator opens the translation files using \QL,
+ translator. The translator opens the translation files using \QL,
enters their translations and saves the results back into
the translation files, which they pass back to the release manager.
The release manager then generates fast compact versions of these
@@ -144,25 +145,22 @@
/*!
\page linguist-manager.html
\title Qt Linguist Manual: Release Manager
+ \ingroup internationalization
\contentspage {Qt Linguist Manual}{Contents}
\previouspage Qt Linguist Manual
\nextpage Qt Linguist Manual: Translators
- \keyword lupdate
- \keyword lrelease
-
Two tools are provided for the release manager, \l lupdate and \l
lrelease. These tools can process \l qmake project files, or operate
directly on the file system.
\section1 Qt Project Files
- The easiest method to use \l{#lupdate} {lupdate} and \l{#lrelease}
- {lrelease} is by specifying a \c .pro Qt project file. There must
- be an entry in the \c TRANSLATIONS section of the project file for
- each language that is additional to the native language. A typical
- entry looks like this:
+ The easiest method to use \l lupdate and \l lrelease is by specifying
+ a \c .pro Qt project file. There must be an entry in the \c TRANSLATIONS
+ section of the project file for each language that is additional to
+ the native language. A typical entry looks like this:
\snippet examples/linguist/arrowpad/arrowpad.pro 1
@@ -173,8 +171,8 @@
An example of a complete \c .pro file with four translation source
files:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 0
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.pro 0
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.pro 1
QTextCodec::setCodecForTr() makes it possible to choose a 8-bit
encoding for literal strings that appear within \c tr() calls.
@@ -186,14 +184,14 @@
application, \QL needs you to set the \c CODECFORTR
entry in the \c .pro file as well. For example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.pro 1
Also, if your compiler uses a different encoding for its runtime
system as for its source code and you want to use non-ASCII
characters in string literals, you will need to set the \c
CODECFORSRC. For example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.pro 2
Microsoft Visual Studio 2005 .NET appears to be the only compiler
for which this is necessary. However, if you want to write
@@ -201,9 +199,8 @@
in your source files. You can still specify non-ASCII characters
portably using escape sequences, for example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 3
- \target lupdate manual
\section1 lupdate
Usage: \c {lupdate myproject.pro}
@@ -238,8 +235,8 @@
can also process Localization Interchange File Format (XLIFF)
format files; files in this format typically have file names that
end with the \c .xlf suffix.
-
- \note The minimum supported version for XLIFF format files is
+
+ \note The minimum supported version for XLIFF format files is
1.1. XLIFF 1.0 version files are not supported.
Pass the \c -help option to \c lupdate to obtain the list of
@@ -271,7 +268,7 @@
are available the application will detect them and use them
automatically.
- Note that lrelease will only incorporate translations that are
+ Note that \l lrelease will only incorporate translations that are
marked as "finished". Otherwise the original text will be used
instead.
@@ -285,12 +282,13 @@
Both \l lupdate and \l lrelease may be used with TS
translation source files which are incomplete. Missing
translations will be replaced with the native language phrases at
- runtime.
+ runtime.
*/
/*!
\page linguist-translators.html
\title Qt Linguist Manual: Translators
+ \ingroup internationalization
\contentspage {Qt Linguist Manual}{Contents}
\previouspage Qt Linguist Manual: Release Manager
@@ -315,7 +313,7 @@
arranged around a central \l{The Translation Area} {translation
area}. The \l{Context Window} {context list} is normally shown
on the left, and the \l{Sources and Forms Window} {source code},
- \l{Strings Window} {string list}, and either the \l{Phrases and
+ \l{Strings Window} {string list}, and either the \l{Phrases and
Guesses Window} {phrases and guesses}, or the \l{Warnings Window}
{warnings} are shown above and below the \l{The Translation Area}
{translations area}.
@@ -331,9 +329,9 @@
\key{tick mark} button on the toolbar, or click the icon to the
left of the selected source string in the string list. Repeat this
process until all strings in the string list are marked with
- \inlineimage linguist-check-on.png
+ \inlineimage linguist-check-on.png
or
- \inlineimage linguist-check-warning.png
+ \inlineimage linguist-check-warning.png
. Then select the next context and continue.
Translation options are shown in the \l{Phrases and Guesses
@@ -389,17 +387,17 @@
that aren't in a subclass of QObject.
To the left of the \e{Context} column is a column labeled
- \inlineimage linguist-check-obsolete.png
+ \inlineimage linguist-check-obsolete.png
. This column uses the following list of icons to summarize the
current translation state for each context:
\list
- \o \inlineimage linguist-check-on.png
+ \o \inlineimage linguist-check-on.png
All strings in the context have been translated, and all the
translations passed the \l{Validation Tests} {validation tests}.
- \o \inlineimage linguist-check-warning.png
+ \o \inlineimage linguist-check-warning.png
All strings in the context have been translated or marked as
translated, but at least one translation failed the \l{Validation
Tests} {validation tests}.
@@ -427,19 +425,19 @@
selected. Its \e{Items} entry shows \bold{18/18}, which means it
has 18 translatable strings and all 18 strings currently have
translations. However, the context has been marked with the
- \inlineimage linguist-check-warning.png
- icon, which means that at least one of the current translations
- failed a \l{Validation Tests} {validation test}. In the
- \l{Strings Window} {strings window} to the right, we see that one
- of the strings is indeed marked with the
- \inlineimage linguist-check-warning.png
+ \inlineimage linguist-check-warning.png
+ icon, which means that at least one of the current translations
+ failed a \l{Validation Tests} {validation test}. In the
+ \l{Strings Window} {strings window} to the right, we see that one
+ of the strings is indeed marked with the
+ \inlineimage linguist-check-warning.png
icon.
The context window is a dockable window. It can be dragged to
another position in the main window, or dragged out of the main
window to be a separate window. If you move the context window,
\QL remembers the new position and puts the context window there
- whenever you start the program. If the context window has been
+ whenever you start the program. If the context window has been
closed, it can be restored by pressing \key{F6}.
\section2 Strings Window
@@ -475,16 +473,16 @@
\o The source string has a translation (possibly empty); the user
has accepted the translation, and the translation passes all the
\l{Validation Tests} {validation tests}. If the translation is
- empty, the user has chosen to leave it empty. Click the icon to
- revoke acceptance of the translation and decrement the number of
+ empty, the user has chosen to leave it empty. Click the icon to
+ revoke acceptance of the translation and decrement the number of
accepted translations in the \e{Items} column of the \l{Context
- Window} {context list} by 1. The state is reset to
- \inlineimage linguist-check-off.png
+ Window} {context list} by 1. The state is reset to
+ \inlineimage linguist-check-off.png
if the string has a translation, or to
\inlineimage linguist-check-empty.png
- if the string's translation is empty. If \c{lupdate} changes the
- contents of a string, its acceptance state is automatically reset
- to \inlineimage linguist-check-off.png
+ if the string's translation is empty. If \c{lupdate} changes the
+ contents of a string, its acceptance state is automatically reset
+ to \inlineimage linguist-check-off.png
.
\row
@@ -493,44 +491,44 @@
\o The user has accepted the translation, but the translation does
not pass all the \l{Validation Tests} {validation tests}. The
validation test failures are shown in the \l{Warnings Window}
- {warnings window}. Click the icon to revoke acceptance of the
- translation. The state is reset to \inlineimage linguist-danger.png
- , and the number of accepted translations in the \e{Items} column
- of the \l{Context Window} {context list} is decremented by 1.
+ {warnings window}. Click the icon to revoke acceptance of the
+ translation. The state is reset to \inlineimage linguist-danger.png
+ , and the number of accepted translations in the \e{Items} column
+ of the \l{Context Window} {context list} is decremented by 1.
\row
\o Not Accepted
\o \inlineimage linguist-check-off.png
- \o The string has a non-empty translation that passes all the
- \l{Validation Tests} {validation tests}, but the user has not yet
+ \o The string has a non-empty translation that passes all the
+ \l{Validation Tests} {validation tests}, but the user has not yet
accepted the translation. Click the icon or press \key{Ctrl+Enter}
- to accept the translation. The state is reset to
+ to accept the translation. The state is reset to
\inlineimage linguist-check-on.png
- , and the number of accepted translations in the \e{Items} column
- of the \l{Context Window} {context list} is incremented by 1.
+ , and the number of accepted translations in the \e{Items} column
+ of the \l{Context Window} {context list} is incremented by 1.
\row
\o No Translation
\o \inlineimage linguist-check-empty.png
- \o The string does not have a translation. Click the icon to
- accept the empty translation anyway. The state is reset to
+ \o The string does not have a translation. Click the icon to
+ accept the empty translation anyway. The state is reset to
\inlineimage linguist-check-on.png
- , and the number of accepted translations in the \e{Items} column
+ , and the number of accepted translations in the \e{Items} column
of the \l{Context Window} {context list} is incremented by 1.
\row
\o Validation Failures
\o \inlineimage linguist-danger.png
- \o The string has a translation, but the translation does not
- pass all the \l{Validation Tests} {validation tests}. Validation
- test failures are shown in the \l{Warnings Window} {warnings}
- window. Click on the icon or press \key{Ctrl+Return} to accept
- the translation even with validation failures. The state is
+ \o The string has a translation, but the translation does not
+ pass all the \l{Validation Tests} {validation tests}. Validation
+ test failures are shown in the \l{Warnings Window} {warnings}
+ window. Click on the icon or press \key{Ctrl+Return} to accept
+ the translation even with validation failures. The state is
reset to \inlineimage linguist-check-warning.png
- . We recommended editing the translation to fix the causes of
+ . We recommended editing the translation to fix the causes of
the validation failures. The state will reset automatically to
\inlineimage linguist-check-off.png
- , when all the failures have been fixed.
+ , when all the failures have been fixed.
\row
\o Obsolete
@@ -558,12 +556,12 @@
If the developer provides a \l{QObject::tr()} {disambiguating
comment}, it will appear below the source text area, under the
- label \menu{Developer comments}.
+ label \menu{Developer comments}.
Below the source text and optional developer comments are two text
entry widgets for the translator, one for entering the translation
of the current string, and one for the translator to enter an
- optional comment to be read by other translators.
+ optional comment to be read by other translators.
When \l{Translating Multiple Languages Simultaneously} {multiple
languages} are being translated, this sequence of fields is
@@ -578,7 +576,7 @@
translation(s) will be listed in this window. If the current
string is the same as, or similar to, another string that has
already been translated, that other string and its translation
- will also be listed in this window.
+ will also be listed in this window.
To use a translation from the Phrases and Guesses Window, you can
double click the translation, and it will be copied into the
@@ -607,7 +605,7 @@
If the source context shows the wrong source line, it probably
means the translation file is out of sync with the source files.
To re-sync the translation file with the source files, see the
- \l{lupdate manual} {lupdate manual}.
+ \l{linguist-manager.html#lupdate}{lupdate} manual.
The Sources and Forms window is a dockable window. If it has been
closed, it can be made visible again by pressing the \e{Sources
@@ -638,12 +636,12 @@
and you are given an application's Polish translation file and
asked to update the application's Japanese translation file. You
are more comfortable translating Polish to Japanese than you are
- translating English to Japanese.
+ translating English to Japanese.
Below is the UI snapshot shown earlier, but this time with both
\e{Polish} and \e{Japanese} translation files loaded.
- \image linguist-linguist_2.png
+ \image linguist-linguist_2.png
The first thing to notice is that the \l{The Translation Area}
{translation area} has text editing areas for both Polish and
@@ -662,18 +660,18 @@
selected in the snapshot shown above. Recall that in the first UI
snapshot (Polish only), the numbers for this context were
\e{18/18}, meaning 18 translatable strings had been found in the
- context, and all 18 strings had accepted translations. In the UI
+ context, and all 18 strings had accepted translations. In the UI
snapshot above, the numbers for the \bold{MessageEditor} context
are now \e{1/18}, meaning that both languages have 18 translatable
strings for that context, but for Japanese, only 1 of the 18
- strings has an accepted translation. The
- \inlineimage linguist-check-off.png
+ strings has an accepted translation. The
+ \inlineimage linguist-check-off.png
icon in the Japanese column means that at least one string in the
- context doesn't have an accepted Japanese translation yet. In fact,
- 17 of the 18 strings don't have accepted Japanese translations yet.
- We will see \e{18/18} in the \e{Items} column when all 18 strings
- have accepted translations for all the loaded translation files,
- e.g., both Polish and Japanese in the snapshot.
+ context doesn't have an accepted Japanese translation yet. In fact,
+ 17 of the 18 strings don't have accepted Japanese translations yet.
+ We will see \e{18/18} in the \e{Items} column when all 18 strings
+ have accepted translations for all the loaded translation files,
+ e.g., both Polish and Japanese in the snapshot.
\section1 Common Tasks
@@ -726,7 +724,7 @@
key in the translation text ("File") precede it with an ampersand,
e.g. \e{\&File}. If a string to be translated has an ampersand in
it, then the translation for that string should also have an
- ampersand in it, preferably in front of the same character.
+ ampersand in it, preferably in front of the same character.
The meaning of an Alt key accelerator can be determined from the
phrase in which the ampersand is embedded. The translator can
@@ -810,7 +808,7 @@
If the translated text is similar to the source text, choose the
\e {Copy from source text} entry in the \menu Translation menu (press
- \key{Ctrl+B}) which will copy the source text into the
+ \key{Ctrl+B}) which will copy the source text into the
\l{The Translation Area} {translation area}.
\QL automatically lists possible translations from any open
@@ -839,9 +837,9 @@
A \QL phrase book is a set of source phrases, target
(translated) phrases, and optional definitions. Typically one phrase book
- will be created per language and family of applications. Phrase books
- are used to provide a common set of translations to help ensure consistency.
- They can also be used to avoid duplication of effort since the translations
+ will be created per language and family of applications. Phrase books
+ are used to provide a common set of translations to help ensure consistency.
+ They can also be used to avoid duplication of effort since the translations
for a family of applications can be produced once in the phrase book.
If the translator reaches an non-translated phrase that is the same as a
source phrase in a phrase book, \QL will show the
@@ -861,25 +859,25 @@
The phrase book contents can be displayed and changed by selecting
\menu{Phrase|Edit Phrase Book}, and then activating the phrase book you
want to work on. This will pop up the Phrase Book Dialog as shown
- in the image above. To add a new phrase click the \gui{New Phrase}
- button (or press Alt+N) and type in a new source phrase. Press Tab and
- type in the translation. Optionally press Tab and enter a definition --
- this is useful to distinguish different translations of the same source
- phrase. This process may be repeated as often as necessary. You can delete
+ in the image above. To add a new phrase click the \gui{New Phrase}
+ button (or press Alt+N) and type in a new source phrase. Press Tab and
+ type in the translation. Optionally press Tab and enter a definition \mdash
+ this is useful to distinguish different translations of the same source
+ phrase. This process may be repeated as often as necessary. You can delete
a phrase by selecting it in the phrases list and clicking
- Remove Phrase. Click the \gui Close button (press Esc) once you've finished
+ Remove Phrase. Click the \gui Close button (press Esc) once you've finished
adding (and removing) phrases.
\section2 Shortcuts for Editing Phrase Books
You can also create a new phrase book entry directly out of the translation you
are working on: Clicking \menu{Phrases|Add to Phrase Book} or pressing
- \key{Ctrl+T} will add the source text and the content of the first translation
+ \key{Ctrl+T} will add the source text and the content of the first translation
field to the current phrase book. If multiple phrase books are loaded,
you have to specify the phrase book to add the entry to in a dialogue.
- If you detect an error in a phrase book entry that is shown in the
- \l{Phrases and Guesses Window}, you can also edit it in place by right
- clicking on the entry, and selecting \menu{Edit}. After fixing the error
+ If you detect an error in a phrase book entry that is shown in the
+ \l{Phrases and Guesses Window}, you can also edit it in place by right
+ clicking on the entry, and selecting \menu{Edit}. After fixing the error
press \key{Return} to leave the editing mode.
\section2 Batch Translation
@@ -890,7 +888,7 @@
translate source texts that are also in a phrase book. Selecting
\menu{Tools|Batch Translation} will show you the batch translation dialog,
which let you configure which phrase books to use in what order during the
- batch translation process. Furthermore you can set whether only entries
+ batch translation process. Furthermore you can set whether only entries
with no present translation should be considered, and whether batch translated
entries should be set to finished (see also \l {String Translation States}).
@@ -929,7 +927,7 @@
Forms created by \e{Qt Designer} are stored in special UI files.
\QL can make use of these UI files to show the translations
done so far on the form itself. This of course requires access to the UI
- files during the translation process. Activate
+ files during the translation process. Activate
\menu{Tools|Open/Refresh Form Preview} to open the window shown above.
The list of UI files \QL has detected are displayed in the Forms
List on the left hand. If the path to the files has changed, you can load
@@ -947,17 +945,18 @@
\list
\o TS \e {translation source files} \BR are human-readable XML
files containing source phrases and their translations. These files are
- usually created and updated by \l lupdate and are specific to an
- application.
+ usually created and updated by \l{linguist-manager.html#lupdate}{lupdate}
+ and are specific to an application.
\o \c .xlf \e {XLIFF files} \BR are human-readable XML files that adhere
to the international XML Localization Interchange File Format. \QL
- can be used to edit XLIFF files generated by other programs. However, for
- standard Qt projects, only the TS file format is used. \note The minimum
- supported version for XLIFF format files is 1.1. XLIFF 1.0 version files
+ can be used to edit XLIFF files generated by other programs. However, for
+ standard Qt projects, only the TS file format is used. \note The minimum
+ supported version for XLIFF format files is 1.1. XLIFF 1.0 version files
are not supported.
\o QM \e {Qt message files} \BR are binary files that contain
translations used by an application at run-time. These files are
- generated by \l lrelease, but can also be generated by \QL.
+ generated by \l{linguist-manager.html#lrelease}{lrelease}, but can also
+ be generated by \QL.
\o \c .qph \e {Qt phrase book files} \BR are human-readable XML
files containing standard phrases and their translations. These files
are created and updated by \QL and may be used by any
@@ -982,13 +981,15 @@
name, format and/or put in a different location.
\o \gui {Release} \BR create a Qt message QM file with the same base
name as the current translation source file. The release manager's
- command line tool \l lrelease performs the same function on
- \e all of an application's translation source files.
+ command line tool \l{linguist-manager.html#lrelease}{lrelease}
+ performs the same function on \e all of an application's translation
+ source files.
\o \gui {Release As...} \BR pops up a save as file dialog. The
filename entered will be a Qt message QM file of the translation
based on the current translation source file. The release manager's
- command line tool \l lrelease performs the same function on
- \e all of an application's translation source files.
+ command line tool \l{linguist-manager.html#lrelease}{lrelease}
+ performs the same function on \e all of an application's translation
+ source files.
\o \gui {Print... Ctrl+P} \BR pops up a print dialog. If you click
OK the translation source and the translations will be printed.
\o \gui {Exit Ctrl+Q} \BR closes \QL.
@@ -1018,10 +1019,10 @@
Source phrases, translations and comments may be searched.
\o \gui {Find Next F3} \BR finds the next occurrence of the text that
was last entered in the Find dialog.
- \o \gui {Search and Translate...} \BR pops up the Search and
+ \o \gui {Search and Translate...} \BR pops up the Search and
Replace Dialog. Use this dialog to translate the same text in multiple items.
\o \gui {Translation File Settings...} \BR let you configure the target
- language and the country/region of a translation source file.
+ language and the country/region of a translation source file.
\endlist
\o \gui {Translation}
@@ -1123,7 +1124,7 @@
\o \gui {Manual F1} \BR opens this manual.
\o \gui {About Qt Linguist} \BR Shows information about \QL.
\o \gui {About Qt} \BR Shows information about \e{Qt}.
- \o \gui {What's This? Shift+F1} \BR Click on one item in the main window
+ \o \gui {What's This? Shift+F1} \BR Click on one item in the main window
to get additional information about it.
\endlist
@@ -1219,6 +1220,7 @@
/*!
\page linguist-programmers.html
\title Qt Linguist Manual: Programmers
+ \ingroup internationalization
\contentspage {Qt Linguist Manual}{Contents}
\previouspage Qt Linguist Manual: Translators
@@ -1262,28 +1264,31 @@
Translation files are created as follows:
\list 1
- \o Run \l lupdate initially to generate the first set of TS
- translation source files with all the user-visible text but no
- translations.
+ \o Run \l {linguist-manager.html#lupdate}{lupdate} initially to
+ generate the first set of TS translation source files with all the
+ user-visible text but no translations.
\o The TS files are given to the translator who adds translations
using \QL. \QL takes care of any changed
or deleted source text.
- \o Run \l lupdate to incorporate any new text added to the
- application. \l lupdate synchronizes the user-visible text from the
- application with the translations; it does not destroy any data.
+ \o Run \l{linguist-manager.html#lupdate}{lupdate} to incorporate any new
+ text added to the application. \l{linguist-manager.html#lupdate}{lupdate}
+ synchronizes the user-visible text from the application with the
+ translations; it does not destroy any data.
\o Steps 2 and 3 are repeated as often as necessary.
- \o When a release of the application is needed \l lrelease is run to
+ \o When a release of the application is needed
+ \l{linguist-manager.html#lrelease}{lrelease} is run to
read the TS files and produce the QM files used by the
application at runtime.
\endlist
- For \l lupdate to work successfully, it must know which translation
- files to produce. The files are simply listed in the application's \c
- .pro Qt project file, for example:
+ For \l{linguist-manager.html#lupdate}{lupdate} to work successfully,
+ it must know which translation files to produce. The files are simply
+ listed in the application's \c .pro Qt project file, for example:
\snippet examples/linguist/arrowpad/arrowpad.pro 1
- If your sources contain genuine non-Latin1 strings, \l lupdate needs
+ If your sources contain genuine non-Latin1 strings,
+ \l{linguist-manager.html#lupdate}{lupdate} needs
to be told about it in the \c .pro file by using, for example,
the following line:
@@ -1291,7 +1296,8 @@
CODECFORTR = UTF-8
\endcode
- See the \l lupdate and \l lrelease sections.
+ See the \l{linguist-manager.html#lupdate}{lupdate} and
+ \l{linguist-manager.html#lrelease}{lrelease} sections.
\section2 Loading Translations
@@ -1333,11 +1339,11 @@
User-visible strings are marked as translation targets by wrapping them
in a \c tr() call, for example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 6
would become
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 7
All QObject subclasses that use the \c Q_OBJECT macro implement
the \c tr() function.
@@ -1346,29 +1352,29 @@
usually called as a member function of a QObject subclass, in
other cases an explicit class name can be supplied, for example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 8
or
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 9
\section2 Distinguishing Between Identical Translatable Strings
- The \l lupdate program automatically provides a \e context for every
- source text. This context is the class name of the class that contains
- the \c tr() call. This is sufficient in the vast majority of cases.
- Sometimes however, the translator will need further information to
- uniquely identify a source text; for example, a dialog that contained
- two separate frames, each of which contained an "Enabled" option would
- need each identified because in some languages the translation would
- differ between the two. This is easily achieved using the
+ The \l{linguist-manager.html#lupdate}{lupdate} program automatically
+ provides a \e context for every source text. This context is the class
+ name of the class that contains the \c tr() call. This is sufficient in
+ the vast majority of cases. Sometimes however, the translator will need
+ further information to uniquely identify a source text; for example,
+ a dialog that contained two separate frames, each of which contained an
+ "Enabled" option would need each identified because in some languages the
+ translation would differ between the two. This is easily achieved using the
two argument form of the \c tr() call, e.g.
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 10
and
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 11
Ctrl key accelerators are also translatable:
@@ -1385,44 +1391,46 @@
solved by adding a comment using the keyword \e TRANSLATOR which
describes the navigation steps to reach the text in question; e.g.
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 12
These comments are particularly useful for widget classes.
\section2 Handling Plural Forms
- Qt includes a \c tr() overload that will make it very easy to
- write "plural-aware" internationalized applications. This overload
+ Qt includes a \c tr() overload that will make it very easy to
+ write "plural-aware" internationalized applications. This overload
has the following signature:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 17
- Depending on the value of \c n, the \c tr() function will return a different
- translation, with the correct grammatical number for the target language.
+ Depending on the value of \c n, the \c tr() function will return a different
+ translation, with the correct grammatical number for the target language.
Also, any occurrence of \c %n is replaced with \c{n}'s value. For example:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 18
- If a French translation is loaded, this will expand to "0 item
- remplac\unicode{233}", "1 item remplac\unicode{233}", "2 items
- remplac\unicode{233}s", etc., depending on \c{n}'s value.
- And if no translation is loaded, the original string is used, with \c %n
+ If a French translation is loaded, this will expand to "0 item
+ remplac\unicode{233}", "1 item remplac\unicode{233}", "2 items
+ remplac\unicode{233}s", etc., depending on \c{n}'s value.
+ And if no translation is loaded, the original string is used, with \c %n
replaced with count's value (e.g., "6 item(s) replaced").
- To handle plural forms in the native language, you need to load a
- translation file for this language, too. \l lupdate has the
+ To handle plural forms in the native language, you need to load a
+ translation file for this language, too.
+ \l{linguist-manager.html#lupdate}{lupdate} has the
\c -pluralonly command line option, which allows the creation of
TS files containing only entries with plural forms.
- See the \l{http://doc.qt.nokia.com/qq/}{Qt Quarterly} Article
+ See the \l{http://doc.qt.nokia.com/qq/}{Qt Quarterly} Article
\l{http://doc.qt.nokia.com/qq/qq19-plurals.html}{Plural Forms in Translations}
for further details on this issue.
\section2 Coping With C++ Namespaces
C++ namespaces and the \c {using namespace} statement can confuse
- \l lupdate. It will interpret \c MyClass::tr() as meaning just
- that, not as \c MyNamespace::MyClass::tr(), even if \c MyClass is
+ \l{linguist-manager.html#lupdate}{lupdate}. It will interpret
+ \c MyClass::tr() as meaning just that, not as
+ \c MyNamespace::MyClass::tr(), even if \c MyClass is
defined in the \c MyNamespace namespace. Runtime translation of
these strings will fail because of that.
@@ -1430,7 +1438,7 @@
comment at the beginning of the source files that use \c
MyClass::tr():
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 13
After the comment, all references to \c MyClass::tr() will be
understood as meaning \c MyNamespace::MyClass::tr().
@@ -1443,20 +1451,21 @@
use either the tr() function of an appropriate class, or the
QCoreApplication::translate() function directly:
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 14
\section3 Using QT_TR_NOOP() and QT_TRANSLATE_NOOP()
If you need to have translatable text completely outside a function,
there are two macros to help: QT_TR_NOOP() and QT_TRANSLATE_NOOP().
- These macros merely mark the text for extraction by \l{lupdate}.
+ These macros merely mark the text for extraction by
+ \l{linguist-manager.html#lupdate}{lupdate}.
The macros expand to just the text (without the context).
Example of QT_TR_NOOP():
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 15
Example of QT_TRANSLATE_NOOP():
- \snippet doc/src/snippets/code/doc_src_linguist-manual.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_linguist-manual.cpp 16
\section1 Tutorials
@@ -1484,8 +1493,9 @@
applications for translation.
At the beginning of a project add the translation source files to be
- used to the project file and add calls to \l lupdate and \l lrelease to
- the makefile.
+ used to the project file and add calls to
+ \l{linguist-manager.html#lupdate}{lupdate} and
+ \l{linguist-manager.html#lrelease}{lrelease} to the Makefile.
During the project all the programmer must do is wrap any user-visible
text in \c tr() calls. They should also use the two argument form for
@@ -1498,6 +1508,7 @@
/*!
\page linguist-ts-file-format.html
\title Qt Linguist Manual: TS File Format
+ \ingroup internationalization
\contentspage {Qt Linguist Manual}{Contents}
\previouspage Qt Linguist Manual: Programmers
@@ -1508,5 +1519,5 @@
may change in future Qt releases.
\quotefile tools/linguist/shared/ts.dtd
-
+
*/
diff --git a/doc/src/ja_JP/development/qmake-manual.qdoc b/doc/src/ja_JP/development/qmake-manual.qdoc
index a6cfe3d..3b908f7 100644
--- a/doc/src/ja_JP/development/qmake-manual.qdoc
+++ b/doc/src/ja_JP/development/qmake-manual.qdoc
@@ -58,16 +58,16 @@
æ–°ã—ã„行を作りã€\c{SOURCES +=}ã€ç¶šã„㦠hello.cpp を入力ã—ã¾ã™ã€‚
ã¤ã¾ã‚Šã€ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 108
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 108
ã“れを以下ã®ã‚ˆã†ã«ãªã‚‹ã¾ã§ãƒ—ロジェクトã®å„ソースファイルã«å¯¾ã—ã¦è¡Œã„ã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 109
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 109
make ã«ä¼¼ãŸã‚·ãƒ³ã‚¿ãƒƒã‚¯ã‚¹ã‚’使ã„ãŸã„å ´åˆã¯ã€
以下ã®ã‚ˆã†ã«æ”¹è¡Œã‚’エスケープã—ã¦ã™ã¹ã¦ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’ 1 è¡Œã«æ›¸ãã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 110
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 110
ソースファイルã®ä¸€è¦§ã‚’プロジェクトファイルã«è¿½åŠ ã—ã¾ã—ãŸã€‚
次ã«ãƒ˜ãƒƒãƒ€ãƒ•ã‚¡ã‚¤ãƒ«ã‚’追加ã—ã¾ã™ã€‚
@@ -77,7 +77,7 @@
ã“れを終ãˆã‚‹ã¨ã€ãƒ—ロジェクトファイルã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚‹ã§ã—ょã†:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 111
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 111
ターゲットã®åå‰ã¯è‡ªå‹•çš„ã«è¨­å®šã•ã‚Œã€
プロジェクトファイルã¨åŒã˜åå‰ã«ãªã‚Šã¾ã™ã€‚
@@ -86,7 +86,7 @@
ターゲット㯠Windows ã§ã¯ \c hello.exe ã€Unix ã§ã¯ \c hello ã«ãªã‚Šã¾ã™ã€‚
プロジェクトファイルã§åˆ¥ã®åå‰ã‚’指定ã™ã‚‹ã“ã¨ã‚‚ã§ãã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 112
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 112
最後㫠\l{qmake Variable Reference#CONFIG}{CONFIG} 変数を設定ã—ã¾ã™ã€‚
ã“ã®ã‚¢ãƒ—リケーション㯠Qt アプリケーションãªã®ã§ \c CONFIG ã«
@@ -96,19 +96,19 @@
最終的ãªãƒ—ロジェクトファイルã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 113
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 113
\c qmake を使ã£ã¦ã€ã“ã®ã‚¢ãƒ—リケーションã®ãŸã‚ã® Makefile を生æˆã—ã¾ã™ã€‚
プロジェクトã®ãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒªã§ã‚³ãƒžãƒ³ãƒ‰ãƒ©ã‚¤ãƒ³ã«æ¬¡ã®ã‚ˆã†ã«å…¥åŠ›ã—ã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 114
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 114
ãã—ã¦ã€ä½¿ç”¨ã™ã‚‹ã‚³ãƒ³ãƒ‘イラã«ã‚ˆã£ã¦ \c make ã¾ãŸã¯ \c nmake を入力ã—ã¾ã™ã€‚
Visual Studio ユーザã®å ´åˆã€\c qmake ã¯ã€ä»¥ä¸‹ã®ã‚ˆã†ã«
\c .dsp ファイルã¾ãŸã¯ \c .vcproj ファイルも作æˆã§ãã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 115
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 115
\section1 アプリケーションをデãƒãƒƒã‚°ã§ãるよã†ã«ã™ã‚‹
@@ -119,7 +119,7 @@
ãŸã¨ãˆã°:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 116
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 116
ç›´å‰ã®ä¾‹ã¨åŒæ§˜ã«ã€Makefile を生æˆã™ã‚‹ã«ã¯ \c qmake を使ã„ã¾ã™ã€‚
アプリケーションをデãƒãƒƒã‚°ç’°å¢ƒã§å®Ÿè¡Œã™ã‚‹éš›ã«å½¹ã«ç«‹ã¤æƒ…報を得られるよã†ã«ãªã‚Šã¾ã™ã€‚
@@ -137,7 +137,7 @@
Windows 用ã®ãƒ•ã‚¡ã‚¤ãƒ«ã‚’追加ã™ã‚‹ã‚·ãƒ³ãƒ—ルãªã‚¹ã‚³ãƒ¼ãƒ—ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 117
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 117
\c qmake ㌠Windows 上ã§å®Ÿè¡Œã•ã‚Œã‚‹ã¨ã€ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã®ãƒªã‚¹ãƒˆã«
\c hellowin.cpp ãŒè¿½åŠ ã•ã‚Œã¾ã™ã€‚
@@ -146,7 +146,7 @@
ã“れを終ãˆã‚‹ã¨ã€ãƒ—ロジェクトファイルã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 118
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 118
ã“ã‚Œã¾ã§ã¨åŒæ§˜ã«ã€Makefile を生æˆã™ã‚‹ã«ã¯ \c qmake を使ã„ã¾ã™ã€‚
@@ -159,13 +159,13 @@
使ã„æ–¹ã¯ã‚¹ã‚³ãƒ¼ãƒ—ã®æ¡ä»¶ã‚’ã“れらã®é–¢æ•°ã§ç½®ãæ›ãˆã‚‹ã ã‘ã§ã™ã€‚
\c main.cpp ファイルã®ç¢ºèªã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™ :
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 119
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 119
è¨˜å· \c{!} ã¯ãƒ†ã‚¹ãƒˆã‚’å¦å®šã—ã¾ã™ã€‚
ã¤ã¾ã‚Š \c{exists( main.cpp )} ã¯ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã™ã‚‹å ´åˆã«çœŸã«ãªã‚Šã€
\c{!exists( main.cpp )} ã¯ãƒ•ã‚¡ã‚¤ãƒ«ãŒå­˜åœ¨ã—ãªã„å ´åˆã«çœŸã«ãªã‚Šã¾ã™ã€‚
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 120
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 120
å‰ã¨åŒæ§˜ã«ã€\c qmake を実行ã—㦠Makefile を生æˆã—ã¾ã™ã€‚
仮㫠\c main.cpp ã®åå‰ã‚’変更ã™ã‚‹ã¨ã€ä¸Šè¨˜ã®ãƒ¡ãƒƒã‚»ãƒ¼ã‚¸ãŒè¡¨ç¤ºã•ã‚Œã€
@@ -185,12 +185,12 @@
ã¾ãš 1 ã¤ã®ã‚¹ã‚³ãƒ¼ãƒ—を作æˆã—ã€ãã®ä¸­ã«ã‚‚ㆠ1 ã¤ã‚¹ã‚³ãƒ¼ãƒ—を作æˆã—ã¾ã™ã€‚
ãã—㦠2 ã¤ã®ã‚¹ã‚³ãƒ¼ãƒ—ã®ä¸­ã«è¨­å®šã‚’書ãã¾ã™ã€‚例ãˆã°:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 121
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 121
ãƒã‚¹ãƒˆã•ã‚ŒãŸã‚¹ã‚³ãƒ¼ãƒ—ã¯ã‚³ãƒ­ãƒ³ã‚’使ã£ã¦ã¤ãªãã“ã¨ãŒã§ãã¾ã™ã€‚
最終的ãªãƒ—ロジェクトファイルã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 122
+ \snippet doc/src/snippets/code/doc_src_qmake-manual.pro 122
以上ã§ã™ã€‚\c qmake ã®ãƒãƒ¥ãƒ¼ãƒˆãƒªã‚¢ãƒ«ãŒçµ‚了ã—ã¾ã—ãŸã€‚
ãã‚Œã§ã¯ã€ã‚ãªãŸã®é–‹ç™ºãƒ—ロジェクトã®ãƒ—ロジェクトファイルを作æˆã—ã¦ã¿ã¾ã—ょã†ã€‚
diff --git a/doc/src/ja_JP/development/qtestlib.qdoc b/doc/src/ja_JP/development/qtestlib.qdoc
index c1001dc..3ff1f36 100644
--- a/doc/src/ja_JP/development/qtestlib.qdoc
+++ b/doc/src/ja_JP/development/qtestlib.qdoc
@@ -71,7 +71,7 @@
次ã«ã€ãƒ†ã‚¹ãƒˆé–¢æ•°ã‚’実装ã—ã¾ã™ã€‚実装ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 8
\l QVERIFY() マクロã¯ã€å¼•æ•°ã¨ã—ã¦æ¸¡ã•ã‚Œã‚‹å¼ã‚’評価ã—ã¾ã™ã€‚
å¼ãŒçœŸã¨è©•ä¾¡ã•ã‚Œã‚‹ã¨ãƒ†ã‚¹ãƒˆé–¢æ•°ã®å®Ÿè¡ŒãŒç¶™ç¶šã•ã‚Œã¾ã™ã€‚
@@ -131,7 +131,7 @@
ã“ã‚Œã¾ã§ã¯ã€ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã‚’テスト関数ã«ãƒãƒ¼ãƒ‰ã‚³ãƒ¼ãƒ‰ã—ã¦ã„ã¾ã—ãŸã€‚
ã“ã®å ´åˆã€ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã‚’追加ã—ãŸé–¢æ•°ã¯ä»¥ä¸‹ã®ã‚ˆã†ã«ãªã‚Šã¾ã™:
- \snippet doc/src/snippets/code/doc_src_qtestlib.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtestlib.cpp 11
関数ãŒç¹°ã‚Šè¿”ã—ã‚’è¡Œã†ã‚³ãƒ¼ãƒ‰ã«ã‚ˆã£ã¦åˆ†æ•£ã™ã‚‹ã®ã‚’防ããŸã‚ã«ã€
QTestLib ã¯ãƒ†ã‚¹ãƒˆãƒ‡ãƒ¼ã‚¿ã®ãƒ†ã‚¹ãƒˆé–¢æ•°ã¸ã®è¿½åŠ ã‚’サãƒãƒ¼ãƒˆã—ã¾ã™ã€‚
diff --git a/doc/src/ja_JP/examples/arrowpad.qdoc b/doc/src/ja_JP/examples/arrowpad.qdoc
index 9085654..56f14a1 100644
--- a/doc/src/ja_JP/examples/arrowpad.qdoc
+++ b/doc/src/ja_JP/examples/arrowpad.qdoc
@@ -71,7 +71,7 @@
\c Q_OBJECT ã®ãƒžã‚¯ãƒ­ã¯ã€ä»¥ä¸‹ã®å†…容ã§
\c ArrowPad ã« \c tr(x) を定義ã—ã¾ã™:
- \snippet doc/src/snippets/code/doc_src_examples_arrowpad.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_arrowpad.cpp 0
å„ソーステキストãŒè¡¨ç¤ºã•ã‚Œã‚‹ã‚¯ãƒ©ã‚¹ã‚’把æ¡ã—ã¦ãŠãã¨ã€
\e {Qt Linguist} ã§è«–ç†çš„ã«é–¢é€£ã®ã‚る文字列をグループ化ã™ã‚‹ã“ã¨ãŒå‡ºæ¥ã¾ã™ã€‚
diff --git a/doc/src/ja_JP/examples/trollprint.qdoc b/doc/src/ja_JP/examples/trollprint.qdoc
index dfe7eaa..ddc6880 100644
--- a/doc/src/ja_JP/examples/trollprint.qdoc
+++ b/doc/src/ja_JP/examples/trollprint.qdoc
@@ -136,12 +136,12 @@
変更ã™ã¹ãè¡Œã¯4è¡Œã‚ã‚Šã¾ã™ã€‚
ラジオボタンã®æœ€åˆã®ãƒšã‚¢ã® \c tr() 呼ã³å‡ºã—ã«ã€2ã¤ç›®ã®å¼•æ•° "two-sided"(両é¢) ã‚’ã«è¿½åŠ ã—ã¾ã™:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 0
ãã—ã¦ã€ãƒ©ã‚¸ã‚ªãƒœã‚¿ãƒ³ã®2番目ã®ãƒšã‚¢ã® \c tr() 呼ã³å‡ºã—ã«ã€
2ã¤ç›®ã®å¼•æ•° "colors"(色) を追加ã—ã¾ã™ã€‚
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 1
ã“ã“ã§ã€\c lupdate を実行ã—ã€\e {Qt Linguist} ã§
\c trollprint_pt.ts ã‚’é–‹ãã¾ã™ã€‚2 ã¤ã®å¤‰æ›´å€‹æ‰€ãŒã‚ã‹ã‚‹ã¯ãšã§ã™ã€‚
@@ -184,7 +184,7 @@
ã“ã‚Œã¯ã€ã‚½ãƒ¼ã‚¹ã‚³ãƒ¼ãƒ‰ã§ \c TRANSLATOR
コメントを使用ã—ã¦è¡Œã„ã¾ã™:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 2
一部ã®ã‚½ãƒ¼ã‚¹ãƒ•ã‚¡ã‚¤ãƒ«ã€ç‰¹ã«ãƒ€ã‚¤ã‚¢ãƒ­ã‚°ã‚¯ãƒ©ã‚¹ã®ã‚³ãƒ¡ãƒ³ãƒˆã«
ダイアログã«åˆ°é”ã™ã‚‹ã¾ã§ã«å¿…è¦ãªæ“作を記述ã—ã¾ã™ã€‚
@@ -201,7 +201,7 @@
コメントã¯å½¹ç«‹ã¤ãƒŠãƒ“ゲーション情報をæä¾›ã™ã‚‹ãŸã‚ã€
翻訳ã«è¦ã™ã‚‹æ™‚間を節約ã§ãã¾ã™:
- \snippet doc/src/snippets/code/doc_src_examples_trollprint.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_examples_trollprint.cpp 3
\section1 Troll Print 1.1
diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc
index ffac885..64c5538 100644
--- a/doc/src/legal/3rdparty.qdoc
+++ b/doc/src/legal/3rdparty.qdoc
@@ -45,6 +45,10 @@
Run \c{configure -help} to see any options that may be available for
controlling the use of these libraries.
+ Modifications, if any, done to the third-party libraries can
+ normally be found by reviewing the change history of the
+ corresponding files in the public Qt repository.
+
\tableofcontents
\section1 DES (\c des.cpp)
@@ -126,7 +130,7 @@
See \c src/3rdparty/harfbuzz/COPYING for license details.
- \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 8
+ \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 8c
\e{This package contains C software to implement JPEG image compression and
decompression. JPEG (pronounced "jay-peg") is a standardized compression
@@ -142,6 +146,49 @@
\hr
+ The authors make NO WARRANTY or representation, either express or implied,
+ with respect to this software, its quality, accuracy, merchantability, or
+ fitness for a particular purpose. This software is provided "AS IS", and you,
+ its user, assume the entire risk as to its quality and accuracy.
+
+ This software is copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding.
+ All Rights Reserved except as specified below.
+
+ Permission is hereby granted to use, copy, modify, and distribute this
+ software (or portions thereof) for any purpose, without fee, subject to these
+ conditions:\br
+ (1) If any part of the source code for this software is distributed, then this
+ README file must be included, with this copyright and no-warranty notice
+ unaltered; and any additions, deletions, or changes to the original files
+ must be clearly indicated in accompanying documentation.\br
+ (2) If only executable code is distributed, then the accompanying
+ documentation must state that "this software is based in part on the work of
+ the Independent JPEG Group".\br
+ (3) Permission for use of this software is granted only if the user accepts
+ full responsibility for any undesirable consequences; the authors accept
+ NO LIABILITY for damages of any kind.
+
+ These conditions apply to any software derived from or based on the IJG code,
+ not just to the unmodified library. If you use our work, you ought to
+ acknowledge us.
+
+ Permission is NOT granted for the use of any IJG author's name or company name
+ in advertising or publicity relating to this software or products derived from
+ it. This software may be referred to only as "the Independent JPEG Group's
+ software".
+
+ We specifically permit and encourage the use of this software as the basis of
+ commercial products, provided that all warranty or liability claims are
+ assumed by the product vendor.
+
+ \hr
+
+ The Graphics Interchange Format(c) is the Copyright property of
+ CompuServe Incorporated. GIF(sm) is a Service Mark property of
+ CompuServe Incorporated.
+
+ \hr
+
See \c src/3rdparty/libjpeg/README for license details.
\section1 MD4 (\c md4.cpp and \c md4.h)
@@ -178,51 +225,99 @@
See \c src/3rdparty/libmng/LICENSE for license details.
- \section1 PNG Reference Library (\c libpng) version 1.4.0
+ \section1 PNG Reference Library (\c libpng) version 1.5.1
\e{Libpng was written as a companion to the PNG specification, as a way
of reducing the amount of time and effort it takes to support the PNG
file format in application programs.} -- quoted from \c
- src/3rdparty/libpng/libpng.txt.
+ src/3rdparty/libpng/libpng-manual.txt.
\hr
- copyright (C) 1999 by Willem van Schaik <willem@schaik.com>
-
- version 1.0 - 1999.10.15 - First version.
-
- Permission to use, copy, modify, and distribute this software and
- its documentation for any purpose and without fee is hereby granted,
- provided that the above copyright notice appear in all copies and
- that both that copyright notice and this permission notice appear in
- supporting documentation. This software is provided "as is" without
- express or implied warranty.
-
- \hr
-
- Copyright (c) 1998-2001 Greg Roelofs. All rights reserved.
-
- This software is provided "as is," without warranty of any kind,
- express or implied. In no event shall the author or contributors
- be held liable for any damages arising in any way from the use of
- this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute
- it freely, subject to the following restrictions:
-
- 1. Redistributions of source code must retain the above copyright
- notice, disclaimer, and this list of conditions.
- 2. Redistributions in binary form must reproduce the above copyright
- notice, disclaimer, and this list of conditions in the documenta-
- tion and/or other materials provided with the distribution.
- 3. All advertising materials mentioning features or use of this
- software must display the following acknowledgment:
-
- This product includes software developed by Greg Roelofs
- and contributors for the book, "PNG: The Definitive Guide,"
- published by O'Reilly and Associates.
-
+ libpng versions 1.2.6, August 15, 2004, through 1.5.1, February 3, 2011, are
+ Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
+ distributed according to the same disclaimer and license as libpng-1.2.5
+ with the following individual added to the list of Contributing Authors
+
+ Cosmin Truta
+
+ libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are
+ Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are
+ distributed according to the same disclaimer and license as libpng-1.0.6
+ with the following individuals added to the list of Contributing Authors
+
+ Simon-Pierre Cadieux\br
+ Eric S. Raymond\br
+ Gilles Vollant
+
+ and with the following additions to the disclaimer:
+
+ There is no warranty against interference with your enjoyment of the
+ library or against infringement. There is no warranty that our
+ efforts or the library will fulfill any of your particular purposes
+ or needs. This library is provided with all faults, and the entire
+ risk of satisfactory quality, performance, accuracy, and effort is with
+ the user.
+
+ libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
+ Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are
+ distributed according to the same disclaimer and license as libpng-0.96,
+ with the following individuals added to the list of Contributing Authors:
+
+ Tom Lane\br
+ Glenn Randers-Pehrson\br
+ Willem van Schaik
+
+ libpng versions 0.89, June 1996, through 0.96, May 1997, are
+ Copyright (c) 1996, 1997 Andreas Dilger
+ Distributed according to the same disclaimer and license as libpng-0.88,
+ with the following individuals added to the list of Contributing Authors:
+
+ John Bowler\br
+ Kevin Bracey\br
+ Sam Bushell\br
+ Magnus Holmgren\br
+ Greg Roelofs\br
+ Tom Tanner
+
+ libpng versions 0.5, May 1995, through 0.88, January 1996, are
+ Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.
+
+ For the purposes of this copyright and license, "Contributing Authors"
+ is defined as the following set of individuals:
+
+ Andreas Dilger\br
+ Dave Martindale\br
+ Guy Eric Schalnat\br
+ Paul Schmidt\br
+ Tim Wegner
+
+ The PNG Reference Library is supplied "AS IS". The Contributing Authors
+ and Group 42, Inc. disclaim all warranties, expressed or implied,
+ including, without limitation, the warranties of merchantability and of
+ fitness for any purpose. The Contributing Authors and Group 42, Inc.
+ assume no liability for direct, indirect, incidental, special, exemplary,
+ or consequential damages, which may result from the use of the PNG
+ Reference Library, even if advised of the possibility of such damage.
+
+ Permission is hereby granted to use, copy, modify, and distribute this
+ source code, or portions hereof, for any purpose, without fee, subject
+ to the following restrictions:
+
+ 1. The origin of this source code must not be misrepresented.
+
+ 2. Altered versions must be plainly marked as such and must not
+ be misrepresented as being the original source.
+
+ 3. This Copyright notice may not be removed or altered from any
+ source or altered source distribution.
+
+ The Contributing Authors and Group 42, Inc. specifically permit, without
+ fee, and encourage the use of this source code as a component to
+ supporting the PNG file format in commercial products. If you use this
+ source code in a product, acknowledgment is not required but would be
+ appreciated.
+
\hr
See \c src/3rdparty/libpng/LICENSE for license details.
@@ -277,7 +372,7 @@
\l{http://www.sqlite.org/copyright.html}{SQLite Copyright} page on the
SQLite web site for further information.
- \section1 TIFF Software Distribution (\c libtiff) version 3.8.2
+ \section1 TIFF Software Distribution (\c libtiff) version 3.9.2
\e {libtiff is a set of C functions (a library) that support the
manipulation of TIFF image files.} -- quoted from \c
@@ -406,13 +501,35 @@
See \c src/3rdparty/wintab/wintab.h for license details.
- \section1 Data Compression Library (\c zlib) version 1.2.3
+ \section1 Data Compression Library (\c zlib) version 1.2.5
\e{zlib is a general purpose data compression library. All the code
is thread safe. The data format used by the zlib library is described
by RFCs (Request for Comments) 1950 to 1952} -- quoted from \c
src/3rdparty/zlib/README.
+ \hr
+
+ Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
+
+ This software is provided 'as-is', without any express or implied
+ warranty. In no event will the authors be held liable for any damages
+ arising from the use of this software.
+
+ Permission is granted to anyone to use this software for any purpose,
+ including commercial applications, and to alter it and redistribute it
+ freely, subject to the following restrictions:
+
+ 1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would be
+ appreciated but is not required.\br
+ 2. Altered source versions must be plainly marked as such, and must not be
+ misrepresented as being the original software.\br
+ 3. This notice may not be removed or altered from any source distribution.
+
+ \hr
+
See \c src/3rdparty/zlib/README for license details.
\section1 JavaScriptCore
diff --git a/doc/src/legal/qtquicklicense.qdoc b/doc/src/legal/qtquicklicense.qdoc
new file mode 100644
index 0000000..aa9e201
--- /dev/null
+++ b/doc/src/legal/qtquicklicense.qdoc
@@ -0,0 +1,40 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page qtquicklicense.html
+ \title Qt Quick Licensing Information
+ \ingroup licensing
+ \brief Qt Quick and QtDeclarative Licensing Information.
+
+
+Applications created using Qt Quick are subject to the terms and conditions of the GNU Lesser General Public License as Qt Quick includes dependencies to QtScript and JavaScriptCore which are licensed under the terms of the GNU Library General Public License ("LGPL"). Qt Commercial Edition licensees that wish to distribute applications that use the Qt Quick need to be aware of their obligations under the LGPL. Individual contributor names and copyright dates can be found inline in the code. This 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. This 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 this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+On the Qt web site, you can find a
+\l{Qt Licensing Overview} and information on \l{Qt License Pricing}
+for commercial editions of Qt and other Qt-related products.
+*/
diff --git a/doc/src/mainpage.qdoc b/doc/src/mainpage.qdoc
new file mode 100644
index 0000000..269dc52
--- /dev/null
+++ b/doc/src/mainpage.qdoc
@@ -0,0 +1,232 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+\page gettingstarted-develop.html
+\title Develop with Qt
+\ingroup gettingstarted
+
+\div {class="indexboxcont indexboxbar"}
+Developing a Qt application involves many different steps and stages. From
+configuring Creator to distributing binaries to different platforms, Qt provides
+many options along the way.
+\image quick_screens.png
+\enddiv
+
+\div {class="indexboxcont indexboxbar normallist"}
+\keyword qt-creator-configure-target
+\section1 Configuring Qt and Creator Targets
+Qt and Creator are configurable to compile applications on many platform targets
+and multiple platforms.
+
+\section2 Configuring Creator for Qt Development:
+Creator is the integrated development environment for developing Qt applications.
+Creator encompasses every step of application development from interface design
+to application testing and deployment.
+\list
+\o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-project-managing.html}{Creating Qt Projects}
+\o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-building-running.html}{Building and Running Applications}
+ \list
+ \o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-running-targets.html}{Targets} - edit and set compiler targets
+ \o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-build-settings.html}{Build Settings} - edit and set build configurations
+ \o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-run-settings.html}{Run Settings} - edit and set application run settings
+ \endlist
+\o \l{http://doc.qt.nokia.com/nokia-qtsdk-1.0/creator-developing-symbian.html}{Setting Up Development Environment for Symbian}
+\o \l{http://doc.qt.nokia.com/nokia-qtsdk-1.0/creator-developing-maemo.html}{Setting Up Development Environment for Maemo}
+\endlist
+
+\keyword qt-platform-support
+\section2 Qt Platform Support
+Alternatively, Qt may be installed on its own without the Nokia Qt SDK.
+
+Information regarding Qt Support on Different Platforms:
+\list
+\o \l{Installing Qt for the Symbian platform}{Symbian and Mobile Development}
+\o \l{Support for Windows}{Microsoft Windows}
+\o \l{Support for Windows CE and Windows Mobile}{Microsoft Windows CE}
+\o \l{Support for Mac OS X}{Apple Mac OS X}
+\o \l{Support for Linux/X11}{Linux and X11 Platforms}
+\o \l{Support for Embedded Linux}{Qt for Embedded Linux}
+\endlist
+For more information about the platforms supported
+and their installation pages, view the \l {Supported Platforms} and the
+\l {Cross-Platform and Platform-Specific Development} pages.
+\enddiv
+
+\div {class="indexboxcont indexboxbar normallist"}
+\keyword qt-technologies
+\section1 Qt Technologies
+
+Qt introduces an innovative alternative for inter-object communication, called
+"signals and slots", that replaces the old and unsafe callback technique used in
+many legacy frameworks. Qt also provides a conventional event model for handling
+mouse clicks, key presses, and other user input. Qt's cross-platform GUI
+applications can support all the user interface functionality required by modern
+applications, such as menus, context menus, drag and drop, and dockable
+toolbars. Desktop integration features provided by Qt can be used to extend
+applications into the surrounding desktop environment, taking advantage of some
+of the services provided on each platform.
+
+The \l{All Modules}{Qt Modules} page has a listing of the technology modules offered by Qt.
+
+\keyword qt-desktop-meta-object-system
+\section2 Qt's Meta-Object System
+Qt offers a unique event system based on meta-objects, signals and slots, and property systems.
+\list
+\o \l{The Meta-Object System}{Qt's Meta-Object System} - Qt's mechanism for signals and slots, inter-object communication, run-time type information, and dynamic property system
+\o \l{The Event System}{Event System} - event handling and delivery
+\o \l{The Property System}{Property System} - dynamic object properties
+\endlist
+
+\keyword qt-ui-creation
+\section2 UI Creation
+Qt offers several options with regards to user interface creation: widget based
+applications using layouts and Qt Quick interfaces with QML.
+\list
+\o \l{Qt Quick} - create UIs using QML
+ \list
+ \o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-visual-editor.html}{Creator's QML Design Mode} - design Qt Quick interfaces using Creator's design mode
+ \endlist
+\o \l{Widgets and Layouts} - primary elements for C++ based interfaces
+ \list
+ \o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-using-qt-designer.html}{Creator's Designer} - design interfaces using Qt Designer.
+ \endlist
+\o \l{UI Design with Qt} - covers many Qt features for UI creation
+\endlist
+
+\section2 Inter-Process Communication, Threading, and Networking
+In addition to \l{qt-desktop-meta-object-system}{Qt's Meta-Object System}, Qt has several technologies
+that deal with inter-process communication.
+\list
+\o \l{Inter-Process Communication in Qt}{Inter-Process Communication} - various overviews of protocols implemented in Qt
+\o \l{Network programming with Qt}{Network Programming} - various overviews to network APIs
+\o \l{D-Bus} - D-Bus implementation in Qt
+\o \l{Thread Support in Qt}{Thread Support} - overview of threading APIs and concurrent programming topics
+\endlist
+
+\keyword qt-rendering-painting-system
+\section2 Rendering and Paint System
+Qt has various support for different rendering and painting methods.
+\list
+\o \l{Coordinate System} - Information about the coordinate system used by the paint system
+\o \l{Graphics View Framework} - manages a large number of 2D items and visualizes the items
+\o \l{Paint System} - A system for painting on the screen or on print devices using the same API
+\o \l{QtSvg Module} - module for displaying and creating SVG files
+\o Rendering APIs:
+ \list
+ \o \l{QtOpenGL Module} - module for rendering with the OpenGL API
+ \o \l{OpenVG Rendering in Qt}{QtOpenVG Module} - provides support for OpenVG painting
+ \endlist
+\o \l{Printing with Qt} - A guide to producing printed output with Qt's paint system and widgets.
+\endlist
+
+\keyword qt-webkit
+\section2 QtWebKit Module
+Web applications are increasing in importance and abundance and Qt has
+\l{http://www.webkit.org/}{WebKit} support.
+\list
+\o \l{WebKit in Qt} - WebKit Module
+\endlist
+
+\keyword qt-utilities
+\section2 Utilities
+Qt supports many utilities that work on multiple platforms.
+\list
+\o \l{Container Classes}{Containers} - Qt's implementation of various data structures such as linked lists and hash maps
+\o \l{Rich Text Processing} - for manipulating structured rich text documents
+\o \l{XML Processing} - high level manipulation of XML data using different interfaces
+\o \l{Making Applications Scriptable} - provides Qt applications with ECMAScript processor.
+\o \l{Qt Linguist Manual}{Qt Linguist} - for translating applications into local languages.
+\endlist
+For more information, visit the \l{Qt's Tools}{Qt Tools} page.
+\enddiv
+\div {class="indexboxcont indexboxbar normallist"}
+\keyword qt-testing
+\section1 Testing Qt Applications
+Testing and debugging are part of the development process and Qt offers the
+developer multiple methods of testing their code.
+\list
+\o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-debugging.html} {Debugging Applications in Creator} - various debugging options in Creator
+\o \l {http://doc.qt.nokia.com/qtsimulator/index.html}{Simulator} - testing mobile applications by simulating a mobile environment
+\o \l {QML Viewer} - an executable that is able to run QML files
+\o \l{QTestLib Manual}{QTestLib} - a unit testing framework built into Qt
+\endlist
+\enddiv
+
+\div {class="indexboxcont indexboxbar normallist"}
+\keyword qt-deployment
+\section1 Deployment
+Symbian phones, Maemo devices, desktop environments, embedded Linux devices -- Qt applications are deployable to many environments.
+To deploy Qt applications onto multiple platforms, there are special
+considerations that each platform introduce.
+\list
+\o \l{Deploying Qt Applications}{Deploying Qt Libraries} - compares static versus shared libraries and deploying Qt libraries
+\o \l{Deploying Qt Applications#licensing}{Deploying Third Party Libraries} - deployment of libraries that are not under Qt's dual-license model.
+\o Platform-Specific Deployment:
+ \list
+ \o \l{Deploying an Application on X11 Platforms}{X11} - deploying Qt applications on X11 platforms
+ \o \l{Deploying an Application on Windows}{Windows} - deploying Qt applications on Windows operating systems
+ \o \l{Deploying an Application on Mac OS X}{Mac OS X} - deploying Qt applications on Mac OS X
+ \o \l{Deploying Qt for Embedded Linux Applications}{Embedded Linux} - deploying Qt applications on embedded Linux
+ \o \l{Deploying an Application on the Symbian Platform}{Symbian} - deploying Qt applications on the Symbian platform
+ \endlist
+\o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-deployment-symbian.html}{Symbian Deployment in Creator} - Symbian application deployment built into Creator
+\o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-deployment-maemo.html}{ Deploying Qt Applications on Maemo Devices}
+\endlist
+
+\section1 Ovi Store Publishing
+Creator can publish applications to Ovi Store directly.
+\list
+\o \l{http://doc.qt.nokia.com/qtcreator-snapshot/creator-publish-ovi.html}{Publishing Qt Applications to Ovi Store}
+\endlist
+For additional information, visit the \l{Cross-Platform and Platform-Specific Development}
+and the \l {Supported Platforms} page.
+
+\enddiv
+\div {class="indexboxcont indexboxbar normallist"}
+\section1 Where to Go from Here
+
+Qt Demos and Examples
+\list
+\o \l{Qt Demonstrations}{Application Gallery}
+\o \l{Tutorials}
+\o \l {Qt Examples}
+\o \l {QML Examples and Demos}
+\endlist
+
+Qt Information
+\list
+\o \l{Programming with Qt}
+\o \l{UI Design with Qt}
+\o \l{Cross-platform and Platform-specific Development}
+\o \l{Qt and Key Technologies}
+\o \l{Best Practice Guides}
+\o \l{Qt Licenses and Credits}{Licenses and Credits}
+\endlist
+\enddiv
+*/
+
diff --git a/doc/src/modules.qdoc b/doc/src/modules.qdoc
index 38a7a8b..30b0f16 100644
--- a/doc/src/modules.qdoc
+++ b/doc/src/modules.qdoc
@@ -70,7 +70,7 @@
modules are included by default. To link only against QtCore, add
the following line to your \c .pro file:
- \snippet doc/src/snippets/code/doc_src_modules.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_modules.pro 0
On Windows, if you do not use \l qmake
or other build tools such as CMake, you also need to link against
@@ -91,7 +91,7 @@
All other Qt modules rely on this module. To include the
definitions of the module's classes, use the following directive:
- \snippet doc/src/snippets/code/doc_src_qtcore.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtcore.cpp 0
*/
@@ -105,7 +105,7 @@
To include the definitions of both modules' classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtgui.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtgui.pro 0
*/
/*!
@@ -118,12 +118,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtmultimedia.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtmultimedia.cpp 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtmultimedia.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtmultimedia.pro 0
The functionality provided by the \l{Phonon Module} is on a higher level
and in many cases more suitable for application developers.
@@ -140,12 +140,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtnetwork.cpp 1
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtnetwork.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtnetwork.pro 0
*/
/*!
@@ -175,12 +175,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtopengl.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtopengl.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtopengl.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtopengl.pro 1
The Qt OpenGL module is implemented as a platform-independent Qt/C++
wrapper around the platform-dependent GLX (version 1.3 or later),
@@ -266,11 +266,11 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 0
To link against the module, add this line to your \l qmake \c .pro file:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtscript.pro 1
For detailed information on how to make your application
scriptable with QtScript, see \l{Making Applications
@@ -323,11 +323,11 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtscripttools.cpp 0
To link against the module, add this line to your \l qmake \c .pro file:
- \snippet doc/src/snippets/code/doc.src.qtscripttools.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtscripttools.pro 1
*/
/*!
@@ -338,12 +338,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtsql.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtsql.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtsql.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtsql.pro 1
See the \l{SQL Programming} guide for information about using this
module in your applications.
@@ -362,12 +362,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtsvg.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtsvg.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtsvg.pro 1
\section1 License Information
@@ -412,12 +412,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtxml.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtxml.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtxml.pro 1
Further XML support is provided by the \l{Qt Solutions} group who
provide, for example, classes that support SOAP and MML with the
@@ -437,12 +437,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtxmlpatterns.pro 1
\section1 Further Reading
@@ -523,7 +523,7 @@
The following declaration in a \c qmake project file ensures that
an application is compiled and linked appropriately:
- \snippet doc/src/snippets/code/doc_src_phonon.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_phonon.pro 0
\section1 Qt Backends
@@ -586,12 +586,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qt3support.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt3support.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qt3support.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt3support.pro 1
\note Since this module provides compatibility classes for
diverse parts of the Qt 3 API, it has dependencies on the QtCore,
@@ -615,12 +615,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 0
To link against the module, add this line to your \c qmake .pro
file:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.pro 1
*/
/*!
@@ -640,7 +640,7 @@
in a \c qmake project file to ensure that the application is compiled
and linked appropriately.
- \snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtuiloader.pro 0
A form loader object, provided by the QUiLoader class, is used to
construct the user interface. This user interface can
@@ -652,7 +652,7 @@
To include the definitions of the module's classes, use the following
directive:
- \snippet doc/src/snippets/code/doc_src_qtuiloader.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtuiloader.cpp 1
\sa{Calculator Builder Example}, {World Time Clock Builder Example}
*/
@@ -672,7 +672,7 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qthelp.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qthelp.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
@@ -731,12 +731,12 @@
To include the definitions of the module's classes, use the
following directive:
- \snippet doc/src/snippets/code/doc_src_qttest.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qttest.cpp 0
To link against the module, add this line to your \l qmake \c
.pro file:
- \snippet doc/src/snippets/code/doc_src_qttest.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qttest.pro 1
See the \l{QTestLib Manual} for a detailed introduction on how to use
Qt's unit testing features with your applications.
@@ -865,13 +865,13 @@
To use this module, use the following code in your application:
- \snippet doc/src/snippets/code/doc_src_qtdbus.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtdbus.cpp 0
If you're using qmake to build your application, you can add this
line to your .pro file to make it link against the QtDBus
libraries:
- \snippet doc/src/snippets/code/doc_src_qtdbus.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qtdbus.pro 1
\note The source code for this module is located in the \c{src/qdbus}
directory. When installing Qt from source, this module is built when Qt's
diff --git a/doc/src/objectmodel/objecttrees.qdoc b/doc/src/objectmodel/objecttrees.qdoc
index ba677b9..cb63c17 100644
--- a/doc/src/objectmodel/objecttrees.qdoc
+++ b/doc/src/objectmodel/objecttrees.qdoc
@@ -77,7 +77,7 @@
behavior applies. Normally, the order of destruction still doesn't
present a problem. Consider the following snippet:
- \snippet doc/src/snippets/code/doc_src_objecttrees.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_objecttrees.cpp 0
The parent, \c window, and the child, \c quit, are both \l {QObject}
{QObjects} because QPushButton inherits QWidget, and QWidget inherits
@@ -91,7 +91,7 @@
But now consider what happens if we swap the order of construction, as
shown in this second snippet:
- \snippet doc/src/snippets/code/doc_src_objecttrees.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_objecttrees.cpp 1
In this case, the order of destruction causes a problem. The parent's
destructor is called first because it was created last. It then calls
diff --git a/doc/src/objectmodel/properties.qdoc b/doc/src/objectmodel/properties.qdoc
index 7d1ecec..92c182e 100644
--- a/doc/src/objectmodel/properties.qdoc
+++ b/doc/src/objectmodel/properties.qdoc
@@ -46,12 +46,12 @@
To declare a property, use the \l {Q_PROPERTY()} {Q_PROPERTY()}
macro in a class that inherits QObject.
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 0
Here are some typical examples of property declarations taken from
class QWidget.
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 1
A property behaves like a class data member, but it has additional
features accessible through the \l {Meta-Object System}.
@@ -83,6 +83,10 @@
existing signal in that class that is emitted whenever the value
of the property changes.
+ \o A \c REVISION number is optional. If included, it defines the
+ the property and its notifier signal to be used in a particular
+ revision of the API that is exposed to QML.
+
\o The \c DESIGNABLE attribute indicates whether the property
should be visible in the property editor of GUI design tool (e.g.,
\l {Qt Designer}). Most properties are \c DESIGNABLE (default
@@ -131,7 +135,7 @@
be a user-defined type. In this example, class QDate is considered
to be a user-defined type.
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 2
Because QDate is user-defined, you must include the \c{<QDate>}
header file with the property declaration.
@@ -152,7 +156,7 @@
the code snippet below, the call to QAbstractButton::setDown() and
the call to QObject::setProperty() both set property "down".
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 3
Accessing a property through its \c WRITE accessor is the better
of the two, because it is faster and gives better diagnostics at
@@ -162,7 +166,7 @@
can \e discover a class's properties at run time by querying its
QObject, QMetaObject, and \l {QMetaProperty} {QMetaProperties}.
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 4
In the above snippet, QMetaObject::property() is used to get \l
{QMetaProperty} {metadata} about each property defined in some
@@ -189,7 +193,7 @@
for the \c READ and \c WRITE functions. The declaration of MyClass
then might look like this:
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 5
The \c READ function is const and returns the property type. The
\c WRITE function returns void and has exactly one parameter of
@@ -200,7 +204,7 @@
QObject that is an instance of MyClass, we have two ways to set
its priority property:
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 6
In the example, the enumeration type that is the property type is
declared in MyClass and registered with the \l{Meta-Object System}
@@ -262,7 +266,7 @@
Q_CLASSINFO(), that can be used to attach additional
\e{name}--\e{value} pairs to a class's meta-object, for example:
- \snippet doc/src/snippets/code/doc_src_properties.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_properties.cpp 7
Like other meta-data, class information is accessible at run-time
through the meta-object; see QMetaObject::classInfo() for details.
diff --git a/doc/src/objectmodel/signalsandslots.qdoc b/doc/src/objectmodel/signalsandslots.qdoc
index 4c018b5..8b52df5 100644
--- a/doc/src/objectmodel/signalsandslots.qdoc
+++ b/doc/src/objectmodel/signalsandslots.qdoc
@@ -440,7 +440,7 @@
You can even use both mechanisms in the same project. Just add the
following line to your qmake project (.pro) file.
- \snippet doc/src/snippets/code/doc_src_containers.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_containers.cpp 22
It tells Qt not to define the moc keywords \c{signals}, \c{slots},
and \c{emit}, because these names will be used by a 3rd party
diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc
index f51e320..eb9b2be 100644
--- a/doc/src/overviews.qdoc
+++ b/doc/src/overviews.qdoc
@@ -42,8 +42,8 @@
Qt is a cross-platform application and UI framework for writing
web-enabled applications for desktop, mobile, and embedded
operating systems. This page contains links to articles and overviews
- explaining key components and techniques used in Qt development.
-
+ explaining key components and techniques used in Qt development.
+
\generatelist {related}
*/
@@ -62,7 +62,7 @@
/*!
\group qt-graphics
- \ingroup qt-basic-concepts
+ \ingroup qt-basic-concepts
\title Qt Graphics and Printing
\brief The Qt components for doing graphics.
@@ -112,7 +112,7 @@
\ingroup technology-apis
\ingroup best-practices
\ingroup qt-basic-concepts
-
+
These pages document Qt's API's for using SQL database systems
in Qt applications.
@@ -133,7 +133,7 @@
\generatelist{related}
*/
-/*!
+/*!
\group licensing
\title Qt Licenses and Credits
@@ -146,3 +146,56 @@
\generatelist {related}
*/
+
+/*!
+ \group qml-best-practices
+ \title QML Best Practices Guides
+
+ \brief QML Programming Best Practices Guides
+
+ These documents provide guidelines and best practices for using QML and Qt
+ to solve specific technical problems.
+
+ \generatelist {related}
+*/
+/*!
+ \group qml-features
+ \title QML Features
+
+ \brief Features of the QML Language
+
+These are overviews of the many features of the QML language and \l{Qt Quick}.
+
+\list
+\o \l{QML Basic Elements}{Basic Elements}
+\o \l{QML Basic Types}{Data Types}
+\o \l{Property Binding}
+\o \l{Using QML Positioner and Repeater Items}{Component Layouts}
+\o \l{Anchor-based Layout in QML}{Layouts using Anchors}
+\o \l{QML Mouse Events}{Mouse Events}
+\o \l{QML Text Handling and Validators}{Text Handling and Validators}
+\o \l{Keyboard Focus in QML}{Keyboard Focus}
+\o \l{QML Signal and Handler Event System}{Signal and Handler Event System}
+\o \l{Importing Reusable Components}
+\o \l{QML States}{States}
+\o \l{QML Animation and Transitions}{Animation and Transitions}
+\o \l{QML Data Models}{Structuring Data with Models}
+\o \l{Presenting Data with Views}
+\o \l{Extending QML Functionalities using C++}
+\o \l{Using QML Bindings in C++ Applications}
+\o \l{Integrating QML Code with Existing Qt UI Code}
+\o \l{Dynamic Object Management in QML}{Dynamic Object Management}
+\o \l{Network Transparency}{Loading Resources in QML}
+\o \l{QML Internationalization}{Internationalization}
+\endlist
+*/
+/*!
+ \group qml-architecture
+ \title QML Architecture
+
+ \brief QML Architecture
+
+ These are overviews of the architecture of QML and Qt Declarative Module.
+
+ \generatelist {related}
+*/
diff --git a/doc/src/painting-and-printing/coordsys.qdoc b/doc/src/painting-and-printing/coordsys.qdoc
index 252159e..d0906d8 100644
--- a/doc/src/painting-and-printing/coordsys.qdoc
+++ b/doc/src/painting-and-printing/coordsys.qdoc
@@ -97,10 +97,10 @@
\row
\o
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 0
\o
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 1
\endtable
When rendering with a pen with an even number of pixels, the
@@ -163,10 +163,10 @@
\row
\o
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 2
\o
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 3
\endtable
\section1 Transformations
@@ -319,7 +319,7 @@
-50) to (50, 50) with (0, 0) in the center by calling the
QPainter::setWindow() function:
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 4
Now, the logical coordinates (-50,-50) correspond to the paint
device's physical coordinates (0, 0). Independent of the paint
@@ -333,7 +333,7 @@
viewport and "window" maintain the same aspect ratio to prevent
deformation:
- \snippet doc/src/snippets/code/doc_src_coordsys.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_coordsys.cpp 5
If we make the logical coordinate system a square, we should also
make the viewport a square using the QPainter::setViewport()
diff --git a/doc/src/platforms/emb-performance.qdoc b/doc/src/platforms/emb-performance.qdoc
index 1ae35bc..6c96921 100644
--- a/doc/src/platforms/emb-performance.qdoc
+++ b/doc/src/platforms/emb-performance.qdoc
@@ -103,7 +103,7 @@
operators. Improved memory allocation and performance may be
gained by re-implementing these functions:
- \snippet doc/src/snippets/code/doc_src_emb-performance.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_emb-performance.cpp 1
The example above shows the necessary code to switch to the plain
C memory allocators.
diff --git a/doc/src/platforms/emb-pointer.qdoc b/doc/src/platforms/emb-pointer.qdoc
index b580077..941cba2 100644
--- a/doc/src/platforms/emb-pointer.qdoc
+++ b/doc/src/platforms/emb-pointer.qdoc
@@ -144,7 +144,7 @@
its headers using -L and -I options in the \c qmake.conf file in
your \c mkspec. Also it can be helpful to add a -rpath-link:
- \snippet doc/src/snippets/code/doc_src_emb-pointer.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_emb-pointer.pro 7
In order to use this mouse driver, tslib must also be correctly
installed on the target machine. This includes providing a \c
diff --git a/doc/src/platforms/mac-differences.qdoc b/doc/src/platforms/mac-differences.qdoc
index 251e900..1f71270 100644
--- a/doc/src/platforms/mac-differences.qdoc
+++ b/doc/src/platforms/mac-differences.qdoc
@@ -99,7 +99,7 @@
If you use \c qmake and Makefiles, use the \c QMAKE_LFLAGS_SONAME setting:
- \snippet doc/src/snippets/code/doc_src_mac-differences.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_mac-differences.pro 0
Alternatively, you can modify the install name using the
install_name_tool(1) on the command line. See its manpage for more
@@ -165,7 +165,7 @@
the bundle resides on the disk. The following code returns the
path of the application bundle:
- \snippet doc/src/snippets/code/doc_src_mac-differences.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_mac-differences.cpp 1
Note: When OS X is set to use Japanese, a bug causes this sequence
to fail and return an empty string. Therefore, always test the
diff --git a/doc/src/platforms/supported-platforms.qdoc b/doc/src/platforms/supported-platforms.qdoc
index b58d1d7..f1e8004 100644
--- a/doc/src/platforms/supported-platforms.qdoc
+++ b/doc/src/platforms/supported-platforms.qdoc
@@ -26,10 +26,688 @@
****************************************************************************/
/*!
+ \page windows-support.html
+ \title Support for Windows
+ \brief Platform support for Windows.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Windows
+
+ Qt is a comprehensive application and UI framework for developing Windows
+ applications that can also be deployed across many other desktop and
+ embedded operating systems without rewriting the source code. Use the
+ code from one single code-base and rebuild for all
+ \l{Supported Platforms}{supported Windows versions and other platforms}.
+
+ \section1 Getting Started on Windows
+
+ \list
+ \o \l{Supported Platforms}{Supported Windows platforms} - Qt
+ supports a wide range of Windows platforms.
+ \o \l{Qt for Windows Requirements}{Qt for Windows Requirements}
+ - Requirements for developing with Qt on Windows.
+ \o \l{Installing Qt for Windows}{Installing Qt for Windows}
+ - Build Qt for Windows development.
+ \o \l{Platform and Compiler Notes - Windows}{Platform and Compiler Notes - Windows}
+ - Windows platform specific notes.
+ \o \l{Getting Started Guides}{Getting started} - Getting started developing for Windows
+ \endlist
+
+ \section1 Key Features for Windows Development
+
+ \section2 Rich Class Library
+
+ The Qt class library includes all the functionality needed to build
+ advanced GUI applications.
+
+ \list
+ \o Complete set of customizable \l{UI Design with Qt}{UI
+ controls/widgets}
+ \o 3D graphics support with \l{QtOpenGL Module}{OpenGL}
+ or Direct3D
+ \o Powerful \l{Thread Support in Qt}{multi-threading} features
+ \o \l{Graphics View Framework}{2D graphics canvas} capable of
+ handling millions of items
+ \o Integrated \l{Phonon multimedia framework}{Phonon multimedia
+ framework}
+ \o \l{WebKit in Qt}{WebKit} integration
+ \o \l{Network programming with Qt}{Networking}, \l{QtXml Module}
+ {XML} and \l{SQL in Qt}{database} functionality
+ \o \l{ECMAScript Reference}{ECMA standard} scripting engine
+ \endlist
+
+ \section2 Integrated Development Tools
+
+ Qt includes a set of integrated development tools to speed
+ development on the Windows platform.
+
+ \list
+ \o \l{Qt Designer Manual}{Qt Designer} provides a drag and drop
+ visual GUI builder.
+ \o \l{Qt Linguist Manual}{Qt Linguist} provides internationalization
+ and translation features.
+ \o \l{Qt Assistant Manual}{Qt Assistant} is a customizable HTML help
+ file reader providing the complete Qt documentation offline.
+ \endlist
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ \section2 Visual Studio Add-in.
+
+ The Qt Visual Studio Add-in allows programmers to create, build, debug
+ and run Qt applications from within Microsoft Visual Studio 2005, 2008
+ and 2010. The add-in contains project wizards, Qt project import/export
+ support, integrated Qt resource manager and automated build setup for
+ the Qt Meta-Object Compiler, User Interface Compiler, and Resource
+ Compiler.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+*/
+
+/*!
+ \page linuxX11-support.html
+ \title Support for Linux/X11
+ \brief Platform support for Linux/X11.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Linux/X11
+
+ Qt is a comprehensive application and UI framework for developing
+ Linux/X11 applications that can also be deployed across many other
+ desktop and embedded operating systems without rewriting the source code.
+ Use the code from one single code-base and rebuild for all
+ \l{Supported Platforms}{supported X11 versions and other platforms}.
+
+ \section1 Getting Started on Linux/X11
+
+ \list
+ \o \l{Supported Platforms}{Supported Linux/X11 platforms} - Qt
+ supports a wide range of Linux/X11 platforms.
+ \o \l{Qt for X11 Requirements}{Qt for X11 Requirements}
+ - Software required to run Qt on Linux/X11.
+ \o \l{Installing Qt for X11 Platforms}{Installing Qt for X11 Platforms}
+ - Build Qt for Linux/X11 development.
+ \o \l{Platform and Compiler Notes - X11}{Platform and Compiler Notes - X11}
+ - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Linux/X11 Development
+
+ \section2 Integrated Development Tools
+
+ Qt includes a set of integrated development tools to speed development
+ on X11 platforms.
+
+ \list
+ \o \l{Qt Designer Manual}{Qt Designer} provides a drag and drop
+ visual GUI builder.
+ \o \l{Qt Linguist Manual}{Qt Linguist} provides internationalization
+ and translation features.
+ \o \l{Qt Assistant Manual}{Qt Assistant} is a customizable HTML help
+ file reader providing the complete Qt documentation offline.
+ \o Integration with
+ \l{http://doc.qt.nokia.com/qt-eclipse-1.6/index.html}{Eclipse}
+ and KDevelop IDEs are also available.
+ \endlist
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ \section2 Rich Class Library
+
+ The Qt class library includes all the functionality needed to build
+ advanced GUI applications.
+
+ \list
+ \o Complete set of customizable \l{UI Design with Qt}{UI
+ controls/widgets}
+ \o 3D graphics support with \l{QtOpenGL Module}{OpenGL
+ integration}
+ \o Powerful \l{Thread Support in Qt}{multi-threading} features
+ \o \l{Graphics View Framework}{2D graphics canvas} capable of
+ handling millions of items
+ \o Integrated \l{Phonon multimedia framework}{Phonon multimedia
+ framework}
+ \o \l{WebKit in Qt}{WebKit} integration
+ \o \l{Network programming with Qt}{Networking}, \l{QtXml Module}
+ {XML} and \l{SQL in Qt}{database} functionality
+ \o \l{ECMAScript Reference}{ECMA standard} scripting engine
+ \endlist
+
+ \section2 Qt is the Foundation of KDE
+
+ Qt is best known in the Linux community as the basis for the KDE
+ desktop environment. Almost everything in KDE is based on Qt, and
+ Qt forms the foundation for thousands of open source KDE applications
+ developed by community members worldwide.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+*/
+
+/*!
+ \page mac-support.html
+ \title Support for Mac OS X
+ \brief Platform support for Mac OS X.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Mac OS X
+
+ Qt is a comprehensive application and UI framework for developing Mac
+ applications that can also be deployed across many other desktop and
+ embedded operating systems without rewriting the source code. Use the
+ code from one single code-base and rebuild for all
+ \l{Supported Platforms}{supported Windows versions and other platforms}.
+
+ \section1 Getting Started on Mac
+
+ \list
+ \o \l{Supported Platforms}{Supported Mac OS X platforms} - Qt supports
+ a wide range of Mac platform variants.
+ \o \l{Qt for Mac OS X Requirements}{Qt for Mac OS X Requirements}
+ - Software required to run Qt on Mac OS X.
+ \o \l{Installing Qt for X11 Platforms}{Installing Qt for X11 Platforms}
+ - Build Qt for Mac OS X development.
+ \o \l{Platform and Compiler Notes - Mac OS X}{Platform and Compiler Notes - Mac OS X}
+ - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Mac OS X Development
+
+ \section2 Integrated Development Tools
+
+ Qt includes a set of integrated development tools to speed development
+ on the Mac platform.
+
+ \list
+ \o \l{Qt Designer Manual}{Qt Designer} provides a drag and drop
+ visual GUI builder.
+ \o \l{Qt Linguist Manual}{Qt Linguist} provides internationalization
+ and translation features.
+ \o \l{Qt Assistant Manual}{Qt Assistant} is a customizable HTML help
+ file reader providing the complete Qt documentation offline.
+ \endlist
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ \section2 Rich Class Library
+
+ The Qt class library includes all the functionality needed to build
+ advanced GUI applications.
+
+ \list
+ \o Complete set of customizable \l{UI Design with Qt}{UI
+ controls/widgets}
+ \o 3D graphics support with \l{QtOpenGL Module}{OpenGL
+ integration}
+ \o Powerful \l{Thread Support in Qt}{multi-threading} features
+ \o \l{Graphics View Framework}{2D graphics canvas} capable of
+ handling millions of items
+ \o Integrated \l{Phonon multimedia framework}{Phonon multimedia
+ framework}
+ \o \l{WebKit in Qt}{WebKit} integration
+ \o \l{Network programming with Qt}{Networking}, \l{QtXml Module}
+ {XML} and \l{SQL in Qt}{database} functionality
+ \o \l{ECMAScript Reference}{ECMA standard} scripting engine
+ \endlist
+
+ \section3 Supports Intel Hardware and Universal Binaries
+
+ Qt is written without making assumptions about the number representation,
+ endianness or architecture of the underlying processor. To support Intel
+ hardware on the Apple platforms, Qt customers simply need to recompile
+ their apps.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+ \note Qt also provides support for 64-bit applications on top of Cocoa APIs.
+*/
+/*!
+ \page windowsCE-Mobile-support.html
+ \title Support for Windows CE and Windows Mobile
+ \brief Platform support for Windows CE and Windows Mobile.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Windows CE and Windows Mobile
+
+ Qt is a C++ application and UI framework. You can use Qt to write
+ rich and high performance applications using an intuitive API
+ available for a wide range of devices. Use the code from one single
+ code-base and rebuild for all \l{Supported Platforms}{supported
+ Windows CE/Mobile versions as well as other other platforms}.
+
+ Supporting most existing Windows CE configurations and with minimal
+ hardware dependencies, Qt is easy to build even for custom hardware
+ configurations. Unused components and features can even be compiled out.
+
+ \section1 Getting Started on Windows CE/Mobile
+
+ \list
+ \o \l{Supported Platforms}{Supported Windows CE/Mobile platforms}
+ - Qt supports a wide range of Windows CE/Mobile platform variants.
+ \o \l{Qt for Windows CE Requirements}{Qt for Windows CE/Mobile
+ Requirements} - Software required to run Qt on Windows CE/Mobile.
+ \o \l{Installing Qt for Windows CE}{Installing Qt for
+ Windows CE/Mobile Platforms} - Build Qt for Windows CE/Mobile
+ development.
+ \o \l{Platform and Compiler Notes - Windows CE}{Platform and
+ Compiler Notes - Windows CE/Mobile} - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Windows CE/Mobile Development
+
+ On top of all the tools and API and class libraries that Qt offers,
+ Qt for Windows CE provides you with added functionality for an
+ optimized embedded development environment.
+
+ \section2 Native and Customizable Look and Feel
+
+ Windows Mobile and Windows CE styles are available with Qt. At runtime,
+ Qt applications will detect which style to use. The look and feel of
+ your applications can also be easily customized in a fraction of
+ the time and lines of code required for traditional UI styling with
+ Qt Style Sheets.
+
+ \section2 Advanced Text Layout Engine
+
+ Qt for Windows CE supports TrueType® and raster fonts. Qt also has
+ extended Unicode support and right-to-left languages. Qt’s rich text
+ engine adds capabilities for complex text layouts including tables,
+ path tracing and text which flows around shapes.
+
+ \section2 Qt for Windows CE/Mobile also provide support for:
+
+ \list
+ \o Graphics Acceleration using \l{Qt for Windows CE and OpenGL
+ ES}{OpenGL ES}
+ \o \l{Graphics View Framework}{2D graphics canvas} capable of
+ handling millions of items.
+ \o \l{Qt Designer Manual}{Qt Designer} for GUI layout and
+ forms builder.
+ \o \l{Qt Linguist Manual}{Qt Linguist} provides internationalization
+ and translation features.
+ \endlist
+
+ Applications created with Qt for Windows CE/Mobile can be ported to
+ Symbian, Maemo and any other OS that Qt supports.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+*/
+
+/*!
+ \page embeddedLinux-support.html
+ \title Support for Embedded Linux
+ \brief Platform support for Embedded Linux.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Embedded Linux
+
+ Qt is the leading application and UI framework for devices powered
+ by embedded Linux. You can use Qt to create highly memory efficient
+ devices and applications that have completely unique user experiences.
+
+ Qt runs anywhere Linux runs. Qt’s intuitive API means fewer lines of
+ code and higher level functionality in less time. Use the code from
+ one single code-base and rebuild for all \l{Supported Platforms}
+ {supported platforms}.
+
+ \section1 Getting Started on Embedded Linux
+
+ \list
+ \o \l{Supported Platforms}{Supported Linux platforms}
+ - Qt supports a wide range of Linux platform variants.
+ \o \l{Qt for Embedded Linux Requirements}{Qt for Embedded Linux
+ Requirements} - Software required to run Qt on Embedded Linux.
+ \o \l{Installing Qt for Embedded Linux}{Installing Qt for Embedded
+ Linux} - Build Qt for development on Embedded Linux.
+ \o \l{Platform and Compiler Notes - Embedded Linux}{Platform and
+ Compiler Notes - Embedded Linux} - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Embedded Linux Development
+
+ On top of all the tools and API and class libraries that Qt offers,
+ such as WebKit, Qt for Embedded Linux provides you with key components
+ for an optimized embedded development environment.
+
+ \section2 Compact and Efficient Windowing System \l{Qt for Embedded Linux Classes}{QWS}
+
+ Qt builds on the standard API for embedded Linux devices with its own
+ compact window system. Qt-based applications write directly to the
+ Linux framebuffer, eliminating the need for the X11 windowing system.
+
+ \section2 Virtual Frame Buffer (QVFb)
+
+ Qt for Embedded Linux provides a \l{The Virtual Framebuffer}{virtual
+ frame buffer} that will match the physical device display, pixel for
+ pixel. This gives the developer a realistic testing infrastructure
+ testing on the desktop where the frame buffer simulates the physical
+ device display’s width, height and color depth.
+
+ \section2 Inter-Process Communication (IPC)
+
+ IPC allows for creation of rich multi-application user experiences.
+ Two main concepts define inter-process communication: channels and
+ messages.
+
+ \section2 Extended Font Format
+
+ Qt supports a wide range of font formats on embedded Linux including:
+ TrueType®, Postscript® Type1 and Qt pre-rendered fonts. Qt has
+ extended Unicode support including automatic data extraction at build
+ time and automatic update at runtime.
+
+ Plug-ins for custom font formats are also available allowing new font
+ engines to be easily added at runtime. Font sharing capabilities
+ between applications allow for increased memory efficiency.
+
+ Applications created with Qt for Embedded Linux can be ported to
+ Windows CE and any other OS that Qt supports.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+*/
+/*!
+ \page symbian-support.html
+ \title Support for Symbian
+ \brief Platform support for Symbian.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Symbian
+
+ Qt provides support for the Symbian platform with integration
+ to the S60 framework. If you are developing apps for the Symbian,
+ Maemo or MeeGo platforms in most cases, you can use Qt under the
+ free LGPL licensing option. Qt is cross-platform, and that means
+ that you can use the code from one single code-base and rebuild
+ for all \l{Supported Platforms}{supported platforms}.
+
+ \section1 Getting Started on Symbian
+
+ \list
+ \o \l{Supported Platforms}{Supported platform}
+ - Details on the Qt support for Symbian.
+ \o \l{Qt for the Symbian platform Requirements}{Qt for the
+ Symbian platform Requirements} - Software required to run Qt
+ on Symbian.
+ \o \l{Installing Qt for the Symbian platform}{Installing Qt
+ for the Symbian platform} - Build Qt for Symbian development.
+ \o \l{Platform and Compiler Notes - Symbian}{Platform Notes - Symbian}
+ - Platform specific notes.
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Symbian Development
+
+ On top of all the tools and the API and class libraries that Qt
+ offers, Qt provides you with added functionality for an optimized
+ Symbian development experience.
+
+ \section2 Native Look and Feel
+
+ Qt will detect which theme the phone is running and applies the
+ style at runtime to your Qt application. The look and feel of your
+ applications can also be easily customized in a fraction of the
+ time and lines of code required for traditional UI styling with
+ Qt Style Sheets.
+
+ \section2 Graphics Features
+
+ Qt for Symbian contains a powerful paint engine that provides
+ features such as anti, aliasing, gradients, curves and transparency.
+ It also has animation support with timelines and easing curves. It
+ is already targeting future device technology by supporting hardware
+ acceleration using OpenVG.
+
+ \section2 Device Configurations
+
+ Using Qt for Symbian all supported Symbian devices provides automatic
+ support for swiching between landscape and portrait mode, different
+ screen resolutions as well as touch screen and key pad input.
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ \section3 Licensing
+
+ Qt for Symbian is available under the Qt Commercial License, the LGPL
+ v. 2.1 "LGPL") and the GPL v. 3.0. Symbian currently licenses their
+ software products under either the Symbian Foundation License or the
+ Eclipse Public License ("EPL"). While the LGPL and the EPL are not
+ compatible and may not be combined on a file-by-file basis, they may
+ be used in a common environment provided that the interaction between
+ Qt and Symbian is limited to: dynamic linking, inter-process
+ communication and data exchange. Therefore, most Symbian developers
+ can use Qt for Symbian under the LGPL.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+
+*/
+/*!
+ \page maemo-support.html
+ \title Support for Maemo
+ \brief Platform support for Maemo.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on Maemo
+
+ Qt is a comprehensive application and UI framework for developing
+ Maemo applications that can also be deployed across major
+ device and desktop operating systems without rewriting the source code.
+ If you are developing apps for the Symbian, Mameo platforms
+ in most cases, you can use Qt under the free LGPL licensing option.
+ Qt is cross-platform, and that means that you can use the code from
+ one single code-base and rebuild for all \l{Supported Platforms}
+ {supported platforms}. Maemo 6 is now MeeGo.
+
+ \section1 Getting Started on Maemo
+ \list
+ \o \l{Supported Platforms}{Supported Maemo platforms}
+ - Qt support for Maemo versions.
+ \omit
+ \o \l{Qt for Maemo Requirements}{Qt for Maemo
+ Requirements} - Software required to run Qt on Maemo.
+ \o \l{Installing Qt for Maemo}{Installing Qt for
+ Maemo} - Build Qt for Maemo development.
+ \o \l{Platform and Compiler Notes - Maemo}{Platform and
+ Compiler Notes - Maemo} - Platform specific notes.
+ \endomit
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for Maemo Development
+
+ \section2 Native Look and Feel
+
+ Qt will detect which theme the device is running and applies the
+ style at runtime to your Qt application. Widgets are optimized
+ for touch screen usage.
+
+ \section2 Graphics Features
+
+ Qt for Maemo provides a powerful paint engine that cotain
+ features such as anti aliasing, gradients, curves and transparency.
+ It also has animation support with timelines and easing curves. Qt
+ for Maemo also supports hardware acceleration using ARM NEON
+ and OpenGL ES 2.0.
+
+ \section2 Device Configurations
+
+ Applications developed with Qt for Maemo will across all
+ supported Maemo devices provide automatic support for switching
+ between landscape and portrait mode. They will support input methods,
+ including predictive text input and on-screen keyboard. The
+ applications will also have support for one finger touch events and
+ gestures, and have configurable kinetic scrolling.
+
+ \section2 Maemo - Linux/X11
+
+ Qt supports a wide range of X11 platform variants, such as: Solaris,
+ AIX, HP-UX, Maemo 5 and MeeGo. Qt for Maemo contains all Qt modules
+ and features the same functionality as the Qt on X11 version.
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+*/
+
+/*!
+
+ \page meego-support.html
+ \title Support for MeeGo
+ \brief Platform support for MeeGo.
+ \ingroup platform-specific
+ \ingroup platform-details
+
+ \section1 Qt on MeeGo
+
+ Qt is a comprehensive application and UI framework for developing
+ MeeGo applications that can also be deployed across major
+ device and desktop operating systems without rewriting the source code.
+ If you are developing apps for the Symbian, MeeGo platforms
+ in most cases, you can use Qt under the free LGPL licensing option.
+ Qt is cross-platform, and that means that you can use the code from
+ one single code-base and rebuild for all \l{Supported Platforms}
+ {supported platforms}.
+
+ \section1 Getting Started on MeeGo
+
+ \list
+ \o \l{Supported Platforms}{Supported MeeGo platforms}
+ - Qt support for MeeGo versions.
+ \omit
+ \o \l{Qt for MeeGo Requirements}{Qt for MeeGo
+ Requirements} - Software required to run Qt on MeeGo.
+ \o \l{Installing Qt for MeeGo}{Installing Qt for
+ MeeGo} - Build Qt for MeeGo development.
+ \o \l{Platform and Compiler Notes - MeeGo}{Platform and
+ Compiler Notes - MeeGo} - Platform specific notes.
+ \endomit
+ \o \l{Getting Started Guides}{Getting started}
+ \endlist
+
+ \section1 Key Features for MeeGo Development
+
+ \section2 Native Look and Feel
+
+ Qt will detect which theme the device is running and applies the
+ style at runtime to your Qt application. Widgets are optimized
+ for touch screen usage.
+
+ \section2 Graphics Features
+
+ Qt for MeeGo provides a powerful paint engine that cotain
+ features such as anti aliasing, gradients, curves and transparency.
+ It also has animation support with timelines and easing curves. Qt
+ for MeeGo also supports hardware acceleration using ARM NEON, x86,
+ and OpenGL ES 2.0.
+
+ \section2 Device Configurations
+
+ Qt is the foundation of MeeGo UI and application development and
+ therefore Qt will be present in all upcoming MeeGo devices. Qt
+ can provide automatic support for:
+ \list
+ \o Switching between landscape and portrait mode
+ \o Input Methods, including predictive text input and on-screen
+ keyboard
+ \o Configurable kinetic scrolling
+ \endlist
+
+ \section2 Maemo - Linux/X11
+
+ Qt supports a wide range of X11 platform variants, such as: Solaris,
+ AIX, HP-UX, Maemo 5 and MeeGo. Qt for MeeGo contains all Qt modules
+ and features the same functionality as the Qt on X11 version.
+
+ \section2 Cross-Platform Development using Qt Creator
+
+ \l{http://doc.qt.nokia.com/qtcreator-snapshot/index.html}{Qt Creator} is
+ a complete Cross-platform IDE included in the Qt SDK. The IDE allows
+ programmers to create, build, debug and run Qt applications accross all
+ supported platforms.
+
+ Additional \l{Cross-Platform and Platform-Specific Development}
+ information.
+*/
+
+/*!
\page supported-platforms.html
\title Supported Platforms
\brief The platforms supported by Nokia for Qt.
\ingroup platform-specific
+ \group platform-details
+
+ Qt is a cross-platform application and UI framework. Using Qt,
+ you can write web-enabled applications once and deploy them
+ across desktop, mobile and embedded operating systems without
+ rewriting the source code.
+
+ \section1 Qt is Available for the Following Platforms
+
+ \table
+ \header
+ \o {2,1} Qt Cross Platform Support
+ \header
+ \o {1,1} Desktop
+ \o {1,1} Mobile/Embedded
+ \row
+ \o \l{Support for Windows}{Windows}
+ \o \l{Support for Windows CE and Windows Mobile}{Windows CE and Windows Mobile}
+ \row
+ \o \l{Support for Linux/X11}{Linux/X11}
+ \o \l{Support for Embedded Linux}{Embedded Linux}
+ \row
+ \o \l{Support for Mac OS X}{Mac OS X}
+ \o \l{Support for Symbian}{Symbian}
+ \row
+ \o\l{Support for MeeGo}{MeeGo}
+ \o\l{Support for Maemo}{Maemo}
+ \endtable
+
+ \section1 Supported Platform Details
The Qt team strives to provide support for the platforms most
frequently used by Qt users. We have designed our internal testing procedure to
@@ -70,7 +748,7 @@
\o MSVC 2008
\row \o Microsoft Windows 7
\o MSVC 2008
- \row \o Apple Mac OS X 10.6 "Snow Leopard"
+ \row \o Apple Mac OS X 10.6 "Snow Leopard"
\o As provided by Apple
\row \o Apple Mac OS X 10.5 "Leopard" x86_64 (Cocoa 32 and 64bit)
\o As provided by Apple
@@ -78,6 +756,10 @@
\o gcc (\l{http://www.codesourcery.com/}{Codesourcery version)}
\row \o Windows CE 5.0 (ARMv4i, x86, MIPS)
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
+ \row \o Maemo 5(Linux, ARM, X11)
+ \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
+ \row \o MeeGo (Linux, ARM, X11)
+ \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
\row \o Symbian (Symbian/S60 5.0)
\o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
@@ -85,9 +767,9 @@
\section1 Tier 2 Platforms
Tier 2 platforms are subject to ad hoc and internal testing. However, Qt users
- should note that errors may be present in released product versions for Tier 2
- platforms and, subject to resource availability, known errors in Tier 2 platforms
- may or may not be corrected prior to new version releases.
+ should note that errors may be present in released product versions for Tier 2
+ platforms and, subject to resource availability, known errors in Tier 2 platforms
+ may or may not be corrected prior to new version releases.
\table
\header \o Platform
@@ -116,15 +798,13 @@
\o MSVC 2005 WinCE 5.0 Standard (x86, pocket, smart, mipsii)
\row \o Windows Embedded CE 6.0 (ARMv4i, x86, MIPS)
\o MSVC 2008 WinCE Embedded 6.0 Professional
- \row \o Maemo 5(Linux, ARM, X11)
- \o gcc (\l{http://www.scratchbox.org/}{Scratchbox)}
\row \o Symbian (Symbian/S60 3.1, 3.2)
\o RVCT 2.2 [build 686 or later], WINSCW 3.2.5 [build 482 or later], GCCE (for applications)
\endtable
- \note The PPC architecture on Mac has been downgraded from tier 1 to tier 2 for 4.7.
-
- \section1 Tier 3 Platforms (Not supported by Nokia)
+ \note The PPC architecture on Mac has been downgraded from tier 1 to tier 2 for 4.7.
+
+ \section1 Tier 3 Platforms (Not Supported by Nokia)
All platforms not specifically listed above are not supported by Nokia. Nokia does
not run its unit test suite or perform any other internal tests on platforms not
@@ -147,7 +827,7 @@
warranties and conditions, either express or implied, including, but not limited to,
implied warranties of merchantability, fitness for a particular purpose, title and
non-infringement with regard to the Licensed Software.
-
+
\section1 Planned Changes for Qt 4.8
The following changes to the list of supported platforms are at time of publishing
diff --git a/doc/src/platforms/wince-customization.qdoc b/doc/src/platforms/wince-customization.qdoc
index a59dd6f..49ba852 100644
--- a/doc/src/platforms/wince-customization.qdoc
+++ b/doc/src/platforms/wince-customization.qdoc
@@ -146,7 +146,7 @@
application that attempts to dynamically load the Qt for Windows CE
libraries using \c LoadLibrary. The following code can be used for this:
- \snippet doc/src/snippets/code/doc_src_wince-customization.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_wince-customization.cpp 9
Once you have compiled and deployed the application as well as the Qt
libraries, start a remote debugger. The debugger will then print the
diff --git a/doc/src/porting/porting-qsa.qdoc b/doc/src/porting/porting-qsa.qdoc
index ea83e97..e831583 100644
--- a/doc/src/porting/porting-qsa.qdoc
+++ b/doc/src/porting/porting-qsa.qdoc
@@ -64,7 +64,7 @@
can have named properties. For instance to create an point object with
the properties x and y one would write the following Qt Script code:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 0
The object \c point in this case is constructed as a plain object and
we assign two properties, \c x and \c y, to it with the values 12 and
@@ -73,17 +73,17 @@
global namespace of the script engine. Similarly, global functions are
named properties of the global object; for example:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 1
An equivalent construction that illustrates that the function is a
property of the global object is the following assignment:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 2
Since functions are objects, they can be assigned to objects as
properties, becoming member functions:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 3
In the code above, we see the first subtle difference between
QSA and Qt Script. In QSA one would write the point class like this:
@@ -99,7 +99,7 @@
All the code above runs with QSA except the assignment of a function
to \c{point.manhattanLength}, which we repeat here for clarity:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 5
This is because, in QSA, the value of \c this is decided based on
the location of the declaration of the function it is used in. In the
@@ -129,7 +129,7 @@
function with the newly created object as the \c this pointer.
So, in a sense, it is equivalent to:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 8
This is similar to the manhattenLength() example above. Again, the
main difference between QSA and Qt Script is that one has to
@@ -149,7 +149,7 @@
one could write this in Qt Script as:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 10
In QSA, the member functions were part of the class declaration,
and were therefore shared between all instances of a given class.
@@ -173,7 +173,7 @@
To make the \c toString() function part of the prototype, we write
code like this:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 11
Here, we made the \c toString() function part of the prototype so
that, when we call \c{car.toString()} it will be resolved via the
@@ -195,7 +195,7 @@
without any special members, but it is possible to replace this
object with another prototype object.
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 13
In the code above, we have a constructor, \c{GasolineCar}, which
calls the "base class" implementation of the constructor to
@@ -223,7 +223,7 @@
as static members as properties of the constructor function. For
example:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.js 15
Note that in QSA, static member variables were also accessible in
instances of the given class. In Qt Script, with the approach
@@ -374,7 +374,7 @@
the interpreter using their object names as the names of the
variables.
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.cpp 16
The code above adds the button to the global namespace under the name
"button". One obvious limitation here is that there is potential for
@@ -382,7 +382,7 @@
provides a more flexible way of adding QObjects to the scripting
environment.
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.cpp 17
In the code above we create a QPushButton and wrap it in a script
value using the function, QScriptEngine::newQObject(). This gives us
@@ -404,14 +404,14 @@
Below is listed some code from the filter example in the QSA
package.
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.cpp 18
The equivalent in Qt Script is written in much the same way as
constructors are written in scripts. We register a callback C++
function under the name "ImageSource" in the global namespace and
return the QObject from this function:
- \snippet doc/src/snippets/code/doc_src_porting-qsa.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_porting-qsa.cpp 19
In the Qt Script case we use the same approach that we use to expose
a QObject, namely via QScriptEngine::newQObject(). This function also
diff --git a/doc/src/porting/porting4-canvas.qdoc b/doc/src/porting/porting4-canvas.qdoc
index 445f66d..1e20384 100644
--- a/doc/src/porting/porting4-canvas.qdoc
+++ b/doc/src/porting/porting4-canvas.qdoc
@@ -152,7 +152,7 @@
\row \o Q3Canvas::onCanvas() \o The is no equivalent to this
function in Graphics View. However, you can combine
QGraphicsScene::sceneRect() and QRectF::intersects():
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 0
\row \o Q3Canvas::rect() \o The equivalent,
QGraphicsScene::sceneRect(), returns a QRectF (double
@@ -251,7 +251,7 @@
out the public tile API can then be declared as new members of
this class. Here is one example of how to implement tile support:
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 1
Depending on how your scene uses tiles, you may be able to
simplify this approach. In this example, we will try to mimic the behavior
@@ -264,30 +264,30 @@
two-dimensional vector of ints to keep track of what tiles should
be used at what parts of the scene.
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 2
In setTiles(), we store the pixmap and tile properties as
members of the class. Then we resize the tiles vector
to match the width and height of our tile grid.
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 3
The setTile() function updates the tiles index, and then
updates the corresponding rect in the scene by calling
tileRect().
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 4
The first tileRect() function returns a QRect for the tile at
position (x, y).
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 5
The second tileRect() function returns a QRect for a tile number.
With these functions in place, we can implement the drawBackground()
function.
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 6
In drawBackground(), we redraw all tiles that have been
exposed by intersecting each tile rect with the exposed background
@@ -522,7 +522,7 @@
For compatibility, you may want to shift the ellipse up and to the
left to keep the ellipse centered. Example:
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 7
Note: QGraphicsEllipseItem uses QAbstractGraphicsShapeItem::pen()
for outlines, whereas Q3CanvasEllipse did not use
@@ -588,7 +588,7 @@
QPainterPath::moveTo() and QPainterPath::cubicTo(). Here is how
you can convert a bezier curve Q3PointArray to a QPainterPath:
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 8
Note: QGraphicsPathItem uses QAbstractGraphicsShapeItem::pen() for
outlines, whereas Q3CanvasSpline did not use
@@ -653,7 +653,7 @@
functionality using Graphics View, you can load the images by
using QDir:
- \snippet doc/src/snippets/code/doc_src_porting4-canvas.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_porting4-canvas.cpp 9
\section2 Q3CanvasText
diff --git a/doc/src/porting/porting4-designer.qdoc b/doc/src/porting/porting4-designer.qdoc
index d84af3f..ef3e746 100644
--- a/doc/src/porting/porting4-designer.qdoc
+++ b/doc/src/porting/porting4-designer.qdoc
@@ -104,7 +104,7 @@
For example, here's the \c uic output for a simple \c
helloworld.ui form (some details were removed for simplicity):
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 0
In this case, the main container was specified to be a QWidget
(or any subclass of QWidget). Had we started with a QMainWindow
@@ -116,7 +116,7 @@
an instance of the main container (a plain QWidget), and call \c
setupUi():
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 1
The second approach is to inherit from both the \c Ui::HelloWorld
class and the main container, and to call \c setupUi() in the
@@ -124,7 +124,7 @@
its subclasses, e.g. QDialog) must appear first in the base class
list so that \l{moc} picks it up correctly. For example:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 2
This second method is useful when porting Qt 3 forms to Qt 4. \c
HelloWorldWidget is a class whose instance is the actual form
@@ -212,7 +212,7 @@
them to the widgets in the form after calling \c setupUi(). For
example:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 5
A quick and dirty way to port forms containing custom signals and
slots is to generate the code using \c uic3, rather than \c uic. Since
@@ -233,7 +233,7 @@
\tt{\e{signalName}}, then this signal will be connected to the
main container's slot. For example:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 6
Because of the naming convention, \c setupUi() automatically
connects \c pushButton's \c clicked() signal to \c
@@ -257,14 +257,14 @@
Next, we add the resource file to our \c .pro file:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.pro 8
When \c qmake is run, it will create the appropriate Makefile
rules to call \c rcc on the resource file, and compile and link
the result into the application. The icons may be accessed as
follows:
- \snippet doc/src/snippets/code/doc_src_porting4-designer.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_porting4-designer.cpp 9
In each case, the leading colon tells Qt to look for the file in
the virtual file tree defined by the set of resource files
diff --git a/doc/src/porting/porting4-dnd.qdoc b/doc/src/porting/porting4-dnd.qdoc
index 92b9fc1..993b8d2 100644
--- a/doc/src/porting/porting4-dnd.qdoc
+++ b/doc/src/porting/porting4-dnd.qdoc
@@ -54,7 +54,7 @@
\l{Q3DragObject::}{drag()} function is called, and it receives no information
about how the operation ended.
- \snippet doc/src/snippets/code/doc_src_dnd.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_dnd.cpp 0
Similarly, in Qt 4, drag operations are also initiated when a QDrag object
is constructed and its \l{QDrag::}{exec()} function is called. In contrast,
@@ -94,7 +94,7 @@
indicating success or failure of these checks via the event's
\l{QDragEnterEvent::}{accept()} function, as shown in this simple example:
- \snippet doc/src/snippets/code/doc_src_dnd.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_dnd.cpp 1
In Qt 4, you can examine the MIME type describing the data to determine
whether the widget should accept the event or, for common data types, you
@@ -113,7 +113,7 @@
accept dropped data in the form of text or images might provide an
implementation of \l{QWidget::}{dropEvent()} that looks like the following:
- \snippet doc/src/snippets/code/doc_src_dnd.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_dnd.cpp 2
In Qt 4, the event is handled in a similar way:
diff --git a/doc/src/porting/porting4.qdoc b/doc/src/porting/porting4.qdoc
index a3960c3..1c11a02 100644
--- a/doc/src/porting/porting4.qdoc
+++ b/doc/src/porting/porting4.qdoc
@@ -760,7 +760,7 @@
function. The solution is to reimplement QWidget::paintEvent() in
your QAbstractButton subclass as follows:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 0
\table
\header \o Q3Button function \o QAbstractButton equivalent
@@ -860,11 +860,11 @@
\o QMemArray::at() returned a non-const reference, whereas the
new QByteArray::at() returns a const value. Code like
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 1
will no longer compile. Instead, use QByteArray::operator[]:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 2
\o The QMemArray::contains(char) function has been renamed
QByteArray::count(char). In addition, there now exists a
@@ -935,11 +935,11 @@
function returns \c void and either adds it to the cache or
deletes it right away. Old code like
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 3
becomes
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 4
\o The new QCache class \e always takes ownership of the items
it stores (i.e. auto-delete is always on). If you use Q3Cache
@@ -950,11 +950,11 @@
pointers, not the objects that the pointers refer to. For
example,
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 5
becomes
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 6
An alternative is to stick to using Q3Cache.
\endlist
@@ -1051,7 +1051,7 @@
you can simply replace colorGroup() with palette():
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 7
\section1 QColorDrag
@@ -1089,7 +1089,7 @@
'\\0' issue is handled by having QByteArray allocate one extra
byte that it always sets to '\\0'. For example:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 8
The Qt3Support library contains a class called
Q3CString that inherits from the new QByteArray class and that
@@ -1416,26 +1416,26 @@
\header \o Q3Dict idiom \o QMultiHash idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 9
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 10
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 11
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 12
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 13
(also called from Q3Dict's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 14
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 15
However, it may lead to crashes if \c hash is referenced from
the value type's destructor, because \c hash contains
@@ -1471,11 +1471,11 @@
Be aware that QHashIterator has a different way of iterating than
Q3DictIterator. A typical loop with Q3DictIterator looks like this:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 16
Here's the equivalent QHashIterator loop:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 17
See \l{Java-style iterators} for details.
@@ -2377,7 +2377,7 @@
Use QObject::findChildren() instead of QObject::queryList().
For example:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 18
QObject::killTimers() has been removed because it was unsafe to
use in subclass. (A subclass normally doesn't know whether the
@@ -2712,48 +2712,48 @@
\header \o QPtrList idiom \o QList idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 19
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 20
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 21
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 22
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 23
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 24
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 25
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 26
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 27
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 28
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 29
(removes the current item)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 30
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 31
(also called from QPtrList's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 32
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 33
However, it may lead to crashes if \c list is referenced from
the value type's destructor, because \c list contains
@@ -2790,11 +2790,11 @@
Be aware that QListIterator has a different way of iterating than
QPtrList. A typical loop with QPtrList looks like this:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 34
Here's the equivalent QListIterator loop:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 35
Finally, QPtrListIterator<T> must also be ported. There are no
fewer than four iterator classes that can be used as a
@@ -2821,11 +2821,11 @@
iterating than QPtrList. A typical loop with QPtrList looks like
this:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 36
Here's the equivalent QListIterator loop:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 37
Finally, QPtrListStdIterator<T> must also be ported. This is
easy, because QList also provides STL-style iterators
@@ -2864,26 +2864,26 @@
\header \o QPtrQueue idiom \o QQueue idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 38
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 39
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 40
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 40
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 41
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 41
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 42
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 42
(also called from QPtrQueue's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 43
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 43
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 44
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 44
However, it may lead to crashes if \c queue is referenced
from the value type's destructor, because \c queue contains
@@ -2923,26 +2923,26 @@
\header \o QPtrStack idiom \o QStack idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 45
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 45
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 46
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 46
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 47
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 47
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 48
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 48
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 49
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 49
(also called from QPtrStack's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 50
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 50
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 51
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 51
However, it may lead to crashes if \c stack is referenced
from the value type's destructor, because \c stack contains
@@ -3024,36 +3024,36 @@
\header \o QPtrVector idiom \o QVector idiom
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 52
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 52
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 53
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 53
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 54
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 54
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 55
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 55
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 56
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 57
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 57
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 58
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 58
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 59
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 59
\row
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 60
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 60
(also called from QPtrVector's destructor)
\o
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 61
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 61
In 99% of cases, the following idiom also works:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 62
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 62
However, it may lead to crashes if \c vect is referenced from
the value type's destructor, because \c vect contains
@@ -3193,7 +3193,7 @@
An easy way of porting to Qt 4 is to include this class into your
project and to use it instead of \c QShared:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 63
If possible, we recommend that you use QSharedData and
QSharedDataPointer instead. They provide thread-safe reference
@@ -3217,11 +3217,11 @@
Previously, you would do the following with Q3SimpleRichText:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63a
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 63a
However, with QTextDocument, you use the following code instead:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63b
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 63b
See \l{Rich Text Processing} for an overview of the Qt 4 rich
text classes.
@@ -3233,7 +3233,7 @@
The slider's rect can now be retrieved using the code snippet below:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 63c
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 63c
In addition, the direction of a vertical QSlider has changed,
i.e. the bottom is now the minimum, and the top the maximum. You
@@ -3454,7 +3454,7 @@
byte array; you should avoid taking a pointer to the data
contained in temporary objects.
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 64
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 64
In the above example, the \c goodData pointer is valid for the lifetime
of the \c asciiData byte array. If you need to keep a copy of the data
@@ -3464,11 +3464,11 @@
\o QString::at() returned a non-const reference, whereas the
new QString::at() returns a const value. Code like
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 65
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 65
will no longer compile. Instead, use QString::operator[]:
- \snippet doc/src/snippets/code/doc_src_porting4.qdoc 66
+ \snippet doc/src/snippets/code/doc_src_porting4.cpp 66
\o The QString::contains(\e x) function (where \e x is a
character or a string) has been renamed QString::count(\e x).
diff --git a/doc/src/porting/qt3to4.qdoc b/doc/src/porting/qt3to4.qdoc
index 336601f..3c95b4c 100644
--- a/doc/src/porting/qt3to4.qdoc
+++ b/doc/src/porting/qt3to4.qdoc
@@ -122,7 +122,7 @@
In some cases, you might get compiler errors because of identifiers
in the global namespace (e.g., \c CTRL). Adding
- \snippet doc/src/snippets/code/doc_src_qt3to4.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt3to4.cpp 2
at the beginning of the source file that contains
the indentifier solves the problem.
diff --git a/doc/src/porting/qt4-accessibility.qdoc b/doc/src/porting/qt4-accessibility.qdoc
index 6e56942..2d9e8c3 100644
--- a/doc/src/porting/qt4-accessibility.qdoc
+++ b/doc/src/porting/qt4-accessibility.qdoc
@@ -68,7 +68,7 @@
variable set to 1. For example, this is set in the following way with
the bash shell:
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc environment
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp environment
Accessibility features are built into Qt by default when the libraries
are configured and built.
@@ -132,17 +132,17 @@
information for a custom widget. We can use QAccessibleWidget as
a base class and reimplement various functions:
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp 0
Here's how we would implement the
\l{QAccessibleInterface::doAction()}{doAction()} function to call
a function named click() on the wrapped MyWidget object when the
user invokes the object's default action or "presses" it.
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp 1
To export the widget interface as a plugin, we must subclass
QAccessibleFactory:
- \snippet doc/src/snippets/code/doc_src_qt4-accessibility.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-accessibility.cpp 2
*/
diff --git a/doc/src/porting/qt4-arthur.qdoc b/doc/src/porting/qt4-arthur.qdoc
index 434aa29..460a048 100644
--- a/doc/src/porting/qt4-arthur.qdoc
+++ b/doc/src/porting/qt4-arthur.qdoc
@@ -119,7 +119,7 @@
Setting a linear gradient brush is done by creating a QLinearGradient
object and setting it as a brush.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 0
The code shown above produces a pattern as show in the following
pixmap:
@@ -130,7 +130,7 @@
focal point. Setting a radial brush is done by creating a QRadialGradient
object and setting it as a brush.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 1
The code shown above produces a pattern as shown in the following
pixmap:
@@ -141,7 +141,7 @@
angle. Setting a conical brush is done by creating a
QConicalGradient object and setting it as a brush.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 2
The code shown above produces a pattern as shown in the following
pixmap:
@@ -156,7 +156,7 @@
transparent color, while 255 represents a fully opaque color. For
example:
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 3
The code shown above produces the following output:
@@ -180,7 +180,7 @@
provide the option of turning on anti-aliased edges when drawing
graphics primitives.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 4
This produces the following output:
@@ -221,7 +221,7 @@
first add a rectangle, which becomes a closed subpath. We then add
two bezier curves, and finally draw the entire path.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 5
The code above produces the following output:
@@ -236,18 +236,18 @@
painting to an off-screen pixmap then copying the pixmap to the
screen. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 6
Since the double-buffering is handled by QWidget internally this
now becomes:
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 7
Double-buffering is turned on by default, but can be turned off for
individual widgets by setting the widget attribute
Qt::WA_PaintOnScreen.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 8
\section2 Pen and Brush Transformation
@@ -270,7 +270,7 @@
possible to specify both texture and gradient fills for both
text and outlines.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 9
The code above produces the following output:
@@ -290,7 +290,7 @@
Painting on an image is as simple as drawing on any other paint device.
- \snippet doc/src/snippets/code/doc_src_qt4-arthur.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qt4-arthur.cpp 10
\section2 SVG Rendering Support
diff --git a/doc/src/porting/qt4-mainwindow.qdoc b/doc/src/porting/qt4-mainwindow.qdoc
index 1eff2c2..ebfbc8d 100644
--- a/doc/src/porting/qt4-mainwindow.qdoc
+++ b/doc/src/porting/qt4-mainwindow.qdoc
@@ -86,7 +86,7 @@
the first time it is called. You can also call
QMainWindow::setMenuBar() to use a custom menu bar in the main window.
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 0
\dots
\snippet examples/mainwindows/menus/mainwindow.cpp 5
\dots
@@ -110,7 +110,7 @@
\snippet examples/mainwindows/sdi/mainwindow.cpp 0
\dots
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 1
In this example, the toolbar is restricted to the top and bottom
toolbar areas of the main window, and is initially placed in the
@@ -132,7 +132,7 @@
required, the default can be changed with the
QMainWindow::setCorner() function:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 2
The following diagram shows the configuration produced by the above code.
Note that the left and right dock widgets will occupy the top and bottom
@@ -143,7 +143,7 @@
Once all of the main window components have been set up, the central widget
is created and installed by using code similar to the following:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 3
The central widget can be any subclass of QWidget.
@@ -217,17 +217,17 @@
constructed using the general QMenu class.
Qt 3:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 4
Qt 4:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 5
Toolbars follow the same pattern as menus, with the new, more
consistent behavior:
Qt 3:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 6
Qt 4:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 7
The behavior of dock widgets is now configured through the member
functions of QDockWidget. For example, compare the old and new ways
@@ -235,7 +235,7 @@
main window.
In Qt 3:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 8
In Qt 4:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 9
*/
diff --git a/doc/src/porting/qt4-sql.qdoc b/doc/src/porting/qt4-sql.qdoc
index bafaacb..2a5a206 100644
--- a/doc/src/porting/qt4-sql.qdoc
+++ b/doc/src/porting/qt4-sql.qdoc
@@ -104,12 +104,12 @@
The simplest way to present data from a database is to simply
combine a QSqlQueryModel with a QTableView:
- \snippet doc/src/snippets/code/doc_src_qt4-sql.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-sql.cpp 0
To present the contents of a single table, we can use
QSqlTableModel instead:
- \snippet doc/src/snippets/code/doc_src_qt4-sql.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-sql.cpp 1
In practice, it's common that we need to customize the rendering
of a field in the database. In that case, we can create our own
diff --git a/doc/src/porting/qt4-styles.qdoc b/doc/src/porting/qt4-styles.qdoc
index 76b0b1c..7422f06 100644
--- a/doc/src/porting/qt4-styles.qdoc
+++ b/doc/src/porting/qt4-styles.qdoc
@@ -90,7 +90,7 @@
pointer type is correct. If the object isn't of the right type,
qstyleoption_cast() returns 0. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 0
For performance reasons, there are few member functions and the
access to the variables is direct. This "low-level" feel makes
@@ -108,7 +108,7 @@
The following code snippet illustrates how to use QStyle to
draw the focus rectangle from a custom widget's paintEvent():
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 1
The next example shows how to derive from an existing style to
customize the look of a graphical element:
@@ -130,11 +130,11 @@
For example, here's the signature of the QStyle::drawControl()
function in Qt 3:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 2
Here's the signature of the same function in Qt 4:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 3
In Qt 3, some of the information required to draw a graphical
element was stored in a QStyleOption parameter, while the rest
diff --git a/doc/src/porting/qt4-tulip.qdoc b/doc/src/porting/qt4-tulip.qdoc
index 161c373..c78ff96 100644
--- a/doc/src/porting/qt4-tulip.qdoc
+++ b/doc/src/porting/qt4-tulip.qdoc
@@ -80,16 +80,16 @@
addition to the C++ language that is implemented using the standard
C++ preprocessor. The syntax is:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 0
Example:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 1
The iterator variable can also be defined outside the loop. For
example:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 2
Just like standard \c for loops, foreach supports braces, \c
break, \c continue, and nested loops. Qt makes a copy of the
@@ -124,25 +124,25 @@
Traversing a container using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 3
Modifying items using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 4
Removing items using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 5
Iterating over items with a particular value using STL-style vs.
Java-style iterators:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 6
Modifying and removing items using STL-style vs. Java-style
iterators:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 7
The next group of examples show the API of the container classes
themselves. The API is similar to the QTL classes of Qt 3, but is nicer
@@ -151,16 +151,16 @@
Iterating over a QList using an index (which is fast even for large
lists, because QList is implemented as an array-list):
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 8
Retrieving a value from a map, using a default value if the key
doesn't exist:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 9
Getting all the values for a particular key in a QMultiMap or QMultiHash:
- \snippet doc/src/snippets/code/doc_src_qt4-tulip.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qt4-tulip.cpp 10
\section1 Comparison with Qt 3
diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc
index 5a3bfc9..e915267 100644
--- a/doc/src/qt-webpages.qdoc
+++ b/doc/src/qt-webpages.qdoc
@@ -246,6 +246,21 @@
*/
/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator-snapshot/index.html
+ \title Qt Creator Manual
+*/
+
+/*!
+ \externalpage http://doc.qt.nokia.com/qtcreator-snapshot/creator-qml-application.html
+ \title Developing Qt Quick Applications with Creator
+*/
+
+/*!
\externalpage http://qt.gitorious.org/qt/pages/QtCodingStyle
\title Qt Coding Style
*/
+
+/*!
+ \externalpage http://qt.nokia.com/developer/learning/online/training/training-day-at-developer-days-2009/
+ \title Training Day at Qt Developer Days 2009
+*/
diff --git a/doc/src/qt4-intro.qdoc b/doc/src/qt4-intro.qdoc
index 3cabb1c..41848e9 100644
--- a/doc/src/qt4-intro.qdoc
+++ b/doc/src/qt4-intro.qdoc
@@ -241,7 +241,9 @@
\section1 Build System
Unlike previous Qt releases, Qt 4 is a collection of smaller
- libraries:
+ libraries. A complete list of libraries in the current release
+ of Qt can be found on the \l{All Modules} page. The following
+ table describes the initial set of libraries released with Qt 4.
\table
\header \o Library \o Description
@@ -276,11 +278,11 @@
link your application against QtCore and QtGui. To remove the
dependency upon QtGui, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 0
to your .pro file. To enable the other libraries, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 1
Another change to the build system is that moc now understands
preprocessor directives. qmake automatically passes the defines set
@@ -290,21 +292,21 @@
To compile code that uses UI files, you will also need this line in
the .pro file:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 2
\section1 Include Syntax
The syntax for including Qt class definitions has become
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 3
For example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 4
This is guaranteed to work for any public Qt class. The old syntax,
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 5
still works, but we encourage you to switch to the new syntax.
@@ -318,7 +320,7 @@
To include the definitions for all the classes in a library, simply
specify the name of that library. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 6
\section1 Namespaces
@@ -330,7 +332,7 @@
to access a constant that is part of the Qt namespace, prefix it
with \c{Qt::} (e.g., \c{Qt::yellow}), or add the directive
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 7
at the top of your source files, after your \c #include
directives. If you use the \c{using namespace} syntax you don't
@@ -360,7 +362,7 @@
\list
\o Code that used it looked confusing, for example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 8
\c label1 is a QLabel that displays the text "Hello"; \c
label2 is a QLabel with no text, with the object name
@@ -370,7 +372,7 @@
they blindly followed Qt's convention and provided a "const
char *name" in their subclasses's constructors. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 9
\o The name parameter was in Qt since version 1, and it always
was documented as: "It is not very useful in the current
@@ -405,12 +407,12 @@
Here's the Qt 3 idiom to cast a type to a subtype:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 10
The Qt 4 idiom is both cleaner and safer, because typos will always
result in compiler errors:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 11
\section1 QPointer<T>
@@ -421,7 +423,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.cpp 12
QPointer<T> is more or less the same as the old QGuardedPtr<T> class,
except that it is now implemented in a much more lightweight manner
@@ -461,7 +463,7 @@
To enable the Qt 3 support classes and functions, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 13
to your \c .pro file.
@@ -469,18 +471,18 @@
in a compiler warning (e.g., "'find' is deprecated"). If you want to turn
off that warning, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 14
to your \c .pro file.
If you want to use compatibility functions but don't want to link
against the Qt3Support library, add the line
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 15
or
- \snippet doc/src/snippets/code/doc_src_qt4-intro.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qt4-intro.pro 16
to your \c .pro file, depending on whether you want compatibility
function calls to generate compiler warnings or not.
diff --git a/doc/src/scripting/qtscriptextensions.qdoc b/doc/src/scripting/qtscriptextensions.qdoc
index 888cf73..431adb0 100644
--- a/doc/src/scripting/qtscriptextensions.qdoc
+++ b/doc/src/scripting/qtscriptextensions.qdoc
@@ -68,7 +68,7 @@
An example of a simple \c{__init__.js}:
- \snippet doc/src/snippets/code/doc_src_qtscriptextensions.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtscriptextensions.js 0
QScriptEngine will look for a QScriptExtensionPlugin that provides
the relevant extension by querying each plugin for its keys()
diff --git a/doc/src/scripting/scripting.qdoc b/doc/src/scripting/scripting.qdoc
index 79fed97..f882da0 100644
--- a/doc/src/scripting/scripting.qdoc
+++ b/doc/src/scripting/scripting.qdoc
@@ -144,7 +144,7 @@
script function. In the following example a script signal handler is
defined that will handle the QLineEdit::textChanged() signal:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 47
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 47
The first two arguments to qScriptConnect() are the same
as you would pass to QObject::connect() to establish a normal C++
@@ -155,7 +155,7 @@
("slot") itself. The following example shows how the \c this argument
can be put to use:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 48
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 48
We create two QLineEdit objects and define a single signal handler
function. The connections use the same handler function, but the
@@ -179,13 +179,13 @@
In this form of connection, the argument to \c{connect()} is the
function to connect to the signal.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 2
The argument can be a Qt Script function, as in the above
example, or it can be a QObject slot, as in
the following example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 3
When the argument is a QObject slot, the argument types of the
signal and slot do not necessarily have to be compatible;
@@ -196,7 +196,7 @@
\c{disconnect()} function, passing the function to disconnect
as argument:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 4
When a script function is invoked in response to a signal, the
\c this object will be the Global Object.
@@ -214,11 +214,11 @@
\c{clicked} signal; passing the form as the \c this object
makes sense in such a case.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 5
To disconnect from the signal, pass the same arguments to \c{disconnect()}:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 6
\section3 Signal to Named Member Function Connections
@@ -234,11 +234,11 @@
Note that the function is resolved when the connection is made, not
when the signal is emitted.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 7
To disconnect from the signal, pass the same arguments to \c{disconnect()}:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 8
\section3 Error Handling
@@ -247,14 +247,14 @@
You can obtain an error message from the resulting \c{Error} object.
Example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 9
\section3 Emitting Signals from Scripts
To emit a signal from script code, you simply invoke the signal
function, passing the relevant arguments:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 10
It is currently not possible to define a new signal in a script;
i.e., all signals must be defined by C++ classes.
@@ -267,13 +267,13 @@
\c{myOverloadedSlot(int)} and \c{myOverloadedSlot(QString)}, the following
script code will behave reasonably:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 11
You can specify a particular overload by using array-style property access
with the \l{QMetaObject::normalizedSignature()}{normalized signature} of
the C++ function as the property name:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 12
If the overloads have different number of arguments, QtScript will
pick the overload with the argument count that best matches the
@@ -291,11 +291,11 @@
property will automatically be invoked. For example, if your
C++ class has a property declared as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 13
then script code can do things like the following:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 14
\section2 Accessing Child QObjects
@@ -306,12 +306,12 @@
\c{"okButton"}, you can access this object in script code through
the expression
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 15
Since \c{objectName} is itself a Q_PROPERTY, you can manipulate
the name in script code to, for example, rename an object:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 16
You can also use the functions \c{findChild()} and \c{findChildren()}
to find children. These two functions behave identically to
@@ -320,7 +320,7 @@
For example, we can use these functions to find objects using strings
and regular expressions:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 17
You typically want to use \c{findChild()} when manipulating a form
that uses nested layouts; that way the script is isolated from the
@@ -367,7 +367,7 @@
For example, a constructor function that constructs QObjects
only to be used in the script environment is a good candidate:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 18
\section3 Auto-Ownership
@@ -638,7 +638,7 @@
For example, the following class definition enables scripting only for
certain functions:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 19
In the example above, aNonScriptableFunction() is not declared as a
slot, so it will not be available in QtScript. The other three
@@ -649,7 +649,7 @@
It is possible to make any function script-invokable by specifying
the \c{Q_INVOKABLE} modifier when declaring the function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 20
Once declared with \c{Q_INVOKABLE}, the method can be invoked from
QtScript code just as if it were a slot. Although such a method is
@@ -657,19 +657,25 @@
call to \c{connect()} in script code; \c{connect()} accepts both
native and non-native functions as targets.
+ As discussed in \l{Default Conversion from Qt Script to C++}, Qt
+ Script handles conversion for many C++ types. If your function takes
+ arguments for which Qt Script does not handle conversion, you need
+ to supply conversion functions. This is done using the
+ qScriptRegisterMetaType() function.
+
\section2 Making C++ Class Properties Available in QtScript
In the previous example, if we wanted to get or set a property using
QtScript we would have to write code like the following:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 21
Scripting languages often provide a property syntax to modify and
retrieve properties (in our case the enabled state) of an
object. Many script programmers would want to write the above code
like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 22
To make this possible, you must define properties in the C++ QObject
subclass. For example, the following \c MyObject class declaration
@@ -677,7 +683,7 @@
\c{setEnabled(bool)} as its setter function and \c{isEnabled()} as its
getter function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 23
The only difference from the original code is the use of the macro
\c{Q_PROPERTY}, which takes the type and name of the property, and
@@ -688,7 +694,7 @@
declaring the property; by default, the \c{SCRIPTABLE} attribute is
\c true. For example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 24
\section2 Reacting to C++ Objects Signals in Scripts
@@ -703,14 +709,14 @@
regardless of whether the signal will be connected to a slot in C++
or in QtScript.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 25
The only change we have made to the code in the previous section is
to declare a signals section with the relevant signal. Now, the
script writer can define a function and connect to the object like
this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 26
\section2 Design of Application Objects
@@ -752,7 +758,7 @@
still allowing pointers to your custom objects to flow seamlessly
between C++ and scripts. Example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 43
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 43
\section1 Function Objects and Native Functions
@@ -778,23 +784,23 @@
result. The following script defines a Qt Script object that has a
toKelvin() function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 90
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 90
The toKelvin() function takes a temperature in Kelvin as argument, and
returns the temperature converted to Celsius. The following snippet shows
how the toKelvin() function might be obtained and called from C++:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 91
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 91
If a script defines a global function, you can access the function as a
property of QScriptEngine::globalObject(). For example, the following script
defines a global function add():
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 56
C++ code might call the add() function as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 92
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 92
As already mentioned, functions are just values in Qt Script; a function by
itself is not "tied to" a particular object. This is why you have to specify
@@ -816,7 +822,7 @@
is invoked determines the \c this object when the function body is executed,
as the following script example illustrates:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 49
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 49
An important thing to note is that in Qt Script, unlike C++ and Java, the
\c this object is not part of the execution scope. This means that
@@ -824,14 +830,14 @@
use the \c this keyword to access the object's properties. For example,
the following script probably doesn't do what you want:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 50
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 50
You will get a reference error saying that 'a is not defined' or, worse,
two totally unrelated global variables \c a and \c b will be used to
perform the computation, if they exist. Instead, the script should look
like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 51
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 51
Accidentally omitting the \c this keyword is a typical source of
error for programmers who are used to the scoping rules of C++ and Java.
@@ -844,7 +850,7 @@
your function as if it were a "normal" script function. Here is how the
previous \c{getProperty()} function can be written in C++:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 52
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 52
Call QScriptEngine::newFunction() to wrap the function. This will
produce a special type of function object that carries a pointer to
@@ -905,7 +911,7 @@
script would normally define an \c{add()} function that takes two
arguments, adds them together and returns the result:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 56
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 56
When a script function is defined with formal parameters, their
names can be viewed as mere aliases of properties of the \c
@@ -914,12 +920,12 @@
variable. This means that the \c{add()} function can equivalently be
written like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 57
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 57
This latter form closely matches what a native implementation
typically looks like:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 58
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 58
\section3 Checking the Number of Arguments
@@ -930,13 +936,13 @@
really needs two arguments in order to do something useful. This
can be expressed by the script definition as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 59
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 59
This would result in an error being thrown if a script invokes
\c{add()} with anything other than two arguments. The native
function can be modified to perform the same check:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 62
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 62
\section3 Checking the Types of Arguments
@@ -954,7 +960,7 @@
stricter semantics (namely, that it should only add numeric
operands), the argument types can be tested:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 60
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 60
Then an invocation like \c{add("foo", new Array())} will
cause an error to be thrown.
@@ -962,12 +968,12 @@
The C++ version can call QScriptValue::isNumber() to perform similar
tests:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 63
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 63
A less strict script implementation might settle for performing an
explicit to-number conversion before applying the \c{+} operator:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 61
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 61
In a native implementation, this is equivalent to calling
QScriptValue::toNumber() without performing any type test first,
@@ -1000,21 +1006,21 @@
\c{concat("Qt", " ", "Script ", 101)} would return "Qt Script 101".
A script definition of \c{concat()} might look like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 64
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 64
Here is an equivalent native implementation:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 65
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 65
A second use case for a variable number of arguments is to implement
optional arguments. Here's how a script definition typically does
it:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 66
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 66
And here's the native equivalent:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 67
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 67
A third use case for a variable number of arguments is to simulate
C++ overloads. This involves checking the number of arguments and/or
@@ -1043,7 +1049,7 @@
call to another function. In script code, this is what it
typically looks like:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 68
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 68
For example, \c{foo(10, 20, 30)} would result in the \c{foo()} function
executing the equivalent of \c{bar(10, 20, 30)}. This is useful if
@@ -1054,7 +1060,7 @@
function that has the exact same "signature". In C++, the forwarding
function might look like this:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 69
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 69
\o The arguments object can serve as input to a QScriptValueIterator,
providing a generic way to iterate over the arguments. A debugger
@@ -1072,7 +1078,7 @@
Some script functions are constructors; they are expected to initialize
new objects. The following snippet is a small example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 75
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 75
There is nothing special about constructor functions. In fact, any
script function can act as a constructor function (i.e., any function
@@ -1118,7 +1124,7 @@
The following example implements a constructor function that always
creates and initializes a new object:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 76
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 76
Given this constructor, scripts would be able to use either the
expression \c{new Person("Bob")} or \c{Person("Bob")} to create a
@@ -1154,7 +1160,7 @@
returns the function object being invoked. The following example
shows how this might be used:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 55
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 55
\section2 Native Functions as Arguments to Functions
@@ -1163,13 +1169,13 @@
naturally. As an example, here's a native comparison function
that compares its two arguments numerically:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 53
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 53
The above function can be passed as argument to the standard
\c{Array.prototype.sort} function to sort an array numerically,
as the following C++ code illustrates:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 54
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 54
Note that, in this case, we are truly treating the native function
object as a value \mdash i.e., we don't store it as a property of the
@@ -1204,7 +1210,7 @@
itself. This technique is typically used in conjunction with
QScriptEngine::pushContext(), as in the following example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 77
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 77
We create a temporary execution context, create a local variable
for it, evaluate the script, and finally restore the old context.
@@ -1227,7 +1233,7 @@
define a native combined getter/setter that transforms the value
slightly:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 78
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 78
The example uses the internal data of the object to store and
retrieve the transformed value. Alternatively, the property
@@ -1240,12 +1246,12 @@
The following C++ code shows how an object property can be defined
in terms of the native getter/setter:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 79
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 79
When the property is accessed, like in the following script, the
getter/setter does its job behind the scenes:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 80
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 80
\note It is important that the setter function, not just the getter,
returns the value of the property; i.e., the setter should \e{not}
@@ -1266,7 +1272,7 @@
Property getters and setters can be defined and installed by script
code as well, as in the following example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 81
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 81
Getters and setters can only be used to implement "a priori
properties"; i.e., the technique can't be used to react to an access
@@ -1342,7 +1348,7 @@
including the \c{hasOwnProperty()} function and \c{toString()}
function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 27
The \c{toString()} function itself is not defined in \c{o} (since we
did not assign anything to \c{o.toString}), so instead the
@@ -1382,7 +1388,7 @@
The following code defines a simple constructor function for a class
called \c{Person}:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 28
Next, you want to set up \c{Person.prototype} as your prototype
object; i.e., define the interface that should be common to all
@@ -1397,19 +1403,19 @@
\c{Object.prototype}, to give your \c{Person} objects a more
appropriate string representation:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 29
This resembles the process of reimplementing a virtual function
in C++. Henceforth, when the property named \c{toString} is
looked up in a \c{Person} object, it will be resolved in
\c{Person.prototype}, not in \c{Object.prototype} as before:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 30
There are also some other interesting things we can learn about a
\c{Person} object:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 31
The \c{hasOwnProperty()} function is not inherited from
\c{Person.prototype}, but rather from \c{Object.prototype}, which is
@@ -1426,13 +1432,13 @@
following example shows how one can create a subclass of \c{Person}
called \c{Employee}:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 32
Again, you can use the \c{instanceof} to verify that the
class relationship between \c{Employee} and \c{Person} has been
correctly established:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 33
This shows that the prototype chain of \c{Employee} objects is the
same as that of \c{Person} objects, but with \c{Employee.prototype}
@@ -1477,25 +1483,25 @@
preceding section can be implemented in terms of the Qt Script API.
We begin with the native constructor function:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 34
Here's the native equivalent of the \c{Person.prototype.toString}
function we saw before:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 35
The \c{Person} class can then be initialized as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 36
The implementation of the \c{Employee} subclass is similar. We
use QScriptValue::call() to call the super-class (Person) constructor:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 37
The \c{Employee} class can then be initialized as follows:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 38
When implementing the prototype object of a class, you may want to use
the QScriptable class, as it enables you to define the API of your
@@ -1521,7 +1527,7 @@
modify the underlying C++ value, lets you modify the actual value
contained in the script value (and not a copy of it).
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 39
\section2 Implementing Constructors for Value-based Types
@@ -1529,7 +1535,7 @@
by wrapping a native factory function. For example, the following
function implements a simple constructor for QPoint:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 44
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 44
In the above code we simplified things a bit, e.g. we didn't check
the argument count to decide which QPoint C++ constructor to use.
@@ -1564,16 +1570,16 @@
The following snippet shows a constructor function that constructs
QXmlStreamReader objects that are stored using QSharedPointer:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 93
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 93
Prototype functions can use qscriptvalue_cast() to cast the \c this object
to the proper type:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 94
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 94
The prototype and constructor objects are set up in the usual way:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 95
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 95
Scripts can now construct QXmlStreamReader objects by calling the \c
XmlStreamReader constructor, and when the Qt Script object is
@@ -1643,12 +1649,12 @@
somewhere else. The following code shows a custom print() that adds
text to a QPlainTextEdit.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 45
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 45
The following code shows how the custom print() function may be
initialized and used.
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 46
+ \snippet doc/src/snippets/code/doc_src_qtscript.cpp 46
A pointer to the QPlainTextEdit is stored as an internal property
of the script function itself, so that it can be retrieved when
@@ -1680,7 +1686,7 @@
function. Essentially all that is necessary to achieve this is to use
the qsTr() script function. Example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 82
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 82
This accounts for 99% of the user-visible strings you're likely to write.
@@ -1689,7 +1695,7 @@
unique in your project, you should use the qsTranslate() function and pass a
suitable context as the first argument. Example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 83
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 83
If you need to have translatable text completely outside a function, there
are two functions to help: QT_TR_NOOP() and QT_TRANSLATE_NOOP(). They merely
@@ -1698,18 +1704,18 @@
Example of QT_TR_NOOP():
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 84
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 84
Example of QT_TRANSLATE_NOOP():
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 85
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 85
\section2 Use String.prototype.arg() for Dynamic Text
The String.prototype.arg() function (which is modeled after QString::arg())
offers a simple means for substituting arguments:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 86
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 86
\section2 Produce Translations
@@ -1804,7 +1810,7 @@
This property has the QScriptValue::Undeletable flag set.
For example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 40
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 40
\i \c{Object.prototype.__defineGetter__} \br
This function installs a
@@ -1814,7 +1820,7 @@
\c this object will be the object whose property is accessed.
For example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 41
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 41
\i \c{Object.prototype.__defineSetter__} \br
This function installs a
@@ -1824,7 +1830,7 @@
\c this object will be the object whose property is accessed.
For example:
- \snippet doc/src/snippets/code/doc_src_qtscript.qdoc 42
+ \snippet doc/src/snippets/code/doc_src_qtscript.js 42
\i \c{Function.prototype.connect} \br
This function connects
diff --git a/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc b/doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp
index 0c29b1c..0c29b1c 100644
--- a/doc/src/snippets/code/doc_src_activeqt-dumpcpp.qdoc
+++ b/doc/src/snippets/code/doc_src_activeqt-dumpcpp.cpp
diff --git a/doc/src/snippets/code/doc_src_appicon.pro b/doc/src/snippets/code/doc_src_appicon.pro
new file mode 100644
index 0000000..176b458
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_appicon.pro
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+RC_FILE = myapp.rc
+#! [1]
+
+
+#! [2]
+ICON = myapp.icns
+#! [2]
+
+
+#! [5]
+ICON = myapp.svg
+#! [5]
diff --git a/doc/src/snippets/code/doc_src_appicon.qdoc b/doc/src/snippets/code/doc_src_appicon.qdoc
index 06bf861..8dd30a4 100644
--- a/doc/src/snippets/code/doc_src_appicon.qdoc
+++ b/doc/src/snippets/code/doc_src_appicon.qdoc
@@ -43,16 +43,6 @@ IDI_ICON1 ICON DISCARDABLE "myappico.ico"
//! [0]
-//! [1]
-RC_FILE = myapp.rc
-//! [1]
-
-
-//! [2]
-ICON = myapp.icns
-//! [2]
-
-
//! [3]
kde-config --path icon
//! [3]
@@ -61,7 +51,3 @@ kde-config --path icon
//! [4]
gnome-config --datadir
//! [4]
-
-//! [5]
-ICON = myapp.svg
-//! [5]
diff --git a/doc/src/snippets/code/doc_src_containers.qdoc b/doc/src/snippets/code/doc_src_containers.cpp
index fa300f9..fa300f9 100644
--- a/doc/src/snippets/code/doc_src_containers.qdoc
+++ b/doc/src/snippets/code/doc_src_containers.cpp
diff --git a/doc/src/snippets/code/doc_src_coordsys.qdoc b/doc/src/snippets/code/doc_src_coordsys.cpp
index 1ebb215..1ebb215 100644
--- a/doc/src/snippets/code/doc_src_coordsys.qdoc
+++ b/doc/src/snippets/code/doc_src_coordsys.cpp
diff --git a/doc/src/snippets/code/doc_src_debug.qdoc b/doc/src/snippets/code/doc_src_debug.cpp
index 40a5ac2..40a5ac2 100644
--- a/doc/src/snippets/code/doc_src_debug.qdoc
+++ b/doc/src/snippets/code/doc_src_debug.cpp
diff --git a/doc/src/snippets/code/doc_src_deployment.cpp b/doc/src/snippets/code/doc_src_deployment.cpp
new file mode 100644
index 0000000..e7f7511
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_deployment.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [9]
+qApp->addLibraryPath("/some/other/path");
+//! [9]
+
+
+//! [19]
+qApp->addLibraryPath("C:\some\other\path");
+//! [19]
+
+
+//! [49]
+QDir dir(QApplication::applicationDirPath());
+dir.cdUp();
+dir.cd("plugins");
+QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
+//! [49]
diff --git a/doc/src/snippets/code/doc_src_deployment.pro b/doc/src/snippets/code/doc_src_deployment.pro
new file mode 100644
index 0000000..b9fdd54
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_deployment.pro
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [8]
+DESTDIR = /path/to/Qt/plugandpaint/plugins
+#! [8]
+
+
+#! [21]
+CONFIG += embed_manifest_exe
+#! [21]
+
+
+#! [23]
+CONFIG-=embed_manifest_dll
+#! [23]
+
+
+#! [26]
+CONFIG-=app_bundle
+#! [26]
+
+
+#! [51]
+QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.3
+#! [51]
+
+#! [53]
+QMAKE_MAC_SDK=/Developer/SDKs/MacOSX10.4u.sdk
+CONFIG+=x86 ppc
+#! [53]
+
+#! [56]
+vendorinfo = \
+ "%{\"Example Localized Vendor\"}" \
+ ":\"Example Vendor\""
+
+my_deployment.pkg_prerules = vendorinfo
+DEPLOYMENT += my_deployment
+#! [56]
+
+#! [57]
+supported_platforms = \
+ "; This demo only supports S60 5.0" \
+ "[0x1028315F],0,0,0,{\"S60ProductID\"}"
+
+default_deployment.pkg_prerules -= pkg_platform_dependencies
+my_deployment.pkg_prerules += supported_platforms
+DEPLOYMENT += my_deployment
+#! [57]
diff --git a/doc/src/snippets/code/doc_src_deployment.qdoc b/doc/src/snippets/code/doc_src_deployment.qdoc
index c5f4644..760bd8f 100644
--- a/doc/src/snippets/code/doc_src_deployment.qdoc
+++ b/doc/src/snippets/code/doc_src_deployment.qdoc
@@ -96,20 +96,10 @@ dirname=$PWD/$dirname
fi
LD_LIBRARY_PATH=$dirname
export LD_LIBRARY_PATH
-$dirname/$appname $*
+$dirname/$appname "$@"
//! [7]
-//! [8]
-DESTDIR = /path/to/Qt/plugandpaint/plugins
-//! [8]
-
-
-//! [9]
-qApp->addLibraryPath("/some/other/path");
-//! [9]
-
-
//! [10]
ldd ./application
//! [10]
@@ -164,11 +154,6 @@ plugins\pnp_extrafilters.dll
//! [18]
-//! [19]
-qApp->addLibraryPath("C:\some\other\path");
-//! [19]
-
-
//! [20]
embed_manifest_dll
embed_manifest_exe
@@ -411,14 +396,6 @@ install_name_tool -change /path/to/Qt/lib/QtCore.framework/Versions/4.0/QtCore
//! [48]
-//! [49]
-QDir dir(QApplication::applicationDirPath());
-dir.cdUp();
-dir.cd("plugins");
-QApplication::setLibraryPaths(QStringList(dir.absolutePath()));
-//! [49]
-
-
//! [50]
otool -L MyApp.app/Contents/MacOS/MyApp
//! [50]
@@ -483,4 +460,4 @@ make release-gcce
//! [59]
make installer_sis
-//! [59] \ No newline at end of file
+//! [59]
diff --git a/doc/src/snippets/code/doc_src_designer-manual.qdoc b/doc/src/snippets/code/doc_src_designer-manual.cpp
index 90e34a4..a261818 100644
--- a/doc/src/snippets/code/doc_src_designer-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_designer-manual.cpp
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-CONFIG += uitools
-//! [0]
-
-
//! [1]
#include <QtUiTools>
//! [1]
@@ -53,27 +48,6 @@ void on_<object name>_<signal name>(<signal parameters>);
//! [2]
-//! [3]
-CONFIG += release
-//! [3]
-
-
-//! [4]
-target.path = $$[QT_INSTALL_PLUGINS]/designer
-INSTALLS += target
-//! [4]
-
-
-//! [5]
-QT += script
-//! [5]
-
-
-//! [6]
-widget.text = 'Hi - I was built ' + new Date().toString();
-//! [6]
-
-
//! [7]
class MyExtension: public QObject,
public QdesignerContainerExtension
diff --git a/doc/src/snippets/code/doc_src_designer-manual.js b/doc/src/snippets/code/doc_src_designer-manual.js
new file mode 100644
index 0000000..074b47e
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_designer-manual.js
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [6]
+widget.text = 'Hi - I was built ' + new Date().toString();
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_designer-manual.pro b/doc/src/snippets/code/doc_src_designer-manual.pro
new file mode 100644
index 0000000..4b14a14
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_designer-manual.pro
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+CONFIG += uitools
+#! [0]
+
+
+#! [3]
+CONFIG += release
+#! [3]
+
+
+#! [4]
+target.path = $$[QT_INSTALL_PLUGINS]/designer
+INSTALLS += target
+#! [4]
+
+
+#! [5]
+QT += script
+#! [5]
diff --git a/doc/src/snippets/code/doc_src_dnd.qdoc b/doc/src/snippets/code/doc_src_dnd.cpp
index d5dc721..d5dc721 100644
--- a/doc/src/snippets/code/doc_src_dnd.qdoc
+++ b/doc/src/snippets/code/doc_src_dnd.cpp
diff --git a/doc/src/snippets/code/doc_src_emb-performance.cpp b/doc/src/snippets/code/doc_src_emb-performance.cpp
new file mode 100644
index 0000000..5a465a9
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-performance.cpp
@@ -0,0 +1,71 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [1]
+void *operator new[](size_t size)
+{
+ return malloc(size);
+}
+
+void *operator new(size_t size)
+{
+ return malloc(size);
+}
+
+void operator delete[](void *ptr)
+{
+ free(ptr);
+}
+
+void operator delete[](void *ptr, size_t)
+{
+ free(ptr);
+}
+
+void operator delete(void *ptr)
+{
+ free(ptr);
+}
+
+void operator delete(void *ptr, size_t)
+{
+ free(ptr);
+}
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_emb-performance.qdoc b/doc/src/snippets/code/doc_src_emb-performance.qdoc
index 8c129fd..9abf8d1 100644
--- a/doc/src/snippets/code/doc_src_emb-performance.qdoc
+++ b/doc/src/snippets/code/doc_src_emb-performance.qdoc
@@ -41,36 +41,3 @@
//! [0]
./configure -static
//! [0]
-
-
-//! [1]
-void *operator new[](size_t size)
-{
- return malloc(size);
-}
-
-void *operator new(size_t size)
-{
- return malloc(size);
-}
-
-void operator delete[](void *ptr)
-{
- free(ptr);
-}
-
-void operator delete[](void *ptr, size_t)
-{
- free(ptr);
-}
-
-void operator delete(void *ptr)
-{
- free(ptr);
-}
-
-void operator delete(void *ptr, size_t)
-{
- free(ptr);
-}
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_emb-pointer.pro b/doc/src/snippets/code/doc_src_emb-pointer.pro
new file mode 100644
index 0000000..fed7d79
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_emb-pointer.pro
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [7]
+....
+QMAKE_CFLAGS += -I<path to tslib headers>
+QMAKE_LFLAGS += -L<path to tslib library> -Wl,-rpath-link=<path to tslib library>
+....
+#! [7]
diff --git a/doc/src/snippets/code/doc_src_emb-pointer.qdoc b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
index 4ec1335..1fb6d8f 100644
--- a/doc/src/snippets/code/doc_src_emb-pointer.qdoc
+++ b/doc/src/snippets/code/doc_src_emb-pointer.qdoc
@@ -75,14 +75,6 @@ export QWS_MOUSE_PROTO="Vr41xx:press=500:/dev/misc/ts"
//! [6]
-//! [7]
-....
-QMAKE_CFLAGS += -I<path to tslib headers>
-QMAKE_LFLAGS += -L<path to tslib library> -Wl,-rpath-link=<path to tslib library>
-....
-//! [7]
-
-
//! [8]
module_raw input
module linear
@@ -111,5 +103,3 @@ ls -l /dev/input/mouse0
//! [12]
chmod a+rw /dev/input/mouse0
//! [12]
-
-
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.cpp b/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
new file mode 100644
index 0000000..c834b9f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_arrowpad.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+qApp->translate("ArrowPad", x)
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
index 933f419..ee3c367 100644
--- a/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_arrowpad.qdoc
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-qApp->translate("ArrowPad", x)
-//! [0]
-
-
//! [1]
lrelease arrowpad.pro
//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc b/doc/src/snippets/code/doc_src_examples_containerextension.pro
index 7fe0394..cd86693 100644
--- a/doc/src/snippets/code/doc_src_examples_taskmenuextension.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_containerextension.pro
@@ -38,7 +38,7 @@
**
****************************************************************************/
-//! [0]
+#! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc b/doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro
index 7fe0394..cd86693 100644
--- a/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_customwidgetplugin.pro
@@ -38,7 +38,7 @@
**
****************************************************************************/
-//! [0]
+#! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc b/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp
index a69a7bf..a69a7bf 100644
--- a/doc/src/snippets/code/doc_src_examples_editabletreemodel.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_editabletreemodel.cpp
diff --git a/doc/src/snippets/code/doc_src_examples_icons.cpp b/doc/src/snippets/code/doc_src_examples_icons.cpp
new file mode 100644
index 0000000..411c49f
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_icons.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+if (!condition)
+ qFatal("ASSERT: "condition" in file ...");
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_icons.qdoc b/doc/src/snippets/code/doc_src_examples_icons.qdoc
index 7684224..8ca5751 100644
--- a/doc/src/snippets/code/doc_src_examples_icons.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_icons.qdoc
@@ -38,12 +38,6 @@
**
****************************************************************************/
-//! [0]
-if (!condition)
- qFatal("ASSERT: "condition" in file ...");
-//! [0]
-
-
//! [1]
qmake "CONFIG += debug" icons.pro
//! [1]
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.cpp b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp
new file mode 100644
index 0000000..c86f8ac
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_examples_imageviewer.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+imageLabel->resize(imageLabel->pixmap()->size());
+//! [0]
+
+
+//! [1]
+if (!imageLabel->pixmap())
+ qFatal("ASSERT: "imageLabel->pixmap()" in file ...");
+//! [1]
+
+
+//! [4]
+scrollBar->setValue(int(factor * scrollBar->value()));
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
index 84f822f..1870385 100644
--- a/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_imageviewer.qdoc
@@ -38,17 +38,6 @@
**
****************************************************************************/
-//! [0]
-imageLabel->resize(imageLabel->pixmap()->size());
-//! [0]
-
-
-//! [1]
-if (!imageLabel->pixmap())
- qFatal("ASSERT: "imageLabel->pixmap()" in file ...");
-//! [1]
-
-
//! [2]
qmake "CONFIG += debug" foo.pro
//! [2]
@@ -57,8 +46,3 @@ qmake "CONFIG += debug" foo.pro
//! [3]
qmake "CONFIG += release" foo.pro
//! [3]
-
-
-//! [4]
-scrollBar->setValue(int(factor * scrollBar->value()));
-//! [4]
diff --git a/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc b/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp
index b62236c..b62236c 100644
--- a/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_qtscriptcustomclass.cpp
diff --git a/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc b/doc/src/snippets/code/doc_src_examples_simpledommodel.cpp
index 1abcdc2..1abcdc2 100644
--- a/doc/src/snippets/code/doc_src_examples_simpledommodel.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_simpledommodel.cpp
diff --git a/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc b/doc/src/snippets/code/doc_src_examples_taskmenuextension.pro
index 7fe0394..cd86693 100644
--- a/doc/src/snippets/code/doc_src_examples_customwidgetplugin.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_taskmenuextension.pro
@@ -38,7 +38,7 @@
**
****************************************************************************/
-//! [0]
+#! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_textfinder.qdoc b/doc/src/snippets/code/doc_src_examples_textfinder.pro
index d99f8ce..cdc2366 100644
--- a/doc/src/snippets/code/doc_src_examples_textfinder.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_textfinder.pro
@@ -38,9 +38,9 @@
**
****************************************************************************/
-//! [0]
+#! [0]
CONFIG += uitools
HEADERS = textfinder.h
RESOURCES = textfinder.qrc
SOURCES = textfinder.cpp main.cpp
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_examples_trollprint.qdoc b/doc/src/snippets/code/doc_src_examples_trollprint.cpp
index 4b508e9..f7b8f48 100644
--- a/doc/src/snippets/code/doc_src_examples_trollprint.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_trollprint.cpp
@@ -59,6 +59,7 @@ colorsDisabledRadio = new QRadioButton(tr("Disabled", "colors"), colors);
belonging to MainWindow.
...
+*/
//! [2]
@@ -72,4 +73,5 @@ colorsDisabledRadio = new QRadioButton(tr("Disabled", "colors"), colors);
checkbox and then click the Start Processing button. You should
now see a pop up window with the text "Error: Name too long!".
This window is a ZClientErrorDialog.
+*/
//! [3]
diff --git a/doc/src/snippets/code/doc_src_examples_containerextension.qdoc b/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro
index 7fe0394..cd86693 100644
--- a/doc/src/snippets/code/doc_src_examples_containerextension.qdoc
+++ b/doc/src/snippets/code/doc_src_examples_worldtimeclockplugin.pro
@@ -38,7 +38,7 @@
**
****************************************************************************/
-//! [0]
+#! [0]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_graphicsview.qdoc b/doc/src/snippets/code/doc_src_graphicsview.cpp
index 00ebab3..00ebab3 100644
--- a/doc/src/snippets/code/doc_src_graphicsview.qdoc
+++ b/doc/src/snippets/code/doc_src_graphicsview.cpp
diff --git a/doc/src/snippets/code/doc_src_groups.qdoc b/doc/src/snippets/code/doc_src_groups.cpp
index 2d5fd97..2d5fd97 100644
--- a/doc/src/snippets/code/doc_src_groups.qdoc
+++ b/doc/src/snippets/code/doc_src_groups.cpp
diff --git a/doc/src/snippets/code/doc_src_i18n.cpp b/doc/src/snippets/code/doc_src_i18n.cpp
new file mode 100644
index 0000000..cc85bd8
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_i18n.cpp
@@ -0,0 +1,175 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+LoginWidget::LoginWidget()
+{
+ QLabel *label = new QLabel(tr("Password:"));
+ ...
+}
+//! [0]
+
+
+//! [1]
+void some_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ LoginWidget::tr("Password:"), logwid);
+}
+
+void same_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ qApp->translate("LoginWidget", "Password:"), logwid);
+}
+//! [1]
+
+
+//! [2]
+QString FriendlyConversation::greeting(int type)
+{
+ static const char *greeting_strings[] = {
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ };
+ return tr(greeting_strings[type]);
+}
+//! [2]
+
+
+//! [3]
+static const char *greeting_strings[] = {
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+};
+
+QString FriendlyConversation::greeting(int type)
+{
+ return tr(greeting_strings[type]);
+}
+
+QString global_greeting(int type)
+{
+ return qApp->translate("FriendlyConversation",
+ greeting_strings[type]);
+}
+//! [3]
+
+
+//! [4]
+void FileCopier::showProgress(int done, int total,
+ const QString &currentFile)
+{
+ label.setText(tr("%1 of %2 files copied.\nCopying: %3")
+ .arg(done)
+ .arg(total)
+ .arg(currentFile));
+}
+//! [4]
+
+
+//! [5]
+QString s1 = "%1 of %2 files copied. Copying: %3";
+QString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert.";
+
+qDebug() << s1.arg(5).arg(10).arg("somefile.txt");
+qDebug() << s2.arg(5).arg(10).arg("somefile.txt");
+//! [5]
+
+
+//! [8]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QTranslator qtTranslator;
+ qtTranslator.load("qt_" + QLocale::system().name(),
+ QLibraryInfo::location(QLibraryInfo::TranslationsPath));
+ app.installTranslator(&qtTranslator);
+
+ QTranslator myappTranslator;
+ myappTranslator.load("myapp_" + QLocale::system().name());
+ app.installTranslator(&myappTranslator);
+
+ ...
+ return app.exec();
+}
+//! [8]
+
+
+//! [9]
+QString string = ...; // some Unicode text
+
+QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
+QByteArray encodedString = codec->fromUnicode(string);
+//! [9]
+
+
+//! [10]
+QByteArray encodedString = ...; // some ISO 8859-5 encoded text
+
+QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
+QString string = codec->toUnicode(encodedString);
+//! [10]
+
+
+//! [11]
+void Clock::setTime(const QTime &time)
+{
+ if (tr("AMPM") == "AMPM") {
+ // 12-hour clock
+ } else {
+ // 24-hour clock
+ }
+}
+//! [11]
+
+
+//! [12]
+void MyWidget::changeEvent(QEvent *event)
+{
+ if (e->type() == QEvent::LanguageChange) {
+ titleLabel->setText(tr("Document Title"));
+ ...
+ okPushButton->setText(tr("&OK"));
+ } else
+ QWidget::changeEvent(event);
+}
+//! [12]
diff --git a/doc/src/snippets/code/doc_src_i18n.qdoc b/doc/src/snippets/code/doc_src_i18n.qdoc
index f54ce37..f8f8f02 100644
--- a/doc/src/snippets/code/doc_src_i18n.qdoc
+++ b/doc/src/snippets/code/doc_src_i18n.qdoc
@@ -38,82 +38,6 @@
**
****************************************************************************/
-//! [0]
-LoginWidget::LoginWidget()
-{
- QLabel *label = new QLabel(tr("Password:"));
- ...
-}
-//! [0]
-
-
-//! [1]
-void some_global_function(LoginWidget *logwid)
-{
- QLabel *label = new QLabel(
- LoginWidget::tr("Password:"), logwid);
-}
-
-void same_global_function(LoginWidget *logwid)
-{
- QLabel *label = new QLabel(
- qApp->translate("LoginWidget", "Password:"), logwid);
-}
-//! [1]
-
-
-//! [2]
-QString FriendlyConversation::greeting(int type)
-{
- static const char *greeting_strings[] = {
- QT_TR_NOOP("Hello"),
- QT_TR_NOOP("Goodbye")
- };
- return tr(greeting_strings[type]);
-}
-//! [2]
-
-
-//! [3]
-static const char *greeting_strings[] = {
- QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
- QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
-};
-
-QString FriendlyConversation::greeting(int type)
-{
- return tr(greeting_strings[type]);
-}
-
-QString global_greeting(int type)
-{
- return qApp->translate("FriendlyConversation",
- greeting_strings[type]);
-}
-//! [3]
-
-
-//! [4]
-void FileCopier::showProgress(int done, int total,
- const QString &currentFile)
-{
- label.setText(tr("%1 of %2 files copied.\nCopying: %3")
- .arg(done)
- .arg(total)
- .arg(currentFile));
-}
-//! [4]
-
-
-//! [5]
-QString s1 = "%1 of %2 files copied. Copying: %3";
-QString s2 = "Kopierer nu %3. Av totalt %2 filer er %1 kopiert.";
-
-qDebug() << s1.arg(5).arg(10).arg("somefile.txt");
-qDebug() << s2.arg(5).arg(10).arg("somefile.txt");
-//! [5]
-
-
//! [6]
5 of 10 files copied. Copying: somefile.txt
Kopierer nu somefile.txt. Av totalt 10 filer er 5 kopiert.
@@ -132,64 +56,3 @@ TRANSLATIONS = superapp_dk.ts \
superapp_no.ts \
superapp_se.ts
//! [7]
-
-
-//! [8]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QTranslator qtTranslator;
- qtTranslator.load("qt_" + QLocale::system().name(),
- QLibraryInfo::location(QLibraryInfo::TranslationsPath));
- app.installTranslator(&qtTranslator);
-
- QTranslator myappTranslator;
- myappTranslator.load("myapp_" + QLocale::system().name());
- app.installTranslator(&myappTranslator);
-
- ...
- return app.exec();
-}
-//! [8]
-
-
-//! [9]
-QString string = ...; // some Unicode text
-
-QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
-QByteArray encodedString = codec->fromUnicode(string);
-//! [9]
-
-
-//! [10]
-QByteArray encodedString = ...; // some ISO 8859-5 encoded text
-
-QTextCodec *codec = QTextCodec::codecForName("ISO 8859-5");
-QString string = codec->toUnicode(encodedString);
-//! [10]
-
-
-//! [11]
-void Clock::setTime(const QTime &time)
-{
- if (tr("AMPM") == "AMPM") {
- // 12-hour clock
- } else {
- // 24-hour clock
- }
-}
-//! [11]
-
-
-//! [12]
-void MyWidget::changeEvent(QEvent *event)
-{
- if (e->type() == QEvent::LanguageChange) {
- titleLabel->setText(tr("Document Title"));
- ...
- okPushButton->setText(tr("&OK"));
- } else
- QWidget::changeEvent(event);
-}
-//! [12]
diff --git a/doc/src/snippets/code/doc_src_layout.qdoc b/doc/src/snippets/code/doc_src_layout.cpp
index 47db36b..47db36b 100644
--- a/doc/src/snippets/code/doc_src_layout.qdoc
+++ b/doc/src/snippets/code/doc_src_layout.cpp
diff --git a/doc/src/snippets/code/doc_src_linguist-manual.cpp b/doc/src/snippets/code/doc_src_linguist-manual.cpp
new file mode 100644
index 0000000..7cb5b1e
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_linguist-manual.cpp
@@ -0,0 +1,157 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [3]
+label->setText(tr("F\374r \310lise"));
+//! [3]
+
+
+void wrapInFunction()
+{
+//! [6]
+button = new QPushButton("&Quit", this);
+//! [6]
+
+
+//! [7]
+button = new QPushButton(tr("&Quit"), this);
+//! [7]
+
+
+//! [8]
+QPushButton::tr("&Quit")
+//! [8]
+
+
+//! [9]
+QObject::tr("&Quit")
+//! [9]
+
+
+//! [10]
+rbc = new QRadioButton(tr("Enabled", "Color frame"), this);
+//! [10]
+
+
+//! [11]
+rbh = new QRadioButton(tr("Enabled", "Hue frame"), this);
+//! [11]
+}
+
+
+//! [12]
+/*
+ TRANSLATOR FindDialog
+
+ Choose Edit|Find from the menu bar or press Ctrl+F to pop up the
+ Find dialog.
+
+ ...
+*/
+//! [12]
+
+//! [13]
+/*
+ TRANSLATOR MyNamespace::MyClass
+
+ Necessary for lupdate.
+
+ ...
+*/
+//! [13]
+
+//! [14]
+void some_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ LoginWidget::tr("Password:"), logwid);
+}
+
+void same_global_function(LoginWidget *logwid)
+{
+ QLabel *label = new QLabel(
+ qApp->translate("LoginWidget", "Password:"),
+ logwid);
+}
+//! [14]
+
+
+//! [15]
+QString FriendlyConversation::greeting(int greet_type)
+{
+ static const char* greeting_strings[] = {
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ };
+ return tr(greeting_strings[greet_type]);
+}
+//! [15]
+
+
+//! [16]
+static const char* greeting_strings[] = {
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+};
+
+QString FriendlyConversation::greeting(int greet_type)
+{
+ return tr(greeting_strings[greet_type]);
+}
+
+QString global_greeting(int greet_type)
+{
+ return qApp->translate("FriendlyConversation",
+ greeting_strings[greet_type]);
+}
+//! [16]
+
+void wrapInFunction()
+{
+
+//! [17]
+QString tr(const char *text, const char *comment, int n);
+//! [17]
+
+//! [18]
+tr("%n item(s) replaced", "", count);
+//! [18]
+
+}
diff --git a/doc/src/snippets/code/doc_src_linguist-manual.pro b/doc/src/snippets/code/doc_src_linguist-manual.pro
new file mode 100644
index 0000000..3b19ba7
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_linguist-manual.pro
@@ -0,0 +1,62 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+HEADERS = main-dlg.h \
+ options-dlg.h
+SOURCES = main-dlg.cpp \
+ options-dlg.cpp \
+ main.cpp
+FORMS = search-dlg.ui
+TRANSLATIONS = superapp_dk.ts \
+ superapp_fi.ts \
+ superapp_no.ts \
+ superapp_se.ts
+#! [0]
+
+
+#! [1]
+CODECFORTR = ISO-8859-5
+#! [1]
+
+
+#! [2]
+CODECFORSRC = UTF-8
+#! [2]
diff --git a/doc/src/snippets/code/doc_src_linguist-manual.qdoc b/doc/src/snippets/code/doc_src_linguist-manual.qdoc
index 5975c9a..34b5dcc 100644
--- a/doc/src/snippets/code/doc_src_linguist-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_linguist-manual.qdoc
@@ -38,35 +38,6 @@
**
****************************************************************************/
-//! [0]
-HEADERS = main-dlg.h \
- options-dlg.h
-SOURCES = main-dlg.cpp \
- options-dlg.cpp \
- main.cpp
-FORMS = search-dlg.ui
-TRANSLATIONS = superapp_dk.ts \
- superapp_fi.ts \
- superapp_no.ts \
- superapp_se.ts
-//! [0]
-
-
-//! [1]
-CODECFORTR = ISO-8859-5
-//! [1]
-
-
-//! [2]
-CODECFORSRC = UTF-8
-//! [2]
-
-
-//! [3]
-label->setText(tr("F\374r \310lise"));
-//! [3]
-
-
//! [4]
Usage:
lupdate [options] [project-file]
@@ -116,118 +87,3 @@ Options:
-version
Display the version of lrelease and exit
//! [5]
-
-
-void wrapInFunction()
-{
-//! [6]
-button = new QPushButton("&Quit", this);
-//! [6]
-
-
-//! [7]
-button = new QPushButton(tr("&Quit"), this);
-//! [7]
-
-
-//! [8]
-QPushButton::tr("&Quit")
-//! [8]
-
-
-//! [9]
-QObject::tr("&Quit")
-//! [9]
-
-
-//! [10]
-rbc = new QRadioButton(tr("Enabled", "Color frame"), this);
-//! [10]
-
-
-//! [11]
-rbh = new QRadioButton(tr("Enabled", "Hue frame"), this);
-//! [11]
-}
-
-
-//! [12]
-/*
- TRANSLATOR FindDialog
-
- Choose Edit|Find from the menu bar or press Ctrl+F to pop up the
- Find dialog.
-
- ...
-*/
-//! [12]
-
-//! [13]
-/*
- TRANSLATOR MyNamespace::MyClass
-
- Necessary for lupdate.
-
- ...
-*/
-//! [13]
-
-//! [14]
-void some_global_function(LoginWidget *logwid)
-{
- QLabel *label = new QLabel(
- LoginWidget::tr("Password:"), logwid);
-}
-
-void same_global_function(LoginWidget *logwid)
-{
- QLabel *label = new QLabel(
- qApp->translate("LoginWidget", "Password:"),
- logwid);
-}
-//! [14]
-
-
-//! [15]
-QString FriendlyConversation::greeting(int greet_type)
-{
- static const char* greeting_strings[] = {
- QT_TR_NOOP("Hello"),
- QT_TR_NOOP("Goodbye")
- };
- return tr(greeting_strings[greet_type]);
-}
-//! [15]
-
-
-//! [16]
-static const char* greeting_strings[] = {
- QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
- QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
-};
-
-QString FriendlyConversation::greeting(int greet_type)
-{
- return tr(greeting_strings[greet_type]);
-}
-
-QString global_greeting(int greet_type)
-{
- return qApp->translate("FriendlyConversation",
- greeting_strings[greet_type]);
-}
-//! [16]
-
-void wrapInFunction()
-{
-
-//! [17]
-QString tr(const char *text, const char *comment, int n);
-//! [17]
-
-//! [18]
-tr("%n item(s) replaced", "", count);
-//! [18]
-
-}
-
diff --git a/doc/src/snippets/code/doc_src_mac-differences.cpp b/doc/src/snippets/code/doc_src_mac-differences.cpp
new file mode 100644
index 0000000..f261083
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_mac-differences.cpp
@@ -0,0 +1,52 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [1]
+#ifdef Q_WS_MAC
+ CFURLRef appUrlRef = CFBundleCopyBundleURL(CFBundleGetMainBundle());
+ CFStringRef macPath = CFURLCopyFileSystemPath(appUrlRef,
+ kCFURLPOSIXPathStyle);
+ const char *pathPtr = CFStringGetCStringPtr(macPath,
+ CFStringGetSystemEncoding());
+ qDebug("Path = %s", pathPtr);
+ CFRelease(appUrlRef);
+ CFRelease(macPath);
+#endif
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_mac-differences.pro b/doc/src/snippets/code/doc_src_mac-differences.pro
new file mode 100644
index 0000000..3490bfe
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_mac-differences.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+QMAKE_LFLAGS_SONAME = -Wl,-install_name,@executable_path/../Frameworks/
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_moc.cpp b/doc/src/snippets/code/doc_src_moc.cpp
new file mode 100644
index 0000000..ec756e1
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_moc.cpp
@@ -0,0 +1,144 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [3]
+#include "foo.moc"
+//! [3]
+
+
+//! [4]
+#ifndef Q_MOC_RUN
+ ...
+#endif
+//! [4]
+
+
+//! [5]
+class SomeTemplate<int> : public QFrame
+{
+ Q_OBJECT
+ ...
+
+signals:
+ void mySignal(int);
+};
+//! [5]
+
+
+//! [6]
+// correct
+class SomeClass : public QObject, public OtherClass
+{
+ ...
+};
+//! [6]
+
+
+//! [7]
+class SomeClass : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void apply(void (*apply)(List *, void *), char *); // WRONG
+};
+//! [7]
+
+
+//! [8]
+typedef void (*ApplyFunction)(List *, void *);
+
+class SomeClass : public QObject
+{
+ Q_OBJECT
+
+public slots:
+ void apply(ApplyFunction, char *);
+};
+//! [8]
+
+
+//! [9]
+class MyClass : public QObject
+{
+ Q_OBJECT
+
+ enum Error {
+ ConnectionRefused,
+ RemoteHostClosed,
+ UnknownError
+ };
+
+signals:
+ void stateChanged(MyClass::Error error);
+};
+//! [9]
+
+
+//! [10]
+#ifdef ultrix
+#define SIGNEDNESS(a) unsigned a
+#else
+#define SIGNEDNESS(a) a
+#endif
+
+class Whatever : public QObject
+{
+ Q_OBJECT
+
+signals:
+ void someSignal(SIGNEDNESS(int));
+};
+//! [10]
+
+
+//! [11]
+class A
+{
+public:
+ class B
+ {
+ Q_OBJECT
+
+ public slots: // WRONG
+ void b();
+ };
+};
+//! [11]
diff --git a/doc/src/snippets/code/doc_src_moc.qdoc b/doc/src/snippets/code/doc_src_moc.qdoc
index ef85b1b..74ab365 100644
--- a/doc/src/snippets/code/doc_src_moc.qdoc
+++ b/doc/src/snippets/code/doc_src_moc.qdoc
@@ -56,109 +56,3 @@ foo.o: foo.moc
foo.moc: foo.cpp
moc $(DEFINES) $(INCPATH) -i $< -o $@
//! [2]
-
-
-//! [3]
-#include "foo.moc"
-//! [3]
-
-
-//! [4]
-#ifndef Q_MOC_RUN
- ...
-#endif
-//! [4]
-
-
-//! [5]
-class SomeTemplate<int> : public QFrame
-{
- Q_OBJECT
- ...
-
-signals:
- void mySignal(int);
-};
-//! [5]
-
-
-//! [6]
-// correct
-class SomeClass : public QObject, public OtherClass
-{
- ...
-};
-//! [6]
-
-
-//! [7]
-class SomeClass : public QObject
-{
- Q_OBJECT
-
-public slots:
- void apply(void (*apply)(List *, void *), char *); // WRONG
-};
-//! [7]
-
-
-//! [8]
-typedef void (*ApplyFunction)(List *, void *);
-
-class SomeClass : public QObject
-{
- Q_OBJECT
-
-public slots:
- void apply(ApplyFunction, char *);
-};
-//! [8]
-
-
-//! [9]
-class MyClass : public QObject
-{
- Q_OBJECT
-
- enum Error {
- ConnectionRefused,
- RemoteHostClosed,
- UnknownError
- };
-
-signals:
- void stateChanged(MyClass::Error error);
-};
-//! [9]
-
-
-//! [10]
-#ifdef ultrix
-#define SIGNEDNESS(a) unsigned a
-#else
-#define SIGNEDNESS(a) a
-#endif
-
-class Whatever : public QObject
-{
- Q_OBJECT
-
-signals:
- void someSignal(SIGNEDNESS(int));
-};
-//! [10]
-
-
-//! [11]
-class A
-{
-public:
- class B
- {
- Q_OBJECT
-
- public slots: // WRONG
- void b();
- };
-};
-//! [11]
diff --git a/doc/src/snippets/code/doc_src_model-view-programming.qdoc b/doc/src/snippets/code/doc_src_model-view-programming.cpp
index 05c2e1d..05c2e1d 100644
--- a/doc/src/snippets/code/doc_src_model-view-programming.qdoc
+++ b/doc/src/snippets/code/doc_src_model-view-programming.cpp
diff --git a/doc/src/snippets/code/doc_src_modules.qdoc b/doc/src/snippets/code/doc_src_modules.pro
index 643a94d..5871540 100644
--- a/doc/src/snippets/code/doc_src_modules.qdoc
+++ b/doc/src/snippets/code/doc_src_modules.pro
@@ -38,6 +38,6 @@
**
****************************************************************************/
-//! [0]
+#! [0]
QT -= gui
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_objecttrees.qdoc b/doc/src/snippets/code/doc_src_objecttrees.cpp
index cd92a49..cd92a49 100644
--- a/doc/src/snippets/code/doc_src_objecttrees.qdoc
+++ b/doc/src/snippets/code/doc_src_objecttrees.cpp
diff --git a/doc/src/snippets/code/doc_src_phonon-api.qdoc b/doc/src/snippets/code/doc_src_phonon-api.cpp
index d7a989b..d7a989b 100644
--- a/doc/src/snippets/code/doc_src_phonon-api.qdoc
+++ b/doc/src/snippets/code/doc_src_phonon-api.cpp
diff --git a/doc/src/snippets/code/doc_src_phonon.pro b/doc/src/snippets/code/doc_src_phonon.pro
new file mode 100644
index 0000000..24cc7bd
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_phonon.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+QT += phonon
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.cpp b/doc/src/snippets/code/doc_src_plugins-howto.cpp
new file mode 100644
index 0000000..06bf903
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_plugins-howto.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+class MyStylePlugin : public QStylePlugin
+{
+public:
+ QStringList keys() const;
+ QStyle *create(const QString &key);
+};
+//! [0]
+
+
+//! [1]
+#include "mystyleplugin.h"
+
+QStringList MyStylePlugin::keys() const
+{
+ return QStringList() << "MyStyle";
+}
+
+QStyle *MyStylePlugin::create(const QString &key)
+{
+ if (key.toLower() == "mystyle")
+ return new MyStyle;
+ return 0;
+}
+
+Q_EXPORT_PLUGIN2(pnp_mystyleplugin, MyStylePlugin)
+//! [1]
+
+
+//! [2]
+QApplication::setStyle(QStyleFactory::create("MyStyle"));
+//! [2]
+
+
+//! [4]
+#include <QApplication>
+#include <QtPlugin>
+
+Q_IMPORT_PLUGIN(qjpeg)
+Q_IMPORT_PLUGIN(qgif)
+Q_IMPORT_PLUGIN(qkrcodecs)
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ ...
+ return app.exec();
+}
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.pro b/doc/src/snippets/code/doc_src_plugins-howto.pro
new file mode 100644
index 0000000..eb0ec28
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_plugins-howto.pro
@@ -0,0 +1,50 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [3]
+CONFIG += release
+#! [3]
+
+
+#! [5]
+QTPLUGIN += qjpeg \
+ qgif \
+ qkrcodecs
+#! [5]
diff --git a/doc/src/snippets/code/doc_src_plugins-howto.qdoc b/doc/src/snippets/code/doc_src_plugins-howto.qdoc
index e80faee..b03dfed 100644
--- a/doc/src/snippets/code/doc_src_plugins-howto.qdoc
+++ b/doc/src/snippets/code/doc_src_plugins-howto.qdoc
@@ -38,69 +38,6 @@
**
****************************************************************************/
-//! [0]
-class MyStylePlugin : public QStylePlugin
-{
-public:
- QStringList keys() const;
- QStyle *create(const QString &key);
-};
-//! [0]
-
-
-//! [1]
-#include "mystyleplugin.h"
-
-QStringList MyStylePlugin::keys() const
-{
- return QStringList() << "MyStyle";
-}
-
-QStyle *MyStylePlugin::create(const QString &key)
-{
- if (key.toLower() == "mystyle")
- return new MyStyle;
- return 0;
-}
-
-Q_EXPORT_PLUGIN2(pnp_mystyleplugin, MyStylePlugin)
-//! [1]
-
-
-//! [2]
-QApplication::setStyle(QStyleFactory::create("MyStyle"));
-//! [2]
-
-
-//! [3]
-CONFIG += release
-//! [3]
-
-
-//! [4]
-#include <QApplication>
-#include <QtPlugin>
-
-Q_IMPORT_PLUGIN(qjpeg)
-Q_IMPORT_PLUGIN(qgif)
-Q_IMPORT_PLUGIN(qkrcodecs)
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- ...
- return app.exec();
-}
-//! [4]
-
-
-//! [5]
-QTPLUGIN += qjpeg \
- qgif \
- qkrcodecs
-//! [5]
-
-
//! [6]
HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.debug
HKEY_CURRENT_USER\Software\Trolltech\OrganizationDefaults\Qt Plugin Cache 4.2.false
diff --git a/doc/src/snippets/code/doc_src_porting-qsa.cpp b/doc/src/snippets/code/doc_src_porting-qsa.cpp
new file mode 100644
index 0000000..f9b9c6b
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting-qsa.cpp
@@ -0,0 +1,89 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [16]
+QPushButton *button = new QPushButton();
+button->setObjectName("button");
+interpreter->addTransientObject(button);
+//! [16]
+
+
+//! [17]
+QPushButton *button = new QPushButton();
+QScriptValue scriptButton = engine.newQObject(button);
+engine.globalObject().setProperty("button", scriptButton);
+//! [17]
+
+
+//! [18]
+ModuleFactory::ModuleFactory()
+{
+ registerClass( "ImageSource", &ImgSource::staticMetaObject);
+ ...
+}
+
+QObject *ModuleFactory::create( const QString &type,
+ const QVariantList &,
+ QObject * )
+{
+ if ( type == "ImageSource" )
+ return new ImgSource();
+ ...
+}
+
+...
+
+interpreter.addObjectFactory(new ModuleFactory());
+//! [18]
+
+
+//! [19]
+QScriptValue construct_QPushButton(QScriptContext *, QScriptEngine *engine) {
+ return engine->newQObject(new QPushButton());
+}
+
+...
+
+QScriptValue constructor = engine.newFunction(construct_QPushButton);
+QScriptValue value =
+ engine.newQMetaObject(&QPushButton::staticMetaObject,
+ constructor);
+engine.globalObject().setProperty("QPushButton", value);
+//! [19]
diff --git a/doc/src/snippets/code/doc_src_porting-qsa.js b/doc/src/snippets/code/doc_src_porting-qsa.js
new file mode 100644
index 0000000..e58f5b7
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting-qsa.js
@@ -0,0 +1,117 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+point = new Object();
+point.x = 12;
+point.y = 35;
+//! [0]
+
+
+//! [1]
+function manhattanLength(point) {
+ return point.x + point.y;
+}
+//! [1]
+
+
+//! [2]
+manhattanLength = function(point) {
+ return point.x + point.y;
+}
+//! [2]
+
+
+//! [3]
+point.manhattanLength = function() {
+ return this.x + this.y;
+}
+print(point.manhattanLength()); // prints 47
+//! [3]
+
+
+//! [5]
+point.manhattanLength = function() {
+ return this.x + this.y;
+}
+print(point.manhattanLength()); // prints 47
+//! [5]
+
+
+//! [8]
+var car = new Object();
+car.constructor = function(regnr) {
+ // ...
+}
+car.constructor();
+//! [8]
+
+
+//! [10]
+function Car(regnr) {
+ this.regNumber = regnr;
+ this.toString = function() { return this.regNumber; }
+}
+//! [10]
+
+
+//! [11]
+function Car(regnr) {
+ this.regNumber = regnr;
+}
+Car.prototype.toString = function() { return this.regNumber; }
+//! [11]
+
+
+//! [13]
+function GasolineCar(regnr) {
+ Car(regnr);
+}
+GasolineCar.prototype = new Car();
+GasolineCar.prototype.toString = function() {
+ return "GasolineCar(" + this.regNumber + ")";
+}
+//! [13]
+
+
+//! [15]
+Car.globalCount = 0;
+print(Car.globalCount);
+//! [15]
diff --git a/doc/src/snippets/code/doc_src_porting-qsa.qdoc b/doc/src/snippets/code/doc_src_porting-qsa.qdoc
index bb0b7fd..1846640 100644
--- a/doc/src/snippets/code/doc_src_porting-qsa.qdoc
+++ b/doc/src/snippets/code/doc_src_porting-qsa.qdoc
@@ -38,35 +38,6 @@
**
****************************************************************************/
-//! [0]
-point = new Object();
-point.x = 12;
-point.y = 35;
-//! [0]
-
-
-//! [1]
-function manhattanLength(point) {
- return point.x + point.y;
-}
-//! [1]
-
-
-//! [2]
-manhattanLength = function(point) {
- return point.x + point.y;
-}
-//! [2]
-
-
-//! [3]
-point.manhattanLength = function() {
- return this.x + this.y;
-}
-print(point.manhattanLength()); // prints 47
-//! [3]
-
-
//! [4]
class Point() {
var x;
@@ -76,14 +47,6 @@ class Point() {
//! [4]
-//! [5]
-point.manhattanLength = function() {
- return this.x + this.y;
-}
-print(point.manhattanLength()); // prints 47
-//! [5]
-
-
//! [6]
class Car {
var regNumber;
@@ -103,13 +66,6 @@ var car = new Car("ABC 123");
//! [7]
-//! [8]
-var car = new Object();
-car.constructor = function(regnr) { ... }
-car.constructor();
-//! [8]
-
-
//! [9]
class Car {
var regNumber;
@@ -123,22 +79,6 @@ class Car {
//! [9]
-//! [10]
-function Car(regnr) {
- this.regNumber = regnr;
- this.toString = function() { return this.regNumber; }
-}
-//! [10]
-
-
-//! [11]
-function Car(regnr) {
- this.regNumber = regnr;
-}
-Car.prototype.toString = function() { return this.regNumber; }
-//! [11]
-
-
//! [12]
class GasolineCar extends Car {
function GasolineCar(regnr) {
@@ -151,77 +91,9 @@ class GasolineCar extends Car {
//! [12]
-//! [13]
-function GasolineCar(regnr) {
- Car(regnr);
-}
-GasolineCar.prototype = new Car();
-GasolineCar.prototype.toString = function() {
- return "GasolineCar(" + this.regNumber + ")";
-}
-//! [13]
-
-
//! [14]
class Car {
static var globalCount = 0;
}
print(Car.globalCount);
//! [14]
-
-
-//! [15]
-Car.globalCount = 0;
-print(Car.globalCount);
-//! [15]
-
-
-//! [16]
-QPushButton *button = new QPushButton();
-button->setObjectName("button");
-interpreter->addTransientObject(button);
-//! [16]
-
-
-//! [17]
-QPushButton *button = new QPushButton();
-QScriptValue scriptButton = engine.newQObject(button);
-engine.globalObject().setProperty("button", scriptButton);
-//! [17]
-
-
-//! [18]
-ModuleFactory::ModuleFactory()
-{
- registerClass( "ImageSource", &ImgSource::staticMetaObject);
- ...
-}
-
-QObject *ModuleFactory::create( const QString &type,
- const QVariantList &,
- QObject * )
-{
- if ( type == "ImageSource" )
- return new ImgSource();
- ...
-}
-
-...
-
-interpreter.addObjectFactory(new ModuleFactory());
-//! [18]
-
-
-//! [19]
-QScriptValue construct_QPushButton(QScriptContext *, QScriptEngine *engine) {
- return engine->newQObject(new QPushButton());
-}
-
-...
-
-QScriptValue constructor = engine.newFunction(construct_QPushButton);
-QScriptValue value =
- engine.newQMetaObject(&QPushButton::staticMetaObject,
- constructor);
-engine.globalObject().setProperty("QPushButton", value);
-//! [19]
diff --git a/doc/src/snippets/code/doc_src_porting4-canvas.qdoc b/doc/src/snippets/code/doc_src_porting4-canvas.cpp
index 8004163..8004163 100644
--- a/doc/src/snippets/code/doc_src_porting4-canvas.qdoc
+++ b/doc/src/snippets/code/doc_src_porting4-canvas.cpp
diff --git a/doc/src/snippets/code/doc_src_porting4-designer.cpp b/doc/src/snippets/code/doc_src_porting4-designer.cpp
new file mode 100644
index 0000000..1d73aae
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting4-designer.cpp
@@ -0,0 +1,173 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+namespace Ui {
+
+class HelloWorld
+{
+public:
+ QVBoxLayout *vboxLayout;
+ QPushButton *pushButton;
+
+ void setupUi(QWidget *HelloWorld)
+ {
+ HelloWorld->setObjectName(QString::fromUtf8("HelloWorld"));
+
+ vboxLayout = new QVBoxLayout(HelloWorld);
+ vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
+
+ pushButton = new QPushButton(HelloWorld);
+ pushButton->setObjectName(QString::fromUtf8("pushButton"));
+
+ vboxLayout->addWidget(pushButton);
+
+ retranslateUi(HelloWorld);
+ }
+};
+
+}
+//! [0]
+
+
+//! [1]
+#include <QApplication>
+#include <QWidget>
+
+#include "ui_helloworld.h" // defines Ui::HelloWorld
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ QWidget w;
+ Ui::HelloWorld ui;
+ ui.setupUi(&w);
+
+ w.show();
+ return app.exec();
+}
+//! [1]
+
+
+//! [2]
+#include <QApplication>
+#include <QWidget>
+
+#include "ui_helloworld.h" // defines Ui::HelloWorld
+
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0)
+ : QWidget(parent)
+ { setupUi(this); }
+};
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ HelloWorldWidget w;
+ w.show();
+ return app.exec();
+}
+//! [2]
+
+
+//! [5]
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0);
+
+public slots:
+ void mySlot();
+};
+
+HelloWorldWidget::HelloWorldWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+
+ QObject::connect(pushButton, SIGNAL(clicked()),
+ this, SLOT(mySlot()));
+}
+
+void HelloWorldWidget::mySlot()
+{
+ ...
+}
+//! [5]
+
+
+//! [6]
+class HelloWorldWidget : public QWidget, public Ui::HelloWorld
+{
+ Q_OBJECT
+
+public:
+ HelloWorldWidget(QWidget *parent = 0);
+
+public slots:
+ void on_pushButton_clicked();
+};
+
+HelloWorldWidget::HelloWorldWidget(QWidget *parent)
+ : QWidget(parent)
+{
+ setupUi(this);
+}
+
+void HelloWorldWidget::on_pushButton_clicked()
+{
+ ...
+}
+//! [6]
+
+
+//! [9]
+QFile file(":/icons/yes.png");
+QIcon icon(":/icons/no.png");
+QPixmap pixmap(":/icons/no.png");
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_porting4-designer.pro b/doc/src/snippets/code/doc_src_porting4-designer.pro
new file mode 100644
index 0000000..673e593
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_porting4-designer.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [8]
+RESOURCES += icons.qrc
+#! [8]
diff --git a/doc/src/snippets/code/doc_src_porting4-designer.qdoc b/doc/src/snippets/code/doc_src_porting4-designer.qdoc
index 2c043f5..b5c686b 100644
--- a/doc/src/snippets/code/doc_src_porting4-designer.qdoc
+++ b/doc/src/snippets/code/doc_src_porting4-designer.qdoc
@@ -38,81 +38,6 @@
**
****************************************************************************/
-//! [0]
-namespace Ui {
-
-class HelloWorld
-{
-public:
- QVBoxLayout *vboxLayout;
- QPushButton *pushButton;
-
- void setupUi(QWidget *HelloWorld)
- {
- HelloWorld->setObjectName(QString::fromUtf8("HelloWorld"));
-
- vboxLayout = new QVBoxLayout(HelloWorld);
- vboxLayout->setObjectName(QString::fromUtf8("vboxLayout"));
-
- pushButton = new QPushButton(HelloWorld);
- pushButton->setObjectName(QString::fromUtf8("pushButton"));
-
- vboxLayout->addWidget(pushButton);
-
- retranslateUi(HelloWorld);
- }
-};
-
-}
-//! [0]
-
-
-//! [1]
-#include <QApplication>
-#include <QWidget>
-
-#include "ui_helloworld.h" // defines Ui::HelloWorld
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
-
- QWidget w;
- Ui::HelloWorld ui;
- ui.setupUi(&w);
-
- w.show();
- return app.exec();
-}
-//! [1]
-
-
-//! [2]
-#include <QApplication>
-#include <QWidget>
-
-#include "ui_helloworld.h" // defines Ui::HelloWorld
-
-class HelloWorldWidget : public QWidget, public Ui::HelloWorld
-{
- Q_OBJECT
-
-public:
- HelloWorldWidget(QWidget *parent = 0)
- : QWidget(parent)
- { setupUi(this); }
-};
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- HelloWorldWidget w;
- w.show();
- return app.exec();
-}
-//! [2]
-
-
//! [3]
uic3 myform.ui > myform.h
uic3 -impl myform.h myform.ui > myform.cpp
@@ -124,59 +49,6 @@ uic3 -convert myform3.ui > myform4.ui
//! [4]
-//! [5]
-class HelloWorldWidget : public QWidget, public Ui::HelloWorld
-{
- Q_OBJECT
-
-public:
- HelloWorldWidget(QWidget *parent = 0);
-
-public slots:
- void mySlot();
-};
-
-HelloWorldWidget::HelloWorldWidget(QWidget *parent)
- : QWidget(parent)
-{
- setupUi(this);
-
- QObject::connect(pushButton, SIGNAL(clicked()),
- this, SLOT(mySlot()));
-}
-
-void HelloWorldWidget::mySlot()
-{
- ...
-}
-//! [5]
-
-
-//! [6]
-class HelloWorldWidget : public QWidget, public Ui::HelloWorld
-{
- Q_OBJECT
-
-public:
- HelloWorldWidget(QWidget *parent = 0);
-
-public slots:
- void on_pushButton_clicked();
-};
-
-HelloWorldWidget::HelloWorldWidget(QWidget *parent)
- : QWidget(parent)
-{
- setupUi(this);
-}
-
-void HelloWorldWidget::on_pushButton_clicked()
-{
- ...
-}
-//! [6]
-
-
//! [7]
<RCC version="1.0">
<qresource prefix="/icons">
@@ -185,15 +57,3 @@ void HelloWorldWidget::on_pushButton_clicked()
</qresource>
</RCC>
//! [7]
-
-
-//! [8]
-RESOURCES += icons.qrc
-//! [8]
-
-
-//! [9]
-QFile file(":/icons/yes.png");
-QIcon icon(":/icons/no.png");
-QPixmap pixmap(":/icons/no.png");
-//! [9]
diff --git a/doc/src/snippets/code/doc_src_porting4.qdoc b/doc/src/snippets/code/doc_src_porting4.cpp
index 14c708a..14c708a 100644
--- a/doc/src/snippets/code/doc_src_porting4.qdoc
+++ b/doc/src/snippets/code/doc_src_porting4.cpp
diff --git a/doc/src/snippets/code/doc_src_properties.qdoc b/doc/src/snippets/code/doc_src_properties.cpp
index 1238bc5..b5a103d 100644
--- a/doc/src/snippets/code/doc_src_properties.qdoc
+++ b/doc/src/snippets/code/doc_src_properties.cpp
@@ -44,6 +44,7 @@ Q_PROPERTY(type name
[WRITE setFunction]
[RESET resetFunction]
[NOTIFY notifySignal]
+ [REVISION int]
[DESIGNABLE bool]
[SCRIPTABLE bool]
[STORED bool]
diff --git a/doc/src/snippets/code/doc_src_q3asciidict.qdoc b/doc/src/snippets/code/doc_src_q3asciidict.cpp
index 4b32817..4b32817 100644
--- a/doc/src/snippets/code/doc_src_q3asciidict.qdoc
+++ b/doc/src/snippets/code/doc_src_q3asciidict.cpp
diff --git a/doc/src/snippets/code/doc_src_q3dict.qdoc b/doc/src/snippets/code/doc_src_q3dict.cpp
index 9c51cae..9c51cae 100644
--- a/doc/src/snippets/code/doc_src_q3dict.qdoc
+++ b/doc/src/snippets/code/doc_src_q3dict.cpp
diff --git a/doc/src/snippets/code/doc_src_q3intdict.qdoc b/doc/src/snippets/code/doc_src_q3intdict.cpp
index 0f15b6f..0f15b6f 100644
--- a/doc/src/snippets/code/doc_src_q3intdict.qdoc
+++ b/doc/src/snippets/code/doc_src_q3intdict.cpp
diff --git a/doc/src/snippets/code/doc_src_q3memarray.cpp b/doc/src/snippets/code/doc_src_q3memarray.cpp
new file mode 100644
index 0000000..2c91050
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_q3memarray.cpp
@@ -0,0 +1,108 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <q3memarray.h>
+#include <stdio.h>
+
+Q3MemArray<int> fib( int num ) // returns fibonacci array
+{
+ Q_ASSERT( num > 2 );
+ Q3MemArray<int> f( num ); // array of ints
+
+ f[0] = f[1] = 1;
+ for ( int i = 2; i < num; i++ )
+ f[i] = f[i-1] + f[i-2];
+
+ return f;
+}
+
+int main()
+{
+ Q3MemArray<int> a = fib( 6 ); // get first 6 fibonaccis
+ for ( int i = 0; i < a.size(); i++ )
+ qDebug( "%d: %d", i, a[i] );
+
+ qDebug( "1 is found %d times", a.contains(1) );
+ qDebug( "5 is found at index %d", a.find(5) );
+
+ return 0;
+}
+//! [0]
+
+
+//! [2]
+// MyStruct may be padded to 4 or 8 bytes
+struct MyStruct
+{
+ short i; // 2 bytes
+ char c; // 1 byte
+};
+
+Q3MemArray<MyStruct> a(1);
+a[0].i = 5;
+a[0].c = 't';
+
+MyStruct x;
+x.i = '5';
+x.c = 't';
+int i = a.find( x ); // may return -1 if the pad bytes differ
+//! [2]
+
+
+//! [3]
+static char bindata[] = { 231, 1, 44, ... };
+QByteArray a;
+a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
+QDataStream s( a, IO_ReadOnly ); // open on a's data
+s >> <something>; // read raw bindata
+a.resetRawData( bindata, sizeof(bindata) ); // finished
+//! [3]
+
+
+//! [4]
+static char bindata[] = { 231, 1, 44, ... };
+QByteArray a, b;
+a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
+a.resize( 8 ); // will crash
+b = a; // will crash
+a[2] = 123; // might crash
+// forget to resetRawData: will crash
+//! [4]
diff --git a/doc/src/snippets/code/doc_src_q3memarray.qdoc b/doc/src/snippets/code/doc_src_q3memarray.qdoc
index 8e5e008..a966e50 100644
--- a/doc/src/snippets/code/doc_src_q3memarray.qdoc
+++ b/doc/src/snippets/code/doc_src_q3memarray.qdoc
@@ -38,36 +38,6 @@
**
****************************************************************************/
-//! [0]
-#include <q3memarray.h>
-#include <stdio.h>
-
-Q3MemArray<int> fib( int num ) // returns fibonacci array
-{
- Q_ASSERT( num > 2 );
- Q3MemArray<int> f( num ); // array of ints
-
- f[0] = f[1] = 1;
- for ( int i = 2; i < num; i++ )
- f[i] = f[i-1] + f[i-2];
-
- return f;
-}
-
-int main()
-{
- Q3MemArray<int> a = fib( 6 ); // get first 6 fibonaccis
- for ( int i = 0; i < a.size(); i++ )
- qDebug( "%d: %d", i, a[i] );
-
- qDebug( "1 is found %d times", a.contains(1) );
- qDebug( "5 is found at index %d", a.find(5) );
-
- return 0;
-}
-//! [0]
-
-
//! [1]
0: 1
1: 1
@@ -78,43 +48,3 @@ int main()
1 is found 2 times
5 is found at index 4
//! [1]
-
-
-//! [2]
-// MyStruct may be padded to 4 or 8 bytes
-struct MyStruct
-{
- short i; // 2 bytes
- char c; // 1 byte
-};
-
-Q3MemArray<MyStruct> a(1);
-a[0].i = 5;
-a[0].c = 't';
-
-MyStruct x;
-x.i = '5';
-x.c = 't';
-int i = a.find( x ); // may return -1 if the pad bytes differ
-//! [2]
-
-
-//! [3]
-static char bindata[] = { 231, 1, 44, ... };
-QByteArray a;
-a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
-QDataStream s( a, IO_ReadOnly ); // open on a's data
-s >> <something>; // read raw bindata
-a.resetRawData( bindata, sizeof(bindata) ); // finished
-//! [3]
-
-
-//! [4]
-static char bindata[] = { 231, 1, 44, ... };
-QByteArray a, b;
-a.setRawData( bindata, sizeof(bindata) ); // a points to bindata
-a.resize( 8 ); // will crash
-b = a; // will crash
-a[2] = 123; // might crash
-// forget to resetRawData: will crash
-//! [4]
diff --git a/doc/src/snippets/code/doc_src_q3ptrdict.qdoc b/doc/src/snippets/code/doc_src_q3ptrdict.cpp
index e64d874..e64d874 100644
--- a/doc/src/snippets/code/doc_src_q3ptrdict.qdoc
+++ b/doc/src/snippets/code/doc_src_q3ptrdict.cpp
diff --git a/doc/src/snippets/code/doc_src_q3ptrlist.qdoc b/doc/src/snippets/code/doc_src_q3ptrlist.cpp
index 4f97c65..4f97c65 100644
--- a/doc/src/snippets/code/doc_src_q3ptrlist.qdoc
+++ b/doc/src/snippets/code/doc_src_q3ptrlist.cpp
diff --git a/doc/src/snippets/code/doc_src_q3valuelist.qdoc b/doc/src/snippets/code/doc_src_q3valuelist.cpp
index 38ee9f6..38ee9f6 100644
--- a/doc/src/snippets/code/doc_src_q3valuelist.qdoc
+++ b/doc/src/snippets/code/doc_src_q3valuelist.cpp
diff --git a/doc/src/snippets/code/doc_src_q3valuestack.qdoc b/doc/src/snippets/code/doc_src_q3valuestack.cpp
index 50827e6..50827e6 100644
--- a/doc/src/snippets/code/doc_src_q3valuestack.qdoc
+++ b/doc/src/snippets/code/doc_src_q3valuestack.cpp
diff --git a/doc/src/snippets/code/doc_src_q3valuevector.qdoc b/doc/src/snippets/code/doc_src_q3valuevector.cpp
index 8af1568..8af1568 100644
--- a/doc/src/snippets/code/doc_src_q3valuevector.qdoc
+++ b/doc/src/snippets/code/doc_src_q3valuevector.cpp
diff --git a/doc/src/snippets/code/doc_src_qalgorithms.qdoc b/doc/src/snippets/code/doc_src_qalgorithms.cpp
index 0438105..0438105 100644
--- a/doc/src/snippets/code/doc_src_qalgorithms.qdoc
+++ b/doc/src/snippets/code/doc_src_qalgorithms.cpp
diff --git a/doc/src/snippets/code/doc_src_qaxcontainer.qdoc b/doc/src/snippets/code/doc_src_qaxcontainer.pro
index 93aa60b..ff39e67 100644
--- a/doc/src/snippets/code/doc_src_qaxcontainer.qdoc
+++ b/doc/src/snippets/code/doc_src_qaxcontainer.pro
@@ -38,11 +38,11 @@
**
****************************************************************************/
-//! [0]
+#! [0]
CONFIG += qaxcontainer
-//! [0]
+#! [0]
-//! [1]
+#! [1]
TYPELIBS = file.tlb
-//! [1]
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qaxserver.cpp b/doc/src/snippets/code/doc_src_qaxserver.cpp
new file mode 100644
index 0000000..dc16776
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qaxserver.cpp
@@ -0,0 +1,218 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [3]
+#include <QWidget>
+
+class MyActiveX : public QWidget
+{
+ Q_OBJECT
+//! [3]
+
+
+//! [4]
+Q_CLASSINFO("ClassID", "{1D9928BD-4453-4bdd-903D-E525ED17FDE5}")
+Q_CLASSINFO("InterfaceID", "{99F6860E-2C5A-42ec-87F2-43396F4BE389}")
+Q_CLASSINFO("EventsID", "{0A3E9F27-E4F1-45bb-9E47-63099BCCD0E3}")
+//! [4]
+
+
+//! [5]
+Q_PROPERTY(int value READ value WRITE setValue)
+//! [5]
+
+
+//! [6]
+public:
+ MyActiveX(QWidget *parent = 0)
+ ...
+
+ int value() const;
+
+public slots:
+ void setValue(int v);
+ ...
+
+signals:
+ void valueChange(int v);
+ ...
+
+};
+//! [6]
+
+
+//! [7]
+#include <QAxBindable>
+#include <QWidget>
+
+class MyActiveX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+//! [7]
+
+
+//! [8]
+QAXFACTORY_BEGIN("{ad90301a-849e-4e8b-9a91-0a6dc5f6461f}",
+ "{a8f21901-7ff7-4f6a-b939-789620c03d83}")
+ QAXCLASS(MyWidget)
+ QAXCLASS(MyWidget2)
+ QAXTYPE(MySubType)
+QAXFACTORY_END()
+//! [8]
+
+
+//! [9]
+#include <QApplication>
+#include <QAxFactory>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ if (!QAxFactory::isServer()) {
+ // create and show main window
+ }
+ return app.exec();
+}
+//! [9]
+
+
+//! [10]
+MyFactory(const QUuid &, const QUuid &);
+//! [10]
+
+
+//! [11]
+HMODULE dll = LoadLibrary("myserver.dll");
+typedef HRESULT(__stdcall *DllRegisterServerProc)();
+DllRegisterServerProc DllRegisterServer =
+ (DllRegisterServerProc)GetProcAddress(dll, "DllRegisterServer");
+
+HRESULT res = E_FAIL;
+if (DllRegisterServer)
+ res = DllRegisterServer();
+if (res != S_OK)
+ // error handling
+//! [11]
+
+
+//! [15]
+class MyActiveX : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("Version", "2.0")
+ Q_CLASSINFO("ClassID", "{7a4cffd8-cbcd-4ae9-ae7e-343e1e5710df}")
+ Q_CLASSINFO("InterfaceID", "{6fb035bf-8019-48d8-be51-ef05427d8994}")
+ Q_CLASSINFO("EventsID", "{c42fffdf-6557-47c9-817a-2da2228bc29c}")
+ Q_CLASSINFO("Insertable", "yes")
+ Q_CLASSINFO("ToSuperClass", "MyActiveX")
+ Q_PROPERTY(...)
+
+public:
+ MyActiveX(QWidget *parent = 0);
+
+ ...
+};
+//! [15]
+
+
+//! [16]
+class MyLicensedControl : public QWidget
+{
+ Q_OBJECT
+ Q_CLASSINFO("LicenseKey", "<key string>")
+ ...
+};
+//! [16]
+
+
+//! [17]
+class AxImpl : public QAxAggregated, public ISomeCOMInterface
+{
+public:
+ AxImpl() {}
+
+ long queryInterface(const QUuid &iid, void **iface);
+
+ // IUnknown
+ QAXAGG_IUNKNOWN
+
+ // ISomeCOMInterface
+ ...
+}
+//! [17]
+
+
+//! [18]
+long AxImpl::queryInterface(const QUuid &iid, void **iface)
+{
+ *iface = 0;
+ if (iid == IID_ISomeCOMInterface)
+ *iface = (ISomeCOMInterface *)this;
+ else
+ return E_NOINTERFACE;
+
+ AddRef();
+ return S_OK;
+}
+//! [18]
+
+
+//! [19]
+HRESULT AxImpl::QueryInterface(REFIID iid, void **iface)
+{
+ return controllingUnknown()->QueryInterface(iid, iface);
+}
+//! [19]
+
+
+//! [20]
+class MyActiveX : public QWidget, public QAxBindable
+{
+ Q_OBJECT
+
+public:
+ MyActiveX(QWidget *parent);
+
+ QAxAggregated *createAggregate()
+ {
+ return new AxImpl();
+ }
+};
+//! [20]
diff --git a/doc/src/snippets/code/doc_src_qaxserver.pro b/doc/src/snippets/code/doc_src_qaxserver.pro
new file mode 100644
index 0000000..18d66f3
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qaxserver.pro
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+TEMPLATE = app
+CONFIG += qaxserver
+
+RC_FILE = qaxserver.rc
+...
+#! [0]
+
+
+#! [1]
+TEMPLATE = lib
+CONFIG += qaxserver dll
+
+DEF_FILE = qaxserver.def
+RC_FILE = qaxserver.rc
+...
+#! [1]
+
+
+#! [2]
+TEMPLATE = lib
+VERSION = 2.5
+...
+#! [2]
diff --git a/doc/src/snippets/code/doc_src_qaxserver.qdoc b/doc/src/snippets/code/doc_src_qaxserver.qdoc
index c5906e9..2fd79e3 100644
--- a/doc/src/snippets/code/doc_src_qaxserver.qdoc
+++ b/doc/src/snippets/code/doc_src_qaxserver.qdoc
@@ -38,126 +38,6 @@
**
****************************************************************************/
-//! [0]
-TEMPLATE = app
-CONFIG += qaxserver
-
-RC_FILE = qaxserver.rc
-...
-//! [0]
-
-
-//! [1]
-TEMPLATE = lib
-CONFIG += qaxserver dll
-
-DEF_FILE = qaxserver.def
-RC_FILE = qaxserver.rc
-...
-//! [1]
-
-
-//! [2]
-TEMPLATE = lib
-VERSION = 2.5
-...
-//! [2]
-
-
-//! [3]
-#include <QWidget>
-
-class MyActiveX : public QWidget
-{
- Q_OBJECT
-//! [3]
-
-
-//! [4]
-Q_CLASSINFO("ClassID", "{1D9928BD-4453-4bdd-903D-E525ED17FDE5}")
-Q_CLASSINFO("InterfaceID", "{99F6860E-2C5A-42ec-87F2-43396F4BE389}")
-Q_CLASSINFO("EventsID", "{0A3E9F27-E4F1-45bb-9E47-63099BCCD0E3}")
-//! [4]
-
-
-//! [5]
-Q_PROPERTY(int value READ value WRITE setValue)
-//! [5]
-
-
-//! [6]
-public:
- MyActiveX(QWidget *parent = 0)
- ...
-
- int value() const;
-
-public slots:
- void setValue(int v);
- ...
-
-signals:
- void valueChange(int v);
- ...
-
-};
-//! [6]
-
-
-//! [7]
-#include <QAxBindable>
-#include <QWidget>
-
-class MyActiveX : public QWidget, public QAxBindable
-{
- Q_OBJECT
-//! [7]
-
-
-//! [8]
-QAXFACTORY_BEGIN("{ad90301a-849e-4e8b-9a91-0a6dc5f6461f}",
- "{a8f21901-7ff7-4f6a-b939-789620c03d83}")
- QAXCLASS(MyWidget)
- QAXCLASS(MyWidget2)
- QAXTYPE(MySubType)
-QAXFACTORY_END()
-//! [8]
-
-
-//! [9]
-#include <QApplication>
-#include <QAxFactory>
-
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- if (!QAxFactory::isServer()) {
- // create and show main window
- }
- return app.exec();
-}
-//! [9]
-
-
-//! [10]
-MyFactory(const QUuid &, const QUuid &);
-//! [10]
-
-
-//! [11]
-HMODULE dll = LoadLibrary("myserver.dll");
-typedef HRESULT(__stdcall *DllRegisterServerProc)();
-DllRegisterServerProc DllRegisterServer =
- (DllRegisterServerProc)GetProcAddress(dll, "DllRegisterServer");
-
-HRESULT res = E_FAIL;
-if (DllRegisterServer)
- res = DllRegisterServer();
-if (res != S_OK)
- // error handling
-//! [11]
-
-
//! [12]
cabarc N simpleax.cab simpleax.exe simple.inf
//! [12]
@@ -175,89 +55,3 @@ cabarc N simpleax.cab simpleax.exe simple.inf
<param name="name" value="value">
<\object>
//! [14]
-
-
-//! [15]
-class MyActiveX : public QWidget
-{
- Q_OBJECT
- Q_CLASSINFO("Version", "2.0")
- Q_CLASSINFO("ClassID", "{7a4cffd8-cbcd-4ae9-ae7e-343e1e5710df}")
- Q_CLASSINFO("InterfaceID", "{6fb035bf-8019-48d8-be51-ef05427d8994}")
- Q_CLASSINFO("EventsID", "{c42fffdf-6557-47c9-817a-2da2228bc29c}")
- Q_CLASSINFO("Insertable", "yes")
- Q_CLASSINFO("ToSuperClass", "MyActiveX")
- Q_PROPERTY(...)
-
-public:
- MyActiveX(QWidget *parent = 0);
-
- ...
-};
-//! [15]
-
-
-//! [16]
-class MyLicensedControl : public QWidget
-{
- Q_OBJECT
- Q_CLASSINFO("LicenseKey", "<key string>")
- ...
-};
-//! [16]
-
-
-//! [17]
-class AxImpl : public QAxAggregated, public ISomeCOMInterface
-{
-public:
- AxImpl() {}
-
- long queryInterface(const QUuid &iid, void **iface);
-
- // IUnknown
- QAXAGG_IUNKNOWN
-
- // ISomeCOMInterface
- ...
-}
-//! [17]
-
-
-//! [18]
-long AxImpl::queryInterface(const QUuid &iid, void **iface)
-{
- *iface = 0;
- if (iid == IID_ISomeCOMInterface)
- *iface = (ISomeCOMInterface *)this;
- else
- return E_NOINTERFACE;
-
- AddRef();
- return S_OK;
-}
-//! [18]
-
-
-//! [19]
-HRESULT AxImpl::QueryInterface(REFIID iid, void **iface)
-{
- return controllingUnknown()->QueryInterface(iid, iface);
-}
-//! [19]
-
-
-//! [20]
-class MyActiveX : public QWidget, public QAxBindable
-{
- Q_OBJECT
-
-public:
- MyActiveX(QWidget *parent);
-
- QAxAggregated *createAggregate()
- {
- return new AxImpl();
- }
-};
-//! [20]
diff --git a/doc/src/snippets/code/doc_src_qcache.qdoc b/doc/src/snippets/code/doc_src_qcache.cpp
index 81fa3cf..81fa3cf 100644
--- a/doc/src/snippets/code/doc_src_qcache.qdoc
+++ b/doc/src/snippets/code/doc_src_qcache.cpp
diff --git a/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc b/doc/src/snippets/code/doc_src_qdbusadaptors.cpp
index abb31a1..749e64b 100644
--- a/doc/src/snippets/code/doc_src_qdbusadaptors.qdoc
+++ b/doc/src/snippets/code/doc_src_qdbusadaptors.cpp
@@ -39,82 +39,82 @@
****************************************************************************/
//! [0]
- class MainApplicationAdaptor: public QDBusAbstractAdaptor
- {
- Q_OBJECT
- Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MainApplication")
- Q_PROPERTY(QString caption READ caption WRITE setCaption)
- Q_PROPERTY(QString organizationName READ organizationName)
- Q_PROPERTY(QString organizationDomain READ organizationDomain)
-
- private:
- QApplication *app;
-
- public:
- MainApplicationAdaptor(QApplication *application)
- : QDBusAbstractAdaptor(application), app(application)
- {
- connect(application, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
- connect(application, SIGNAL(focusChanged(QWidget*, QWidget*)),
- SLOT(focusChangedSlot(QWidget*, QWidget*)));
- }
-
- QString caption()
- {
- if (app->hasMainWindow())
- return app->mainWindow()->caption();
- return QString(""); // must not return a null QString
- }
-
- void setCaption(const QString &newCaption)
- {
- if (app->hasMainWindow())
- app->mainWindow()->setCaption(newCaption);
- }
-
- QString organizationName()
- {
- return app->organizationName();
- }
-
- QString organizationDomain()
- {
- return app->organizationDomain();
- }
-
- public slots:
- Q_NOREPLY void quit()
- { app->quit(); }
-
- void reparseConfiguration()
- { app->reparseConfiguration(); }
-
- QString mainWindowObject()
- {
- if (app->hasMainWindow())
- return QString("/%1/mainwindow").arg(app->applicationName());
- return QString();
- }
-
- void setSessionManagement(bool enable)
- {
- if (enable)
- app->enableSessionManagement();
- else
- app->disableSessionManagement();
- }
-
- private slots:
- void focusChangedSlot(QWidget *, QWidget *now)
- {
- if (now == app->mainWindow())
- emit mainWindowHasFocus();
- }
-
- signals:
- void aboutToQuit();
- void mainWindowHasFocus();
- };
+class MainApplicationAdaptor: public QDBusAbstractAdaptor
+{
+ Q_OBJECT
+ Q_CLASSINFO("D-Bus Interface", "org.kde.DBus.MainApplication")
+ Q_PROPERTY(QString caption READ caption WRITE setCaption)
+ Q_PROPERTY(QString organizationName READ organizationName)
+ Q_PROPERTY(QString organizationDomain READ organizationDomain)
+
+private:
+ QApplication *app;
+
+public:
+ MainApplicationAdaptor(QApplication *application)
+ : QDBusAbstractAdaptor(application), app(application)
+ {
+ connect(application, SIGNAL(aboutToQuit()), SIGNAL(aboutToQuit()));
+ connect(application, SIGNAL(focusChanged(QWidget*, QWidget*)),
+ SLOT(focusChangedSlot(QWidget*, QWidget*)));
+ }
+
+ QString caption()
+ {
+ if (app->hasMainWindow())
+ return app->mainWindow()->caption();
+ return QString(""); // must not return a null QString
+ }
+
+ void setCaption(const QString &newCaption)
+ {
+ if (app->hasMainWindow())
+ app->mainWindow()->setCaption(newCaption);
+ }
+
+ QString organizationName()
+ {
+ return app->organizationName();
+ }
+
+ QString organizationDomain()
+ {
+ return app->organizationDomain();
+ }
+
+public slots:
+ Q_NOREPLY void quit()
+ { app->quit(); }
+
+ void reparseConfiguration()
+ { app->reparseConfiguration(); }
+
+ QString mainWindowObject()
+ {
+ if (app->hasMainWindow())
+ return QString("/%1/mainwindow").arg(app->applicationName());
+ return QString();
+ }
+
+ void setSessionManagement(bool enable)
+ {
+ if (enable)
+ app->enableSessionManagement();
+ else
+ app->disableSessionManagement();
+ }
+
+private slots:
+ void focusChangedSlot(QWidget *, QWidget *now)
+ {
+ if (now == app->mainWindow())
+ emit mainWindowHasFocus();
+ }
+
+signals:
+ void aboutToQuit();
+ void mainWindowHasFocus();
+};
//! [0]
diff --git a/doc/src/snippets/code/doc_src_qiterator.qdoc b/doc/src/snippets/code/doc_src_qiterator.cpp
index 82b1bd3..82b1bd3 100644
--- a/doc/src/snippets/code/doc_src_qiterator.qdoc
+++ b/doc/src/snippets/code/doc_src_qiterator.cpp
diff --git a/doc/src/snippets/code/doc_src_qmake-manual.cpp b/doc/src/snippets/code/doc_src_qmake-manual.cpp
new file mode 100644
index 0000000..4f60e1d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qmake-manual.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [104]
+// Add C includes here
+
+#if defined __cplusplus
+// Add C++ includes here
+#include <stdlib>
+#include <iostream>
+#include <vector>
+#include <QApplication> // Qt includes
+#include <QPushButton>
+#include <QLabel>
+#include "thirdparty/include/libmain.h"
+#include "my_stable_class.h"
+...
+#endif
+//! [104]
+
+
diff --git a/doc/src/snippets/code/doc_src_qmake-manual.qdoc b/doc/src/snippets/code/doc_src_qmake-manual.pro
index a35a3d9..ee35b77 100644
--- a/doc/src/snippets/code/doc_src_qmake-manual.qdoc
+++ b/doc/src/snippets/code/doc_src_qmake-manual.pro
@@ -38,569 +38,569 @@
**
****************************************************************************/
-//! [0]
+#! [0]
make all
-//! [0]
+#! [0]
-//! [1]
+#! [1]
CONFIG += qt thread debug
-//! [1]
+#! [1]
-//! [2]
+#! [2]
CONFIG += qt
QT += network xml
-//! [2]
+#! [2]
-//! [3]
+#! [3]
QT = network xml # This will omit the core and gui modules.
-//! [3]
+#! [3]
-//! [4]
+#! [4]
QT -= gui # Only the core module is used.
-//! [4]
+#! [4]
-//! [5]
+#! [5]
CONFIG += link_pkgconfig
PKGCONFIG += ogg dbus-1
-//! [5]
+#! [5]
-//! [6]
+#! [6]
LIBS += -L/usr/local/lib -lmath
-//! [6]
+#! [6]
-//! [7]
+#! [7]
INCLUDEPATH = c:/msdev/include d:/stl/include
-//! [7]
+#! [7]
-//! [8]
+#! [8]
qmake [mode] [options] files
-//! [8]
+#! [8]
-//! [9]
+#! [9]
qmake -makefile [options] files
-//! [9]
+#! [9]
-//! [10]
+#! [10]
qmake -makefile -unix -o Makefile "CONFIG+=test" test.pro
-//! [10]
+#! [10]
-//! [11]
+#! [11]
qmake "CONFIG+=test" test.pro
-//! [11]
+#! [11]
-//! [12]
+#! [12]
qmake -project [options] files
-//! [12]
+#! [12]
-//! [13]
+#! [13]
qmake -spec macx-g++
-//! [13]
+#! [13]
-//! [14]
+#! [14]
QMAKE_LFLAGS += -F/path/to/framework/directory/
-//! [14]
+#! [14]
-//! [15]
+#! [15]
LIBS += -framework TheFramework
-//! [15]
+#! [15]
-//! [16]
+#! [16]
TEMPLATE = lib
CONFIG += lib_bundle
-//! [16]
+#! [16]
-//! [17]
+#! [17]
FRAMEWORK_HEADERS.version = Versions
FRAMEWORK_HEADERS.files = path/to/header_one.h path/to/header_two.h
FRAMEWORK_HEADERS.path = Headers
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
-//! [17]
+#! [17]
-//! [18]
+#! [18]
CONFIG += x86 ppc
-//! [18]
+#! [18]
-//! [19]
+#! [19]
qmake -spec macx-xcode project.pro
-//! [19]
+#! [19]
-//! [20]
+#! [20]
qmake -tp vc
-//! [20]
+#! [20]
-//! [21]
+#! [21]
qmake -tp vc -r
-//! [21]
+#! [21]
-//! [22]
+#! [22]
CONFIG -= embed_manifest_exe
-//! [22]
+#! [22]
-//! [23]
+#! [23]
CONFIG -= embed_manifest_dll
-//! [23]
+#! [23]
-//! [24]
+#! [24]
make all
-//! [24]
+#! [24]
-//! [25]
+#! [25]
build_pass:CONFIG(debug, debug|release) {
unix: TARGET = $$join(TARGET,,,_debug)
else: TARGET = $$join(TARGET,,,d)
}
-//! [25]
+#! [25]
-//! [26]
+#! [26]
CONFIG += qt console newstuff
...
newstuff {
SOURCES += new.cpp
HEADERS += new.h
}
-//! [26]
+#! [26]
-//! [27]
+#! [27]
DEFINES += USE_MY_STUFF QT_DLL
-//! [27]
+#! [27]
-//! [28]
+#! [28]
myFiles.files = path\*.png
DEPLOYMENT += myFiles
-//! [28]
+#! [28]
-//! [29]
+#! [29]
myFiles.files = path\file1.ext1 path2\file2.ext1 path3\*
myFiles.path = \some\path\on\device
someother.files = C:\additional\files\*
someother.path = \myFiles\path2
DEPLOYMENT += myFiles someother
-//! [29]
+#! [29]
-//! [30]
+#! [30]
DESTDIR = ../../lib
-//! [30]
+#! [30]
-//! [31]
+#! [31]
DISTFILES += ../program.txt
-//! [31]
+#! [31]
-//! [32]
+#! [32]
FORMS = mydialog.ui \
mywidget.ui \
myconfig.ui
-//! [32]
+#! [32]
-//! [33]
+#! [33]
FORMS3 = my_uic3_dialog.ui \
my_uic3_widget.ui \
my_uic3_config.ui
-//! [33]
+#! [33]
-//! [34]
+#! [34]
HEADERS = myclass.h \
login.h \
mainwindow.h
-//! [34]
+#! [34]
-//! [35]
+#! [35]
INCLUDEPATH = c:/msdev/include d:/stl/include
-//! [35]
+#! [35]
-//! [36]
+#! [36]
target.path += $$[QT_INSTALL_PLUGINS]/imageformats
INSTALLS += target
-//! [36]
+#! [36]
-//! [37]
+#! [37]
LEXSOURCES = lexer.l
-//! [37]
+#! [37]
-//! [38]
+#! [38]
unix:LIBS += -L/usr/local/lib -lmath
win32:LIBS += c:/mylibs/math.lib
-//! [38]
+#! [38]
-//! [39]
+#! [39]
CONFIG += no_lflags_merge
-//! [39]
+#! [39]
-//! [40]
+#! [40]
unix:MOC_DIR = ../myproject/tmp
win32:MOC_DIR = c:/myproject/tmp
-//! [40]
+#! [40]
-//! [41]
+#! [41]
unix:OBJECTS_DIR = ../myproject/tmp
win32:OBJECTS_DIR = c:/myproject/tmp
-//! [41]
+#! [41]
-//! [42]
+#! [42]
app {
# Conditional code for 'app' template here
}
-//! [42]
+#! [42]
-//! [43]
+#! [43]
FRAMEWORK_HEADERS.version = Versions
FRAMEWORK_HEADERS.files = path/to/header_one.h path/to/header_two.h
FRAMEWORK_HEADERS.path = Headers
QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
-//! [43]
+#! [43]
-//! [44]
+#! [44]
QMAKE_BUNDLE_EXTENSION = .myframework
-//! [44]
+#! [44]
-//! [45]
+#! [45]
QMAKE_RESOURCE_FLAGS += -threshold 0 -compress 9
-//! [45]
+#! [45]
-//! [46]
+#! [46]
QMAKE_UIC = uic -L /path/to/plugin
-//! [46]
+#! [46]
-//! [47]
+#! [47]
QT -= gui # Only the core module is used.
-//! [47]
+#! [47]
-//! [48]
+#! [48]
unix:RCC_DIR = ../myproject/resources
win32:RCC_DIR = c:/myproject/resources
-//! [48]
+#! [48]
-//! [49]
+#! [49]
SOURCES = myclass.cpp \
login.cpp \
mainwindow.cpp
-//! [49]
+#! [49]
-//! [50]
+#! [50]
SUBDIRS = kernel \
tools
-//! [50]
+#! [50]
-//! [51]
+#! [51]
CONFIG += ordered
-//! [51]
+#! [51]
-//! [52]
+#! [52]
TEMPLATE = app
TARGET = myapp
SOURCES = main.cpp
-//! [52]
+#! [52]
-//! [53]
+#! [53]
TEMPLATE = lib
SOURCES = main.cpp
TARGET = mylib
-//! [53]
+#! [53]
-//! [54]
+#! [54]
unix:UI_DIR = ../myproject/ui
win32:UI_DIR = c:/myproject/ui
-//! [54]
+#! [54]
-//! [55]
+#! [55]
unix:UI_HEADERS_DIR = ../myproject/ui/include
win32:UI_HEADERS_DIR = c:/myproject/ui/include
-//! [55]
+#! [55]
-//! [56]
+#! [56]
unix:UI_SOURCES_DIR = ../myproject/ui/src
win32:UI_SOURCES_DIR = c:/myproject/ui/src
-//! [56]
+#! [56]
-//! [57]
+#! [57]
VERSION = 1.2.3
-//! [57]
+#! [57]
-//! [58]
+#! [58]
YACCSOURCES = moc.y
-//! [58]
+#! [58]
-//! [59]
+#! [59]
FILE = /etc/passwd
FILENAME = $$basename(FILE) #passwd
-//! [59]
+#! [59]
-//! [60]
+#! [60]
CONFIG = debug
CONFIG += release
CONFIG(release, debug|release):message(Release build!) #will print
CONFIG(debug, debug|release):message(Debug build!) #no print
-//! [60]
+#! [60]
-//! [61]
+#! [61]
contains( drivers, network ) {
# drivers contains 'network'
message( "Configuring for network build..." )
HEADERS += network.h
SOURCES += network.cpp
}
-//! [61]
+#! [61]
-//! [62]
+#! [62]
error(An error has occurred in the configuration process.)
-//! [62]
+#! [62]
-//! [63]
+#! [63]
exists( $(QTDIR)/lib/libqt-mt* ) {
message( "Configuring for multi-threaded Qt..." )
CONFIG += thread
}
-//! [63]
+#! [63]
-//! [64]
+#! [64]
MY_VAR = one two three four
MY_VAR2 = $$join(MY_VAR, " -L", -L) -Lfive
MY_VAR3 = $$member(MY_VAR, 2) $$find(MY_VAR, t.*)
-//! [64]
+#! [64]
-//! [65]
+#! [65]
LIST = 1 2 3
for(a, LIST):exists(file.$${a}):message(I see a file.$${a}!)
-//! [65]
+#! [65]
-//! [66]
+#! [66]
include( shared.pri )
OPTIONS = standard custom
!include( options.pri ) {
message( "No custom build options specified" )
OPTIONS -= custom
}
-//! [66]
+#! [66]
-//! [67]
+#! [67]
isEmpty( CONFIG ) {
CONFIG += qt warn_on debug
}
-//! [67]
+#! [67]
-//! [68]
+#! [68]
message( "This is a message" )
-//! [68]
+#! [68]
-//! [69]
+#! [69]
!build_pass:message( "This is a message" )
-//! [69]
+#! [69]
-//! [70]
+#! [70]
This is a test.
-//! [70]
+#! [70]
-//! [71]
+#! [71]
system(ls /bin):HAS_BIN=FALSE
-//! [71]
+#! [71]
-//! [72]
+#! [72]
UNAME = $$system(uname -s)
contains( UNAME, [lL]inux ):message( This looks like Linux ($$UNAME) to me )
-//! [72]
+#! [72]
-//! [73]
+#! [73]
ARGS = 1 2 3 2 5 1
ARGS = $$unique(ARGS) #1 2 3 5
-//! [73]
+#! [73]
-//! [74]
+#! [74]
qmake -set VARIABLE VALUE
-//! [74]
+#! [74]
-//! [75]
+#! [75]
qmake -query VARIABLE
qmake -query #queries all current VARIABLE/VALUE pairs..
-//! [75]
+#! [75]
-//! [76]
+#! [76]
qmake -query "1.06a/VARIABLE"
-//! [76]
+#! [76]
-//! [77]
+#! [77]
qmake -query "QT_INSTALL_PREFIX"
-//! [77]
+#! [77]
-//! [78]
+#! [78]
QMAKE_VERS = $$[QMAKE_VERSION]
-//! [78]
+#! [78]
-//! [79]
+#! [79]
documentation.path = /usr/local/program/doc
documentation.files = docs/*
-//! [79]
+#! [79]
-//! [80]
+#! [80]
INSTALLS += documentation
-//! [80]
+#! [80]
-//! [81]
+#! [81]
unix:documentation.extra = create_docs; mv master.doc toc.doc
-//! [81]
+#! [81]
-//! [82]
+#! [82]
target.path = /usr/local/myprogram
INSTALLS += target
-//! [82]
+#! [82]
-//! [83]
+#! [83]
CONFIG += create_prl
-//! [83]
+#! [83]
-//! [84]
+#! [84]
CONFIG += link_prl
-//! [84]
+#! [84]
-//! [85]
+#! [85]
QMAKE_EXT_MOC = .mymoc
-//! [85]
+#! [85]
-//! [86]
+#! [86]
mytarget.target = .buildfile
mytarget.commands = touch $$mytarget.target
mytarget.depends = mytarget2
mytarget2.commands = @echo Building $$mytarget.target
-//! [86]
+#! [86]
-//! [87]
+#! [87]
QMAKE_EXTRA_TARGETS += mytarget mytarget2
-//! [87]
+#! [87]
-//! [88]
+#! [88]
new_moc.output = moc_${QMAKE_FILE_BASE}.cpp
new_moc.commands = moc ${QMAKE_FILE_NAME} -o ${QMAKE_FILE_OUT}
new_moc.depend_command = g++ -E -M ${QMAKE_FILE_NAME} | sed "s,^.*: ,,"
new_moc.input = NEW_HEADERS
QMAKE_EXTRA_COMPILERS += new_moc
-//! [88]
+#! [88]
-//! [89]
+#! [89]
TARGET = myapp
-//! [89]
+#! [89]
-//! [90]
+#! [90]
DEFINES += QT_DLL
-//! [90]
+#! [90]
-//! [91]
+#! [91]
DEFINES -= QT_DLL
-//! [91]
+#! [91]
-//! [92]
+#! [92]
DEFINES *= QT_DLL
-//! [92]
+#! [92]
-//! [93]
+#! [93]
DEFINES ~= s/QT_[DT].+/QT
-//! [93]
+#! [93]
-//! [94]
+#! [94]
EVERYTHING = $$SOURCES $$HEADERS
message("The project contains the following files:")
message($$EVERYTHING)
-//! [94]
+#! [94]
-//! [95]
+#! [95]
win32:DEFINES += QT_DLL
-//! [95]
+#! [95]
-//! [96]
+#! [96]
win32:xml {
message(Building for Windows)
SOURCES += xmlhandler_win.cpp
@@ -609,146 +609,128 @@ win32:xml {
} else {
message("Unknown configuration")
}
-//! [96]
+#! [96]
-//! [97]
+#! [97]
MY_VARIABLE = value
-//! [97]
+#! [97]
-//! [98]
+#! [98]
MY_DEFINES = $$DEFINES
-//! [98]
+#! [98]
-//! [99]
+#! [99]
MY_DEFINES = $${DEFINES}
-//! [99]
+#! [99]
-//! [100]
+#! [100]
TARGET = myproject_$${TEMPLATE}
-//! [100]
+#! [100]
-//! [101]
+#! [101]
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
-//! [101]
+#! [101]
-//! [102]
+#! [102]
defineReplace(functionName){
#function code
}
-//! [102]
+#! [102]
-//! [103]
+#! [103]
CONFIG += myfeatures
-//! [103]
-
-
-//! [104]
-// Add C includes here
-
-#if defined __cplusplus
-// Add C++ includes here
-#include <stdlib>
-#include <iostream>
-#include <vector>
-#include <QApplication> // Qt includes
-#include <QPushButton>
-#include <QLabel>
-#include "thirdparty/include/libmain.h"
-#include "my_stable_class.h"
-...
-#endif
-//! [104]
+#! [103]
-//! [105]
+#! [105]
PRECOMPILED_HEADER = stable.h
-//! [105]
+#! [105]
-//! [106]
+#! [106]
precompile_header:!isEmpty(PRECOMPILED_HEADER) {
DEFINES += USING_PCH
}
-//! [106]
+#! [106]
-//! [107]
+#! [107]
PRECOMPILED_HEADER = window.h
SOURCES = window.cpp
-//! [107]
+#! [107]
-//! [108]
+#! [108]
SOURCES += hello.cpp
-//! [108]
+#! [108]
-//! [109]
+#! [109]
SOURCES += hello.cpp
SOURCES += main.cpp
-//! [109]
+#! [109]
-//! [110]
+#! [110]
SOURCES = hello.cpp \
main.cpp
-//! [110]
+#! [110]
-//! [111]
+#! [111]
HEADERS += hello.h
SOURCES += hello.cpp
SOURCES += main.cpp
-//! [111]
+#! [111]
-//! [112]
+#! [112]
TARGET = helloworld
-//! [112]
+#! [112]
-//! [113]
+#! [113]
CONFIG += qt
HEADERS += hello.h
SOURCES += hello.cpp
SOURCES += main.cpp
-//! [113]
+#! [113]
-//! [114]
+#! [114]
qmake -o Makefile hello.pro
-//! [114]
+#! [114]
-//! [115]
+#! [115]
qmake -tp vc hello.pro
-//! [115]
+#! [115]
-//! [116]
+#! [116]
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
SOURCES += main.cpp
-//! [116]
+#! [116]
-//! [117]
+#! [117]
win32 {
SOURCES += hellowin.cpp
}
-//! [117]
+#! [117]
-//! [118]
+#! [118]
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
@@ -759,17 +741,17 @@ win32 {
unix {
SOURCES += hellounix.cpp
}
-//! [118]
+#! [118]
-//! [119]
+#! [119]
!exists( main.cpp ) {
error( "No main.cpp file found" )
}
-//! [119]
+#! [119]
-//! [120]
+#! [120]
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
@@ -783,19 +765,19 @@ unix {
!exists( main.cpp ) {
error( "No main.cpp file found" )
}
-//! [120]
+#! [120]
-//! [121]
+#! [121]
win32 {
debug {
CONFIG += console
}
}
-//! [121]
+#! [121]
-//! [122]
+#! [122]
CONFIG += qt debug
HEADERS += hello.h
SOURCES += hello.cpp
@@ -812,10 +794,10 @@ unix {
win32:debug {
CONFIG += console
}
-//! [122]
+#! [122]
-//! [123]
+#! [123]
TEMPLATE = app
DESTDIR = c:/helloapp
HEADERS += hello.h
@@ -823,32 +805,32 @@ SOURCES += hello.cpp
SOURCES += main.cpp
DEFINES += QT_DLL
CONFIG += qt warn_on release
-//! [123]
+#! [123]
-//! [124]
+#! [124]
make all
-//! [124]
+#! [124]
-//! [125]
+#! [125]
make
-//! [125]
+#! [125]
-//! [126]
+#! [126]
make install
-//! [126]
+#! [126]
-//! [127]
+#! [127]
CONFIG(debug, debug|release) {
mac: TARGET = $$join(TARGET,,,_debug)
win32: TARGET = $$join(TARGET,,d)
}
-//! [127]
+#! [127]
-//! [128]
+#! [128]
customplugin.files = customimageplugin.dll
customplugin.files += c:\myplugins\othercustomimageplugin.dll
customplugin.path = imageformats
@@ -857,50 +839,50 @@ dynamiclibrary.path = \sys\bin
globalplugin.files = someglobalimageplugin.dll
globalplugin.path = \resource\qt\plugins\imageformats
DEPLOYMENT += customplugin dynamiclibrary globalplugin
-//! [128]
+#! [128]
-//! [129]
+#! [129]
TARGET.EPOCALLOWDLLDATA = 1
-//! [129]
+#! [129]
-//! [130]
+#! [130]
TARGET.EPOCHEAPSIZE = 10000 10000000
TARGET.EPOCSTACKSIZE = 0x8000
-//! [130]
+#! [130]
-//! [131]
+#! [131]
QMAKE_CXXFLAGS.CW += -O2
QMAKE_CXXFLAGS.ARMCC += -O0
-//! [131]
+#! [131]
-//! [132]
+#! [132]
TARGET.UID2 = 0x00000001
TARGET.UID3 = 0x00000002
TARGET.SID = 0x00000003
TARGET.VID = 0x00000004
-//! [132]
+#! [132]
-//! [133]
+#! [133]
TARGET.CAPABILITY += AllFiles
-//! [133]
+#! [133]
-//! [134]
+#! [134]
TARGET.CAPABILITY = ALL -TCB -DRM -AllFiles
-//! [134]
+#! [134]
-//! [135]
+#! [135]
TARGET.EPOCHEAPSIZE = 10000 10000000
-//! [135]
+#! [135]
-//! [136]
+#! [136]
TARGET.EPOCSTACKSIZE = 0x8000
-//! [136]
+#! [136]
-//! [137]
+#! [137]
MMP_RULES += "DEFFILE hello.def"
-//! [137]
+#! [137]
-//! [138]
+#! [138]
myBlock = \
"START RESOURCE foo.rss" \
"TARGET bar" \
@@ -911,37 +893,37 @@ myBlock = \
"END"
MMP_RULES += myBlock
-//! [138]
+#! [138]
-//! [139]
+#! [139]
myIfdefBlock = \
"$${LITERAL_HASH}ifdef WINSCW" \
"DEFFILE hello_winscw.def" \
"$${LITERAL_HASH}endif"
MMP_RULES += myIfdefBlock
-//! [139]
+#! [139]
-//! [140]
+#! [140]
somelib.files = somelib.dll
somelib.path = \sys\bin
somelib.pkg_prerules = "(0x12345678), 2, 2, 0, {\"Some Package\"}" \
"(0x87654321), 1, *, * ~ 2, 2, 0, {\"Some Other Package\"}"
justdep.pkg_prerules = "(0xAAAABBBB), 0, 2, 0, {\"My Framework\"}"
DEPLOYMENT += somelib justdep
-//! [140]
+#! [140]
-//! [141]
+#! [141]
default_deployment.pkg_prerules -= pkg_platform_dependencies
my_deployment.pkg_prerules = "[0x11223344],0,0,0,{\"SomeSpecificDeviceID\"}"
DEPLOYMENT += my_deployment
-//! [141]
+#! [141]
-//! [142]
+#! [142]
DEPLOYMENT_PLUGIN += qjpeg
-//! [142]
+#! [142]
-//! [143]
+#! [143]
myextension = \
"start extension myextension" \
"$${LITERAL_HASH}if defined(WINSCW)" \
@@ -950,28 +932,28 @@ myextension = \
"option MYOPTION bar" \
"end"
BLD_INF_RULES.prj_extensions += myextension
-//! [143]
+#! [143]
-//! [144]
+#! [144]
RSS_RULES += "hidden = KAppIsHidden;"
-//! [144]
+#! [144]
-//! [145]
+#! [145]
myrssrules = \
"hidden = KAppIsHidden;" \
"launch = KAppLaunchInBackground;" \
RSS_RULES += myrssrules
-//! [145]
+#! [145]
-//! [146]
+#! [146]
DEPLOYMENT.installer_header = 0x12345678
-//! [146]
+#! [146]
-//! [147]
+#! [147]
DEPLOYMENT.installer_header = "$${LITERAL_HASH}{\"My Application Installer\"},(0x12345678),1,0,0"
-//! [147]
+#! [147]
-//! [148]
+#! [148]
# Set conditional libraries
LIB.MARM = "LIBRARY myarm.lib"
LIB.WINSCW = "LIBRARY mywinscw.lib"
@@ -982,62 +964,62 @@ MYCONDITIONS = MARM WINSCW
MYVARIABLES = LIB
addMMPRules(MYCONDITIONS, MYVARIABLES)
-//! [148]
+#! [148]
-//! [149]
+#! [149]
SUBDIRS += my_executable my_library
my_executable.subdir = app
my_executable.depends = my_library
my_library.subdir = lib
-//! [149]
+#! [149]
-//! [150]
+#! [150]
symbian {
SUBDIRS += emulator_dll
emulator_dll.condition = WINSCW
}
-//! [150]
+#! [150]
-//! [151]
+#! [151]
RSS_RULES.service_list += "uid = 0x12345678; datatype_list = \{\}; opaque_data = r_my_icon;"
RSS_RULES.footer +="RESOURCE CAPTION_AND_ICON_INFO r_my_icon \{ icon_file =\"$$PWD/my_icon.svg\"; \}"
-//! [151]
+#! [151]
-//! [152]
+#! [152]
my_exports = \
"foo.h /epoc32/include/mylib/foo.h" \
"bar.h /epoc32/include/mylib/bar.h"
BLD_INF_RULES.prj_exports += my_exports
-//! [152]
+#! [152]
-//! [153]
+#! [153]
my_note.pkg_postrules.installer = "\"myinstallnote.txt\" - \"\", FILETEXT, TEXTCONTINUE"
DEPLOYMENT += my_note
-//! [153]
+#! [153]
-//! [154]
+#! [154]
DEPLOYMENT -= default_bin_deployment default_resource_deployment default_reg_deployment
-//! [154]
+#! [154]
-//! [155]
+#! [155]
default_bin_deployment.flags += FILERUN RUNINSTALL
dep_note.files = install_note.txt
dep_note.flags = FILETEXT TEXTEXIT
DEPLOYMENT += dep_note
-//! [155]
+#! [155]
-//! [156]
+#! [156]
DEPLOYMENT.display_name = My Qt App
-//! [156]
+#! [156]
-//! [157]
+#! [157]
packagesExist(sqlite3 QtNetwork QtDeclarative) {
DEFINES += USE_FANCY_UI
}
-//! [157]
+#! [157]
-//! [158]
+#! [158]
#ifdef USE_FANCY_UI
// Use the fancy UI, as we have extra packages available
#endif
-//! [158]
+#! [158]
diff --git a/doc/src/snippets/code/doc_src_qnamespace.cpp b/doc/src/snippets/code/doc_src_qnamespace.cpp
new file mode 100644
index 0000000..c512862
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qnamespace.cpp
@@ -0,0 +1,59 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [1]
+enum CustomEventPriority
+{
+ // An important event
+ ImportantEventPriority = Qt::HighEventPriority,
+
+ // A more important event
+ MoreImportantEventPriority = ImportantEventPriority + 1,
+
+ // A critical event
+ CriticalEventPriority = 100 * MoreImportantEventPriority,
+
+ // Not that important
+ StatusEventPriority = Qt::LowEventPriority,
+
+ // These are less important than Status events
+ IdleProcessingDoneEventPriority = StatusEventPriority - 1
+};
+//! [1]
diff --git a/doc/src/snippets/code/doc_src_qnamespace.qdoc b/doc/src/snippets/code/doc_src_qnamespace.qdoc
index a1bd0b7..6b5ce6a 100644
--- a/doc/src/snippets/code/doc_src_qnamespace.qdoc
+++ b/doc/src/snippets/code/doc_src_qnamespace.qdoc
@@ -41,24 +41,3 @@
//! [0]
QObject::connect: Cannot queue arguments of type 'MyType'
//! [0]
-
-
-//! [1]
-enum CustomEventPriority
-{
- // An important event
- ImportantEventPriority = Qt::HighEventPriority,
-
- // A more important event
- MoreImportantEventPriority = ImportantEventPriority + 1,
-
- // A critical event
- CriticalEventPriority = 100 * MoreImportantEventPriority,
-
- // Not that important
- StatusEventPriority = Qt::LowEventPriority,
-
- // These are less important than Status events
- IdleProcessingDoneEventPriority = StatusEventPriority - 1
-};
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qpair.qdoc b/doc/src/snippets/code/doc_src_qpair.cpp
index a9a061e..a9a061e 100644
--- a/doc/src/snippets/code/doc_src_qpair.qdoc
+++ b/doc/src/snippets/code/doc_src_qpair.cpp
diff --git a/doc/src/snippets/code/doc_src_qplugin.qdoc b/doc/src/snippets/code/doc_src_qplugin.cpp
index fdacc08..fdacc08 100644
--- a/doc/src/snippets/code/doc_src_qplugin.qdoc
+++ b/doc/src/snippets/code/doc_src_qplugin.cpp
diff --git a/doc/src/snippets/code/doc_src_qplugin.pro b/doc/src/snippets/code/doc_src_qplugin.pro
new file mode 100644
index 0000000..f3444e2
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qplugin.pro
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [3]
+TEMPLATE = app
+QTPLUGIN += qjpeg qgif qmng # image formats
+#! [3]
diff --git a/doc/src/snippets/code/doc_src_qset.qdoc b/doc/src/snippets/code/doc_src_qset.cpp
index 4a4953d..4a4953d 100644
--- a/doc/src/snippets/code/doc_src_qset.qdoc
+++ b/doc/src/snippets/code/doc_src_qset.cpp
diff --git a/doc/src/snippets/code/doc_src_qsignalspy.qdoc b/doc/src/snippets/code/doc_src_qsignalspy.cpp
index 12462e2..12462e2 100644
--- a/doc/src/snippets/code/doc_src_qsignalspy.qdoc
+++ b/doc/src/snippets/code/doc_src_qsignalspy.cpp
diff --git a/doc/src/snippets/code/doc_src_qt3support.qdoc b/doc/src/snippets/code/doc_src_qt3support.cpp
index 9e0f682..196efd4 100644
--- a/doc/src/snippets/code/doc_src_qt3support.qdoc
+++ b/doc/src/snippets/code/doc_src_qt3support.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <Qt3Support>
//! [0]
-
-
-//! [1]
-QT += qt3support
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qt3support.pro b/doc/src/snippets/code/doc_src_qt3support.pro
new file mode 100644
index 0000000..20fcc14
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt3support.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += qt3support
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qt3to4.cpp b/doc/src/snippets/code/doc_src_qt3to4.cpp
new file mode 100644
index 0000000..d8eb5b4
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt3to4.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [2]
+using namespace Qt;
+//! [2]
diff --git a/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc b/doc/src/snippets/code/doc_src_qt4-accessibility.cpp
index efbbc5a..efbbc5a 100644
--- a/doc/src/snippets/code/doc_src_qt4-accessibility.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-accessibility.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-arthur.qdoc b/doc/src/snippets/code/doc_src_qt4-arthur.cpp
index 6268309..6268309 100644
--- a/doc/src/snippets/code/doc_src_qt4-arthur.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-arthur.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-intro.qdoc b/doc/src/snippets/code/doc_src_qt4-intro.cpp
index 45da7d0..76ed4a5 100644
--- a/doc/src/snippets/code/doc_src_qt4-intro.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-intro.cpp
@@ -38,21 +38,6 @@
**
****************************************************************************/
-//! [0]
-QT -= gui
-//! [0]
-
-
-//! [1]
-QT += network opengl sql qt3support
-//! [1]
-
-
-//! [2]
-CONFIG += uic3
-//! [2]
-
-
//! [3]
#include <QClassName>
//! [3]
@@ -119,23 +104,3 @@ safeLabel->setText("Hello world!");
delete label;
// safeLabel is now 0, whereas label is a dangling pointer
//! [12]
-
-
-//! [13]
-QT += qt3support
-//! [13]
-
-
-//! [14]
-DEFINES += QT3_SUPPORT
-//! [14]
-
-
-//! [15]
-DEFINES += QT3_SUPPORT_WARNINGS
-//! [15]
-
-
-//! [16]
-DEFINES += QT3_SUPPORT
-//! [16]
diff --git a/doc/src/snippets/code/doc_src_qt4-intro.pro b/doc/src/snippets/code/doc_src_qt4-intro.pro
new file mode 100644
index 0000000..40853b3
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qt4-intro.pro
@@ -0,0 +1,73 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+QT -= gui
+#! [0]
+
+
+#! [1]
+QT += network opengl sql qt3support
+#! [1]
+
+
+#! [2]
+CONFIG += uic3
+#! [2]
+
+
+#! [13]
+QT += qt3support
+#! [13]
+
+
+#! [14]
+DEFINES += QT3_SUPPORT
+#! [14]
+
+
+#! [15]
+DEFINES += QT3_SUPPORT_WARNINGS
+#! [15]
+
+
+#! [16]
+DEFINES += QT3_SUPPORT
+#! [16]
diff --git a/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc b/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp
index d0c758e..d0c758e 100644
--- a/doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-mainwindow.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-sql.qdoc b/doc/src/snippets/code/doc_src_qt4-sql.cpp
index cbcfb2d..cbcfb2d 100644
--- a/doc/src/snippets/code/doc_src_qt4-sql.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-sql.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-styles.qdoc b/doc/src/snippets/code/doc_src_qt4-styles.cpp
index effe3cd..effe3cd 100644
--- a/doc/src/snippets/code/doc_src_qt4-styles.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-styles.cpp
diff --git a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc b/doc/src/snippets/code/doc_src_qt4-tulip.cpp
index 83b1210..83b1210 100644
--- a/doc/src/snippets/code/doc_src_qt4-tulip.qdoc
+++ b/doc/src/snippets/code/doc_src_qt4-tulip.cpp
diff --git a/doc/src/snippets/code/doc_src_qtcore.qdoc b/doc/src/snippets/code/doc_src_qtcore.cpp
index 35916ea..35916ea 100644
--- a/doc/src/snippets/code/doc_src_qtcore.qdoc
+++ b/doc/src/snippets/code/doc_src_qtcore.cpp
diff --git a/doc/src/snippets/code/doc_src_qtdbus.qdoc b/doc/src/snippets/code/doc_src_qtdbus.cpp
index 20ff513..2143b5b 100644
--- a/doc/src/snippets/code/doc_src_qtdbus.qdoc
+++ b/doc/src/snippets/code/doc_src_qtdbus.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtDBus>
//! [0]
-
-
-//! [1]
-QT += dbus
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtdbus.pro b/doc/src/snippets/code/doc_src_qtdbus.pro
new file mode 100644
index 0000000..6607d7d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtdbus.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += dbus
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtdesigner.qdoc b/doc/src/snippets/code/doc_src_qtdesigner.cpp
index a37b77f..562002e 100644
--- a/doc/src/snippets/code/doc_src_qtdesigner.qdoc
+++ b/doc/src/snippets/code/doc_src_qtdesigner.cpp
@@ -43,11 +43,6 @@
//! [0]
-//! [1]
-CONFIG += designer
-//! [1]
-
-
//! [2]
QDesignerMemberSheetExtension *memberSheet = 0;
QExtensionManager manager = formEditor->extensionManager();
diff --git a/doc/src/snippets/code/doc_src_qtdesigner.pro b/doc/src/snippets/code/doc_src_qtdesigner.pro
new file mode 100644
index 0000000..dc962ef
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtdesigner.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+CONFIG += designer
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtestevent.qdoc b/doc/src/snippets/code/doc_src_qtestevent.cpp
index fd1c819..fd1c819 100644
--- a/doc/src/snippets/code/doc_src_qtestevent.qdoc
+++ b/doc/src/snippets/code/doc_src_qtestevent.cpp
diff --git a/doc/src/snippets/code/doc_src_qtestlib.cpp b/doc/src/snippets/code/doc_src_qtestlib.cpp
new file mode 100644
index 0000000..bd98807
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtestlib.cpp
@@ -0,0 +1,88 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+class MyFirstTest: public QObject
+{
+ Q_OBJECT
+private slots:
+ void initTestCase()
+ { qDebug("called before everything else"); }
+ void myFirstTest()
+ { QVERIFY(1 == 1); }
+ void mySecondTest()
+ { QVERIFY(1 != 2); }
+ void cleanupTestCase()
+ { qDebug("called after myFirstTest and mySecondTest"); }
+};
+//! [0]
+
+
+//! [8]
+void TestQString::toUpper()
+{
+ QString str = "Hello";
+ QVERIFY(str.toUpper() == "HELLO");
+}
+//! [8]
+
+
+//! [11]
+QCOMPARE(QString("hello").toUpper(), QString("HELLO"));
+QCOMPARE(QString("Hello").toUpper(), QString("HELLO"));
+QCOMPARE(QString("HellO").toUpper(), QString("HELLO"));
+QCOMPARE(QString("HELLO").toUpper(), QString("HELLO"));
+//! [11]
+
+//! [12]
+class MyFirstBenchmark: public QObject
+{
+ Q_OBJECT
+private slots:
+ void myFirstBenchmark()
+ {
+ QString string1;
+ QString string2;
+ QBENCHMARK {
+ string1.localeAwareCompare(string2);
+ }
+ }
+};
+//! [12]
diff --git a/doc/src/snippets/code/doc_src_qtestlib.pro b/doc/src/snippets/code/doc_src_qtestlib.pro
new file mode 100644
index 0000000..a8fc56a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtestlib.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += testlib
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtestlib.qdoc b/doc/src/snippets/code/doc_src_qtestlib.qdoc
index 80b7d92..92d528e 100644
--- a/doc/src/snippets/code/doc_src_qtestlib.qdoc
+++ b/doc/src/snippets/code/doc_src_qtestlib.qdoc
@@ -38,28 +38,6 @@
**
****************************************************************************/
-//! [0]
-class MyFirstTest: public QObject
-{
- Q_OBJECT
-private slots:
- void initTestCase()
- { qDebug("called before everything else"); }
- void myFirstTest()
- { QVERIFY(1 == 1); }
- void mySecondTest()
- { QVERIFY(1 != 2); }
- void cleanupTestCase()
- { qDebug("called after myFirstTest and mySecondTest"); }
-};
-//! [0]
-
-
-//! [1]
-QT += testlib
-//! [1]
-
-
//! [2]
testname [options] [testfunctions[:testdata]]...
//! [2]
@@ -91,15 +69,6 @@ set LIB=C:\Program Files\Windows CE Tools\wce500\Windows Mobile 5.0 Pocket PC SD
//! [7]
-//! [8]
-void TestQString::toUpper()
-{
- QString str = "Hello";
- QVERIFY(str.toUpper() == "HELLO");
-}
-//! [8]
-
-
//! [9]
/myTestDirectory$ qmake -project "CONFIG += qtestlib"
/myTestDirectory$ qmake
@@ -116,27 +85,3 @@ PASS : TestQString::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped
********* Finished testing of TestQString *********
//! [10]
-
-
-//! [11]
-QCOMPARE(QString("hello").toUpper(), QString("HELLO"));
-QCOMPARE(QString("Hello").toUpper(), QString("HELLO"));
-QCOMPARE(QString("HellO").toUpper(), QString("HELLO"));
-QCOMPARE(QString("HELLO").toUpper(), QString("HELLO"));
-//! [11]
-
-//! [12]
-class MyFirstBenchmark: public QObject
-{
- Q_OBJECT
-private slots:
- void myFirstBenchmark()
- {
- QString string1;
- QString string2;
- QBENCHMARK {
- string1.localeAwareCompare(string2);
- }
- }
-};
-//! [12]
diff --git a/doc/src/snippets/code/doc_src_qtgui.qdoc b/doc/src/snippets/code/doc_src_qtgui.pro
index 370529a..dd3405c 100644
--- a/doc/src/snippets/code/doc_src_qtgui.qdoc
+++ b/doc/src/snippets/code/doc_src_qtgui.pro
@@ -38,6 +38,6 @@
**
****************************************************************************/
-//! [0]
+#! [0]
#include <QtGui>
-//! [0]
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_qthelp.cpp b/doc/src/snippets/code/doc_src_qthelp.cpp
new file mode 100644
index 0000000..2825738
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qthelp.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtHelp>
+//! [0]
+
+//! [6]
+QHelpEngineCore helpEngine("mycollection.qhc");
+...
+
+// get all file references for the identifier
+QMap<QString, QUrl> links =
+ helpEngine.linksForIdentifier(QLatin1String("MyDialog::ChangeButton"));
+
+// If help is available for this keyword, get the help data
+// of the first file reference.
+if (links.count()) {
+ QByteArray helpData = helpEngine->fileData(links.constBegin().value());
+ // show the documentation to the user
+ if (!helpData.isEmpty())
+ displayHelp(helpData);
+}
+//! [6]
+
+
diff --git a/doc/src/snippets/code/doc_src_qthelp.qdoc b/doc/src/snippets/code/doc_src_qthelp.qdoc
index 4ad2100..ff25d19 100644
--- a/doc/src/snippets/code/doc_src_qthelp.qdoc
+++ b/doc/src/snippets/code/doc_src_qthelp.qdoc
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-#include <QtHelp>
-//! [0]
-
-
//! [1]
CONFIG += help
//! [1]
@@ -87,25 +82,6 @@ qcollectiongenerator mycollection.qhcp -o mycollection.qhc
//! [5]
-//! [6]
-QHelpEngineCore helpEngine("mycollection.qhc");
-...
-
-// get all file references for the identifier
-QMap<QString, QUrl> links =
- helpEngine.linksForIdentifier(QLatin1String("MyDialog::ChangeButton"));
-
-// If help is available for this keyword, get the help data
-// of the first file reference.
-if (links.count()) {
- QByteArray helpData = helpEngine->fileData(links.constBegin().value());
- // show the documentation to the user
- if (!helpData.isEmpty())
- displayHelp(helpData);
-}
-//! [6]
-
-
//! [7]
<?xml version="1.0" encoding="UTF-8"?>
<QtHelpProject version="1.0">
diff --git a/doc/src/snippets/code/doc_src_qtmultimedia.qdoc b/doc/src/snippets/code/doc_src_qtmultimedia.cpp
index 76fb9cd..3f25c11 100644
--- a/doc/src/snippets/code/doc_src_qtmultimedia.qdoc
+++ b/doc/src/snippets/code/doc_src_qtmultimedia.cpp
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-QT += multimedia
-//! [0]
-
-
//! [1]
#include <QtMultimedia>
//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtmultimedia.pro b/doc/src/snippets/code/doc_src_qtmultimedia.pro
new file mode 100644
index 0000000..b23c994
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtmultimedia.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+QT += multimedia
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.qdoc b/doc/src/snippets/code/doc_src_qtnetwork.cpp
index 42d1808..7100f1a 100644
--- a/doc/src/snippets/code/doc_src_qtnetwork.qdoc
+++ b/doc/src/snippets/code/doc_src_qtnetwork.cpp
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-QT += network
-//! [0]
-
-
//! [1]
#include <QtNetwork>
//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtnetwork.pro b/doc/src/snippets/code/doc_src_qtnetwork.pro
new file mode 100644
index 0000000..f6c3a5a
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtnetwork.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+QT += network
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_qtopengl.qdoc b/doc/src/snippets/code/doc_src_qtopengl.cpp
index 555d571..088b31b 100644
--- a/doc/src/snippets/code/doc_src_qtopengl.qdoc
+++ b/doc/src/snippets/code/doc_src_qtopengl.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtOpenGL>
//! [0]
-
-
-//! [1]
-QT += opengl
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtopengl.pro b/doc/src/snippets/code/doc_src_qtopengl.pro
new file mode 100644
index 0000000..97fbf28
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtopengl.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += opengl
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtscript.cpp b/doc/src/snippets/code/doc_src_qtscript.cpp
new file mode 100644
index 0000000..de82029
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscript.cpp
@@ -0,0 +1,568 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtScript>
+//! [0]
+
+//! [13]
+Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
+//! [13]
+
+//! [18]
+QScriptValue myQObjectConstructor(QScriptContext *context, QScriptEngine *engine)
+{
+ // let the engine manage the new object's lifetime.
+ return engine->newQObject(new MyQObject(), QScriptEngine::ScriptOwnership);
+}
+//! [18]
+
+
+//! [19]
+class MyObject : public QObject
+{
+ Q_OBJECT
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+private:
+ ....
+
+};
+//! [19]
+
+
+//! [20]
+class MyObject : public QObject
+{
+ Q_OBJECT
+
+ public:
+ Q_INVOKABLE void thisMethodIsInvokableInQtScript();
+ void thisMethodIsNotInvokableInQtScript();
+
+ ...
+};
+//! [20]
+
+
+//! [23]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ // define the enabled property
+ Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+private:
+ ....
+
+};
+//! [23]
+
+
+//! [24]
+Q_PROPERTY(int nonScriptableProperty READ foo WRITE bar SCRIPTABLE false)
+//! [24]
+
+
+//! [25]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ // define the enabled property
+ Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
+
+public:
+ MyObject( ... );
+
+ void aNonScriptableFunction();
+
+public slots: // these functions (slots) will be available in QtScript
+ void calculate( ... );
+ void setEnabled( bool enabled );
+ bool isEnabled() const;
+
+signals: // the signals
+ void enabledChanged( bool newState );
+
+private:
+ ....
+
+};
+//! [25]
+
+
+//! [34]
+QScriptValue Person_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ QString name = context->argument(0).toString();
+ context->thisObject().setProperty("name", name);
+ return engine->undefinedValue();
+}
+//! [34]
+
+
+//! [35]
+QScriptValue Person_prototype_toString(QScriptContext *context, QScriptEngine *engine)
+{
+ QString name = context->thisObject().property("name").toString();
+ QString result = QString::fromLatin1("Person(name: %0)").arg(name);
+ return result;
+}
+//! [35]
+
+
+//! [36]
+QScriptEngine engine;
+QScriptValue ctor = engine.newFunction(Person_ctor);
+ctor.property("prototype").setProperty("toString", engine.newFunction(Person_prototype_toString));
+QScriptValue global = engine.globalObject();
+global.setProperty("Person", ctor);
+//! [36]
+
+
+//! [37]
+QScriptValue Employee_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ QScriptValue super = context->callee().property("prototype").property("constructor");
+ super.call(context->thisObject(), QScriptValueList() << context->argument(0));
+ context->thisObject().setProperty("salary", context->argument(1));
+ return engine->undefinedValue();
+}
+//! [37]
+
+
+//! [38]
+QScriptValue empCtor = engine.newFunction(Employee_ctor);
+empCtor.setProperty("prototype", global.property("Person").construct());
+global.setProperty("Employee", empCtor);
+//! [38]
+
+
+//! [39]
+Q_DECLARE_METATYPE(QPointF)
+Q_DECLARE_METATYPE(QPointF*)
+
+QScriptValue QPointF_prototype_x(QScriptContext *context, QScriptEngine *engine)
+{
+ // Since the point is not to be modified, it's OK to cast to a value here
+ QPointF point = qscriptvalue_cast<QPointF>(context->thisObject());
+ return point.x();
+}
+
+QScriptValue QPointF_prototype_setX(QScriptContext *context, QScriptEngine *engine)
+{
+ // Cast to a pointer to be able to modify the underlying C++ value
+ QPointF *point = qscriptvalue_cast<QPointF*>(context->thisObject());
+ if (!point)
+ return context->throwError(QScriptContext::TypeError, "QPointF.prototype.setX: this object is not a QPointF");
+ point->setX(context->argument(0).toNumber());
+ return engine->undefinedValue();
+}
+//! [39]
+
+
+//! [43]
+class MyObject : public QObject
+{
+ Q_OBJECT
+ ...
+};
+
+Q_DECLARE_METATYPE(MyObject*)
+
+QScriptValue myObjectToScriptValue(QScriptEngine *engine, MyObject* const &in)
+{ return engine->newQObject(in); }
+
+void myObjectFromScriptValue(const QScriptValue &object, MyObject* &out)
+{ out = qobject_cast<MyObject*>(object.toQObject()); }
+
+...
+
+qScriptRegisterMetaType(&engine, myObjectToScriptValue, myObjectFromScriptValue);
+//! [43]
+
+//! [44]
+QScriptValue QPoint_ctor(QScriptContext *context, QScriptEngine *engine)
+{
+ int x = context->argument(0).toInt32();
+ int y = context->argument(1).toInt32();
+ return engine->toScriptValue(QPoint(x, y));
+}
+
+...
+
+engine.globalObject().setProperty("QPoint", engine.newFunction(QPoint_ctor));
+//! [44]
+
+//! [45]
+QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine)
+{
+ QString result;
+ for (int i = 0; i < context->argumentCount(); ++i) {
+ if (i > 0)
+ result.append(" ");
+ result.append(context->argument(i).toString());
+ }
+
+ QScriptValue calleeData = context->callee().data();
+ QPlainTextEdit *edit = qobject_cast<QPlainTextEdit*>(calleeData.toQObject());
+ edit->appendPlainText(result);
+
+ return engine->undefinedValue();
+}
+//! [45]
+
+//! [46]
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ QScriptEngine eng;
+ QPlainTextEdit edit;
+
+ QScriptValue fun = eng.newFunction(myPrintFunction);
+ fun.setData(eng.newQObject(&edit));
+ eng.globalObject().setProperty("print", fun);
+
+ eng.evaluate("print('hello', 'world')");
+
+ edit.show();
+ return app.exec();
+}
+//! [46]
+
+
+//! [47]
+QScriptEngine eng;
+QLineEdit *edit = new QLineEdit(...);
+QScriptValue handler = eng.evaluate("(function(text) { print('text was changed to', text); })");
+qScriptConnect(edit, SIGNAL(textChanged(const QString &)), QScriptValue(), handler);
+//! [47]
+
+//! [48]
+QLineEdit *edit1 = new QLineEdit(...);
+QLineEdit *edit2 = new QLineEdit(...);
+
+QScriptValue handler = eng.evaluate("(function() { print('I am', this.name); })");
+QScriptValue obj1 = eng.newObject();
+obj1.setProperty("name", "the walrus");
+QScriptValue obj2 = eng.newObject();
+obj2.setProperty("name", "Sam");
+
+qScriptConnect(edit1, SIGNAL(returnPressed()), obj1, handler);
+qScriptConnect(edit2, SIGNAL(returnPressed()), obj2, handler);
+//! [48]
+
+//! [52]
+QScriptValue getProperty(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QString name = ctx->argument(0).toString();
+ return ctx->thisObject().property(name);
+}
+//! [52]
+
+//! [53]
+QScriptValue myCompare(QScriptContext *ctx, QScriptEngine *eng)
+{
+ double first = ctx->argument(0).toNumber();
+ double second = ctx->argument(1).toNumber();
+ int result;
+ if (first == second)
+ result = 0;
+ else if (first < second)
+ result = -1;
+ else
+ result = 1;
+ return result;
+}
+//! [53]
+
+//! [54]
+QScriptEngine eng;
+QScriptValue comparefn = eng.newFunction(myCompare);
+QScriptValue array = eng.evaluate("new Array(10, 5, 20, 15, 30)");
+array.property("sort").call(array, QScriptValueList() << comparefn);
+
+// prints "5,10,15,20,30"
+qDebug() << array.toString();
+//! [54]
+
+//! [55]
+QScriptValue rectifier(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QRectF magicRect = qscriptvalue_cast<QRectF>(ctx->callee().data());
+ QRectF sourceRect = qscriptvalue_cast<QRectF>(ctx->argument(0));
+ return eng->toScriptValue(sourceRect.intersected(magicRect));
+}
+
+...
+
+QScriptValue fun = eng.newFunction(rectifier);
+QRectF magicRect = QRectF(10, 20, 30, 40);
+fun.setData(eng.toScriptValue(magicRect));
+eng.globalObject().setProperty("rectifier", fun);
+//! [55]
+
+//! [58]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [58]
+
+//! [62]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ if (ctx->argumentCount() != 2)
+ return ctx->throwError("add() takes exactly two arguments");
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [62]
+
+//! [63]
+QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
+{
+ if (ctx->argumentCount() != 2)
+ return ctx->throwError("add() takes exactly two arguments");
+ if (!ctx->argument(0).isNumber())
+ return ctx->throwError(QScriptContext::TypeError, "add(): first argument is not a number");
+ if (!ctx->argument(1).isNumber())
+ return ctx->throwError(QScriptContext::TypeError, "add(): second argument is not a number");
+ double a = ctx->argument(0).toNumber();
+ double b = ctx->argument(1).toNumber();
+ return a + b;
+}
+//! [63]
+
+//! [65]
+QScriptValue concat(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QString result = "";
+ for (int i = 0; i < ctx->argumentCount(); ++i)
+ result += ctx->argument(i).toString();
+ return result;
+}
+//! [65]
+
+//! [67]
+QScriptValue sort(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue comparefn = ctx->argument(0);
+ if (comparefn.isUndefined())
+ comparefn = /* the built-in comparison function */;
+ else if (!comparefn.isFunction())
+ return ctx->throwError(QScriptContext::TypeError, "sort(): argument is not a function");
+ ...
+}
+//! [67]
+
+//! [69]
+QScriptValue foo(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue bar = eng->globalObject().property("bar");
+ QScriptValue arguments = ctx->argumentsObject();
+ qDebug() << "calling bar() with" << arguments.property("length").toInt32() << "arguments";
+ QScriptValue result = bar.apply(ctx->thisObject(), arguments);
+ qDebug() << "bar() returned" << result.toString();
+ return result;
+}
+//! [69]
+
+//! [72]
+QScriptValue counter(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue act = ctx->activationObject();
+ act.setProperty("count", 0);
+ QScriptValue result = eng->newFunction(counter_inner);
+ result.setScope(act);
+ return result;
+}
+//! [72]
+
+//! [73]
+QScriptValue counter_inner(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue outerAct = ctx->callee().scope();
+ double count = outerAct.property("count").toNumber();
+ outerAct.setProperty("count", count+1);
+ return count;
+}
+//! [73]
+
+//! [74]
+QScriptValue counter_hybrid(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue act = ctx->activationObject();
+ act.setProperty("count", 0);
+ return eng->evaluate("(function() { return count++; })");
+}
+//! [74]
+
+//! [76]
+QScriptValue Person_ctor(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue object;
+ if (ctx->isCalledAsConstructor()) {
+ object = ctx->thisObject();
+ } else {
+ object = eng->newObject();
+ object.setPrototype(ctx->callee().property("prototype"));
+ }
+ object.setProperty("name", ctx->argument(0));
+ return object;
+}
+//! [76]
+
+//! [77]
+QScriptContext *ctx = eng.pushContext();
+QScriptValue act = ctx->activationObject();
+act.setProperty("digit", 7);
+
+qDebug() << eng.evaluate("digit + 1").toNumber(); // 8
+
+eng.popContext();
+//! [77]
+
+//! [78]
+QScriptValue getSet(QScriptContext *ctx, QScriptEngine *eng)
+{
+ QScriptValue obj = ctx->thisObject();
+ QScriptValue data = obj.data();
+ if (!data.isValid()) {
+ data = eng->newObject();
+ obj.setData(data);
+ }
+ QScriptValue result;
+ if (ctx->argumentCount() == 1) {
+ QString str = ctx->argument(0).toString();
+ str.replace("Roberta", "Ken");
+ result = str;
+ data.setProperty("x", result);
+ } else {
+ result = data.property("x");
+ }
+ return result;
+}
+//! [78]
+
+//! [79]
+QScriptEngine eng;
+QScriptValue obj = eng.newObject();
+obj.setProperty("x", eng.newFunction(getSet),
+ QScriptValue::PropertyGetter|QScriptValue::PropertySetter);
+//! [79]
+
+//! [91]
+QScriptValue object = engine.evaluate("({ unitName: 'Celsius', toKelvin: function(x) { return x + 273; } })");
+QScriptValue toKelvin = object.property("toKelvin");
+QScriptValue result = toKelvin.call(object, QScriptValueList() << 100);
+qDebug() << result.toNumber(); // 373
+//! [91]
+
+//! [92]
+QScriptValue add = engine.globalObject().property("add");
+qDebug() << add.call(QScriptValue(), QScriptValueList() << 1 << 2).toNumber(); // 3
+//! [92]
+
+//! [93]
+typedef QSharedPointer<QXmlStreamReader> XmlStreamReaderPointer;
+
+Q_DECLARE_METATYPE(XmlStreamReaderPointer)
+
+QScriptValue constructXmlStreamReader(QScriptContext *context, QScriptEngine *engine)
+{
+ if (!context->isCalledAsConstructor())
+ return context->throwError(QScriptContext::SyntaxError, "please use the 'new' operator");
+
+ QIODevice *device = qobject_cast<QIODevice*>(context->argument(0).toQObject());
+ if (!device)
+ return context->throwError(QScriptContext::TypeError, "please supply a QIODevice as first argument");
+
+ // Create the C++ object
+ QXmlStreamReader *reader = new QXmlStreamReader(device);
+
+ XmlStreamReaderPointer pointer(reader);
+
+ // store the shared pointer in the script object that we are constructing
+ return engine->newVariant(context->thisObject(), QVariant::fromValue(pointer));
+}
+//! [93]
+
+//! [94]
+QScriptValue xmlStreamReader_atEnd(QScriptContext *context, QScriptEngine *)
+{
+ XmlStreamReaderPointer reader = qscriptvalue_cast<XmlStreamReaderPointer>(context->thisObject());
+ if (!reader)
+ return context->throwError(QScriptContext::TypeError, "this object is not an XmlStreamReader");
+ return reader->atEnd();
+}
+//! [94]
+
+//! [95]
+ QScriptEngine engine;
+ QScriptValue xmlStreamReaderProto = engine.newObject();
+ xmlStreamReaderProto.setProperty("atEnd", engine.newFunction(xmlStreamReader_atEnd));
+
+ QScriptValue xmlStreamReaderCtor = engine.newFunction(constructXmlStreamReader, xmlStreamReaderProto);
+ engine.globalObject().setProperty("XmlStreamReader", xmlStreamReaderCtor);
+//! [95]
diff --git a/doc/src/snippets/code/doc_src_qtscript.js b/doc/src/snippets/code/doc_src_qtscript.js
new file mode 100644
index 0000000..fe1f9b9
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscript.js
@@ -0,0 +1,444 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [2]
+function myInterestingScriptFunction() {
+ // ...
+}
+// ...
+myQObject.somethingChanged.connect(myInterestingScriptFunction);
+//! [2]
+
+
+//! [3]
+myQObject.somethingChanged.connect(myOtherQObject.doSomething);
+//! [3]
+
+
+//! [4]
+myQObject.somethingChanged.disconnect(myInterestingFunction);
+myQObject.somethingChanged.disconnect(myOtherQObject.doSomething);
+//! [4]
+
+
+//! [5]
+var obj = { x: 123 };
+var fun = function() { print(this.x); };
+myQObject.somethingChanged.connect(obj, fun);
+//! [5]
+
+
+//! [6]
+myQObject.somethingChanged.disconnect(obj, fun);
+//! [6]
+
+
+//! [7]
+var obj = { x: 123, fun: function() { print(this.x); } };
+myQObject.somethingChanged.connect(obj, "fun");
+//! [7]
+
+
+//! [8]
+myQObject.somethingChanged.disconnect(obj, "fun");
+//! [8]
+
+
+//! [9]
+try {
+ myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist");
+} catch (e) {
+ print(e);
+}
+//! [9]
+
+
+//! [10]
+myQObject.somethingChanged("hello");
+//! [10]
+
+
+//! [11]
+myQObject.myOverloadedSlot(10); // will call the int overload
+myQObject.myOverloadedSlot("10"); // will call the QString overload
+//! [11]
+
+
+//! [12]
+myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int
+myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string
+//! [12]
+
+
+//! [14]
+myQObject.enabled = true;
+
+// ...
+
+myQObject.enabled = !myQObject.enabled;
+//! [14]
+
+
+//! [15]
+myDialog.okButton
+//! [15]
+
+
+//! [16]
+myDialog.okButton.objectName = "cancelButton";
+// from now on, myDialog.cancelButton references the button
+//! [16]
+
+
+//! [17]
+var okButton = myDialog.findChild("okButton");
+if (okButton != null) {
+ // do something with the OK button
+}
+
+var buttons = myDialog.findChildren(RegExp("button[0-9]+"));
+for (var i = 0; i < buttons.length; ++i) {
+ // do something with buttons[i]
+}
+//! [17]
+
+
+//! [21]
+var obj = new MyObject;
+obj.setEnabled( true );
+print( "obj is enabled: " + obj.isEnabled() );
+//! [21]
+
+
+//! [22]
+var obj = new MyObject;
+obj.enabled = true;
+print( "obj is enabled: " + obj.enabled );
+//! [22]
+
+
+//! [26]
+function enabledChangedHandler( b )
+{
+ print( "state changed to: " + b );
+}
+
+function init()
+{
+ var obj = new MyObject();
+ // connect a script function to the signal
+ obj["enabledChanged(bool)"].connect(enabledChangedHandler);
+ obj.enabled = true;
+ print( "obj is enabled: " + obj.enabled );
+}
+//! [26]
+
+
+//! [27]
+var o = new Object();
+o.foo = 123;
+print(o.hasOwnProperty('foo')); // true
+print(o.hasOwnProperty('bar')); // false
+print(o); // calls o.toString(), which returns "[object Object]"
+//! [27]
+
+
+//! [28]
+function Person(name)
+{
+ this.name = name;
+}
+//! [28]
+
+
+//! [29]
+Person.prototype.toString = function() { return "Person(name: " + this.name + ")"; }
+//! [29]
+
+
+//! [30]
+var p1 = new Person("John Doe");
+var p2 = new Person("G.I. Jane");
+print(p1); // "Person(name: John Doe)"
+print(p2); // "Person(name: G.I. Jane)"
+//! [30]
+
+
+//! [31]
+print(p1.hasOwnProperty('name')); // 'name' is an instance variable, so this returns true
+print(p1.hasOwnProperty('toString')); // returns false; inherited from prototype
+print(p1 instanceof Person); // true
+print(p1 instanceof Object); // true
+//! [31]
+
+
+//! [32]
+function Employee(name, salary)
+{
+ Person.call(this, name); // call base constructor
+
+ this.salary = salary;
+}
+
+// set the prototype to be an instance of the base class
+Employee.prototype = new Person();
+
+// initialize prototype
+Employee.prototype.toString = function() {
+ // ...
+}
+//! [32]
+
+
+//! [33]
+var e = new Employee("Johnny Bravo", 5000000);
+print(e instanceof Employee); // true
+print(e instanceof Person); // true
+print(e instanceof Object); // true
+print(e instanceof Array); // false
+//! [33]
+
+
+//! [40]
+var o = new Object();
+(o.__proto__ === Object.prototype); // this evaluates to true
+//! [40]
+
+
+//! [41]
+var o = new Object();
+o.__defineGetter__("x", function() { return 123; });
+var y = o.x; // 123
+//! [41]
+
+
+//! [42]
+var o = new Object();
+o.__defineSetter__("x", function(v) { print("and the value is:", v); });
+o.x = 123; // will print "and the value is: 123"
+//! [42]
+
+
+//! [49]
+var getProperty = function(name) { return this[name]; };
+
+name = "Global Object"; // creates a global variable
+print(getProperty("name")); // "Global Object"
+
+var myObject = { name: 'My Object' };
+print(getProperty.call(myObject, "name")); // "My Object"
+
+myObject.getProperty = getProperty;
+print(myObject.getProperty("name")); // "My Object"
+
+getProperty.name = "The getProperty() function";
+getProperty.getProperty = getProperty;
+getProperty.getProperty("name"); // "The getProperty() function"
+//! [49]
+
+//! [50]
+var o = { a: 1, b: 2, sum: function() { return a + b; } };
+print(o.sum()); // reference error, or sum of global variables a and b!!
+//! [50]
+
+//! [51]
+var o = { a: 1, b: 2, sum: function() { return this.a + this.b; } };
+print(o.sum()); // 3
+//! [51]
+
+//! [56]
+function add(a, b) {
+ return a + b;
+}
+//! [56]
+
+//! [57]
+function add() {
+ return arguments[0] + arguments[1];
+}
+//! [57]
+
+//! [59]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ return arguments[0] + arguments[1];
+}
+//! [59]
+
+//! [60]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ if (typeof arguments[0] != "number")
+ throw TypeError("add(): first argument is not a number");
+ if (typeof arguments[1] != "number")
+ throw TypeError("add(): second argument is not a number");
+ return arguments[0] + arguments[1];
+}
+//! [60]
+
+//! [61]
+function add() {
+ if (arguments.length != 2)
+ throw Error("add() takes exactly two arguments");
+ return Number(arguments[0]) + Number(arguments[1]);
+}
+//! [61]
+
+//! [64]
+function concat() {
+ var result = "";
+ for (var i = 0; i < arguments.length; ++i)
+ result += String(arguments[i]);
+ return result;
+}
+//! [64]
+
+//! [66]
+function sort(comparefn) {
+ if (comparefn == undefined)
+ comparefn = fn; /* replace fn with the built-in comparison function */
+ else if (typeof comparefn != "function")
+ throw TypeError("sort(): argument must be a function");
+ // ...
+}
+//! [66]
+
+//! [68]
+function foo() {
+ // Let bar() take care of this.
+ print("calling bar() with " + arguments.length + "arguments");
+ var result = bar.apply(this, arguments);
+ print("bar() returned" + result);
+ return result;
+}
+//! [68]
+
+//! [70]
+function counter() {
+ var count = 0;
+ return function() {
+ return count++;
+ }
+}
+//! [70]
+
+//! [71]
+var c1 = counter(); // create a new counter function
+var c2 = counter(); // create a new counter function
+print(c1()); // 0
+print(c1()); // 1
+print(c2()); // 0
+print(c2()); // 1
+//! [71]
+
+//! [75]
+function Book(isbn) {
+ this.isbn = isbn;
+}
+
+var coolBook1 = new Book("978-0131872493");
+var coolBook2 = new Book("978-1593271473");
+//! [75]
+
+//! [80]
+obj.x = "Roberta sent me";
+print(obj.x); // "Ken sent me"
+obj.x = "I sent the bill to Roberta";
+print(obj.x); // "I sent the bill to Ken"
+//! [80]
+
+//! [81]
+obj = {};
+obj.__defineGetter__("x", function() { return this._x; });
+obj.__defineSetter__("x", function(v) { print("setting x to", v); this._x = v; });
+obj.x = 123;
+//! [81]
+
+//! [82]
+myButton.text = qsTr("Hello world!");
+//! [82]
+
+//! [83]
+myButton.text = qsTranslate("MyAwesomeScript", "Hello world!");
+//! [83]
+
+//! [84]
+FriendlyConversation.prototype.greeting = function(type)
+{
+ if (FriendlyConversation['greeting_strings'] == undefined) {
+ FriendlyConversation['greeting_strings'] = [
+ QT_TR_NOOP("Hello"),
+ QT_TR_NOOP("Goodbye")
+ ];
+ }
+ return qsTr(FriendlyConversation.greeting_strings[type]);
+}
+//! [84]
+
+//! [85]
+FriendlyConversation.prototype.greeting = function(type)
+{
+ if (FriendlyConversation['greeting_strings'] == undefined) {
+ FriendlyConversation['greeting_strings'] = [
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
+ QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
+ ];
+ }
+ return qsTranslate("FriendlyConversation", FriendlyConversation.greeting_strings[type]);
+}
+//! [85]
+
+//! [86]
+FileCopier.prototype.showProgress = function(done, total, currentFileName)
+{
+ this.label.text = qsTr("%1 of %2 files copied.\nCopying: %3")
+ .arg(done)
+ .arg(total)
+ .arg(currentFileName);
+}
+//! [86]
+
+//! [90]
+({ unitName: "Celsius",
+ toKelvin: function(x) { return x + 273; }
+ })
+//! [90]
diff --git a/doc/src/snippets/code/doc_src_qtscript.pro b/doc/src/snippets/code/doc_src_qtscript.pro
new file mode 100644
index 0000000..ce687d7
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscript.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += script
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtscript.qdoc b/doc/src/snippets/code/doc_src_qtscript.qdoc
index 1ba097a..b65311f 100644
--- a/doc/src/snippets/code/doc_src_qtscript.qdoc
+++ b/doc/src/snippets/code/doc_src_qtscript.qdoc
@@ -38,882 +38,6 @@
**
****************************************************************************/
-//! [0]
-#include <QtScript>
-//! [0]
-
-
-//! [1]
-QT += script
-//! [1]
-
-
-//! [2]
-function myInterestingScriptFunction() { ... }
-...
-myQObject.somethingChanged.connect(myInterestingScriptFunction);
-//! [2]
-
-
-//! [3]
-myQObject.somethingChanged.connect(myOtherQObject.doSomething);
-//! [3]
-
-
-//! [4]
-myQObject.somethingChanged.disconnect(myInterestingFunction);
-myQObject.somethingChanged.disconnect(myOtherQObject.doSomething);
-//! [4]
-
-
-//! [5]
-var obj = { x: 123 };
-var fun = function() { print(this.x); };
-myQObject.somethingChanged.connect(obj, fun);
-//! [5]
-
-
-//! [6]
-myQObject.somethingChanged.disconnect(obj, fun);
-//! [6]
-
-
-//! [7]
-var obj = { x: 123, fun: function() { print(this.x); } };
-myQObject.somethingChanged.connect(obj, "fun");
-//! [7]
-
-
-//! [8]
-myQObject.somethingChanged.disconnect(obj, "fun");
-//! [8]
-
-
-//! [9]
-try {
- myQObject.somethingChanged.connect(myQObject, "slotThatDoesntExist");
-} catch (e) {
- print(e);
-}
-//! [9]
-
-
-//! [10]
-myQObject.somethingChanged("hello");
-//! [10]
-
-
-//! [11]
-myQObject.myOverloadedSlot(10); // will call the int overload
-myQObject.myOverloadedSlot("10"); // will call the QString overload
-//! [11]
-
-
-//! [12]
-myQObject['myOverloadedSlot(int)']("10"); // call int overload; the argument is converted to an int
-myQObject['myOverloadedSlot(QString)'](10); // call QString overload; the argument is converted to a string
-//! [12]
-
-
-//! [13]
-Q_PROPERTY(bool enabled READ enabled WRITE setEnabled)
-//! [13]
-
-
-//! [14]
-myQObject.enabled = true;
-
-...
-
-myQObject.enabled = !myQObject.enabled;
-//! [14]
-
-
-//! [15]
-myDialog.okButton
-//! [15]
-
-
-//! [16]
-myDialog.okButton.objectName = "cancelButton";
-// from now on, myDialog.cancelButton references the button
-//! [16]
-
-
-//! [17]
-var okButton = myDialog.findChild("okButton");
-if (okButton != null) {
- // do something with the OK button
-}
-
-var buttons = myDialog.findChildren(RegExp("button[0-9]+"));
-for (var i = 0; i < buttons.length; ++i) {
- // do something with buttons[i]
-}
-//! [17]
-
-
-//! [18]
-QScriptValue myQObjectConstructor(QScriptContext *context, QScriptEngine *engine)
-{
- // let the engine manage the new object's lifetime.
- return engine->newQObject(new MyQObject(), QScriptEngine::ScriptOwnership);
-}
-//! [18]
-
-
-//! [19]
-class MyObject : public QObject
-{
- Q_OBJECT
-
-public:
- MyObject( ... );
-
- void aNonScriptableFunction();
-
-public slots: // these functions (slots) will be available in QtScript
- void calculate( ... );
- void setEnabled( bool enabled );
- bool isEnabled() const;
-
-private:
- ....
-
-};
-//! [19]
-
-
-//! [20]
-class MyObject : public QObject
-{
- Q_OBJECT
-
- public:
- Q_INVOKABLE void thisMethodIsInvokableInQtScript();
- void thisMethodIsNotInvokableInQtScript();
-
- ...
-};
-//! [20]
-
-
-//! [21]
-var obj = new MyObject;
-obj.setEnabled( true );
-print( "obj is enabled: " + obj.isEnabled() );
-//! [21]
-
-
-//! [22]
-var obj = new MyObject;
-obj.enabled = true;
-print( "obj is enabled: " + obj.enabled );
-//! [22]
-
-
-//! [23]
-class MyObject : public QObject
-{
- Q_OBJECT
- // define the enabled property
- Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
-
-public:
- MyObject( ... );
-
- void aNonScriptableFunction();
-
-public slots: // these functions (slots) will be available in QtScript
- void calculate( ... );
- void setEnabled( bool enabled );
- bool isEnabled() const;
-
-private:
- ....
-
-};
-//! [23]
-
-
-//! [24]
-Q_PROPERTY(int nonScriptableProperty READ foo WRITE bar SCRIPTABLE false)
-//! [24]
-
-
-//! [25]
-class MyObject : public QObject
-{
- Q_OBJECT
- // define the enabled property
- Q_PROPERTY( bool enabled WRITE setEnabled READ isEnabled )
-
-public:
- MyObject( ... );
-
- void aNonScriptableFunction();
-
-public slots: // these functions (slots) will be available in QtScript
- void calculate( ... );
- void setEnabled( bool enabled );
- bool isEnabled() const;
-
-signals: // the signals
- void enabledChanged( bool newState );
-
-private:
- ....
-
-};
-//! [25]
-
-
-//! [26]
-function enabledChangedHandler( b )
-{
- print( "state changed to: " + b );
-}
-
-function init()
-{
- var obj = new MyObject();
- // connect a script function to the signal
- obj["enabledChanged(bool)"].connect(enabledChangedHandler);
- obj.enabled = true;
- print( "obj is enabled: " + obj.enabled );
-}
-//! [26]
-
-
-//! [27]
-var o = new Object();
-o.foo = 123;
-print(o.hasOwnProperty('foo')); // true
-print(o.hasOwnProperty('bar')); // false
-print(o); // calls o.toString(), which returns "[object Object]"
-//! [27]
-
-
-//! [28]
-function Person(name)
-{
- this.name = name;
-}
-//! [28]
-
-
-//! [29]
-Person.prototype.toString = function() { return "Person(name: " + this.name + ")"; }
-//! [29]
-
-
-//! [30]
-var p1 = new Person("John Doe");
-var p2 = new Person("G.I. Jane");
-print(p1); // "Person(name: John Doe)"
-print(p2); // "Person(name: G.I. Jane)"
-//! [30]
-
-
-//! [31]
-print(p1.hasOwnProperty('name')); // 'name' is an instance variable, so this returns true
-print(p1.hasOwnProperty('toString')); // returns false; inherited from prototype
-print(p1 instanceof Person); // true
-print(p1 instanceof Object); // true
-//! [31]
-
-
-//! [32]
-function Employee(name, salary)
-{
- Person.call(this, name); // call base constructor
-
- this.salary = salary;
-}
-
-// set the prototype to be an instance of the base class
-Employee.prototype = new Person();
-
-// initialize prototype
-Employee.prototype.toString = function() { ... }
-//! [32]
-
-
-//! [33]
-var e = new Employee("Johnny Bravo", 5000000);
-print(e instanceof Employee); // true
-print(e instanceof Person); // true
-print(e instanceof Object); // true
-print(e instanceof Array); // false
-//! [33]
-
-
-//! [34]
-QScriptValue Person_ctor(QScriptContext *context, QScriptEngine *engine)
-{
- QString name = context->argument(0).toString();
- context->thisObject().setProperty("name", name);
- return engine->undefinedValue();
-}
-//! [34]
-
-
-//! [35]
-QScriptValue Person_prototype_toString(QScriptContext *context, QScriptEngine *engine)
-{
- QString name = context->thisObject().property("name").toString();
- QString result = QString::fromLatin1("Person(name: %0)").arg(name);
- return result;
-}
-//! [35]
-
-
-//! [36]
-QScriptEngine engine;
-QScriptValue ctor = engine.newFunction(Person_ctor);
-ctor.property("prototype").setProperty("toString", engine.newFunction(Person_prototype_toString));
-QScriptValue global = engine.globalObject();
-global.setProperty("Person", ctor);
-//! [36]
-
-
-//! [37]
-QScriptValue Employee_ctor(QScriptContext *context, QScriptEngine *engine)
-{
- QScriptValue super = context->callee().property("prototype").property("constructor");
- super.call(context->thisObject(), QScriptValueList() << context->argument(0));
- context->thisObject().setProperty("salary", context->argument(1));
- return engine->undefinedValue();
-}
-//! [37]
-
-
-//! [38]
-QScriptValue empCtor = engine.newFunction(Employee_ctor);
-empCtor.setProperty("prototype", global.property("Person").construct());
-global.setProperty("Employee", empCtor);
-//! [38]
-
-
-//! [39]
-Q_DECLARE_METATYPE(QPointF)
-Q_DECLARE_METATYPE(QPointF*)
-
-QScriptValue QPointF_prototype_x(QScriptContext *context, QScriptEngine *engine)
-{
- // Since the point is not to be modified, it's OK to cast to a value here
- QPointF point = qscriptvalue_cast<QPointF>(context->thisObject());
- return point.x();
-}
-
-QScriptValue QPointF_prototype_setX(QScriptContext *context, QScriptEngine *engine)
-{
- // Cast to a pointer to be able to modify the underlying C++ value
- QPointF *point = qscriptvalue_cast<QPointF*>(context->thisObject());
- if (!point)
- return context->throwError(QScriptContext::TypeError, "QPointF.prototype.setX: this object is not a QPointF");
- point->setX(context->argument(0).toNumber());
- return engine->undefinedValue();
-}
-//! [39]
-
-
-//! [40]
-var o = new Object();
-(o.__proto__ === Object.prototype); // this evaluates to true
-//! [40]
-
-
-//! [41]
-var o = new Object();
-o.__defineGetter__("x", function() { return 123; });
-var y = o.x; // 123
-//! [41]
-
-
-//! [42]
-var o = new Object();
-o.__defineSetter__("x", function(v) { print("and the value is:", v); });
-o.x = 123; // will print "and the value is: 123"
-//! [42]
-
-
-//! [43]
-class MyObject : public QObject
-{
- Q_OBJECT
- ...
-};
-
-Q_DECLARE_METATYPE(MyObject*)
-
-QScriptValue myObjectToScriptValue(QScriptEngine *engine, MyObject* const &in)
-{ return engine->newQObject(in); }
-
-void myObjectFromScriptValue(const QScriptValue &object, MyObject* &out)
-{ out = qobject_cast<MyObject*>(object.toQObject()); }
-
-...
-
-qScriptRegisterMetaType(&engine, myObjectToScriptValue, myObjectFromScriptValue);
-//! [43]
-
-//! [44]
-QScriptValue QPoint_ctor(QScriptContext *context, QScriptEngine *engine)
-{
- int x = context->argument(0).toInt32();
- int y = context->argument(1).toInt32();
- return engine->toScriptValue(QPoint(x, y));
-}
-
-...
-
-engine.globalObject().setProperty("QPoint", engine.newFunction(QPoint_ctor));
-//! [44]
-
-//! [45]
-QScriptValue myPrintFunction(QScriptContext *context, QScriptEngine *engine)
-{
- QString result;
- for (int i = 0; i < context->argumentCount(); ++i) {
- if (i > 0)
- result.append(" ");
- result.append(context->argument(i).toString());
- }
-
- QScriptValue calleeData = context->callee().data();
- QPlainTextEdit *edit = qobject_cast<QPlainTextEdit*>(calleeData.toQObject());
- edit->appendPlainText(result);
-
- return engine->undefinedValue();
-}
-//! [45]
-
-//! [46]
-int main(int argc, char **argv)
-{
- QApplication app(argc, argv);
-
- QScriptEngine eng;
- QPlainTextEdit edit;
-
- QScriptValue fun = eng.newFunction(myPrintFunction);
- fun.setData(eng.newQObject(&edit));
- eng.globalObject().setProperty("print", fun);
-
- eng.evaluate("print('hello', 'world')");
-
- edit.show();
- return app.exec();
-}
-//! [46]
-
-
-//! [47]
-QScriptEngine eng;
-QLineEdit *edit = new QLineEdit(...);
-QScriptValue handler = eng.evaluate("(function(text) { print('text was changed to', text); })");
-qScriptConnect(edit, SIGNAL(textChanged(const QString &)), QScriptValue(), handler);
-//! [47]
-
-//! [48]
-QLineEdit *edit1 = new QLineEdit(...);
-QLineEdit *edit2 = new QLineEdit(...);
-
-QScriptValue handler = eng.evaluate("(function() { print('I am', this.name); })");
-QScriptValue obj1 = eng.newObject();
-obj1.setProperty("name", "the walrus");
-QScriptValue obj2 = eng.newObject();
-obj2.setProperty("name", "Sam");
-
-qScriptConnect(edit1, SIGNAL(returnPressed()), obj1, handler);
-qScriptConnect(edit2, SIGNAL(returnPressed()), obj2, handler);
-//! [48]
-
-//! [49]
-var getProperty = function(name) { return this[name]; };
-
-name = "Global Object"; // creates a global variable
-print(getProperty("name")); // "Global Object"
-
-var myObject = { name: 'My Object' };
-print(getProperty.call(myObject, "name")); // "My Object"
-
-myObject.getProperty = getProperty;
-print(myObject.getProperty("name")); // "My Object"
-
-getProperty.name = "The getProperty() function";
-getProperty.getProperty = getProperty;
-getProperty.getProperty("name"); // "The getProperty() function"
-//! [49]
-
-//! [50]
-var o = { a: 1, b: 2, sum: function() { return a + b; } };
-print(o.sum()); // reference error, or sum of global variables a and b!!
-//! [50]
-
-//! [51]
-var o = { a: 1, b: 2, sum: function() { return this.a + this.b; } };
-print(o.sum()); // 3
-//! [51]
-
-//! [52]
-QScriptValue getProperty(QScriptContext *ctx, QScriptEngine *eng)
-{
- QString name = ctx->argument(0).toString();
- return ctx->thisObject().property(name);
-}
-//! [52]
-
-//! [53]
-QScriptValue myCompare(QScriptContext *ctx, QScriptEngine *eng)
-{
- double first = ctx->argument(0).toNumber();
- double second = ctx->argument(1).toNumber();
- int result;
- if (first == second)
- result = 0;
- else if (first < second)
- result = -1;
- else
- result = 1;
- return result;
-}
-//! [53]
-
-//! [54]
-QScriptEngine eng;
-QScriptValue comparefn = eng.newFunction(myCompare);
-QScriptValue array = eng.evaluate("new Array(10, 5, 20, 15, 30)");
-array.property("sort").call(array, QScriptValueList() << comparefn);
-
-// prints "5,10,15,20,30"
-qDebug() << array.toString();
-//! [54]
-
-//! [55]
-QScriptValue rectifier(QScriptContext *ctx, QScriptEngine *eng)
-{
- QRectF magicRect = qscriptvalue_cast<QRectF>(ctx->callee().data());
- QRectF sourceRect = qscriptvalue_cast<QRectF>(ctx->argument(0));
- return eng->toScriptValue(sourceRect.intersected(magicRect));
-}
-
-...
-
-QScriptValue fun = eng.newFunction(rectifier);
-QRectF magicRect = QRectF(10, 20, 30, 40);
-fun.setData(eng.toScriptValue(magicRect));
-eng.globalObject().setProperty("rectifier", fun);
-//! [55]
-
-//! [56]
-function add(a, b) {
- return a + b;
-}
-//! [56]
-
-//! [57]
-function add() {
- return arguments[0] + arguments[1];
-}
-//! [57]
-
-//! [58]
-QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
-{
- double a = ctx->argument(0).toNumber();
- double b = ctx->argument(1).toNumber();
- return a + b;
-}
-//! [58]
-
-//! [59]
-function add() {
- if (arguments.length != 2)
- throw Error("add() takes exactly two arguments");
- return arguments[0] + arguments[1];
-}
-//! [59]
-
-//! [60]
-function add() {
- if (arguments.length != 2)
- throw Error("add() takes exactly two arguments");
- if (typeof arguments[0] != "number")
- throw TypeError("add(): first argument is not a number");
- if (typeof arguments[1] != "number")
- throw TypeError("add(): second argument is not a number");
- return arguments[0] + arguments[1];
-}
-//! [60]
-
-//! [61]
-function add() {
- if (arguments.length != 2)
- throw Error("add() takes exactly two arguments");
- return Number(arguments[0]) + Number(arguments[1]);
-}
-//! [61]
-
-//! [62]
-QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
-{
- if (ctx->argumentCount() != 2)
- return ctx->throwError("add() takes exactly two arguments");
- double a = ctx->argument(0).toNumber();
- double b = ctx->argument(1).toNumber();
- return a + b;
-}
-//! [62]
-
-//! [63]
-QScriptValue add(QScriptContext *ctx, QScriptEngine *eng)
-{
- if (ctx->argumentCount() != 2)
- return ctx->throwError("add() takes exactly two arguments");
- if (!ctx->argument(0).isNumber())
- return ctx->throwError(QScriptContext::TypeError, "add(): first argument is not a number");
- if (!ctx->argument(1).isNumber())
- return ctx->throwError(QScriptContext::TypeError, "add(): second argument is not a number");
- double a = ctx->argument(0).toNumber();
- double b = ctx->argument(1).toNumber();
- return a + b;
-}
-//! [63]
-
-//! [64]
-function concat() {
- var result = "";
- for (var i = 0; i < arguments.length; ++i)
- result += String(arguments[i]);
- return result;
-}
-//! [64]
-
-//! [65]
-QScriptValue concat(QScriptContext *ctx, QScriptEngine *eng)
-{
- QString result = "";
- for (int i = 0; i < ctx->argumentCount(); ++i)
- result += ctx->argument(i).toString();
- return result;
-}
-//! [65]
-
-//! [66]
-function sort(comparefn) {
- if (comparefn == undefined)
- comparefn = /* the built-in comparison function */;
- else if (typeof comparefn != "function")
- throw TypeError("sort(): argument must be a function");
- ...
-}
-//! [66]
-
-//! [67]
-QScriptValue sort(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue comparefn = ctx->argument(0);
- if (comparefn.isUndefined())
- comparefn = /* the built-in comparison function */;
- else if (!comparefn.isFunction())
- return ctx->throwError(QScriptContext::TypeError, "sort(): argument is not a function");
- ...
-}
-//! [67]
-
-//! [68]
-function foo() {
- // Let bar() take care of this.
- print("calling bar() with " + arguments.length + "arguments");
- var result = return bar.apply(this, arguments);
- print("bar() returned" + result);
- return result;
-}
-//! [68]
-
-//! [69]
-QScriptValue foo(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue bar = eng->globalObject().property("bar");
- QScriptValue arguments = ctx->argumentsObject();
- qDebug() << "calling bar() with" << arguments.property("length").toInt32() << "arguments";
- QScriptValue result = bar.apply(ctx->thisObject(), arguments);
- qDebug() << "bar() returned" << result.toString();
- return result;
-}
-//! [69]
-
-//! [70]
-function counter() {
- var count = 0;
- return function() {
- return count++;
- }
-}
-//! [70]
-
-//! [71]
-var c1 = counter(); // create a new counter function
-var c2 = counter(); // create a new counter function
-print(c1()); // 0
-print(c1()); // 1
-print(c2()); // 0
-print(c2()); // 1
-//! [71]
-
-//! [72]
-QScriptValue counter(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue act = ctx->activationObject();
- act.setProperty("count", 0);
- QScriptValue result = eng->newFunction(counter_inner);
- result.setScope(act);
- return result;
-}
-//! [72]
-
-//! [73]
-QScriptValue counter_inner(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue outerAct = ctx->callee().scope();
- double count = outerAct.property("count").toNumber();
- outerAct.setProperty("count", count+1);
- return count;
-}
-//! [73]
-
-//! [74]
-QScriptValue counter_hybrid(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue act = ctx->activationObject();
- act.setProperty("count", 0);
- return eng->evaluate("(function() { return count++; })");
-}
-//! [74]
-
-//! [75]
-function Book(isbn) {
- this.isbn = isbn;
-}
-
-var coolBook1 = new Book("978-0131872493");
-var coolBook2 = new Book("978-1593271473");
-//! [75]
-
-//! [76]
-QScriptValue Person_ctor(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue object;
- if (ctx->isCalledAsConstructor()) {
- object = ctx->thisObject();
- } else {
- object = eng->newObject();
- object.setPrototype(ctx->callee().property("prototype"));
- }
- object.setProperty("name", ctx->argument(0));
- return object;
-}
-//! [76]
-
-//! [77]
-QScriptContext *ctx = eng.pushContext();
-QScriptValue act = ctx->activationObject();
-act.setProperty("digit", 7);
-
-qDebug() << eng.evaluate("digit + 1").toNumber(); // 8
-
-eng.popContext();
-//! [77]
-
-//! [78]
-QScriptValue getSet(QScriptContext *ctx, QScriptEngine *eng)
-{
- QScriptValue obj = ctx->thisObject();
- QScriptValue data = obj.data();
- if (!data.isValid()) {
- data = eng->newObject();
- obj.setData(data);
- }
- QScriptValue result;
- if (ctx->argumentCount() == 1) {
- QString str = ctx->argument(0).toString();
- str.replace("Roberta", "Ken");
- result = str;
- data.setProperty("x", result);
- } else {
- result = data.property("x");
- }
- return result;
-}
-//! [78]
-
-//! [79]
-QScriptEngine eng;
-QScriptValue obj = eng.newObject();
-obj.setProperty("x", eng.newFunction(getSet),
- QScriptValue::PropertyGetter|QScriptValue::PropertySetter);
-//! [79]
-
-//! [80]
-obj.x = "Roberta sent me";
-print(obj.x); // "Ken sent me"
-obj.x = "I sent the bill to Roberta";
-print(obj.x); // "I sent the bill to Ken"
-//! [80]
-
-//! [81]
-obj = {};
-obj.__defineGetter__("x", function() { return this._x; });
-obj.__defineSetter__("x", function(v) { print("setting x to", v); this._x = v; });
-obj.x = 123;
-//! [81]
-
-//! [82]
-myButton.text = qsTr("Hello world!");
-//! [82]
-
-//! [83]
-myButton.text = qsTranslate("MyAwesomeScript", "Hello world!");
-//! [83]
-
-//! [84]
-FriendlyConversation.prototype.greeting = function(type)
-{
- if (FriendlyConversation['greeting_strings'] == undefined) {
- FriendlyConversation['greeting_strings'] = [
- QT_TR_NOOP("Hello"),
- QT_TR_NOOP("Goodbye")
- ];
- }
- return qsTr(FriendlyConversation.greeting_strings[type]);
-}
-//! [84]
-
-//! [85]
-FriendlyConversation.prototype.greeting = function(type)
-{
- if (FriendlyConversation['greeting_strings'] == undefined) {
- FriendlyConversation['greeting_strings'] = [
- QT_TRANSLATE_NOOP("FriendlyConversation", "Hello"),
- QT_TRANSLATE_NOOP("FriendlyConversation", "Goodbye")
- ];
- }
- return qsTranslate("FriendlyConversation", FriendlyConversation.greeting_strings[type]);
-}
-//! [85]
-
-//! [86]
-FileCopier.prototype.showProgress = function(done, total, currentFileName)
-{
- this.label.text = qsTr("%1 of %2 files copied.\nCopying: %3")
- .arg(done)
- .arg(total)
- .arg(currentFileName));
-}
-//! [86]
-
//! [87]
lupdate myscript.qs -ts myscript_la.ts
//! [87]
@@ -925,64 +49,3 @@ lupdate -extensions qs scripts/ -ts scripts_la.ts
//! [89]
lrelease myscript_la.ts
//! [89]
-
-//! [90]
-({ unitName: "Celsius",
- toKelvin: function(x) { return x + 273; }
- })
-//! [90]
-
-//! [91]
-QScriptValue object = engine.evaluate("({ unitName: 'Celsius', toKelvin: function(x) { return x + 273; } })");
-QScriptValue toKelvin = object.property("toKelvin");
-QScriptValue result = toKelvin.call(object, QScriptValueList() << 100);
-qDebug() << result.toNumber(); // 373
-//! [91]
-
-//! [92]
-QScriptValue add = engine.globalObject().property("add");
-qDebug() << add.call(QScriptValue(), QScriptValueList() << 1 << 2).toNumber(); // 3
-//! [92]
-
-//! [93]
-typedef QSharedPointer<QXmlStreamReader> XmlStreamReaderPointer;
-
-Q_DECLARE_METATYPE(XmlStreamReaderPointer)
-
-QScriptValue constructXmlStreamReader(QScriptContext *context, QScriptEngine *engine)
-{
- if (!context->isCalledAsConstructor())
- return context->throwError(QScriptContext::SyntaxError, "please use the 'new' operator");
-
- QIODevice *device = qobject_cast<QIODevice*>(context->argument(0).toQObject());
- if (!device)
- return context->throwError(QScriptContext::TypeError, "please supply a QIODevice as first argument");
-
- // Create the C++ object
- QXmlStreamReader *reader = new QXmlStreamReader(device);
-
- XmlStreamReaderPointer pointer(reader);
-
- // store the shared pointer in the script object that we are constructing
- return engine->newVariant(context->thisObject(), QVariant::fromValue(pointer));
-}
-//! [93]
-
-//! [94]
-QScriptValue xmlStreamReader_atEnd(QScriptContext *context, QScriptEngine *)
-{
- XmlStreamReaderPointer reader = qscriptvalue_cast<XmlStreamReaderPointer>(context->thisObject());
- if (!reader)
- return context->throwError(QScriptContext::TypeError, "this object is not an XmlStreamReader");
- return reader->atEnd();
-}
-//! [94]
-
-//! [95]
- QScriptEngine engine;
- QScriptValue xmlStreamReaderProto = engine.newObject();
- xmlStreamReaderProto.setProperty("atEnd", engine.newFunction(xmlStreamReader_atEnd));
-
- QScriptValue xmlStreamReaderCtor = engine.newFunction(constructXmlStreamReader, xmlStreamReaderProto);
- engine.globalObject().setProperty("XmlStreamReader", xmlStreamReaderCtor);
-//! [95]
diff --git a/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc b/doc/src/snippets/code/doc_src_qtscriptextensions.js
index 456077d..456077d 100644
--- a/doc/src/snippets/code/doc_src_qtscriptextensions.qdoc
+++ b/doc/src/snippets/code/doc_src_qtscriptextensions.js
diff --git a/doc/src/snippets/code/doc_src_qtscripttools.cpp b/doc/src/snippets/code/doc_src_qtscripttools.cpp
new file mode 100644
index 0000000..258c7df
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscripttools.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtScriptTools>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtscripttools.pro b/doc/src/snippets/code/doc_src_qtscripttools.pro
new file mode 100644
index 0000000..e87644d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtscripttools.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += scripttools
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsql.qdoc b/doc/src/snippets/code/doc_src_qtsql.cpp
index 1bc7518..9c0c16e 100644
--- a/doc/src/snippets/code/doc_src_qtsql.qdoc
+++ b/doc/src/snippets/code/doc_src_qtsql.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtSql>
//! [0]
-
-
-//! [1]
-QT += sql
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsql.pro b/doc/src/snippets/code/doc_src_qtsql.pro
new file mode 100644
index 0000000..4e31846
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtsql.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += sql
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsvg.qdoc b/doc/src/snippets/code/doc_src_qtsvg.cpp
index 57db6de..c66b4da 100644
--- a/doc/src/snippets/code/doc_src_qtsvg.qdoc
+++ b/doc/src/snippets/code/doc_src_qtsvg.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtSvg>
//! [0]
-
-
-//! [1]
-QT += svg
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtsvg.pro b/doc/src/snippets/code/doc_src_qtsvg.pro
new file mode 100644
index 0000000..1a75d03
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtsvg.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += svg
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qttest.qdoc b/doc/src/snippets/code/doc_src_qttest.cpp
index 354d188..5b21c9e 100644
--- a/doc/src/snippets/code/doc_src_qttest.qdoc
+++ b/doc/src/snippets/code/doc_src_qttest.cpp
@@ -41,8 +41,3 @@
//! [0]
#include <QtTest>
//! [0]
-
-
-//! [1]
-CONFIG += qtestlib
-//! [1]
diff --git a/doc/src/snippets/code/doc_src_qttest.pro b/doc/src/snippets/code/doc_src_qttest.pro
new file mode 100644
index 0000000..73d210e
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qttest.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+CONFIG += qtestlib
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtuiloader.qdoc b/doc/src/snippets/code/doc_src_qtuiloader.cpp
index b8d8019..de35e78 100644
--- a/doc/src/snippets/code/doc_src_qtuiloader.qdoc
+++ b/doc/src/snippets/code/doc_src_qtuiloader.cpp
@@ -38,11 +38,6 @@
**
****************************************************************************/
-//! [0]
-CONFIG += uitools
-//! [0]
-
-
//! [1]
#include <QtUiTools>
//! [1]
diff --git a/doc/src/snippets/code/doc_src_qtuiloader.pro b/doc/src/snippets/code/doc_src_qtuiloader.pro
new file mode 100644
index 0000000..a050213
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtuiloader.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [0]
+CONFIG += uitools
+#! [0]
diff --git a/doc/src/snippets/code/doc_src_qtxml.cpp b/doc/src/snippets/code/doc_src_qtxml.cpp
new file mode 100644
index 0000000..5413fd2
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxml.cpp
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+#include <QtXml>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtxml.pro b/doc/src/snippets/code/doc_src_qtxml.pro
new file mode 100644
index 0000000..d69b2ce
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxml.pro
@@ -0,0 +1,43 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#! [1]
+QT += xml
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtxml.qdoc b/doc/src/snippets/code/doc_src_qtxml.qdoc
index 6576815..1e864ea 100644
--- a/doc/src/snippets/code/doc_src_qtxml.qdoc
+++ b/doc/src/snippets/code/doc_src_qtxml.qdoc
@@ -38,21 +38,6 @@
**
****************************************************************************/
-//! [0]
-#include <QtXml>
-//! [0]
-
-
-//! [1]
-QT += xml
-//! [1]
-
-
-//! [2]
-QT += xml
-//! [2]
-
-
//! [3]
<quote>A quotation.</quote>
//! [3]
diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.cpp b/doc/src/snippets/code/doc_src_qtxmlpatterns.cpp
new file mode 100644
index 0000000..2c3235c
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+//! [0]
+#include <QtXmlPatterns>
+//! [0]
diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.pro b/doc/src/snippets/code/doc_src_qtxmlpatterns.pro
new file mode 100644
index 0000000..61ee910
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.pro
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#! [1]
+QT += xmlpatterns
+#! [1]
diff --git a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
index 560cc53..22e2dde 100644
--- a/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
+++ b/doc/src/snippets/code/doc_src_qtxmlpatterns.qdoc
@@ -42,15 +42,6 @@
void wrapInFunction()
{
-//! [0]
-#include <QtXmlPatterns>
-//! [0]
-
-
-//! [1]
-QT += xmlpatterns
-//! [1]
-
//! [2]
xmlpatterns myQuery.xq
//! [2]
diff --git a/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc b/doc/src/snippets/code/doc_src_qvarlengtharray.cpp
index a938330..a938330 100644
--- a/doc/src/snippets/code/doc_src_qvarlengtharray.qdoc
+++ b/doc/src/snippets/code/doc_src_qvarlengtharray.cpp
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world1.qml b/doc/src/snippets/code/doc_src_resources.cpp
index 81ad333..b965cbe 100644
--- a/doc/src/snippets/declarative/qml-intro/hello-world1.qml
+++ b/doc/src/snippets/code/doc_src_resources.cpp
@@ -38,16 +38,17 @@
**
****************************************************************************/
-//! [document]
-import QtQuick 1.0
+//! [4]
+QResource::registerResource("/path/to/myresource.rcc");
+//! [4]
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
- Text { text: "Hello World!" }
-
- color: "lightgray"
+//! [5]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ Q_INIT_RESOURCE(graphlib);
+ ...
+ return app.exec();
}
-//! [document]
+//! [5]
diff --git a/doc/src/snippets/code/doc_src_resources.qdoc b/doc/src/snippets/code/doc_src_resources.qdoc
index c524ae7..0b727da 100644
--- a/doc/src/snippets/code/doc_src_resources.qdoc
+++ b/doc/src/snippets/code/doc_src_resources.qdoc
@@ -63,19 +63,3 @@
//! [3]
rcc -binary myresource.qrc -o myresource.rcc
//! [3]
-
-
-//! [4]
-QResource::registerResource("/path/to/myresource.rcc");
-//! [4]
-
-
-//! [5]
-int main(int argc, char *argv[])
-{
- QApplication app(argc, argv);
- Q_INIT_RESOURCE(graphlib);
- ...
- return app.exec();
-}
-//! [5]
diff --git a/doc/src/snippets/code/doc_src_richtext.cpp b/doc/src/snippets/code/doc_src_richtext.cpp
new file mode 100644
index 0000000..8de5f4c
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_richtext.cpp
@@ -0,0 +1,85 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [0]
+QTextDocument *newDocument = new QTextDocument;
+//! [0]
+
+
+//! [1]
+QTextEdit *editor = new QTextEdit;
+QTextDocument *editorDocument = editor->document();
+//! [1]
+
+
+//! [2]
+QTextEdit *editor = new QTextEdit(parent);
+editor->setHtml(aStringContainingHTMLtext);
+editor->show();
+//! [2]
+
+
+//! [3]
+QTextDocument *document = editor->document();
+//! [3]
+
+
+//! [4]
+QTextCursor cursor = editor->textCursor();
+//! [4]
+
+
+//! [5]
+editor->setTextCursor(cursor);
+//! [5]
+
+
+//! [6]
+textEdit.show();
+
+textCursor.beginEditBlock();
+
+for (int i = 0; i < 1000; ++i) {
+ textCursor.insertBlock();
+ textCursor.insertText(paragraphText.at(i));
+}
+
+textCursor.endEditBlock();
+//! [6]
diff --git a/doc/src/snippets/code/doc_src_richtext.qdoc b/doc/src/snippets/code/doc_src_richtext.qdoc
index e031d77..2b79fdb 100644
--- a/doc/src/snippets/code/doc_src_richtext.qdoc
+++ b/doc/src/snippets/code/doc_src_richtext.qdoc
@@ -38,53 +38,6 @@
**
****************************************************************************/
-//! [0]
-QTextDocument *newDocument = new QTextDocument;
-//! [0]
-
-
-//! [1]
-QTextEdit *editor = new QTextEdit;
-QTextDocument *editorDocument = editor->document();
-//! [1]
-
-
-//! [2]
-QTextEdit *editor = new QTextEdit(parent);
-editor->setHtml(aStringContainingHTMLtext);
-editor->show();
-//! [2]
-
-
-//! [3]
-QTextDocument *document = editor->document();
-//! [3]
-
-
-//! [4]
-QTextCursor cursor = editor->textCursor();
-//! [4]
-
-
-//! [5]
-editor->setTextCursor(cursor);
-//! [5]
-
-
-//! [6]
-textEdit.show();
-
-textCursor.beginEditBlock();
-
-for (int i = 0; i < 1000; ++i) {
- textCursor.insertBlock();
- textCursor.insertText(paragraphText.at(i));
-}
-
-textCursor.endEditBlock();
-//! [6]
-
-
//! [7]
<meta http-equiv="Content-Type" content="text/html; charset=EUC-JP" />
//! [7]
diff --git a/doc/src/snippets/code/doc_src_sql-driver.cpp b/doc/src/snippets/code/doc_src_sql-driver.cpp
new file mode 100644
index 0000000..56e4f9b
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_sql-driver.cpp
@@ -0,0 +1,82 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [2]
+QSqlQuery q;
+q.exec("call qtestproc (@outval1, @outval2)");
+q.exec("select @outval1, @outval2");
+q.next();
+qDebug() << q.value(0) << q.value(1); // outputs "42" and "43"
+//! [2]
+
+
+//! [10]
+// STORED_PROC uses the return statement or returns multiple result sets
+QSqlQuery query;
+query.setForwardOnly(true);
+query.exec("{call STORED_PROC}");
+//! [10]
+
+
+//! [24]
+db.setHostName("MyServer");
+db.setDatabaseName("C:\\test.gdb");
+//! [24]
+
+
+//! [25]
+// connect to database using the Latin-1 character set
+db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1");
+db.open();
+//! [25]
+
+
+//! [26]
+QSqlQuery q;
+q.exec("execute procedure my_procedure");
+q.next();
+qDebug() << q.value(0); // outputs the first RETURN/OUT value
+//! [26]
+
+
+//! [31]
+QSqlDatabase: QMYSQL driver not loaded
+QSqlDatabase: available drivers: QMYSQL
+//! [31]
diff --git a/doc/src/snippets/code/doc_src_sql-driver.qdoc b/doc/src/snippets/code/doc_src_sql-driver.qdoc
index 482e38c..46cd1b3 100644
--- a/doc/src/snippets/code/doc_src_sql-driver.qdoc
+++ b/doc/src/snippets/code/doc_src_sql-driver.qdoc
@@ -59,15 +59,6 @@ END
//! [1]
-//! [2]
-QSqlQuery q;
-q.exec("call qtestproc (@outval1, @outval2)");
-q.exec("select @outval1, @outval2");
-q.next();
-qDebug() << q.value(0) << q.value(1); // outputs "42" and "43"
-//! [2]
-
-
//! [3]
cd $QTDIR/src/plugins/sqldrivers/mysql
qmake "INCLUDEPATH+=/usr/local/include" "LIBS+=-L/usr/local/lib -lmysqlclient_r" mysql.pro
@@ -116,14 +107,6 @@ set PATH=%PATH%;c:\oracle\bin
//! [9]
-//! [10]
-\\ STORED_PROC uses the return statement or returns multiple result sets
-QSqlQuery query;
-query.setForwardOnly(true);
-query.exec("{call STORED_PROC}");
-//! [10]
-
-
//! [11]
cd $QTDIR/src/plugins/sqldrivers/odbc
qmake "INCLUDEPATH+=/usr/local/unixODBC/include" "LIBS+=-L/usr/local/unixODBC/lib -lodbc"
@@ -212,27 +195,6 @@ nmake
//! [23]
-//! [24]
-db.setHostName("MyServer");
-db.setDatabaseName("C:\\test.gdb");
-//! [24]
-
-
-//! [25]
-// connect to database using the Latin-1 character set
-db.setConnectOptions("ISC_DPB_LC_CTYPE=Latin1");
-db.open();
-//! [25]
-
-
-//! [26]
-QSqlQuery q;
-q.exec("execute procedure my_procedure");
-q.next();
-qDebug() << q.value(0); // outputs the first RETURN/OUT value
-//! [26]
-
-
//! [27]
cd $QTDIR/src/plugins/sqldrivers/ibase
qmake "INCLUDEPATH+=/opt/interbase/include" "LIBS+=-L/opt/interbase/lib" ibase.pro
@@ -261,11 +223,6 @@ nmake
//! [30]
-//! [31]
-QSqlDatabase: QMYSQL driver not loaded
-QSqlDatabase: available drivers: QMYSQL
-//! [31]
-
//! [32]
configure -I /usr/include/oracle/10.1.0.3/client -L /usr/lib/oracle/10.1.0.3/client/lib -R /usr/lib/oracle/10.1.0.3/client/lib -lclntsh -lnnz10
make
@@ -276,4 +233,3 @@ cd $QTDIR/src/plugins/sqldrivers/oci
qmake "INCLUDEPATH+=/usr/include/oracle/10.1.0.3/client" "LIBS+=-L/usr/lib/oracle/10.1.0.3/client/lib -Wl,-rpath,/usr/lib/oracle/10.1.0.3/client/lib -lclntsh -lnnz10" oci.pro
make
//! [33]
-
diff --git a/doc/src/snippets/code/doc_src_styles.qdoc b/doc/src/snippets/code/doc_src_styles.cpp
index a2a6fa9..a2a6fa9 100644
--- a/doc/src/snippets/code/doc_src_styles.qdoc
+++ b/doc/src/snippets/code/doc_src_styles.cpp
diff --git a/doc/src/snippets/code/doc_src_stylesheet.cpp b/doc/src/snippets/code/doc_src_stylesheet.cpp
new file mode 100644
index 0000000..3faaf2d
--- /dev/null
+++ b/doc/src/snippets/code/doc_src_stylesheet.cpp
@@ -0,0 +1,140 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [21]
+qApp->setStyleSheet("QPushButton { color: white }");
+//! [21]
+
+
+//! [22]
+myPushButton->setStyleSheet("* { color: blue }");
+//! [22]
+
+
+//! [23]
+myPushButton->setStyleSheet("color: blue");
+//! [23]
+
+
+//! [24]
+qApp->setStyleSheet("QGroupBox { color: red; } ");
+//! [24]
+
+//! [25]
+qApp->setStyleSheet("QGroupBox, QGroupBox * { color: red; }");
+//! [25]
+
+
+//! [26]
+class MyPushButton : public QPushButton {
+ // ...
+}
+
+// ...
+qApp->setStyleSheet("MyPushButton { background: yellow; }");
+//! [26]
+
+
+//! [27]
+namespace ns {
+ class MyPushButton : public QPushButton {
+ // ...
+ }
+}
+
+// ...
+qApp->setStyleSheet("ns--MyPushButton { background: yellow; }");
+//! [27]
+
+
+//! [32]
+void CustomWidget::paintEvent(QPaintEvent *)
+{
+ QStyleOption opt;
+ opt.init(this);
+ QPainter p(this);
+ style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
+}
+//! [32]
+
+
+//! [88]
+qApp->setStyleSheet("QLineEdit { background-color: yellow }");
+//! [88]
+
+
+//! [89]
+myDialog->setStyleSheet("QLineEdit { background-color: yellow }");
+//! [89]
+
+
+//! [90]
+myDialog->setStyleSheet("QLineEdit#nameEdit { background-color: yellow }");
+//! [90]
+
+
+//! [91]
+nameEdit->setStyleSheet("background-color: yellow");
+//! [91]
+
+
+//! [92]
+nameEdit->setStyleSheet("color: blue; background-color: yellow");
+//! [92]
+
+
+//! [93]
+nameEdit->setStyleSheet("color: blue;"
+ "background-color: yellow;"
+ "selection-color: yellow;"
+ "selection-background-color: blue;");
+//! [93]
+
+
+//! [95]
+QLineEdit *nameEdit = new QLineEdit(this);
+nameEdit->setProperty("mandatoryField", true);
+
+QLineEdit *emailEdit = new QLineEdit(this);
+emailEdit->setProperty("mandatoryField", true);
+
+QSpinBox *ageSpinBox = new QSpinBox(this);
+ageSpinBox->setProperty("mandatoryField", true);
+//! [95]
diff --git a/doc/src/snippets/code/doc_src_stylesheet.qdoc b/doc/src/snippets/code/doc_src_stylesheet.qdoc
index 9b8a3b5..99b31c9 100644
--- a/doc/src/snippets/code/doc_src_stylesheet.qdoc
+++ b/doc/src/snippets/code/doc_src_stylesheet.qdoc
@@ -170,53 +170,6 @@ LI.red.level {} /* a=0 b=2 c=1 -> specificity = 21 */
//! [20]
-//! [21]
-qApp->setStyleSheet("QPushButton { color: white }");
-//! [21]
-
-
-//! [22]
-myPushButton->setStyleSheet("* { color: blue }");
-//! [22]
-
-
-//! [23]
-myPushButton->setStyleSheet("color: blue");
-//! [23]
-
-
-//! [24]
-qApp->setStyleSheet("QGroupBox { color: red; } ");
-//! [24]
-
-
-//! [25]
-qApp->setStyleSheet("QGroupBox, QGroupBox * { color: red; }");
-//! [25]
-
-
-//! [26]
-class MyPushButton : public QPushButton {
- // ...
-}
-
-// ...
-qApp->setStyleSheet("MyPushButton { background: yellow; }");
-//! [26]
-
-
-//! [27]
-namespace ns {
- class MyPushButton : public QPushButton {
- // ...
- }
-}
-
-// ...
-qApp->setStyleSheet("ns--MyPushButton { background: yellow; }");
-//! [27]
-
-
//! [28]
MyLabel { qproperty-pixmap: url(pixmap.png); }
MyGroupBox { qproperty-titleColor: rgb(100, 200, 100); }
@@ -234,17 +187,6 @@ QToolButton { background-color: red; border: none; }
//! [31]
-//! [32]
-void CustomWidget::paintEvent(QPaintEvent *)
-{
- QStyleOption opt;
- opt.init(this);
- QPainter p(this);
- style()->drawPrimitive(QStyle::PE_Widget, &opt, &p, this);
-}
-//! [32]
-
-
//! [33]
QTreeView {
alternate-background-color: blue;
@@ -617,56 +559,11 @@ QPushButton { color: palette(dark); }
//! [87]
-//! [88]
-qApp->setStyleSheet("QLineEdit { background-color: yellow }");
-//! [88]
-
-
-//! [89]
-myDialog->setStyleSheet("QLineEdit { background-color: yellow }");
-//! [89]
-
-
-//! [90]
-myDialog->setStyleSheet("QLineEdit#nameEdit { background-color: yellow }");
-//! [90]
-
-
-//! [91]
-nameEdit->setStyleSheet("background-color: yellow");
-//! [91]
-
-
-//! [92]
-nameEdit->setStyleSheet("color: blue; background-color: yellow");
-//! [92]
-
-
-//! [93]
-nameEdit->setStyleSheet("color: blue;"
- "background-color: yellow;"
- "selection-color: yellow;"
- "selection-background-color: blue;");
-//! [93]
-
-
//! [94]
*[mandatoryField="true"] { background-color: yellow }
//! [94]
-//! [95]
-QLineEdit *nameEdit = new QLineEdit(this);
-nameEdit->setProperty("mandatoryField", true);
-
-QLineEdit *emailEdit = new QLineEdit(this);
-emailEdit->setProperty("mandatoryField", true);
-
-QSpinBox *ageSpinBox = new QSpinBox(this);
-ageSpinBox->setProperty("mandatoryField", true);
-//! [95]
-
-
//! [96]
QPushButton#evilButton { background-color: red }
//! [96]
diff --git a/doc/src/snippets/code/doc_src_unicode.qdoc b/doc/src/snippets/code/doc_src_unicode.cpp
index 4415cf2..4415cf2 100644
--- a/doc/src/snippets/code/doc_src_unicode.qdoc
+++ b/doc/src/snippets/code/doc_src_unicode.cpp
diff --git a/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc b/doc/src/snippets/code/doc_src_unix-signal-handlers.cpp
index fd5f386..fd5f386 100644
--- a/doc/src/snippets/code/doc_src_unix-signal-handlers.qdoc
+++ b/doc/src/snippets/code/doc_src_unix-signal-handlers.cpp
diff --git a/doc/src/snippets/declarative/animation-signalhandler.qml b/doc/src/snippets/code/doc_src_wince-customization.cpp
index 416417f..90c2207 100644
--- a/doc/src/snippets/declarative/animation-signalhandler.qml
+++ b/doc/src/snippets/code/doc_src_wince-customization.cpp
@@ -37,19 +37,22 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
-import QtQuick 1.0
-Rectangle {
- id: rect
- width: 100; height: 100
- color: "red"
+//! [9]
+wchar_t* libraries[] = {
+ L"QtCore4.dll",
+ L"QtGui4.dll",
+ 0
+};
- MouseArea {
- anchors.fill: parent
- onClicked: PropertyAnimation { target: rect; properties: "x,y"; to: 50; duration: 1000 }
+for (int i = 0; libraries[i] != 0; ++i) {
+ HINSTANCE instance = LoadLibraryW(libraries[i]);
+ OutputDebugStringW(libraries[i]);
+ if (instance != NULL) {
+ OutputDebugStringW(L" : Successfully instantiated\n");
+ FreeLibrary(instance);
+ } else {
+ OutputDebugStringW(L" : Could not be loaded\n");
}
}
-
-//![0]
-
+//! [9]
diff --git a/doc/src/snippets/code/doc_src_wince-customization.qdoc b/doc/src/snippets/code/doc_src_wince-customization.qdoc
index 657786f..ab09222 100644
--- a/doc/src/snippets/code/doc_src_wince-customization.qdoc
+++ b/doc/src/snippets/code/doc_src_wince-customization.qdoc
@@ -89,22 +89,3 @@ if(equals(TEMPLATE_PREFIX, "vc") | equals(TEMPLATE, "vc*")) {
DEFINES -= _M_ARM
}
//! [8]
-
-//! [9]
-wchar_t* libraries[] = {
- L"QtCore4.dll",
- L"QtGui4.dll",
- 0
-};
-
-for (int i = 0; libraries[i] != 0; ++i) {
- HINSTANCE instance = LoadLibraryW(libraries[i]);
- OutputDebugStringW(libraries[i]);
- if (instance != NULL) {
- OutputDebugStringW(L" : Successfully instantiated\n");
- FreeLibrary(instance);
- } else {
- OutputDebugStringW(L" : Could not be loaded\n");
- }
-}
-//! [9]
diff --git a/doc/src/snippets/code/src_corelib_global_qglobal.cpp b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
index 0b54cef..c79a714 100644
--- a/doc/src/snippets/code/src_corelib_global_qglobal.cpp
+++ b/doc/src/snippets/code/src_corelib_global_qglobal.cpp
@@ -531,3 +531,27 @@ class MyClass : public QObject
//! [47]
CApaApplication *myApplicationFactory();
//! [47]
+
+//! [qlikely]
+ // the condition inside the "if" will be successful most of the times
+ for (int i = 1; i <= 365; i++) {
+ if (Q_LIKELY(isWorkingDay(i))) {
+ ...
+ }
+ ...
+ }
+//! [qlikely]
+
+//! [qunlikely]
+bool readConfiguration(const QFile &file)
+{
+ // We expect to be asked to read an existing file
+ if (Q_UNLIKELY(!file.exists())) {
+ qWarning() << "File not found";
+ return false;
+ }
+
+ ...
+ return true;
+}
+//! [qunlikely]
diff --git a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
index 7a752b1..86bad5e 100644
--- a/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
+++ b/doc/src/snippets/code/src_corelib_kernel_qmetaobject.cpp
@@ -43,7 +43,7 @@ void wrapInFunction()
{
//! [0]
-class MyClass
+class MyClass : public QObject
{
Q_OBJECT
Q_CLASSINFO("author", "Sabrina Schweinsteiger")
diff --git a/doc/src/snippets/code/src_gui_painting_qpen.cpp b/doc/src/snippets/code/src_gui_painting_qpen.cpp
index 6973e0c..8674516 100644
--- a/doc/src/snippets/code/src_gui_painting_qpen.cpp
+++ b/doc/src/snippets/code/src_gui_painting_qpen.cpp
@@ -47,7 +47,7 @@ painter.setPen(pen);
//! [1]
QPainter painter(this);
-QPen pen(); // creates a default pen
+QPen pen; // creates a default pen
pen.setStyle(Qt::DashDotLine);
pen.setWidth(3);
diff --git a/doc/src/snippets/declarative/qml-intro/anchors2.qml b/doc/src/snippets/declarative/Button.qml
index 2c4ce11..214dfea 100644
--- a/doc/src/snippets/declarative/qml-intro/anchors2.qml
+++ b/doc/src/snippets/declarative/Button.qml
@@ -41,18 +41,27 @@
//! [document]
import QtQuick 1.0
+//! [parent begin]
Rectangle {
- id: myWin
- width: 500
- height: 400
-
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 150; height: 150
- anchors.bottom: myWin.bottom
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 10
- }
+//! [parent begin]
+
+//! [property alias]
+property alias buttonLabel: label.text
+Text {
+ id: label
+ text: "empty label"
+}
+ //! [property alias]
+
+//! [id alias]
+ property alias buttonImage: image
+
+ Image {id: image}
+//! [id alias]
+//! [parent end]
}
+//! [parent end]
+
//! [document]
+
+
diff --git a/doc/src/snippets/declarative/animation-elements.qml b/doc/src/snippets/declarative/animation-elements.qml
deleted file mode 100644
index d9bfc28..0000000
--- a/doc/src/snippets/declarative/animation-elements.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//![0]
-import QtQuick 1.0
-
-Row {
-
-//![color]
-Rectangle {
- width: 100; height: 100
-
- ColorAnimation on color { from: "red"; to: "yellow"; duration: 1000 }
-}
-//![color]
-
-//![rotation]
-Item {
- width: 300; height: 300
-
- Rectangle {
- width: 100; height: 100; anchors.centerIn: parent
- color: "red"
-
- RotationAnimation on rotation { to: 90; direction: RotationAnimation.Clockwise }
- }
-}
-//![rotation]
-
-}
diff --git a/doc/src/snippets/declarative/animation-groups.qml b/doc/src/snippets/declarative/animation-groups.qml
deleted file mode 100644
index f29ea48..0000000
--- a/doc/src/snippets/declarative/animation-groups.qml
+++ /dev/null
@@ -1,104 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-import QtQuick 1.0
-
-Row {
-
-//![0]
-Rectangle {
- id: rect
- width: 120; height: 200
-
- Image {
- id: img
- source: "pics/qt.png"
- anchors.horizontalCenter: parent.horizontalCenter
- y: 0
-
- SequentialAnimation on y {
- loops: Animation.Infinite
- NumberAnimation { to: rect.height - img.height; easing.type: Easing.OutBounce; duration: 2000 }
- PauseAnimation { duration: 1000 }
- NumberAnimation { to: 0; easing.type: Easing.OutQuad; duration: 1000 }
- }
- }
-}
-//![0]
-
-//![1]
-Rectangle {
- id: redRect
- width: 100; height: 100
- color: "red"
-
- MouseArea { id: mouseArea; anchors.fill: parent }
-
- states: State {
- name: "pressed"; when: mouseArea.pressed
- PropertyChanges { target: redRect; color: "blue"; y: mouseArea.mouseY; width: mouseArea.mouseX }
- }
-
- transitions: Transition {
-
- SequentialAnimation {
- ColorAnimation { duration: 200 }
- PauseAnimation { duration: 100 }
-
- ParallelAnimation {
- NumberAnimation {
- duration: 500
- easing.type: Easing.OutBounce
- targets: redRect
- properties: "y"
- }
-
- NumberAnimation {
- duration: 800
- easing.type: Easing.InOutQuad
- targets: redRect
- properties: "width"
- }
- }
- }
- }
-}
-//![1]
-
-}
diff --git a/doc/src/snippets/declarative/animation-propertyvaluesource.qml b/doc/src/snippets/declarative/animation-propertyvaluesource.qml
deleted file mode 100644
index 6f93967..0000000
--- a/doc/src/snippets/declarative/animation-propertyvaluesource.qml
+++ /dev/null
@@ -1,51 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-//![0]
-import QtQuick 1.0
-
-Rectangle {
- width: 100; height: 100
- color: "red"
-
- PropertyAnimation on x { to: 50; duration: 1000; loops: Animation.Infinite }
- PropertyAnimation on y { to: 50; duration: 1000; loops: Animation.Infinite }
-}
-//![0]
-
diff --git a/doc/src/snippets/declarative/animation.qml b/doc/src/snippets/declarative/animation.qml
new file mode 100644
index 0000000..ae6142d
--- /dev/null
+++ b/doc/src/snippets/declarative/animation.qml
@@ -0,0 +1,226 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//! [document]
+import QtQuick 1.0
+
+
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ width: 200; height: 600
+ id: screen
+
+Column {
+ spacing: 12
+//! [direct property change]
+Rectangle {
+ id: blob
+ width: 75; height: 75
+ color: "blue"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: blob.color = "green"
+ }
+}
+//! [direct property change]
+
+//! [property animation]
+Rectangle {
+ id: flashingblob
+ width: 75; height: 75
+ color: "blue"
+ opacity: 1.0
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ animateColor.start()
+ animateOpacity.start()
+ }
+ }
+
+ PropertyAnimation {id: animateColor; target: flashingblob; properties: "color"; to: "green"; duration: 100}
+
+ NumberAnimation {
+ id: animateOpacity
+ target: flashingblob
+ properties: "opacity"
+ from: 0.99
+ to: 1.0
+ loops: Animation.Infinite
+ easing {type: Easing.OutBack; overshoot: 500}
+ }
+}
+//! [property animation]
+
+//! [transition animation]
+Rectangle {
+ width: 75; height: 75
+ id: button
+ state: "RELEASED"
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: button.state = "PRESSED"
+ onReleased: button.state = "RELEASED"
+ }
+
+ states: [
+ State {
+ name: "PRESSED"
+ PropertyChanges { target: button; color: "lightblue"}
+ },
+ State {
+ name: "RELEASED"
+ PropertyChanges { target: button; color: "lightsteelblue"}
+ }
+ ]
+
+ transitions: [
+ Transition {
+ from: "PRESSED"
+ to: "RELEASED"
+ ColorAnimation { target: button; duration: 100}
+ },
+ Transition {
+ from: "RELEASED"
+ to: "PRESSED"
+ ColorAnimation { target: button; duration: 100}
+ }
+ ]
+}
+//! [transition animation]
+
+Rectangle {
+ width: 75; height: 75
+ id: wildcard
+ color: "green"
+//! [wildcard animation]
+ transitions:
+ Transition {
+ to: "*"
+ ColorAnimation { target: button; duration: 100}
+ }
+//! [wildcard animation]
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: {
+ ball.x = 10
+ ball.color = "red"
+ }
+ onReleased: {
+ ball.x = screen.width / 2
+ ball.color = "salmon"
+ }
+ }
+}
+
+//! [behavior animation]
+Rectangle {
+ width: 75; height: 75; radius: width
+ id: ball
+ color: "salmon"
+
+ Behavior on x {
+ NumberAnimation {
+ id: bouncebehavior
+ easing {
+ type: Easing.OutElastic
+ amplitude: 1.0
+ period: 0.5
+ }
+ }
+ }
+ Behavior on y {
+ animation: bouncebehavior
+ }
+ Behavior {
+ ColorAnimation { target: ball; duration: 100 }
+ }
+}
+//! [behavior animation]
+
+//! [sequential animation]
+Rectangle {
+ id: banner
+ width: 150; height: 100; border.color: "black"
+
+ Column {
+ anchors.centerIn: parent
+ Text {
+ id: code
+ text: "Code less."
+ opacity: 0.01
+ }
+ Text {
+ id: create
+ text: "Create more."
+ opacity: 0.01
+ }
+ Text {
+ id: deploy
+ text: "Deploy everywhere."
+ opacity: 0.01
+ }
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onPressed: playbanner.start()
+ }
+
+ SequentialAnimation {
+ id: playbanner
+ running: false
+ NumberAnimation { target: code; property: "opacity"; to: 1.0; duration: 200}
+ NumberAnimation { target: create; property: "opacity"; to: 1.0; duration: 200}
+ NumberAnimation { target: deploy; property: "opacity"; to: 1.0; duration: 200}
+ }
+}
+//! [sequential animation]
+
+}//end of col
+//! [parent end]
+}
+//! [parent end]
+
+//! [document]
diff --git a/doc/src/snippets/declarative/animation-easing.qml b/doc/src/snippets/declarative/bestpractices/group.qml
index 64ba44c..8a2b398 100644
--- a/doc/src/snippets/declarative/animation-easing.qml
+++ b/doc/src/snippets/declarative/bestpractices/group.qml
@@ -37,15 +37,40 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
+
+
+//! [document]
import QtQuick 1.0
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ width: 175; height: 175; color: "white"
+
+Rectangle{
+width: 170; height: 170
+//! [not grouped]
+border.width: 1
+border.color: "red"
+anchors.bottom: parent.bottom
+anchors.left: parent.left
+//! [not grouped]
+}
Rectangle {
width: 100; height: 100
+
+//! [grouped]
+border {
+ width: 1;
color: "red"
-
- PropertyAnimation on x { to: 50; duration: 1000; easing.type: Easing.OutBounce }
- PropertyAnimation on y { to: 50; duration: 1000; easing.type: Easing.OutBounce }
}
-//![0]
-
+anchors {
+ bottom: parent.bottom;
+ left: parent.left
+}
+//! [grouped]
+}
+//! [parent end]
+}
+//! [parent end]
+//! [document]
diff --git a/doc/src/snippets/declarative/events.qml b/doc/src/snippets/declarative/events.qml
new file mode 100644
index 0000000..3dc44f2
--- /dev/null
+++ b/doc/src/snippets/declarative/events.qml
@@ -0,0 +1,141 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//![document]
+import QtQuick 1.0
+
+//![parent begin]
+Rectangle {
+//![parent begin]
+
+ id: screen
+ width: 400; height: 500
+
+//! [signal declaration]
+ signal trigger
+ signal send (string notice)
+ signal perform (string task, variant object)
+//! [signal declaration]
+
+//! [signal handler declaration]
+onTrigger: console.log("trigger signal emitted")
+
+onSend: {
+ console.log("send signal emitted with notice: " + notice)
+}
+
+onPerform: console.log("perform signal emitted")
+//! [signal handler declaration]
+
+//! [automatic signals]
+Rectangle {
+ id: sprite
+ width: 25; height: 25
+ x: 50; y: 15
+
+ onXChanged: console.log("x property changed, emitted xChanged signal")
+ onYChanged: console.log("y property changed, emitted yChanged signal")
+}
+//! [automatic signals]
+
+//! [signal emit]
+Rectangle {
+ id: messenger
+
+ signal send( string person, string notice)
+
+ onSend: {
+ console.log("For " + person + ", the notice is: " + notice)
+ }
+
+ Component.onCompleted: messenger.send("Tom", "the door is ajar.")
+}
+//! [signal emit]
+
+//! [connect method]
+Rectangle {
+ id: relay
+
+ signal send( string person, string notice)
+ onSend: console.log("Send signal to: " + person + ", " + notice)
+
+ Component.onCompleted: {
+ relay.send.connect(sendToPost)
+ relay.send.connect(sendToTelegraph)
+ relay.send.connect(sendToEmail)
+ relay.send("Tom", "Happy Birthday")
+ }
+
+ function sendToPost(person, notice) {
+ console.log("Sending to post: " + person + ", " + notice)
+ }
+ function sendToTelegraph(person, notice) {
+ console.log("Sending to telegraph: " + person + ", " + notice)
+ }
+ function sendToEmail(person, notice) {
+ console.log("Sending to email: " + person + ", " + notice)
+ }
+}
+//! [connect method]
+
+//! [forward signal]
+Rectangle {
+ id: forwarder
+ width: 100; height: 100
+
+ signal send()
+ onSend: console.log("Send clicked")
+
+ MouseArea {
+ id: mousearea
+ anchors.fill: parent
+ onClicked: console.log("MouseArea clicked")
+ }
+ Component.onCompleted: {
+ mousearea.clicked.connect(send)
+ }
+}
+//! [forward signal]
+
+//! [connect method]
+//![parent end]
+}
+//![parent end]
+
+//![document]
diff --git a/doc/src/snippets/declarative/focus/advancedFocus.qml b/doc/src/snippets/declarative/focus/advancedFocus.qml
index fda37c1..409663b 100644
--- a/doc/src/snippets/declarative/focus/advancedFocus.qml
+++ b/doc/src/snippets/declarative/focus/advancedFocus.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
diff --git a/doc/src/snippets/declarative/focus/basicwidget.qml b/doc/src/snippets/declarative/focus/basicwidget.qml
index b74c1cd..bf834b4 100644
--- a/doc/src/snippets/declarative/focus/basicwidget.qml
+++ b/doc/src/snippets/declarative/focus/basicwidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
diff --git a/doc/src/snippets/declarative/focus/focusscopewidget.qml b/doc/src/snippets/declarative/focus/focusscopewidget.qml
index 7421a63..6a97512 100644
--- a/doc/src/snippets/declarative/focus/focusscopewidget.qml
+++ b/doc/src/snippets/declarative/focus/focusscopewidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,6 +37,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+//! [document]
import QtQuick 1.0
//! [focusscope window]
@@ -59,3 +60,4 @@ Rectangle {
}
//! [focusscope window]
+//! [document]
diff --git a/doc/src/snippets/declarative/focus/myclickablewidget.qml b/doc/src/snippets/declarative/focus/myclickablewidget.qml
index 4777dd1..30b1c69 100644
--- a/doc/src/snippets/declarative/focus/myclickablewidget.qml
+++ b/doc/src/snippets/declarative/focus/myclickablewidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
diff --git a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml b/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
index c87a47e..6462301 100644
--- a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
+++ b/doc/src/snippets/declarative/focus/myfocusscopewidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,12 +37,13 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+//! [document]
import QtQuick 1.0
//! [widget in focusscope]
FocusScope {
- //FocusScope needs to bind to visual properties of the children
+ //FocusScope needs to bind to visual properties of the Rectangle
property alias color: rectangle.color
x: rectangle.x; y: rectangle.y
width: rectangle.width; height: rectangle.height
@@ -64,3 +65,4 @@ FocusScope {
}
}
//! [widget in focusscope]
+//! [document]
diff --git a/doc/src/snippets/declarative/focus/mywidget.qml b/doc/src/snippets/declarative/focus/mywidget.qml
index 86d2d0f..0cca747 100644
--- a/doc/src/snippets/declarative/focus/mywidget.qml
+++ b/doc/src/snippets/declarative/focus/mywidget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
@@ -37,10 +37,10 @@
** $QT_END_LICENSE$
**
****************************************************************************/
+//! [document]
import QtQuick 1.0
//! [mywidget]
-//MyWidget code
Rectangle {
id: widget
color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true
diff --git a/doc/src/snippets/declarative/focus/widget.qml b/doc/src/snippets/declarative/focus/widget.qml
index a5053d9..a3a726e 100644
--- a/doc/src/snippets/declarative/focus/widget.qml
+++ b/doc/src/snippets/declarative/focus/widget.qml
@@ -4,7 +4,7 @@
** All rights reserved.
** Contact: Nokia Corporation (qt-info@nokia.com)
**
-** This file is part of the FOO module of the Qt Toolkit.
+** This file is part of the documentation of the Qt Toolkit.
**
** $QT_BEGIN_LICENSE:BSD$
** You may use this file under the terms of the BSD license as follows:
diff --git a/doc/src/snippets/declarative/grid/grid-spacing.qml b/doc/src/snippets/declarative/grid-spacing.qml
index 8914ce3..8914ce3 100644
--- a/doc/src/snippets/declarative/grid/grid-spacing.qml
+++ b/doc/src/snippets/declarative/grid-spacing.qml
diff --git a/doc/src/snippets/declarative/grid/grid-items.qml b/doc/src/snippets/declarative/grid/grid-items.qml
deleted file mode 100644
index 3c60d12..0000000
--- a/doc/src/snippets/declarative/grid/grid-items.qml
+++ /dev/null
@@ -1,58 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- width: 112; height: 112
- color: "#303030"
-
- Grid {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- columns: 2
- spacing: 6
-
- Rectangle { color: "#aa6666"; width: 50; height: 50 }
- Rectangle { color: "#aaaa66"; width: 50; height: 50 }
- Rectangle { color: "#9999aa"; width: 50; height: 50 }
- Rectangle { color: "#6666aa"; width: 50; height: 50 }
- }
-}
diff --git a/doc/src/snippets/declarative/grid/grid-no-spacing.qml b/doc/src/snippets/declarative/grid/grid-no-spacing.qml
deleted file mode 100644
index 7c8b0f8..0000000
--- a/doc/src/snippets/declarative/grid/grid-no-spacing.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- width: 112; height: 112
- color: "#303030"
-
- Grid {
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.verticalCenter: parent.verticalCenter
- columns: 2
-
- Rectangle { color: "#aa6666"; width: 50; height: 50 }
- Rectangle { color: "#aaaa66"; width: 50; height: 50 }
- Rectangle { color: "#9999aa"; width: 50; height: 50 }
- Rectangle { color: "#6666aa"; width: 50; height: 50 }
- }
-}
diff --git a/doc/src/snippets/code/doc_src_phonon.qdoc b/doc/src/snippets/declarative/imports/best-practices.qml
index 61ee189..17e5b7a 100644
--- a/doc/src/snippets/code/doc_src_phonon.qdoc
+++ b/doc/src/snippets/declarative/imports/best-practices.qml
@@ -38,16 +38,12 @@
**
****************************************************************************/
-//! [0]
-QT += phonon
-//! [0]
+//! [imports]
+import QtQuick 1.0
+import QtWebKit 1.0
+import "subdirectory"
+import "script.js"
+//! [imports]
-
-//! [1]
-QT += phonon
-//! [1]
-
-
-//! [2]
-#include <Phonon/MediaObject>
-//! [2]
+Item {
+}
diff --git a/doc/src/snippets/declarative/imports/chart.qml b/doc/src/snippets/declarative/imports/chart.qml
new file mode 100644
index 0000000..6de02c1
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/chart.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [import]
+import Charts 1.0
+//! [import]
+
+Item {
+}
diff --git a/doc/src/snippets/declarative/imports/installed-module.qml b/doc/src/snippets/declarative/imports/installed-module.qml
new file mode 100644
index 0000000..288bdd3
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/installed-module.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [imports]
+import QtQuick 1.0
+import com.nokia.qml.mymodule 1.0
+//! [imports]
+
+Item {
+}
diff --git a/doc/src/snippets/code/doc.src.qtscripttools.qdoc b/doc/src/snippets/declarative/imports/merged-named-imports.qml
index 76840b3..366e76e 100644
--- a/doc/src/snippets/code/doc.src.qtscripttools.qdoc
+++ b/doc/src/snippets/declarative/imports/merged-named-imports.qml
@@ -38,11 +38,10 @@
**
****************************************************************************/
-//! [0]
- #include <QtScriptTools>
-//! [0]
+//! [imports]
+import QtQuick 1.0 as Nokia
+import Ovi 1.0 as Nokia
+//! [imports]
-
-//! [1]
- QT += scripttools
-//! [1]
+Item {
+}
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world4.qml b/doc/src/snippets/declarative/imports/named-imports.qml
index 832e37d..a8fa743 100644
--- a/doc/src/snippets/declarative/qml-intro/hello-world4.qml
+++ b/doc/src/snippets/declarative/imports/named-imports.qml
@@ -38,24 +38,24 @@
**
****************************************************************************/
-import QtQuick 1.0
+//! [imports]
+import QtQuick 1.0 as QtLibrary
+import "../MyComponents" as MyComponents
+import com.nokia.qml.mymodule 1.0 as MyModule
+//! [imports]
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
-
- Text {
- text: "<h1>Hello world again</h1>"
- color: "#002288"
- x: 100; y: 100
+Item {
+ //! [imported items]
+ QtLibrary.Rectangle {
+ // ...
}
-//! [added an image]
- Image {
- source: "images/qt-logo.svg"
+ MyComponents.Slider {
+ // ...
}
-//! [added an image]
- color: "lightgray"
+ MyModule.SomeComponent {
+ // ...
+ }
+ //! [imported items]
}
diff --git a/doc/src/snippets/declarative/imports/network-imports.qml b/doc/src/snippets/declarative/imports/network-imports.qml
new file mode 100644
index 0000000..54e177a
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/network-imports.qml
@@ -0,0 +1,47 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [imports]
+import "http://www.my-server.com/MyQMLProject/MyComponents"
+import "http://www.my-server.com/MyQMLProject/MyComponents" 1.0
+//! [imports]
+
+Item {
+}
diff --git a/doc/src/snippets/declarative/imports/qtquick-1.0.qml b/doc/src/snippets/declarative/imports/qtquick-1.0.qml
new file mode 100644
index 0000000..e2a642d
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/qtquick-1.0.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [import]
+import QtQuick 1.0
+//! [import]
+
+Item {
+}
diff --git a/doc/src/snippets/declarative/imports/timeexample.qml b/doc/src/snippets/declarative/imports/timeexample.qml
new file mode 100644
index 0000000..24eafd7
--- /dev/null
+++ b/doc/src/snippets/declarative/imports/timeexample.qml
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [import]
+import com.nokia.TimeExample 1.0
+//! [import]
+
+Item {
+}
diff --git a/doc/src/snippets/declarative/qml-intro/transformations1.qml b/doc/src/snippets/declarative/listview-decorations.qml
index 7be79c8..9ba9b70 100644
--- a/doc/src/snippets/declarative/qml-intro/transformations1.qml
+++ b/doc/src/snippets/declarative/listview-decorations.qml
@@ -41,40 +41,71 @@
//! [document]
import QtQuick 1.0
+//! [parent begin]
Rectangle {
- id: myWin
- width: 500
- height: 400
+//! [parent begin]
+ width: 550; height: 220; color: "white"
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 150; height: 150
- anchors.bottom: myWin.bottom
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 10
-
- transform: Rotation {
- origin.x: 75; origin.y: 75
- axis{ x: 0; y: 0; z:1 } angle: -90
- }
-
- }
+//! [model]
+ListModel {
+ id: nameModel
+ ListElement { name: "Alice" }
+ ListElement { name: "Bob" }
+ ListElement { name: "Jane" }
+ ListElement { name: "Harry" }
+ ListElement { name: "Wendy" }
+}
+//! [model]
+//! [delegate]
+Component {
+ id: nameDelegate
Text {
- text: "<h2>The Qt Logo -- taking it easy</h2>"
- anchors.bottom: image1.top
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 15
+ text: name;
+ font.pixelSize: 24
+ }
+}
+//! [delegate]
- transform: [
- Scale { xScale: 1.5; yScale: 1.2 } ,
+//! [decorations]
+ListView {
+ anchors.fill: parent
+ clip: true
+ model: nameModel
+ delegate: nameDelegate
+ header: bannercomponent
+ footer: Rectangle {
+ width: parent.width; height: 30;
+ gradient: clubcolors
+ }
+ highlight: Rectangle {
+ width: parent.width
+ color: "lightgray"
+ }
+}
- Rotation {
- origin.x: 75; origin.y: 75
- axis{ x: 0; y: 0; z:1 } angle: -45
- }
- ]
+Component { //instantiated when header is processed
+ id: bannercomponent
+ Rectangle {
+ id: banner
+ width: parent.width; height: 50
+ gradient: clubcolors
+ border {color: "#9EDDF2"; width: 2}
+ Text {
+ anchors.centerIn: parent
+ text: "Club Members"
+ font.pixelSize: 32
+ }
}
}
+Gradient {
+ id: clubcolors
+ GradientStop { position: 0.0; color: "#8EE2FE"}
+ GradientStop { position: 0.66; color: "#7ED2EE"}
+}
+//! [decorations]
+
+//! [parent end]
+}
+//! [parent end]
//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/states1.qml b/doc/src/snippets/declarative/listview-sections.qml
index 270d6c3..74c96dd 100644
--- a/doc/src/snippets/declarative/qml-intro/states1.qml
+++ b/doc/src/snippets/declarative/listview-sections.qml
@@ -37,58 +37,65 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
//! [document]
import QtQuick 1.0
+//! [parent begin]
Rectangle {
- id: mainRectangle
- width: 600
- height: 400
- color: "black"
+//! [parent begin]
+ width: 150; height: 300; color: "white"
- Rectangle {
- id: sky
- width: 600
- height: 200
- y: 0
- color: "lightblue"
- }
+//! [model]
+ListModel {
+ id: nameModel
+ ListElement { name: "Alice"; team: "Crypto" }
+ ListElement { name: "Bob"; team: "Crypto" }
+ ListElement { name: "Jane"; team: "QA" }
+ ListElement { name: "Victor"; team: "QA" }
+ ListElement { name: "Wendy"; team: "Graphics" }
+}
+//! [model]
- Rectangle {
- id: ground
- width: 600; height: 200
- y: 200
- color: "green"
+//! [delegate]
+Component {
+ id: nameDelegate
+ Text {
+ text: name;
+ font.pixelSize: 24
+ anchors.left: parent.left
+ anchors.leftMargin: 2
}
+}
+//! [delegate]
- MouseArea {
- id: mousearea
- anchors.fill: mainRectangle
+//! [section]
+ListView {
+ anchors.fill: parent
+ model: nameModel
+ delegate: nameDelegate
+ focus: true
+ highlight: Rectangle {
+ color: "lightblue"
+ width: parent.width
}
-
- states: [ State {
- name: "night"
- when: mousearea.pressed == true
- PropertyChanges { target: sky; color: "darkblue" }
- PropertyChanges { target: ground; color: "black" }
- },
- State {
- name: "daylight"
- when: mousearea.pressed == false
- PropertyChanges { target: sky; color: "lightblue" }
- PropertyChanges { target: ground; color: "green" }
+ section {
+ property: "team"
+ criteria: ViewSection.FullString
+ delegate: Rectangle {
+ color: "#b0dfb0"
+ width: parent.width
+ height: childrenRect.height + 4
+ Text { anchors.horizontalCenter: parent.horizontalCenter
+ font.pixelSize: 16
+ font.bold: true
+ text: section
+ }
}
- ]
+ }
+}
+//! [section]
- transitions: [ Transition {
- from: "daylight"; to: "night"
- ColorAnimation { duration: 1000 }
- },
- Transition {
- from: "night"; to: "daylight"
- ColorAnimation { duration: 500 }
- }
- ]
+//! [parent end]
}
+//! [parent end]
//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/number-animation1.qml b/doc/src/snippets/declarative/listview.qml
index ccf2d36..081d2b0 100644
--- a/doc/src/snippets/declarative/qml-intro/number-animation1.qml
+++ b/doc/src/snippets/declarative/listview.qml
@@ -41,24 +41,47 @@
//! [document]
import QtQuick 1.0
+//! [parent begin]
Rectangle {
- id: mainRec
- width: 600
- height: 400
+//! [parent begin]
+ width: 175; height: 175; color: "white"
- Image {
- id: image1
- source: "images/qt-logo.svg"
- x: 200; y: 100
- width: 100; height: 100
+//! [model]
+ListModel {
+ id: petlist
+ ListElement { type: "Cat" }
+ ListElement { type: "Dog" }
+ ListElement { type: "Mouse" }
+ ListElement { type: "Rabbit" }
+ ListElement { type: "Horse" }
+}
+//! [model]
- // Animate a rotation
- transformOrigin: Item.Center
- NumberAnimation on rotation {
- from: 0; to: 360
- duration: 2000
- loops: Animation.Infinite
- }
+//! [delegate]
+Component {
+ id: petdelegate
+ Text {
+ id: label
+ font.pixelSize: 24
+ text: if (index == 0)
+ label.text = type + " (default)"
+ else
+ text: type
}
}
+//! [delegate]
+
+//! [view]
+ListView {
+ id: view
+ anchors.fill: parent
+
+ model: petlist
+ delegate: petdelegate
+}
+//! [view]
+
+//! [parent end]
+}
+//! [parent end]
//! [document]
diff --git a/doc/src/snippets/declarative/listview/listview-snippet.qml b/doc/src/snippets/declarative/listview/listview-snippet.qml
deleted file mode 100644
index f73dec9..0000000
--- a/doc/src/snippets/declarative/listview/listview-snippet.qml
+++ /dev/null
@@ -1,52 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [document]
-import QtQuick 1.0
-
-ListView {
- width: 50; height: 200
- model: 4
- delegate: Text {
- text: index;
- font.pixelSize: 40
- }
-}
-//! [document]
diff --git a/doc/src/snippets/declarative/animation-behavioral.qml b/doc/src/snippets/declarative/models/views-models-delegates.qml
index 93cf2fa..2f76856 100644
--- a/doc/src/snippets/declarative/animation-behavioral.qml
+++ b/doc/src/snippets/declarative/models/views-models-delegates.qml
@@ -37,25 +37,42 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
-import QtQuick 1.0
-Item {
- width: 100; height: 100
+//! [rectangle]
+Rectangle {
+ width: 200; height: 200
- Rectangle {
- id: rect
- width: 100; height: 100
- color: "red"
-
- Behavior on x { PropertyAnimation { duration: 500 } }
- Behavior on y { PropertyAnimation { duration: 500 } }
+ ListModel {
+ id: fruitModel
+ property string language: "en"
+ ListElement {
+ name: "Apple"
+ cost: 2.45
+ }
+ ListElement {
+ name: "Orange"
+ cost: 3.25
+ }
+ ListElement {
+ name: "Banana"
+ cost: 1.95
+ }
}
- MouseArea {
+ Component {
+ id: fruitDelegate
+ Row {
+ Text { text: " Fruit: " + name; color: ListView.view.fruit_color }
+ Text { text: " Cost: $" + cost }
+ Text { text: " Language: " + ListView.view.model.language }
+ }
+ }
+
+ ListView {
+ property color fruit_color: "green"
+ model: fruitModel
+ delegate: fruitDelegate
anchors.fill: parent
- onClicked: { rect.x = mouse.x; rect.y = mouse.y }
}
}
-//![0]
-
+//! [rectangle]
diff --git a/doc/src/snippets/declarative/animation-transitions.qml b/doc/src/snippets/declarative/models/visual-model-and-view.qml
index 62bef23..4d42b65 100644
--- a/doc/src/snippets/declarative/animation-transitions.qml
+++ b/doc/src/snippets/declarative/models/visual-model-and-view.qml
@@ -37,26 +37,21 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
-import QtQuick 1.0
Rectangle {
- id: rect
- width: 100; height: 100
- color: "red"
-
- MouseArea {
- anchors.fill: parent
- onClicked: rect.state = "moved"
- }
-
- states: State {
- name: "moved"
- PropertyChanges { target: rect; x: 50; y: 50 }
+ width: 200; height: 200
+
+ //! [visual model and view]
+ VisualItemModel {
+ id: itemModel
+ Rectangle { height: 30; width: 80; color: "red" }
+ Rectangle { height: 30; width: 80; color: "green" }
+ Rectangle { height: 30; width: 80; color: "blue" }
}
-
- transitions: Transition {
- PropertyAnimation { properties: "x,y"; duration: 1000 }
+
+ ListView {
+ anchors.fill: parent
+ model: itemModel
}
+ //! [visual model and view]
}
-//![0]
diff --git a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
index 3c2e143..03473ba 100644
--- a/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
+++ b/doc/src/snippets/declarative/mousearea/mousearea-snippet.qml
@@ -41,13 +41,60 @@
//! [document]
import QtQuick 1.0
-Rectangle {
- width: 100; height: 100
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ width: 500; height: 500
color: "green"
- MouseArea {
+Column {
+//! [anchor fill]
+Rectangle {
+ id: button
+ width: 100; height: 100
+
+ MouseArea {
anchors.fill: parent
- onClicked: { parent.color = 'red' }
+ onClicked: console.log("button clicked")
+ }
+ MouseArea {
+ width:150; height: 75
+ onClicked: console.log("irregular area clicked")
+ }
+}
+//! [anchor fill]
+
+Rectangle {
+ id: button
+ width: 100; height: 100
+
+//! [enable handlers]
+ MouseArea {
+ hoverEnabled: true
+ acceptedButtons: Qt.LeftButton | Qt.RightButton
+ onEntered: console.log("mouse entered the area")
+ onExited: console.log("mouse left the area")
}
+//! [enable handlers]
+}
+
+Rectangle {
+ id: button
+ width: 100; height: 100
+
+//! [mouse handlers]
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log("area clicked")
+ onDoubleClicked: console.log("area double clicked")
+ onEntered: console.log("mouse entered the area")
+ onExited: console.log("mouse left the area")
+ }
+//! [mouse handlers]
+}
+
+} //end of column
+//! [parent end]
}
+//! [parent end]
//! [document]
diff --git a/doc/src/snippets/declarative/pics/qt.png b/doc/src/snippets/declarative/pics/qt.png
index cbed1a9..4f68e16 100644
--- a/doc/src/snippets/declarative/pics/qt.png
+++ b/doc/src/snippets/declarative/pics/qt.png
Binary files differ
diff --git a/doc/src/snippets/declarative/properties.qml b/doc/src/snippets/declarative/properties.qml
new file mode 100644
index 0000000..330d1cf
--- /dev/null
+++ b/doc/src/snippets/declarative/properties.qml
@@ -0,0 +1,315 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+//! [document]
+import QtQuick 1.0
+
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+
+ //! [inherited properties]
+ width: 320; height: 240
+ color: "lightblue"
+ focus: true
+ //! [inherited properties]
+
+ //! [custom properties]
+ property int counter
+ property real area: 100.45
+ //! [custom properties]
+
+ //! [property types]
+ property int number
+ property real volume: 100.45
+ property date today: "2011-01-01"
+ property color background: "yellow"
+ //! [property types]
+
+
+//! [grouped properties]
+Text {
+ //dot notation
+ font.pixelSize: 12
+ font.bold: true
+}
+
+Text {
+ //group notation
+ font {pixelSize: 12; bold: true}
+}
+//! [grouped properties]
+
+
+//! [property binding]
+Rectangle {
+ width: parent.width
+}
+//! [property binding]
+
+//! [property assignment]
+Rectangle {
+ Component.onCompleted: {
+ width = 150
+ }
+}
+//! [property assignment]
+
+Rectangle {
+ //placeholder slider
+ id: slider
+ property real value
+}
+Rectangle {
+ //placeholder system
+ id: system
+ property real brightness
+}
+//! [binding element]
+Binding {
+ target: system
+ property: "brightness"
+ value: slider.value
+}
+//! [binding element]
+
+Rectangle {
+ //placeholder warning
+ id: warning
+ color: "red"
+}
+//! [PropertyChanges element]
+Rectangle {
+ id: rectangle
+
+ states: State {
+ name: "WARNING"
+ PropertyChanges {
+ target: rectangle
+ color: warning.color
+ }
+ }
+}
+//! [PropertyChanges element]
+
+//! [list property]
+Item {
+ id: multistate
+ states: [
+ State {name: "FETCH"},
+ State {name: "DECODE"},
+ State {name: "EXECUTE"}
+ ]
+}
+//! [list property]
+//! [single property]
+Item {
+ id: monostate
+ states: State {name: "RUNNING"}
+}
+//! [single property]
+
+Item {
+ id: printstate
+//! [print list property]
+ Component.onCompleted: console.log (multistate.states[0].name)
+//! [print list property]
+}
+
+//! [JavaScript sample]
+function calculateArea(width, height) {
+ return (width * height) * 0.5
+}
+
+Rectangle {
+ width: 150; height: 75
+ property real area: calculateArea(width, height)
+ property real parentArea: calculateArea(parent.width,parent.height)
+ color: { if (area > parentArea) "blue"; else "red" }
+}
+//! [JavaScript sample]
+
+//! [id property]
+Rectangle {
+ id: container
+ width: 100; height: 100
+ Rectangle {
+ width: parent.width; height: parent.height
+ }
+}
+Rectangle {
+ width: container.width; height: container.height
+}
+//! [id property]
+
+//! [default property]
+Item {
+ Text {}
+ Rectangle {}
+ Timer {}
+}
+
+Item {
+ //without default property
+ children: [
+ Text {},
+ Rectangle {}
+ ]
+ resources: [
+ Timer {}
+ ]
+}
+//! [default property]
+
+//! [state default]
+State {
+ changes: [
+ PropertyChanges {},
+ PropertyChanges {}
+ ]
+}
+
+State {
+ PropertyChanges {}
+ PropertyChanges {}
+}
+//! [state default]
+
+//! [object binding]
+Rectangle {
+
+ id: parentrectangle
+ gradient:
+ Gradient { //not a child of parentrectangle
+
+ //generates a TypeError
+ //Component.onCompleted: console.log(parent.width)
+ }
+
+ //child of parentrectangle
+ Rectangle {property string name: "childrectangle"}
+
+ //prints "childrectangle"
+ Component.onCompleted: console.log(children[0].name)
+}
+//! [object binding]
+
+//! [list attached property]
+Component {
+ id: listdelegate
+ Text {
+ text: "Hello"
+ color: ListView.isCurrentItem ? "red" : "blue"
+ }
+}
+ListView {
+ delegate: listdelegate
+}
+//! [list attached property]
+
+//! [attached signal handler]
+Item {
+ Keys.onPressed: console.log("Key Press Detected")
+ Component.onCompleted: console.log("Completed initialization")
+}
+//! [attached signal handler]
+
+//! [alias usage]
+Button {
+ id: textbutton
+ buttonLabel: "Click Me!"
+}
+//! [alias usage]
+
+//! [image alias]
+Button {
+ id: imagebutton
+ buttonImage.source: "http://qt.nokia.com/logo.png"
+ buttonLabel: buttonImage.source
+}
+//! [image alias]
+
+Item {
+id: widget
+
+//! [alias complete]
+property alias widgetLabel: label
+
+//will generate an error
+//widgetLabel.text: "Initial text"
+
+//will generate an error
+//property alias widgetLabelText: widgetLabel.text
+
+Component.onCompleted: widgetLabel.text = "Alias completed Initialization"
+//! [alias complete]
+
+ Text {id: label}
+}
+
+//![alias overwrite]
+Rectangle {
+ id: coloredrectangle
+ property alias color: bluerectangle.color
+ color: "red"
+
+ Rectangle {
+ id: bluerectangle
+ color: "#1234ff"
+ }
+
+ Component.onCompleted: {
+ console.log (coloredrectangle.color) //prints "#1234ff"
+ setInternalColor()
+ console.log (coloredrectangle.color) //prints "#111111"
+ coloredrectangle.color = "#884646"
+ console.log (coloredrectangle.color) //prints #884646
+ }
+
+ //internal function that has access to internal properties
+ function setInternalColor() {
+ color = "#111111"
+ }
+}
+//![alias overwrite]
+//! [parent end]
+}
+//! [parent end]
+//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/anchors3.qml b/doc/src/snippets/declarative/qml-intro/anchors3.qml
deleted file mode 100644
index 24851af..0000000
--- a/doc/src/snippets/declarative/qml-intro/anchors3.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: myWin
- width: 500
- height: 400
-
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 150; height: 150
- anchors.bottom: myWin.bottom
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 10
- }
-
-//! [adding some text]
- Text {
- text: "<h2>The Qt Logo</h2>"
- anchors.bottom: image1.top
- anchors.horizontalCenter: myWin.horizontalCenter
- anchors.bottomMargin: 15
- }
-//! [adding some text]
-}
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world2.qml b/doc/src/snippets/declarative/qml-intro/hello-world2.qml
deleted file mode 100644
index 2564e25..0000000
--- a/doc/src/snippets/declarative/qml-intro/hello-world2.qml
+++ /dev/null
@@ -1,56 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
-
-//! [updated text]
- Text {
- text: "<h2>Hello World</h2>"; color: "darkgreen"
- x: 100; y:100
- }
-//! [updated text]
-
- color: "lightgray"
-}
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world3.qml b/doc/src/snippets/declarative/qml-intro/hello-world3.qml
deleted file mode 100644
index 03358d0..0000000
--- a/doc/src/snippets/declarative/qml-intro/hello-world3.qml
+++ /dev/null
@@ -1,57 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
-
-//! [updated text]
- Text {
- text: "<h1>Hello world again</h1>"
- color: "#002288"
- x: 100; y: 100
- }
-//! [updated text]
-
- color: "lightgray"
-}
diff --git a/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg b/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg
deleted file mode 100644
index 8c018be..0000000
--- a/doc/src/snippets/declarative/qml-intro/images/qt-logo.svg
+++ /dev/null
@@ -1,104 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- clip-rule="evenodd"
- stroke-miterlimit="10"
- viewBox="0 0 174.35 209.78"
- id="svg2"
- sodipodi:version="0.32"
- inkscape:version="0.46"
- width="744.09186"
- height="895.29858"
- sodipodi:docname="qt-logo.svg"
- inkscape:output_extension="org.inkscape.output.svg.inkscape"
- version="1.0"
- style="stroke-miterlimit:10">
- <metadata
- id="metadata29">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <sodipodi:namedview
- inkscape:window-height="668"
- inkscape:window-width="722"
- inkscape:pageshadow="2"
- inkscape:pageopacity="0.0"
- guidetolerance="10.0"
- gridtolerance="10.0"
- objecttolerance="10.0"
- borderopacity="1.0"
- bordercolor="#666666"
- pagecolor="#ffffff"
- id="base"
- showgrid="false"
- inkscape:zoom="0.12195802"
- inkscape:cx="525.6108"
- inkscape:cy="-287.87189"
- inkscape:window-x="476"
- inkscape:window-y="228"
- inkscape:current-layer="svg2" />
- <desc
- id="desc4">SVG generated by Lineform</desc>
- <defs
- id="defs6">
- <inkscape:perspective
- sodipodi:type="inkscape:persp3d"
- inkscape:vp_x="0 : 526.18109 : 1"
- inkscape:vp_y="0 : 1000 : 0"
- inkscape:vp_z="744.09448 : 526.18109 : 1"
- inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
- id="perspective31" />
- </defs>
- <g
- id="g8"
- transform="translate(-1.5304326e-4,-3.775985e-4)">
- <path
- d="M 43.08,0.36 C 40.94,0 38.84,-0.08 36.81,0.08 L 36.8,0.08 C 36.8,0.08 22.92,1.02 22.29,1.07 C 9.62,2.08 0,12.5 0,26.89 L 0,196.55 L 14.19,209.78 L 156.79,185.81 C 166.6,184.11 174.35,172.54 174.35,160.04 L 174.35,21.88 L 43.08,0.36"
- id="path10"
- style="fill:#0c481e" />
- <path
- d="M 174.35,160.04 C 174.35,172.54 166.6,184.11 156.79,185.82 L 14.19,209.78 L 14.19,25.99 C 14.19,9.27 27.53,-2.21 43.08,0.36 L 174.35,21.88 L 174.35,160.04"
- id="path12"
- style="fill:#66b036" />
- <path
- d="M 130.42,45.91 L 141.94,47.15 L 141.94,67.36 L 154.9,68.28 L 154.9,80.96 L 141.94,80.36 L 141.94,126.69 C 141.94,130.72 142.38,133.31 143.28,134.48 C 144.08,135.55 145.32,136.07 146.99,136.07 C 147.15,136.07 147.32,136.07 147.48,136.06 C 150.03,135.91 152.81,135.13 155.83,133.75 L 155.83,145.4 C 150.69,147.65 145.65,149 140.7,149.42 C 139.99,149.47 139.29,149.5 138.62,149.5 C 134.14,149.5 130.72,148.2 128.38,145.57 C 125.65,142.52 124.29,137.62 124.29,130.9 L 124.29,79.54 L 118.06,79.26 L 118.06,65.67 L 125.65,66.22 L 130.42,45.91"
- id="path14"
- style="fill:#ffffff" />
- <path
- d="M 154.9,80.96 L 141.94,80.36 L 141.94,80.64 L 148.88,80.96 L 154.9,80.96"
- id="path16"
- style="fill:#0c481e" />
- <path
- d="M 144.64,135.6 C 145.3,135.92 146.07,136.07 146.99,136.07 C 147.15,136.07 147.32,136.07 147.48,136.06 C 150.03,135.91 152.81,135.13 155.83,133.75 L 149.81,133.75 C 147.99,134.58 146.28,135.21 144.64,135.6"
- id="path18"
- style="fill:#0c481e" />
- <path
- d="M 128.38,145.57 C 125.65,142.52 124.29,137.62 124.29,130.9 L 124.29,79.54 L 118.06,79.26 L 118.06,65.67 L 112.05,65.67 L 112.05,68.71 C 112.92,71.98 113.6,75.53 114.11,79.35 L 118.28,79.54 L 118.28,130.9 C 118.28,137.62 119.64,142.52 122.37,145.57 C 124.71,148.2 128.13,149.5 132.61,149.5 L 138.62,149.5 C 134.14,149.5 130.72,148.2 128.38,145.57 z M 130.42,45.91 L 124.41,45.91 L 119.74,65.79 L 125.65,66.22 L 130.42,45.91"
- id="path20"
- style="fill:#0c481e" />
- <path
- d="M 91.15,132.4 C 93.5,126.36 94.66,114.49 94.66,96.79 C 94.66,80.9 93.51,69.97 91.18,63.98 C 88.84,57.95 85.35,54.69 80.66,54.28 C 80.3,54.25 79.95,54.23 79.6,54.23 C 75.26,54.23 71.92,56.77 69.59,61.86 C 67.07,67.4 65.8,78.9 65.8,96.3 C 65.8,113.11 67.04,125.05 69.54,132.05 C 71.89,138.72 75.41,142.03 80.04,142.03 C 80.25,142.03 80.45,142.02 80.66,142.01 C 85.29,141.71 88.78,138.51 91.15,132.4 M 109.13,136.15 C 105.01,145.86 98.73,152.21 90.14,155.15 C 91.01,159.6 92.32,162.6 94.06,164.17 C 95.41,165.39 97.49,165.99 100.28,165.99 C 101.09,165.99 101.96,165.94 102.87,165.84 L 102.87,178.96 L 96.91,179.75 C 95.16,179.97 93.49,180.09 91.91,180.09 C 86.69,180.09 82.47,178.82 79.29,176.26 C 75.08,172.89 71.98,166.37 69.99,156.73 C 60.86,154.78 53.73,148.97 48.8,139.23 C 43.8,129.32 41.25,114.83 41.25,95.89 C 41.25,75.46 44.74,60.38 51.6,50.81 C 57.38,42.75 65.46,38.78 75.62,38.78 C 77.24,38.78 78.93,38.88 80.66,39.08 C 92.61,40.46 101.28,46.1 106.92,55.87 C 112.46,65.43 115.17,79.14 115.17,97.13 C 115.17,113.62 113.17,126.58 109.13,136.15"
- id="path22"
- style="fill:#ffffff" />
- <path
- d="M 100.28,165.99 C 101.09,165.99 101.95,165.94 102.87,165.84 L 98.04,165.84 C 98.71,165.94 99.49,165.99 100.28,165.99"
- id="path24"
- style="fill:#0c481e" />
- <path
- d="M 84.85,63.98 C 87.19,69.97 88.34,80.9 88.34,96.79 C 88.34,114.49 87.18,126.36 84.82,132.4 C 82.93,137.28 80.3,140.31 76.96,141.48 C 77.93,141.84 78.96,142.03 80.04,142.03 C 80.25,142.03 80.45,142.02 80.66,142.01 C 85.29,141.71 88.78,138.51 91.15,132.4 C 93.5,126.36 94.66,114.49 94.66,96.79 C 94.66,80.9 93.51,69.97 91.18,63.98 C 88.84,57.95 85.35,54.69 80.66,54.28 C 80.3,54.25 79.95,54.23 79.6,54.23 C 78.51,54.23 77.48,54.39 76.52,54.72 L 76.52,54.72 C 80.12,55.83 82.89,58.93 84.85,63.98 z M 82.51,178.25 C 82.4,178.2 82.28,178.15 82.17,178.09 C 82.16,178.09 82.15,178.08 82.14,178.08 C 82.03,178.03 81.93,177.97 81.83,177.92 C 81.81,177.91 81.79,177.9 81.77,177.89 C 81.68,177.84 81.59,177.79 81.49,177.74 C 81.46,177.72 81.44,177.71 81.41,177.69 C 81.33,177.65 81.24,177.6 81.16,177.55 C 81.12,177.53 81.09,177.51 81.05,177.48 C 80.98,177.44 80.91,177.4 80.84,177.36 C 80.79,177.33 80.74,177.3 80.7,177.27 C 80.64,177.23 80.58,177.19 80.52,177.15 C 80.46,177.12 80.41,177.08 80.35,177.04 C 80.3,177.01 80.25,176.98 80.2,176.94 C 80.14,176.9 80.07,176.85 80.01,176.81 C 79.97,176.78 79.93,176.75 79.89,176.72 C 79.82,176.67 79.74,176.61 79.67,176.55 C 79.64,176.54 79.61,176.52 79.59,176.5 C 79.49,176.42 79.39,176.34 79.29,176.26 C 75.08,172.89 71.98,166.37 69.99,156.73 C 60.86,154.78 53.73,148.97 48.8,139.23 C 43.8,129.32 41.25,114.83 41.25,95.89 C 41.25,75.46 44.74,60.38 51.6,50.81 C 57.38,42.75 65.46,38.78 75.62,38.78 C 75.65,38.78 69.27,38.77 69.27,38.77 L 69.27,38.78 C 59.12,38.78 51.05,42.75 45.27,50.81 C 38.41,60.38 34.92,75.46 34.92,95.89 C 34.92,114.83 37.47,129.32 42.47,139.23 C 47.41,148.97 54.53,154.78 63.67,156.73 C 65.65,166.37 68.76,172.89 72.96,176.26 C 76.14,178.82 80.36,180.09 85.58,180.09 C 85.68,180.09 85.78,180.09 85.88,180.09 L 91.42,180.09 C 88.01,180.03 85.04,179.43 82.52,178.26 C 82.51,178.26 82.51,178.26 82.51,178.25"
- id="path26"
- style="fill:#0c481e" />
- </g>
-</svg>
diff --git a/doc/src/snippets/declarative/qml-intro/number-animation2.qml b/doc/src/snippets/declarative/qml-intro/number-animation2.qml
deleted file mode 100644
index 7be22b5..0000000
--- a/doc/src/snippets/declarative/qml-intro/number-animation2.qml
+++ /dev/null
@@ -1,66 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [document]
-import QtQuick 1.0
-
-Rectangle {
- id: mainRec
- width: 600
- height: 400
-
- Image {
- id: image1
- source: "images/qt-logo.svg"
- x: 200; y: 100
- width: 100; height: 100
-
- // Animate a rotation
- transform: Rotation {
- origin.x: 50; origin.y: 50; axis {x:0; y:1; z:0} angle:0
- NumberAnimation on angle {
- from: 0; to: 360;
- duration: 3000;
- loops: Animation.Infinite
- }
- }
- }
-}
-//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/rectangle.qml b/doc/src/snippets/declarative/qml-intro/rectangle.qml
deleted file mode 100644
index b25accc..0000000
--- a/doc/src/snippets/declarative/qml-intro/rectangle.qml
+++ /dev/null
@@ -1,50 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [document]
-import QtQuick 1.0
-
-// This is a comment. And below myRectangle is defined.
-Rectangle {
- id: myRectangle
- width: 500
- height: 400
-}
-//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml
deleted file mode 100644
index c789bbe..0000000
--- a/doc/src/snippets/declarative/qml-intro/sequential-animation1.qml
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-//! [document]
-import QtQuick 1.0
-
-Rectangle {
- id: mainRec
- width: 600
- height: 400
- z: 0
-
- Image {
- id: image1
- source: "images/qt-logo.svg"
- x: 20; y: 20 ; z: 1
- width: 100; height: 100
- }
-
- Image {
- id: image2
- source: "images/qt-logo.svg"
- width: 100; height: 100
- x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2
- z: 2
- }
-}
-//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml b/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml
deleted file mode 100644
index b2b1a57..0000000
--- a/doc/src/snippets/declarative/qml-intro/sequential-animation2.qml
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** You may use this file under the terms of the BSD license as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
-** the names of its contributors may be used to endorse or promote
-** products derived from this software without specific prior written
-** permission.
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 1.0
-
-Rectangle {
- id: mainRec
- width: 600
- height: 400
- z: 0
-
-//! [adding a sequential animation]
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 100; height: 100
-
- SequentialAnimation on x {
- loops: Animation.Infinite
- NumberAnimation {
- from: 20; to: 450; easing.type: "InOutQuad";
- duration: 2000
- }
- PauseAnimation { duration: 500 }
- }
- }
-//! [adding a sequential animation]
-
- Image {
- id: image2
- source: "images/qt-logo.svg"
- width: 100; height: 100
- x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2
- z: 2
- }
-}
diff --git a/doc/src/snippets/declarative/reusablecomponents/Button.qml b/doc/src/snippets/declarative/reusablecomponents/Button.qml
new file mode 100644
index 0000000..3b97e00
--- /dev/null
+++ b/doc/src/snippets/declarative/reusablecomponents/Button.qml
@@ -0,0 +1,84 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+//! [document]
+//contents of Button.qml
+import QtQuick 1.0
+
+//! [parent begin]
+Rectangle {
+//! [parent begin]
+ id: button
+//! [properties]
+ width: 145; height: 60
+ color: "blue"
+ smooth: true; radius: 9
+ property alias text: label.text
+//! [properties]
+ border {color: "#B9C5D0"; width: 1}
+
+ gradient: Gradient {
+ GradientStop {color: "#CFF7FF"; position: 0.0}
+ GradientStop {color: "#99C0E5"; position: 0.57}
+ GradientStop {color: "#719FCB"; position: 0.9}
+ }
+
+ Text {
+ id: label
+ anchors.centerIn: parent
+ text: "Click Me!"
+ font.pointSize: 12
+ color: "blue"
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log(text + " clicked")
+ }
+//! [parent end]
+}
+//! [parent end]
+
+//! [document]
+
+//! [ellipses]
+ //...
+//! [ellipses]
+
+
diff --git a/doc/src/snippets/declarative/qml-intro/anchors1.qml b/doc/src/snippets/declarative/reusablecomponents/application.qml
index b958138..a09b276 100644
--- a/doc/src/snippets/declarative/qml-intro/anchors1.qml
+++ b/doc/src/snippets/declarative/reusablecomponents/application.qml
@@ -37,20 +37,19 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
//! [document]
import QtQuick 1.0
Rectangle {
- id: myWin
- width: 500
- height: 400
+ width: 175; height: 350
+ color: "lightgrey"
- Image {
- id: image1
- source: "images/qt-logo.svg"
- width: 150; height: 150
- anchors.bottom: myWin.bottom
+ Column {
+ anchors.centerIn: parent
+ spacing: 15
+ Button {}
+ Button {text: "Me Too!"}
+ Button {text: "Me Three!"}
}
}
//! [document]
diff --git a/doc/src/snippets/declarative/animation-standalone.qml b/doc/src/snippets/declarative/reusablecomponents/component.qml
index 0bf3020..8660c50 100644
--- a/doc/src/snippets/declarative/animation-standalone.qml
+++ b/doc/src/snippets/declarative/reusablecomponents/component.qml
@@ -37,27 +37,41 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
+//! [document]
import QtQuick 1.0
+//! [parent begin]
Rectangle {
- id: rect
- width: 100; height: 100
- color: "red"
-
- PropertyAnimation {
- id: animation
- target: rect
- properties: "x,y"
- duration: 1000
+//! [parent begin]
+ id: screen
+ width: 175; height: 175
+ color: "lightgrey"
+
+//! [define inline component]
+ Component {
+ id: inlinecomponent
+ Rectangle {
+ id: display
+ width: 50; height: 50
+ color: "blue"
+ }
}
-
+//! [define inline component]
+//! [create inline component]
MouseArea {
anchors.fill: parent
onClicked: {
- animation.to = 50;
- animation.running = true;
+ inlinecomponent.createObject(parent)
+
+ var second = inlinecomponent.createObject(parent)
+
+ var third = inlinecomponent.createObject(parent)
+ third.x = second.width + 10
+ third.color = "red"
}
- }
+ }
+//! [create inline component]
+//! [parent end]
}
-//![0]
+//! [parent end]
+//! [document]
diff --git a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml b/doc/src/snippets/declarative/reusablecomponents/focusbutton.qml
index d840575..2522a98 100644
--- a/doc/src/snippets/declarative/qml-intro/sequential-animation3.qml
+++ b/doc/src/snippets/declarative/reusablecomponents/focusbutton.qml
@@ -37,56 +37,62 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
-import QtQuick 1.0
-
//! [document]
+//contents of focusbutton.qml
import QtQuick 1.0
-Rectangle {
- id: mainRec
- width: 600
- height: 400
- z: 0
+//! [parent begin]
+FocusScope {
+//! [parent begin]
- Image {
- id: image2
- source: "images/qt-logo.svg"
- width: 100; height: 100
- x: (mainRec.width - 100)/2; y: (mainRec.height - 100)/2
- z: 2
- }
+ //! [expose visuals]
+ //FocusScope needs to bind to visual properties of the children
+ property alias color: button.color
+ x: button.x; y: button.y
+ width: button.width; height: button.height
+ //! [expose visuals]
- Image {
- id: image1
- source: "images/qt-logo.svg"
- x: 20; y: 20 ; z: 1
- width: 100; height: 100
+ //! [rectangle begin]
+ Rectangle {
+ //! [rectangle begin]
+ id: button
+ //! [properties]
+ width: 145; height: 60
+ color: "blue"
+ smooth: true; radius: 9
+ property alias text: label.text
+ //! [properties]
+ border {color: "#B9C5D0"; width: 1}
- SequentialAnimation on x {
- loops: Animation.Infinite
- NumberAnimation {
- from: 20; to: 450
- easing.type: "InOutQuad"; duration: 2000
- }
- PauseAnimation { duration: 500 }
+ gradient: Gradient {
+ GradientStop {color: "#CFF7FF"; position: 0.0}
+ GradientStop {color: "#99C0E5"; position: 0.57}
+ GradientStop {color: "#719FCB"; position: 0.9}
}
- SequentialAnimation on y {
- loops: Animation.Infinite
- NumberAnimation {
- from: 20; to: 250
- easing.type: "InOutQuad"; duration: 2000
- }
- PauseAnimation { duration: 500 }
+ Text {
+ id: label
+ anchors.centerIn: parent
+ text: "Click Me!"
+ font.pointSize: 12
+ color: "blue"
}
- SequentialAnimation on scale {
- loops: Animation.Infinite
- NumberAnimation { from: 1; to: 0.5; duration: 1000 }
- NumberAnimation { from: 0.5; to: 1; duration: 1000 }
- PauseAnimation { duration: 500 }
+ MouseArea {
+ anchors.fill: parent
+ onClicked: console.log(text + " clicked")
}
+ //! [rectangle end]
}
+ //! [rectangle end]
+//! [parent end]
}
+//! [parent end]
+
//! [document]
+
+//! [ellipses]
+ //...
+//! [ellipses]
+
+
diff --git a/doc/src/snippets/declarative/reusablecomponents/qmldir b/doc/src/snippets/declarative/reusablecomponents/qmldir
new file mode 100644
index 0000000..253732d
--- /dev/null
+++ b/doc/src/snippets/declarative/reusablecomponents/qmldir
@@ -0,0 +1,4 @@
+//! [document]
+Button ./Button.qml
+FocusButton ./focusbutton.qml
+//! [document]
diff --git a/doc/src/snippets/declarative/states.qml b/doc/src/snippets/declarative/states.qml
index c3b7197..ab6b8d0 100644
--- a/doc/src/snippets/declarative/states.qml
+++ b/doc/src/snippets/declarative/states.qml
@@ -37,24 +37,85 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-//![0]
+//![document]
import QtQuick 1.0
-
+
+//![parent begin]
Rectangle {
- id: myRect
- width: 200; height: 200
- color: "red"
+//![parent begin]
+
+ id: screen
+ width: 400; height: 500
- MouseArea {
- anchors.fill: parent
- onClicked: myRect.state = 'moved'
- }
+
+Rectangle {
+ id: flag
+}
+Column {
+ spacing: 15
+//![signal states]
+Rectangle {
+ id: signal
+ width: 200; height: 200
+ state: "NORMAL"
states: [
State {
- name: "moved"
- PropertyChanges { target: myRect; x: 50; y: 50 }
+ name: "NORMAL"
+ PropertyChanges { target: signal; color: "green"}
+ PropertyChanges { target: flag; state: "FLAG_DOWN"}
+ },
+ State {
+ name: "CRITICAL"
+ PropertyChanges { target: signal; color: "red"}
+ PropertyChanges { target: flag; state: "FLAG_UP"}
}
]
}
-//![0]
+//![signal states]
+
+//![switch states]
+Rectangle {
+ id: signalswitch
+ width: 75; height: 75
+ color: "blue"
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: {
+ if (signal.state == "NORMAL")
+ signal.state = "CRITICAL"
+ else
+ signal.state = "NORMAL"
+ }
+ }
+}
+//![switch states]
+
+//![when property]
+Rectangle {
+ id: bell
+ width: 75; height: 75
+ color: "yellow"
+
+ states: State {
+ name: "RINGING"
+ when: (signal.state == "CRITICAL")
+ PropertyChanges {target: speaker; play: "RING!"}
+ }
+}
+//![when property]
+
+Text {
+ id: speaker
+ property alias play: speaker.text
+ text: "NORMAL"
+}
+
+} // end of row
+
+//![parent end]
+}
+//![parent end]
+
+//![document]
diff --git a/doc/src/snippets/declarative/qml-intro/hello-world5.qml b/doc/src/snippets/declarative/texthandling.qml
index 7357282..377bb8b 100644
--- a/doc/src/snippets/declarative/qml-intro/hello-world5.qml
+++ b/doc/src/snippets/declarative/texthandling.qml
@@ -37,29 +37,53 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-
//! [document]
import QtQuick 1.0
+
+//! [parent begin]
Rectangle {
- id: myRectangle
- width: 500
- height: 400
+//! [parent begin]
+ width: 300; height: 300
+ id: screen
+
+Column {
+ anchors.centerIn:parent
+
+//! [int validator]
+Column {
+ spacing: 10
Text {
- text: "<h1>Hello world again</h1>"
- color: "#002288"
- x: 100; y: 100
+ text: "Enter a value from 0 to 2000"
}
+ TextInput {
+ focus: true
+ validator: IntValidator { bottom:0; top: 2000}
+ }
+}
+//! [int validator]
+
+//! [regexp validator]
+Column {
+ spacing: 10
-//! [positioning the image]
- Image {
- source: "images/qt-logo.svg"
- x: 100; y: 150
- width: 150; height: 150
+ Text {
+ text: "Which basket?"
+ }
+ TextInput {
+ focus: true
+ validator: RegExpValidator { regExp: /fruit basket/ }
}
-//! [positioning the image]
+}
+//! [regexp validator]
- color: "lightgray"
+//end of column
}
+
+//! [parent end]
+}
+//! [parent end]
+
//! [document]
+
diff --git a/doc/src/snippets/declarative/webview/webview.qml b/doc/src/snippets/declarative/webview/webview.qml
index dac8010..f652369 100644
--- a/doc/src/snippets/declarative/webview/webview.qml
+++ b/doc/src/snippets/declarative/webview/webview.qml
@@ -39,7 +39,9 @@
****************************************************************************/
//! [document]
+//! [import]
import QtWebKit 1.0
+//! [import]
WebView {
url: "http://www.nokia.com"
diff --git a/doc/src/snippets/qtreeview-dnd/dragdropmodel.h b/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
index ed01540..a20b1bb 100644
--- a/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
+++ b/doc/src/snippets/qtreeview-dnd/dragdropmodel.h
@@ -38,17 +38,6 @@
**
****************************************************************************/
-/****************************************************************************
-**
-** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of an example program for Qt.
-** EDITIONS: NOLIMITS
-**
-****************************************************************************/
-
#ifndef DRAGDROPMODEL_H
#define DRAGDROPMODEL_H
diff --git a/doc/src/snippets/qtscript/evaluation/main.cpp b/doc/src/snippets/qtscript/evaluation/main.cpp
index e7efd8e..01e06b6 100644
--- a/doc/src/snippets/qtscript/evaluation/main.cpp
+++ b/doc/src/snippets/qtscript/evaluation/main.cpp
@@ -42,9 +42,9 @@
int main(int argc, char *argv[])
{
-//! [0]
+ //! [0]
QScriptEngine engine;
qDebug() << "the magic number is:" << engine.evaluate("1 + 2").toNumber();
-//! [0]
+ //! [0]
return 0;
}
diff --git a/doc/src/snippets/qtscript/registeringobjects/main.cpp b/doc/src/snippets/qtscript/registeringobjects/main.cpp
index 1911442..9dab25a 100644
--- a/doc/src/snippets/qtscript/registeringobjects/main.cpp
+++ b/doc/src/snippets/qtscript/registeringobjects/main.cpp
@@ -44,12 +44,12 @@
int main(int argc, char *argv[])
{
-//! [0]
+ //! [0]
QScriptEngine engine;
QObject *someObject = new MyObject;
QScriptValue objectValue = engine.newQObject(someObject);
engine.globalObject().setProperty("myObject", objectValue);
-//! [0]
+ //! [0]
qDebug() << "myObject's calculate() function returns"
<< engine.evaluate("myObject.calculate(10)").toNumber();
return 0;
diff --git a/doc/src/snippets/qtscript/registeringvalues/main.cpp b/doc/src/snippets/qtscript/registeringvalues/main.cpp
index 3defc1f..6dc5b7c 100644
--- a/doc/src/snippets/qtscript/registeringvalues/main.cpp
+++ b/doc/src/snippets/qtscript/registeringvalues/main.cpp
@@ -43,10 +43,10 @@
int main(int argc, char *argv[])
{
QScriptEngine engine;
-//! [0]
+ //! [0]
engine.globalObject().setProperty("foo", 123);
qDebug() << "foo times two is:" << engine.evaluate("foo * 2").toNumber();
-//! [0]
+ //! [0]
return 0;
}
diff --git a/doc/src/snippets/textblock-fragments/xmlwriter.cpp b/doc/src/snippets/textblock-fragments/xmlwriter.cpp
index 9f66d9a..252720b 100644
--- a/doc/src/snippets/textblock-fragments/xmlwriter.cpp
+++ b/doc/src/snippets/textblock-fragments/xmlwriter.cpp
@@ -102,11 +102,10 @@ void XmlWriter::readFragment(const QTextBlock &currentBlock,
QDomText fragmentText = document->createTextNode(currentFragment.text());
fragmentElement.appendChild(fragmentText);
-//! [6]
}
-//! [7]
- }
//! [6] //! [7]
+ }
+//! [7] //! [6]
}
void XmlWriter::processBlock(const QTextBlock &currentBlock)
diff --git a/doc/src/snippets/textdocument-frames/xmlwriter.cpp b/doc/src/snippets/textdocument-frames/xmlwriter.cpp
index 31f08f3..8988100 100644
--- a/doc/src/snippets/textdocument-frames/xmlwriter.cpp
+++ b/doc/src/snippets/textdocument-frames/xmlwriter.cpp
@@ -100,6 +100,8 @@ void XmlWriter::processFrame(QDomElement &parent, QTextFrame *frame)
parent.appendChild(frameElement);
//! [1]
+ QDomElement frameElement = ...
+
QTextFrame::iterator it;
for (it = frame->begin(); !(it.atEnd()); ++it) {
diff --git a/doc/src/snippets/textdocument-tables/xmlwriter.cpp b/doc/src/snippets/textdocument-tables/xmlwriter.cpp
index d1d6798..8f98295 100644
--- a/doc/src/snippets/textdocument-tables/xmlwriter.cpp
+++ b/doc/src/snippets/textdocument-tables/xmlwriter.cpp
@@ -98,6 +98,8 @@ void XmlWriter::processFrame(QDomElement &parent, QTextFrame *frame)
parent.appendChild(frameElement);
//! [0]
+ QDomElement frameElement = ...
+
QTextFrame::iterator it;
for (it = frame->begin(); !(it.atEnd()); ++it) {
diff --git a/doc/src/sql-programming/sql-driver.qdoc b/doc/src/sql-programming/sql-driver.qdoc
index a4bcb97..2cb7aab 100644
--- a/doc/src/sql-programming/sql-driver.qdoc
+++ b/doc/src/sql-programming/sql-driver.qdoc
@@ -121,7 +121,7 @@
Source code to access the OUT values:
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 2
\bold{Note:} \c{@outval1} and \c{@outval2} are variables local to the current
connection and will not be affected by queries sent from another host
@@ -394,7 +394,7 @@
sets, will be accessible only if you set the query's forward only
mode to \e forward using \l QSqlQuery::setForwardOnly().
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 10
\bold{Note:} The value returned by the stored procedure's return statement
is discarded.
@@ -681,7 +681,7 @@
database file, no matter whether it is stored locally or on another
server.
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 24
You need the InterBase/Firebird development headers and libraries
to build this plugin.
@@ -696,7 +696,7 @@
be overridden by setting the ISC_DPB_LC_CTYPE parameter with
QSqlDatabase::setConnectOptions() before opening the connection.
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 25
If Qt doesn't support the given text encoding the driver will issue a
warning message and connect to the database using UNICODE_FSS.
@@ -710,7 +710,7 @@
procedure, only IN values need to be bound via QSqlQuery::bindValue(). The
RETURN/OUT values can be retrieved via QSqlQuery::value(). Example:
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 26
\section3 How to Build the QIBASE Plugin on Unix and Mac OS X
@@ -777,7 +777,7 @@
Make sure you have followed the guide to \l{Deploying Plugins}.
If you experience plugin load problems and see output like this:
- \snippet doc/src/snippets/code/doc_src_sql-driver.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_sql-driver.cpp 31
the problem is usually that the plugin had the wrong \l{Deploying
Plugins#The Build Key}{build key}. This might require removing an
diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css
index 4083a75..44abb3c 100644
--- a/doc/src/template/style/offline.css
+++ b/doc/src/template/style/offline.css
@@ -26,14 +26,14 @@
{
text-decoration: none;
}
- li
- {
- list-style: none;
- }
ol li
{
list-style: decimal;
}
+ ul li
+ {
+ list-style: none;
+ }
caption, th
{
text-align: left;
@@ -76,6 +76,8 @@
{
margin-left: 0.5em;
margin-right: 0.5em;
+ font-family: sans-serif;
+ line-height: normal
}
a
{
@@ -124,13 +126,13 @@
}
th
{
- padding: 0.5em 1.5em 0.5em 1.5em;
+ padding: 0.5em 1.5em 0.5em 1em;
background-color: #E1E1E1;
border-left: 1px solid #E6E6E6;
}
td
{
- padding: 0.25em 1.5em 0.25em 2em;
+ padding: 0.25em 1.5em 0.25em 1em;
}
td.rightAlign
@@ -141,13 +143,13 @@
{
border-left: 1px solid #E6E6E6;
background-color: #F6F6F6;
- color: #66666E;
+ color: black;
}
table tr.even
{
border-left: 1px solid #E6E6E6;
background-color: #ffffff;
- color: #66666E;
+ color: #202020;
}
div.float-left
@@ -239,10 +241,6 @@
margin-bottom: 0.5em
}
- .naviNextPrevious
- {
- display: none
- }
.header .breadcrumb
{
font-size: 90%;
@@ -309,19 +307,19 @@
.content h1
{
font-weight: bold;
- font-size: 150%
+ font-size: 130%
}
.content h2
{
font-weight: bold;
- font-size: 135%;
+ font-size: 120%;
width: 100%;
}
.content h3
{
font-weight: bold;
- font-size: 120%;
+ font-size: 110%;
width: 100%;
}
.content table p
@@ -471,6 +469,11 @@
padding: 0.25em 0.5em 0.25em 0.5em;
}
+ .toc
+ {
+ font-size: 80%
+ }
+
.header .content .toc ul
{
padding-left: 0px;
diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css
index df2729c..4071145 100755
--- a/doc/src/template/style/style.css
+++ b/doc/src/template/style/style.css
@@ -7,7 +7,7 @@
color: #000000;
background: #FFFFFF;
}
- body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td
+ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, th, td
{
margin: 0;
padding: 0;
@@ -146,13 +146,13 @@
}
th
{
- padding: 5px 15px 5px 15px;
+ padding: 5px 15px 5px 10px;
background-color: #E1E1E1;
border-left: 1px solid #E6E6E6;
}
td
{
- padding: 3px 15px 3px 20px;
+ padding: 3px 15px 3px 10px;
}
tr.odd td:hover, tr.even td:hover {}
@@ -185,10 +185,165 @@
{
float: right; margin-left: 2em
}
+ div.clear-both
+ {
+ clear: both
+ }
+ div.clear-left
+ {
+ clear: left
+ }
+ div.clear-right
+ {
+ clear: right
+ }
+ #color-white
+ {
+ background: #ffffff;
+ color: #000000;
+ }
+ #color-black
+ {
+ background: #000000;
+ color: #ffffff;
+ }
+ #color-red
+ {
+ background: #ff0000;
+ color: #000000;
+ }
+ #color-darkRed
+ {
+ background: #800000;
+ color: #ffffff;
+ }
+ #color-green
+ {
+ background: #00ff00;
+ color: #000000;
+ }
+ #color-darkGreen
+ {
+ background: #008000;
+ color: #ffffff;
+ }
+ #color-blue
+ {
+ background: #0000ff;
+ color: #ffffff;
+ }
+ #color-darkBlue
+ {
+ background: #000080;
+ color: #ffffff;
+ }
+ #color-cyan
+ {
+ background: #00ffff;
+ color: #000000;
+ }
+ #color-darkCyan
+ {
+ background: #008080;
+ color: #ffffff;
+ }
+ #color-magenta
+ {
+ background: #ff00ff;
+ color: #000000;
+ }
+ #color-darkMagenta
+ {
+ background: #800080;
+ color: #ffffff;
+ }
+ #color-yellow
+ {
+ background: #ffff00;
+ color: #000000;
+ }
+ #color-darkYellow
+ {
+ background: #808000;
+ color: #ffffff;
+ }
+ #color-gray
+ {
+ background: #a0a0a4;
+ color: #000000;
+ }
+ #color-darkGray
+ {
+ background: #808080;
+ color: #ffffff;
+ }
+ #color-lightGray
+ {
+ background: #c0c0c0;
+ color: #000000;
+ }
+ #QtGuiColor
+ {
+ background-color: #98fd00;
+ color: black;
+ }
+ #QtCoreColor
+ {
+ background-color: #9c9cff;
+ color: black;
+ }
+ #DefaultColor
+ {
+ background-color: #f6f6dc;
+ color: black;
+ }
+ #FreetypeColor
+ {
+ background-color: #e6e6fa;
+ color: black;
+ }
+ #GLColor
+ {
+ background-color: #ffc0cb;
+ color: black;
+ }
+ #PthreadColor
+ {
+ background-color: #bdb76b;
+ color: black;
+ }
+ #OptionalColor
+ {
+ background-color: #cae1ff;
+ color: black;
+ }
+ #SMColor
+ {
+ background-color: #c2fafa;
+ color: black;
+ }
+ #MiscColor
+ {
+ background-color: #f0f9ff;
+ color: black;
+ }
+ #GlibColor
+ {
+ background-color: #b3b3b3;
+ color: black;
+ }
+ .figCaption
+ {
+ color:#363534;
+ font:italic 11px/1.2 Verdana;
+ text-align: center;
+ padding-top:0;
+ }
span.comment
{
color: #008B00;
+ font-style: italic
}
span.string, span.char
{
@@ -1030,11 +1185,28 @@
padding:0px;
}
- .content .alignedsummary
- {
- margin: 15px;
- }
-
+ .content .alignedsummary
+ {
+ margin: 15px;
+ }
+
+ .details
+ {
+ text-align: left;
+ font-size: 80%;
+ color: blue
+ }
+ .variableName
+ {
+ font-family: courier;
+ color: blue
+ }
+ .newStuff
+ {
+ text-align: left;
+ font-size: 80%;
+ color: red
+ }
.qmltype
{
@@ -1381,6 +1553,10 @@
font: normal bold 13px/1 Verdana;
}
+ .content .normallist li
+ {
+ font: normal 13px/1 Verdana;
+ }
.indexbox a:hover, .indexbox a:visited:hover
{
color: #4c0033;
@@ -1417,6 +1593,13 @@
background: url(../images/sprites-combined.png) no-repeat -111px -376px;
padding: 0;
}
+ .indexbox.tools .indexIcon2
+ {
+ width: 115px;
+ height: 137px;
+ background: url(../images/sprites-combined.png) no-repeat -111px -376px;
+ padding: 0;
+ }
.indexboxcont:after
{
content: ".";
diff --git a/doc/src/tutorials/modelview.qdoc b/doc/src/tutorials/modelview.qdoc
index cae7764..efd0ff2 100644
--- a/doc/src/tutorials/modelview.qdoc
+++ b/doc/src/tutorials/modelview.qdoc
@@ -27,7 +27,7 @@
/*!
\page modelview.html
-
+ \ingroup tutorials
\startpage {index.html}{Qt Reference Documentation}
\title Model/View Tutorial
diff --git a/doc/src/tutorials/threads.qdoc b/doc/src/tutorials/threads.qdoc
new file mode 100644
index 0000000..1d807a0
--- /dev/null
+++ b/doc/src/tutorials/threads.qdoc
@@ -0,0 +1,572 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of this
+** file.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \page thread-basics.html
+ \ingroup tutorials
+ \startpage {index.html}{Qt Reference Documentation}
+
+ \title Threading Basics
+ \brief An introduction to threads
+
+ \section1 What Are Threads
+
+ Threads are about doing things in parallel, just like processes. So how do
+ threads differ from processes? While you are making calculations on a
+ spreadsheet, there may also be a media player running on the same desktop
+ playing your favorite song. Here is an example of two processes working in
+ parallel: one running the spreadsheet program; one running a media player.
+ Multitasking is a well known term for this. A closer look at the media
+ player reveals that there are again things going on in parallel within one
+ single process. While the media player is sending music to the audio driver,
+ the user interface with all its bells and whistles is being constantly
+ updated. This is what threads are for \mdash concurrency within one single
+ process.
+
+ So how is concurrency implemented? Parallel work on single core CPUs is an
+ illusion which is somewhat similar to the illusion of moving images in
+ cinema.
+ For processes, the illusion is produced by interrupting the processor's
+ work on one process after a very short time. Then the processor moves on to
+ the next process. In order to switch between processes, the current program
+ counter is saved and the next processor's program counter is loaded. This
+ is not sufficient because the same needs to be done with registers and
+ certain architecture and OS specific data.
+
+ Just as one CPU can power two or more processes, it is also possible to let
+ the CPU run on two different code segments of one single process. When a
+ process starts, it always executes one code segment and therefore the
+ process is said to have one thread. However, the program may decide to
+ start a second thread. Then, two different code sequences are processed
+ simultaneously inside one process. Concurrency is achieved on single core
+ CPUs by repeatedly saving program counters and registers then loading the
+ next thread's program counters and registers. No cooperation from the
+ program is required to cycle between the active threads. A thread may be in
+ any state when the switch to the next thread occurs.
+
+ The current trend in CPU design is to have several cores. A typical
+ single-threaded application can make use of only one core. However, a
+ program with multiple threads can be assigned to multiple cores, making
+ things happen in a truly concurrent way. As a result, distributing work
+ to more than one thread can make a program run much faster on multicore
+ CPUs because additional cores can be used.
+
+ \section2 GUI Thread and Worker Thread
+
+ As mentioned, each program has one thread when it is started. This thread
+ is called the "main thread" (also known as the "GUI thread" in Qt
+ applications). The Qt GUI must run in this thread. All widgets and several
+ related classes, for example QPixmap, don't work in secondary threads.
+ A secondary thread is commonly referred to as a "worker thread" because it
+ is used to offload processing work from the main thread.
+
+ \section2 Simultaneous Access to Data
+
+ Each thread has its own stack, which means each thread has its own call
+ history and local variables. Unlike processes, threads share the same
+ address space. The following diagram shows how the building blocks of
+ threads are located in memory. Program counter and registers of inactive
+ threads are typically kept in kernel space. There is a shared copy of the
+ code and a separate stack for each thread.
+
+ \image threadvisual-example.png "Thread visualization"
+
+ If two threads have a pointer to the same object, it is possible that both
+ threads will access that object at the same time and this can potentially
+ destroy the object's integrity. It's easy to imagine the many things that
+ can go wrong when two methods of the same object are executed
+ simultaneously.
+
+ Sometimes it is necessary to access one object from different threads;
+ for example, when objects living in different threads need to communicate.
+ Since threads use the same address space, it is easier and faster for
+ threads to exchange data than it is for processes. Data does not have to be
+ serialized and copied. Passing pointers is possible, but there must be a
+ strict coordination of what thread touches which object. Simultaneous
+ execution of operations on one object must be prevented. There are several
+ ways of achieving this and some of them are described below.
+
+ So what can be done safely? All objects created in a thread can be used
+ safely within that thread provided that other threads don't have references
+ to them and objects don't have implicit coupling with other threads. Such
+ implicit coupling may happen when data is shared between instances as with
+ static members, singletons or global data. Familiarize yourself with the
+ concept of \l{Reentrancy and Thread-Safety}{thread safe and reentrant}
+ classes and functions.
+
+ \section1 Using Threads
+
+ There are basically two use cases for threads:
+
+ \list
+ \o Make processing faster by making use of multicore processors.
+ \o Keep the GUI thread or other time critical threads responsive by
+ offloading long lasting processing or blocking calls to other threads.
+ \endlist
+
+ \section2 When to Use Alternatives to Threads
+
+ Developers need to be very careful with threads. It is easy to start other
+ threads, but very hard to ensure that all shared data remains consistent.
+ Problems are often hard to find because they may only show up once in a
+ while or only on specific hardware configurations. Before creating threads
+ to solve certain problems, possible alternatives should be considered.
+
+ \table
+ \header
+ \o Alternative
+ \o Comment
+ \row
+ \o QEventLoop::processEvents()
+ \o Calling QEventLoop::processEvents() repeatedly during a
+ time-consuming calculation prevents GUI blocking. However, this
+ solution doesn't scale well because the call to processEvents() may
+ occur too often, or not often enough, depending on hardware.
+ \row
+ \o QTimer
+ \o Background processing can sometimes be done conveniently using a
+ timer to schedule execution of a slot at some point in the future.
+ A timer with an interval of 0 will time out as soon as there are no
+ more events to process.
+ \row
+ \o QSocketNotifier QNetworkAccessManager QIODevice::readyRead()
+ \o This is an alternative to having one or multiple threads, each with
+ a blocking read on a slow network connection. As long as the
+ calculation in response to a chunk of network data can be executed
+ quickly, this reactive design is better than synchronous waiting in
+ threads. Reactive design is less error prone and energy efficient
+ than threading. In many cases there are also performance benefits.
+ \endtable
+
+ In general, it is recommended to only use safe and tested paths and to
+ avoid introducing ad-hoc threading concepts. QtConcurrent provides an easy
+ interface for distributing work to all of the processor's cores. The
+ threading code is completely hidden in the QtConcurrent framework, so you
+ don't have to take care of the details. However, QtConcurrent can't be used
+ when communication with the running thread is needed, and it shouldn't be
+ used to handle blocking operations.
+
+ \section2 Which Qt Thread Technology Should You Use?
+
+ Sometimes you want to do more than just running a method in the context of
+ another thread. You may want to have an object which lives in another
+ thread that provides a service to the GUI thread. Maybe you want another
+ thread to stay alive forever to poll hardware ports and send a signal to
+ the GUI thread when something noteworthy has happened. Qt provides
+ different solutions for developing threaded applications. The right
+ solution depends on the purpose of the new thread as well as on the
+ thread's lifetime.
+
+ \table
+ \header
+ \o Lifetime of thread
+ \o Development task
+ \o Solution
+ \row
+ \o One call
+ \o Run one method within another thread and quit the thread when the
+ method is finished.
+ \o Qt provides different solutions:
+ \list
+ \o Write a function and run it with QtConcurrent::run()
+ \o Derive a class from QRunnable and run it in the global thread
+ pool with QThreadPool::globalInstance()->start()
+ \o Derive a class from QThread, reimplement the QThread::run()
+ method and use QThread::start() to run it.
+ \endlist
+
+ \row
+ \o One call
+ \o Operations are to be performed on all items of a container.
+ Processing should be performed using all available cores. A common
+ example is to produce thumbnails from a list of images.
+ \o QtConcurrent provides the \l{QtConcurrent::}{map()} function for
+ applying operations on every container element,
+ \l{QtConcurrent::}{filter()} for selecting container elements, and
+ the option of specifying a reduce function for combining the
+ remaining elements.
+ \row
+ \o One call
+ \o A long running operation has to be put in another thread. During the
+ course of processing, status information should be sent to the GUI
+ thread.
+ \o Use QThread, reimplement run and emit signals as needed. Connect the
+ signals to the GUI thread's slots using queued signal/slot
+ connections.
+
+ \row
+ \o Permanent
+ \o Have an object living in another thread and let it perform different
+ tasks upon request.
+ This means communication to and from the worker thread is required.
+ \o Derive a class from QObject and implement the necessary slots and
+ signals, move the object to a thread with a running event loop and
+ communicate with the object over queued signal/slot connections.
+ \row
+ \o Permanent
+ \o Have an object living in another thread, let the object perform
+ repeated tasks such as polling a port and enable communication with
+ the GUI thread.
+ \o Same as above but also use a timer in the worker thread to implement
+ polling. However, the best solution for polling is to avoid it
+ completely. Sometimes using QSocketNotifier is an alternative.
+ \endtable
+
+
+ \section1 Qt Thread Basics
+
+ QThread is a very convenient cross platform abstraction of native platform
+ threads. Starting a thread is very simple. Let us look at a short piece of
+ code that generates another thread which says hello in that thread and then
+ exits.
+
+ \snippet examples/tutorials/threads/hellothread/hellothread.h 1
+
+ We derive a class from QThread and reimplement the \l{QThread::}{run()}
+ method.
+
+ \snippet examples/tutorials/threads/hellothread/hellothread.cpp 1
+
+ The run method contains the code that will be run in a separate thread. In
+ this example, a message containing the thread ID will be printed.
+ QThread::start() will call the method in another thread.
+
+ \snippet examples/tutorials/threads/hellothread/main.cpp 1
+
+ To start the thread, our thread object needs to be instantiated. The
+ \l{QThread::}{start()} method creates a new thread and calls the
+ reimplemented \l{QThread::}{run()} method in this new thread. Right after
+ \l{QThread::}{start()} is called, two program counters walk through the
+ program code. The main function starts with only the GUI thread running and
+ it should terminate with only the GUI thread running. Exiting the program
+ when another thread is still busy is a programming error, and therefore,
+ wait is called which blocks the calling thread until the
+ \l{QThread::}{run()} method has completed.
+
+ This is the result of running the code:
+
+ \badcode
+ hello from GUI thread 3079423696
+ hello from worker thread 3076111216
+ \endcode
+
+
+ \section2 QObject and Threads
+
+ A QObject is said to have a \e{thread affinity} or, in other words, that it
+ lives in a certain thread. This means that, at creation time, QObject saves
+ a pointer to the current thread. This information becomes relevant when an
+ event is posted with \l{QCoreApplication::}{postEvent()}. The event will be
+ put in the corresponding thread's event loop. If the thread where the
+ QObject lives doesn't have an event loop, the event will never be delivered.
+
+ To start an event loop, \l{QThread::}{exec()} must be called inside
+ \l{QThread::}{run()}. Thread affinity can be changed using
+ \l{QObject::}{moveToThread()}.
+
+ As mentioned above, developers must always be careful when calling objects'
+ methods from other threads. Thread affinity does not change this situation.
+ Qt documentation marks several methods as thread-safe.
+ \l{QCoreApplication::}{postEvent()} is a noteworthy example. A thread-safe
+ method may be called from different threads simultaneously.
+
+ In cases where there is usually no concurrent access to methods, calling
+ non-thread-safe methods of objects in other threads may work thousands
+ of times before a concurrent access occurs, causing unexpected behavior.
+ Writing test code does not entirely ensure thread correctness, but it is
+ still important.
+ On Linux, Valgrind and Helgrind can help detect threading errors.
+
+ The anatomy of QThread is quite interesting:
+
+ \list
+ \o QThread does not live in the new thread where \l{QThread::}{run()} is
+ executed. It lives in the old thread.
+ \o Most QThread methods are the thread's control interface and are meant to
+ be called from the old thread. Do not move this interface to the newly
+ created thread using \l{QObject::}{moveToThread()}; i.e., calling
+ \l{QObject::moveToThread()}{moveToThread(this)} is regarded as bad
+ practice.
+ \o \l{QThread::}{exec()} and the static methods
+ \l{QThread::}{usleep()}, \l{QThread::}{msleep()},
+ \l{QThread::}{sleep()} are meant to be called from the newly created
+ thread.
+ \o Additional members defined in the QThread subclass are
+ accessible by both threads. The developer is responsible for
+ coordinating access. A typical strategy is to set the members before
+ \l{QThread::}{start()} is called. Once the worker thread is running,
+ the main thread should not touch the additional members anymore. After
+ the worker has terminated, the main thread can access the additional
+ members again. This is a convenient strategy for passing parameters to a
+ thread before it is started as well as for collecting the result once it
+ has terminated.
+ \endlist
+
+ A QObject's parent must always be in the same thread. This has a surprising
+ consequence for objects generated within the \l{QThread::}{run()} method:
+
+ \code
+ void HelloThread::run()
+ {
+ QObject *object1 = new QObject(this); //error, parent must be in the same thread
+ QObject object2; // OK
+ QSharedPointer <QObject> object3(new QObject); // OK
+ }
+ \endcode
+
+ \section2 Using a Mutex to Protect the Integrity of Data
+
+ A mutex is an object that has \l{QMutex::}{lock()} and \l{QMutex::}{unlock()}
+ methods and remembers if it is already locked. A mutex is designed to be
+ called from multiple threads. \l{QMutex::}{lock()} returns immediately if
+ the mutex is not locked. The next call from another thread will find the
+ mutex in a locked state and then \l{QMutex::}{lock()} will block the thread
+ until the other thread calls \l{QMutex::}{unlock()}. This functionality can
+ make sure that a code section will be executed by only one thread at a time.
+
+ The following line sketches how a mutex can be used to make a method
+ thread-safe:
+
+ \code
+ void Worker::work()
+ {
+ this->mutex.lock(); // first thread can pass, other threads will be blocked here
+ doWork();
+ this->mutex.unlock();
+ }
+ \endcode
+
+ What happens if one thread does not unlock a mutex? The result can be a
+ frozen application. In the example above, an exception might be thrown and
+ \c{mutex.unlock()} will never be reached. To prevent problems like this,
+ QMutexLocker should be used.
+
+ \code
+ void Worker::work()
+ {
+ QMutexLocker locker(&mutex); // Locks the mutex and unlocks when locker exits the scope
+ doWork();
+ }
+ \endcode
+
+ This looks easy, but mutexes introduce a new class of problems: deadlocks.
+ A deadlock happens when a thread waits for a mutex to become unlocked, but
+ the mutex remains locked because the owning thread is waiting for the first
+ thread to unlock it. The result is a frozen application. Mutexes can be
+ used to make a method thread safe. Most Qt methods aren't thread safe
+ because there is always a performance penalty when using mutexes.
+
+ It isn't always possible to lock and unlock a mutex in a method. Sometimes
+ the need to lock spans several calls. For example, modifying a container
+ with an iterator requires a sequence of several calls which should not be
+ interrupted by other threads. In such a scenario, locking can be achieved
+ with a mutex that is kept outside of the object to be manipulated. With an
+ external mutex, the duration of locking can be adjusted to the needs of the
+ operation. One disadvantage is that external mutexes aid locking, but do
+ not enforce it because users of the object may forget to use it.
+
+ \section2 Using the Event Loop to Prevent Data Corruption
+
+ The event loops of Qt are a very valuable tool for inter-thread
+ communication. Every thread may have its own event loop. A safe way of
+ calling a slot in another thread is by placing that call in another
+ thread's event loop. This ensures that the target object finishes the
+ method that is currently running before another method is started.
+
+ So how is it possible to put a method invocation in an event loop? Qt has
+ two ways of doing this. One way is via queued signal-slot connections; the
+ other way is to post an event with QCoreApplication::postEvent(). A queued
+ signal-slot connection is a signal slot connection that is executed
+ asynchronously. The internal implementation is based on posted events. The
+ arguments of the signal are put into the event loop and the signal method
+ returns immediately.
+
+ The connected slot will be executed at a time which depends on what else is
+ in the event loop.
+
+ Communication via the event loop eliminates the deadlock problem we face
+ when using mutexes. This is why we recommend using the event loop rather
+ than locking an object using a mutex.
+
+ \section2 Dealing with Asynchronous Execution
+
+ One way to obtain a worker thread's result is by waiting for the thread
+ to terminate. In many cases, however, a blocking wait isn't acceptable. The
+ alternative to a blocking wait are asynchronous result deliveries with
+ either posted events or queued signals and slots. This generates a certain
+ overhead because an operation's result does not appear on the next source
+ line, but in a slot located somewhere else in the source file. Qt
+ developers are used to working with this kind of asynchronous behavior
+ because it is much similar to the kind of event-driven programming used in
+ GUI applications.
+
+ \section1 Examples
+
+ This tutorial comes with examples for Qt's three basic ways of working with
+ threads. Two more examples show how to communicate with a running thread
+ and how a QObject can be placed in another thread, providing service to the
+ main thread.
+
+ \list
+ \o Using QThread as shown \l{Qt thread basics}{above}
+ \o \l{Example 1: Using the Thread Pool}{Using the global QThreadPool}
+ \o \l{Example 2: Using QtConcurrent}{Using QtConcurrent}
+ \o \l{Example 3: Clock}{Communication with the GUI thread}
+ \o \l{Example 4: A Permanent Thread}{A permanent QObject in another thread
+ provides service to the main thread}
+ \endlist
+
+ The following examples can all be compiled and run independently. The source can
+ be found in the examples directory: examples/tutorials/threads/
+
+ \section2 Example 1: Using the Thread Pool
+
+ Creating and destroying threads frequently can be expensive. To avoid the
+ cost of thread creation, a thread pool can be used. A thread pool is a
+ place where threads can be parked and fetched. We can write the same
+ "hello thread" program as \l{Qt Thread Basics}{above} using the global
+ thread pool. We derive a class from QRunnable. The code we want to run in
+ another thread needs to be placed in the reimplemented QRunnable::run()
+ method.
+
+ \snippet examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp 1
+
+ We instantiate Work in main(), locate the global thread pool and use the
+ QThreadPool::start() method. Now the thread pool runs our worker in another
+ thread. Using the thread pool has a performance advantage because threads
+ are not destroyed after they have finished running. They are kept in a pool
+ and wait to be used again later.
+
+ \section2 Example 2: Using QtConcurrent
+
+ \snippet examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp 1
+
+ We write a global function hello() to implement the work. QtConcurrent::run()
+ is used to run the function in another thread. The result is a QFuture.
+ QFuture provides a method called \l{QFuture::}{waitForFinished()}, which
+ blocks until the calculation is completed. The real power of QtConcurrent
+ becomes visible when data can be made available in a container. QtConcurrent
+ provides several functions that are able to process itemized data on all
+ available cores simultaneously. The use of QtConcurrent is very similar to
+ applying an STL algorithm to an STL container.
+ \l{examples-threadandconcurrent.html}{QtConcurrent Map} is a very short and
+ clear example about how a container of images can be scaled on all available
+ cores. The image scaling example uses the blocking variants of the functions
+ used. For every blocking function there is also a non-blocking, asynchronous
+ counterpart. Getting results asynchronously is implemented with QFuture and
+ QFutureWatcher.
+
+ \section2 Example 3: Clock
+
+ \image thread_clock.png "clock"
+
+ We want to produce a clock application. The application has a GUI and a
+ worker thread. The worker thread checks every 10 milliseconds what time it
+ is. If the formatted time has changed, the result will be sent to the GUI
+ thread where it is displayed.
+
+ Of course, this is an overly complicated way of designing a clock and,
+ actually, a separate thread is unnecessary. We would be better off placing
+ the timer in the main thread because the calculation made in the timer slot
+ is very short-lived. This example is purely for instructional use and shows
+ how to communicate from a worker thread to a GUI thread. Note that
+ communication in this direction is easy. We only need to add a signal
+ to QThread and make a queued signal/slot connection to the main thread.
+ Communication from the GUI to the worker thread is shown in the next
+ example.
+
+ \snippet examples/tutorials/threads/clock/main.cpp 1
+
+ We've connected the \c clockThread with the label. The connection must be a
+ queued signal-slot connection because we want to put the call in the event
+ loop.
+
+ \snippet examples/tutorials/threads/clock/clockthread.h 1
+
+ We have derived a class from QThread and declared the \c sendTime() signal.
+
+ \snippet examples/tutorials/threads/clock/clockthread.cpp 1
+
+ The trickiest part of this example is that the timer is connected to its
+ slot via a direct connection. A default connection would produce a queued
+ signal-slot connection because the connected objects live in different
+ threads; remember that QThread does not live in the thread it creates.
+
+ Still it is safe to access ClockThread::timerHit() from the worker thread
+ because ClockThread::timerHit() is private and only touches local variables
+ and a private member that isn't touched by public methods.
+ QDateTime::currentDateTime() isn't marked as thread-safe in Qt
+ documentation, however we can get away with using it in this small
+ example because we know that the QDateTime::currentDateTime() static
+ method isn't used in any other threads.
+
+ \section2 Example 4: A Permanent Thread
+
+ This example shows how it is possible to have a QObject in a worker thread
+ that accepts requests from the GUI thread, does polling using a timer and
+ continuously reports results back to the GUI thread. The actual work
+ including the polling must be implemented in a class derived from QObject.
+ We have called this class \c WorkerObject in the code shown below. The
+ thread-specific code is hidden in a class called \c Thread, derived from
+ QThread.
+ \c Thread has two additional public members. The \c launchWorker() member
+ takes the worker object and moves it to another thread with a started event
+ loop.
+ The call blocks for a very short moment until the thread creation operation
+ is completed, allowing the worker object to be used again on the next line.
+ The \c Thread class's code is short but somewhat involved, so we only show
+ how to use the class.
+
+ \snippet examples/tutorials/threads/movedobject/main.cpp 1
+
+ QMetaObject::invokeMethod() calls a slot via the event loop. The worker
+ object's methods should not be called directly after the object has been
+ moved to another thread. We let the worker thread do some work and polling,
+ and use a timer to shut the application down after 3 seconds. Shutting the
+ worker down needs some care. We call \c{Thread::stop()} to exit the event
+ loop. We wait for the thread to terminate and, after this has occurred, we
+ delete the worker.
+
+ \section1 Digging Deeper
+
+ Threading is a very complicated subject. Qt offers more classes for
+ threading than we have presented in this tutorial. The following materials
+ can help you go into the subject in more depth:
+
+ \list
+ \o Good video tutorials about threads with Qt can be found in the material
+ from the \l{Training Day at Qt Developer Days 2009}.
+ \o The \l{Thread Support in Qt} document is a good starting point into
+ the reference documentation.
+ \o Qt comes with several additional examples for
+ \l{Threading and Concurrent Programming Examples}{QThread and QtConcurrent}.
+ \o Several good books describe how to work with Qt threads. The most
+ extensive coverage can be found in \e{Advanced Qt Programming} by Mark
+ Summerfield, Prentice Hall - roughly 70 of 500 pages cover QThread and
+ QtConcurrent.
+ \endlist
+*/
diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc
index 2125edc..4877339 100644
--- a/doc/src/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/tutorials/widgets-tutorial.qdoc
@@ -27,6 +27,7 @@
/*!
\page widgets-tutorial.html
+ \ingroup tutorials
\title Widgets Tutorial
\brief This tutorial covers basic usage of widgets and layouts, showing how
they are used to build GUI applications.
@@ -133,19 +134,13 @@
In the following example, we use QWidget to create and show a window with
a default size:
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/toplevel/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-toplevel.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {class="qt-code"}
+ \table
+ \row
+ \o \snippet tutorials/widgets/toplevel/main.cpp main program
+ \o \inlineimage widgets-tutorial-toplevel.png
+ \endtable
+ \enddiv
To create a real GUI, we need to place widgets inside the window. To do
this, we pass a QWidget instance to a widget's constructor, as we will
@@ -161,19 +156,13 @@
passing \c window as the parent to its constructor. In this case, we add a
button to the window and place it in a specific location:
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/childwidget/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-childwidget.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {class="qt-code"}
+ \table
+ \row
+ \o \snippet tutorials/widgets/childwidget/main.cpp main program
+ \o \inlineimage widgets-tutorial-childwidget.png
+ \endtable
+ \enddiv
The button is now a child of the window and will be deleted when the
window is destroyed. Note that hiding or closing the window does not
@@ -189,19 +178,13 @@
construct a label and line edit widget that we would like to arrange
side-by-side.
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/windowlayout/main.cpp main program
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-windowlayout.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {class="qt-code"}
+ \table
+ \row
+ \o \snippet tutorials/widgets/windowlayout/main.cpp main program
+ \o \inlineimage widgets-tutorial-windowlayout.png
+ \endtable
+ \enddiv
The \c layout object we construct manages the positions and sizes of
widgets supplied to it with the \l{QHBoxLayout::}{addWidget()} function.
@@ -233,20 +216,14 @@
\c{mainLayout} is a QVBoxLayout that contains \c{queryLayout} and a
QTableView arranged vertically.
- \raw HTML
- <table align="left" width="100%">
- <tr class="qt-code"><td>
- \endraw
- \snippet tutorials/widgets/nestedlayouts/main.cpp first part
- \snippet tutorials/widgets/nestedlayouts/main.cpp last part
- \raw HTML
- </td><td align="right">
- \endraw
- \inlineimage widgets-tutorial-nestedlayouts.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \div {class="qt-code"}
+ \table
+ \row
+ \o \snippet tutorials/widgets/nestedlayouts/main.cpp first part
+ \snippet tutorials/widgets/nestedlayouts/main.cpp last part
+ \o \inlineimage widgets-tutorial-nestedlayouts.png
+ \endtable
+ \enddiv
Note that we call the \c{mainLayout}'s \l{QBoxLayout::}{addLayout()}
function to insert the \c{queryLayout} above the \c{resultView} table.
diff --git a/doc/src/widgets-and-layouts/layout.qdoc b/doc/src/widgets-and-layouts/layout.qdoc
index c3db5fa..1d8214b 100644
--- a/doc/src/widgets-and-layouts/layout.qdoc
+++ b/doc/src/widgets-and-layouts/layout.qdoc
@@ -319,16 +319,16 @@
\section2 The Header File (\c card.h)
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 0
\section2 The Implementation File (\c card.cpp)
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 1
First we define \c{count()} to fetch the number of items in the list.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 2
Then we define two functions that iterate over the layout: \c{itemAt()}
and \c{takeAt()}. These functions are used internally by the layout system
@@ -341,7 +341,7 @@
structure, we may have to spend more effort defining a linear order for the
items.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 3
\c{addItem()} implements the default placement strategy for layout items.
This function must be implemented. It is used by QLayout::add(), by the
@@ -351,26 +351,26 @@
QGridLayout::addItem(), QGridLayout::addWidget(), and
QGridLayout::addLayout().
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 4
The layout takes over responsibility of the items added. Since QLayoutItem
does not inherit QObject, we must delete the items manually. In the
destructor, we remove each item from the list using \c{takeAt()}, and
then delete it.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 5
The \c{setGeometry()} function actually performs the layout. The rectangle
supplied as an argument does not include \c{margin()}. If relevant, use
\c{spacing()} as the distance between items.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 6
\c{sizeHint()} and \c{minimumSize()} are normally very similar in
implementation. The sizes returned by both functions should include
\c{spacing()}, but not \c{margin()}.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_layout.cpp 7
\section2 Further Notes
diff --git a/doc/src/widgets-and-layouts/styles.qdoc b/doc/src/widgets-and-layouts/styles.qdoc
index 8231fcb..9e9dd64 100644
--- a/doc/src/widgets-and-layouts/styles.qdoc
+++ b/doc/src/widgets-and-layouts/styles.qdoc
@@ -283,12 +283,12 @@
pointer type is correct. If the object isn't of the right type,
qstyleoption_cast() returns 0. For example:
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 0
The following code snippet illustrates how to use QStyle to
draw the focus rectangle from a custom widget's paintEvent():
- \snippet doc/src/snippets/code/doc_src_qt4-styles.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-styles.cpp 1
The next example shows how to derive from an existing style to
customize the look of a graphical element:
@@ -542,7 +542,7 @@
We start with a look at how QCheckBox builds it style option,
which is QStyleOptionButton for checkboxes:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 0
First we let QStyleOption set up the option with the information
that is common for all widgets with \c initFrom(). We will look at
@@ -561,7 +561,7 @@
attributes that are common for all widgets. We print its
implementation here:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 1
The State_Enabled is set when the widget is enabled. When the
widget has focus the State_HasFocus flag is set. Equally, the
@@ -625,7 +625,7 @@
notably, it wraps the methods in QStyle used for painting. The
QCheckBox draws itself as follows:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 2
QCommonStyle handles the CE_CheckBox element. The QCheckBox
has two sub elements: SE_CheckBoxIndicator (the checked indicator)
@@ -633,7 +633,7 @@
checkbox label). QCommonStyle also implements these sub element
bounding rectangles. We have a look at the QCommonStyle code:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 3
As can be seen from the code extract, the common style gets
the bounding rectangles of the two sub elements of
@@ -644,7 +644,7 @@
handles CE_CheckboxLabel. We will examine each implementation and
start with CE_CheckBoxLabel:
- \snippet doc/src/snippets/code/doc_src_styles.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_styles.cpp 4
\l{QStyle::}{visualAlignment()} adjusts the alignment of text
according to the layout direction. We then draw an icon if it
diff --git a/doc/src/widgets-and-layouts/stylesheet.qdoc b/doc/src/widgets-and-layouts/stylesheet.qdoc
index be845c4..8cfa2b4 100644
--- a/doc/src/widgets-and-layouts/stylesheet.qdoc
+++ b/doc/src/widgets-and-layouts/stylesheet.qdoc
@@ -469,11 +469,11 @@
sheet. Consider the following example. First, we set a style
sheet on the QApplication:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 21
Then we set a style sheet on a QPushButton object:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 22
The style sheet on the QPushButton forces the QPushButton (and
any child widget) to have blue text, in spite of the more
@@ -481,7 +481,7 @@
The result would have been the same if we had written
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 23
except that if the QPushButton had children (which is unlikely),
the style sheet would have no impact on them.
@@ -500,14 +500,14 @@
For example, consider a QPushButton inside a QGroupBox:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 24
The QPushButton does not have an explicit color set. Hence, instead
of inheriting color of its parent QGroupBox, it has the system color.
If we want to set the color on a QGroupBox and its children,
we can write:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 25
In contrast, setting a font and propagate using QWidget::setFont() and
QWidget::setPalette() propagates to child widgets.
@@ -517,7 +517,7 @@
The Type Selector can be used to style widgets of a particular type. For
example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 26
Qt Style Sheet uses QObject::className() of the widget to determine
when to apply the Type Selector. When custom widgets are inside namespaces,
@@ -526,7 +526,7 @@
when using the Type Selector for widgets inside namespaces, we must
replace the "::" with "--". For example,
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 27
\section1 Setting QObject properties
@@ -1328,7 +1328,7 @@
If you subclass from QWidget, you need to provide a paintEvent for your
custom QWidget as below:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 32
The above code is a no-operation if there is no stylesheet set.
@@ -3373,35 +3373,35 @@
\l{QLineEdit}s in an application. This could be achieved like
this:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 88
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 88
If we want the property to apply only to the \l{QLineEdit}s that are
children (or grandchildren or grand-grandchildren) of a specific dialog,
we would rather do this:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 89
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 89
If we want the property to apply only to one specific QLineEdit,
we can give it a name using QObject::setObjectName() and use an
ID Selector to refer to it:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 90
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 90
Alternatively, we can set the
\l{Qt Style Sheets Reference#background-prop}{background-color} property directly on the
QLineEdit, omitting the selector:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 91
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 91
To ensure a good contrast, we should also specify a suitable
color for the text:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 92
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 92
It might be a good idea to change the colors used for selected
text as well:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 93
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 93
\section2 Customizing Using Dynamic Properties
@@ -3422,7 +3422,7 @@
\c mandatoryField property on the fly and set it to true. For
example:
- \snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 95
+ \snippet doc/src/snippets/code/doc_src_stylesheet.cpp 95
\section2 Customizing a QPushButton Using the Box Model
diff --git a/doc/src/windows-and-dialogs/mainwindow.qdoc b/doc/src/windows-and-dialogs/mainwindow.qdoc
index 0bf4909..e7df502 100644
--- a/doc/src/windows-and-dialogs/mainwindow.qdoc
+++ b/doc/src/windows-and-dialogs/mainwindow.qdoc
@@ -198,7 +198,7 @@
the first time it is called. You can also call
QMainWindow::setMenuBar() to use a custom menu bar in the main window.
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 0
\dots
\snippet examples/mainwindows/menus/mainwindow.cpp 5
\dots
@@ -222,7 +222,7 @@
\snippet examples/mainwindows/sdi/mainwindow.cpp 0
\dots
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 1
In this example, the toolbar is restricted to the top and bottom
toolbar areas of the main window, and is initially placed in the
@@ -244,7 +244,7 @@
required, the default can be changed with the
QMainWindow::setCorner() function:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 2
The following diagram shows the configuration produced by the above code.
Note that the left and right dock widgets will occupy the top and bottom
@@ -255,7 +255,7 @@
Once all of the main window components have been set up, the central widget
is created and installed by using code similar to the following:
- \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qt4-mainwindow.cpp 3
The central widget can be any subclass of QWidget.
*/
diff --git a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
index ad2d702..f734e43 100644
--- a/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
+++ b/doc/src/zh_CN/getting-started/how-to-learn-qt.qdoc
@@ -41,7 +41,7 @@
现在您已ç»ç¼–写了一些å°åž‹å¯ç”¨çš„应用程åºï¼Œå¹¶å¯¹ Qt 编程有更加广泛的了解。您å¯ä»¥ç›´æŽ¥ç€æ‰‹åšè‡ªå·±çš„项目,但我们建议您阅读以下一些关键简介以加深您对 Qt 的了解:\l{Qt Object Model}Qt 对象模型}å’Œ\l{Signals and Slots}{ä¿¡å·å’Œæ§½}。
- \div {float-left}
+ \div {class="float-left"}
\inlineimage qtdemo-small.png
\enddiv
diff --git a/examples/declarative/cppextensions/qwidgets/qwidgets.cpp b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
index 172f895..843ac0f 100644
--- a/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
+++ b/examples/declarative/cppextensions/qwidgets/qwidgets.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/declarative/screenorientation/Core/Bubble.qml b/examples/declarative/screenorientation/Core/Bubble.qml
index 273e703..446fa1f 100644
--- a/examples/declarative/screenorientation/Core/Bubble.qml
+++ b/examples/declarative/screenorientation/Core/Bubble.qml
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/declarative/screenorientation/Core/Button.qml b/examples/declarative/screenorientation/Core/Button.qml
index e2ee162..8fefe0c 100644
--- a/examples/declarative/screenorientation/Core/Button.qml
+++ b/examples/declarative/screenorientation/Core/Button.qml
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/declarative/screenorientation/Core/screenorientation.js b/examples/declarative/screenorientation/Core/screenorientation.js
index 4e0cc28..ffc6dc8 100644
--- a/examples/declarative/screenorientation/Core/screenorientation.js
+++ b/examples/declarative/screenorientation/Core/screenorientation.js
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/declarative/screenorientation/screenorientation.qml b/examples/declarative/screenorientation/screenorientation.qml
index 5e71516..2575274 100644
--- a/examples/declarative/screenorientation/screenorientation.qml
+++ b/examples/declarative/screenorientation/screenorientation.qml
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/declarative/text/textselection/textselection.qml b/examples/declarative/text/textselection/textselection.qml
index d02a317..4b51f4e 100644
--- a/examples/declarative/text/textselection/textselection.qml
+++ b/examples/declarative/text/textselection/textselection.qml
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/declarative/ui-components/tabwidget/TabWidget.qml
index ac2dea3..fe838b5 100644
--- a/examples/declarative/ui-components/tabwidget/TabWidget.qml
+++ b/examples/declarative/ui-components/tabwidget/TabWidget.qml
@@ -45,7 +45,7 @@ Item {
// Setting the default property to stack.children means any child items
// of the TabWidget are actually added to the 'stack' item's children.
- // See the "Writing QML Components: Properties, Methods and Signals"
+ // See the "Property Binding"
// documentation for details on default properties.
default property alias content: stack.children
diff --git a/examples/ja_JP/linguist/hellotr/main.cpp b/examples/ja_JP/linguist/hellotr/main.cpp
index 5c9554f..517cb7b 100644
--- a/examples/ja_JP/linguist/hellotr/main.cpp
+++ b/examples/ja_JP/linguist/hellotr/main.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/graphicsview/main.cpp b/examples/scroller/graphicsview/main.cpp
index 6378f91..738a824 100644
--- a/examples/scroller/graphicsview/main.cpp
+++ b/examples/scroller/graphicsview/main.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/plot/main.cpp b/examples/scroller/plot/main.cpp
index a98abfc..178a094 100644
--- a/examples/scroller/plot/main.cpp
+++ b/examples/scroller/plot/main.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/plot/plotwidget.cpp b/examples/scroller/plot/plotwidget.cpp
index c47f107..e600652 100644
--- a/examples/scroller/plot/plotwidget.cpp
+++ b/examples/scroller/plot/plotwidget.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/plot/plotwidget.h b/examples/scroller/plot/plotwidget.h
index dc886d8..3c36be9 100644
--- a/examples/scroller/plot/plotwidget.h
+++ b/examples/scroller/plot/plotwidget.h
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/plot/settingswidget.cpp b/examples/scroller/plot/settingswidget.cpp
index 792d8d0..c9de008 100644
--- a/examples/scroller/plot/settingswidget.cpp
+++ b/examples/scroller/plot/settingswidget.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/plot/settingswidget.h b/examples/scroller/plot/settingswidget.h
index e0ffb4a..fc0acff 100644
--- a/examples/scroller/plot/settingswidget.h
+++ b/examples/scroller/plot/settingswidget.h
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/wheel/main.cpp b/examples/scroller/wheel/main.cpp
index 22bae5c..4205baf 100644
--- a/examples/scroller/wheel/main.cpp
+++ b/examples/scroller/wheel/main.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/wheel/wheelwidget.cpp b/examples/scroller/wheel/wheelwidget.cpp
index 54daca3..10eaefb 100644
--- a/examples/scroller/wheel/wheelwidget.cpp
+++ b/examples/scroller/wheel/wheelwidget.cpp
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/scroller/wheel/wheelwidget.h b/examples/scroller/wheel/wheelwidget.h
index 1e41c02..96dcebf 100644
--- a/examples/scroller/wheel/wheelwidget.h
+++ b/examples/scroller/wheel/wheelwidget.h
@@ -6,35 +6,34 @@
**
** This file is part of the examples of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the Technology Preview License Agreement accompanying
-** this package.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** If you have questions regarding the use of this file, please contact
-** Nokia at qt-info@nokia.com.
-**
-**
-**
-**
-**
-**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
** $QT_END_LICENSE$
**
****************************************************************************/
diff --git a/examples/tools/undoframework/commands.cpp b/examples/tools/undoframework/commands.cpp
index 9e81c3e..ff7b0b7 100644
--- a/examples/tools/undoframework/commands.cpp
+++ b/examples/tools/undoframework/commands.cpp
@@ -136,6 +136,12 @@ AddCommand::AddCommand(DiagramItem::DiagramType addType,
}
//! [7]
+AddCommand::~AddCommand()
+{
+ if (!myDiagramItem->scene())
+ delete myDiagramItem;
+}
+
//! [8]
void AddCommand::undo()
{
diff --git a/examples/tools/undoframework/commands.h b/examples/tools/undoframework/commands.h
index ba27e2d..a4e4ab9 100644
--- a/examples/tools/undoframework/commands.h
+++ b/examples/tools/undoframework/commands.h
@@ -87,6 +87,7 @@ class AddCommand : public QUndoCommand
public:
AddCommand(DiagramItem::DiagramType addType, QGraphicsScene *graphicsScene,
QUndoCommand *parent = 0);
+ ~AddCommand();
void undo();
void redo();
diff --git a/examples/tutorials/threads/clock/clock.pro b/examples/tutorials/threads/clock/clock.pro
new file mode 100755
index 0000000..450bfe4
--- /dev/null
+++ b/examples/tutorials/threads/clock/clock.pro
@@ -0,0 +1,14 @@
+CONFIG += console
+TEMPLATE = app
+SOURCES += main.cpp \
+ clockthread.cpp
+HEADERS += clockthread.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/clock
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS clock.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/clock
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
diff --git a/examples/tutorials/threads/clock/clockthread.cpp b/examples/tutorials/threads/clock/clockthread.cpp
new file mode 100644
index 0000000..01d3f1f
--- /dev/null
+++ b/examples/tutorials/threads/clock/clockthread.cpp
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "clockthread.h"
+
+ //This class starts another thread where it emits a signal for every new second.
+
+//! [1]
+// clock/clockthread.cpp
+void ClockThread::run()
+{
+ QTimer timer;
+ connect(&timer, SIGNAL(timeout()), this, SLOT(timerHit()), Qt::DirectConnection);
+ timer.setInterval(10);
+ timer.start(); // puts one event in the threads event queue
+ exec();
+ timer.stop();
+}
+
+void ClockThread::timerHit()
+{
+ QString newTime= QDateTime::currentDateTime().toString("ddd MMMM d yy, hh:mm:ss");
+ if(m_lastTime != newTime ){
+ m_lastTime = newTime;
+ emit sendTime(newTime) ;
+ }
+}
+//! [1]
diff --git a/examples/tutorials/threads/clock/clockthread.h b/examples/tutorials/threads/clock/clockthread.h
new file mode 100644
index 0000000..966dbea
--- /dev/null
+++ b/examples/tutorials/threads/clock/clockthread.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef CLOCKTHREAD_H
+#define CLOCKTHREAD_H
+
+#include <QString>
+#include <QThread>
+
+
+
+//! [1]
+// clock/clockthread.h
+class ClockThread : public QThread
+{
+ Q_OBJECT
+signals:
+ void sendTime(QString time);
+private:
+ void run();
+ QString m_lastTime;
+private slots:
+ void timerHit();
+
+};
+//! [1]
+#endif // CLOCKTHREAD_H \ No newline at end of file
diff --git a/examples/tutorials/threads/clock/main.cpp b/examples/tutorials/threads/clock/main.cpp
new file mode 100755
index 0000000..a0f86d6
--- /dev/null
+++ b/examples/tutorials/threads/clock/main.cpp
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtGui>
+#include "clockthread.h"
+
+//A clock that does time formatting in another thread
+
+//! [1]
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ // build gui
+ QWidget widget;
+ QLabel *label = new QLabel;
+ QHBoxLayout *layout = new QHBoxLayout(&widget);
+ layout->addWidget(label);
+ widget.setWindowTitle("clock");
+
+ //instantiate thread object
+ ClockThread clockThread;
+ QObject::connect(&clockThread, SIGNAL(sendTime(QString)), label, SLOT(setText(QString)), Qt::QueuedConnection);
+ clockThread.start();
+ widget.show();
+ app.exec();
+ clockThread.quit();
+ clockThread.wait();
+ return 0;
+}
+//! [1]
diff --git a/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp b/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp
new file mode 100755
index 0000000..26ee255
--- /dev/null
+++ b/examples/tutorials/threads/helloconcurrent/helloconcurrent.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+/*
+ says hello from main thread and secondary thread using QtConcurrent
+*/
+
+//! [1]
+// helloconcurrent/main.cpp
+void hello()
+{
+ qDebug() << "Hello from thread " << QThread::currentThread();
+}
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ QFuture<void> future = QtConcurrent::run(hello);
+ qDebug() << "hello from GUI thread " << QThread::currentThread();
+ future.waitForFinished();
+ return 0;
+}
+//! [1]
diff --git a/examples/tutorials/threads/helloconcurrent/helloconcurrent.pro b/examples/tutorials/threads/helloconcurrent/helloconcurrent.pro
new file mode 100755
index 0000000..30e9413
--- /dev/null
+++ b/examples/tutorials/threads/helloconcurrent/helloconcurrent.pro
@@ -0,0 +1,16 @@
+QT -= gui
+
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += helloconcurrent.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/helloconcurrent
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS helloconcurrent.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/helloconcurrent
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
+
diff --git a/examples/tutorials/threads/hellothread/hellothread.cpp b/examples/tutorials/threads/hellothread/hellothread.cpp
new file mode 100755
index 0000000..01cd0f5
--- /dev/null
+++ b/examples/tutorials/threads/hellothread/hellothread.cpp
@@ -0,0 +1,53 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDebug>
+#include "hellothread.h"
+/*
+ * demonstrates use of QThread, says hello in another thread and terminates
+ */
+
+//! [1]
+// hellothread/hellothread.cpp
+void HelloThread::run()
+{
+ qDebug() << "hello from worker thread " << thread()->currentThreadId();
+}
+//! [1]
diff --git a/examples/tutorials/threads/hellothread/hellothread.h b/examples/tutorials/threads/hellothread/hellothread.h
new file mode 100755
index 0000000..a3202c6
--- /dev/null
+++ b/examples/tutorials/threads/hellothread/hellothread.h
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#ifndef HELLOTHREAD_H
+#define HELLOTHREAD_H
+
+#include <QThread>
+//! [1]
+// hellothread/hellothread.h
+class HelloThread : public QThread
+{
+ Q_OBJECT
+private:
+ void run();
+};
+//! [1]
+#endif // HELLOTHREAD_H
diff --git a/examples/tutorials/threads/hellothread/hellothread.pro b/examples/tutorials/threads/hellothread/hellothread.pro
new file mode 100755
index 0000000..fee7025
--- /dev/null
+++ b/examples/tutorials/threads/hellothread/hellothread.pro
@@ -0,0 +1,17 @@
+QT -= gui
+
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += main.cpp \
+ hellothread.cpp
+HEADERS += hellothread.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/hellothread
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellothread.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/hellothread
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
diff --git a/examples/tutorials/threads/hellothread/main.cpp b/examples/tutorials/threads/hellothread/main.cpp
new file mode 100755
index 0000000..9a548ea
--- /dev/null
+++ b/examples/tutorials/threads/hellothread/main.cpp
@@ -0,0 +1,54 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+#include "hellothread.h"
+
+//! [1]
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ HelloThread thread;
+ thread.start();
+ qDebug() << "hello from GUI thread " << app.thread()->currentThreadId();
+ thread.wait(); // do not exit before the thread is completed!
+ return 0;
+}
+//! [1]
diff --git a/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp b/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp
new file mode 100755
index 0000000..30410a5
--- /dev/null
+++ b/examples/tutorials/threads/hellothreadpool/hellothreadpool.cpp
@@ -0,0 +1,65 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtCore>
+// A hello world program to demonstrate the use of the global thread pool
+
+//! [1]
+// hellothreadpool/main.cpp
+class Work : public QRunnable
+{
+public:
+ void run()
+ {
+ qDebug() << "Hello from thread " << QThread::currentThread();
+ }
+};
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ Work work;
+ work.setAutoDelete(false);
+ QThreadPool *threadPool = QThreadPool::globalInstance();
+ threadPool->start(&work);
+ qDebug() << "hello from GUI thread " << QThread::currentThread();
+ threadPool->waitForDone();
+ return 0;
+}
+//! [1]
diff --git a/examples/tutorials/threads/hellothreadpool/hellothreadpool.pro b/examples/tutorials/threads/hellothreadpool/hellothreadpool.pro
new file mode 100755
index 0000000..9cf9c73
--- /dev/null
+++ b/examples/tutorials/threads/hellothreadpool/hellothreadpool.pro
@@ -0,0 +1,17 @@
+QT -= gui
+
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += hellothreadpool.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/hellothreadpool
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS hellothreadpool.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/hellothreadpool
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
+
+
+
diff --git a/examples/tutorials/threads/movedobject/main.cpp b/examples/tutorials/threads/movedobject/main.cpp
new file mode 100755
index 0000000..a244316
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/main.cpp
@@ -0,0 +1,69 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore>
+#include "workerobject.h"
+#include "thread.h"
+
+/*
+ * moves a class derived from QObject (WorkerObject) to another thread
+ * and calls methods over thread boundaries.
+ */
+
+//![1]
+// movedobject/main.cpp
+int main(int argc, char *argv[])
+{
+ QCoreApplication app(argc, argv);
+ Thread thread;
+ qDebug() << "main thread ID: " << app.thread()->currentThreadId();
+ WorkerObject *worker = new WorkerObject;
+ thread.launchWorker(worker);
+ QMetaObject::invokeMethod(worker, "doWork", Qt::QueuedConnection);
+ QMetaObject::invokeMethod(worker, "startPolling", Qt::QueuedConnection, Q_ARG(int, 500));
+ //let application produce output for 3 seconds and quit
+ QTimer::singleShot(3000, &app, SLOT(quit()));
+ app.exec();
+ thread.stop();
+ thread.wait();
+ delete worker;
+ return 0;
+}
+//![1]
diff --git a/examples/tutorials/threads/movedobject/movedobject.pro b/examples/tutorials/threads/movedobject/movedobject.pro
new file mode 100755
index 0000000..678d1d9
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/movedobject.pro
@@ -0,0 +1,18 @@
+CONFIG += console
+CONFIG -= app_bundle
+TEMPLATE = app
+SOURCES += main.cpp \
+ workerobject.cpp \
+ thread.cpp
+
+HEADERS += \
+ workerobject.h \
+ thread.h
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/movedobject
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS movedobject.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/threads/movedobject
+INSTALLS += target sources
+
+symbian: include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
diff --git a/examples/tutorials/threads/movedobject/thread.cpp b/examples/tutorials/threads/movedobject/thread.cpp
new file mode 100644
index 0000000..6dfe8ff
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/thread.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "thread.h"
+
+/*
+ * QThread derived class with additional capability to move a QObject to the
+ * new thread, to stop the thread and move the QObject back to the thread where
+ *it came from.
+ */
+
+Thread::Thread( QObject *parent)
+ : QThread (parent)
+{
+ //we need a class that receives signals from other threads and emits a signal in response
+ shutDownHelper=new QSignalMapper;
+ shutDownHelper->setMapping(this,0);
+ connect(this, SIGNAL(started()), this, SLOT(setReadyStatus() ), Qt::DirectConnection);
+ connect(this, SIGNAL(aboutToStop()), shutDownHelper, SLOT(map()) );
+}
+
+//------------------------------------------------------
+Thread::~Thread()
+{
+ delete shutDownHelper;
+}
+
+//------------------------------------------------------
+// starts thread, moves worker to this thread and blocks
+void Thread::launchWorker(QObject *worker)
+{
+ worker = worker;
+ start();
+ int i=0;
+ worker->moveToThread(this);
+ shutDownHelper->moveToThread(this);
+ connect(shutDownHelper, SIGNAL(mapped(int) ), this, SLOT(stopExecutor()), Qt::DirectConnection );
+ mutex.lock();
+ waitCondition.wait(&mutex);
+}
+
+//------------------------------------------------------
+// puts a command to stop processing in the event queue of worker thread
+void Thread::stop()
+{
+ emit aboutToStop();
+}
+
+//------------------------------------------------------
+
+// methods above this line should be called in gui thread context
+// methods below this line are private and will be run in secondary thread context
+
+//------------------------------------------------------
+void Thread::stopExecutor() //secondary thread context
+{
+ exit();
+}
+
+//------------------------------------------------------
+void Thread::setReadyStatus()
+{
+ waitCondition.wakeAll();
+}
diff --git a/examples/tutorials/threads/movedobject/thread.h b/examples/tutorials/threads/movedobject/thread.h
new file mode 100644
index 0000000..e941e99
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/thread.h
@@ -0,0 +1,67 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#ifndef THREAD_H
+#define THREAD_H
+
+#include <QtCore>
+
+class Thread :public QThread
+{
+ Q_OBJECT
+public:
+ Thread( QObject *parent=0);
+ ~Thread();
+ void stop();
+ void launchWorker(QObject *worker);
+private:
+ QObject *worker;
+ QSignalMapper *shutDownHelper;
+ QWaitCondition waitCondition;
+ QMutex mutex;
+private slots:
+ void stopExecutor();
+ void setReadyStatus();
+signals:
+ void aboutToStop();
+};
+
+#endif // THREAD_H
diff --git a/examples/tutorials/threads/movedobject/workerobject.cpp b/examples/tutorials/threads/movedobject/workerobject.cpp
new file mode 100644
index 0000000..819da20
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/workerobject.cpp
@@ -0,0 +1,87 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtCore>
+#include "workerobject.h"
+
+/*
+ * represents an object that lives in another thread where it polls a resource
+ * and communicates with the gui thread
+ */
+
+WorkerObject::WorkerObject(QObject *parent)
+ : QObject(parent)
+{
+ timer = new QTimer(this);
+ connect(timer, SIGNAL(timeout()), this, SLOT(poll()));
+}
+
+//---------------------------------------------------------------
+void WorkerObject::doWork()
+{
+
+ qDebug() << "doing work in thread " << thread()->currentThreadId() ;
+}
+
+//---------------------------------------------------------------
+WorkerObject::~WorkerObject()
+{
+ qDebug() << "destruction WorkerObject in thread " << thread()->currentThreadId();
+}
+
+//---------------------------------------------------------------
+void WorkerObject::startPolling(int milliseconds)
+{
+ count=0;
+ timer->start(milliseconds);
+}
+
+//---------------------------------------------------------------
+void WorkerObject::stopPolling()
+{
+ timer->stop();
+}
+
+//---------------------------------------------------------------
+void WorkerObject::poll()
+{
+ qDebug() << QString("timer hit %1").arg(count);
+ count++;
+}
+
diff --git a/examples/tutorials/threads/movedobject/workerobject.h b/examples/tutorials/threads/movedobject/workerobject.h
new file mode 100644
index 0000000..09a827c
--- /dev/null
+++ b/examples/tutorials/threads/movedobject/workerobject.h
@@ -0,0 +1,64 @@
+/****************************************************************************
+**
+** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the examples of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:BSD$
+** You may use this file under the terms of the BSD license as follows:
+**
+** "Redistribution and use in source and binary forms, with or without
+** modification, are permitted provided that the following conditions are
+** met:
+** * Redistributions of source code must retain the above copyright
+** notice, this list of conditions and the following disclaimer.
+** * Redistributions in binary form must reproduce the above copyright
+** notice, this list of conditions and the following disclaimer in
+** the documentation and/or other materials provided with the
+** distribution.
+** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor
+** the names of its contributors may be used to endorse or promote
+** products derived from this software without specific prior written
+** permission.
+**
+** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+#ifndef WORKEROBJECT_H
+#define WORKEROBJECT_H
+
+#include <QtCore>
+
+class WorkerObject : public QObject
+{
+ Q_OBJECT
+public:
+ explicit WorkerObject(QObject *parent = 0);
+ ~WorkerObject();
+public slots:
+ void doWork();
+ void startPolling(int milliseconds);
+ void stopPolling();
+private slots:
+ void poll();
+private:
+ QTimer *timer;
+ int count;
+};
+
+#endif // WORKEROBJECT_H
diff --git a/examples/tutorials/threads/threads.pro b/examples/tutorials/threads/threads.pro
new file mode 100644
index 0000000..d737513
--- /dev/null
+++ b/examples/tutorials/threads/threads.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+
+SUBDIRS = hellothread \
+ hellothreadpool \
+ helloconcurrent \
+ clock \
+ movedobject
+
diff --git a/examples/tutorials/tutorials.pro b/examples/tutorials/tutorials.pro
index 34723c2..1b4667e 100644
--- a/examples/tutorials/tutorials.pro
+++ b/examples/tutorials/tutorials.pro
@@ -1,7 +1,8 @@
TEMPLATE = subdirs
SUBDIRS = \
addressbook \
- modelview
+ modelview \
+ threads
# install
diff --git a/examples/webkit/fancybrowser/fancybrowser.pro b/examples/webkit/fancybrowser/fancybrowser.pro
index 3786d9c..df4dbe3 100644
--- a/examples/webkit/fancybrowser/fancybrowser.pro
+++ b/examples/webkit/fancybrowser/fancybrowser.pro
@@ -12,5 +12,7 @@ INSTALLS += target sources
symbian {
TARGET.UID3 = 0xA000CF6C
+ TARGET.EPOCHEAPSIZE = 0×020000 0×4000000
+ TARGET.CAPABILITY += Location NetworkServices
include($$QT_SOURCE_TREE/examples/symbianpkgrules.pri)
}
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 74acc64..549113a 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -162,28 +162,35 @@ exists($${EPOCROOT}epoc32/tools/qt/mkspecs/features/environment.prf) {
}
# Try to detect SDK version if it wasn't set by environment.prf
-isEmpty(SYMBIAN_VERSION) {
- exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/Symbianv4.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/Symbianv4.sis) {
- SYMBIAN_VERSION = Symbian4
+isEmpty(SYMBIAN_VERSION)|isEmpty(S60_VERSION) {
+ exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.3.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.3.sis) {
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian3
+ isEmpty(S60_VERSION): S60_VERSION = 5.3
} else {
# The Symbian^3 PDK does not necessarily contain the required sis files.
# However, libstdcppv5 first appeared in Symbian^3 (S60 5.2), so check for that too.
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.2.sis)|exists($${EPOCROOT}epoc32/release/armv5/lib/libstdcppv5.dso) {
- SYMBIAN_VERSION = Symbian3
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian3
+ isEmpty(S60_VERSION): S60_VERSION = 5.2
} else {
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.1.sis) {
- SYMBIAN_VERSION = Symbian2
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Symbian2
+ isEmpty(S60_VERSION): S60_VERSION = 5.1
} else {
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v5.0.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v5.0.sis) {
- SYMBIAN_VERSION = 9.4
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.4
+ isEmpty(S60_VERSION): S60_VERSION = 5.0
} else {
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.2.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.2.sis) {
- SYMBIAN_VERSION = 9.3
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.3
+ isEmpty(S60_VERSION): S60_VERSION = 3.2
} else {
exists($${EPOCROOT}epoc32/release/winscw/udeb/z/system/install/series60v3.1.sis)|exists($${EPOCROOT}epoc32/data/z/system/install/series60v3.1.sis) {
- SYMBIAN_VERSION = 9.2
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = 9.2
+ isEmpty(S60_VERSION): S60_VERSION = 3.1
} else {
- SYMBIAN_VERSION = Unknown
+ isEmpty(SYMBIAN_VERSION): SYMBIAN_VERSION = Unknown
+ isEmpty(S60_VERSION): S60_VERSION = Unknown
}
}
}
@@ -192,22 +199,6 @@ isEmpty(SYMBIAN_VERSION) {
}
}
-isEmpty(S60_VERSION) {
- contains(SYMBIAN_VERSION, "9\\.2") {
- S60_VERSION = 3.1
- } else:contains(SYMBIAN_VERSION, "9\\.3") {
- S60_VERSION = 3.2
- } else:contains(SYMBIAN_VERSION, "9\\.4") {
- S60_VERSION = 5.0
- } else:contains(SYMBIAN_VERSION, "Symbian2") {
- S60_VERSION = 5.1
- } else:contains(SYMBIAN_VERSION, "Symbian3") {
- S60_VERSION = 5.2
- } else {
- S60_VERSION = Unknown
- }
-}
-
# pkg_depends_webkit, pkg_depends_core, and pkg_platform_dependencies can be removed by developer
# if multiple languages need to be supported by pkg file. In that case the developer should declare
# multiple language compatible dependency statements him/herself.
diff --git a/mkspecs/features/symbian/default_post.prf b/mkspecs/features/symbian/default_post.prf
index 98ab547..470372e 100644
--- a/mkspecs/features/symbian/default_post.prf
+++ b/mkspecs/features/symbian/default_post.prf
@@ -85,13 +85,13 @@ contains(CONFIG, qt):!contains(TARGET.UID3, 0x2001E61C):!contains(TARGET.UID3, 0
isEmpty(TARGET.EPOCSTACKSIZE):TARGET.EPOCSTACKSIZE = 0x14000
isEmpty(TARGET.EPOCHEAPSIZE):TARGET.EPOCHEAPSIZE = 0x020000 0x800000
-# Supports Symbian^3 and Symbian^4 by default and also S60 3.1, 3.2, and 5.0 if built against any of those.
+# Supports Symbian^3 platforms by default and also S60 3.1, 3.2, and 5.0 if built against any of those.
platform_product_id = S60ProductID
platform_product_id = $$addLanguageDependentPkgItem(platform_product_id)
pkg_platform_dependencies = \
"; Default HW/platform dependencies" \
"[0x20022E6D],0,0,0,{$$platform_product_id}" \
- "[0x20032DE7],0,0,0,{$$platform_product_id}"
+ "[0x2003A678],0,0,0,{$$platform_product_id}"
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
pkg_platform_dependencies += \
"[0x102032BE],0,0,0,{$$platform_product_id}" \
diff --git a/mkspecs/features/symbian/sis_targets.prf b/mkspecs/features/symbian/sis_targets.prf
index d6d6df0..d0fe881 100644
--- a/mkspecs/features/symbian/sis_targets.prf
+++ b/mkspecs/features/symbian/sis_targets.prf
@@ -26,6 +26,9 @@ equals(GENERATE_SIS_TARGETS, true) {
qtPrepareTool(QMAKE_CREATEPACKAGE, createpackage)
+ CREATEPACKAGE_DIR = $$OBJECTS_DIR/createpackage_tmp
+ QMAKE_CLEAN += $$CREATEPACKAGE_DIR/*
+
symbian-abld|symbian-sbsv2 {
symbian-sbsv2 {
CONVERT_GCCE_PARAM = -g
@@ -48,7 +51,7 @@ equals(GENERATE_SIS_TARGETS, true) {
sis_target.depends += $${baseTarget}_template.pkg
ok_sis_target.target = ok_sis
- ok_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \
+ ok_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \
$(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
unsigned_sis_target.target = unsigned_sis
@@ -65,7 +68,7 @@ equals(GENERATE_SIS_TARGETS, true) {
unsigned_sis_target.depends += $${baseTarget}_template.pkg
ok_unsigned_sis_target.target = ok_unsigned_sis
- ok_unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg $(QT_SIS_TARGET)
+ ok_unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE $$CONVERT_GCCE_PARAM -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg $(QT_SIS_TARGET)
target_sis_target.target = $${baseTarget}.sis
target_sis_target.commands = $(MAKE) -f $(MAKEFILE) sis
@@ -77,7 +80,7 @@ equals(GENERATE_SIS_TARGETS, true) {
installer_sis_target.depends = $${baseTarget}_installer.pkg sis
ok_installer_sis_target.target = ok_installer_sis
- ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \
+ ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \
$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
ok_installer_sis_target.depends = $${baseTarget}_installer.pkg
@@ -86,7 +89,7 @@ equals(GENERATE_SIS_TARGETS, true) {
unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis
ok_unsigned_installer_sis_target.target = ok_unsigned_installer_sis
- ok_unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg
+ ok_unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg
ok_unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg
fail_sis_nocache_target.target = fail_sis_nocache
@@ -106,7 +109,7 @@ equals(GENERATE_SIS_TARGETS, true) {
stub_sis_target.depends += $${baseTarget}_stub.pkg
ok_stub_sis_target.target = ok_stub_sis
- ok_stub_sis_target.commands = $$QMAKE_CREATEPACKAGE -s $(QT_SIS_OPTIONS) $${baseTarget}_stub.pkg \
+ ok_stub_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR -s $(QT_SIS_OPTIONS) $${baseTarget}_stub.pkg \
$(QT_SIS_TARGET) $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
QMAKE_EXTRA_TARGETS += sis_target \
@@ -142,6 +145,7 @@ equals(GENERATE_SIS_TARGETS, true) {
&& echo QT_SIS_TARGET ?= $(QT_SIS_TARGET) >> $$make_cache_name
QMAKE_EXTRA_TARGETS += store_build_target
+ QMAKE_CLEAN += $$make_cache_name
}
} else {
sis_destdir = $$DESTDIR
@@ -149,12 +153,12 @@ equals(GENERATE_SIS_TARGETS, true) {
!equals(TARGET, "$$baseTarget"):sis_destdir = $$sis_destdir/$$dirname(TARGET)
sis_target.target = sis
- sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \
+ sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_template.pkg \
- $(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
sis_target.depends = first $${baseTarget}_template.pkg
unsigned_sis_target.target = unsigned_sis
- unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg
+ unsigned_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_template.pkg
unsigned_sis_target.depends = first $${baseTarget}_template.pkg
target_sis_target.target = $${sis_destdir}/$${baseTarget}.sis
@@ -165,12 +169,12 @@ equals(GENERATE_SIS_TARGETS, true) {
installer_sis_target.depends = $${baseTarget}_installer.pkg sis
ok_installer_sis_target.target = ok_installer_sis
- ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \
+ ok_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) $${baseTarget}_installer.pkg - \
$(QT_SIS_CERTIFICATE) $(QT_SIS_KEY) $(QT_SIS_PASSPHRASE)
ok_installer_sis_target.depends = $${baseTarget}_installer.pkg
unsigned_installer_sis_target.target = unsigned_installer_sis
- unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg
+ unsigned_installer_sis_target.commands = $$QMAKE_CREATEPACKAGE -t $$CREATEPACKAGE_DIR $(QT_SIS_OPTIONS) -o $${baseTarget}_installer.pkg
unsigned_installer_sis_target.depends = $${baseTarget}_installer.pkg unsigned_sis
!isEmpty(sis_destdir):!equals(sis_destdir, "."):!equals(sis_destdir, "./") {
diff --git a/mkspecs/unsupported/win32-g++-cross/qmake.conf b/mkspecs/unsupported/win32-g++-cross/qmake.conf
index 7e077a1..efc3de2 100644
--- a/mkspecs/unsupported/win32-g++-cross/qmake.conf
+++ b/mkspecs/unsupported/win32-g++-cross/qmake.conf
@@ -52,8 +52,8 @@ QMAKE_RUN_CXX_IMP = $(CXX) -c $(CXXFLAGS) $(INCPATH) -o $@ $<
QMAKE_LINK = i686-pc-mingw32-g++
QMAKE_LINK_C = i686-pc-mingw32-gcc
-QMAKE_LFLAGS = -enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
-QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads -Wl
+QMAKE_LFLAGS = -Wl,-enable-stdcall-fixup -Wl,-enable-auto-import -Wl,-enable-runtime-pseudo-reloc
+QMAKE_LFLAGS_EXCEPTIONS_ON = -mthreads
QMAKE_LFLAGS_EXCEPTIONS_OFF =
QMAKE_LFLAGS_RELEASE = -Wl,-s
QMAKE_LFLAGS_DEBUG =
diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf
index 5b717e7..a9f725c 100644
--- a/mkspecs/win32-msvc2005/qmake.conf
+++ b/mkspecs/win32-msvc2005/qmake.conf
@@ -8,7 +8,7 @@ MAKEFILE_GENERATOR = MSVC.NET
TEMPLATE = app
CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
QT += core gui
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
+DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT _BIND_TO_CURRENT_VCLIBS_VERSION=1
QMAKE_COMPILER_DEFINES += _MSC_VER=1400 WIN32
QMAKE_CC = cl
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
index c765562..fd115e7 100644
--- a/mkspecs/win32-msvc2008/qmake.conf
+++ b/mkspecs/win32-msvc2008/qmake.conf
@@ -8,7 +8,7 @@ MAKEFILE_GENERATOR = MSVC.NET
TEMPLATE = app
CONFIG += qt warn_on release incremental flat link_prl precompile_header autogen_precompile_source copy_dir_files debug_and_release debug_and_release_target embed_manifest_dll embed_manifest_exe
QT += core gui
-DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT
+DEFINES += UNICODE WIN32 QT_LARGEFILE_SUPPORT _BIND_TO_CURRENT_VCLIBS_VERSION=1
QMAKE_COMPILER_DEFINES += _MSC_VER=1500 WIN32
QMAKE_CC = cl
diff --git a/projects.pro b/projects.pro
index 2e31e9a..408c8e5 100644
--- a/projects.pro
+++ b/projects.pro
@@ -45,12 +45,8 @@ for(PROJECT, $$list($$lower($$unique(QT_BUILD_PARTS)))) {
} else:isEqual(PROJECT, docs) {
contains(QT_BUILD_PARTS, tools):include(doc/doc.pri)
} else:isEqual(PROJECT, translations) {
- contains(QT_BUILD_PARTS, tools) {
- include(translations/translations.pri) # ts targets
- } else {
- !wince*:SUBDIRS += tools/linguist/lrelease
- }
- SUBDIRS += translations # qm build step
+ !contains(QT_BUILD_PARTS, tools):!wince*:SUBDIRS += tools/linguist/lrelease
+ SUBDIRS += translations
} else:isEqual(PROJECT, qmake) {
# SUBDIRS += qmake
} else {
diff --git a/qmake/generators/symbian/initprojectdeploy_symbian.cpp b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
index f9fae9d..8d04a42 100644
--- a/qmake/generators/symbian/initprojectdeploy_symbian.cpp
+++ b/qmake/generators/symbian/initprojectdeploy_symbian.cpp
@@ -169,9 +169,7 @@ void initProjectDeploySymbian(QMakeProject* project,
QStringList& generatedDirs,
QStringList& generatedFiles)
{
- QString targetPath = project->values("deploy.path").join(" ");
- if (targetPath.isEmpty())
- targetPath = testPath;
+ QString targetPath = testPath;
if (targetPath.endsWith("/") || targetPath.endsWith("\\"))
targetPath = targetPath.mid(0, targetPath.size() - 1);
@@ -225,7 +223,10 @@ void initProjectDeploySymbian(QMakeProject* project,
} else {
if (0 == platform.compare(QLatin1String(EMULATOR_DEPLOYMENT_PLATFORM))) {
if (devicePathHasDriveLetter) {
- devicePath = qt_epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1);
+ if (devicePath.startsWith("!"))
+ devicePath = qt_epocRoot() + "epoc32/winscw/c" + devicePath.remove(0, 2);
+ else
+ devicePath = qt_epocRoot() + "epoc32/winscw/" + devicePath.remove(1, 1);
} else {
devicePath = qt_epocRoot() + "epoc32/winscw/c" + devicePath;
}
diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp
index 0fdef86..767645a 100644
--- a/qmake/generators/symbian/symmake_sbsv2.cpp
+++ b/qmake/generators/symbian/symmake_sbsv2.cpp
@@ -84,6 +84,12 @@ static void fixFlmCmd(QString *cmdLine, const QMap<QString, QString> &commandsTo
// separator, so replace it with "&&" command concatenator.
cmdLine->replace("\n\t", "&&");
+ // Strip output suppression, as sbsv2 can't handle it in FLMs. Cannot be done by simply
+ // adding "@" to commandsToReplace, as it'd get handled last due to alphabetical ordering,
+ // potentially masking other commands that need replacing.
+ if (cmdLine->contains("@"))
+ cmdLine->replace(QRegExp(cmdFind.arg("@")), cmdReplace.arg(""));
+
// Iterate command replacements in reverse alphabetical order of keys so
// that keys which are starts of other longer keys are iterated after longer keys.
QMapIterator<QString, QString> cmdIter(commandsToReplace);
diff --git a/src/3rdparty/libjpeg/README b/src/3rdparty/libjpeg/README
index 7bc588f..451265d 100644
--- a/src/3rdparty/libjpeg/README
+++ b/src/3rdparty/libjpeg/README
@@ -1,8 +1,8 @@
The Independent JPEG Group's JPEG software
==========================================
-README for release 8 of 10-Jan-2010
-===================================
+README for release 8c of 16-Jan-2011
+====================================
This distribution contains the eighth public release of the Independent JPEG
Group's free JPEG software. You are welcome to redistribute this software and
@@ -114,7 +114,7 @@ with respect to this software, its quality, accuracy, merchantability, or
fitness for a particular purpose. This software is provided "AS IS", and you,
its user, assume the entire risk as to its quality and accuracy.
-This software is copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding.
+This software is copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
All Rights Reserved except as specified below.
Permission is hereby granted to use, copy, modify, and distribute this
@@ -254,8 +254,8 @@ ARCHIVE LOCATIONS
The "official" archive site for this software is www.ijg.org.
The most recent released version can always be found there in
directory "files". This particular version will be archived as
-http://www.ijg.org/files/jpegsrc.v8.tar.gz, and in Windows-compatible
-"zip" archive format as http://www.ijg.org/files/jpegsr8.zip.
+http://www.ijg.org/files/jpegsrc.v8c.tar.gz, and in Windows-compatible
+"zip" archive format as http://www.ijg.org/files/jpegsr8c.zip.
The JPEG FAQ (Frequently Asked Questions) article is a source of some
general information about JPEG.
@@ -285,7 +285,8 @@ Thank to John Korejwa and Massimo Ballerini for inviting me to
fruitful consultations in Boston, MA and Milan, Italy.
Thank to Hendrik Elstner, Roland Fassauer, Simone Zuck, Guenther
-Maier-Gerber, and Walter Stoeber for corresponding business development.
+Maier-Gerber, Walter Stoeber, Fred Schmitz, and Norbert Braunagel
+for corresponding business development.
Thank to Nico Zschach and Dirk Stelling of the technical support team
at the Digital Images company in Halle for providing me with extra
@@ -318,7 +319,7 @@ image files indefinitely.)
TO DO
=====
-Version 8.0 is the first release of a new generation JPEG standard
+Version 8 is the first release of a new generation JPEG standard
to overcome the limitations of the original JPEG specification.
More features are being prepared for coming releases...
diff --git a/src/3rdparty/libjpeg/change.log b/src/3rdparty/libjpeg/change.log
index 58ea3eb..94865b3 100644
--- a/src/3rdparty/libjpeg/change.log
+++ b/src/3rdparty/libjpeg/change.log
@@ -1,6 +1,42 @@
CHANGE LOG for Independent JPEG Group's JPEG software
+Version 8c 16-Jan-2011
+-----------------------
+
+Add option to compression library and cjpeg (-block N) to use
+different DCT block size.
+All N from 1 to 16 are possible. Default is 8 (baseline format).
+Larger values produce higher compression,
+smaller values produce higher quality.
+SmartScale capable decoder (introduced with IJG JPEG 8) required.
+
+
+Version 8b 16-May-2010
+-----------------------
+
+Repair problem in new memory source manager with corrupt JPEG data.
+Thank to Ted Campbell and Samuel Chun for the report.
+
+Repair problem in Makefile.am test target.
+Thank to anonymous user for the report.
+
+Support MinGW installation with automatic configure.
+Thank to Volker Grabsch for the suggestion.
+
+
+Version 8a 28-Feb-2010
+-----------------------
+
+Writing tables-only datastreams via jpeg_write_tables works again.
+
+Support 32-bit BMPs (RGB image with Alpha channel) for read in cjpeg.
+Thank to Brett Blackham for the suggestion.
+
+Improve accuracy in floating point IDCT calculation.
+Thank to Robert Hooke for the hint.
+
+
Version 8 10-Jan-2010
----------------------
diff --git a/src/3rdparty/libjpeg/cjpeg.1 b/src/3rdparty/libjpeg/cjpeg.1
deleted file mode 100644
index 01bfa25..0000000
--- a/src/3rdparty/libjpeg/cjpeg.1
+++ /dev/null
@@ -1,325 +0,0 @@
-.TH CJPEG 1 "30 December 2009"
-.SH NAME
-cjpeg \- compress an image file to a JPEG file
-.SH SYNOPSIS
-.B cjpeg
-[
-.I options
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B cjpeg
-compresses the named image file, or the standard input if no file is
-named, and produces a JPEG/JFIF file on the standard output.
-The currently supported input file formats are: PPM (PBMPLUS color
-format), PGM (PBMPLUS gray-scale format), BMP, Targa, and RLE (Utah Raster
-Toolkit format). (RLE is supported only if the URT library is available.)
-.SH OPTIONS
-All switch names may be abbreviated; for example,
-.B \-grayscale
-may be written
-.B \-gray
-or
-.BR \-gr .
-Most of the "basic" switches can be abbreviated to as little as one letter.
-Upper and lower case are equivalent (thus
-.B \-BMP
-is the same as
-.BR \-bmp ).
-British spellings are also accepted (e.g.,
-.BR \-greyscale ),
-though for brevity these are not mentioned below.
-.PP
-The basic switches are:
-.TP
-.BI \-quality " N[,...]"
-Scale quantization tables to adjust image quality. Quality is 0 (worst) to
-100 (best); default is 75. (See below for more info.)
-.TP
-.B \-grayscale
-Create monochrome JPEG file from color input. Be sure to use this switch when
-compressing a grayscale BMP file, because
-.B cjpeg
-isn't bright enough to notice whether a BMP file uses only shades of gray.
-By saying
-.BR \-grayscale ,
-you'll get a smaller JPEG file that takes less time to process.
-.TP
-.B \-optimize
-Perform optimization of entropy encoding parameters. Without this, default
-encoding parameters are used.
-.B \-optimize
-usually makes the JPEG file a little smaller, but
-.B cjpeg
-runs somewhat slower and needs much more memory. Image quality and speed of
-decompression are unaffected by
-.BR \-optimize .
-.TP
-.B \-progressive
-Create progressive JPEG file (see below).
-.TP
-.BI \-scale " M/N"
-Scale the output image by a factor M/N. Currently supported scale factors are
-8/N with all N from 1 to 16.
-.TP
-.B \-targa
-Input file is Targa format. Targa files that contain an "identification"
-field will not be automatically recognized by
-.BR cjpeg ;
-for such files you must specify
-.B \-targa
-to make
-.B cjpeg
-treat the input as Targa format.
-For most Targa files, you won't need this switch.
-.PP
-The
-.B \-quality
-switch lets you trade off compressed file size against quality of the
-reconstructed image: the higher the quality setting, the larger the JPEG file,
-and the closer the output image will be to the original input. Normally you
-want to use the lowest quality setting (smallest file) that decompresses into
-something visually indistinguishable from the original image. For this
-purpose the quality setting should be between 50 and 95; the default of 75 is
-often about right. If you see defects at
-.B \-quality
-75, then go up 5 or 10 counts at a time until you are happy with the output
-image. (The optimal setting will vary from one image to another.)
-.PP
-.B \-quality
-100 will generate a quantization table of all 1's, minimizing loss in the
-quantization step (but there is still information loss in subsampling, as well
-as roundoff error). This setting is mainly of interest for experimental
-purposes. Quality values above about 95 are
-.B not
-recommended for normal use; the compressed file size goes up dramatically for
-hardly any gain in output image quality.
-.PP
-In the other direction, quality values below 50 will produce very small files
-of low image quality. Settings around 5 to 10 might be useful in preparing an
-index of a large image library, for example. Try
-.B \-quality
-2 (or so) for some amusing Cubist effects. (Note: quality
-values below about 25 generate 2-byte quantization tables, which are
-considered optional in the JPEG standard.
-.B cjpeg
-emits a warning message when you give such a quality value, because some
-other JPEG programs may be unable to decode the resulting file. Use
-.B \-baseline
-if you need to ensure compatibility at low quality values.)
-.PP
-The
-.B \-quality
-option has been extended in IJG version 7 for support of separate quality
-settings for luminance and chrominance (or in general, for every provided
-quantization table slot). This feature is useful for high-quality
-applications which cannot accept the damage of color data by coarse
-subsampling settings. You can now easily reduce the color data amount more
-smoothly with finer control without separate subsampling. The resulting file
-is fully compliant with standard JPEG decoders.
-Note that the
-.B \-quality
-ratings refer to the quantization table slots, and that the last value is
-replicated if there are more q-table slots than parameters. The default
-q-table slots are 0 for luminance and 1 for chrominance with default tables as
-given in the JPEG standard. This is compatible with the old behaviour in case
-that only one parameter is given, which is then used for both luminance and
-chrominance (slots 0 and 1). More or custom quantization tables can be set
-with
-.B \-qtables
-and assigned to components with
-.B \-qslots
-parameter (see the "wizard" switches below).
-.B Caution:
-You must explicitly add
-.BI \-sample " 1x1"
-for efficient separate color
-quality selection, since the default value used by library is 2x2!
-.PP
-The
-.B \-progressive
-switch creates a "progressive JPEG" file. In this type of JPEG file, the data
-is stored in multiple scans of increasing quality. If the file is being
-transmitted over a slow communications link, the decoder can use the first
-scan to display a low-quality image very quickly, and can then improve the
-display with each subsequent scan. The final image is exactly equivalent to a
-standard JPEG file of the same quality setting, and the total file size is
-about the same --- often a little smaller.
-.PP
-Switches for advanced users:
-.TP
-.B \-dct int
-Use integer DCT method (default).
-.TP
-.B \-dct fast
-Use fast integer DCT (less accurate).
-.TP
-.B \-dct float
-Use floating-point DCT method.
-The float method is very slightly more accurate than the int method, but is
-much slower unless your machine has very fast floating-point hardware. Also
-note that results of the floating-point method may vary slightly across
-machines, while the integer methods should give the same results everywhere.
-The fast integer method is much less accurate than the other two.
-.TP
-.B \-nosmooth
-Don't use high-quality downsampling.
-.TP
-.BI \-restart " N"
-Emit a JPEG restart marker every N MCU rows, or every N MCU blocks if "B" is
-attached to the number.
-.B \-restart 0
-(the default) means no restart markers.
-.TP
-.BI \-smooth " N"
-Smooth the input image to eliminate dithering noise. N, ranging from 1 to
-100, indicates the strength of smoothing. 0 (the default) means no smoothing.
-.TP
-.BI \-maxmemory " N"
-Set limit for amount of memory to use in processing large images. Value is
-in thousands of bytes, or millions of bytes if "M" is attached to the
-number. For example,
-.B \-max 4m
-selects 4000000 bytes. If more space is needed, temporary files will be used.
-.TP
-.BI \-outfile " name"
-Send output image to the named file, not to standard output.
-.TP
-.B \-verbose
-Enable debug printout. More
-.BR \-v 's
-give more output. Also, version information is printed at startup.
-.TP
-.B \-debug
-Same as
-.BR \-verbose .
-.PP
-The
-.B \-restart
-option inserts extra markers that allow a JPEG decoder to resynchronize after
-a transmission error. Without restart markers, any damage to a compressed
-file will usually ruin the image from the point of the error to the end of the
-image; with restart markers, the damage is usually confined to the portion of
-the image up to the next restart marker. Of course, the restart markers
-occupy extra space. We recommend
-.B \-restart 1
-for images that will be transmitted across unreliable networks such as Usenet.
-.PP
-The
-.B \-smooth
-option filters the input to eliminate fine-scale noise. This is often useful
-when converting dithered images to JPEG: a moderate smoothing factor of 10 to
-50 gets rid of dithering patterns in the input file, resulting in a smaller
-JPEG file and a better-looking image. Too large a smoothing factor will
-visibly blur the image, however.
-.PP
-Switches for wizards:
-.TP
-.B \-arithmetic
-Use arithmetic coding.
-.B Caution:
-arithmetic coded JPEG is not yet widely implemented, so many decoders will be
-unable to view an arithmetic coded JPEG file at all.
-.TP
-.B \-baseline
-Force baseline-compatible quantization tables to be generated. This clamps
-quantization values to 8 bits even at low quality settings. (This switch is
-poorly named, since it does not ensure that the output is actually baseline
-JPEG. For example, you can use
-.B \-baseline
-and
-.B \-progressive
-together.)
-.TP
-.BI \-qtables " file"
-Use the quantization tables given in the specified text file.
-.TP
-.BI \-qslots " N[,...]"
-Select which quantization table to use for each color component.
-.TP
-.BI \-sample " HxV[,...]"
-Set JPEG sampling factors for each color component.
-.TP
-.BI \-scans " file"
-Use the scan script given in the specified text file.
-.PP
-The "wizard" switches are intended for experimentation with JPEG. If you
-don't know what you are doing, \fBdon't use them\fR. These switches are
-documented further in the file wizard.txt.
-.SH EXAMPLES
-.LP
-This example compresses the PPM file foo.ppm with a quality factor of
-60 and saves the output as foo.jpg:
-.IP
-.B cjpeg \-quality
-.I 60 foo.ppm
-.B >
-.I foo.jpg
-.SH HINTS
-Color GIF files are not the ideal input for JPEG; JPEG is really intended for
-compressing full-color (24-bit) images. In particular, don't try to convert
-cartoons, line drawings, and other images that have only a few distinct
-colors. GIF works great on these, JPEG does not. If you want to convert a
-GIF to JPEG, you should experiment with
-.BR cjpeg 's
-.B \-quality
-and
-.B \-smooth
-options to get a satisfactory conversion.
-.B \-smooth 10
-or so is often helpful.
-.PP
-Avoid running an image through a series of JPEG compression/decompression
-cycles. Image quality loss will accumulate; after ten or so cycles the image
-may be noticeably worse than it was after one cycle. It's best to use a
-lossless format while manipulating an image, then convert to JPEG format when
-you are ready to file the image away.
-.PP
-The
-.B \-optimize
-option to
-.B cjpeg
-is worth using when you are making a "final" version for posting or archiving.
-It's also a win when you are using low quality settings to make very small
-JPEG files; the percentage improvement is often a lot more than it is on
-larger files. (At present,
-.B \-optimize
-mode is always selected when generating progressive JPEG files.)
-.SH ENVIRONMENT
-.TP
-.B JPEGMEM
-If this environment variable is set, its value is the default memory limit.
-The value is specified as described for the
-.B \-maxmemory
-switch.
-.B JPEGMEM
-overrides the default value specified when the program was compiled, and
-itself is overridden by an explicit
-.BR \-maxmemory .
-.SH SEE ALSO
-.BR djpeg (1),
-.BR jpegtran (1),
-.BR rdjpgcom (1),
-.BR wrjpgcom (1)
-.br
-.BR ppm (5),
-.BR pgm (5)
-.br
-Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
-Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
-.SH AUTHOR
-Independent JPEG Group
-.SH BUGS
-GIF input files are no longer supported, to avoid the Unisys LZW patent.
-(Conversion of GIF files to JPEG is usually a bad idea anyway.)
-.PP
-Not all variants of BMP and Targa file formats are supported.
-.PP
-The
-.B \-targa
-switch is not a bug, it's a feature. (It would be a bug if the Targa format
-designers had not been clueless.)
diff --git a/src/3rdparty/libjpeg/djpeg.1 b/src/3rdparty/libjpeg/djpeg.1
deleted file mode 100644
index f3722d1..0000000
--- a/src/3rdparty/libjpeg/djpeg.1
+++ /dev/null
@@ -1,252 +0,0 @@
-.TH DJPEG 1 "3 October 2009"
-.SH NAME
-djpeg \- decompress a JPEG file to an image file
-.SH SYNOPSIS
-.B djpeg
-[
-.I options
-]
-[
-.I filename
-]
-.LP
-.SH DESCRIPTION
-.LP
-.B djpeg
-decompresses the named JPEG file, or the standard input if no file is named,
-and produces an image file on the standard output. PBMPLUS (PPM/PGM), BMP,
-GIF, Targa, or RLE (Utah Raster Toolkit) output format can be selected.
-(RLE is supported only if the URT library is available.)
-.SH OPTIONS
-All switch names may be abbreviated; for example,
-.B \-grayscale
-may be written
-.B \-gray
-or
-.BR \-gr .
-Most of the "basic" switches can be abbreviated to as little as one letter.
-Upper and lower case are equivalent (thus
-.B \-BMP
-is the same as
-.BR \-bmp ).
-British spellings are also accepted (e.g.,
-.BR \-greyscale ),
-though for brevity these are not mentioned below.
-.PP
-The basic switches are:
-.TP
-.BI \-colors " N"
-Reduce image to at most N colors. This reduces the number of colors used in
-the output image, so that it can be displayed on a colormapped display or
-stored in a colormapped file format. For example, if you have an 8-bit
-display, you'd need to reduce to 256 or fewer colors.
-.TP
-.BI \-quantize " N"
-Same as
-.BR \-colors .
-.B \-colors
-is the recommended name,
-.B \-quantize
-is provided only for backwards compatibility.
-.TP
-.B \-fast
-Select recommended processing options for fast, low quality output. (The
-default options are chosen for highest quality output.) Currently, this is
-equivalent to \fB\-dct fast \-nosmooth \-onepass \-dither ordered\fR.
-.TP
-.B \-grayscale
-Force gray-scale output even if JPEG file is color. Useful for viewing on
-monochrome displays; also,
-.B djpeg
-runs noticeably faster in this mode.
-.TP
-.BI \-scale " M/N"
-Scale the output image by a factor M/N. Currently supported scale factors are
-M/N with all M from 1 to 16, where N is the source DCT size, which is 8 for
-baseline JPEG. If the /N part is omitted, then M specifies the DCT scaled
-size to be applied on the given input. For baseline JPEG this is equivalent
-to M/8 scaling, since the source DCT size for baseline JPEG is 8.
-Scaling is handy if the image is larger than your screen; also,
-.B djpeg
-runs much faster when scaling down the output.
-.TP
-.B \-bmp
-Select BMP output format (Windows flavor). 8-bit colormapped format is
-emitted if
-.B \-colors
-or
-.B \-grayscale
-is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
-format is emitted.
-.TP
-.B \-gif
-Select GIF output format. Since GIF does not support more than 256 colors,
-.B \-colors 256
-is assumed (unless you specify a smaller number of colors).
-.TP
-.B \-os2
-Select BMP output format (OS/2 1.x flavor). 8-bit colormapped format is
-emitted if
-.B \-colors
-or
-.B \-grayscale
-is specified, or if the JPEG file is gray-scale; otherwise, 24-bit full-color
-format is emitted.
-.TP
-.B \-pnm
-Select PBMPLUS (PPM/PGM) output format (this is the default format).
-PGM is emitted if the JPEG file is gray-scale or if
-.B \-grayscale
-is specified; otherwise PPM is emitted.
-.TP
-.B \-rle
-Select RLE output format. (Requires URT library.)
-.TP
-.B \-targa
-Select Targa output format. Gray-scale format is emitted if the JPEG file is
-gray-scale or if
-.B \-grayscale
-is specified; otherwise, colormapped format is emitted if
-.B \-colors
-is specified; otherwise, 24-bit full-color format is emitted.
-.PP
-Switches for advanced users:
-.TP
-.B \-dct int
-Use integer DCT method (default).
-.TP
-.B \-dct fast
-Use fast integer DCT (less accurate).
-.TP
-.B \-dct float
-Use floating-point DCT method.
-The float method is very slightly more accurate than the int method, but is
-much slower unless your machine has very fast floating-point hardware. Also
-note that results of the floating-point method may vary slightly across
-machines, while the integer methods should give the same results everywhere.
-The fast integer method is much less accurate than the other two.
-.TP
-.B \-dither fs
-Use Floyd-Steinberg dithering in color quantization.
-.TP
-.B \-dither ordered
-Use ordered dithering in color quantization.
-.TP
-.B \-dither none
-Do not use dithering in color quantization.
-By default, Floyd-Steinberg dithering is applied when quantizing colors; this
-is slow but usually produces the best results. Ordered dither is a compromise
-between speed and quality; no dithering is fast but usually looks awful. Note
-that these switches have no effect unless color quantization is being done.
-Ordered dither is only available in
-.B \-onepass
-mode.
-.TP
-.BI \-map " file"
-Quantize to the colors used in the specified image file. This is useful for
-producing multiple files with identical color maps, or for forcing a
-predefined set of colors to be used. The
-.I file
-must be a GIF or PPM file. This option overrides
-.B \-colors
-and
-.BR \-onepass .
-.TP
-.B \-nosmooth
-Don't use high-quality upsampling.
-.TP
-.B \-onepass
-Use one-pass instead of two-pass color quantization. The one-pass method is
-faster and needs less memory, but it produces a lower-quality image.
-.B \-onepass
-is ignored unless you also say
-.B \-colors
-.IR N .
-Also, the one-pass method is always used for gray-scale output (the two-pass
-method is no improvement then).
-.TP
-.BI \-maxmemory " N"
-Set limit for amount of memory to use in processing large images. Value is
-in thousands of bytes, or millions of bytes if "M" is attached to the
-number. For example,
-.B \-max 4m
-selects 4000000 bytes. If more space is needed, temporary files will be used.
-.TP
-.BI \-outfile " name"
-Send output image to the named file, not to standard output.
-.TP
-.B \-verbose
-Enable debug printout. More
-.BR \-v 's
-give more output. Also, version information is printed at startup.
-.TP
-.B \-debug
-Same as
-.BR \-verbose .
-.SH EXAMPLES
-.LP
-This example decompresses the JPEG file foo.jpg, quantizes it to
-256 colors, and saves the output in 8-bit BMP format in foo.bmp:
-.IP
-.B djpeg \-colors 256 \-bmp
-.I foo.jpg
-.B >
-.I foo.bmp
-.SH HINTS
-To get a quick preview of an image, use the
-.B \-grayscale
-and/or
-.B \-scale
-switches.
-.B \-grayscale \-scale 1/8
-is the fastest case.
-.PP
-Several options are available that trade off image quality to gain speed.
-.B \-fast
-turns on the recommended settings.
-.PP
-.B \-dct fast
-and/or
-.B \-nosmooth
-gain speed at a small sacrifice in quality.
-When producing a color-quantized image,
-.B \-onepass \-dither ordered
-is fast but much lower quality than the default behavior.
-.B \-dither none
-may give acceptable results in two-pass mode, but is seldom tolerable in
-one-pass mode.
-.PP
-If you are fortunate enough to have very fast floating point hardware,
-\fB\-dct float\fR may be even faster than \fB\-dct fast\fR. But on most
-machines \fB\-dct float\fR is slower than \fB\-dct int\fR; in this case it is
-not worth using, because its theoretical accuracy advantage is too small to be
-significant in practice.
-.SH ENVIRONMENT
-.TP
-.B JPEGMEM
-If this environment variable is set, its value is the default memory limit.
-The value is specified as described for the
-.B \-maxmemory
-switch.
-.B JPEGMEM
-overrides the default value specified when the program was compiled, and
-itself is overridden by an explicit
-.BR \-maxmemory .
-.SH SEE ALSO
-.BR cjpeg (1),
-.BR jpegtran (1),
-.BR rdjpgcom (1),
-.BR wrjpgcom (1)
-.br
-.BR ppm (5),
-.BR pgm (5)
-.br
-Wallace, Gregory K. "The JPEG Still Picture Compression Standard",
-Communications of the ACM, April 1991 (vol. 34, no. 4), pp. 30-44.
-.SH AUTHOR
-Independent JPEG Group
-.SH BUGS
-To avoid the Unisys LZW patent,
-.B djpeg
-produces uncompressed GIF files. These are larger than they should be, but
-are readable by standard GIF decoders.
diff --git a/src/3rdparty/libjpeg/jcapimin.c b/src/3rdparty/libjpeg/jcapimin.c
index 563ab42..639ce86 100644
--- a/src/3rdparty/libjpeg/jcapimin.c
+++ b/src/3rdparty/libjpeg/jcapimin.c
@@ -2,6 +2,7 @@
* jcapimin.c
*
* Copyright (C) 1994-1998, Thomas G. Lane.
+ * Modified 2003-2010 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -73,6 +74,11 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
cinfo->ac_huff_tbl_ptrs[i] = NULL;
}
+ /* Must do it here for emit_dqt in case jpeg_write_tables is used */
+ cinfo->block_size = DCTSIZE;
+ cinfo->natural_order = jpeg_natural_order;
+ cinfo->lim_Se = DCTSIZE2-1;
+
cinfo->script_space = NULL;
cinfo->input_gamma = 1.0; /* in case application forgets */
diff --git a/src/3rdparty/libjpeg/jcmarker.c b/src/3rdparty/libjpeg/jcmarker.c
index 2e28983..606c19a 100644
--- a/src/3rdparty/libjpeg/jcmarker.c
+++ b/src/3rdparty/libjpeg/jcmarker.c
@@ -2,7 +2,7 @@
* jcmarker.c
*
* Copyright (C) 1991-1998, Thomas G. Lane.
- * Modified 2003-2009 by Guido Vollbeding.
+ * Modified 2003-2010 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -231,10 +231,10 @@ emit_dac (j_compress_ptr cinfo)
char ac_in_use[NUM_ARITH_TBLS];
int length, i;
jpeg_component_info *compptr;
-
+
for (i = 0; i < NUM_ARITH_TBLS; i++)
dc_in_use[i] = ac_in_use[i] = 0;
-
+
for (i = 0; i < cinfo->comps_in_scan; i++) {
compptr = cinfo->cur_comp_info[i];
/* DC needs no table for refinement scan */
@@ -244,23 +244,25 @@ emit_dac (j_compress_ptr cinfo)
if (cinfo->Se)
ac_in_use[compptr->ac_tbl_no] = 1;
}
-
+
length = 0;
for (i = 0; i < NUM_ARITH_TBLS; i++)
length += dc_in_use[i] + ac_in_use[i];
-
- emit_marker(cinfo, M_DAC);
-
- emit_2bytes(cinfo, length*2 + 2);
-
- for (i = 0; i < NUM_ARITH_TBLS; i++) {
- if (dc_in_use[i]) {
- emit_byte(cinfo, i);
- emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4));
- }
- if (ac_in_use[i]) {
- emit_byte(cinfo, i + 0x10);
- emit_byte(cinfo, cinfo->arith_ac_K[i]);
+
+ if (length) {
+ emit_marker(cinfo, M_DAC);
+
+ emit_2bytes(cinfo, length*2 + 2);
+
+ for (i = 0; i < NUM_ARITH_TBLS; i++) {
+ if (dc_in_use[i]) {
+ emit_byte(cinfo, i);
+ emit_byte(cinfo, cinfo->arith_dc_L[i] + (cinfo->arith_dc_U[i]<<4));
+ }
+ if (ac_in_use[i]) {
+ emit_byte(cinfo, i + 0x10);
+ emit_byte(cinfo, cinfo->arith_ac_K[i]);
+ }
}
}
#endif /* C_ARITH_CODING_SUPPORTED */
diff --git a/src/3rdparty/libjpeg/jcmaster.c b/src/3rdparty/libjpeg/jcmaster.c
index 5284e58..caf80a5 100644
--- a/src/3rdparty/libjpeg/jcmaster.c
+++ b/src/3rdparty/libjpeg/jcmaster.c
@@ -2,7 +2,7 @@
* jcmaster.c
*
* Copyright (C) 1991-1997, Thomas G. Lane.
- * Modified 2003-2010 by Guido Vollbeding.
+ * Modified 2003-2011 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -55,125 +55,140 @@ jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo)
{
#ifdef DCT_SCALING_SUPPORTED
+ /* Sanity check on input image dimensions to prevent overflow in
+ * following calculation.
+ * We do check jpeg_width and jpeg_height in initial_setup below,
+ * but image_width and image_height can come from arbitrary data,
+ * and we need some space for multiplication by block_size.
+ */
+ if (((long) cinfo->image_width >> 24) || ((long) cinfo->image_height >> 24))
+ ERREXIT1(cinfo, JERR_IMAGE_TOO_BIG, (unsigned int) JPEG_MAX_DIMENSION);
+
/* Compute actual JPEG image dimensions and DCT scaling choices. */
- if (cinfo->scale_num >= cinfo->scale_denom * 8) {
- /* Provide 8/1 scaling */
- cinfo->jpeg_width = cinfo->image_width << 3;
- cinfo->jpeg_height = cinfo->image_height << 3;
+ if (cinfo->scale_num >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/1 scaling */
+ cinfo->jpeg_width = cinfo->image_width * cinfo->block_size;
+ cinfo->jpeg_height = cinfo->image_height * cinfo->block_size;
cinfo->min_DCT_h_scaled_size = 1;
cinfo->min_DCT_v_scaled_size = 1;
- } else if (cinfo->scale_num >= cinfo->scale_denom * 4) {
- /* Provide 4/1 scaling */
- cinfo->jpeg_width = cinfo->image_width << 2;
- cinfo->jpeg_height = cinfo->image_height << 2;
+ } else if (cinfo->scale_num * 2 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/2 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 2L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 2L);
cinfo->min_DCT_h_scaled_size = 2;
cinfo->min_DCT_v_scaled_size = 2;
- } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 8) {
- /* Provide 8/3 scaling */
- cinfo->jpeg_width = (cinfo->image_width << 1) + (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 2, 3L);
- cinfo->jpeg_height = (cinfo->image_height << 1) + (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 2, 3L);
+ } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/3 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 3L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 3L);
cinfo->min_DCT_h_scaled_size = 3;
cinfo->min_DCT_v_scaled_size = 3;
- } else if (cinfo->scale_num >= cinfo->scale_denom * 2) {
- /* Provide 2/1 scaling */
- cinfo->jpeg_width = cinfo->image_width << 1;
- cinfo->jpeg_height = cinfo->image_height << 1;
+ } else if (cinfo->scale_num * 4 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/4 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 4L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 4L);
cinfo->min_DCT_h_scaled_size = 4;
cinfo->min_DCT_v_scaled_size = 4;
- } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * 8) {
- /* Provide 8/5 scaling */
- cinfo->jpeg_width = cinfo->image_width + (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 3, 5L);
- cinfo->jpeg_height = cinfo->image_height + (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 3, 5L);
+ } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/5 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 5L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 5L);
cinfo->min_DCT_h_scaled_size = 5;
cinfo->min_DCT_v_scaled_size = 5;
- } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 4) {
- /* Provide 4/3 scaling */
- cinfo->jpeg_width = cinfo->image_width + (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width, 3L);
- cinfo->jpeg_height = cinfo->image_height + (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height, 3L);
+ } else if (cinfo->scale_num * 6 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/6 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 6L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 6L);
cinfo->min_DCT_h_scaled_size = 6;
cinfo->min_DCT_v_scaled_size = 6;
- } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * 8) {
- /* Provide 8/7 scaling */
- cinfo->jpeg_width = cinfo->image_width + (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width, 7L);
- cinfo->jpeg_height = cinfo->image_height + (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height, 7L);
+ } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/7 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 7L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 7L);
cinfo->min_DCT_h_scaled_size = 7;
cinfo->min_DCT_v_scaled_size = 7;
- } else if (cinfo->scale_num >= cinfo->scale_denom) {
- /* Provide 1/1 scaling */
- cinfo->jpeg_width = cinfo->image_width;
- cinfo->jpeg_height = cinfo->image_height;
+ } else if (cinfo->scale_num * 8 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/8 scaling */
+ cinfo->jpeg_width = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 8L);
+ cinfo->jpeg_height = (JDIMENSION)
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 8L);
cinfo->min_DCT_h_scaled_size = 8;
cinfo->min_DCT_v_scaled_size = 8;
- } else if (cinfo->scale_num * 9 >= cinfo->scale_denom * 8) {
- /* Provide 8/9 scaling */
+ } else if (cinfo->scale_num * 9 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/9 scaling */
cinfo->jpeg_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 8, 9L);
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 9L);
cinfo->jpeg_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 8, 9L);
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 9L);
cinfo->min_DCT_h_scaled_size = 9;
cinfo->min_DCT_v_scaled_size = 9;
- } else if (cinfo->scale_num * 5 >= cinfo->scale_denom * 4) {
- /* Provide 4/5 scaling */
+ } else if (cinfo->scale_num * 10 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/10 scaling */
cinfo->jpeg_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 4, 5L);
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 10L);
cinfo->jpeg_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 4, 5L);
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 10L);
cinfo->min_DCT_h_scaled_size = 10;
cinfo->min_DCT_v_scaled_size = 10;
- } else if (cinfo->scale_num * 11 >= cinfo->scale_denom * 8) {
- /* Provide 8/11 scaling */
+ } else if (cinfo->scale_num * 11 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/11 scaling */
cinfo->jpeg_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 8, 11L);
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 11L);
cinfo->jpeg_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 8, 11L);
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 11L);
cinfo->min_DCT_h_scaled_size = 11;
cinfo->min_DCT_v_scaled_size = 11;
- } else if (cinfo->scale_num * 3 >= cinfo->scale_denom * 2) {
- /* Provide 2/3 scaling */
+ } else if (cinfo->scale_num * 12 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/12 scaling */
cinfo->jpeg_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 2, 3L);
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 12L);
cinfo->jpeg_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 2, 3L);
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 12L);
cinfo->min_DCT_h_scaled_size = 12;
cinfo->min_DCT_v_scaled_size = 12;
- } else if (cinfo->scale_num * 13 >= cinfo->scale_denom * 8) {
- /* Provide 8/13 scaling */
+ } else if (cinfo->scale_num * 13 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/13 scaling */
cinfo->jpeg_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 8, 13L);
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 13L);
cinfo->jpeg_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 8, 13L);
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 13L);
cinfo->min_DCT_h_scaled_size = 13;
cinfo->min_DCT_v_scaled_size = 13;
- } else if (cinfo->scale_num * 7 >= cinfo->scale_denom * 4) {
- /* Provide 4/7 scaling */
+ } else if (cinfo->scale_num * 14 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/14 scaling */
cinfo->jpeg_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 4, 7L);
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 14L);
cinfo->jpeg_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 4, 7L);
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 14L);
cinfo->min_DCT_h_scaled_size = 14;
cinfo->min_DCT_v_scaled_size = 14;
- } else if (cinfo->scale_num * 15 >= cinfo->scale_denom * 8) {
- /* Provide 8/15 scaling */
+ } else if (cinfo->scale_num * 15 >= cinfo->scale_denom * cinfo->block_size) {
+ /* Provide block_size/15 scaling */
cinfo->jpeg_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width * 8, 15L);
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 15L);
cinfo->jpeg_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height * 8, 15L);
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 15L);
cinfo->min_DCT_h_scaled_size = 15;
cinfo->min_DCT_v_scaled_size = 15;
} else {
- /* Provide 1/2 scaling */
+ /* Provide block_size/16 scaling */
cinfo->jpeg_width = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_width, 2L);
+ jdiv_round_up((long) cinfo->image_width * cinfo->block_size, 16L);
cinfo->jpeg_height = (JDIMENSION)
- jdiv_round_up((long) cinfo->image_height, 2L);
+ jdiv_round_up((long) cinfo->image_height * cinfo->block_size, 16L);
cinfo->min_DCT_h_scaled_size = 16;
cinfo->min_DCT_v_scaled_size = 16;
}
@@ -187,35 +202,17 @@ jpeg_calc_jpeg_dimensions (j_compress_ptr cinfo)
cinfo->min_DCT_v_scaled_size = DCTSIZE;
#endif /* DCT_SCALING_SUPPORTED */
-
- cinfo->block_size = DCTSIZE;
- cinfo->natural_order = jpeg_natural_order;
- cinfo->lim_Se = DCTSIZE2-1;
}
LOCAL(void)
jpeg_calc_trans_dimensions (j_compress_ptr cinfo)
{
- if (cinfo->min_DCT_h_scaled_size < 1 || cinfo->min_DCT_h_scaled_size > 16
- || cinfo->min_DCT_h_scaled_size != cinfo->min_DCT_v_scaled_size)
+ if (cinfo->min_DCT_h_scaled_size != cinfo->min_DCT_v_scaled_size)
ERREXIT2(cinfo, JERR_BAD_DCTSIZE,
cinfo->min_DCT_h_scaled_size, cinfo->min_DCT_v_scaled_size);
cinfo->block_size = cinfo->min_DCT_h_scaled_size;
-
- switch (cinfo->block_size) {
- case 2: cinfo->natural_order = jpeg_natural_order2; break;
- case 3: cinfo->natural_order = jpeg_natural_order3; break;
- case 4: cinfo->natural_order = jpeg_natural_order4; break;
- case 5: cinfo->natural_order = jpeg_natural_order5; break;
- case 6: cinfo->natural_order = jpeg_natural_order6; break;
- case 7: cinfo->natural_order = jpeg_natural_order7; break;
- default: cinfo->natural_order = jpeg_natural_order; break;
- }
-
- cinfo->lim_Se = cinfo->block_size < DCTSIZE ?
- cinfo->block_size * cinfo->block_size - 1 : DCTSIZE2-1;
}
@@ -233,6 +230,25 @@ initial_setup (j_compress_ptr cinfo, boolean transcode_only)
else
jpeg_calc_jpeg_dimensions(cinfo);
+ /* Sanity check on block_size */
+ if (cinfo->block_size < 1 || cinfo->block_size > 16)
+ ERREXIT2(cinfo, JERR_BAD_DCTSIZE, cinfo->block_size, cinfo->block_size);
+
+ /* Derive natural_order from block_size */
+ switch (cinfo->block_size) {
+ case 2: cinfo->natural_order = jpeg_natural_order2; break;
+ case 3: cinfo->natural_order = jpeg_natural_order3; break;
+ case 4: cinfo->natural_order = jpeg_natural_order4; break;
+ case 5: cinfo->natural_order = jpeg_natural_order5; break;
+ case 6: cinfo->natural_order = jpeg_natural_order6; break;
+ case 7: cinfo->natural_order = jpeg_natural_order7; break;
+ default: cinfo->natural_order = jpeg_natural_order; break;
+ }
+
+ /* Derive lim_Se from block_size */
+ cinfo->lim_Se = cinfo->block_size < DCTSIZE ?
+ cinfo->block_size * cinfo->block_size - 1 : DCTSIZE2-1;
+
/* Sanity check on image dimensions */
if (cinfo->jpeg_height <= 0 || cinfo->jpeg_width <= 0 ||
cinfo->num_components <= 0 || cinfo->input_components <= 0)
diff --git a/src/3rdparty/libjpeg/jconfig.cfg b/src/3rdparty/libjpeg/jconfig.cfg
index a23758a..bb7435c 100644
--- a/src/3rdparty/libjpeg/jconfig.cfg
+++ b/src/3rdparty/libjpeg/jconfig.cfg
@@ -17,6 +17,14 @@
/* Define this if you get warnings about undefined structures. */
#undef INCOMPLETE_TYPES_BROKEN
+/* Define "boolean" as unsigned char, not int, on Windows systems. */
+#ifdef _WIN32
+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
+typedef unsigned char boolean;
+#endif
+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
+#endif
+
#ifdef JPEG_INTERNALS
#undef RIGHT_SHIFT_IS_UNSIGNED
diff --git a/src/3rdparty/libjpeg/jconfig.h b/src/3rdparty/libjpeg/jconfig.h
index 7e10d1b..b96d312 100644
--- a/src/3rdparty/libjpeg/jconfig.h
+++ b/src/3rdparty/libjpeg/jconfig.h
@@ -1,21 +1,99 @@
-/* see jconfig.txt for explanations */
+/*
+ * jconfig.txt
+ *
+ * Copyright (C) 1991-1994, Thomas G. Lane.
+ * This file is part of the Independent JPEG Group's software.
+ * For conditions of distribution and use, see the accompanying README file.
+ *
+ * This file documents the configuration options that are required to
+ * customize the JPEG software for a particular system.
+ *
+ * The actual configuration options for a particular installation are stored
+ * in jconfig.h. On many machines, jconfig.h can be generated automatically
+ * or copied from one of the "canned" jconfig files that we supply. But if
+ * you need to generate a jconfig.h file by hand, this file tells you how.
+ *
+ * DO NOT EDIT THIS FILE --- IT WON'T ACCOMPLISH ANYTHING.
+ * EDIT A COPY NAMED JCONFIG.H.
+ */
+
+/*
+ * These symbols indicate the properties of your machine or compiler.
+ * #define the symbol if yes, #undef it if no.
+ */
+
+/* Does your compiler support function prototypes?
+ * (If not, you also need to use ansi2knr, see install.txt)
+ */
#define HAVE_PROTOTYPES
+
+/* Does your compiler support the declaration "unsigned char" ?
+ * How about "unsigned short" ?
+ */
#define HAVE_UNSIGNED_CHAR
#define HAVE_UNSIGNED_SHORT
+
+/* Define "void" as "char" if your compiler doesn't know about type void.
+ * NOTE: be sure to define void such that "void *" represents the most general
+ * pointer type, e.g., that returned by malloc().
+ */
/* #define void char */
+
+/* Define "const" as empty if your compiler doesn't know the "const" keyword.
+ */
/* #define const */
+
+/* Define this if an ordinary "char" type is unsigned.
+ * If you're not sure, leaving it undefined will work at some cost in speed.
+ * If you defined HAVE_UNSIGNED_CHAR then the speed difference is minimal.
+ */
#undef CHAR_IS_UNSIGNED
+
+/* Define this if your system has an ANSI-conforming <stddef.h> file.
+ */
#define HAVE_STDDEF_H
+
+/* Define this if your system has an ANSI-conforming <stdlib.h> file.
+ */
#define HAVE_STDLIB_H
+
+/* Define this if your system does not have an ANSI/SysV <string.h>,
+ * but does have a BSD-style <strings.h>.
+ */
#undef NEED_BSD_STRINGS
+
+/* Define this if your system does not provide typedef size_t in any of the
+ * ANSI-standard places (stddef.h, stdlib.h, or stdio.h), but places it in
+ * <sys/types.h> instead.
+ */
#undef NEED_SYS_TYPES_H
-#undef NEED_FAR_POINTERS /* we presume a 32-bit flat memory model */
+
+/* For 80x86 machines, you need to define NEED_FAR_POINTERS,
+ * unless you are using a large-data memory model or 80386 flat-memory mode.
+ * On less brain-damaged CPUs this symbol must not be defined.
+ * (Defining this symbol causes large data structures to be referenced through
+ * "far" pointers and to be allocated with a special version of malloc.)
+ */
+#undef NEED_FAR_POINTERS
+
+/* Define this if your linker needs global names to be unique in less
+ * than the first 15 characters.
+ */
#undef NEED_SHORT_EXTERNAL_NAMES
+
+/* Although a real ANSI C compiler can deal perfectly well with pointers to
+ * unspecified structures (see "incomplete types" in the spec), a few pre-ANSI
+ * and pseudo-ANSI compilers get confused. To keep one of these bozos happy,
+ * define INCOMPLETE_TYPES_BROKEN. This is not recommended unless you
+ * actually get "missing structure definition" warnings or errors while
+ * compiling the JPEG code.
+ */
#undef INCOMPLETE_TYPES_BROKEN
-#if defined(_WIN32)
-/* Define "boolean" as unsigned char, not int, per Windows custom */
+/* Define "boolean" as unsigned char, not int, on Windows systems.
+ */
+#ifdef _WIN32
#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
typedef unsigned char boolean;
#endif
@@ -23,24 +101,64 @@ typedef unsigned char boolean;
#endif
+/*
+ * The following options affect code selection within the JPEG library,
+ * but they don't need to be visible to applications using the library.
+ * To minimize application namespace pollution, the symbols won't be
+ * defined unless JPEG_INTERNALS has been defined.
+ */
+
#ifdef JPEG_INTERNALS
+/* Define this if your compiler implements ">>" on signed values as a logical
+ * (unsigned) shift; leave it undefined if ">>" is a signed (arithmetic) shift,
+ * which is the normal and rational definition.
+ */
#undef RIGHT_SHIFT_IS_UNSIGNED
+
#endif /* JPEG_INTERNALS */
+
+/*
+ * The remaining options do not affect the JPEG library proper,
+ * but only the sample applications cjpeg/djpeg (see cjpeg.c, djpeg.c).
+ * Other applications can ignore these.
+ */
+
#ifdef JPEG_CJPEG_DJPEG
+/* These defines indicate which image (non-JPEG) file formats are allowed. */
+
#define BMP_SUPPORTED /* BMP image file format */
#define GIF_SUPPORTED /* GIF image file format */
#define PPM_SUPPORTED /* PBMPLUS PPM/PGM image file format */
#undef RLE_SUPPORTED /* Utah RLE image file format */
#define TARGA_SUPPORTED /* Targa image file format */
-#define TWO_FILE_COMMANDLINE /* optional */
-#define USE_SETMODE /* Microsoft has setmode() */
+/* Define this if you want to name both input and output files on the command
+ * line, rather than using stdout and optionally stdin. You MUST do this if
+ * your system can't cope with binary I/O to stdin/stdout. See comments at
+ * head of cjpeg.c or djpeg.c.
+ */
+#undef TWO_FILE_COMMANDLINE
+
+/* Define this if your system needs explicit cleanup of temporary files.
+ * This is crucial under MS-DOS, where the temporary "files" may be areas
+ * of extended memory; on most other systems it's not as important.
+ */
#undef NEED_SIGNAL_CATCHER
+
+/* By default, we open image files with fopen(...,"rb") or fopen(...,"wb").
+ * This is necessary on systems that distinguish text files from binary files,
+ * and is harmless on most systems that don't. If you have one of the rare
+ * systems that complains about the "b" spec, define this symbol.
+ */
#undef DONT_USE_B_MODE
-#undef PROGRESS_REPORT /* optional */
+
+/* Define this if you want percent-done progress reports from cjpeg/djpeg.
+ */
+#undef PROGRESS_REPORT
+
#endif /* JPEG_CJPEG_DJPEG */
diff --git a/src/3rdparty/libjpeg/jconfig.mc6 b/src/3rdparty/libjpeg/jconfig.mc6
index 1b18523..ad5651b 100644
--- a/src/3rdparty/libjpeg/jconfig.mc6
+++ b/src/3rdparty/libjpeg/jconfig.mc6
@@ -30,7 +30,7 @@
#define SHORTxLCONST_32 /* enable compiler-specific DCT optimization */
/* Note: the above define is known to improve the code with Microsoft C 6.00A.
* I do not know whether it is good for later compiler versions.
- * Please report any info on this point to jpeg-info@uunet.uu.net.
+ * Please report any info on this point to jpeg-info@uc.ag.
*/
#endif /* JPEG_INTERNALS */
diff --git a/src/3rdparty/libjpeg/jconfig.txt b/src/3rdparty/libjpeg/jconfig.txt
index 8819e79..b96d312 100644
--- a/src/3rdparty/libjpeg/jconfig.txt
+++ b/src/3rdparty/libjpeg/jconfig.txt
@@ -91,6 +91,15 @@
*/
#undef INCOMPLETE_TYPES_BROKEN
+/* Define "boolean" as unsigned char, not int, on Windows systems.
+ */
+#ifdef _WIN32
+#ifndef __RPCNDR_H__ /* don't conflict if rpcndr.h already read */
+typedef unsigned char boolean;
+#endif
+#define HAVE_BOOLEAN /* prevent jmorecfg.h from redefining it */
+#endif
+
/*
* The following options affect code selection within the JPEG library,
diff --git a/src/3rdparty/libjpeg/jdatasrc.c b/src/3rdparty/libjpeg/jdatasrc.c
index d3136db..c8fe3da 100644
--- a/src/3rdparty/libjpeg/jdatasrc.c
+++ b/src/3rdparty/libjpeg/jdatasrc.c
@@ -2,7 +2,7 @@
* jdatasrc.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
- * Modified 2009 by Guido Vollbeding.
+ * Modified 2009-2010 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -163,7 +163,7 @@ skip_input_data (j_decompress_ptr cinfo, long num_bytes)
if (num_bytes > 0) {
while (num_bytes > (long) src->bytes_in_buffer) {
num_bytes -= (long) src->bytes_in_buffer;
- (void) fill_input_buffer(cinfo);
+ (void) (*src->fill_input_buffer) (cinfo);
/* note we assume that fill_input_buffer will never return FALSE,
* so suspension need not be handled.
*/
diff --git a/src/3rdparty/libjpeg/jddctmgr.c b/src/3rdparty/libjpeg/jddctmgr.c
index bdbde34..0ded9d5 100644
--- a/src/3rdparty/libjpeg/jddctmgr.c
+++ b/src/3rdparty/libjpeg/jddctmgr.c
@@ -2,6 +2,7 @@
* jddctmgr.c
*
* Copyright (C) 1994-1996, Thomas G. Lane.
+ * Modified 2002-2010 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -324,6 +325,7 @@ start_pass (j_decompress_ptr cinfo)
* coefficients scaled by scalefactor[row]*scalefactor[col], where
* scalefactor[0] = 1
* scalefactor[k] = cos(k*PI/16) * sqrt(2) for k=1..7
+ * We apply a further scale factor of 1/8.
*/
FLOAT_MULT_TYPE * fmtbl = (FLOAT_MULT_TYPE *) compptr->dct_table;
int row, col;
@@ -337,7 +339,7 @@ start_pass (j_decompress_ptr cinfo)
for (col = 0; col < DCTSIZE; col++) {
fmtbl[i] = (FLOAT_MULT_TYPE)
((double) qtbl->quantval[i] *
- aanscalefactor[row] * aanscalefactor[col]);
+ aanscalefactor[row] * aanscalefactor[col] * 0.125);
i++;
}
}
diff --git a/src/3rdparty/libjpeg/jidctflt.c b/src/3rdparty/libjpeg/jidctflt.c
index 0188ce3..23ae9d3 100644
--- a/src/3rdparty/libjpeg/jidctflt.c
+++ b/src/3rdparty/libjpeg/jidctflt.c
@@ -2,6 +2,7 @@
* jidctflt.c
*
* Copyright (C) 1994-1998, Thomas G. Lane.
+ * Modified 2010 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -76,10 +77,9 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
FLOAT_MULT_TYPE * quantptr;
FAST_FLOAT * wsptr;
JSAMPROW outptr;
- JSAMPLE *range_limit = IDCT_range_limit(cinfo);
+ JSAMPLE *range_limit = cinfo->sample_range_limit;
int ctr;
FAST_FLOAT workspace[DCTSIZE2]; /* buffers data between passes */
- SHIFT_TEMPS
/* Pass 1: process columns from input, store into work array. */
@@ -152,12 +152,12 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562); /* 2*c4 */
z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */
- tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */
- tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */
+ tmp10 = z5 - z12 * ((FAST_FLOAT) 1.082392200); /* 2*(c2-c6) */
+ tmp12 = z5 - z10 * ((FAST_FLOAT) 2.613125930); /* 2*(c2+c6) */
tmp6 = tmp12 - tmp7; /* phase 2 */
tmp5 = tmp11 - tmp6;
- tmp4 = tmp10 + tmp5;
+ tmp4 = tmp10 - tmp5;
wsptr[DCTSIZE*0] = tmp0 + tmp7;
wsptr[DCTSIZE*7] = tmp0 - tmp7;
@@ -165,8 +165,8 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
wsptr[DCTSIZE*6] = tmp1 - tmp6;
wsptr[DCTSIZE*2] = tmp2 + tmp5;
wsptr[DCTSIZE*5] = tmp2 - tmp5;
- wsptr[DCTSIZE*4] = tmp3 + tmp4;
- wsptr[DCTSIZE*3] = tmp3 - tmp4;
+ wsptr[DCTSIZE*3] = tmp3 + tmp4;
+ wsptr[DCTSIZE*4] = tmp3 - tmp4;
inptr++; /* advance pointers to next column */
quantptr++;
@@ -174,7 +174,6 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
}
/* Pass 2: process rows from work array, store into output array. */
- /* Note that we must descale the results by a factor of 8 == 2**3. */
wsptr = workspace;
for (ctr = 0; ctr < DCTSIZE; ctr++) {
@@ -187,8 +186,10 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
/* Even part */
- tmp10 = wsptr[0] + wsptr[4];
- tmp11 = wsptr[0] - wsptr[4];
+ /* Apply signed->unsigned and prepare float->int conversion */
+ z5 = wsptr[0] + ((FAST_FLOAT) CENTERJSAMPLE + (FAST_FLOAT) 0.5);
+ tmp10 = z5 + wsptr[4];
+ tmp11 = z5 - wsptr[4];
tmp13 = wsptr[2] + wsptr[6];
tmp12 = (wsptr[2] - wsptr[6]) * ((FAST_FLOAT) 1.414213562) - tmp13;
@@ -209,31 +210,23 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
tmp11 = (z11 - z13) * ((FAST_FLOAT) 1.414213562);
z5 = (z10 + z12) * ((FAST_FLOAT) 1.847759065); /* 2*c2 */
- tmp10 = ((FAST_FLOAT) 1.082392200) * z12 - z5; /* 2*(c2-c6) */
- tmp12 = ((FAST_FLOAT) -2.613125930) * z10 + z5; /* -2*(c2+c6) */
+ tmp10 = z5 - z12 * ((FAST_FLOAT) 1.082392200); /* 2*(c2-c6) */
+ tmp12 = z5 - z10 * ((FAST_FLOAT) 2.613125930); /* 2*(c2+c6) */
tmp6 = tmp12 - tmp7;
tmp5 = tmp11 - tmp6;
- tmp4 = tmp10 + tmp5;
-
- /* Final output stage: scale down by a factor of 8 and range-limit */
-
- outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3)
- & RANGE_MASK];
- outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3)
- & RANGE_MASK];
- outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3)
- & RANGE_MASK];
- outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3)
- & RANGE_MASK];
- outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3)
- & RANGE_MASK];
- outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3)
- & RANGE_MASK];
- outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3)
- & RANGE_MASK];
- outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3)
- & RANGE_MASK];
+ tmp4 = tmp10 - tmp5;
+
+ /* Final output stage: float->int conversion and range-limit */
+
+ outptr[0] = range_limit[((int) (tmp0 + tmp7)) & RANGE_MASK];
+ outptr[7] = range_limit[((int) (tmp0 - tmp7)) & RANGE_MASK];
+ outptr[1] = range_limit[((int) (tmp1 + tmp6)) & RANGE_MASK];
+ outptr[6] = range_limit[((int) (tmp1 - tmp6)) & RANGE_MASK];
+ outptr[2] = range_limit[((int) (tmp2 + tmp5)) & RANGE_MASK];
+ outptr[5] = range_limit[((int) (tmp2 - tmp5)) & RANGE_MASK];
+ outptr[3] = range_limit[((int) (tmp3 + tmp4)) & RANGE_MASK];
+ outptr[4] = range_limit[((int) (tmp3 - tmp4)) & RANGE_MASK];
wsptr += DCTSIZE; /* advance pointer to next row */
}
diff --git a/src/3rdparty/libjpeg/jinclude.h b/src/3rdparty/libjpeg/jinclude.h
index 0a4f151..a61939d 100644
--- a/src/3rdparty/libjpeg/jinclude.h
+++ b/src/3rdparty/libjpeg/jinclude.h
@@ -20,6 +20,10 @@
#include "jconfig.h" /* auto configuration options */
#define JCONFIG_INCLUDED /* so that jpeglib.h doesn't do it again */
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+
/*
* We need the NULL macro and size_t typedef.
* On an ANSI-conforming system it is sufficient to include <stddef.h>.
diff --git a/src/3rdparty/libjpeg/jmorecfg.h b/src/3rdparty/libjpeg/jmorecfg.h
index 4c56cf3..8365392 100644
--- a/src/3rdparty/libjpeg/jmorecfg.h
+++ b/src/3rdparty/libjpeg/jmorecfg.h
@@ -192,6 +192,7 @@ typedef unsigned int JDIMENSION;
#if defined(VXWORKS) && defined(LOCAL)
#undef LOCAL
#endif
+
/* a function called through method pointers: */
#define METHODDEF(type) static type
/* a function used only in its module: */
@@ -278,7 +279,7 @@ typedef int boolean;
/* Encoder capability options: */
-#undef C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
+#define C_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define C_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define C_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
#define DCT_SCALING_SUPPORTED /* Input rescaling via DCT? (Requires DCT_ISLOW)*/
@@ -295,7 +296,7 @@ typedef int boolean;
/* Decoder capability options: */
-#undef D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
+#define D_ARITH_CODING_SUPPORTED /* Arithmetic coding back end? */
#define D_MULTISCAN_FILES_SUPPORTED /* Multiple-scan JPEG files? */
#define D_PROGRESSIVE_SUPPORTED /* Progressive JPEG? (Requires MULTISCAN)*/
#define IDCT_SCALING_SUPPORTED /* Output rescaling via IDCT? */
diff --git a/src/3rdparty/libjpeg/jpeglib.h b/src/3rdparty/libjpeg/jpeglib.h
index 5039d4b..1eb1fac 100644
--- a/src/3rdparty/libjpeg/jpeglib.h
+++ b/src/3rdparty/libjpeg/jpeglib.h
@@ -2,7 +2,7 @@
* jpeglib.h
*
* Copyright (C) 1991-1998, Thomas G. Lane.
- * Modified 2002-2009 by Guido Vollbeding.
+ * Modified 2002-2010 by Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -33,11 +33,13 @@ extern "C" {
#endif
#endif
-/* Version ID for the JPEG library.
+/* Version IDs for the JPEG library.
* Might be useful for tests like "#if JPEG_LIB_VERSION >= 80".
*/
-#define JPEG_LIB_VERSION 80 /* Version 8.0 */
+#define JPEG_LIB_VERSION 80 /* Compatibility version 8.0 */
+#define JPEG_LIB_VERSION_MAJOR 8
+#define JPEG_LIB_VERSION_MINOR 3
/* Various constants determining the sizes of things.
diff --git a/src/3rdparty/libjpeg/jversion.h b/src/3rdparty/libjpeg/jversion.h
index 0c4e6ea..e868538 100644
--- a/src/3rdparty/libjpeg/jversion.h
+++ b/src/3rdparty/libjpeg/jversion.h
@@ -1,7 +1,7 @@
/*
* jversion.h
*
- * Copyright (C) 1991-2010, Thomas G. Lane, Guido Vollbeding.
+ * Copyright (C) 1991-2011, Thomas G. Lane, Guido Vollbeding.
* This file is part of the Independent JPEG Group's software.
* For conditions of distribution and use, see the accompanying README file.
*
@@ -9,6 +9,6 @@
*/
-#define JVERSION "8 10-Jan-2010"
+#define JVERSION "8c 16-Jan-2011"
-#define JCOPYRIGHT "Copyright (C) 2010, Thomas G. Lane, Guido Vollbeding"
+#define JCOPYRIGHT "Copyright (C) 2011, Thomas G. Lane, Guido Vollbeding"
diff --git a/src/3rdparty/libjpeg/libjpeg.map b/src/3rdparty/libjpeg/libjpeg.map
deleted file mode 100644
index ac77dca..0000000
--- a/src/3rdparty/libjpeg/libjpeg.map
+++ /dev/null
@@ -1,4 +0,0 @@
-LIBJPEG_8.0 {
- global:
- *;
-};
diff --git a/src/3rdparty/libjpeg/libjpeg.txt b/src/3rdparty/libjpeg/libjpeg.txt
index e5a85c0..2d98e22 100644
--- a/src/3rdparty/libjpeg/libjpeg.txt
+++ b/src/3rdparty/libjpeg/libjpeg.txt
@@ -1,6 +1,6 @@
USING THE IJG JPEG LIBRARY
-Copyright (C) 1994-2009, Thomas G. Lane, Guido Vollbeding.
+Copyright (C) 1994-2010, Thomas G. Lane, Guido Vollbeding.
This file is part of the Independent JPEG Group's software.
For conditions of distribution and use, see the accompanying README file.
@@ -876,6 +876,18 @@ jpeg_simple_progression (j_compress_ptr cinfo)
Compression parameters (cinfo fields) include:
+int block_size
+ Set DCT block size. All N from 1 to 16 are possible.
+ Default is 8 (baseline format).
+ Larger values produce higher compression,
+ smaller values produce higher quality.
+ An exact DCT stage is possible with 1 or 2.
+ With the default quality of 75 and default Luminance qtable
+ the DCT+Quantization stage is lossless for value 1.
+ Note that values other than 8 require a SmartScale capable decoder,
+ introduced with IJG JPEG 8. Setting the block_size parameter for
+ compression works with version 8c and later.
+
J_DCT_METHOD dct_method
Selects the algorithm used for the DCT step. Choices are:
JDCT_ISLOW: slow but accurate integer algorithm
@@ -895,8 +907,10 @@ J_DCT_METHOD dct_method
unsigned int scale_num, scale_denom
Scale the image by the fraction scale_num/scale_denom. Default is
1/1, or no scaling. Currently, the supported scaling ratios are
- 8/N with all N from 1 to 16. (The library design allows for arbitrary
- scaling ratios but this is not likely to be implemented any time soon.)
+ M/N with all N from 1 to 16, where M is the destination DCT size,
+ which is 8 by default (see block_size parameter above).
+ (The library design allows for arbitrary scaling ratios but this
+ is not likely to be implemented any time soon.)
J_COLOR_SPACE jpeg_color_space
int num_components
diff --git a/src/3rdparty/libjpeg/makcjpeg.st b/src/3rdparty/libjpeg/makcjpeg.st
deleted file mode 100644
index 628f533..0000000
--- a/src/3rdparty/libjpeg/makcjpeg.st
+++ /dev/null
@@ -1,36 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding.
-;
-; To use this file, rename it to cjpeg.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-; * * * Output file * * *
-cjpeg.ttp
-;
-; * * * COMPILER OPTIONS * * *
-.C[-P] ; absolute calls
-.C[-M] ; and no string merging, folks
-.C[-w-cln] ; no "constant is long" warnings
-.C[-w-par] ; no "parameter xxxx unused"
-.C[-w-rch] ; no "unreachable code"
-.C[-wsig] ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * *
-pcstart.o
-cjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h)
-cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-libjpeg.lib ; built by libjpeg.prj
-pcfltlib.lib ; floating point library
-; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED
-pcstdlib.lib ; standard library
-pcextlib.lib ; extended library
diff --git a/src/3rdparty/libjpeg/makdjpeg.st b/src/3rdparty/libjpeg/makdjpeg.st
deleted file mode 100644
index 4b61404..0000000
--- a/src/3rdparty/libjpeg/makdjpeg.st
+++ /dev/null
@@ -1,36 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding.
-;
-; To use this file, rename it to djpeg.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-; * * * Output file * * *
-djpeg.ttp
-;
-; * * * COMPILER OPTIONS * * *
-.C[-P] ; absolute calls
-.C[-M] ; and no string merging, folks
-.C[-w-cln] ; no "constant is long" warnings
-.C[-w-par] ; no "parameter xxxx unused"
-.C[-w-rch] ; no "unreachable code"
-.C[-wsig] ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * *
-pcstart.o
-djpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,jversion.h)
-cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdcolmap.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrppm.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrgif.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrtarga.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrbmp.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-wrrle.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-libjpeg.lib ; built by libjpeg.prj
-pcfltlib.lib ; floating point library
-; the float library can be omitted if you've turned off DCT_FLOAT_SUPPORTED
-pcstdlib.lib ; standard library
-pcextlib.lib ; extended library
diff --git a/src/3rdparty/libjpeg/makeadsw.vc6 b/src/3rdparty/libjpeg/makeadsw.vc6
deleted file mode 100644
index 80459c5..0000000
--- a/src/3rdparty/libjpeg/makeadsw.vc6
+++ /dev/null
@@ -1,77 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL™SCHT WERDEN!
-
-###############################################################################
-
-Project: "cjpeg"=".\cjpeg.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "djpeg"=".\djpeg.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "jpegtran"=".\jpegtran.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "rdjpgcom"=".\rdjpgcom.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Project: "wrjpgcom"=".\wrjpgcom.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/src/3rdparty/libjpeg/makeasln.vc9 b/src/3rdparty/libjpeg/makeasln.vc9
deleted file mode 100644
index c88ba8d..0000000
--- a/src/3rdparty/libjpeg/makeasln.vc9
+++ /dev/null
@@ -1,33 +0,0 @@
-‹¯¨
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cjpeg", "cjpeg.vcproj", "{B4F61778-C45D-45C6-9E87-06F03F50519F}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "djpeg", "djpeg.vcproj", "{9B7E57AE-31CD-405E-8070-26A8303B9DC9}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpegtran", "jpegtran.vcproj", "{813C33AF-9031-49D2-BA19-93D600CDD404}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rdjpgcom", "rdjpgcom.vcproj", "{EB107F86-A8CC-4507-8115-88D31DDE4CDF}"
-EndProject
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wrjpgcom", "wrjpgcom.vcproj", "{178670D7-FA7F-44A8-96C7-11B1CA14269C}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {B4F61778-C45D-45C6-9E87-06F03F50519F}.Release|Win32.ActiveCfg = Release|Win32
- {B4F61778-C45D-45C6-9E87-06F03F50519F}.Release|Win32.Build.0 = Release|Win32
- {9B7E57AE-31CD-405E-8070-26A8303B9DC9}.Release|Win32.ActiveCfg = Release|Win32
- {9B7E57AE-31CD-405E-8070-26A8303B9DC9}.Release|Win32.Build.0 = Release|Win32
- {813C33AF-9031-49D2-BA19-93D600CDD404}.Release|Win32.ActiveCfg = Release|Win32
- {813C33AF-9031-49D2-BA19-93D600CDD404}.Release|Win32.Build.0 = Release|Win32
- {EB107F86-A8CC-4507-8115-88D31DDE4CDF}.Release|Win32.ActiveCfg = Release|Win32
- {EB107F86-A8CC-4507-8115-88D31DDE4CDF}.Release|Win32.Build.0 = Release|Win32
- {178670D7-FA7F-44A8-96C7-11B1CA14269C}.Release|Win32.ActiveCfg = Release|Win32
- {178670D7-FA7F-44A8-96C7-11B1CA14269C}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/src/3rdparty/libjpeg/makecdep.vc6 b/src/3rdparty/libjpeg/makecdep.vc6
deleted file mode 100644
index 11dff77..0000000
--- a/src/3rdparty/libjpeg/makecdep.vc6
+++ /dev/null
@@ -1,82 +0,0 @@
-# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von cjpeg.mak
-
-.\cdjpeg.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\cjpeg.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
- ".\jversion.h"\
-
-
-.\rdbmp.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\rdgif.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\rdppm.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\rdrle.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\rdswitch.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\rdtarga.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
diff --git a/src/3rdparty/libjpeg/makecdsp.vc6 b/src/3rdparty/libjpeg/makecdsp.vc6
deleted file mode 100644
index 3ab5965..0000000
--- a/src/3rdparty/libjpeg/makecdsp.vc6
+++ /dev/null
@@ -1,130 +0,0 @@
-# Microsoft Developer Studio Project File - Name="cjpeg" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** NICHT BEARBEITEN **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=cjpeg - Win32
-!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
-!MESSAGE
-!MESSAGE NMAKE /f "cjpeg.mak".
-!MESSAGE
-!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "cjpeg.mak" CFG="cjpeg - Win32"
-!MESSAGE
-!MESSAGE Fr die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "cjpeg - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\cjpeg\Release"
-# PROP BASE Intermediate_Dir ".\cjpeg\Release"
-# PROP BASE Target_Dir ".\cjpeg"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\cjpeg\Release"
-# PROP Intermediate_Dir ".\cjpeg\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\cjpeg"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# Begin Target
-
-# Name "cjpeg - Win32"
-# Begin Group "Quellcodedateien"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\cdjpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\cjpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdbmp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdgif.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdppm.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdrle.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdswitch.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdtarga.c
-# End Source File
-# End Group
-# Begin Group "Header-Dateien"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\cderror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cdjpeg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jversion.h
-# End Source File
-# End Group
-# Begin Group "Ressourcendateien"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/libjpeg/makecmak.vc6 b/src/3rdparty/libjpeg/makecmak.vc6
deleted file mode 100644
index bee03bf..0000000
--- a/src/3rdparty/libjpeg/makecmak.vc6
+++ /dev/null
@@ -1,159 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on cjpeg.dsp
-!IF "$(CFG)" == ""
-CFG=cjpeg - Win32
-!MESSAGE Keine Konfiguration angegeben. cjpeg - Win32 wird als Standard verwendet.
-!ENDIF
-
-!IF "$(CFG)" != "cjpeg - Win32"
-!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
-!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "cjpeg.mak" CFG="cjpeg - Win32"
-!MESSAGE
-!MESSAGE Für die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "cjpeg - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR Eine ungültige Konfiguration wurde angegeben.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-CPP=cl.exe
-RSC=rc.exe
-OUTDIR=.\cjpeg\Release
-INTDIR=.\cjpeg\Release
-# Begin Custom Macros
-OutDir=.\cjpeg\Release
-# End Custom Macros
-
-ALL : "$(OUTDIR)\cjpeg.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\cdjpeg.obj"
- -@erase "$(INTDIR)\cjpeg.obj"
- -@erase "$(INTDIR)\rdbmp.obj"
- -@erase "$(INTDIR)\rdgif.obj"
- -@erase "$(INTDIR)\rdppm.obj"
- -@erase "$(INTDIR)\rdrle.obj"
- -@erase "$(INTDIR)\rdswitch.obj"
- -@erase "$(INTDIR)\rdtarga.obj"
- -@erase "$(INTDIR)\vc60.idb"
- -@erase "$(OUTDIR)\cjpeg.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\cjpeg.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\cjpeg.pdb" /machine:I386 /out:"$(OUTDIR)\cjpeg.exe"
-LINK32_OBJS= \
- "$(INTDIR)\cdjpeg.obj" \
- "$(INTDIR)\cjpeg.obj" \
- "$(INTDIR)\rdbmp.obj" \
- "$(INTDIR)\rdgif.obj" \
- "$(INTDIR)\rdppm.obj" \
- "$(INTDIR)\rdrle.obj" \
- "$(INTDIR)\rdswitch.obj" \
- "$(INTDIR)\rdtarga.obj"
-
-"$(OUTDIR)\cjpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\cjpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("cjpeg.dep")
-!INCLUDE "cjpeg.dep"
-!ELSE
-!MESSAGE Warning: cannot find "cjpeg.dep"
-!ENDIF
-!ENDIF
-
-
-!IF "$(CFG)" == "cjpeg - Win32"
-SOURCE=.\cdjpeg.c
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\cjpeg.c
-
-"$(INTDIR)\cjpeg.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\rdbmp.c
-
-"$(INTDIR)\rdbmp.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\rdgif.c
-
-"$(INTDIR)\rdgif.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\rdppm.c
-
-"$(INTDIR)\rdppm.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\rdrle.c
-
-"$(INTDIR)\rdrle.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\rdswitch.c
-
-"$(INTDIR)\rdswitch.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\rdtarga.c
-
-"$(INTDIR)\rdtarga.obj" : $(SOURCE) "$(INTDIR)"
-
-
-
-!ENDIF
-
diff --git a/src/3rdparty/libjpeg/makecvcp.vc9 b/src/3rdparty/libjpeg/makecvcp.vc9
deleted file mode 100644
index b38e6a1..0000000
--- a/src/3rdparty/libjpeg/makecvcp.vc9
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="cjpeg"
- ProjectGUID="{B4F61778-C45D-45C6-9E87-06F03F50519F}"
- RootNamespace="cjpeg"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ProjectName)\$(ConfigurationName)"
- IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- EnableIntrinsicFunctions="false"
- EnableFiberSafeOptimizations="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Release\jpeg.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Quelldateien"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\cdjpeg.c"
- >
- </File>
- <File
- RelativePath=".\cjpeg.c"
- >
- </File>
- <File
- RelativePath=".\rdbmp.c"
- >
- </File>
- <File
- RelativePath=".\rdgif.c"
- >
- </File>
- <File
- RelativePath=".\rdppm.c"
- >
- </File>
- <File
- RelativePath=".\rdrle.c"
- >
- </File>
- <File
- RelativePath=".\rdswitch.c"
- >
- </File>
- <File
- RelativePath=".\rdtarga.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Headerdateien"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\cderror.h"
- >
- </File>
- <File
- RelativePath=".\cdjpeg.h"
- >
- </File>
- <File
- RelativePath=".\jconfig.h"
- >
- </File>
- <File
- RelativePath=".\jerror.h"
- >
- </File>
- <File
- RelativePath=".\jinclude.h"
- >
- </File>
- <File
- RelativePath=".\jmorecfg.h"
- >
- </File>
- <File
- RelativePath=".\jpeglib.h"
- >
- </File>
- <File
- RelativePath=".\jversion.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Ressourcendateien"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makeddep.vc6 b/src/3rdparty/libjpeg/makeddep.vc6
deleted file mode 100644
index f911eba..0000000
--- a/src/3rdparty/libjpeg/makeddep.vc6
+++ /dev/null
@@ -1,82 +0,0 @@
-# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von djpeg.mak
-
-.\cdjpeg.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\djpeg.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
- ".\jversion.h"\
-
-
-.\rdcolmap.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\wrbmp.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\wrgif.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\wrppm.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\wrrle.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\wrtarga.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
diff --git a/src/3rdparty/libjpeg/makeddsp.vc6 b/src/3rdparty/libjpeg/makeddsp.vc6
deleted file mode 100644
index f583a0f..0000000
--- a/src/3rdparty/libjpeg/makeddsp.vc6
+++ /dev/null
@@ -1,130 +0,0 @@
-# Microsoft Developer Studio Project File - Name="djpeg" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** NICHT BEARBEITEN **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=djpeg - Win32
-!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
-!MESSAGE
-!MESSAGE NMAKE /f "djpeg.mak".
-!MESSAGE
-!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "djpeg.mak" CFG="djpeg - Win32"
-!MESSAGE
-!MESSAGE Fr die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "djpeg - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\djpeg\Release"
-# PROP BASE Intermediate_Dir ".\djpeg\Release"
-# PROP BASE Target_Dir ".\djpeg"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\djpeg\Release"
-# PROP Intermediate_Dir ".\djpeg\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\djpeg"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# Begin Target
-
-# Name "djpeg - Win32"
-# Begin Group "Quellcodedateien"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\cdjpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\djpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdcolmap.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrbmp.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrgif.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrppm.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrrle.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\wrtarga.c
-# End Source File
-# End Group
-# Begin Group "Header-Dateien"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\cderror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cdjpeg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jversion.h
-# End Source File
-# End Group
-# Begin Group "Ressourcendateien"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/libjpeg/makedmak.vc6 b/src/3rdparty/libjpeg/makedmak.vc6
deleted file mode 100644
index e16487f..0000000
--- a/src/3rdparty/libjpeg/makedmak.vc6
+++ /dev/null
@@ -1,159 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on djpeg.dsp
-!IF "$(CFG)" == ""
-CFG=djpeg - Win32
-!MESSAGE Keine Konfiguration angegeben. djpeg - Win32 wird als Standard verwendet.
-!ENDIF
-
-!IF "$(CFG)" != "djpeg - Win32"
-!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
-!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "djpeg.mak" CFG="djpeg - Win32"
-!MESSAGE
-!MESSAGE Für die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "djpeg - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR Eine ungültige Konfiguration wurde angegeben.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-CPP=cl.exe
-RSC=rc.exe
-OUTDIR=.\djpeg\Release
-INTDIR=.\djpeg\Release
-# Begin Custom Macros
-OutDir=.\djpeg\Release
-# End Custom Macros
-
-ALL : "$(OUTDIR)\djpeg.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\cdjpeg.obj"
- -@erase "$(INTDIR)\djpeg.obj"
- -@erase "$(INTDIR)\rdcolmap.obj"
- -@erase "$(INTDIR)\vc60.idb"
- -@erase "$(INTDIR)\wrbmp.obj"
- -@erase "$(INTDIR)\wrgif.obj"
- -@erase "$(INTDIR)\wrppm.obj"
- -@erase "$(INTDIR)\wrrle.obj"
- -@erase "$(INTDIR)\wrtarga.obj"
- -@erase "$(OUTDIR)\djpeg.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\djpeg.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\djpeg.pdb" /machine:I386 /out:"$(OUTDIR)\djpeg.exe"
-LINK32_OBJS= \
- "$(INTDIR)\cdjpeg.obj" \
- "$(INTDIR)\djpeg.obj" \
- "$(INTDIR)\rdcolmap.obj" \
- "$(INTDIR)\wrbmp.obj" \
- "$(INTDIR)\wrgif.obj" \
- "$(INTDIR)\wrppm.obj" \
- "$(INTDIR)\wrrle.obj" \
- "$(INTDIR)\wrtarga.obj"
-
-"$(OUTDIR)\djpeg.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\djpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("djpeg.dep")
-!INCLUDE "djpeg.dep"
-!ELSE
-!MESSAGE Warning: cannot find "djpeg.dep"
-!ENDIF
-!ENDIF
-
-
-!IF "$(CFG)" == "djpeg - Win32"
-SOURCE=.\cdjpeg.c
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\djpeg.c
-
-"$(INTDIR)\djpeg.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\rdcolmap.c
-
-"$(INTDIR)\rdcolmap.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\wrbmp.c
-
-"$(INTDIR)\wrbmp.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\wrgif.c
-
-"$(INTDIR)\wrgif.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\wrppm.c
-
-"$(INTDIR)\wrppm.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\wrrle.c
-
-"$(INTDIR)\wrrle.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\wrtarga.c
-
-"$(INTDIR)\wrtarga.obj" : $(SOURCE) "$(INTDIR)"
-
-
-
-!ENDIF
-
diff --git a/src/3rdparty/libjpeg/makedvcp.vc9 b/src/3rdparty/libjpeg/makedvcp.vc9
deleted file mode 100644
index 6f5bb1e..0000000
--- a/src/3rdparty/libjpeg/makedvcp.vc9
+++ /dev/null
@@ -1,186 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="djpeg"
- ProjectGUID="{9B7E57AE-31CD-405E-8070-26A8303B9DC9}"
- RootNamespace="djpeg"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ProjectName)\$(ConfigurationName)"
- IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- EnableIntrinsicFunctions="false"
- EnableFiberSafeOptimizations="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Release\jpeg.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Quelldateien"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\cdjpeg.c"
- >
- </File>
- <File
- RelativePath=".\djpeg.c"
- >
- </File>
- <File
- RelativePath=".\rdcolmap.c"
- >
- </File>
- <File
- RelativePath=".\wrbmp.c"
- >
- </File>
- <File
- RelativePath=".\wrgif.c"
- >
- </File>
- <File
- RelativePath=".\wrppm.c"
- >
- </File>
- <File
- RelativePath=".\wrrle.c"
- >
- </File>
- <File
- RelativePath=".\wrtarga.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Headerdateien"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\cderror.h"
- >
- </File>
- <File
- RelativePath=".\cdjpeg.h"
- >
- </File>
- <File
- RelativePath=".\jconfig.h"
- >
- </File>
- <File
- RelativePath=".\jerror.h"
- >
- </File>
- <File
- RelativePath=".\jinclude.h"
- >
- </File>
- <File
- RelativePath=".\jmorecfg.h"
- >
- </File>
- <File
- RelativePath=".\jpeglib.h"
- >
- </File>
- <File
- RelativePath=".\jversion.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Ressourcendateien"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makefile.ansi b/src/3rdparty/libjpeg/makefile.ansi
deleted file mode 100644
index 30e41c9..0000000
--- a/src/3rdparty/libjpeg/makefile.ansi
+++ /dev/null
@@ -1,220 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Unix-like systems with ANSI-capable compilers.
-# If you have a non-ANSI compiler, makefile.unix is a better starting point.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-CFLAGS= -O
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-LDFLAGS=
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= rm -f
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
- jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
- jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
- jfdctflt.o jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
- jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
- jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
- jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-libjpeg.a: $(LIBOBJECTS)
- $(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-cjpeg: $(COBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg: $(DOBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran: $(TROBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.txt
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.txt.
- exit 1
-
-clean:
- $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom
- $(RM) core testout*
-
-test: cjpeg djpeg jpegtran
- $(RM) testout*
- ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- ./jpegtran -outfile testoutt.jpg testprog.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.bmp testout.bmp
- cmp testimg.jpg testout.jpg
- cmp testimg.ppm testoutp.ppm
- cmp testimgp.jpg testoutp.jpg
- cmp testorig.jpg testoutt.jpg
-
-
-jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makefile.bcc b/src/3rdparty/libjpeg/makefile.bcc
deleted file mode 100644
index c9e2311..0000000
--- a/src/3rdparty/libjpeg/makefile.bcc
+++ /dev/null
@@ -1,291 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Borland C on MS-DOS or OS/2.
-# It works with Borland C++ for DOS, revision 3.0 or later,
-# and has been tested with Borland C++ for OS/2.
-# Watch out for optimization bugs in the OS/2 compilers --- see notes below!
-# Thanks to Tom Wright and Ge' Weijers (original DOS) and
-# Ken Porter (OS/2) for this file.
-
-# Read installation instructions before saying "make" !!
-
-# Are we under DOS or OS/2?
-!if !$d(DOS) && !$d(OS2)
-!if $d(__OS2__)
-OS2=1
-!else
-DOS=1
-!endif
-!endif
-
-# The name of your C compiler:
-CC= bcc
-
-# You may need to adjust these cc options:
-!if $d(DOS)
-CFLAGS= -O2 -mm -w-par -w-stu -w-ccc -w-rch
-!else
-CFLAGS= -O1 -w-par -w-stu -w-ccc -w-rch
-!endif
-# -O2 enables full code optimization (for pre-3.0 Borland C++, use -O -G -Z).
-# -O2 is buggy in Borland OS/2 C++ revision 2.0, so use -O1 there for now.
-# If you have Borland OS/2 C++ revision 1.0, use -O or no optimization at all.
-# -mm selects medium memory model (near data, far code pointers; DOS only!)
-# -w-par suppresses warnings about unused function parameters
-# -w-stu suppresses warnings about incomplete structures
-# -w-ccc suppresses warnings about compile-time-constant conditions
-# -w-rch suppresses warnings about unreachable code
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-!if $d(DOS)
-LDFLAGS= -mm
-# memory model option here must match CFLAGS!
-!else
-LDFLAGS=
-# -lai full-screen app
-# -lc case-significant link
-!endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file.
-# For DOS, we recommend jmemdos.c and jmemdosa.asm.
-# For OS/2, we recommend jmemnobs.c (flat memory!)
-# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
-!if $d(DOS)
-SYSDEPMEM= jmemdos.obj jmemdosa.obj
-SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
-!else
-SYSDEPMEM= jmemnobs.obj
-SYSDEPMEMLIB= +jmemnobs.obj
-!endif
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
- jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
- jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
- jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
- jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
- jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
- - del libjpeg.lib
- tlib libjpeg.lib /E /C @&&|
-+jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj +jcparam.obj &
-+jdatadst.obj +jcinit.obj +jcmaster.obj +jcmarker.obj +jcmainct.obj &
-+jcprepct.obj +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj &
-+jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj +jfdctint.obj +jdapimin.obj &
-+jdapistd.obj +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj &
-+jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj +jdcoefct.obj &
-+jdpostct.obj +jddctmgr.obj +jidctfst.obj +jidctflt.obj +jidctint.obj &
-+jdsample.obj +jdcolor.obj +jquant1.obj +jquant2.obj +jdmerge.obj &
-+jaricom.obj +jcomapi.obj +jutils.obj +jerror.obj +jmemmgr.obj &
-$(SYSDEPMEMLIB)
-|
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -ecjpeg.exe $(COBJECTS) libjpeg.lib
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -edjpeg.exe $(DOBJECTS) libjpeg.lib
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) -ejpegtran.exe $(TROBJECTS) libjpeg.lib
-
-rdjpgcom.exe: rdjpgcom.c
-!if $d(DOS)
- $(CC) -ms -O rdjpgcom.c
-!else
- $(CC) $(CFLAGS) rdjpgcom.c
-!endif
-
-# On DOS, wrjpgcom needs large model so it can malloc a 64K chunk
-wrjpgcom.exe: wrjpgcom.c
-!if $d(DOS)
- $(CC) -ml -O wrjpgcom.c
-!else
- $(CC) $(CFLAGS) wrjpgcom.c
-!endif
-
-# This "{}" syntax allows Borland Make to "batch" source files.
-# In this way, each run of the compiler can build many modules.
-.c.obj:
- $(CC) $(CFLAGS) -c{ $<}
-
-jconfig.h: jconfig.txt
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.txt.
- exit 1
-
-clean:
- - del *.obj
- - del libjpeg.lib
- - del cjpeg.exe
- - del djpeg.exe
- - del jpegtran.exe
- - del rdjpgcom.exe
- - del wrjpgcom.exe
- - del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- - del testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
-!if $d(DOS)
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-!else
- echo n > n.tmp
- comp testimg.ppm testout.ppm < n.tmp
- comp testimg.bmp testout.bmp < n.tmp
- comp testimg.jpg testout.jpg < n.tmp
- comp testimg.ppm testoutp.ppm < n.tmp
- comp testimgp.jpg testoutp.jpg < n.tmp
- comp testorig.jpg testoutt.jpg < n.tmp
- del n.tmp
-!endif
-
-
-jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-jmemdosa.obj: jmemdosa.asm
- tasm /mx jmemdosa.asm
diff --git a/src/3rdparty/libjpeg/makefile.dj b/src/3rdparty/libjpeg/makefile.dj
deleted file mode 100644
index 14d0ee6..0000000
--- a/src/3rdparty/libjpeg/makefile.dj
+++ /dev/null
@@ -1,226 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for DJGPP (Delorie's GNU C port on MS-DOS), v2.0 or later.
-# Thanks to Frank J. Donahoe for this version.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= gcc
-
-# You may need to adjust these cc options:
-CFLAGS= -O2 -Wall -I.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-LDFLAGS= -s
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For DJGPP this is usually jmemnobs.o, but you could
-# use jmemname.o if you want to use named temp files instead of swap space.
-SYSDEPMEM= jmemnobs.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= del
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
- jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
- jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
- jfdctflt.o jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
- jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
- jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
- jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.a cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.a: $(LIBOBJECTS)
- $(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-cjpeg.exe: $(COBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o cjpeg.exe $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o djpeg.exe $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o jpegtran.exe $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom.exe rdjpgcom.o $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom.exe wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.txt
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.txt.
- exit 1
-
-clean:
- $(RM) *.o
- $(RM) cjpeg.exe
- $(RM) djpeg.exe
- $(RM) jpegtran.exe
- $(RM) rdjpgcom.exe
- $(RM) wrjpgcom.exe
- $(RM) libjpeg.a
- $(RM) testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- $(RM) testout*.*
- ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- ./jpegtran -outfile testoutt.jpg testprog.jpg
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-
-
-jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makefile.manx b/src/3rdparty/libjpeg/makefile.manx
deleted file mode 100644
index d1af57c..0000000
--- a/src/3rdparty/libjpeg/makefile.manx
+++ /dev/null
@@ -1,220 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Amiga systems using Manx Aztec C ver 5.x.
-# Thanks to D.J. James (djjames@cup.portal.com) for this version.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-# Uncomment for generic 68000 code (will work on any Amiga)
-ARCHFLAGS= -sn
-
-# Uncomment for 68020/68030 code (faster, but won't run on 68000 CPU)
-#ARCHFLAGS= -c2
-
-CFLAGS= -MC -MD $(ARCHFLAGS) -spfam -r4
-
-# Link-time cc options:
-LDFLAGS= -g
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS= -lml -lcl
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Amiga we recommend jmemname.o.
-SYSDEPMEM= jmemname.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= ln
-# file deletion command
-RM= delete quiet
-# library (.lib) file creation command
-AR= lb
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
- jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
- jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
- jfdctflt.o jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
- jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
- jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
- jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.lib cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-libjpeg.lib: $(LIBOBJECTS)
- -$(RM) libjpeg.lib
- $(AR) libjpeg.lib $(LIBOBJECTS)
-
-cjpeg: $(COBJECTS) libjpeg.lib
- $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.lib $(LDLIBS)
-
-djpeg: $(DOBJECTS) libjpeg.lib
- $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.lib $(LDLIBS)
-
-jpegtran: $(TROBJECTS) libjpeg.lib
- $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.lib $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.txt
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.txt.
- exit 1
-
-clean:
- -$(RM) *.o cjpeg djpeg jpegtran libjpeg.lib rdjpgcom wrjpgcom
- -$(RM) core testout*.*
-
-test: cjpeg djpeg jpegtran
- -$(RM) testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.bmp testout.bmp
- cmp testimg.jpg testout.jpg
- cmp testimg.ppm testoutp.ppm
- cmp testimgp.jpg testoutp.jpg
- cmp testorig.jpg testoutt.jpg
-
-
-jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makefile.mc6 b/src/3rdparty/libjpeg/makefile.mc6
deleted file mode 100644
index 2e0c747..0000000
--- a/src/3rdparty/libjpeg/makefile.mc6
+++ /dev/null
@@ -1,255 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Microsoft C for MS-DOS, version 6.00A and up.
-# Use NMAKE, not Microsoft's brain-damaged MAKE.
-# Thanks to Alan Wright and Chris Turner of Olivetti Research Ltd.
-
-# Read installation instructions before saying "nmake" !!
-
-# You may need to adjust these compiler options:
-CFLAGS = -AM -Oecigt -Gs -W3
-# -AM medium memory model (or use -AS for small model, if you remove features)
-# -Oecigt -Gs maximum safe optimisation (-Ol has bugs in MSC 6.00A)
-# -W3 warning level 3
-# You might also want to add -G2 if you have an 80286, etc.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Jan-Herman Buining suggests the following switches for MS C 8.0 and a 486:
-# CFLAGS = /AM /f- /FPi87 /G3 /Gs /Gy /Ob1 /Oc /Oe /Og /Oi /Ol /On /Oo /Ot \
-# /OV4 /W3
-# except for jquant1.c, which must be compiled with /Oo- to avoid a compiler
-# crash.
-
-# Ingar Steinsland suggests the following switches when building
-# a 16-bit Windows DLL:
-# CFLAGS = -ALw -Gsw -Zpe -W3 -O2 -Zi -Zd
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For DOS, we recommend jmemdos.c and jmemdosa.asm.
-# (But not for Windows; see install.txt if you use this makefile for Windows.)
-SYSDEPMEM= jmemdos.obj jmemdosa.obj
-# SYSDEPMEMLIB must list the same files with "+" signs for the librarian.
-SYSDEPMEMLIB= +jmemdos.obj +jmemdosa.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
- jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
- jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
- jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
- jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
- jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-# need linker response file because file list > 128 chars
-RFILE = libjpeg.ans
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS) $(RFILE)
- del libjpeg.lib
- lib @$(RFILE)
-
-# linker response file for building libjpeg.lib
-$(RFILE) : makefile
- del $(RFILE)
- echo libjpeg.lib >$(RFILE)
-# silly want-to-create-it prompt:
- echo y >>$(RFILE)
- echo +jcapimin.obj +jcapistd.obj +jcarith.obj +jctrans.obj & >>$(RFILE)
- echo +jcparam.obj +jdatadst.obj +jcinit.obj +jcmaster.obj & >>$(RFILE)
- echo +jcmarker.obj +jcmainct.obj +jcprepct.obj & >>$(RFILE)
- echo +jccoefct.obj +jccolor.obj +jcsample.obj +jchuff.obj & >>$(RFILE)
- echo +jcdctmgr.obj +jfdctfst.obj +jfdctflt.obj & >>$(RFILE)
- echo +jfdctint.obj +jdapimin.obj +jdapistd.obj & >>$(RFILE)
- echo +jdarith.obj +jdtrans.obj +jdatasrc.obj +jdmaster.obj & >>$(RFILE)
- echo +jdinput.obj +jdmarker.obj +jdhuff.obj +jdmainct.obj & >>$(RFILE)
- echo +jdcoefct.obj +jdpostct.obj +jddctmgr.obj & >>$(RFILE)
- echo +jidctfst.obj +jidctflt.obj +jidctint.obj & >>$(RFILE)
- echo +jdsample.obj +jdcolor.obj +jquant1.obj & >>$(RFILE)
- echo +jquant2.obj +jdmerge.obj +jaricom.obj +jcomapi.obj & >>$(RFILE)
- echo +jutils.obj +jerror.obj +jmemmgr.obj & >>$(RFILE)
- echo $(SYSDEPMEMLIB) ; >>$(RFILE)
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- echo $(COBJECTS) >cjpeg.lst
- link /STACK:4096 /EXEPACK @cjpeg.lst, cjpeg.exe, , libjpeg.lib, ;
- del cjpeg.lst
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- echo $(DOBJECTS) >djpeg.lst
- link /STACK:4096 /EXEPACK @djpeg.lst, djpeg.exe, , libjpeg.lib, ;
- del djpeg.lst
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- link /STACK:4096 /EXEPACK $(TROBJECTS), jpegtran.exe, , libjpeg.lib, ;
-
-rdjpgcom.exe: rdjpgcom.c
- $(CC) -AS -O -W3 rdjpgcom.c
-
-# wrjpgcom needs large model so it can malloc a 64K chunk
-wrjpgcom.exe: wrjpgcom.c
- $(CC) -AL -O -W3 wrjpgcom.c
-
-jconfig.h: jconfig.txt
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.txt.
- exit 1
-
-clean:
- del *.obj
- del libjpeg.lib
- del cjpeg.exe
- del djpeg.exe
- del jpegtran.exe
- del rdjpgcom.exe
- del wrjpgcom.exe
- del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- del testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-
-
-jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-jmemdosa.obj : jmemdosa.asm
- masm /mx $*;
diff --git a/src/3rdparty/libjpeg/makefile.mms b/src/3rdparty/libjpeg/makefile.mms
deleted file mode 100644
index 992c25f..0000000
--- a/src/3rdparty/libjpeg/makefile.mms
+++ /dev/null
@@ -1,224 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for use with MMS on Digital VMS systems.
-# Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu)
-# and Tim Bell (tbell@netcom.com) for their help.
-
-# Read installation instructions before saying "MMS" !!
-
-# You may need to adjust these cc options:
-CFLAGS= $(CFLAGS) /NoDebug /Optimize
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via /Define switches here.
-.ifdef ALPHA
-OPT=
-.else
-OPT= ,Sys$Disk:[]MAKVMS.OPT/Option
-.endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
- jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
- jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
- jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
- jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
- jdmerge.obj
-# These objectfiles are included in libjpeg.olb
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-# objectfile lists with commas --- what a crock
-COBJLIST= cjpeg.obj,rdppm.obj,rdgif.obj,rdtarga.obj,rdrle.obj,rdbmp.obj,\
- rdswitch.obj,cdjpeg.obj
-DOBJLIST= djpeg.obj,wrppm.obj,wrgif.obj,wrtarga.obj,wrrle.obj,wrbmp.obj,\
- rdcolmap.obj,cdjpeg.obj
-TROBJLIST= jpegtran.obj,rdswitch.obj,cdjpeg.obj,transupp.obj
-LIBOBJLIST= jaricom.obj,jcapimin.obj,jcapistd.obj,jcarith.obj,jctrans.obj,\
- jcparam.obj,jdatadst.obj,jcinit.obj,jcmaster.obj,jcmarker.obj,\
- jcmainct.obj,jcprepct.obj,jccoefct.obj,jccolor.obj,jcsample.obj,\
- jchuff.obj,jcdctmgr.obj,jfdctfst.obj,jfdctflt.obj,jfdctint.obj,\
- jdapimin.obj,jdapistd.obj,jdarith.obj,jdtrans.obj,jdatasrc.obj,\
- jdmaster.obj,jdinput.obj,jdmarker.obj,jdhuff.obj,jdmainct.obj,\
- jdcoefct.obj,jdpostct.obj,jddctmgr.obj,jidctfst.obj,jidctflt.obj,\
- jidctint.obj,jdsample.obj,jdcolor.obj,jquant1.obj,jquant2.obj,\
- jdmerge.obj,jcomapi.obj,jutils.obj,jerror.obj,jmemmgr.obj,$(SYSDEPMEM)
-
-
-.first
- @- Define /NoLog Sys Sys$Library
-
-ALL : libjpeg.olb cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
- @ Continue
-
-libjpeg.olb : $(LIBOBJECTS)
- Library /Create libjpeg.olb $(LIBOBJLIST)
-
-cjpeg.exe : $(COBJECTS) libjpeg.olb
- $(LINK) $(LFLAGS) /Executable = cjpeg.exe $(COBJLIST),libjpeg.olb/Library$(OPT)
-
-djpeg.exe : $(DOBJECTS) libjpeg.olb
- $(LINK) $(LFLAGS) /Executable = djpeg.exe $(DOBJLIST),libjpeg.olb/Library$(OPT)
-
-jpegtran.exe : $(TROBJECTS) libjpeg.olb
- $(LINK) $(LFLAGS) /Executable = jpegtran.exe $(TROBJLIST),libjpeg.olb/Library$(OPT)
-
-rdjpgcom.exe : rdjpgcom.obj
- $(LINK) $(LFLAGS) /Executable = rdjpgcom.exe rdjpgcom.obj$(OPT)
-
-wrjpgcom.exe : wrjpgcom.obj
- $(LINK) $(LFLAGS) /Executable = wrjpgcom.exe wrjpgcom.obj$(OPT)
-
-jconfig.h : jconfig.vms
- @- Copy jconfig.vms jconfig.h
-
-clean :
- @- Set Protection = Owner:RWED *.*;-1
- @- Set Protection = Owner:RWED *.OBJ
- - Purge /NoLog /NoConfirm *.*
- - Delete /NoLog /NoConfirm *.OBJ;
-
-test : cjpeg.exe djpeg.exe jpegtran.exe
- mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm
- mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg
- - Backup /Compare/Log testimg.ppm testout.ppm
- - Backup /Compare/Log testimg.bmp testout.bmp
- - Backup /Compare/Log testimg.jpg testout.jpg
- - Backup /Compare/Log testimg.ppm testoutp.ppm
- - Backup /Compare/Log testimgp.jpg testoutp.jpg
- - Backup /Compare/Log testorig.jpg testoutt.jpg
-
-
-jaricom.obj : jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.obj : jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj : jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.obj : jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj : jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj : jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj : jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj : jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.obj : jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj : jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj : jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj : jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj : jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj : jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.obj : jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj : jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj : jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj : jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj : jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.obj : jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj : jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj : jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj : jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj : jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj : jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj : jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.obj : jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj : jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj : jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj : jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj : jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.obj : jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj : jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj : jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj : jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj : jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj : jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj : jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj : jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj : jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj : jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj : jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj : jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj : jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj : jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj : jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj : jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj : jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj : jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj : jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj : cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj : djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj : jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj : rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj : wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj : cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj : rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj : rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj : transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj : rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj : wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj : rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj : wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj : rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj : wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj : rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj : wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj : rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj : wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makefile.sas b/src/3rdparty/libjpeg/makefile.sas
deleted file mode 100644
index c7a030c..0000000
--- a/src/3rdparty/libjpeg/makefile.sas
+++ /dev/null
@@ -1,258 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Amiga systems using SAS C 6.0 and up.
-# Thanks to Ed Hanway, Mark Rinfret, and Jim Zepeda.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= sc
-
-# You may need to adjust these cc options:
-# Uncomment the following lines for generic 680x0 version
-ARCHFLAGS= cpu=any
-SUFFIX=
-
-# Uncomment the following lines for 68030-only version
-#ARCHFLAGS= cpu=68030
-#SUFFIX=.030
-
-CFLAGS= nostackcheck data=near parms=register optimize $(ARCHFLAGS) \
- ignore=104 ignore=304 ignore=306
-# ignore=104 disables warnings for mismatched const qualifiers
-# ignore=304 disables warnings for variables being optimized out
-# ignore=306 disables warnings for the inlining of functions
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via define switches here.
-
-# Link-time cc options:
-LDFLAGS= SC SD ND BATCH
-
-# To link any special libraries, add the necessary commands here.
-LDLIBS= LIB:scm.lib LIB:sc.lib
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Amiga we recommend jmemname.o.
-SYSDEPMEM= jmemname.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= slink
-# file deletion command
-RM= delete quiet
-# library (.lib) file creation command
-AR= oml
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
- jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
- jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
- jfdctflt.o jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
- jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
- jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
- jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: libjpeg.lib cjpeg$(SUFFIX) djpeg$(SUFFIX) jpegtran$(SUFFIX) rdjpgcom$(SUFFIX) wrjpgcom$(SUFFIX)
-
-# note: do several AR steps to avoid command line length limitations
-
-libjpeg.lib: $(LIBOBJECTS)
- -$(RM) libjpeg.lib
- $(AR) libjpeg.lib r $(CLIBOBJECTS)
- $(AR) libjpeg.lib r $(DLIBOBJECTS)
- $(AR) libjpeg.lib r $(COMOBJECTS)
-
-cjpeg$(SUFFIX): $(COBJECTS) libjpeg.lib
- $(LN) <WITH <
-$(LDFLAGS)
-TO cjpeg$(SUFFIX)
-FROM LIB:c.o $(COBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-djpeg$(SUFFIX): $(DOBJECTS) libjpeg.lib
- $(LN) <WITH <
-$(LDFLAGS)
-TO djpeg$(SUFFIX)
-FROM LIB:c.o $(DOBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-jpegtran$(SUFFIX): $(TROBJECTS) libjpeg.lib
- $(LN) <WITH <
-$(LDFLAGS)
-TO jpegtran$(SUFFIX)
-FROM LIB:c.o $(TROBJECTS)
-LIB libjpeg.lib $(LDLIBS)
-<
-
-rdjpgcom$(SUFFIX): rdjpgcom.o
- $(LN) <WITH <
-$(LDFLAGS)
-TO rdjpgcom$(SUFFIX)
-FROM LIB:c.o rdjpgcom.o
-LIB $(LDLIBS)
-<
-
-wrjpgcom$(SUFFIX): wrjpgcom.o
- $(LN) <WITH <
-$(LDFLAGS)
-TO wrjpgcom$(SUFFIX)
-FROM LIB:c.o wrjpgcom.o
-LIB $(LDLIBS)
-<
-
-jconfig.h: jconfig.txt
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.txt.
- exit 1
-
-clean:
- -$(RM) *.o cjpeg djpeg jpegtran cjpeg.030 djpeg.030 jpegtran.030
- -$(RM) rdjpgcom wrjpgcom rdjpgcom.030 wrjpgcom.030
- -$(RM) libjpeg.lib core testout*.*
-
-test: cjpeg djpeg jpegtran
- -$(RM) testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.bmp testout.bmp
- cmp testimg.jpg testout.jpg
- cmp testimg.ppm testoutp.ppm
- cmp testimgp.jpg testoutp.jpg
- cmp testorig.jpg testoutt.jpg
-
-
-jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makefile.unix b/src/3rdparty/libjpeg/makefile.unix
deleted file mode 100644
index 90332e3..0000000
--- a/src/3rdparty/libjpeg/makefile.unix
+++ /dev/null
@@ -1,234 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Unix-like systems with non-ANSI compilers.
-# If you have an ANSI compiler, makefile.ansi is a better starting point.
-
-# Read installation instructions before saying "make" !!
-
-# The name of your C compiler:
-CC= cc
-
-# You may need to adjust these cc options:
-CFLAGS= -O
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-# However, any special defines for ansi2knr.c may be included here:
-ANSI2KNRFLAGS=
-
-# Link-time cc options:
-LDFLAGS=
-
-# To link any special libraries, add the necessary -l commands here.
-LDLIBS=
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For Unix this is usually jmemnobs.o, but you may want
-# to use jmemansi.o or jmemname.o if you have limited swap space.
-SYSDEPMEM= jmemnobs.o
-
-# miscellaneous OS-dependent stuff
-# linker
-LN= $(CC)
-# file deletion command
-RM= rm -f
-# file rename command
-MV= mv
-# library (.a) file creation command
-AR= ar rc
-# second step in .a creation (use "touch" if not needed)
-AR2= ranlib
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.o jcomapi.o jutils.o jerror.o jmemmgr.o $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.o jcapistd.o jcarith.o jctrans.o jcparam.o \
- jdatadst.o jcinit.o jcmaster.o jcmarker.o jcmainct.o jcprepct.o \
- jccoefct.o jccolor.o jcsample.o jchuff.o jcdctmgr.o jfdctfst.o \
- jfdctflt.o jfdctint.o
-# decompression library object files
-DLIBOBJECTS= jdapimin.o jdapistd.o jdarith.o jdtrans.o jdatasrc.o \
- jdmaster.o jdinput.o jdmarker.o jdhuff.o jdmainct.o \
- jdcoefct.o jdpostct.o jddctmgr.o jidctfst.o jidctflt.o \
- jidctint.o jdsample.o jdcolor.o jquant1.o jquant2.o jdmerge.o
-# These objectfiles are included in libjpeg.a
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.o rdppm.o rdgif.o rdtarga.o rdrle.o rdbmp.o rdswitch.o \
- cdjpeg.o
-DOBJECTS= djpeg.o wrppm.o wrgif.o wrtarga.o wrrle.o wrbmp.o rdcolmap.o \
- cdjpeg.o
-TROBJECTS= jpegtran.o rdswitch.o cdjpeg.o transupp.o
-
-
-all: ansi2knr libjpeg.a cjpeg djpeg jpegtran rdjpgcom wrjpgcom
-
-# This rule causes ansi2knr to be invoked.
-.c.o:
- ./ansi2knr $*.c T$*.c
- $(CC) $(CFLAGS) -c T$*.c
- $(RM) T$*.c $*.o
- $(MV) T$*.o $*.o
-
-ansi2knr: ansi2knr.c
- $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
-
-libjpeg.a: ansi2knr $(LIBOBJECTS)
- $(RM) libjpeg.a
- $(AR) libjpeg.a $(LIBOBJECTS)
- $(AR2) libjpeg.a
-
-cjpeg: ansi2knr $(COBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o cjpeg $(COBJECTS) libjpeg.a $(LDLIBS)
-
-djpeg: ansi2knr $(DOBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o djpeg $(DOBJECTS) libjpeg.a $(LDLIBS)
-
-jpegtran: ansi2knr $(TROBJECTS) libjpeg.a
- $(LN) $(LDFLAGS) -o jpegtran $(TROBJECTS) libjpeg.a $(LDLIBS)
-
-rdjpgcom: rdjpgcom.o
- $(LN) $(LDFLAGS) -o rdjpgcom rdjpgcom.o $(LDLIBS)
-
-wrjpgcom: wrjpgcom.o
- $(LN) $(LDFLAGS) -o wrjpgcom wrjpgcom.o $(LDLIBS)
-
-jconfig.h: jconfig.txt
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.txt.
- exit 1
-
-clean:
- $(RM) *.o cjpeg djpeg jpegtran libjpeg.a rdjpgcom wrjpgcom
- $(RM) ansi2knr core testout*
-
-test: cjpeg djpeg jpegtran
- $(RM) testout*
- ./djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- ./djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- ./cjpeg -dct int -outfile testout.jpg testimg.ppm
- ./djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- ./cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- ./jpegtran -outfile testoutt.jpg testprog.jpg
- cmp testimg.ppm testout.ppm
- cmp testimg.bmp testout.bmp
- cmp testimg.jpg testout.jpg
- cmp testimg.ppm testoutp.ppm
- cmp testimgp.jpg testoutp.jpg
- cmp testorig.jpg testoutt.jpg
-
-
-jaricom.o: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.o: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.o: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.o: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.o: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.o: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.o: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.o: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.o: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.o: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.o: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.o: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.o: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.o: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.o: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.o: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.o: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.o: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.o: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.o: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.o: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.o: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.o: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.o: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.o: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.o: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.o: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.o: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.o: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.o: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.o: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.o: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.o: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.o: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.o: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.o: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.o: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.o: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.o: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.o: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.o: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.o: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.o: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.o: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.o: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.o: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.o: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.o: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.o: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.o: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.o: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.o: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.o: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.o: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.o: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.o: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.o: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.o: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.o: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.o: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.o: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.o: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.o: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.o: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.o: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.o: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.o: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.o: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.o: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makefile.vc b/src/3rdparty/libjpeg/makefile.vc
deleted file mode 100644
index 41b998f..0000000
--- a/src/3rdparty/libjpeg/makefile.vc
+++ /dev/null
@@ -1,217 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is for Microsoft Visual C++ on Windows NT (and 95?).
-# It builds the IJG library as a statically linkable library (.LIB),
-# and builds the sample applications as console-mode apps.
-# Thanks to Xingong Chang, Raymond Everly and others.
-
-# Read installation instructions before saying "nmake" !!
-# To build an optimized library without debug info, say "nmake nodebug=1".
-
-# Pull in standard variable definitions
-!include <win32.mak>
-
-# You may want to adjust these compiler options:
-CFLAGS= $(cflags) $(cdebug) $(cvars) -I.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time options:
-LDFLAGS= $(ldebug) $(conlflags)
-
-# To link any special libraries, add the necessary commands here.
-LDLIBS= $(conlibs)
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. For NT we suggest jmemnobs.obj, which expects the OS to
-# provide adequate virtual memory.
-SYSDEPMEM= jmemnobs.obj
-
-# miscellaneous OS-dependent stuff
-# file deletion command
-RM= del
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c \
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c \
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c \
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c \
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c \
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c \
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c \
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c \
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c \
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h \
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 \
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt \
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc \
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 \
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 \
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 \
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 \
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 \
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 \
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st \
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms \
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat \
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas \
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm \
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg \
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) \
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj \
- jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj \
- jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj \
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj \
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj \
- jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj \
- jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj \
- jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj \
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj \
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-# Template command for compiling .c to .obj
-.c.obj:
- $(cc) $(CFLAGS) $*.c
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
- $(RM) libjpeg.lib
- lib -out:libjpeg.lib $(LIBOBJECTS)
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- $(link) $(LDFLAGS) -out:cjpeg.exe $(COBJECTS) libjpeg.lib $(LDLIBS)
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- $(link) $(LDFLAGS) -out:djpeg.exe $(DOBJECTS) libjpeg.lib $(LDLIBS)
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- $(link) $(LDFLAGS) -out:jpegtran.exe $(TROBJECTS) libjpeg.lib $(LDLIBS)
-
-rdjpgcom.exe: rdjpgcom.obj
- $(link) $(LDFLAGS) -out:rdjpgcom.exe rdjpgcom.obj $(LDLIBS)
-
-wrjpgcom.exe: wrjpgcom.obj
- $(link) $(LDFLAGS) -out:wrjpgcom.exe wrjpgcom.obj $(LDLIBS)
-
-
-clean:
- $(RM) *.obj *.exe libjpeg.lib
- $(RM) testout*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe
- $(RM) testout*
- .\djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- .\djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- .\cjpeg -dct int -outfile testout.jpg testimg.ppm
- .\djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- .\cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- .\jpegtran -outfile testoutt.jpg testprog.jpg
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-
-
-jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makefile.vms b/src/3rdparty/libjpeg/makefile.vms
deleted file mode 100644
index a07d070..0000000
--- a/src/3rdparty/libjpeg/makefile.vms
+++ /dev/null
@@ -1,142 +0,0 @@
-$! Makefile for Independent JPEG Group's software
-$!
-$! This is a command procedure for Digital VMS systems that do not have MMS.
-$! It builds the JPEG software by brute force, recompiling everything whether
-$! or not it is necessary. It then runs the basic self-test.
-$! Thanks to Rick Dyson (dyson@iowasp.physics.uiowa.edu)
-$! and Tim Bell (tbell@netcom.com) for their help.
-$!
-$! Read installation instructions before running this!!
-$!
-$ If F$Mode () .eqs. "INTERACTIVE"
-$ Then
-$ VERIFY = F$Verify (0)
-$ Else
-$ VERIFY = F$Verify (1)
-$ EndIf
-$ On Control_Y Then GoTo End
-$ On Error Then GoTo End
-$
-$ If F$GetSyi ("HW_MODEL") .gt. 1023
-$ Then
-$ OPT = ""
-$ Else
-$ OPT = ",Sys$Disk:[]makvms.opt/Option"
-$ EndIf
-$
-$ DoCompile := CC /NoDebug /Optimize /NoList
-$!
-$ DoCompile jaricom.c
-$ DoCompile jcapimin.c
-$ DoCompile jcapistd.c
-$ DoCompile jcarith.c
-$ DoCompile jctrans.c
-$ DoCompile jcparam.c
-$ DoCompile jdatadst.c
-$ DoCompile jcinit.c
-$ DoCompile jcmaster.c
-$ DoCompile jcmarker.c
-$ DoCompile jcmainct.c
-$ DoCompile jcprepct.c
-$ DoCompile jccoefct.c
-$ DoCompile jccolor.c
-$ DoCompile jcsample.c
-$ DoCompile jchuff.c
-$ DoCompile jcdctmgr.c
-$ DoCompile jfdctfst.c
-$ DoCompile jfdctflt.c
-$ DoCompile jfdctint.c
-$ DoCompile jdapimin.c
-$ DoCompile jdapistd.c
-$ DoCompile jdarith.c
-$ DoCompile jdtrans.c
-$ DoCompile jdatasrc.c
-$ DoCompile jdmaster.c
-$ DoCompile jdinput.c
-$ DoCompile jdmarker.c
-$ DoCompile jdhuff.c
-$ DoCompile jdmainct.c
-$ DoCompile jdcoefct.c
-$ DoCompile jdpostct.c
-$ DoCompile jddctmgr.c
-$ DoCompile jidctfst.c
-$ DoCompile jidctflt.c
-$ DoCompile jidctint.c
-$ DoCompile jdsample.c
-$ DoCompile jdcolor.c
-$ DoCompile jquant1.c
-$ DoCompile jquant2.c
-$ DoCompile jdmerge.c
-$ DoCompile jcomapi.c
-$ DoCompile jutils.c
-$ DoCompile jerror.c
-$ DoCompile jmemmgr.c
-$ DoCompile jmemnobs.c
-$!
-$ Library /Create libjpeg.olb jaricom.obj,jcapimin.obj,jcapistd.obj, -
- jcarith.obj,jctrans.obj,jcparam.obj,jdatadst.obj,jcinit.obj, -
- jcmaster.obj,jcmarker.obj,jcmainct.obj,jcprepct.obj,jccoefct.obj, -
- jccolor.obj,jcsample.obj,jchuff.obj,jcdctmgr.obj,jfdctfst.obj, -
- jfdctflt.obj,jfdctint.obj,jdapimin.obj,jdapistd.obj,jdarith.obj, -
- jdtrans.obj,jdatasrc.obj,jdmaster.obj,jdinput.obj,jdmarker.obj, -
- jdhuff.obj,jdmainct.obj,jdcoefct.obj,jdpostct.obj,jddctmgr.obj, -
- jidctfst.obj,jidctflt.obj,jidctint.obj,jdsample.obj,jdcolor.obj, -
- jquant1.obj,jquant2.obj,jdmerge.obj,jcomapi.obj,jutils.obj, -
- jerror.obj,jmemmgr.obj,jmemnobs.obj
-$!
-$ DoCompile cjpeg.c
-$ DoCompile rdppm.c
-$ DoCompile rdgif.c
-$ DoCompile rdtarga.c
-$ DoCompile rdrle.c
-$ DoCompile rdbmp.c
-$ DoCompile rdswitch.c
-$ DoCompile cdjpeg.c
-$!
-$ Link /NoMap /Executable = cjpeg.exe cjpeg.obj,rdppm.obj,rdgif.obj, -
- rdtarga.obj,rdrle.obj,rdbmp.obj,rdswitch.obj,cdjpeg.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile djpeg.c
-$ DoCompile wrppm.c
-$ DoCompile wrgif.c
-$ DoCompile wrtarga.c
-$ DoCompile wrrle.c
-$ DoCompile wrbmp.c
-$ DoCompile rdcolmap.c
-$ DoCompile cdjpeg.c
-$!
-$ Link /NoMap /Executable = djpeg.exe djpeg.obj,wrppm.obj,wrgif.obj, -
- wrtarga.obj,wrrle.obj,wrbmp.obj,rdcolmap.obj,cdjpeg.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile jpegtran.c
-$ DoCompile rdswitch.c
-$ DoCompile cdjpeg.c
-$ DoCompile transupp.c
-$!
-$ Link /NoMap /Executable = jpegtran.exe jpegtran.obj,rdswitch.obj, -
- cdjpeg.obj,transupp.obj,libjpeg.olb/Library'OPT'
-$!
-$ DoCompile rdjpgcom.c
-$ Link /NoMap /Executable = rdjpgcom.exe rdjpgcom.obj'OPT'
-$!
-$ DoCompile wrjpgcom.c
-$ Link /NoMap /Executable = wrjpgcom.exe wrjpgcom.obj'OPT'
-$!
-$! Run the self-test
-$!
-$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
-$ mcr sys$disk:[]djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
-$ mcr sys$disk:[]cjpeg -dct int -outfile testout.jpg testimg.ppm
-$ mcr sys$disk:[]djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
-$ mcr sys$disk:[]cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
-$ mcr sys$disk:[]jpegtran -outfile testoutt.jpg testprog.jpg
-$ Backup /Compare/Log testimg.ppm testout.ppm
-$ Backup /Compare/Log testimg.bmp testout.bmp
-$ Backup /Compare/Log testimg.jpg testout.jpg
-$ Backup /Compare/Log testimg.ppm testoutp.ppm
-$ Backup /Compare/Log testimgp.jpg testoutp.jpg
-$ Backup /Compare/Log testorig.jpg testoutt.jpg
-$!
-$End:
-$ If Verify Then Set Verify
-$ Exit
diff --git a/src/3rdparty/libjpeg/makefile.wat b/src/3rdparty/libjpeg/makefile.wat
deleted file mode 100644
index f7ef6e6..0000000
--- a/src/3rdparty/libjpeg/makefile.wat
+++ /dev/null
@@ -1,239 +0,0 @@
-# Makefile for Independent JPEG Group's software
-
-# This makefile is suitable for Watcom C/C++ 10.0 on MS-DOS (using
-# dos4g extender), OS/2, and Windows NT console mode.
-# Thanks to Janos Haide, jhaide@btrvtech.com.
-
-# Read installation instructions before saying "wmake" !!
-
-# Uncomment line for desired system
-SYSTEM=DOS
-#SYSTEM=OS2
-#SYSTEM=NT
-
-# The name of your C compiler:
-CC= wcl386
-
-# You may need to adjust these cc options:
-CFLAGS= -4r -ort -wx -zq -bt=$(SYSTEM)
-# Caution: avoid -ol or -ox; these generate bad code with 10.0 or 10.0a.
-# Generally, we recommend defining any configuration symbols in jconfig.h,
-# NOT via -D switches here.
-
-# Link-time cc options:
-!ifeq SYSTEM DOS
-LDFLAGS= -zq -l=dos4g
-!else ifeq SYSTEM OS2
-LDFLAGS= -zq -l=os2v2
-!else ifeq SYSTEM NT
-LDFLAGS= -zq -l=nt
-!endif
-
-# Put here the object file name for the correct system-dependent memory
-# manager file. jmemnobs should work fine for dos4g or OS/2 environment.
-SYSDEPMEM= jmemnobs.obj
-
-# End of configurable options.
-
-
-# source files: JPEG library proper
-LIBSOURCES= jaricom.c jcapimin.c jcapistd.c jcarith.c jccoefct.c jccolor.c &
- jcdctmgr.c jchuff.c jcinit.c jcmainct.c jcmarker.c jcmaster.c &
- jcomapi.c jcparam.c jcprepct.c jcsample.c jctrans.c jdapimin.c &
- jdapistd.c jdarith.c jdatadst.c jdatasrc.c jdcoefct.c jdcolor.c &
- jddctmgr.c jdhuff.c jdinput.c jdmainct.c jdmarker.c jdmaster.c &
- jdmerge.c jdpostct.c jdsample.c jdtrans.c jerror.c jfdctflt.c &
- jfdctfst.c jfdctint.c jidctflt.c jidctfst.c jidctint.c jquant1.c &
- jquant2.c jutils.c jmemmgr.c
-# memmgr back ends: compile only one of these into a working library
-SYSDEPSOURCES= jmemansi.c jmemname.c jmemnobs.c jmemdos.c jmemmac.c
-# source files: cjpeg/djpeg/jpegtran applications, also rdjpgcom/wrjpgcom
-APPSOURCES= cjpeg.c djpeg.c jpegtran.c rdjpgcom.c wrjpgcom.c cdjpeg.c &
- rdcolmap.c rdswitch.c transupp.c rdppm.c wrppm.c rdgif.c wrgif.c &
- rdtarga.c wrtarga.c rdbmp.c wrbmp.c rdrle.c wrrle.c
-SOURCES= $(LIBSOURCES) $(SYSDEPSOURCES) $(APPSOURCES)
-# files included by source files
-INCLUDES= jdct.h jerror.h jinclude.h jmemsys.h jmorecfg.h jpegint.h &
- jpeglib.h jversion.h cdjpeg.h cderror.h transupp.h
-# documentation, test, and support files
-DOCS= README install.txt usage.txt cjpeg.1 djpeg.1 jpegtran.1 rdjpgcom.1 &
- wrjpgcom.1 wizard.txt example.c libjpeg.txt structure.txt &
- coderules.txt filelist.txt change.log
-MKFILES= configure Makefile.in makefile.ansi makefile.unix makefile.bcc &
- makefile.mc6 makefile.dj makefile.wat makefile.vc makejdsw.vc6 &
- makeadsw.vc6 makejdep.vc6 makejdsp.vc6 makejmak.vc6 makecdep.vc6 &
- makecdsp.vc6 makecmak.vc6 makeddep.vc6 makeddsp.vc6 makedmak.vc6 &
- maketdep.vc6 maketdsp.vc6 maketmak.vc6 makerdep.vc6 makerdsp.vc6 &
- makermak.vc6 makewdep.vc6 makewdsp.vc6 makewmak.vc6 makejsln.vc9 &
- makeasln.vc9 makejvcp.vc9 makecvcp.vc9 makedvcp.vc9 maketvcp.vc9 &
- makervcp.vc9 makewvcp.vc9 makeproj.mac makcjpeg.st makdjpeg.st &
- makljpeg.st maktjpeg.st makefile.manx makefile.sas makefile.mms &
- makefile.vms makvms.opt
-CONFIGFILES= jconfig.cfg jconfig.bcc jconfig.mc6 jconfig.dj jconfig.wat &
- jconfig.vc jconfig.mac jconfig.st jconfig.manx jconfig.sas &
- jconfig.vms
-CONFIGUREFILES= config.guess config.sub install-sh ltmain.sh depcomp missing
-OTHERFILES= jconfig.txt ckconfig.c ansi2knr.c ansi2knr.1 jmemdosa.asm &
- libjpeg.map
-TESTFILES= testorig.jpg testimg.ppm testimg.bmp testimg.jpg testprog.jpg &
- testimgp.jpg
-DISTFILES= $(DOCS) $(MKFILES) $(CONFIGFILES) $(SOURCES) $(INCLUDES) &
- $(CONFIGUREFILES) $(OTHERFILES) $(TESTFILES)
-# library object files common to compression and decompression
-COMOBJECTS= jaricom.obj jcomapi.obj jutils.obj jerror.obj jmemmgr.obj $(SYSDEPMEM)
-# compression library object files
-CLIBOBJECTS= jcapimin.obj jcapistd.obj jcarith.obj jctrans.obj jcparam.obj &
- jdatadst.obj jcinit.obj jcmaster.obj jcmarker.obj jcmainct.obj &
- jcprepct.obj jccoefct.obj jccolor.obj jcsample.obj jchuff.obj &
- jcdctmgr.obj jfdctfst.obj jfdctflt.obj jfdctint.obj
-# decompression library object files
-DLIBOBJECTS= jdapimin.obj jdapistd.obj jdarith.obj jdtrans.obj jdatasrc.obj &
- jdmaster.obj jdinput.obj jdmarker.obj jdhuff.obj jdmainct.obj &
- jdcoefct.obj jdpostct.obj jddctmgr.obj jidctfst.obj jidctflt.obj &
- jidctint.obj jdsample.obj jdcolor.obj jquant1.obj jquant2.obj &
- jdmerge.obj
-# These objectfiles are included in libjpeg.lib
-LIBOBJECTS= $(CLIBOBJECTS) $(DLIBOBJECTS) $(COMOBJECTS)
-# object files for sample applications (excluding library files)
-COBJECTS= cjpeg.obj rdppm.obj rdgif.obj rdtarga.obj rdrle.obj rdbmp.obj &
- rdswitch.obj cdjpeg.obj
-DOBJECTS= djpeg.obj wrppm.obj wrgif.obj wrtarga.obj wrrle.obj wrbmp.obj &
- rdcolmap.obj cdjpeg.obj
-TROBJECTS= jpegtran.obj rdswitch.obj cdjpeg.obj transupp.obj
-
-
-all: libjpeg.lib cjpeg.exe djpeg.exe jpegtran.exe rdjpgcom.exe wrjpgcom.exe
-
-libjpeg.lib: $(LIBOBJECTS)
- - del libjpeg.lib
- * wlib -n libjpeg.lib $(LIBOBJECTS)
-
-cjpeg.exe: $(COBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) $(COBJECTS) libjpeg.lib
-
-djpeg.exe: $(DOBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) $(DOBJECTS) libjpeg.lib
-
-jpegtran.exe: $(TROBJECTS) libjpeg.lib
- $(CC) $(LDFLAGS) $(TROBJECTS) libjpeg.lib
-
-rdjpgcom.exe: rdjpgcom.c
- $(CC) $(CFLAGS) $(LDFLAGS) rdjpgcom.c
-
-wrjpgcom.exe: wrjpgcom.c
- $(CC) $(CFLAGS) $(LDFLAGS) wrjpgcom.c
-
-.c.obj:
- $(CC) $(CFLAGS) -c $<
-
-jconfig.h: jconfig.txt
- echo You must prepare a system-dependent jconfig.h file.
- echo Please read the installation directions in install.txt.
- exit 1
-
-clean: .SYMBOLIC
- - del *.obj
- - del libjpeg.lib
- - del cjpeg.exe
- - del djpeg.exe
- - del jpegtran.exe
- - del rdjpgcom.exe
- - del wrjpgcom.exe
- - del testout*.*
-
-test: cjpeg.exe djpeg.exe jpegtran.exe .SYMBOLIC
- - del testout*.*
- djpeg -dct int -ppm -outfile testout.ppm testorig.jpg
- djpeg -dct int -bmp -colors 256 -outfile testout.bmp testorig.jpg
- cjpeg -dct int -outfile testout.jpg testimg.ppm
- djpeg -dct int -ppm -outfile testoutp.ppm testprog.jpg
- cjpeg -dct int -progressive -opt -outfile testoutp.jpg testimg.ppm
- jpegtran -outfile testoutt.jpg testprog.jpg
-!ifeq SYSTEM DOS
- fc /b testimg.ppm testout.ppm
- fc /b testimg.bmp testout.bmp
- fc /b testimg.jpg testout.jpg
- fc /b testimg.ppm testoutp.ppm
- fc /b testimgp.jpg testoutp.jpg
- fc /b testorig.jpg testoutt.jpg
-!else
- echo n > n.tmp
- comp testimg.ppm testout.ppm < n.tmp
- comp testimg.bmp testout.bmp < n.tmp
- comp testimg.jpg testout.jpg < n.tmp
- comp testimg.ppm testoutp.ppm < n.tmp
- comp testimgp.jpg testoutp.jpg < n.tmp
- comp testorig.jpg testoutt.jpg < n.tmp
- del n.tmp
-!endif
-
-
-jaricom.obj: jaricom.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapimin.obj: jcapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcapistd.obj: jcapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcarith.obj: jcarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccoefct.obj: jccoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jccolor.obj: jccolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcdctmgr.obj: jcdctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jchuff.obj: jchuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcinit.obj: jcinit.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmainct.obj: jcmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmarker.obj: jcmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcmaster.obj: jcmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcomapi.obj: jcomapi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcparam.obj: jcparam.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcprepct.obj: jcprepct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jcsample.obj: jcsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jctrans.obj: jctrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapimin.obj: jdapimin.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdapistd.obj: jdapistd.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdarith.obj: jdarith.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdatadst.obj: jdatadst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdatasrc.obj: jdatasrc.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h
-jdcoefct.obj: jdcoefct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdcolor.obj: jdcolor.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jddctmgr.obj: jddctmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jdhuff.obj: jdhuff.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdinput.obj: jdinput.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmainct.obj: jdmainct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmarker.obj: jdmarker.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmaster.obj: jdmaster.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdmerge.obj: jdmerge.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdpostct.obj: jdpostct.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdsample.obj: jdsample.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jdtrans.obj: jdtrans.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jerror.obj: jerror.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jversion.h jerror.h
-jfdctflt.obj: jfdctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctfst.obj: jfdctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jfdctint.obj: jfdctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctflt.obj: jidctflt.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctfst.obj: jidctfst.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jidctint.obj: jidctint.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jdct.h
-jquant1.obj: jquant1.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jquant2.obj: jquant2.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jutils.obj: jutils.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h
-jmemmgr.obj: jmemmgr.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemansi.obj: jmemansi.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemname.obj: jmemname.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemnobs.obj: jmemnobs.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemdos.obj: jmemdos.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-jmemmac.obj: jmemmac.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h jmemsys.h
-cjpeg.obj: cjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-djpeg.obj: djpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h jversion.h
-jpegtran.obj: jpegtran.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h transupp.h jversion.h
-rdjpgcom.obj: rdjpgcom.c jinclude.h jconfig.h
-wrjpgcom.obj: wrjpgcom.c jinclude.h jconfig.h
-cdjpeg.obj: cdjpeg.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdcolmap.obj: rdcolmap.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdswitch.obj: rdswitch.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-transupp.obj: transupp.c jinclude.h jconfig.h jpeglib.h jmorecfg.h jpegint.h jerror.h transupp.h
-rdppm.obj: rdppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrppm.obj: wrppm.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdgif.obj: rdgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrgif.obj: wrgif.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdtarga.obj: rdtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrtarga.obj: wrtarga.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdbmp.obj: rdbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrbmp.obj: wrbmp.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-rdrle.obj: rdrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
-wrrle.obj: wrrle.c cdjpeg.h jinclude.h jconfig.h jpeglib.h jmorecfg.h jerror.h cderror.h
diff --git a/src/3rdparty/libjpeg/makejdep.vc6 b/src/3rdparty/libjpeg/makejdep.vc6
deleted file mode 100644
index 1065b21..0000000
--- a/src/3rdparty/libjpeg/makejdep.vc6
+++ /dev/null
@@ -1,423 +0,0 @@
-# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von jpeg.mak
-
-.\jaricom.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcapimin.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcapistd.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcarith.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jccoefct.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jccolor.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcdctmgr.c : \
- ".\jconfig.h"\
- ".\jdct.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jchuff.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcinit.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcmainct.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcmarker.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcmaster.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcomapi.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcparam.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcprepct.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jcsample.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jctrans.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdapimin.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdapistd.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdarith.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdatadst.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\jdatasrc.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\jdcoefct.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdcolor.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jddctmgr.c : \
- ".\jconfig.h"\
- ".\jdct.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdhuff.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdinput.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdmainct.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdmarker.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdmaster.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdmerge.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdpostct.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdsample.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jdtrans.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jerror.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
- ".\jversion.h"\
-
-
-.\jfdctflt.c : \
- ".\jconfig.h"\
- ".\jdct.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jfdctfst.c : \
- ".\jconfig.h"\
- ".\jdct.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jfdctint.c : \
- ".\jconfig.h"\
- ".\jdct.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jidctflt.c : \
- ".\jconfig.h"\
- ".\jdct.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jidctfst.c : \
- ".\jconfig.h"\
- ".\jdct.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jidctint.c : \
- ".\jconfig.h"\
- ".\jdct.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jmemmgr.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmemsys.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jmemnobs.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmemsys.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jquant1.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jquant2.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
-
-.\jutils.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
-
diff --git a/src/3rdparty/libjpeg/makejdsp.vc6 b/src/3rdparty/libjpeg/makejdsp.vc6
deleted file mode 100644
index 738f1ab..0000000
--- a/src/3rdparty/libjpeg/makejdsp.vc6
+++ /dev/null
@@ -1,285 +0,0 @@
-# Microsoft Developer Studio Project File - Name="jpeg" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** NICHT BEARBEITEN **
-
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=jpeg - Win32
-!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
-!MESSAGE
-!MESSAGE NMAKE /f "jpeg.mak".
-!MESSAGE
-!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32"
-!MESSAGE
-!MESSAGE Fr die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "jpeg - Win32" (basierend auf "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\Release"
-# PROP BASE Intermediate_Dir ".\Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\Release"
-# PROP Intermediate_Dir ".\Release"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
-# ADD BASE RSC /l 0x407
-# ADD RSC /l 0x407
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-# Begin Target
-
-# Name "jpeg - Win32"
-# Begin Group "Quellcodedateien"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\jaricom.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcapimin.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcapistd.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcarith.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jccoefct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jccolor.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcdctmgr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jchuff.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcinit.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcmainct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcmarker.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcmaster.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcomapi.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcparam.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcprepct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jcsample.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jctrans.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdapimin.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdapistd.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdarith.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdatadst.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdatasrc.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdcoefct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdcolor.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jddctmgr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdhuff.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdinput.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmainct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmarker.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmaster.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdmerge.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdpostct.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdsample.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdtrans.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfdctflt.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfdctfst.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jfdctint.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jidctflt.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jidctfst.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jidctint.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmemmgr.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmemnobs.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jquant1.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jquant2.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jutils.c
-# End Source File
-# End Group
-# Begin Group "Header-Dateien"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jdct.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmemsys.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpegint.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jversion.h
-# End Source File
-# End Group
-# Begin Group "Ressourcendateien"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/libjpeg/makejdsw.vc6 b/src/3rdparty/libjpeg/makejdsw.vc6
deleted file mode 100644
index d11fab1..0000000
--- a/src/3rdparty/libjpeg/makejdsw.vc6
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNUNG: DIESE ARBEITSBEREICHSDATEI DARF NICHT BEARBEITET ODER GEL™SCHT WERDEN!
-
-###############################################################################
-
-Project: "jpeg"=".\jpeg.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/src/3rdparty/libjpeg/makejmak.vc6 b/src/3rdparty/libjpeg/makejmak.vc6
deleted file mode 100644
index 1107336..0000000
--- a/src/3rdparty/libjpeg/makejmak.vc6
+++ /dev/null
@@ -1,425 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on jpeg.dsp
-!IF "$(CFG)" == ""
-CFG=jpeg - Win32
-!MESSAGE Keine Konfiguration angegeben. jpeg - Win32 wird als Standard verwendet.
-!ENDIF
-
-!IF "$(CFG)" != "jpeg - Win32"
-!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
-!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "jpeg.mak" CFG="jpeg - Win32"
-!MESSAGE
-!MESSAGE Für die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "jpeg - Win32" (basierend auf "Win32 (x86) Static Library")
-!MESSAGE
-!ERROR Eine ungültige Konfiguration wurde angegeben.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-OUTDIR=.\Release
-INTDIR=.\Release
-# Begin Custom Macros
-OutDir=.\Release
-# End Custom Macros
-
-ALL : "$(OUTDIR)\jpeg.lib"
-
-
-CLEAN :
- -@erase "$(INTDIR)\jaricom.obj"
- -@erase "$(INTDIR)\jcapimin.obj"
- -@erase "$(INTDIR)\jcapistd.obj"
- -@erase "$(INTDIR)\jcarith.obj"
- -@erase "$(INTDIR)\jccoefct.obj"
- -@erase "$(INTDIR)\jccolor.obj"
- -@erase "$(INTDIR)\jcdctmgr.obj"
- -@erase "$(INTDIR)\jchuff.obj"
- -@erase "$(INTDIR)\jcinit.obj"
- -@erase "$(INTDIR)\jcmainct.obj"
- -@erase "$(INTDIR)\jcmarker.obj"
- -@erase "$(INTDIR)\jcmaster.obj"
- -@erase "$(INTDIR)\jcomapi.obj"
- -@erase "$(INTDIR)\jcparam.obj"
- -@erase "$(INTDIR)\jcprepct.obj"
- -@erase "$(INTDIR)\jcsample.obj"
- -@erase "$(INTDIR)\jctrans.obj"
- -@erase "$(INTDIR)\jdapimin.obj"
- -@erase "$(INTDIR)\jdapistd.obj"
- -@erase "$(INTDIR)\jdarith.obj"
- -@erase "$(INTDIR)\jdatadst.obj"
- -@erase "$(INTDIR)\jdatasrc.obj"
- -@erase "$(INTDIR)\jdcoefct.obj"
- -@erase "$(INTDIR)\jdcolor.obj"
- -@erase "$(INTDIR)\jddctmgr.obj"
- -@erase "$(INTDIR)\jdhuff.obj"
- -@erase "$(INTDIR)\jdinput.obj"
- -@erase "$(INTDIR)\jdmainct.obj"
- -@erase "$(INTDIR)\jdmarker.obj"
- -@erase "$(INTDIR)\jdmaster.obj"
- -@erase "$(INTDIR)\jdmerge.obj"
- -@erase "$(INTDIR)\jdpostct.obj"
- -@erase "$(INTDIR)\jdsample.obj"
- -@erase "$(INTDIR)\jdtrans.obj"
- -@erase "$(INTDIR)\jerror.obj"
- -@erase "$(INTDIR)\jfdctflt.obj"
- -@erase "$(INTDIR)\jfdctfst.obj"
- -@erase "$(INTDIR)\jfdctint.obj"
- -@erase "$(INTDIR)\jidctflt.obj"
- -@erase "$(INTDIR)\jidctfst.obj"
- -@erase "$(INTDIR)\jidctint.obj"
- -@erase "$(INTDIR)\jmemmgr.obj"
- -@erase "$(INTDIR)\jmemnobs.obj"
- -@erase "$(INTDIR)\jquant1.obj"
- -@erase "$(INTDIR)\jquant2.obj"
- -@erase "$(INTDIR)\jutils.obj"
- -@erase "$(INTDIR)\vc60.idb"
- -@erase "$(OUTDIR)\jpeg.lib"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-CPP=cl.exe
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /Fp"$(INTDIR)\jpeg.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-RSC=rc.exe
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\jpeg.bsc"
-BSC32_SBRS= \
-
-LIB32=link.exe -lib
-LIB32_FLAGS=/nologo /out:"$(OUTDIR)\jpeg.lib"
-LIB32_OBJS= \
- "$(INTDIR)\jaricom.obj" \
- "$(INTDIR)\jcapimin.obj" \
- "$(INTDIR)\jcapistd.obj" \
- "$(INTDIR)\jcarith.obj" \
- "$(INTDIR)\jccoefct.obj" \
- "$(INTDIR)\jccolor.obj" \
- "$(INTDIR)\jcdctmgr.obj" \
- "$(INTDIR)\jchuff.obj" \
- "$(INTDIR)\jcinit.obj" \
- "$(INTDIR)\jcmainct.obj" \
- "$(INTDIR)\jcmarker.obj" \
- "$(INTDIR)\jcmaster.obj" \
- "$(INTDIR)\jcomapi.obj" \
- "$(INTDIR)\jcparam.obj" \
- "$(INTDIR)\jcprepct.obj" \
- "$(INTDIR)\jcsample.obj" \
- "$(INTDIR)\jctrans.obj" \
- "$(INTDIR)\jdapimin.obj" \
- "$(INTDIR)\jdapistd.obj" \
- "$(INTDIR)\jdarith.obj" \
- "$(INTDIR)\jdatadst.obj" \
- "$(INTDIR)\jdatasrc.obj" \
- "$(INTDIR)\jdcoefct.obj" \
- "$(INTDIR)\jdcolor.obj" \
- "$(INTDIR)\jddctmgr.obj" \
- "$(INTDIR)\jdhuff.obj" \
- "$(INTDIR)\jdinput.obj" \
- "$(INTDIR)\jdmainct.obj" \
- "$(INTDIR)\jdmarker.obj" \
- "$(INTDIR)\jdmaster.obj" \
- "$(INTDIR)\jdmerge.obj" \
- "$(INTDIR)\jdpostct.obj" \
- "$(INTDIR)\jdsample.obj" \
- "$(INTDIR)\jdtrans.obj" \
- "$(INTDIR)\jerror.obj" \
- "$(INTDIR)\jfdctflt.obj" \
- "$(INTDIR)\jfdctfst.obj" \
- "$(INTDIR)\jfdctint.obj" \
- "$(INTDIR)\jidctflt.obj" \
- "$(INTDIR)\jidctfst.obj" \
- "$(INTDIR)\jidctint.obj" \
- "$(INTDIR)\jmemmgr.obj" \
- "$(INTDIR)\jmemnobs.obj" \
- "$(INTDIR)\jquant1.obj" \
- "$(INTDIR)\jquant2.obj" \
- "$(INTDIR)\jutils.obj"
-
-"$(OUTDIR)\jpeg.lib" : "$(OUTDIR)" $(DEF_FILE) $(LIB32_OBJS)
- $(LIB32) @<<
- $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS)
-<<
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("jpeg.dep")
-!INCLUDE "jpeg.dep"
-!ELSE
-!MESSAGE Warning: cannot find "jpeg.dep"
-!ENDIF
-!ENDIF
-
-
-!IF "$(CFG)" == "jpeg - Win32"
-SOURCE=.\jaricom.c
-
-"$(INTDIR)\jaricom.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcapimin.c
-
-"$(INTDIR)\jcapimin.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcapistd.c
-
-"$(INTDIR)\jcapistd.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcarith.c
-
-"$(INTDIR)\jcarith.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jccoefct.c
-
-"$(INTDIR)\jccoefct.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jccolor.c
-
-"$(INTDIR)\jccolor.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcdctmgr.c
-
-"$(INTDIR)\jcdctmgr.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jchuff.c
-
-"$(INTDIR)\jchuff.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcinit.c
-
-"$(INTDIR)\jcinit.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcmainct.c
-
-"$(INTDIR)\jcmainct.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcmarker.c
-
-"$(INTDIR)\jcmarker.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcmaster.c
-
-"$(INTDIR)\jcmaster.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcomapi.c
-
-"$(INTDIR)\jcomapi.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcparam.c
-
-"$(INTDIR)\jcparam.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcprepct.c
-
-"$(INTDIR)\jcprepct.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jcsample.c
-
-"$(INTDIR)\jcsample.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jctrans.c
-
-"$(INTDIR)\jctrans.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdapimin.c
-
-"$(INTDIR)\jdapimin.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdapistd.c
-
-"$(INTDIR)\jdapistd.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdarith.c
-
-"$(INTDIR)\jdarith.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdatadst.c
-
-"$(INTDIR)\jdatadst.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdatasrc.c
-
-"$(INTDIR)\jdatasrc.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdcoefct.c
-
-"$(INTDIR)\jdcoefct.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdcolor.c
-
-"$(INTDIR)\jdcolor.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jddctmgr.c
-
-"$(INTDIR)\jddctmgr.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdhuff.c
-
-"$(INTDIR)\jdhuff.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdinput.c
-
-"$(INTDIR)\jdinput.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdmainct.c
-
-"$(INTDIR)\jdmainct.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdmarker.c
-
-"$(INTDIR)\jdmarker.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdmaster.c
-
-"$(INTDIR)\jdmaster.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdmerge.c
-
-"$(INTDIR)\jdmerge.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdpostct.c
-
-"$(INTDIR)\jdpostct.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdsample.c
-
-"$(INTDIR)\jdsample.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jdtrans.c
-
-"$(INTDIR)\jdtrans.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jerror.c
-
-"$(INTDIR)\jerror.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jfdctflt.c
-
-"$(INTDIR)\jfdctflt.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jfdctfst.c
-
-"$(INTDIR)\jfdctfst.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jfdctint.c
-
-"$(INTDIR)\jfdctint.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jidctflt.c
-
-"$(INTDIR)\jidctflt.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jidctfst.c
-
-"$(INTDIR)\jidctfst.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jidctint.c
-
-"$(INTDIR)\jidctint.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jmemmgr.c
-
-"$(INTDIR)\jmemmgr.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jmemnobs.c
-
-"$(INTDIR)\jmemnobs.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jquant1.c
-
-"$(INTDIR)\jquant1.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jquant2.c
-
-"$(INTDIR)\jquant2.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jutils.c
-
-"$(INTDIR)\jutils.obj" : $(SOURCE) "$(INTDIR)"
-
-
-
-!ENDIF
-
diff --git a/src/3rdparty/libjpeg/makejsln.vc9 b/src/3rdparty/libjpeg/makejsln.vc9
deleted file mode 100644
index ddb6a30..0000000
--- a/src/3rdparty/libjpeg/makejsln.vc9
+++ /dev/null
@@ -1,17 +0,0 @@
-‹¯¨
-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C++ Express 2008
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jpeg", "jpeg.vcproj", "{E61592E1-28F4-4AFC-9EE1-9BE833A061C1}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Release|Win32 = Release|Win32
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {E61592E1-28F4-4AFC-9EE1-9BE833A061C1}.Release|Win32.ActiveCfg = Release|Win32
- {E61592E1-28F4-4AFC-9EE1-9BE833A061C1}.Release|Win32.Build.0 = Release|Win32
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/src/3rdparty/libjpeg/makejvcp.vc9 b/src/3rdparty/libjpeg/makejvcp.vc9
deleted file mode 100644
index b08809b..0000000
--- a/src/3rdparty/libjpeg/makejvcp.vc9
+++ /dev/null
@@ -1,328 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="jpeg"
- ProjectGUID="{E61592E1-28F4-4AFC-9EE1-9BE833A061C1}"
- RootNamespace="jpeg"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(SolutionDir)$(ConfigurationName)"
- IntermediateDirectory="$(ConfigurationName)"
- ConfigurationType="4"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- EnableIntrinsicFunctions="false"
- EnableFiberSafeOptimizations="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_LIB;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="0"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLibrarianTool"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Quelldateien"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\jaricom.c"
- >
- </File>
- <File
- RelativePath=".\jcapimin.c"
- >
- </File>
- <File
- RelativePath=".\jcapistd.c"
- >
- </File>
- <File
- RelativePath=".\jcarith.c"
- >
- </File>
- <File
- RelativePath=".\jccoefct.c"
- >
- </File>
- <File
- RelativePath=".\jccolor.c"
- >
- </File>
- <File
- RelativePath=".\jcdctmgr.c"
- >
- </File>
- <File
- RelativePath=".\jchuff.c"
- >
- </File>
- <File
- RelativePath=".\jcinit.c"
- >
- </File>
- <File
- RelativePath=".\jcmainct.c"
- >
- </File>
- <File
- RelativePath=".\jcmarker.c"
- >
- </File>
- <File
- RelativePath=".\jcmaster.c"
- >
- </File>
- <File
- RelativePath=".\jcomapi.c"
- >
- </File>
- <File
- RelativePath=".\jcparam.c"
- >
- </File>
- <File
- RelativePath=".\jcprepct.c"
- >
- </File>
- <File
- RelativePath=".\jcsample.c"
- >
- </File>
- <File
- RelativePath=".\jctrans.c"
- >
- </File>
- <File
- RelativePath=".\jdapimin.c"
- >
- </File>
- <File
- RelativePath=".\jdapistd.c"
- >
- </File>
- <File
- RelativePath=".\jdarith.c"
- >
- </File>
- <File
- RelativePath=".\jdatadst.c"
- >
- </File>
- <File
- RelativePath=".\jdatasrc.c"
- >
- </File>
- <File
- RelativePath=".\jdcoefct.c"
- >
- </File>
- <File
- RelativePath=".\jdcolor.c"
- >
- </File>
- <File
- RelativePath=".\jddctmgr.c"
- >
- </File>
- <File
- RelativePath=".\jdhuff.c"
- >
- </File>
- <File
- RelativePath=".\jdinput.c"
- >
- </File>
- <File
- RelativePath=".\jdmainct.c"
- >
- </File>
- <File
- RelativePath=".\jdmarker.c"
- >
- </File>
- <File
- RelativePath=".\jdmaster.c"
- >
- </File>
- <File
- RelativePath=".\jdmerge.c"
- >
- </File>
- <File
- RelativePath=".\jdpostct.c"
- >
- </File>
- <File
- RelativePath=".\jdsample.c"
- >
- </File>
- <File
- RelativePath=".\jdtrans.c"
- >
- </File>
- <File
- RelativePath=".\jerror.c"
- >
- </File>
- <File
- RelativePath=".\jfdctflt.c"
- >
- </File>
- <File
- RelativePath=".\jfdctfst.c"
- >
- </File>
- <File
- RelativePath=".\jfdctint.c"
- >
- </File>
- <File
- RelativePath=".\jidctflt.c"
- >
- </File>
- <File
- RelativePath=".\jidctfst.c"
- >
- </File>
- <File
- RelativePath=".\jidctint.c"
- >
- </File>
- <File
- RelativePath=".\jmemmgr.c"
- >
- </File>
- <File
- RelativePath=".\jmemnobs.c"
- >
- </File>
- <File
- RelativePath=".\jquant1.c"
- >
- </File>
- <File
- RelativePath=".\jquant2.c"
- >
- </File>
- <File
- RelativePath=".\jutils.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Headerdateien"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\jconfig.h"
- >
- </File>
- <File
- RelativePath=".\jdct.h"
- >
- </File>
- <File
- RelativePath=".\jerror.h"
- >
- </File>
- <File
- RelativePath=".\jinclude.h"
- >
- </File>
- <File
- RelativePath=".\jmemsys.h"
- >
- </File>
- <File
- RelativePath=".\jmorecfg.h"
- >
- </File>
- <File
- RelativePath=".\jpegint.h"
- >
- </File>
- <File
- RelativePath=".\jpeglib.h"
- >
- </File>
- <File
- RelativePath=".\jversion.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Ressourcendateien"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makeproj.mac b/src/3rdparty/libjpeg/makeproj.mac
deleted file mode 100644
index e5b5102..0000000
--- a/src/3rdparty/libjpeg/makeproj.mac
+++ /dev/null
@@ -1,213 +0,0 @@
---
--- makeproj.mac
---
--- This AppleScript builds Code Warrior PRO Release 2 project files for the
--- libjpeg library as well as the test programs 'cjpeg', 'djpeg', 'jpegtran'.
--- (We'd distribute real project files, except they're not text
--- and would create maintenance headaches.)
---
--- The script then compiles and links the library and the test programs.
--- NOTE: if you haven't already created a 'jconfig.h' file, the script
--- automatically copies 'jconfig.mac' to 'jconfig.h'.
---
--- To use this script, you must have AppleScript 1.1 or later installed
--- and a suitable AppleScript editor like Script Editor or Script Debugger
--- (http://www.latenightsw.com). Open this file with your AppleScript
--- editor and execute the "run" command to build the projects.
---
--- Thanks to Dan Sears and Don Agro for this script.
--- Questions about this script can be addressed to dogpark@interlog.com
---
-
-on run
-
- choose folder with prompt ">>> Select IJG source folder <<<"
- set ijg_folder to result
-
- choose folder with prompt ">>> Select MetroWerks folder <<<"
- set cw_folder to result
-
- -- if jconfig.h doesn't already exist, copy jconfig.mac
-
- tell application "Finder"
- if not (exists file "jconfig.h" of ijg_folder) then
- duplicate {file "jconfig.mac" of folder ijg_folder}
- select file "jconfig.mac copy" of folder ijg_folder
- set name of selection to "jconfig.h"
- end if
- end tell
-
- tell application "CodeWarrior IDE 2.1"
- with timeout of 10000 seconds
-
- -- create libjpeg project
-
- activate
- Create Project (ijg_folder as string) & "libjpeg.proj"
- Set Preferences of panel "Target Settings" to {Target Name:"libjpeg"}
- Set Preferences of panel "PPC Project" to {File Name:"libjpeg"}
- Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
- Set Preferences of panel "PPC Project" to {Project Type:library}
- Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
- Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
- Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
- Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
- Add Files (ijg_folder as string) & "jaricom.c" To Segment 1
- Add Files (ijg_folder as string) & "jcapimin.c" To Segment 1
- Add Files (ijg_folder as string) & "jcapistd.c" To Segment 1
- Add Files (ijg_folder as string) & "jcarith.c" To Segment 1
- Add Files (ijg_folder as string) & "jctrans.c" To Segment 1
- Add Files (ijg_folder as string) & "jcparam.c" To Segment 1
- Add Files (ijg_folder as string) & "jdatadst.c" To Segment 1
- Add Files (ijg_folder as string) & "jcinit.c" To Segment 1
- Add Files (ijg_folder as string) & "jcmaster.c" To Segment 1
- Add Files (ijg_folder as string) & "jcmarker.c" To Segment 1
- Add Files (ijg_folder as string) & "jcmainct.c" To Segment 1
- Add Files (ijg_folder as string) & "jcprepct.c" To Segment 1
- Add Files (ijg_folder as string) & "jccoefct.c" To Segment 1
- Add Files (ijg_folder as string) & "jccolor.c" To Segment 1
- Add Files (ijg_folder as string) & "jcsample.c" To Segment 1
- Add Files (ijg_folder as string) & "jchuff.c" To Segment 1
- Add Files (ijg_folder as string) & "jcdctmgr.c" To Segment 1
- Add Files (ijg_folder as string) & "jfdctfst.c" To Segment 1
- Add Files (ijg_folder as string) & "jfdctflt.c" To Segment 1
- Add Files (ijg_folder as string) & "jfdctint.c" To Segment 1
- Add Files (ijg_folder as string) & "jdapimin.c" To Segment 1
- Add Files (ijg_folder as string) & "jdapistd.c" To Segment 1
- Add Files (ijg_folder as string) & "jdarith.c" To Segment 1
- Add Files (ijg_folder as string) & "jdtrans.c" To Segment 1
- Add Files (ijg_folder as string) & "jdatasrc.c" To Segment 1
- Add Files (ijg_folder as string) & "jdmaster.c" To Segment 1
- Add Files (ijg_folder as string) & "jdinput.c" To Segment 1
- Add Files (ijg_folder as string) & "jdmarker.c" To Segment 1
- Add Files (ijg_folder as string) & "jdhuff.c" To Segment 1
- Add Files (ijg_folder as string) & "jdmainct.c" To Segment 1
- Add Files (ijg_folder as string) & "jdcoefct.c" To Segment 1
- Add Files (ijg_folder as string) & "jdpostct.c" To Segment 1
- Add Files (ijg_folder as string) & "jddctmgr.c" To Segment 1
- Add Files (ijg_folder as string) & "jidctfst.c" To Segment 1
- Add Files (ijg_folder as string) & "jidctflt.c" To Segment 1
- Add Files (ijg_folder as string) & "jidctint.c" To Segment 1
- Add Files (ijg_folder as string) & "jdsample.c" To Segment 1
- Add Files (ijg_folder as string) & "jdcolor.c" To Segment 1
- Add Files (ijg_folder as string) & "jquant1.c" To Segment 1
- Add Files (ijg_folder as string) & "jquant2.c" To Segment 1
- Add Files (ijg_folder as string) & "jdmerge.c" To Segment 1
- Add Files (ijg_folder as string) & "jcomapi.c" To Segment 1
- Add Files (ijg_folder as string) & "jutils.c" To Segment 1
- Add Files (ijg_folder as string) & "jerror.c" To Segment 1
- Add Files (ijg_folder as string) & "jmemmgr.c" To Segment 1
- Add Files (ijg_folder as string) & "jmemmac.c" To Segment 1
-
- -- compile and link the library
-
- Make Project
- Close Project
-
- -- create cjpeg project
-
- activate
- Create Project (ijg_folder as string) & "cjpeg.proj"
- Set Preferences of panel "Target Settings" to {Target Name:"cjpeg"}
- Set Preferences of panel "PPC Project" to {File Name:"cjpeg"}
- Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
- Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
- Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
- Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
- Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
- Add Files (ijg_folder as string) & "cjpeg.c" To Segment 1
- Add Files (ijg_folder as string) & "rdppm.c" To Segment 1
- Add Files (ijg_folder as string) & "rdgif.c" To Segment 1
- Add Files (ijg_folder as string) & "rdtarga.c" To Segment 1
- Add Files (ijg_folder as string) & "rdrle.c" To Segment 1
- Add Files (ijg_folder as string) & "rdbmp.c" To Segment 1
- Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1
- Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
-
- Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
- -- compile and link cjpeg
-
- Make Project
- Close Project
-
- -- create djpeg project
-
- activate
- Create Project (ijg_folder as string) & "djpeg.proj"
- Set Preferences of panel "Target Settings" to {Target Name:"djpeg"}
- Set Preferences of panel "PPC Project" to {File Name:"djpeg"}
- Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
- Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
- Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
- Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
- Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
- Add Files (ijg_folder as string) & "djpeg.c" To Segment 1
- Add Files (ijg_folder as string) & "wrppm.c" To Segment 1
- Add Files (ijg_folder as string) & "wrgif.c" To Segment 1
- Add Files (ijg_folder as string) & "wrtarga.c" To Segment 1
- Add Files (ijg_folder as string) & "wrrle.c" To Segment 1
- Add Files (ijg_folder as string) & "wrbmp.c" To Segment 1
- Add Files (ijg_folder as string) & "rdcolmap.c" To Segment 1
- Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
-
- Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
- -- compile and link djpeg
-
- Make Project
- Close Project
-
- -- create jpegtran project
-
- activate
- Create Project (ijg_folder as string) & "jpegtran.proj"
- Set Preferences of panel "Target Settings" to {Target Name:"jpegtran"}
- Set Preferences of panel "PPC Project" to {File Name:"jpegtran"}
- Set Preferences of panel "Target Settings" to {Linker:"MacOS PPC Linker"}
- Set Preferences of panel "C/C++ Compiler" to {ANSI Strict:true}
- Set Preferences of panel "C/C++ Compiler" to {Enums Always Ints:true}
- Set Preferences of panel "PPC Codegen" to {Struct Alignment:PowerPC}
- Set Preferences of panel "PPC Linker" to {Generate SYM File:false}
-
- Add Files (ijg_folder as string) & "jpegtran.c" To Segment 1
- Add Files (ijg_folder as string) & "rdswitch.c" To Segment 1
- Add Files (ijg_folder as string) & "cdjpeg.c" To Segment 1
- Add Files (ijg_folder as string) & "transupp.c" To Segment 1
-
- Add Files (ijg_folder as string) & "libjpeg" To Segment 2
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL C.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:Metrowerks Standard Library:MSL C:Bin:MSL SIOUX.PPC.Lib" To Segment 3
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:Runtime:Runtime PPC:MSL RuntimePPC.Lib" To Segment 3
-
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:InterfaceLib" To Segment 4
- Add Files (cw_folder as string) & "Metrowerks CodeWarrior:MacOS Support:Libraries:MacOS Common:MathLib" To Segment 4
-
- -- compile and link jpegtran
-
- Make Project
- Close Project
-
- quit
-
- end timeout
- end tell
-end run
diff --git a/src/3rdparty/libjpeg/makerdep.vc6 b/src/3rdparty/libjpeg/makerdep.vc6
deleted file mode 100644
index 94748d0..0000000
--- a/src/3rdparty/libjpeg/makerdep.vc6
+++ /dev/null
@@ -1,6 +0,0 @@
-# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von rdjpgcom.mak
-
-.\rdjpgcom.c : \
- ".\jconfig.h"\
- ".\jinclude.h"\
-
diff --git a/src/3rdparty/libjpeg/makerdsp.vc6 b/src/3rdparty/libjpeg/makerdsp.vc6
deleted file mode 100644
index 60de09a..0000000
--- a/src/3rdparty/libjpeg/makerdsp.vc6
+++ /dev/null
@@ -1,78 +0,0 @@
-# Microsoft Developer Studio Project File - Name="rdjpgcom" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** NICHT BEARBEITEN **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=rdjpgcom - Win32
-!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
-!MESSAGE
-!MESSAGE NMAKE /f "rdjpgcom.mak".
-!MESSAGE
-!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "rdjpgcom.mak" CFG="rdjpgcom - Win32"
-!MESSAGE
-!MESSAGE Fr die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "rdjpgcom - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\rdjpgcom\Release"
-# PROP BASE Intermediate_Dir ".\rdjpgcom\Release"
-# PROP BASE Target_Dir ".\rdjpgcom"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\rdjpgcom\Release"
-# PROP Intermediate_Dir ".\rdjpgcom\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\rdjpgcom"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# Begin Target
-
-# Name "rdjpgcom - Win32"
-# Begin Group "Quellcodedateien"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\rdjpgcom.c
-# End Source File
-# End Group
-# Begin Group "Header-Dateien"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# End Group
-# Begin Group "Ressourcendateien"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/libjpeg/makermak.vc6 b/src/3rdparty/libjpeg/makermak.vc6
deleted file mode 100644
index 6d2d4c7..0000000
--- a/src/3rdparty/libjpeg/makermak.vc6
+++ /dev/null
@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on rdjpgcom.dsp
-!IF "$(CFG)" == ""
-CFG=rdjpgcom - Win32
-!MESSAGE Keine Konfiguration angegeben. rdjpgcom - Win32 wird als Standard verwendet.
-!ENDIF
-
-!IF "$(CFG)" != "rdjpgcom - Win32"
-!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
-!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "rdjpgcom.mak" CFG="rdjpgcom - Win32"
-!MESSAGE
-!MESSAGE Für die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "rdjpgcom - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR Eine ungültige Konfiguration wurde angegeben.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-CPP=cl.exe
-RSC=rc.exe
-OUTDIR=.\rdjpgcom\Release
-INTDIR=.\rdjpgcom\Release
-# Begin Custom Macros
-OutDir=.\rdjpgcom\Release
-# End Custom Macros
-
-ALL : "$(OUTDIR)\rdjpgcom.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\rdjpgcom.obj"
- -@erase "$(INTDIR)\vc60.idb"
- -@erase "$(OUTDIR)\rdjpgcom.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\rdjpgcom.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\rdjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)\rdjpgcom.exe"
-LINK32_OBJS= \
- "$(INTDIR)\rdjpgcom.obj"
-
-"$(OUTDIR)\rdjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\rdjpgcom.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("rdjpgcom.dep")
-!INCLUDE "rdjpgcom.dep"
-!ELSE
-!MESSAGE Warning: cannot find "rdjpgcom.dep"
-!ENDIF
-!ENDIF
-
-
-!IF "$(CFG)" == "rdjpgcom - Win32"
-SOURCE=.\rdjpgcom.c
-
-"$(INTDIR)\rdjpgcom.obj" : $(SOURCE) "$(INTDIR)"
-
-
-
-!ENDIF
-
diff --git a/src/3rdparty/libjpeg/makervcp.vc9 b/src/3rdparty/libjpeg/makervcp.vc9
deleted file mode 100644
index 2f73ffc..0000000
--- a/src/3rdparty/libjpeg/makervcp.vc9
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="rdjpgcom"
- ProjectGUID="{EB107F86-A8CC-4507-8115-88D31DDE4CDF}"
- RootNamespace="rdjpgcom"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ProjectName)\$(ConfigurationName)"
- IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- EnableIntrinsicFunctions="false"
- EnableFiberSafeOptimizations="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Quelldateien"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\rdjpgcom.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Headerdateien"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\jconfig.h"
- >
- </File>
- <File
- RelativePath=".\jinclude.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Ressourcendateien"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/maketdep.vc6 b/src/3rdparty/libjpeg/maketdep.vc6
deleted file mode 100644
index e177ecb..0000000
--- a/src/3rdparty/libjpeg/maketdep.vc6
+++ /dev/null
@@ -1,43 +0,0 @@
-# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von jpegtran.mak
-
-.\cdjpeg.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\jpegtran.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
- ".\jversion.h"\
- ".\transupp.h"\
-
-
-.\rdswitch.c : \
- ".\cderror.h"\
- ".\cdjpeg.h"\
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpeglib.h"\
-
-
-.\transupp.c : \
- ".\jconfig.h"\
- ".\jerror.h"\
- ".\jinclude.h"\
- ".\jmorecfg.h"\
- ".\jpegint.h"\
- ".\jpeglib.h"\
- ".\transupp.h"\
-
diff --git a/src/3rdparty/libjpeg/maketdsp.vc6 b/src/3rdparty/libjpeg/maketdsp.vc6
deleted file mode 100644
index fe1ae9a..0000000
--- a/src/3rdparty/libjpeg/maketdsp.vc6
+++ /dev/null
@@ -1,122 +0,0 @@
-# Microsoft Developer Studio Project File - Name="jpegtran" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** NICHT BEARBEITEN **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=jpegtran - Win32
-!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
-!MESSAGE
-!MESSAGE NMAKE /f "jpegtran.mak".
-!MESSAGE
-!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "jpegtran.mak" CFG="jpegtran - Win32"
-!MESSAGE
-!MESSAGE Fr die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "jpegtran - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\jpegtran\Release"
-# PROP BASE Intermediate_Dir ".\jpegtran\Release"
-# PROP BASE Target_Dir ".\jpegtran"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\jpegtran\Release"
-# PROP Intermediate_Dir ".\jpegtran\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\jpegtran"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# Begin Target
-
-# Name "jpegtran - Win32"
-# Begin Group "Quellcodedateien"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\cdjpeg.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpegtran.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\rdswitch.c
-# End Source File
-# Begin Source File
-
-SOURCE=.\transupp.c
-# End Source File
-# End Group
-# Begin Group "Header-Dateien"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\cderror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\cdjpeg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jerror.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jmorecfg.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpegint.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jpeglib.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jversion.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\transupp.h
-# End Source File
-# End Group
-# Begin Group "Ressourcendateien"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/libjpeg/maketmak.vc6 b/src/3rdparty/libjpeg/maketmak.vc6
deleted file mode 100644
index a0de38c..0000000
--- a/src/3rdparty/libjpeg/maketmak.vc6
+++ /dev/null
@@ -1,131 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on jpegtran.dsp
-!IF "$(CFG)" == ""
-CFG=jpegtran - Win32
-!MESSAGE Keine Konfiguration angegeben. jpegtran - Win32 wird als Standard verwendet.
-!ENDIF
-
-!IF "$(CFG)" != "jpegtran - Win32"
-!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
-!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "jpegtran.mak" CFG="jpegtran - Win32"
-!MESSAGE
-!MESSAGE Für die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "jpegtran - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR Eine ungültige Konfiguration wurde angegeben.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-CPP=cl.exe
-RSC=rc.exe
-OUTDIR=.\jpegtran\Release
-INTDIR=.\jpegtran\Release
-# Begin Custom Macros
-OutDir=.\jpegtran\Release
-# End Custom Macros
-
-ALL : "$(OUTDIR)\jpegtran.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\cdjpeg.obj"
- -@erase "$(INTDIR)\jpegtran.obj"
- -@erase "$(INTDIR)\rdswitch.obj"
- -@erase "$(INTDIR)\transupp.obj"
- -@erase "$(INTDIR)\vc60.idb"
- -@erase "$(OUTDIR)\jpegtran.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\jpegtran.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\jpegtran.pdb" /machine:I386 /out:"$(OUTDIR)\jpegtran.exe"
-LINK32_OBJS= \
- "$(INTDIR)\cdjpeg.obj" \
- "$(INTDIR)\jpegtran.obj" \
- "$(INTDIR)\rdswitch.obj" \
- "$(INTDIR)\transupp.obj"
-
-"$(OUTDIR)\jpegtran.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\jpegtran.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("jpegtran.dep")
-!INCLUDE "jpegtran.dep"
-!ELSE
-!MESSAGE Warning: cannot find "jpegtran.dep"
-!ENDIF
-!ENDIF
-
-
-!IF "$(CFG)" == "jpegtran - Win32"
-SOURCE=.\cdjpeg.c
-
-"$(INTDIR)\cdjpeg.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\jpegtran.c
-
-"$(INTDIR)\jpegtran.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\rdswitch.c
-
-"$(INTDIR)\rdswitch.obj" : $(SOURCE) "$(INTDIR)"
-
-
-SOURCE=.\transupp.c
-
-"$(INTDIR)\transupp.obj" : $(SOURCE) "$(INTDIR)"
-
-
-
-!ENDIF
-
diff --git a/src/3rdparty/libjpeg/maketvcp.vc9 b/src/3rdparty/libjpeg/maketvcp.vc9
deleted file mode 100644
index af0348d..0000000
--- a/src/3rdparty/libjpeg/maketvcp.vc9
+++ /dev/null
@@ -1,178 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="jpegtran"
- ProjectGUID="{813C33AF-9031-49D2-BA19-93D600CDD404}"
- RootNamespace="jpegtran"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ProjectName)\$(ConfigurationName)"
- IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- EnableIntrinsicFunctions="false"
- EnableFiberSafeOptimizations="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- AdditionalDependencies="Release\jpeg.lib"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Quelldateien"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\cdjpeg.c"
- >
- </File>
- <File
- RelativePath=".\jpegtran.c"
- >
- </File>
- <File
- RelativePath=".\rdswitch.c"
- >
- </File>
- <File
- RelativePath=".\transupp.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Headerdateien"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\cderror.h"
- >
- </File>
- <File
- RelativePath=".\cdjpeg.h"
- >
- </File>
- <File
- RelativePath=".\jconfig.h"
- >
- </File>
- <File
- RelativePath=".\jerror.h"
- >
- </File>
- <File
- RelativePath=".\jinclude.h"
- >
- </File>
- <File
- RelativePath=".\jmorecfg.h"
- >
- </File>
- <File
- RelativePath=".\jpegint.h"
- >
- </File>
- <File
- RelativePath=".\jpeglib.h"
- >
- </File>
- <File
- RelativePath=".\jversion.h"
- >
- </File>
- <File
- RelativePath=".\transupp.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Ressourcendateien"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makewdep.vc6 b/src/3rdparty/libjpeg/makewdep.vc6
deleted file mode 100644
index 15929bf..0000000
--- a/src/3rdparty/libjpeg/makewdep.vc6
+++ /dev/null
@@ -1,6 +0,0 @@
-# Microsoft Developer Studio erstellte Abh„ngigkeitsdatei, einbezogen von wrjpgcom.mak
-
-.\wrjpgcom.c : \
- ".\jconfig.h"\
- ".\jinclude.h"\
-
diff --git a/src/3rdparty/libjpeg/makewdsp.vc6 b/src/3rdparty/libjpeg/makewdsp.vc6
deleted file mode 100644
index 2063b1a..0000000
--- a/src/3rdparty/libjpeg/makewdsp.vc6
+++ /dev/null
@@ -1,78 +0,0 @@
-# Microsoft Developer Studio Project File - Name="wrjpgcom" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** NICHT BEARBEITEN **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=wrjpgcom - Win32
-!MESSAGE Dies ist kein gltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fhren Sie den Befehl
-!MESSAGE
-!MESSAGE NMAKE /f "wrjpgcom.mak".
-!MESSAGE
-!MESSAGE Sie k÷nnen beim Ausfhren von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "wrjpgcom.mak" CFG="wrjpgcom - Win32"
-!MESSAGE
-!MESSAGE Fr die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "wrjpgcom - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir ".\wrjpgcom\Release"
-# PROP BASE Intermediate_Dir ".\wrjpgcom\Release"
-# PROP BASE Target_Dir ".\wrjpgcom"
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir ".\wrjpgcom\Release"
-# PROP Intermediate_Dir ".\wrjpgcom\Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ".\wrjpgcom"
-# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /c
-# ADD CPP /nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /YX /FD /c
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# Begin Target
-
-# Name "wrjpgcom - Win32"
-# Begin Group "Quellcodedateien"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat;for;f90"
-# Begin Source File
-
-SOURCE=.\wrjpgcom.c
-# End Source File
-# End Group
-# Begin Group "Header-Dateien"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl;fi;fd"
-# Begin Source File
-
-SOURCE=.\jconfig.h
-# End Source File
-# Begin Source File
-
-SOURCE=.\jinclude.h
-# End Source File
-# End Group
-# Begin Group "Ressourcendateien"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;cnt;rtf;gif;jpg;jpeg;jpe"
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/libjpeg/makewmak.vc6 b/src/3rdparty/libjpeg/makewmak.vc6
deleted file mode 100644
index 22b9086..0000000
--- a/src/3rdparty/libjpeg/makewmak.vc6
+++ /dev/null
@@ -1,110 +0,0 @@
-# Microsoft Developer Studio Generated NMAKE File, Based on wrjpgcom.dsp
-!IF "$(CFG)" == ""
-CFG=wrjpgcom - Win32
-!MESSAGE Keine Konfiguration angegeben. wrjpgcom - Win32 wird als Standard verwendet.
-!ENDIF
-
-!IF "$(CFG)" != "wrjpgcom - Win32"
-!MESSAGE Ungültige Konfiguration "$(CFG)" angegeben.
-!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
-!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
-!MESSAGE
-!MESSAGE NMAKE /f "wrjpgcom.mak" CFG="wrjpgcom - Win32"
-!MESSAGE
-!MESSAGE Für die Konfiguration stehen zur Auswahl:
-!MESSAGE
-!MESSAGE "wrjpgcom - Win32" (basierend auf "Win32 (x86) Console Application")
-!MESSAGE
-!ERROR Eine ungültige Konfiguration wurde angegeben.
-!ENDIF
-
-!IF "$(OS)" == "Windows_NT"
-NULL=
-!ELSE
-NULL=nul
-!ENDIF
-
-CPP=cl.exe
-RSC=rc.exe
-OUTDIR=.\wrjpgcom\Release
-INTDIR=.\wrjpgcom\Release
-# Begin Custom Macros
-OutDir=.\wrjpgcom\Release
-# End Custom Macros
-
-ALL : "$(OUTDIR)\wrjpgcom.exe"
-
-
-CLEAN :
- -@erase "$(INTDIR)\vc60.idb"
- -@erase "$(INTDIR)\wrjpgcom.obj"
- -@erase "$(OUTDIR)\wrjpgcom.exe"
-
-"$(OUTDIR)" :
- if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)"
-
-BSC32=bscmake.exe
-BSC32_FLAGS=/nologo /o"$(OUTDIR)\wrjpgcom.bsc"
-BSC32_SBRS= \
-
-LINK32=link.exe
-LINK32_FLAGS=Release\jpeg.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\wrjpgcom.pdb" /machine:I386 /out:"$(OUTDIR)\wrjpgcom.exe"
-LINK32_OBJS= \
- "$(INTDIR)\wrjpgcom.obj"
-
-"$(OUTDIR)\wrjpgcom.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS)
- $(LINK32) @<<
- $(LINK32_FLAGS) $(LINK32_OBJS)
-<<
-
-CPP_PROJ=/nologo /G6 /MT /W3 /GX /Ox /Oa /Ob2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /Fp"$(INTDIR)\wrjpgcom.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c
-
-.c{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.obj::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.c{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cpp{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-.cxx{$(INTDIR)}.sbr::
- $(CPP) @<<
- $(CPP_PROJ) $<
-<<
-
-
-!IF "$(NO_EXTERNAL_DEPS)" != "1"
-!IF EXISTS("wrjpgcom.dep")
-!INCLUDE "wrjpgcom.dep"
-!ELSE
-!MESSAGE Warning: cannot find "wrjpgcom.dep"
-!ENDIF
-!ENDIF
-
-
-!IF "$(CFG)" == "wrjpgcom - Win32"
-SOURCE=.\wrjpgcom.c
-
-"$(INTDIR)\wrjpgcom.obj" : $(SOURCE) "$(INTDIR)"
-
-
-
-!ENDIF
-
diff --git a/src/3rdparty/libjpeg/makewvcp.vc9 b/src/3rdparty/libjpeg/makewvcp.vc9
deleted file mode 100644
index 196de0c..0000000
--- a/src/3rdparty/libjpeg/makewvcp.vc9
+++ /dev/null
@@ -1,133 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
- ProjectType="Visual C++"
- Version="9,00"
- Name="wrjpgcom"
- ProjectGUID="{178670D7-FA7F-44A8-96C7-11B1CA14269C}"
- RootNamespace="wrjpgcom"
- Keyword="Win32Proj"
- TargetFrameworkVersion="196613"
- >
- <Platforms>
- <Platform
- Name="Win32"
- />
- </Platforms>
- <ToolFiles>
- </ToolFiles>
- <Configurations>
- <Configuration
- Name="Release|Win32"
- OutputDirectory="$(ProjectName)\$(ConfigurationName)"
- IntermediateDirectory="$(ProjectName)\$(ConfigurationName)"
- ConfigurationType="1"
- CharacterSet="0"
- WholeProgramOptimization="1"
- >
- <Tool
- Name="VCPreBuildEventTool"
- />
- <Tool
- Name="VCCustomBuildTool"
- />
- <Tool
- Name="VCXMLDataGeneratorTool"
- />
- <Tool
- Name="VCWebServiceProxyGeneratorTool"
- />
- <Tool
- Name="VCMIDLTool"
- />
- <Tool
- Name="VCCLCompilerTool"
- Optimization="3"
- EnableIntrinsicFunctions="false"
- EnableFiberSafeOptimizations="true"
- PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
- RuntimeLibrary="2"
- EnableFunctionLevelLinking="true"
- UsePrecompiledHeader="0"
- WarningLevel="3"
- DebugInformationFormat="3"
- CompileAs="0"
- DisableSpecificWarnings="4996"
- />
- <Tool
- Name="VCManagedResourceCompilerTool"
- />
- <Tool
- Name="VCResourceCompilerTool"
- />
- <Tool
- Name="VCPreLinkEventTool"
- />
- <Tool
- Name="VCLinkerTool"
- LinkIncremental="1"
- GenerateDebugInformation="true"
- SubSystem="1"
- OptimizeReferences="2"
- EnableCOMDATFolding="2"
- TargetMachine="1"
- />
- <Tool
- Name="VCALinkTool"
- />
- <Tool
- Name="VCManifestTool"
- />
- <Tool
- Name="VCXDCMakeTool"
- />
- <Tool
- Name="VCBscMakeTool"
- />
- <Tool
- Name="VCFxCopTool"
- />
- <Tool
- Name="VCAppVerifierTool"
- />
- <Tool
- Name="VCPostBuildEventTool"
- />
- </Configuration>
- </Configurations>
- <References>
- </References>
- <Files>
- <Filter
- Name="Quelldateien"
- Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
- UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
- >
- <File
- RelativePath=".\wrjpgcom.c"
- >
- </File>
- </Filter>
- <Filter
- Name="Headerdateien"
- Filter="h;hpp;hxx;hm;inl;inc;xsd"
- UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
- >
- <File
- RelativePath=".\jconfig.h"
- >
- </File>
- <File
- RelativePath=".\jinclude.h"
- >
- </File>
- </Filter>
- <Filter
- Name="Ressourcendateien"
- Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
- UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
- >
- </Filter>
- </Files>
- <Globals>
- </Globals>
-</VisualStudioProject>
diff --git a/src/3rdparty/libjpeg/makljpeg.st b/src/3rdparty/libjpeg/makljpeg.st
deleted file mode 100644
index cc1ba01..0000000
--- a/src/3rdparty/libjpeg/makljpeg.st
+++ /dev/null
@@ -1,68 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding.
-;
-; To use this file, rename it to libjpeg.prj.
-; Read installation instructions before trying to make the program!
-;
-;
-; * * * Output file * * *
-libjpeg.lib
-;
-; * * * COMPILER OPTIONS * * *
-.C[-P] ; absolute calls
-.C[-M] ; and no string merging, folks
-.C[-w-cln] ; no "constant is long" warnings
-.C[-w-par] ; no "parameter xxxx unused"
-.C[-w-rch] ; no "unreachable code"
-.C[-wsig] ; warn if significant digits may be lost
-.L[-J] ; link new Obj-format (so we get a library)
-=
-; * * * * List of modules * * * *
-jaricom.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcarith.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jccoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jccolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcdctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jchuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcinit.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcomapi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcparam.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcprepct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jcsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jctrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdapimin.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdapistd.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdarith.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdatadst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h)
-jdatasrc.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h)
-jdcoefct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdcolor.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jddctmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jdhuff.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdinput.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmainct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmarker.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmaster.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdmerge.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdpostct.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdsample.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jdtrans.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jerror.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jversion.h,jerror.h)
-jfdctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jfdctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jfdctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctflt.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctfst.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jidctint.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jdct.h)
-jquant1.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jquant2.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jutils.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h)
-jmemmgr.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h)
-jmemansi.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,jmemsys.h)
diff --git a/src/3rdparty/libjpeg/maktjpeg.st b/src/3rdparty/libjpeg/maktjpeg.st
deleted file mode 100644
index 43f078a..0000000
--- a/src/3rdparty/libjpeg/maktjpeg.st
+++ /dev/null
@@ -1,30 +0,0 @@
-; Project file for Independent JPEG Group's software
-;
-; This project file is for Atari ST/STE/TT systems using Pure C or Turbo C.
-; Thanks to Frank Moehle, B. Setzepfandt, and Guido Vollbeding.
-;
-; To use this file, rename it to jpegtran.prj.
-; If you are using Turbo C, change filenames beginning with "pc..." to "tc..."
-; Read installation instructions before trying to make the program!
-;
-;
-; * * * Output file * * *
-jpegtran.ttp
-;
-; * * * COMPILER OPTIONS * * *
-.C[-P] ; absolute calls
-.C[-M] ; and no string merging, folks
-.C[-w-cln] ; no "constant is long" warnings
-.C[-w-par] ; no "parameter xxxx unused"
-.C[-w-rch] ; no "unreachable code"
-.C[-wsig] ; warn if significant digits may be lost
-=
-; * * * * List of modules * * * *
-pcstart.o
-jpegtran.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h,transupp.h,jversion.h)
-cdjpeg.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-rdswitch.c (cdjpeg.h,jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jerror.h,cderror.h)
-transupp.c (jinclude.h,jconfig.h,jpeglib.h,jmorecfg.h,jpegint.h,jerror.h,transupp.h)
-libjpeg.lib ; built by libjpeg.prj
-pcstdlib.lib ; standard library
-pcextlib.lib ; extended library
diff --git a/src/3rdparty/libjpeg/makvms.opt b/src/3rdparty/libjpeg/makvms.opt
deleted file mode 100644
index 675e8fe..0000000
--- a/src/3rdparty/libjpeg/makvms.opt
+++ /dev/null
@@ -1,4 +0,0 @@
-! A pointer to the VAX/VMS C Run-Time Shareable Library.
-! This file is needed by makefile.mms and makefile.vms,
-! but only for the older VAX C compiler. DEC C does not need it.
-Sys$Library:VAXCRTL.EXE /Share
diff --git a/src/3rdparty/libjpeg/usage.txt b/src/3rdparty/libjpeg/usage.txt
index 6e8546a..eae5842 100644
--- a/src/3rdparty/libjpeg/usage.txt
+++ b/src/3rdparty/libjpeg/usage.txt
@@ -87,8 +87,9 @@ The basic command line switches for cjpeg are:
-progressive Create progressive JPEG file (see below).
-scale M/N Scale the output image by a factor M/N. Currently
- supported scale factors are 8/N with all N from 1 to
- 16.
+ supported scale factors are M/N with all N from 1 to
+ 16, where M is the destination DCT size, which is 8 by
+ default (see -block N switch below).
-targa Input file is Targa format. Targa files that contain
an "identification" field will not be automatically
@@ -150,6 +151,19 @@ file size is about the same --- often a little smaller.
Switches for advanced users:
+ -block N Set DCT block size. All N from 1 to 16 are possible.
+ Default is 8 (baseline format).
+ Larger values produce higher compression,
+ smaller values produce higher quality
+ (exact DCT stage possible with 1 or 2; with the
+ default quality of 75 and default Luminance qtable
+ the DCT+Quantization stage is lossless for N=1).
+ CAUTION: An implementation of the JPEG SmartScale
+ extension is required for this feature. SmartScale
+ enabled JPEG is not yet widely implemented, so many
+ decoders will be unable to view a SmartScale extended
+ JPEG file at all.
+
-dct int Use integer DCT method (default).
-dct fast Use fast integer DCT (less accurate).
-dct float Use floating-point DCT method.
diff --git a/src/3rdparty/libpng/ANNOUNCE b/src/3rdparty/libpng/ANNOUNCE
index 8bb11d2..4a3b018 100644
--- a/src/3rdparty/libpng/ANNOUNCE
+++ b/src/3rdparty/libpng/ANNOUNCE
@@ -1,5 +1,5 @@
-Libpng 1.4.0 - January 3, 2010
+Libpng 1.5.1 - February 3, 2011
This is a public release of libpng, intended for use in production codes.
@@ -8,352 +8,88 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.4.0.tar.xz (LZMA-compressed, recommended)
- libpng-1.4.0.tar.gz
- libpng-1.4.0.tar.bz2
+ libpng-1.5.1.tar.xz (LZMA-compressed, recommended)
+ libpng-1.5.1.tar.gz
+ libpng-1.5.1.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
- lpng140.zip
- lpng140.7z
+ lpng151.7z (LZMA-compressed, recommended)
+ lpng151.zip
Other information:
- libpng-1.4.0-README.txt
- libpng-1.4.0-LICENSE.txt
+ libpng-1.5.1-README.txt
+ libpng-1.5.1-LICENSE.txt
-Changes since the last public release (1.2.10):
+Changes since the last public release (1.5.0):
-version 1.4.0 [January 3, 2010]
-
- Enabled iTXt support (changes png_struct, thus requires so-number change).
- Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED
- Eliminated PNG_1_0_X and PNG_1_2_X macros.
- Removed deprecated functions png_read_init, png_write_init, png_info_init,
- png_permit_empty_plte, png_set_gray_1_2_4_to_8, and removed the
- deprecated macro PNG_MAX_UINT.
- Moved "PNG_INTERNAL" parts of png.h and pngconf.h into pngintrn.h
- Removed all WIN32_WCE #ifdefs except those involving the
- time.h "tm" structure (Cosmin)
- Reduced dependency on C-runtime library when on Windows (Simon-Pierre)
- Replaced sprintf() with png_sprintf() (Simon-Pierre)
- Revised makefiles to avoid making links to libpng.so.*
- Added a note in libpng.txt that png_set_sig_bytes(8) can be used when
- writing an embedded PNG without the 8-byte signature.
- Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def
- Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros.
- Scripts/libpng.pc.in contained "configure" style version info and would
- not work with makefiles.
- Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
- buffer overflow.
- Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb))
- Changed sonum from 0 to 1.
- Removed unused prototype for png_check_sig() from png.h
- Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
- Avoided potential buffer overflow and optimized buffer in
- png_write_sCAL(), png_write_sCAL_s() (Cosmin).
- Removed the include directories and libraries from CFLAGS and LDFLAGS
- in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
- Exported png_write_sig (Cosmin).
- Optimized buffer in png_handle_cHRM() (Cosmin).
- Allow zero-length IDAT chunks after the entire zlib datastream, but not
- after another intervening chunk type.
- Set pHYs = 2835 x 2835 pixels per meter, and added
- pngtest now produces, and made some cosmetic changes to pngtest output.
- sCAL = 0.352778e-3 x 0.352778e-3 meters, in pngtest.png (Cosmin).
- Added png_set_benign_errors(), png_benign_error(), png_chunk_benign_error().
- Revised INSTALL and autogen.sh
- Fixed typo in several makefiles (-W1 should be -Wl)
- Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
- Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid
- reading out of bounds.
- Added demonstration of user chunk support in pngtest.c, to support the
- public sTER chunk and a private vpAg chunk.
- Removed ordinals from scripts/pngw32.def and removed png_info_int and
- png_set_gray_1_2_4_to_8 entries.
- Inline call of png_get_uint_32() in png_get_uint_31().
- Removed WINCE and Netware projects.
- Removed standalone Y2KINFO file.
- Removed AC_FUNC_MALLOC from configure.ac.
- Added a warning when writing iCCP profile with mismatched profile length.
- Patched pnggccrd.c to assemble on x86_64 platforms.
- Moved chunk header reading into a separate function png_read_chunk_header()
- in pngrutil.c. The chunk header (len+sig) is now serialized in a single
- operation (Cosmin).
- Implemented support for I/O states. Added png_ptr member io_state, and
- functions png_get_io_chunk_name() and png_get_io_state() in pngget.c
- (Cosmin).
- Added png_get_io_chunk_name and png_get_io_state to scripts/*.def (Cosmin).
- Renamed scripts/pngw32.* to scripts/pngwin.* (Cosmin).
- Removed the include directories and libraries from CFLAGS and LDFLAGS
- in scripts/makefile.gcc (Cosmin).
- Used png_save_uint_32() to set vpAg width and height in pngtest.c (Cosmin).
- Cast to proper type when getting/setting vpAg units in pngtest.c (Cosmin).
- Added pngintrn.h to the Visual C++ projects (Cosmin).
- Removed scripts/list (Cosmin).
- Updated copyright year in scripts/pngwin.def (Cosmin).
- Removed PNG_TYPECAST_NULL and used standard NULL consistently (Cosmin).
- Disallowed the user to redefine png_size_t, and enforced a consistent use
- of png_size_t across libpng (Cosmin).
- Changed the type of png_ptr->rowbytes, PNG_ROWBYTES() and friends
- to png_size_t (Cosmin).
- Removed png_convert_size() and replaced png_sizeof with sizeof (Cosmin).
- Removed some unnecessary type casts (Cosmin).
- Changed prototype of png_get_compression_buffer_size() and
- png_set_compression_buffer_size() to work with png_size_t instead of
- png_uint_32 (Cosmin).
- Removed png_memcpy_check() and png_memset_check() (Cosmin).
- Fixed a typo (png_byte --> png_bytep) in libpng.3 and libpng.txt (Cosmin).
- Clarified that png_zalloc() does not clear the allocated memory,
- and png_zalloc() and png_zfree() cannot be PNGAPI (Cosmin).
- Renamed png_mem_size_t to png_alloc_size_t, fixed its definition in
- pngconf.h, and used it in all memory allocation functions (Cosmin).
- Renamed pngintrn.h to pngpriv.h, added a comment at the top of the file
- mentioning that the symbols declared in that file are private, and
- updated the scripts and the Visual C++ projects accordingly (Cosmin).
- Removing trailing '.' from the warning and error messages (Cosmin).
- Revised many of the makefiles to write their defines in pngdefs.h.
- Changed "logical" to "bitwise" in the documentation.
- Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h
- Add a typecast to stifle compiler warning in pngrutil.c
- Detect and fix attempt to write wrong iCCP profile length.
- Fix potential buffer overflow in sPLT chunk handler.
- Fix Makefile.am to not try to link to noexistent files.
- Check all exported functions for NULL png_ptr.
- Built Makefile.in with automake-1.9.6 instead of 1.9.2.
- Add "install: all" in Makefile.am so "configure; make install" will work.
- Added a typecast in png_zalloc().
- Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c
- Add "png_bytep" typecast to profile while calculating length in pngwutil.c
- Added scripts/CMakeLists.txt
- Added "png_ptr->num_trans=0" before error return in png_handle_tRNS,
- to eliminate a vulnerability (CVE-2007-2554, CERT VU#684664)
- Added png_ptr->unknown_chunk to hold working unknown chunk data, so it
- can be free'ed in case of error. Revised unknown chunk handling in
- pngrutil.c and pngpread.c to use this structure.
- Prefer PNG_USE_PNGVCRD when _MSC_VER is defined in pngconf.h
- Revised pngvcrd.c for improved efficiency.
- Moved local array "chunkdata" from pngrutil.c to the png_struct, so
- it will be freed by png_read_destroy() in case of a read error (Kurt
- Christensen).
- Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking.
- Change all "chunkdata" to "png_ptr->chunkdata" in png_decompress_chunk(),
- and remove "chunkdata" from parameter list.
- Put a call to png_check_chunk_name() in png_read_chunk_header().
- Removed two calls to png_check_chunk_name() occuring later in the process.
- Define PNG_NO_ERROR_NUMBERS by default in pngconf.h
- Added png_push_have_buffer() function to pngpread.c
- Eliminated PNG_BIG_ENDIAN_SUPPORTED and associated png_get_* macros.
- Made inline expansion of png_get_*() optional with PNG_USE_READ_MACROS.
- Eliminated all PNG_USELESS_TESTS and PNG_CORRECT_PALETTE_SUPPORTED code.
- Synced contrib directory and configure files with libpng-1.2.30beta06.
- Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta)
- Declared png_ptr "volatile" in pngread.c and pngwrite.c to avoid warnings.
- Updated contrib/visupng/cexcept.h to version 2.0.1
- Added PNG_LITERAL_CHARACTER macros for #, [, and ].
- Moved newline character from individual png_debug messages into the
- png_debug macros.
- Allow user to #define their own png_debug, png_debug1, and png_debug2.
- Added PNG_STRING_NEWLINE macro
- Added PNG_STRING_COPYRIGHT macro.
- Added non-ISO versions of png_debug macros.
- Added PNG_WRITE_FLUSH_SUPPORTED and PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED
- blocks around new png_flush() call.
- Revised PNG_NO_STDIO version of png_write_flush()
- Added png_get|set_chunk_cache_max() to limit the total number of sPLT,
- text, and unknown chunks that can be stored.
- Shortened tIME_string to 29 bytes in pngtest.c
- Revised makefile.darwin to fix shared library numbering.
- Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8()
- in example.c (debian bug report)
- Sync with tEXt vulnerability fix in libpng-1.2.33rc02.
- Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c,
- and pngwrite.c
- Added check for zero-area RGB cHRM triange in png_check_cHRM() and
- png_check_cHRM_fixed().
- Revised png_warning() to write its message on standard output by default
- when warning_fn is NULL.
- Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed().
- In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant
- check for all-zero coordinates that is detected by the triangle check.
- Rearranged test expressions in png_check_cHRM_fixed() to avoid internal
- overflows.
- Added PNG_NO_CHECK_cHRM conditional.
- Fixed string vs pointer-to-string error in png_check_keyword().
- Added PNG_NO_CHECK_cHRM conditional.
- Merge png_debug with version 1.2.34beta04.
- Removed redundant check for key==NULL before calling png_check_keyword()
- to ensure that new_key gets initialized and removed extra warning
- (Merge with version 1.2.34beta05 -- Arvan Pritchard).
- Added PNG_TRANSFORM_STRIP_FILLER_BEFORE and PNG_TRANSFORM_STRIP_FILLER_AFTER
- conditionals and deprecated PNG_TRANSFORM_STRIP_FILLER (Jim Barry).
- Turned off PNG_READ_DITHER_SUPPORTED by default.
- Combined several instances of png_malloc(); png_memset() into png_calloc().
- Fixed order of #ifdef directives in the png_debug defines in png.h
- (bug introduced in libpng-1.2.34).
- Revised comments in png_set_read_fn() and png_set_write_fn().
- Use png_calloc() instead of png_malloc() to allocate big_row_buf when
- reading an interlaced file, to avoid a possible UMR.
- Revised libpng*.txt and png.h documentation about use of png_write_flush()
- and png_set_write_fn().
- Removed fflush() from pngtest.c.
- Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h
- Removed fflush() from pngtest.c.
- Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h
- Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt
- Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles)
- Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow
- application code writers to bypass the check for multiple inclusion
- of setjmp.h when they know that it is safe to ignore the situation.
- Eliminated internal use of setjmp() in pngread.c and pngwrite.c
- Eliminated deprecated png_read_init_3() and png_write_init_3() functions.
- Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress
- "shadowed declaration" warning from gcc-4.3.3.
- Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration"
- warning about a global "gamma" variable in math.h on some platforms.
- Removed pngprefs.h and MMX from makefiles
- Rebuilt configure scripts with autoconf-2.63 instead of 2.62
- Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri)
- Reformated sources in libpng style (3-space intentation, comment format)
- Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
- Added sections about the git repository and our coding style to the
- documentation
- Relocated misplaced #endif in pngwrite.c, sCAL chunk handler.
- Conditionally compile png_read_finish_row() which is not used by
- progressive readers.
- Added contrib/pngminim/preader to demonstrate building minimal progressive
- decoder, based on contrib/gregbook with embedded libpng and zlib.
- In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there
- is only one makefile in those directories, and revised the README files
- accordingly.
- Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h
- and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h
- Added a section in the documentation about using png_get_io_ptr() in
- configure scripts to detect the presence of libpng.
- Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR()
- multiple times and to specify the sample order in the tRNS chunk,
- because the ISO PNG specification has a typo in the tRNS table.
- Changed several PNG_UNKNOWN_CHUNK_SUPPORTED to
- PNG_HANDLE_AS_UNKNOWN_SUPPORTED, to make the png_set_keep mechanism
- available for ignoring known chunks even when not saving unknown chunks.
- Adopted preference for consistent use of "#ifdef" and "#ifndef" versus
- "#if defined()" and "if !defined()" where possible.
- Eliminated PNG_LEGACY_SUPPORTED code.
- Moved the various unknown chunk macro definitions outside of the
- PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks.
- Added a reference to the libpng license in each file.
- Relocated INVERT_ALPHA within png_read_png() and png_write_png().
- Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB.
- Added an "xcode" project to the projects directory (Alam Arias).
- Avoid some tests in filter selection in pngwutil.c
- Avoid a possible NULL dereference in debug build, in png_set_text_2().
- (bug introduced in libpng-0.95, discovered by Evan Rouault)
- Rebuilt configure scripts with autoconf-2.65
- Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec
- from <http://tukaani.org/xz>.
- Reject attempt to write iCCP chunk with negative embedded profile length
- (JD Chen)
- Changed "trans" to "trans_alpha" and changed "trans_values" to "trans_color".
- Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt,
- and the "noconfig" files from the distribution.
- Moved CMakeLists.txt from scripts into the main libpng directory.
- Various bugfixes and improvements to CMakeLists.txt (Philip Lowman)
- Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h
- Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros.
- Use png_malloc plus a loop instead of png_calloc() to initialize
- row_pointers in png_read_png().
- Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays.
- Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc().
- Removed scripts/libpng.icc
- Changed typecast of filler from png_byte to png_uint_16 in png_set_filler().
- (Dennis Gustafsson)
- Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h
- Expanded TAB characters in pngrtran.c
- Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid
- compiler complaints about doubly declaring things "const".
- Eliminated unused png_ptr->row_buf_size
- Changed all "#if [!]defined(X)" to "if[n]def X" where possible.
- Moved redundant IHDR checking into new png_check_IHDR() in png.c
- and report all errors found in the IHDR data.
- Eliminated useless call to png_check_cHRM() from pngset.c
- Eliminated a shadowed declaration of "pp" in png_handle_sPLT().
- Patched ltmain.sh for wince support.
- Added PNG_CONVERT_tIME_SUPPORTED macro.
- Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED
- Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED
- Updated scripts/pngw32.def and projects/wince/png32ce.def
- Copied projects/wince/png32ce.def to the scripts directory.
- Added scripts/makefile.cegcc
- Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0
- Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
- PNG_ALLOCATED macros to detect deprecated direct access to the
- png_struct or info_struct members and other deprecated usage in
- applications (John Bowler).
- Updated scripts/makefile* to add "-DPNG_CONFIGURE_LIBPNG" to CFLAGS,
- to prevent warnings about direct access to png structs by libpng
- functions while building libpng. They need to be tested, especially
- those using compilers other than gcc.
- Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
- Updated projects/visualc6 and visualc71 with "/d PNG_CONFIGURE_LIBPNG".
- They should work but still need to be updated to remove
- references to pnggccrd.c or pngvcrd.c and ASM building.
- Added README.txt to the beos, cbuilder5, netware, and xcode projects warning
- that they need to be updated, to remove references to pnggccrd.c and
- pngvcrd.c and to depend on pngpriv.h
- Removed three direct references to read_info_ptr members in pngtest.c
- that were detected by the new PNG_DEPSTRUCT macro.
- Moved the png_debug macro definitions and the png_read_destroy(),
- png_write_destroy() and png_far_to_near() prototypes from png.h
- to pngpriv.h (John Bowler)
- Moved the synopsis lines for png_read_destroy(), png_write_destroy()
- png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3.
- Removed the obsolete, unused pnggccrd.c and pngvcrd.c files.
- Removed dependency of pngtest.o on pngpriv.h in the makefiles.
- Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile
- Changed png_check_sig() to !png_sig_cmp() in contrib programs.
- Corrected the png_get_IHDR() call in contrib/gregbook/readpng2.c
- Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c
- Added dependency on pngpriv.h in contrib/pngminim/*/makefile
- Revised Makefile.am to use libpng.sys while building libpng.so
- so that only PNG_EXPORT functions are exported.
- Removed the deprecated png_check_sig() function/macro.
- Removed recently removed function names from scripts/*.def
- Added PNG_PRIVATE macro definition in pngconf.h for possible future use.
- Removed projects/beos and netware.txt; no one seems to be supporting them.
- Moved libpng-config.in and libpng.pc-configure.in out of the scripts
- directory, to libpng-config.in and libpng.pc.in, respectively, and
- modified Makefile.am and configure.ac accordingly. Now "configure"
- needs nothing from the "scripts" directory.
- Removed ASM builds from projects/visualc6 and projects/visualc71
- Removed scripts/makefile.nommx and makefile.vcawin32
- Revised CMakeLists.txt to account for new location of libpng-config.in
- and libpng.pc.in
- Updated INSTALL to reflect removal and relocation of files.
- Moved descriptions of makefiles and other scripts out of INSTALL into
- scripts/README.txt
- Updated the copyright year in scripts/pngwin.rc from 2006 to 2009.
- Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt
- Align row_buf on 16-byte boundary in memory.
- Make the 'png_jmpbuf' macro expand to a call that records the correct
- longjmp function as well as returning a pointer to the setjmp
- jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'.
- (John Bowler)
- Changed "/255" to "/255.0" in background calculations to make it clear
- that the 255 is used as a double.
- Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files.
- Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco
- to put png.h and pngconf.h in $prefix/include, like the other scripts,
- instead of in $prefix/include/libpng. Also revised makefile.sco
- to put them in $prefix/include/libpng14 instead of in
- $prefix/include/libpng/libpng14.
- Added "bit_depth" parameter to the private png_build_gamma_table() function.
- Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c
- Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr
- in pngtest.c
+ Added description of png_set_crc_action() to the manual.
+ Added a note in the manual that the type of the iCCP profile was changed
+ from png_charpp to png_bytepp in png_get_iCCP(). Similarly,
+ it was changed from png_charpp to png_const_bytepp in png_set_iCCP().
+ Ensure that png_rgb_to_gray ignores palette mapped images, if libpng
+ internally happens to call it with one.
+ Fixed the failure to handle palette mapped images correctly.
+ Fixed a bug in handling of interlaced images (bero at arklinux.org).
+ Updated CMakeLists.txt (Clifford Yapp)
+ Fixed typecasting of some png_debug() statements (Cosmin)
+ Updated documentation of png_set|get_tRNS() (Thomas Klausner).
+ Mentioned in the documentation that applications must #include "zlib.h"
+ if they need access to anything in zlib.h, and that a number of
+ macros such as png_memset() are no longer accessible by applications.
+ Corrected pngvalid gamma test "sample" function to access all of the color
+ samples of each pixel, instead of sampling the red channel three times.
+ Changed variable names index, div, exp, and gamma to char_index, divisor,
+ exp_b10, and gamma_val, respectively, to avoid "shadow" warnings.
+ Prevent png_push_crc_skip() from hanging while reading an unknown chunk
+ or an over-large compressed zTXt chunk with the progressive reader.
+ Eliminated more GCC "shadow" warnings.
+ Revised png_fixed() in png.c to avoid compiler warning about reaching the
+ end without returning anything.
+ In the manual, describe the png_get_IHDR() arguments in the correct order.
+ Added const_png_structp and const_png_infop types, and used them in
+ prototypes for most png_get_*() functions.
+ Added png_get_io_chunk_type() and deprecated png_get_io_chunk_name()
+ Added synopses for the IO_STATE functions and other missing synopses
+ to the manual. Removed the synopses from libpngpf.3 because they
+ were out of date and no longer useful. Better information can be
+ obtained by reading the prototypes and comments in pngpriv.h
+ Attempted to fix cpp on Solaris with S. Studio 12 cc, fix build
+ Added a make macro DFNCPP that is a CPP that will accept the tokens in
+ a .dfn file and adds configure stuff to test for such a CPP. ./configure
+ should fail if one is not available.
+ Corrected const_png_ in png.h to png_const_ to avoid polluting the namespace.
+ Added png_get_current_row_number and png_get_current_pass_number for the
+ benefit of the user transform callback.
+ Added png_process_data_pause and png_process_data_skip for the benefit of
+ progressive readers that need to stop data processing or want to optimize
+ skipping of unread data (e.g. if the reader marks a chunk to be skipped.)
+ Enhanced pngvalid, corrected an error in gray_to_rgb, corrected doc error.
+ pngvalid contains tests of transforms, which tests are currently disabled
+ because they are incompletely tested. gray_to_rgb was failing to expand
+ the bit depth for smaller bit depth images; this seems to be a long
+ standing error and resulted, apparently, in invalid output. The
+ documentation did not accurately describe what libpng really does when
+ converting RGB to gray.
+ Fixed incorrect examples of callback prototypes in the manual, that were
+ introduced in libpng-1.0.0.
+ In addition the order of the png_get_uint macros with respect to the
+ relevant function definitions has been reversed. This helps the
+ preprocessing of the symbol files be more robust. Furthermore, the
+ symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS even when
+ the library may actually be built with PNG_USE_READ_MACROS; this stops
+ the read macros interfering with the symbol file format.
+ Made the manual, synopses, and function prototypes use the function
+ argument names file_gamma, int_file_gamma, and srgb_intent consistently.
+ Changed PNG_UNUSED from "param=param;" to "(void)param;".
+ Added transform tests to pngvalid and simplified the arguments.
+ Added a request in the manual that applications do not use "png_" or
+ "PNG_" to begin any of their own symbols.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
-(subscription required; visit
+(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
to subscribe) or to glennrp at users.sourceforge.net
diff --git a/src/3rdparty/libpng/CHANGES b/src/3rdparty/libpng/CHANGES
index df44f16..fa5f2aa 100644
--- a/src/3rdparty/libpng/CHANGES
+++ b/src/3rdparty/libpng/CHANGES
@@ -2,11 +2,11 @@
libpng_changes(){ /*
CHANGES - changes for libpng
-version 0.2
+Version 0.2
added reader into png.h
fixed small problems in stub file
-version 0.3
+Version 0.3
added pull reader
split up pngwrite.c to several files
added pnglib.txt
@@ -17,7 +17,7 @@ version 0.3
added K&R support
added check for 64 KB blocks for 16 bit machines
-version 0.4
+Version 0.4
cleaned up code and commented code
simplified time handling into png_time
created png_color_16 and png_color_8 to handle color needs
@@ -28,28 +28,28 @@ version 0.4
cleaned up zTXt reader and writer (using zlib's Reset functions)
split transformations into pngrtran.c and pngwtran.c
-version 0.5
+Version 0.5
interfaced with zlib 0.8
fixed many reading and writing bugs
saved using 3 spaces instead of tabs
-version 0.6
+Version 0.6
added png_large_malloc() and png_large_free()
added png_size_t
cleaned up some compiler warnings
added png_start_read_image()
-version 0.7
+Version 0.7
cleaned up lots of bugs
finished dithering and other stuff
added test program
changed name from pnglib to libpng
-version 0.71 [June, 1995]
+Version 0.71 [June, 1995]
changed pngtest.png for zlib 0.93
fixed error in libpng.txt and example.c
-version 0.8
+Version 0.8
cleaned up some bugs
added png_set_filler()
split up pngstub.c into pngmem.c, pngio.c, and pngerror.c
@@ -63,191 +63,194 @@ version 0.8
changed external functions passing floats to doubles (k&r problems?)
put all the configurable stuff in pngconf.h
enabled png_set_shift to work with paletted images on read
- added png_read_update_info() - updates info structure with
- transformations
+ added png_read_update_info() - updates info structure with transformations
-version 0.81 [August, 1995]
+Version 0.81 [August, 1995]
incorporated Tim Wegner's medium model code (thanks, Tim)
-version 0.82 [September, 1995]
+Version 0.82 [September, 1995]
[unspecified changes]
-version 0.85 [December, 1995]
+Version 0.85 [December, 1995]
added more medium model code (almost everything's a far)
added i/o, error, and memory callback functions
fixed some bugs (16 bit, 4 bit interlaced, etc.)
added first run progressive reader (barely tested)
-version 0.86 [January, 1996]
+Version 0.86 [January, 1996]
fixed bugs
improved documentation
-version 0.87 [January, 1996]
+Version 0.87 [January, 1996]
fixed medium model bugs
fixed other bugs introduced in 0.85 and 0.86
added some minor documentation
-version 0.88 [January, 1996]
+Version 0.88 [January, 1996]
fixed progressive bugs
replaced tabs with spaces
cleaned up documentation
added callbacks for read/write and warning/error functions
-version 0.89 [July, 1996]
- added new initialization API to make libpng work better with shared libs
- we now have png_create_read_struct(), png_create_write_struct(),
- png_create_info_struct(), png_destroy_read_struct(), and
- png_destroy_write_struct() instead of the separate calls to
- malloc and png_read_init(), png_info_init(), and png_write_init()
- changed warning/error callback functions to fix bug - this means you
- should use the new initialization API if you were using the old
- png_set_message_fn() calls, and that the old API no longer exists
- so that people are aware that they need to change their code
- changed filter selection API to allow selection of multiple filters
- since it didn't work in previous versions of libpng anyways
- optimized filter selection code
- fixed png_set_background() to allow using an arbitrary RGB color for
- paletted images
- fixed gamma and background correction for paletted images, so
- png_correct_palette is not needed unless you are correcting an
- external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED
- in pngconf.h) - if nobody uses this, it may disappear in the future.
- fixed bug with Borland 64K memory allocation (Alexander Lehmann)
- fixed bug in interlace handling (Smarasderagd, I think)
- added more error checking for writing and image to reduce invalid files
- separated read and write functions so that they won't both be linked
- into a binary when only reading or writing functionality is used
- new pngtest image also has interlacing and zTXt
- updated documentation to reflect new API
-
-version 0.90 [January, 1997]
- made CRC errors/warnings on critical and ancillary chunks configurable
+Version 0.89 [July, 1996]
+ Added new initialization API to make libpng work better with shared libs
+ we now have png_create_read_struct(), png_create_write_struct(),
+ png_create_info_struct(), png_destroy_read_struct(), and
+ png_destroy_write_struct() instead of the separate calls to
+ malloc and png_read_init(), png_info_init(), and png_write_init()
+ Changed warning/error callback functions to fix bug - this means you
+ should use the new initialization API if you were using the old
+ png_set_message_fn() calls, and that the old API no longer exists
+ so that people are aware that they need to change their code
+ Changed filter selection API to allow selection of multiple filters
+ since it didn't work in previous versions of libpng anyways
+ Optimized filter selection code
+ Fixed png_set_background() to allow using an arbitrary RGB color for
+ paletted images
+ Fixed gamma and background correction for paletted images, so
+ png_correct_palette is not needed unless you are correcting an
+ external palette (you will need to #define PNG_CORRECT_PALETTE_SUPPORTED
+ in pngconf.h) - if nobody uses this, it may disappear in the future.
+ Fixed bug with Borland 64K memory allocation (Alexander Lehmann)
+ Fixed bug in interlace handling (Smarasderagd, I think)
+ Added more error checking for writing and image to reduce invalid files
+ Separated read and write functions so that they won't both be linked
+ into a binary when only reading or writing functionality is used
+ New pngtest image also has interlacing and zTXt
+ Updated documentation to reflect new API
+
+Version 0.90 [January, 1997]
+ Made CRC errors/warnings on critical and ancillary chunks configurable
libpng will use the zlib CRC routines by (compile-time) default
- changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner)
- added external C++ wrapper statements to png.h (Gilles Dauphin)
- allow PNG file to be read when some or all of file signature has already
- been read from the beginning of the stream. ****This affects the size
- of info_struct and invalidates all programs that use a shared libpng****
- fixed png_filler() declarations
- fixed? background color conversions
- fixed order of error function pointers to match documentation
- current chunk name is now available in png_struct to reduce the number
- of nearly identical error messages (will simplify multi-lingual
- support when available)
- try to get ready for unknown-chunk callback functions:
- - previously read critical chunks are flagged, so the chunk handling
- routines can determine if the chunk is in the right place
- - all chunk handling routines have the same prototypes, so we will
- be able to handle all chunks via a callback mechanism
- try to fix Linux "setjmp" buffer size problems
- removed png_large_malloc, png_large_free, and png_realloc functions.
-
-version 0.95 [March, 1997]
- fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never
- fixed bug in PNG file signature compares when start != 0
- changed parameter type of png_set_filler(...filler...) from png_byte
- to png_uint_32
- added test for MACOS to ensure that both math.h and fp.h are not #included
- added macros for libpng to be compiled as a Windows DLL (Andreas Kupries)
- added "packswap" transformation, which changes the endianness of
- packed-pixel bytes (Kevin Bracey)
- added "strip_alpha" transformation, which removes the alpha channel of
- input images without using it (not necessarily a good idea)
- added "swap_alpha" transformation, which puts the alpha channel in front
- of the color bytes instead of after
- removed all implicit variable tests which assume NULL == 0 (I think)
- changed several variables to "png_size_t" to show 16/32-bit limitations
- added new pCAL chunk read/write support
- added experimental filter selection weighting (Greg Roelofs)
- removed old png_set_rgbx() and png_set_xrgb() functions that have been
+ Changed DOS small/medium model memory support - needs zlib 1.04 (Tim Wegner)
+ Added external C++ wrapper statements to png.h (Gilles Dauphin)
+ Allow PNG file to be read when some or all of file signature has already
+ been read from the beginning of the stream. ****This affects the size
+ of info_struct and invalidates all programs that use a shared libpng****
+ Fixed png_filler() declarations
+ Fixed? background color conversions
+ Fixed order of error function pointers to match documentation
+ Current chunk name is now available in png_struct to reduce the number
+ of nearly identical error messages (will simplify multi-lingual
+ support when available)
+ Try to get ready for unknown-chunk callback functions:
+ - previously read critical chunks are flagged, so the chunk handling
+ routines can determine if the chunk is in the right place
+ - all chunk handling routines have the same prototypes, so we will
+ be able to handle all chunks via a callback mechanism
+ Try to fix Linux "setjmp" buffer size problems
+ Removed png_large_malloc, png_large_free, and png_realloc functions.
+
+Version 0.95 [March, 1997]
+ Fixed bug in pngwutil.c allocating "up_row" twice and "avg_row" never
+ Fixed bug in PNG file signature compares when start != 0
+ Changed parameter type of png_set_filler(...filler...) from png_byte
+ to png_uint_32
+ Added test for MACOS to ensure that both math.h and fp.h are not #included
+ Added macros for libpng to be compiled as a Windows DLL (Andreas Kupries)
+ Added "packswap" transformation, which changes the endianness of
+ packed-pixel bytes (Kevin Bracey)
+ Added "strip_alpha" transformation, which removes the alpha channel of
+ input images without using it (not necessarily a good idea)
+ Added "swap_alpha" transformation, which puts the alpha channel in front
+ of the color bytes instead of after
+ Removed all implicit variable tests which assume NULL == 0 (I think)
+ Changed several variables to "png_size_t" to show 16/32-bit limitations
+ Added new pCAL chunk read/write support
+ Added experimental filter selection weighting (Greg Roelofs)
+ Removed old png_set_rgbx() and png_set_xrgb() functions that have been
obsolete for about 2 years now (use png_set_filler() instead)
- added macros to read 16- and 32-bit ints directly from buffer, to be
- used only on those systems that support it (namely PowerPC and 680x0)
- With some testing, this may become the default for MACOS/PPC systems.
- only calculate CRC on data if we are going to use it
- added macros for zTXt compression type PNG_zTXt_COMPRESSION_???
- added macros for simple libpng debugging output selectable at compile time
- removed PNG_READ_END_MODE in progressive reader (Smarasderagd)
- more description of info_struct in libpng.txt and png.h
- more instructions in example.c
- more chunk types tested in pngtest.c
- renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be
- png_set_<chunk>. We now have corresponding png_get_<chunk>
- functions in pngget.c to get information in info_ptr. This isolates
- the application from the internal organization of png_info_struct
- (good for shared library implementations).
-
-version 0.96 [May, 1997]
- fixed serious bug with < 8bpp images introduced in 0.95
- fixed 256-color transparency bug (Greg Roelofs)
- fixed up documentation (Greg Roelofs, Laszlo Nyul)
- fixed "error" in pngconf.h for Linux setjmp() behaviour
- fixed DOS medium model support (Tim Wegner)
- fixed png_check_keyword() for case with error in static string text
- added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul)
- added typecasts to quiet compiler errors
- added more debugging info
-
-version 0.97 [January, 1998]
- removed PNG_USE_OWN_CRC capability
- relocated png_set_crc_action from pngrutil.c to pngrtran.c
- fixed typecasts of "new_key", etc. (Andreas Dilger)
- added RFC 1152 [sic] date support
- fixed bug in gamma handling of 4-bit grayscale
- added 2-bit grayscale gamma handling (Glenn R-P)
- added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P)
- minor corrections in libpng.txt
- added simple sRGB support (Glenn R-P)
- easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
- all configurable options can be selected from command-line instead
- of having to edit pngconf.h (Glenn R-P)
- fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
- added more conditions for png_do_background, to avoid changing
- black pixels to background when a background is supplied and
- no pixels are transparent
- repaired PNG_NO_STDIO behaviour
- tested NODIV support and made it default behaviour (Greg Roelofs)
- added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler)
- regularized version numbering scheme and bumped shared-library major
+ Added macros to read 16- and 32-bit ints directly from buffer, to be
+ used only on those systems that support it (namely PowerPC and 680x0)
+ With some testing, this may become the default for MACOS/PPC systems.
+ Only calculate CRC on data if we are going to use it
+ Added macros for zTXt compression type PNG_zTXt_COMPRESSION_???
+ Added macros for simple libpng debugging output selectable at compile time
+ Removed PNG_READ_END_MODE in progressive reader (Smarasderagd)
+ More description of info_struct in libpng.txt and png.h
+ More instructions in example.c
+ More chunk types tested in pngtest.c
+ Renamed pngrcb.c to pngset.c, and all png_read_<chunk> functions to be
+ png_set_<chunk>. We now have corresponding png_get_<chunk>
+ functions in pngget.c to get information in info_ptr. This isolates
+ the application from the internal organization of png_info_struct
+ (good for shared library implementations).
+
+Version 0.96 [May, 1997]
+ Fixed serious bug with < 8bpp images introduced in 0.95
+ Fixed 256-color transparency bug (Greg Roelofs)
+ Fixed up documentation (Greg Roelofs, Laszlo Nyul)
+ Fixed "error" in pngconf.h for Linux setjmp() behaviour
+ Fixed DOS medium model support (Tim Wegner)
+ Fixed png_check_keyword() for case with error in static string text
+ Added read of CRC after IEND chunk for embedded PNGs (Laszlo Nyul)
+ Added typecasts to quiet compiler errors
+ Added more debugging info
+
+Version 0.97 [January, 1998]
+ Removed PNG_USE_OWN_CRC capability
+ Relocated png_set_crc_action from pngrutil.c to pngrtran.c
+ Fixed typecasts of "new_key", etc. (Andreas Dilger)
+ Added RFC 1152 [sic] date support
+ Fixed bug in gamma handling of 4-bit grayscale
+ Added 2-bit grayscale gamma handling (Glenn R-P)
+ Added more typecasts. 65536L becomes (png_uint_32)65536L, etc. (Glenn R-P)
+ Minor corrections in libpng.txt
+ Added simple sRGB support (Glenn R-P)
+ Easier conditional compiling, e.g. define PNG_READ/WRITE_NOT_FULLY_SUPPORTED;
+ all configurable options can be selected from command-line instead
+ of having to edit pngconf.h (Glenn R-P)
+ Fixed memory leak in pngwrite.c (free info_ptr->text) (Glenn R-P)
+ Added more conditions for png_do_background, to avoid changing
+ black pixels to background when a background is supplied and
+ no pixels are transparent
+ Repaired PNG_NO_STDIO behaviour
+ Tested NODIV support and made it default behaviour (Greg Roelofs)
+ Added "-m" option and PNGTEST_DEBUG_MEMORY to pngtest (John Bowler)
+ Regularized version numbering scheme and bumped shared-library major
version number to 2 to avoid problems with libpng 0.89 apps (Greg Roelofs)
-version 0.98 [January, 1998]
- cleaned up some typos in libpng.txt and in code documentation
- fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler)
- cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c
- changed recommendation about file_gamma for PC images to .51 from .45,
- in example.c and libpng.txt, added comments to distinguish between
- screen_gamma, viewing_gamma, and display_gamma.
- changed all references to RFC1152 to read RFC1123 and changed the
- PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED
- added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent)
- changed srgb_intent from png_byte to int to avoid compiler bugs
-
-version 0.99 [January 30, 1998]
- free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler)
- fixed a longstanding "packswap" bug in pngtrans.c
- fixed some inconsistencies in pngconf.h that prevented compiling with
- PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined
- fixed some typos and made other minor rearrangement of libpng.txt (Andreas)
- changed recommendation about file_gamma for PC images to .50 from .51 in
- example.c and libpng.txt, and changed file_gamma for sRGB images to .45
- added a number of functions to access information from the png structure
- png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit)
- added TARGET_MACOS similar to zlib-1.0.8
- define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined
- added type casting to all png_malloc() function calls
-version 0.99a [January 31, 1998]
+Version 0.98 [January, 1998]
+ Cleaned up some typos in libpng.txt and in code documentation
+ Fixed memory leaks in pCAL chunk processing (Glenn R-P and John Bowler)
+ Cosmetic change "display_gamma" to "screen_gamma" in pngrtran.c
+ Changed recommendation about file_gamma for PC images to .51 from .45,
+ in example.c and libpng.txt, added comments to distinguish between
+ screen_gamma, viewing_gamma, and display_gamma.
+ Changed all references to RFC1152 to read RFC1123 and changed the
+ PNG_TIME_RFC1152_SUPPORTED macro to PNG_TIME_RFC1123_SUPPORTED
+ Added png_invert_alpha capability (Glenn R-P -- suggestion by Jon Vincent)
+ Changed srgb_intent from png_byte to int to avoid compiler bugs
+
+Version 0.99 [January 30, 1998]
+ Free info_ptr->text instead of end_info_ptr->text in pngread.c (John Bowler)
+ Fixed a longstanding "packswap" bug in pngtrans.c
+ Fixed some inconsistencies in pngconf.h that prevented compiling with
+ PNG_READ_GAMMA_SUPPORTED and PNG_READ_hIST_SUPPORTED undefined
+ Fixed some typos and made other minor rearrangement of libpng.txt (Andreas)
+ Changed recommendation about file_gamma for PC images to .50 from .51 in
+ example.c and libpng.txt, and changed file_gamma for sRGB images to .45
+ Added a number of functions to access information from the png structure
+ png_get_image_height(), etc. (Glenn R-P, suggestion by Brad Pettit)
+ Added TARGET_MACOS similar to zlib-1.0.8
+ Define PNG_ALWAYS_EXTERN when __MWERKS__ && WIN32 are defined
+ Added type casting to all png_malloc() function calls
+
+Version 0.99a [January 31, 1998]
Added type casts and parentheses to all returns that return a value.(Tim W.)
-version 0.99b [February 4, 1998]
+
+Version 0.99b [February 4, 1998]
Added type cast png_uint_32 on malloc function calls where needed.
Changed type of num_hist from png_uint_32 to int (same as num_palette).
Added checks for rowbytes overflow, in case png_size_t is less than 32 bits.
Renamed makefile.elf to makefile.lnx.
-version 0.99c [February 7, 1998]
+
+Version 0.99c [February 7, 1998]
More type casting. Removed erroneous overflow test in pngmem.c.
Added png_buffered_memcpy() and png_buffered_memset(), apply them to rowbytes.
Added UNIX manual pages libpng.3 (incorporating libpng.txt) and png.5.
-version 0.99d [February 11, 1998]
+
+Version 0.99d [February 11, 1998]
Renamed "far_to_near()" "png_far_to_near()"
Revised libpng.3
Version 99c "buffered" operations didn't work as intended. Replaced them
@@ -257,7 +260,8 @@ version 0.99d [February 11, 1998]
Check for overlength tRNS chunk present when indexed-color PLTE is read.
Cleaned up spelling errors in libpng.3/libpng.txt
Corrected a problem with png_get_tRNS() which returned undefined trans array
-version 0.99e [February 28, 1998]
+
+Version 0.99e [February 28, 1998]
Corrected png_get_tRNS() again.
Add parentheses for easier reading of pngget.c, fixed "||" should be "&&".
Touched up example.c to make more of it compileable, although the entire
@@ -267,53 +271,59 @@ version 0.99e [February 28, 1998]
Replaced pngtest.png with one created with zlib 1.1.1
Changed pngtest to report PASS even when file size is different (Jean-loup G.)
Corrected some logic errors in png_do_invert_alpha() (Chris Patterson)
-version 0.99f [March 5, 1998]
+
+Version 0.99f [March 5, 1998]
Corrected a bug in pngpread() introduced in version 99c (Kevin Bracey)
Moved makefiles into a "scripts" directory, and added INSTALL instruction file
Added makefile.os2 and pngos2.def (A. Zabolotny) and makefile.s2x (W. Sebok)
Added pointers to "note on libpng versions" in makefile.lnx and README
Added row callback feature when reading and writing nonprogressive rows
- and added a test of this feature in pngtest.c
+ and added a test of this feature in pngtest.c
Added user transform callbacks, with test of the feature in pngtest.c
-version 0.99g [March 6, 1998, morning]
+
+Version 0.99g [March 6, 1998, morning]
Minor changes to pngtest.c to suppress compiler warnings.
Removed "beta" language from documentation.
-version 0.99h [March 6, 1998, evening]
+
+Version 0.99h [March 6, 1998, evening]
Minor changes to previous minor changes to pngtest.c
Changed PNG_READ_NOT_FULLY_SUPPORTED to PNG_READ_TRANSFORMS_NOT_SUPPORTED
- and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro
+ and added PNG_PROGRESSIVE_READ_NOT_SUPPORTED macro
Added user transform capability
-version 1.00 [March 7, 1998]
+Version 1.00 [March 7, 1998]
Changed several typedefs in pngrutil.c
Added makefile.wat (Pawel Mrochen), updated makefile.tc3 (Willem van Schaik)
- replaced "while(1)" with "for(;;)"
- added PNGARG() to prototypes in pngtest.c and removed some prototypes
- updated some of the makefiles (Tom Lane)
- changed some typedefs (s_start, etc.) in pngrutil.c
- fixed dimensions of "short_months" array in pngwrite.c
+ Replaced "while(1)" with "for(;;)"
+ Added PNGARG() to prototypes in pngtest.c and removed some prototypes
+ Updated some of the makefiles (Tom Lane)
+ Changed some typedefs (s_start, etc.) in pngrutil.c
+ Fixed dimensions of "short_months" array in pngwrite.c
Replaced ansi2knr.c with the one from jpeg-v6
-version 1.0.0 [March 8, 1998]
+Version 1.0.0 [March 8, 1998]
Changed name from 1.00 to 1.0.0 (Adam Costello)
Added smakefile.ppc (with SCOPTIONS.ppc) for Amiga PPC (Andreas Kleinert)
-version 1.0.0a [March 9, 1998]
+
+Version 1.0.0a [March 9, 1998]
Fixed three bugs in pngrtran.c to make gamma+background handling consistent
- (Greg Roelofs)
+ (Greg Roelofs)
Changed format of the PNG_LIBPNG_VER integer to xyyzz instead of xyz
- for major, minor, and bugfix releases. This is 10001. (Adam Costello,
- Tom Lane)
+ for major, minor, and bugfix releases. This is 10001. (Adam Costello,
+ Tom Lane)
Make months range from 1-12 in png_convert_to_rfc1123
-version 1.0.0b [March 13, 1998]
+
+Version 1.0.0b [March 13, 1998]
Quieted compiler complaints about two empty "for" loops in pngrutil.c
Minor changes to makefile.s2x
Removed #ifdef/#endif around a png_free() in pngread.c
-version 1.0.1 [March 14, 1998]
+Version 1.0.1 [March 14, 1998]
Changed makefile.s2x to reduce security risk of using a relative pathname
Fixed some typos in the documentation (Greg).
Fixed a problem with value of "channels" returned by png_read_update_info()
-version 1.0.1a [April 21, 1998]
+
+Version 1.0.1a [April 21, 1998]
Optimized Paeth calculations by replacing abs() function calls with intrinsics
plus other loop optimizations. Improves avg decoding speed by about 20%.
Commented out i386istic "align" compiler flags in makefile.lnx.
@@ -327,19 +337,24 @@ version 1.0.1a [April 21, 1998]
Moved a misplaced pngrutil code block that truncates tRNS if it has more
than num_palette entries -- test was done before num_palette was defined.
Fixed a png_convert_to_rfc1123() bug that converts day 31 to 0 (Steve Eddins).
- Changed compiler flags in makefile.wat for better optimization (Pawel Mrochen).
-version 1.0.1b [May 2, 1998]
+ Changed compiler flags in makefile.wat for better optimization
+ (Pawel Mrochen).
+
+Version 1.0.1b [May 2, 1998]
Relocated png_do_gray_to_rgb() within png_do_read_transformations() (Greg).
Relocated the png_composite macros from pngrtran.c to png.h (Greg).
Added makefile.sco (contributed by Mike Hopkirk).
Fixed two bugs (missing definitions of "istop") introduced in libpng-1.0.1a.
Fixed a bug in pngrtran.c that would set channels=5 under some circumstances.
- More work on the Paeth-filtering, achieving imperceptible speedup (A Kleinert).
- More work on loop optimization which may help when compiled with C++ compilers.
+ More work on the Paeth-filtering, achieving imperceptible speedup
+ (A Kleinert).
+ More work on loop optimization which may help when compiled with C++
+ compilers.
Added warnings when people try to use transforms they've defined out.
Collapsed 4 "i" and "c" loops into single "i" loops in pngrtran and pngwtran.
Revised paragraph about png_set_expand() in libpng.txt and libpng.3 (Greg)
-version 1.0.1c [May 11, 1998]
+
+Version 1.0.1c [May 11, 1998]
Fixed a bug in pngrtran.c (introduced in libpng-1.0.1a) where the masks for
filler bytes should have been 0xff instead of 0xf.
Added max_pixel_depth=32 in pngrutil.c when using FILLER with palette images.
@@ -351,7 +366,8 @@ version 1.0.1c [May 11, 1998]
to remove unwanted capabilities via the compile line
Made some corrections to grammar (which, it's) in documentation (Greg).
Corrected example.c, use of row_pointers in png_write_image().
-version 1.0.1d [May 24, 1998]
+
+Version 1.0.1d [May 24, 1998]
Corrected several statements that used side effects illegally in pngrutil.c
and pngtrans.c, that were introduced in version 1.0.1b
Revised png_read_rows() to avoid repeated if-testing for NULL (A Kleinert)
@@ -361,7 +377,8 @@ version 1.0.1d [May 24, 1998]
Bob Dellaca, to make a png32bd.dll with Borland C++ 4.5
Fixed error in example.c with png_set_text: num_text is 3, not 2 (Guido V.)
Changed several loops from count-down to count-up, for consistency.
-version 1.0.1e [June 6, 1998]
+
+Version 1.0.1e [June 6, 1998]
Revised libpng.txt and libpng.3 description of png_set_read|write_fn(), and
added warnings when people try to set png_read_fn and png_write_fn in
the same structure.
@@ -378,9 +395,10 @@ version 1.0.1e [June 6, 1998]
PNGTEST_DEBUG_MEM feature.
Added makefile.w32, for Microsoft C++ 4.0 and later (Tim Wegner).
-version 1.0.2 [June 14, 1998]
+Version 1.0.2 [June 14, 1998]
Fixed two bugs in makefile.bor .
-version 1.0.2a [December 30, 1998]
+
+Version 1.0.2a [December 30, 1998]
Replaced and extended code that was removed from png_set_filler() in 1.0.1a.
Fixed a bug in png_do_filler() that made it fail to write filler bytes in
the left-most pixel of each row (Kevin Bracey).
@@ -402,21 +420,24 @@ version 1.0.2a [December 30, 1998]
Added png_get_copyright() and png_get_header_version() functions.
Revised comments on png_set_progressive_read_fn() in libpng.txt and example.c
Added information about debugging in libpng.txt and libpng.3 .
- Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and makefile.sco.
+ Changed "ln -sf" to "ln -s -f" in makefile.s2x, makefile.lnx, and
+ makefile.sco.
Removed lines after Dynamic Dependencies" in makefile.aco .
Revised makefile.dec to make a shared library (Jeremie Petit).
Removed trailing blanks from all files.
-version 1.0.2a [January 6, 1999]
+
+Version 1.0.2a [January 6, 1999]
Removed misplaced #endif and #ifdef PNG_NO_EXTERN near the end of png.h
Added "if" tests to silence complaints about unused png_ptr in png.h and png.c
Changed "check_if_png" function in example.c to return true (nonzero) if PNG.
Changed libpng.txt to demonstrate png_sig_cmp() instead of png_check_sig()
which is obsolete.
-version 1.0.3 [January 14, 1999]
+Version 1.0.3 [January 14, 1999]
Added makefile.hux, for Hewlett Packard HPUX 10.20 and 11.00 (Jim Rice)
Added a statement of Y2K compliance in png.h, libpng.3, and Y2KINFO.
-version 1.0.3a [August 12, 1999]
+
+Version 1.0.3a [August 12, 1999]
Added check for PNG_READ_INTERLACE_SUPPORTED in pngread.c; issue a warning
if an attempt is made to read an interlaced image when it's not supported.
Added check if png_ptr->trans is defined before freeing it in pngread.c
@@ -443,13 +464,15 @@ version 1.0.3a [August 12, 1999]
Correct gamma with srgb is 45455 instead of 45000 in pngrutil.c, to be
consistent with PNG-1.2, and allow variance of 500 before complaining.
Added assembler code contributed by Intel in file pngvcrd.c and modified
- makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation, Gilles Vollant)
+ makefile.w32 to use it (Nirav Chhatrapati, INTEL Corporation,
+ Gilles Vollant)
Changed "ln -s -f" to "ln -f -s" in the makefiles to make Solaris happy.
Added some aliases for png_set_expand() in pngrtran.c, namely
png_set_expand_PLTE(), png_set_expand_depth(), and png_set_expand_tRNS()
(Greg Roelofs, in "PNG: The Definitive Guide").
Added makefile.beo for BEOS on X86, contributed by Sander Stok.
-version 1.0.3b [August 26, 1999]
+
+Version 1.0.3b [August 26, 1999]
Replaced 2147483647L several places with PNG_MAX_UINT macro, defined in png.h
Changed leading blanks to tabs in all makefiles.
Define PNG_USE_PNGVCRD in makefile.w32, to get MMX assembler code.
@@ -461,12 +484,13 @@ version 1.0.3b [August 26, 1999]
negative shift distance, whose results are undefined in the C language.
Added a check in pngset.c to prevent writing multiple tIME chunks.
Added a check in pngwrite.c to detect invalid small window_bits sizes.
-version 1.0.3d [September 4, 1999]
+
+Version 1.0.3d [September 4, 1999]
Fixed type casting of igamma in pngrutil.c
Added new png_expand functions to scripts/pngdef.pas and pngos2.def
Added a demo read_user_transform_fn that examines the row filters in pngtest.c
-version 1.0.4 [September 24, 1999]
+Version 1.0.4 [September 24, 1999]
Define PNG_ALWAYS_EXTERN in pngconf.h if __STDC__ is defined
Delete #define PNG_INTERNAL and include "png.h" from pngasmrd.h
Made several minor corrections to pngtest.c
@@ -480,24 +504,30 @@ version 1.0.4 [September 24, 1999]
assembler code) and makefile.vcwin32 (doesn't).
Added a CPU timing report to pngtest.c (enabled by defining PNGTEST_TIMING)
Added a copy of pngnow.png to the distribution.
-version 1.0.4a [September 25, 1999]
+
+Version 1.0.4a [September 25, 1999]
Increase max_pixel_depth in pngrutil.c if a user transform needs it.
Changed several division operations to right-shifts in pngvcrd.c
-version 1.0.4b [September 30, 1999]
+
+Version 1.0.4b [September 30, 1999]
Added parentheses in line 3732 of pngvcrd.c
Added a comment in makefile.linux warning about buggy -O3 in pgcc 2.95.1
-version 1.0.4c [October 1, 1999]
+
+Version 1.0.4c [October 1, 1999]
Added a "png_check_version" function in png.c and pngtest.c that will generate
a helpful compiler error if an old png.h is found in the search path.
Changed type of png_user_transform_depth|channels from int to png_byte.
-version 1.0.4d [October 6, 1999]
+
+Version 1.0.4d [October 6, 1999]
Changed 0.45 to 0.45455 in png_set_sRGB()
Removed unused PLTE entries from pngnow.png
Re-enabled some parts of pngvcrd.c (png_combine_row) that work properly.
-version 1.0.4e [October 10, 1999]
+
+Version 1.0.4e [October 10, 1999]
Fixed sign error in pngvcrd.c (Greg Roelofs)
Replaced some instances of memcpy with simple assignments in pngvcrd (GR-P)
-version 1.0.4f [October 15, 1999]
+
+Version 1.0.4f [October 15, 1999]
Surrounded example.c code with #if 0 .. #endif to prevent people from
inadvertently trying to compile it.
Changed png_get_header_version() from a function to a macro in png.h
@@ -505,9 +535,10 @@ version 1.0.4f [October 15, 1999]
Removed some pointless "ptr = NULL" in pngmem.c
Added a "contrib" directory containing the source code from Greg's book.
-version 1.0.5 [October 15, 1999]
+Version 1.0.5 [October 15, 1999]
Minor editing of the INSTALL and README files.
-version 1.0.5a [October 23, 1999]
+
+Version 1.0.5a [October 23, 1999]
Added contrib/pngsuite and contrib/pngminus (Willem van Schaik)
Fixed a typo in the png_set_sRGB() function call in example.c (Jan Nijtmans)
Further optimization and bugfix of pngvcrd.c
@@ -515,14 +546,16 @@ version 1.0.5a [October 23, 1999]
text_ptr structure. Instead, it makes its own copy.
Created separate write_end_info_struct in pngtest.c for a more severe test.
Added code in pngwrite.c to free info_ptr->text[i].key to stop a memory leak.
-version 1.0.5b [November 23, 1999]
+
+Version 1.0.5b [November 23, 1999]
Moved PNG_FLAG_HAVE_CHUNK_HEADER, PNG_FLAG_BACKGROUND_IS_GRAY and
PNG_FLAG_WROTE_tIME from flags to mode.
Added png_write_info_before_PLTE() function.
Fixed some typecasting in contrib/gregbook/*.c
Updated scripts/makevms.com and added makevms.com to contrib/gregbook
and contrib/pngminus (Martin Zinser)
-version 1.0.5c [November 26, 1999]
+
+Version 1.0.5c [November 26, 1999]
Moved png_get_header_version from png.h to png.c, to accommodate ansi2knr.
Removed all global arrays (according to PNG_NO_GLOBAL_ARRAYS macro), to
accommodate making DLL's: Moved usr_png_ver from global variable to function
@@ -535,7 +568,8 @@ version 1.0.5c [November 26, 1999]
Removed some extraneous "-I" from contrib/pngminus/makefile.std
Changed the PNG_sRGB_INTENT macros in png.h to be consistent with PNG-1.2.
Change PNG_SRGB_INTENT to PNG_sRGB_INTENT in libpng.txt and libpng.3
-version 1.0.5d [November 29, 1999]
+
+Version 1.0.5d [November 29, 1999]
Add type cast (png_const_charp) two places in png.c
Eliminated pngtypes.h; use macros instead to declare PNG_CHNK arrays.
Renamed "PNG_GLOBAL_ARRAYS" to "PNG_USE_GLOBAL_ARRAYS" and made available
@@ -543,7 +577,8 @@ version 1.0.5d [November 29, 1999]
comment out (with #ifdef) all the new declarations when
PNG_USE_GLOBAL_ARRAYS is defined.
Added PNG_EXPORT_VAR macro to accommodate making DLL's.
-version 1.0.5e [November 30, 1999]
+
+Version 1.0.5e [November 30, 1999]
Added iCCP, iTXt, and sPLT support; added "lang" member to the png_text
structure; refactored the inflate/deflate support to make adding new chunks
with trailing compressed parts easier in the future, and added new functions
@@ -564,18 +599,21 @@ version 1.0.5e [November 30, 1999]
PNG_cHNK_SUPPORTED and combined the three types of PNG_text_SUPPORTED
macros, leaving the separate macros also available.
Removed comments on #endifs at the end of many short, non-nested #if-blocks.
-version 1.0.5f [December 6, 1999]
+
+Version 1.0.5f [December 6, 1999]
Changed makefile.solaris to issue a warning about potential problems when
the ucb "ld" is in the path ahead of the ccs "ld".
Removed "- [date]" from the "synopsis" line in libpng.3 and libpngpf.3.
Added sCAL chunk support (Eric S. Raymond).
-version 1.0.5g [December 7, 1999]
+
+Version 1.0.5g [December 7, 1999]
Fixed "png_free_spallettes" typo in png.h
Added code to handle new chunks in pngpread.c
Moved PNG_CHNK string macro definitions outside of PNG_NO_EXTERN block
Added "translated_key" to png_text structure and png_write_iTXt().
Added code in pngwrite.c to work around a newly discovered zlib bug.
-version 1.0.5h [December 10, 1999]
+
+Version 1.0.5h [December 10, 1999]
NOTE: regarding the note for version 1.0.5e, the following must also
be included in your code:
png_text[i].translated_key = NULL;
@@ -583,7 +621,8 @@ version 1.0.5h [December 10, 1999]
Option to eliminate all floating point support was added. Some new
fixed-point functions such as png_set_gAMA_fixed() were added.
Expanded tabs and removed trailing blanks in source files.
-version 1.0.5i [December 13, 1999]
+
+Version 1.0.5i [December 13, 1999]
Added some type casts to silence compiler warnings.
Renamed "png_free_spalette" to "png_free_spalettes" for consistency.
Removed leading blanks from a #define in pngvcrd.c
@@ -595,7 +634,8 @@ version 1.0.5i [December 13, 1999]
Added png_free_hIST() function.
Various patches to fix bugs in the sCAL and integer cHRM processing,
and to add some convenience macros for use with sCAL.
-version 1.0.5j [December 21, 1999]
+
+Version 1.0.5j [December 21, 1999]
Changed "unit" parameter of png_write_sCAL from png_byte to int, to work
around buggy compilers.
Added new type "png_fixed_point" for integers that hold float*100000 values
@@ -611,7 +651,8 @@ version 1.0.5j [December 21, 1999]
and to write the iTXt chunk after IDAT if it appears in the end_ptr.
Added pnggccrd.c, version of pngvcrd.c Intel assembler for gcc (Greg Roelofs)
Reversed the order of trying to write floating-point and fixed-point gAMA.
-version 1.0.5k [December 27, 1999]
+
+Version 1.0.5k [December 27, 1999]
Added many parentheses, e.g., "if (a && b & c)" becomes "if (a && (b & c))"
Added png_handle_as_unknown() function (Glenn)
Added png_free_chunk_list() function and chunk_list and num_chunk_list members
@@ -622,33 +663,41 @@ version 1.0.5k [December 27, 1999]
Added png_free_tRNS(); png_set_tRNS() now malloc's its own trans array (ESR).
Define png_get_int_32 when oFFs chunk is supported as well as when pCAL is.
Changed type of proflen from png_int_32 to png_uint_32 in png_get_iCCP().
-version 1.0.5l [January 1, 2000]
+
+Version 1.0.5l [January 1, 2000]
Added functions png_set_read_user_chunk_fn() and png_get_user_chunk_ptr()
for setting a callback function to handle unknown chunks and for
retrieving the associated user pointer (Glenn).
-version 1.0.5m [January 7, 2000]
+
+Version 1.0.5m [January 7, 2000]
Added high-level functions png_read_png(), png_write_png(), png_free_pixels().
-version 1.0.5n [January 9, 2000]
+
+Version 1.0.5n [January 9, 2000]
Added png_free_PLTE() function, and modified png_set_PLTE() to malloc its
own memory for info_ptr->palette. This makes it safe for the calling
application to free its copy of the palette any time after it calls
png_set_PLTE().
-version 1.0.5o [January 20, 2000]
+
+Version 1.0.5o [January 20, 2000]
Cosmetic changes only (removed some trailing blanks and TABs)
-version 1.0.5p [January 31, 2000]
+
+Version 1.0.5p [January 31, 2000]
Renamed pngdll.mak to makefile.bd32
Cosmetic changes in pngtest.c
-version 1.0.5q [February 5, 2000]
+
+Version 1.0.5q [February 5, 2000]
Relocated the makefile.solaris warning about PATH problems.
Fixed pngvcrd.c bug by pushing/popping registers in mmxsupport (Bruce Oberg)
Revised makefile.gcmmx
Added PNG_SETJMP_SUPPORTED, PNG_SETJMP_NOT_SUPPORTED, and PNG_ABORT() macros
-version 1.0.5r [February 7, 2000]
+
+Version 1.0.5r [February 7, 2000]
Removed superfluous prototype for png_get_itxt from png.h
Fixed a bug in pngrtran.c that improperly expanded the background color.
Return *num_text=0 from png_get_text() when appropriate, and fix documentation
of png_get_text() in libpng.txt/libpng.3.
-version 1.0.5s [February 18, 2000]
+
+Version 1.0.5s [February 18, 2000]
Added "png_jmp_env()" macro to pngconf.h, to help people migrate to the
new error handler that's planned for the next libpng release, and changed
example.c, pngtest.c, and contrib programs to use this macro.
@@ -667,7 +716,8 @@ version 1.0.5s [February 18, 2000]
Added png_set_rows() and png_get_rows(), for use with png_read|write_png().
Modified png_read_png() to allocate info_ptr->row_pointers only if it
hasn't already been allocated.
-version 1.0.5t [March 4, 2000]
+
+Version 1.0.5t [March 4, 2000]
Changed png_jmp_env() migration aiding macro to png_jmpbuf().
Fixed "interlace" typo (should be "interlaced") in contrib/gregbook/read2-x.c
Fixed bug with use of PNG_BEFORE_IHDR bit in png_ptr->mode, introduced when
@@ -676,13 +726,15 @@ version 1.0.5t [March 4, 2000]
a 24-bit visual if one is available, and to allow abbreviated options.
Files in contrib/pngminus were revised to use the png_jmpbuf() macro.
Removed spaces in makefile.linux and makefile.gcmmx, introduced in 1.0.5s
-version 1.0.5u [March 5, 2000]
+
+Version 1.0.5u [March 5, 2000]
Simplified the code that detects old png.h in png.c and pngtest.c
Renamed png_spalette (_p, _pp) to png_sPLT_t (_tp, _tpp)
Increased precision of rgb_to_gray calculations from 8 to 15 bits and
added png_set_rgb_to_gray_fixed() function.
Added makefile.bc32 (32-bit Borland C++, C mode)
-version 1.0.5v [March 11, 2000]
+
+Version 1.0.5v [March 11, 2000]
Added some parentheses to the png_jmpbuf macro definition.
Updated references to the zlib home page, which has moved to freesoftware.com.
Corrected bugs in documentation regarding png_read_row() and png_write_row().
@@ -690,10 +742,11 @@ version 1.0.5v [March 11, 2000]
Renamed makefile.borland,turboc3 back to makefile.bor,tc3 as in version 1.0.3,
revised borland makefiles; added makefile.ibmvac3 and makefile.gcc (Cosmin)
-version 1.0.6 [March 20, 2000]
+Version 1.0.6 [March 20, 2000]
Minor revisions of makefile.bor, libpng.txt, and gregbook/rpng2-win.c
Added makefile.sggcc (SGI IRIX with gcc)
-version 1.0.6d [April 7, 2000]
+
+Version 1.0.6d [April 7, 2000]
Changed sprintf() to strcpy() in png_write_sCAL_s() to work without STDIO
Added data_length parameter to png_decompress_chunk() function
Revised documentation to remove reference to abandoned png_free_chnk functions
@@ -702,7 +755,8 @@ version 1.0.6d [April 7, 2000]
Renamed makefile.ibmvac3 to makefile.ibmc, added libpng.icc IBM project file
Added a check for info_ptr->free_me&PNG_FREE_TEXT when freeing text in png.c
Simplify png_sig_bytes() function to remove use of non-ISO-C strdup().
-version 1.0.6e [April 9, 2000]
+
+Version 1.0.6e [April 9, 2000]
Added png_data_freer() function.
In the code that checks for over-length tRNS chunks, added check of
info_ptr->num_trans as well as png_ptr->num_trans (Matthias Benckmann)
@@ -713,25 +767,29 @@ version 1.0.6e [April 9, 2000]
is defined.
Changed several instances of PNG_NO_CONSOLE_ID to PNG_NO_STDIO in pngrutil.c
and mentioned the purposes of the two macros in libpng.txt/libpng.3.
-version 1.0.6f [April 14, 2000]
+
+Version 1.0.6f [April 14, 2000]
Revised png_set_iCCP() and png_set_rows() to avoid prematurely freeing data.
Add checks in png_set_text() for NULL members of the input text structure.
Revised libpng.txt/libpng.3.
- Removed superfluous prototype for png_set_itxt from png.h
+ Removed superfluous prototype for png_set_iTXt from png.h
Removed "else" from pngread.c, after png_error(), and changed "0" to "length".
Changed several png_errors about malformed ancillary chunks to png_warnings.
-version 1.0.6g [April 24, 2000]
+
+Version 1.0.6g [April 24, 2000]
Added png_pass-* arrays to pnggccrd.c when PNG_USE_LOCAL_ARRAYS is defined.
Relocated paragraph about png_set_background() in libpng.3/libpng.txt
and other revisions (Matthias Benckmann)
Relocated info_ptr->free_me, png_ptr->free_me, and other info_ptr and
png_ptr members to restore binary compatibility with libpng-1.0.5
(breaks compatibility with libpng-1.0.6).
-version 1.0.6h [April 24, 2000]
+
+Version 1.0.6h [April 24, 2000]
Changed shared library so-number pattern from 2.x.y.z to xy.z (this builds
libpng.so.10 & libpng.so.10.6h instead of libpng.so.2 & libpng.so.2.1.0.6h)
This is a temporary change for test purposes.
-version 1.0.6i [May 2, 2000]
+
+Version 1.0.6i [May 2, 2000]
Rearranged some members at the end of png_info and png_struct, to put
unknown_chunks_num and free_me within the original size of the png_structs
and free_me, png_read_user_fn, and png_free_fn within the original png_info,
@@ -756,11 +814,13 @@ version 1.0.6i [May 2, 2000]
generate a libpng error if the modes aren't set and PNG_LEGACY_SUPPORTED
was not defined.
Added makefile.intel and updated makefile.watcom (Pawel Mrochen)
-version 1.0.6j [May 3, 2000]
+
+Version 1.0.6j [May 3, 2000]
Overloaded png_read_init() and png_write_init() with macros that convert
calls to png_read_init_2() or png_write_init_2() that check the version
and structure sizes.
-version 1.0.7beta11 [May 7, 2000]
+
+Version 1.0.7beta11 [May 7, 2000]
Removed the new PNG_CREATED_READ_STRUCT and PNG_CREATED_WRITE_STRUCT modes
which are no longer used.
Eliminated the three new members of png_text when PNG_LEGACY_SUPPORTED is
@@ -771,7 +831,8 @@ version 1.0.7beta11 [May 7, 2000]
Added PNGAPI macro, and added it to the definitions of all exported functions.
Relocated version macro definitions ahead of the includes of zlib.h and
pngconf.h in png.h.
-version 1.0.7beta12 [May 12, 2000]
+
+Version 1.0.7beta12 [May 12, 2000]
Revised pngset.c to avoid a problem with expanding the png_debug macro.
Deleted some extraneous defines from pngconf.h
Made PNG_NO_CONSOLE_IO the default condition when PNG_BUILD_DLL is defined.
@@ -779,7 +840,8 @@ version 1.0.7beta12 [May 12, 2000]
Added png_access_version_number() function.
Check for mask&PNG_FREE_CHNK (for TEXT, SCAL, PCAL) in png_free_data().
Expanded libpng.3/libpng.txt information about png_data_freer().
-version 1.0.7beta14 [May 17, 2000] (beta13 was not published)
+
+Version 1.0.7beta14 [May 17, 2000] (beta13 was not published)
Changed pnggccrd.c and pngvcrd.c to handle bad adaptive filter types as
warnings instead of errors, as pngrutil.c does.
Set the PNG_INFO_IDAT valid flag in png_set_rows() so png_write_png()
@@ -791,7 +853,8 @@ version 1.0.7beta14 [May 17, 2000] (beta13 was not published)
Removed info_ptr->valid tests from png_free_data(), as in version 1.0.5.
Added png_set_invalid() function.
Fixed incorrect illustrations of png_destroy_write_struct() in example.c.
-version 1.0.7beta15 [May 30, 2000]
+
+Version 1.0.7beta15 [May 30, 2000]
Revised the deliberately erroneous Linux setjmp code in pngconf.h to produce
fewer error messages.
Rearranged checks for Z_OK to check the most likely path first in pngpread.c
@@ -803,9 +866,11 @@ version 1.0.7beta15 [May 30, 2000]
Fixed some bugs in the unused PNG_INCH_CONVERSIONS functions in pngget.c
Set each pointer to NULL after freeing it in png_free_data().
Worked around a problem in pngconf.h; AIX's strings.h defines an "index"
- macro that conflicts with libpng's png_color_16.index. (Dimitri Papadapoulos)
+ macro that conflicts with libpng's png_color_16.index. (Dimitri
+ Papadapoulos)
Added "msvc" directory with MSVC++ project files (Simon-Pierre Cadieux).
-version 1.0.7beta16 [June 4, 2000]
+
+Version 1.0.7beta16 [June 4, 2000]
Revised the workaround of AIX string.h "index" bug.
Added a check for overlength PLTE chunk in pngrutil.c.
Added PNG_NO_POINTER_INDEXING macro to use array-indexing instead of pointer
@@ -815,23 +880,27 @@ version 1.0.7beta16 [June 4, 2000]
Added PNG_USE_DLL macro.
Revised the copyright/disclaimer/license notice.
Added contrib/msvctest directory
-version 1.0.7rc1 [June 9, 2000]
+
+Version 1.0.7rc1 [June 9, 2000]
Corrected the definition of PNG_TRANSFORM_INVERT_ALPHA (0x0400 not 0x0200)
Added contrib/visupng directory (Willem van Schaik)
-version 1.0.7beta18 [June 23, 2000]
+
+Version 1.0.7beta18 [June 23, 2000]
Revised PNGAPI definition, and pngvcrd.c to work with __GCC__
and do not redefine PNGAPI if it is passed in via a compiler directive.
Revised visupng/PngFile.c to remove returns from within the Try block.
Removed leading underscores from "_PNG_H" and "_PNG_SAVE_BSD_SOURCE" macros.
Updated contrib/visupng/cexcept.h to version 1.0.0.
Fixed bugs in pngwrite.c and pngwutil.c that prevented writing iCCP chunks.
-version 1.0.7rc2 [June 28, 2000]
+
+Version 1.0.7rc2 [June 28, 2000]
Updated license to include disclaimers required by UCITA.
Fixed "DJBPP" typo in pnggccrd.c introduced in beta18.
-version 1.0.7 [July 1, 2000]
+Version 1.0.7 [July 1, 2000]
Revised the definition of "trans_values" in libpng.3/libpng.txt
-version 1.0.8beta1 [July 8, 2000]
+
+Version 1.0.8beta1 [July 8, 2000]
Added png_free(png_ptr, key) two places in pngpread.c to stop memory leaks.
Changed PNG_NO_STDIO to PNG_NO_CONSOLE_IO, several places in pngrutil.c and
pngwutil.c.
@@ -839,25 +908,30 @@ version 1.0.8beta1 [July 8, 2000]
Removed unused "#include <assert.h>" from png.c
Added WindowsCE support.
Revised pnggccrd.c to work with gcc-2.95.2 and in the Cygwin environment.
-version 1.0.8beta2 [July 10, 2000]
+
+Version 1.0.8beta2 [July 10, 2000]
Added project files to the wince directory and made further revisions
of pngtest.c, pngrio.c, and pngwio.c in support of WindowsCE.
-version 1.0.8beta3 [July 11, 2000]
+
+Version 1.0.8beta3 [July 11, 2000]
Only set the PNG_FLAG_FREE_TRNS or PNG_FREE_TRNS flag in png_handle_tRNS()
for indexed-color input files to avoid potential double-freeing trans array
under some unusual conditions; problem was introduced in version 1.0.6f.
Further revisions to pngtest.c and files in the wince subdirectory.
-version 1.0.8beta4 [July 14, 2000]
+
+Version 1.0.8beta4 [July 14, 2000]
Added the files pngbar.png and pngbar.jpg to the distribution.
Added makefile.cygwin, and cygwin support in pngconf.h
Added PNG_NO_ZALLOC_ZERO macro (makes png_zalloc skip zeroing memory)
-version 1.0.8rc1 [July 16, 2000]
+
+Version 1.0.8rc1 [July 16, 2000]
Revised png_debug() macros and statements to eliminate compiler warnings.
-version 1.0.8 [July 24, 2000]
+Version 1.0.8 [July 24, 2000]
Added png_flush() in pngwrite.c, after png_write_IEND().
Updated makefile.hpux to build a shared library.
-version 1.0.9beta1 [November 10, 2000]
+
+Version 1.0.9beta1 [November 10, 2000]
Fixed typo in scripts/makefile.hpux
Updated makevms.com in scripts and contrib/* and contrib/* (Martin Zinser)
Fixed seqence-point bug in contrib/pngminus/png2pnm (Martin Zinser)
@@ -876,59 +950,72 @@ version 1.0.9beta1 [November 10, 2000]
Revised makefile.cygwin
Fixed bugs in iCCP support in pngrutil.c and pngwutil.c.
Replaced png_set_empty_plte_permitted() with png_permit_mng_features().
-version 1.0.9beta2 [November 19, 2000]
+
+Version 1.0.9beta2 [November 19, 2000]
Renamed the "dll" subdirectory "projects".
Added borland project files to "projects" subdirectory.
Set VS_FF_PRERELEASE and VS_FF_PATCHED flags in msvc/png.rc when appropriate.
Add error message in png_set_compression_buffer_size() when malloc fails.
-version 1.0.9beta3 [November 23, 2000]
+
+Version 1.0.9beta3 [November 23, 2000]
Revised PNG_LIBPNG_BUILD_TYPE macro in png.h, used in the msvc project.
Removed the png_flush() in pngwrite.c that crashes some applications
that don't set png_output_flush_fn.
Added makefile.macosx and makefile.aix to scripts directory.
-version 1.0.9beta4 [December 1, 2000]
+
+Version 1.0.9beta4 [December 1, 2000]
Change png_chunk_warning to png_warning in png_check_keyword().
Increased the first part of msg buffer from 16 to 18 in png_chunk_error().
-version 1.0.9beta5 [December 15, 2000]
+
+Version 1.0.9beta5 [December 15, 2000]
Added support for filter method 64 (for PNG datastreams embedded in MNG).
-version 1.0.9beta6 [December 18, 2000]
+
+Version 1.0.9beta6 [December 18, 2000]
Revised png_set_filter() to accept filter method 64 when appropriate.
Added new PNG_HAVE_PNG_SIGNATURE bit to png_ptr->mode and use it to
help prevent applications from using MNG features in PNG datastreams.
Added png_permit_mng_features() function.
Revised libpng.3/libpng.txt. Changed "filter type" to "filter method".
-version 1.0.9rc1 [December 23, 2000]
+
+Version 1.0.9rc1 [December 23, 2000]
Revised test for PNG_HAVE_PNG_SIGNATURE in pngrutil.c
Fixed error handling of unknown compression type in png_decompress_chunk().
In pngconf.h, define __cdecl when _MSC_VER is defined.
-version 1.0.9beta7 [December 28, 2000]
+
+Version 1.0.9beta7 [December 28, 2000]
Changed PNG_TEXT_COMPRESSION_zTXt to PNG_COMPRESSION_TYPE_BASE several places.
Revised memory management in png_set_hIST and png_handle_hIST in a backward
compatible manner. PLTE and tRNS were revised similarly.
Revised the iCCP chunk reader to ignore trailing garbage.
-version 1.0.9beta8 [January 12, 2001]
+
+Version 1.0.9beta8 [January 12, 2001]
Moved pngasmrd.h into pngconf.h.
Improved handling of out-of-spec garbage iCCP chunks generated by PhotoShop.
-version 1.0.9beta9 [January 15, 2001]
+
+Version 1.0.9beta9 [January 15, 2001]
Added png_set_invalid, png_permit_mng_features, and png_mmx_supported to
wince and msvc project module definition files.
Minor revision of makefile.cygwin.
Fixed bug with progressive reading of narrow interlaced images in pngpread.c
-version 1.0.9beta10 [January 16, 2001]
+
+Version 1.0.9beta10 [January 16, 2001]
Do not typedef png_FILE_p in pngconf.h when PNG_NO_STDIO is defined.
Fixed "png_mmx_supported" typo in project definition files.
-version 1.0.9beta11 [January 19, 2001]
+
+Version 1.0.9beta11 [January 19, 2001]
Updated makefile.sgi to make shared library.
Removed png_mmx_support() function and disabled PNG_MNG_FEATURES_SUPPORTED
by default, for the benefit of DLL forward compatibility. These will
be re-enabled in version 1.2.0.
-version 1.0.9rc2 [January 22, 2001]
+
+Version 1.0.9rc2 [January 22, 2001]
Revised cygwin support.
-version 1.0.9 [January 31, 2001]
+Version 1.0.9 [January 31, 2001]
Added check of cygwin's ALL_STATIC in pngconf.h
Added "-nommx" parameter to contrib/gregbook/rpng2-win and rpng2-x demos.
-version 1.0.10beta1 [March 14, 2001]
+
+Version 1.0.10beta1 [March 14, 2001]
Revised makefile.dec, makefile.sgi, and makefile.sggcc; added makefile.hpgcc.
Reformatted libpng.3 to eliminate bad line breaks.
Added checks for _mmx_supported in the read_filter_row function of pnggccrd.c
@@ -941,33 +1028,39 @@ version 1.0.10beta1 [March 14, 2001]
Fixed bugs in png_combine_row() in pnggccrd.c and pngvcrd.c (C version)
Added warnings when retrieving or setting gamma=0.
Increased the first part of msg buffer from 16 to 18 in png_chunk_warning().
-version 1.0.10rc1 [March 23, 2001]
+
+Version 1.0.10rc1 [March 23, 2001]
Changed all instances of memcpy, strcpy, and strlen to png_memcpy, png_strcpy,
and png_strlen.
Revised png_mmx_supported() function in pnggccrd.c to return proper value.
Fixed bug in progressive reading (pngpread.c) with small images (height < 8).
-version 1.0.10 [March 30, 2001]
+Version 1.0.10 [March 30, 2001]
Deleted extraneous space (introduced in 1.0.9) from line 42 of makefile.cygwin
Added beos project files (Chris Herborth)
-version 1.0.11beta1 [April 3, 2001]
+
+Version 1.0.11beta1 [April 3, 2001]
Added type casts on several png_malloc() calls (Dimitri Papadapoulos).
Removed a no-longer needed AIX work-around from pngconf.h
Changed several "//" single-line comments to C-style in pnggccrd.c
-version 1.0.11beta2 [April 11, 2001]
+
+Version 1.0.11beta2 [April 11, 2001]
Removed PNGAPI from several functions whose prototypes did not have PNGAPI.
Updated scripts/pngos2.def
-version 1.0.11beta3 [April 14, 2001]
+
+Version 1.0.11beta3 [April 14, 2001]
Added checking the results of many instances of png_malloc() for NULL
-version 1.0.11beta4 [April 20, 2001]
+
+Version 1.0.11beta4 [April 20, 2001]
Undid the changes from version 1.0.11beta3. Added a check for NULL return
from user's malloc_fn().
Removed some useless type casts of the NULL pointer.
Added makefile.netbsd
-version 1.0.11 [April 27, 2001]
+Version 1.0.11 [April 27, 2001]
Revised makefile.netbsd
-version 1.0.12beta1 [May 14, 2001]
+
+Version 1.0.12beta1 [May 14, 2001]
Test for Windows platform in pngconf.h when including malloc.h (Emmanuel Blot)
Updated makefile.cygwin and handling of Cygwin's ALL_STATIC in pngconf.h
Added some never-to-be-executed code in pnggccrd.c to quiet compiler warnings.
@@ -975,21 +1068,25 @@ version 1.0.12beta1 [May 14, 2001]
libpng will reallocate the png_struct and info_struct if they are too small.
This retains future binary compatibility for old applications written for
libpng-0.88 and earlier.
-version 1.2.0beta1 [May 6, 2001]
+
+Version 1.2.0beta1 [May 6, 2001]
Bumped DLLNUM to 2.
Re-enabled PNG_MNG_FEATURES_SUPPORTED and enabled PNG_ASSEMBLER_CODE_SUPPORTED
by default.
Added runtime selection of MMX features.
Added png_set_strip_error_numbers function and related macros.
-version 1.2.0beta2 [May 7, 2001]
+
+Version 1.2.0beta2 [May 7, 2001]
Finished merging 1.2.0beta1 with version 1.0.11
Added a check for attempts to read or write PLTE in grayscale PNG datastreams.
-version 1.2.0beta3 [May 17, 2001]
+
+Version 1.2.0beta3 [May 17, 2001]
Enabled user memory function by default.
Modified png_create_struct so it passes user mem_ptr to user memory allocator.
Increased png_mng_features flag from png_byte to png_uint_32.
Bumped shared-library (so-number) and dll-number to 3.
-version 1.2.0beta4 [June 23, 2001]
+
+Version 1.2.0beta4 [June 23, 2001]
Check for missing profile length field in iCCP chunk and free chunk_data
in case of truncated iCCP chunk.
Bumped shared-library number to 3 in makefile.sgi and makefile.sggcc
@@ -1003,7 +1100,8 @@ version 1.2.0beta4 [June 23, 2001]
of png_write_oFFS width and height from png_uint_32 to png_int_32.
Updated example.c
Revised prototypes for png_debug_malloc and png_debug_free in pngtest.c
-version 1.2.0beta5 [August 8, 2001]
+
+Version 1.2.0beta5 [August 8, 2001]
Revised contrib/gregbook
Revised makefile.gcmmx
Revised pnggccrd.c to conditionally compile some thread-unsafe code only
@@ -1014,27 +1112,32 @@ version 1.2.0beta5 [August 8, 2001]
Replaced calls to fprintf(stderr,...) with png_warning() in pnggccrd.c
Removed restriction that do_invert_mono only operate on 1-bit opaque files
-version 1.2.0 [September 1, 2001]
+Version 1.2.0 [September 1, 2001]
Changed a png_warning() to png_debug() in pnggccrd.c
Fixed contrib/gregbook/rpng-x.c, rpng2-x.c to avoid crash with XFreeGC().
-version 1.2.1beta1 [October 19, 2001]
+
+Version 1.2.1beta1 [October 19, 2001]
Revised makefile.std in contrib/pngminus
Include background_1 in png_struct regardless of gamma support.
Revised makefile.netbsd and makefile.macosx, added makefile.darwin.
Revised example.c to provide more details about using row_callback().
-version 1.2.1beta2 [October 25, 2001]
+
+Version 1.2.1beta2 [October 25, 2001]
Added type cast to each NULL appearing in a function call, except for
WINCE functions.
Added makefile.so9.
-version 1.2.1beta3 [October 27, 2001]
+
+Version 1.2.1beta3 [October 27, 2001]
Removed type casts from all NULLs.
Simplified png_create_struct_2().
-version 1.2.1beta4 [November 7, 2001]
+
+Version 1.2.1beta4 [November 7, 2001]
Revised png_create_info_struct() and png_creat_struct_2().
Added error message if png_write_info() was omitted.
Type cast NULLs appearing in function calls when _NO_PROTO or
PNG_TYPECAST_NULL is defined.
-version 1.2.1rc1 [November 24, 2001]
+
+Version 1.2.1rc1 [November 24, 2001]
Type cast NULLs appearing in function calls except when PNG_NO_TYPECAST_NULL
is defined.
Changed typecast of "size" argument to png_size_t in pngmem.c calls to
@@ -1043,14 +1146,16 @@ version 1.2.1rc1 [November 24, 2001]
Updated makefile.sgi to recognize LIBPATH and INCPATH.
Updated various makefiles so "make clean" does not remove previous major
version of the shared library.
-version 1.2.1rc2 [December 4, 2001]
+
+Version 1.2.1rc2 [December 4, 2001]
Always allocate 256-entry internal palette, hist, and trans arrays, to
avoid out-of-bounds memory reference caused by invalid PNG datastreams.
Added a check for prefix_length > data_length in iCCP chunk handler.
-version 1.2.1 [December 7, 2001]
+Version 1.2.1 [December 7, 2001]
None.
-version 1.2.2beta1 [February 22, 2002]
+
+Version 1.2.2beta1 [February 22, 2002]
Fixed a bug with reading the length of iCCP profiles (Larry Reeves).
Revised makefile.linux, makefile.gcmmx, and makefile.sgi to generate
libpng.a, libpng12.so (not libpng.so.3), and libpng12/png.h
@@ -1060,13 +1165,15 @@ version 1.2.2beta1 [February 22, 2002]
Revised calls to png_create_read_struct() and png_create_write_struct()
for simpler debugging.
Revised png_zalloc() so zlib handles errors (uses PNG_FLAG_MALLOC_NULL_MEM_OK)
-version 1.2.2beta2 [February 23, 2002]
+
+Version 1.2.2beta2 [February 23, 2002]
Check chunk_length and idat_size for invalid (over PNG_MAX_UINT) lengths.
Check for invalid image dimensions in png_get_IHDR.
Added missing "fi;" in the install target of the SGI makefiles.
Added install-static to all makefiles that make shared libraries.
Always do gamma compensation when image is partially transparent.
-version 1.2.2beta3 [March 7, 2002]
+
+Version 1.2.2beta3 [March 7, 2002]
Compute background.gray and background_1.gray even when color_type is RGB
in case image gets reduced to gray later.
Modified shared-library makefiles to install pkgconfig/libpngNN.pc.
@@ -1076,12 +1183,14 @@ version 1.2.2beta3 [March 7, 2002]
Added install-shared target to all makefiles that make shared libraries.
Stopped a double free of palette, hist, and trans when not using free_me.
Added makefile.32sunu for Sun Ultra 32 and makefile.64sunu for Sun Ultra 64.
-version 1.2.2beta4 [March 8, 2002]
+
+Version 1.2.2beta4 [March 8, 2002]
Compute background.gray and background_1.gray even when color_type is RGB
in case image gets reduced to gray later (Jason Summers).
Relocated a misplaced /bin/rm in the "install-shared" makefile targets
Added PNG_1_0_X macro which can be used to build a 1.0.x-compatible library.
-version 1.2.2beta5 [March 26, 2002]
+
+Version 1.2.2beta5 [March 26, 2002]
Added missing PNGAPI to several function definitions.
Check for invalid bit_depth or color_type in png_get_IHDR(), and
check for missing PLTE or IHDR in png_push_read_chunk() (Matthias Clasen).
@@ -1090,33 +1199,45 @@ version 1.2.2beta5 [March 26, 2002]
Changed "()" to "{}" in scripts/libpng.pc.in.
Revised makefiles to put png.h and pngconf.h only in $prefix/include/libpngNN
Revised makefiles to make symlink to libpng.so.NN in addition to libpngNN.so
-version 1.2.2beta6 [March 31, 2002]
-version 1.0.13beta1 [March 31, 2002]
+
+Version 1.2.2beta6 [March 31, 2002]
+
+Version 1.0.13beta1 [March 31, 2002]
Prevent png_zalloc() from trying to memset memory that it failed to acquire.
Add typecasts of PNG_MAX_UINT in pngset_cHRM_fixed() (Matt Holgate).
Ensure that the right function (user or default) is used to free the
png_struct after an error in png_create_read_struct_2().
-version 1.2.2rc1 [April 7, 2002]
-version 1.0.13rc1 [April 7, 2002]
+
+Version 1.2.2rc1 [April 7, 2002]
+
+Version 1.0.13rc1 [April 7, 2002]
Save the ebx register in pnggccrd.c (Sami Farin)
Add "mem_ptr = png_ptr->mem_ptr" in png_destroy_write_struct() (Paul Gardner).
Updated makefiles to put headers in include/libpng and remove old include/*.h.
-version 1.2.2 [April 15, 2002]
-version 1.0.13 [April 15, 2002]
+Version 1.2.2 [April 15, 2002]
+
+Version 1.0.13 [April 15, 2002]
Revised description of png_set_filter() in libpng.3/libpng.txt.
Revised makefile.netbsd and added makefile.neNNbsd and makefile.freebsd
-version 1.0.13patch01 [April 17, 2002]
-version 1.2.2patch01 [April 17, 2002]
- Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and makefile.sggcc
- Fixed VER -> PNGVER typo in makefile.macosx and added install-static to install
+
+Version 1.0.13patch01 [April 17, 2002]
+
+Version 1.2.2patch01 [April 17, 2002]
+ Changed ${PNGMAJ}.${PNGVER} bug to ${PNGVER} in makefile.sgi and
+ makefile.sggcc
+ Fixed VER -> PNGVER typo in makefile.macosx and added install-static to
+ install
Added install: target to makefile.32sunu and makefile.64sunu
-version 1.0.13patch03 [April 18, 2002]
-version 1.2.2patch03 [April 18, 2002]
+
+Version 1.0.13patch03 [April 18, 2002]
+
+Version 1.2.2patch03 [April 18, 2002]
Revised 15 makefiles to link libpng.a to libpngNN.a and the include libpng
subdirectory to libpngNN subdirectory without the full pathname.
Moved generation of libpng.pc from "install" to "all" in 15 makefiles.
-version 1.2.3rc1 [April 28, 2002]
+
+Version 1.2.3rc1 [April 28, 2002]
Added install-man target to 15 makefiles (Dimitri Papadopolous-Orfanos).
Added $(DESTDIR) feature to 24 makefiles (Tim Mooney)
Fixed bug with $prefix, should be $(prefix) in makefile.hpux.
@@ -1128,70 +1249,83 @@ version 1.2.3rc1 [April 28, 2002]
to put one in their application.
Restored png_zalloc() and png_zfree() prototypes to version 1.2.1 and
removed them from module definition files.
-version 1.2.3rc2 [May 1, 2002]
+
+Version 1.2.3rc2 [May 1, 2002]
Fixed bug in reporting number of channels in pngget.c and pngset.c,
that was introduced in version 1.2.2beta5.
Exported png_zalloc(), png_zfree(), png_default_read(), png_default_write(),
png_default_flush(), and png_push_fill_buffer() and included them in
module definition files.
Added "libpng.pc" dependency to the "install-shared" target in 15 makefiles.
-version 1.2.3rc3 [May 1, 2002]
+
+Version 1.2.3rc3 [May 1, 2002]
Revised prototype for png_default_flush()
Remove old libpng.pc and libpngNN.pc before installing new ones.
-version 1.2.3rc4 [May 2, 2002]
+
+Version 1.2.3rc4 [May 2, 2002]
Typos in *.def files (png_default_read|write -> png_default_read|write_data)
In makefiles, changed rm libpng.NN.pc to rm libpngNN.pc
- Added libpng-config and libpngNN-config and modified makefiles to install them.
+ Added libpng-config and libpngNN-config and modified makefiles to install
+ them.
Changed $(MANPATH) to $(DESTDIR)$(MANPATH) in makefiles
Added "Win32 DLL VB" configuration to projects/msvc/libpng.dsp
-version 1.2.3rc5 [May 11, 2002]
+
+Version 1.2.3rc5 [May 11, 2002]
Changed "error" and "message" in prototypes to "error_message" and
"warning_message" to avoid namespace conflict.
Revised 15 makefiles to build libpng-config from libpng-config-*.in
Once more restored png_zalloc and png_zfree to regular nonexported form.
Restored png_default_read|write_data, png_default_flush, png_read_fill_buffer
- to nonexported form, but with PNGAPI, and removed them from module def files.
-version 1.2.3rc6 [May 14, 2002]
+ to nonexported form, but with PNGAPI, and removed them from module def
+ files.
+
+Version 1.2.3rc6 [May 14, 2002]
Removed "PNGAPI" from png_zalloc() and png_zfree() in png.c
Changed "Gz" to "Gd" in projects/msvc/libpng.dsp and zlib.dsp.
Removed leftover libpng-config "sed" script from four makefiles.
Revised libpng-config creating script in 16 makefiles.
-version 1.2.3 [May 22, 2002]
+Version 1.2.3 [May 22, 2002]
Revised libpng-config target in makefile.cygwin.
Removed description of png_set_mem_fn() from documentation.
Revised makefile.freebsd.
Minor cosmetic changes to 15 makefiles, e.g., $(DI) = $(DESTDIR)/$(INCDIR).
Revised projects/msvc/README.txt
Changed -lpng to -lpngNN in LDFLAGS in several makefiles.
-version 1.2.4beta1 [May 24, 2002]
+
+Version 1.2.4beta1 [May 24, 2002]
Added libpng.pc and libpng-config to "all:" target in 16 makefiles.
Fixed bug in 16 makefiles: $(DESTDIR)/$(LIBPATH) to $(DESTDIR)$(LIBPATH)
Added missing "\" before closing double quote in makefile.gcmmx.
Plugged various memory leaks; added png_malloc_warn() and png_set_text_2()
functions.
-version 1.2.4beta2 [June 25, 2002]
+
+Version 1.2.4beta2 [June 25, 2002]
Plugged memory leak of png_ptr->current_text (Matt Holgate).
Check for buffer overflow before reading CRC in pngpread.c (Warwick Allison)
Added -soname to the loader flags in makefile.dec, makefile.sgi, and
makefile.sggcc.
Added "test-installed" target to makefile.linux, makefile.gcmmx,
makefile.sgi, and makefile.sggcc.
-version 1.2.4beta3 [June 28, 2002]
+
+Version 1.2.4beta3 [June 28, 2002]
Plugged memory leak of row_buf in pngtest.c when there is a png_error().
Detect buffer overflow in pngpread.c when IDAT is corrupted with extra data.
Added "test-installed" target to makefile.32sunu, makefile.64sunu,
makefile.beos, makefile.darwin, makefile.dec, makefile.macosx,
makefile.solaris, makefile.hpux, makefile.hpgcc, and makefile.so9.
-version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002]
+
+Version 1.2.4rc1 and 1.0.14rc1 [July 2, 2002]
Added "test-installed" target to makefile.cygwin and makefile.sco.
Revised pnggccrd.c to be able to back out version 1.0.x via PNG_1_0_X macro.
-version 1.2.4 and 1.0.14 [July 8, 2002]
+Version 1.2.4 and 1.0.14 [July 8, 2002]
Changed png_warning() to png_error() when width is too large to process.
-version 1.2.4patch01 [July 20, 2002]
+
+Version 1.2.4patch01 [July 20, 2002]
Revised makefile.cygwin to use DLL number 12 instead of 13.
-version 1.2.5beta1 [August 6, 2002]
+
+Version 1.2.5beta1 [August 6, 2002]
Added code to contrib/gregbook/readpng2.c to ignore unused chunks.
Replaced toucan.png in contrib/gregbook (it has been corrupt since 1.0.11)
Removed some stray *.o files from contrib/gregbook.
@@ -1200,36 +1334,43 @@ version 1.2.5beta1 [August 6, 2002]
Prevent png_ptr->pass from exceeding 7 in png_push_finish_row().
Updated makefile.hpgcc
Updated png.c and pnggccrd.c handling of return from png_mmx_support()
-version 1.2.5beta2 [August 15, 2002]
+
+Version 1.2.5beta2 [August 15, 2002]
Only issue png_warning() about "Too much data" in pngpread.c when avail_in
is nonzero.
Updated makefiles to install a separate libpng.so.3 with its own rpath.
-version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002]
+
+Version 1.2.5rc1 and 1.0.15rc1 [August 24, 2002]
Revised makefiles to not remove previous minor versions of shared libraries.
-version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002]
+
+Version 1.2.5rc2 and 1.0.15rc2 [September 16, 2002]
Revised 13 makefiles to remove "-lz" and "-L$(ZLIBLIB)", etc., from shared
library loader directive.
Added missing "$OBJSDLL" line to makefile.gcmmx.
Added missing "; fi" to makefile.32sunu.
-version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002]
+
+Version 1.2.5rc3 and 1.0.15rc3 [September 18, 2002]
Revised libpng-config script.
-version 1.2.5 and 1.0.15 [October 3, 2002]
+Version 1.2.5 and 1.0.15 [October 3, 2002]
Revised makefile.macosx, makefile.darwin, makefile.hpgcc, and makefile.hpux,
and makefile.aix.
Relocated two misplaced PNGAPI lines in pngtest.c
-version 1.2.6beta1 [October 22, 2002]
+
+Version 1.2.6beta1 [October 22, 2002]
Commented out warning about uninitialized mmx_support in pnggccrd.c.
Changed "IBMCPP__" flag to "__IBMCPP__" in pngconf.h.
Relocated two more misplaced PNGAPI lines in pngtest.c
Fixed memory overrun bug in png_do_read_filler() with 16-bit datastreams,
introduced in version 1.0.2.
Revised makefile.macosx, makefile.dec, makefile.aix, and makefile.32sunu.
-version 1.2.6beta2 [November 1, 2002]
+
+Version 1.2.6beta2 [November 1, 2002]
Added libpng-config "--ldopts" output.
Added "AR=ar" and "ARFLAGS=rc" and changed "ar rc" to "$(AR) $(ARFLAGS)"
in makefiles.
-version 1.2.6beta3 [July 18, 2004]
+
+Version 1.2.6beta3 [July 18, 2004]
Reverted makefile changes from version 1.2.6beta2 and some of the changes
from version 1.2.6beta1; these will be postponed until version 1.2.7.
Version 1.2.6 is going to be a simple bugfix release.
@@ -1282,7 +1423,8 @@ version 1.2.6beta3 [July 18, 2004]
Updated contrib/visupng/VisualPng.dsp (Cosmin).
Updated contrib/visupng/cexcept.h to version 2.0.0 (Cosmin).
Added a separate distribution with "configure" and supporting files (Junichi).
-version 1.2.6beta4 [July 28, 2004]
+
+Version 1.2.6beta4 [July 28, 2004]
Added user ability to change png_size_t via a PNG_SIZE_T macro.
Added png_sizeof() and png_convert_size() functions.
Added PNG_SIZE_MAX (maximum value of a png_size_t variable.
@@ -1304,7 +1446,8 @@ version 1.2.6beta4 [July 28, 2004]
Added some "#if PNG_WRITE_SUPPORTED" blocks.
Added #ifdef to remove some redundancy in png_malloc_default().
Use png_malloc instead of png_zalloc to allocate the pallete.
-version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004]
+
+Version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004]
Fixed buffer overflow vulnerability in png_handle_tRNS()
Fixed integer arithmetic overflow vulnerability in png_read_png().
Fixed some harmless bugs in png_handle_sBIT, etc, that would cause
@@ -1319,7 +1462,8 @@ version 1.0.16rc1 and 1.2.6rc1 [August 4, 2004]
Fixed wrong cast of returns from png_get_user_width|height_max().
Changed some "keep the compiler happy" from empty statements to returns,
Revised libpng.txt to remove 1.2.x stuff from the 1.0.x distribution
-version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004]
+
+Version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004]
Revised makefile.darwin and makefile.solaris. Removed makefile.macosx.
Revised pngtest's png_debug_malloc() to use png_malloc() instead of
png_malloc_default() which is not supposed to be exported.
@@ -1333,91 +1477,106 @@ version 1.0.16rc2 and 1.2.6rc2 [August 7, 2004]
Changed "HANDLE_CHUNK_*" to "PNG_HANDLE_CHUNK_*" (Cosmin)
Added "-@/bin/rm -f $(DL)/$(LIBNAME).so.$(PNGMAJ)" to 15 *NIX makefiles.
Added code to update the row_info->colortype in png_do_read_filler() (MSB).
-version 1.0.16rc3 and 1.2.6rc3 [August 9, 2004]
+
+Version 1.0.16rc3 and 1.2.6rc3 [August 9, 2004]
Eliminated use of "abs()" in testing cHRM and gAMA values, to avoid
trouble with some 64-bit compilers. Created PNG_OUT_OF_RANGE() macro.
Revised documentation of png_set_keep_unknown_chunks().
Check handle_as_unknown status in pngpread.c, as in pngread.c previously.
Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_INTERNAL section of png.h
Added "rim" definitions for CONST4 and CONST6 in pnggccrd.c
-version 1.0.16rc4 and 1.2.6rc4 [August 10, 2004]
+
+Version 1.0.16rc4 and 1.2.6rc4 [August 10, 2004]
Fixed mistake in pngtest.c introduced in 1.2.6rc2 (declaration of
"pinfo" was out of place).
-version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004]
+
+Version 1.0.16rc5 and 1.2.6rc5 [August 10, 2004]
Moved "PNG_HANDLE_CHUNK_*" macros out of PNG_ASSEMBLER_CODE_SUPPORTED
section of png.h where they were inadvertently placed in version rc3.
-version 1.2.6 and 1.0.16 [August 15, 2004]
+Version 1.2.6 and 1.0.16 [August 15, 2004]
Revised pngtest so memory allocation testing is only done when PNG_DEBUG==1.
-version 1.2.7beta1 [August 26, 2004]
+
+Version 1.2.7beta1 [August 26, 2004]
Removed unused pngasmrd.h file.
Removed references to uu.net for archived files. Added references to
PNG Spec (second edition) and the PNG ISO/IEC Standard.
Added "test-dd" target in 15 makefiles, to run pngtest in DESTDIR.
Fixed bug with "optimized window size" in the IDAT datastream, that
causes libpng to write PNG files with incorrect zlib header bytes.
-version 1.2.7beta2 [August 28, 2004]
+
+Version 1.2.7beta2 [August 28, 2004]
Fixed bug with sCAL chunk and big-endian machines (David Munro).
Undid new code added in 1.2.6rc2 to update the color_type in
png_set_filler().
Added png_set_add_alpha() that updates color type.
-version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004]
+
+Version 1.0.17rc1 and 1.2.7rc1 [September 4, 2004]
Revised png_set_strip_filler() to not remove alpha if color_type has alpha.
-version 1.2.7 and 1.0.17 [September 12, 2004]
+Version 1.2.7 and 1.0.17 [September 12, 2004]
Added makefile.hp64
Changed projects/msvc/png32ms.def to scripts/png32ms.def in makefile.cygwin
-version 1.2.8beta1 [November 1, 2004]
+
+Version 1.2.8beta1 [November 1, 2004]
Fixed bug in png_text_compress() that would fail to complete a large block.
Fixed bug, introduced in libpng-1.2.7, that overruns a buffer during
strip alpha operation in png_do_strip_filler().
Added PNG_1_2_X definition in pngconf.h
Use #ifdef to comment out png_info_init in png.c and png_read_init in
pngread.c (as of 1.3.0)
-version 1.2.8beta2 [November 2, 2004]
+
+Version 1.2.8beta2 [November 2, 2004]
Reduce color_type to a nonalpha type after strip alpha operation in
png_do_strip_filler().
-version 1.2.8beta3 [November 3, 2004]
+
+Version 1.2.8beta3 [November 3, 2004]
Revised definitions of PNG_MAX_UINT_32, PNG_MAX_SIZE, and PNG_MAXSUM
-version 1.2.8beta4 [November 12, 2004]
+
+Version 1.2.8beta4 [November 12, 2004]
Fixed (again) definition of PNG_LIBPNG_VER_DLLNUM in png.h (Cosmin).
Added PNG_LIBPNG_BUILD_PRIVATE in png.h (Cosmin).
Set png_ptr->zstream.data_type to Z_BINARY, to avoid unnecessary detection
of data type in deflate (Cosmin).
Deprecated but continue to support SPECIALBUILD and PRIVATEBUILD in favor of
PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING.
-version 1.2.8beta5 [November 20, 2004]
+
+Version 1.2.8beta5 [November 20, 2004]
Use png_ptr->flags instead of png_ptr->transformations to pass
PNG_STRIP_ALPHA info to png_do_strip_filler(), to preserve ABI
compatibility.
Revised handling of SPECIALBUILD, PRIVATEBUILD,
PNG_LIBPNG_BUILD_SPECIAL_STRING and PNG_LIBPNG_BUILD_PRIVATE_STRING.
-version 1.2.8rc1 [November 24, 2004]
+
+Version 1.2.8rc1 [November 24, 2004]
Moved handling of BUILD macros from pngconf.h to png.h
Added definition of PNG_LIBPNG_BASE_TYPE in png.h, inadvertently
omitted from beta5.
Revised scripts/pngw32.rc
Despammed mailing addresses by masking "@" with "at".
Inadvertently installed a supposedly faster test version of pngrutil.c
-version 1.2.8rc2 [November 26, 2004]
+
+Version 1.2.8rc2 [November 26, 2004]
Added two missing "\" in png.h
Change tests in pngread.c and pngpread.c to
if (png_ptr->transformations || (png_ptr->flags&PNG_FLAG_STRIP_ALPHA))
png_do_read_transformations(png_ptr);
-version 1.2.8rc3 [November 28, 2004]
+
+Version 1.2.8rc3 [November 28, 2004]
Reverted pngrutil.c to version libpng-1.2.8beta5.
Added scripts/makefile.elf with supporting code in pngconf.h for symbol
versioning (John Bowler).
-version 1.2.8rc4 [November 29, 2004]
+
+Version 1.2.8rc4 [November 29, 2004]
Added projects/visualc7 (Simon-pierre).
-version 1.2.8rc5 [November 29, 2004]
+
+Version 1.2.8rc5 [November 29, 2004]
Fixed new typo in scripts/pngw32.rc
-version 1.2.8 [December 3, 2004]
+Version 1.2.8 [December 3, 2004]
Removed projects/visualc7, added projects/visualc71.
-version 1.2.9beta1 [February 21, 2006]
-
+Version 1.2.9beta1 [February 21, 2006]
Initialized some structure members in pngwutil.c to avoid gcc-4.0.0 complaints
Revised man page and libpng.txt to make it clear that one should not call
png_read_end or png_write_end after png_read_png or png_write_png.
@@ -1439,8 +1598,7 @@ version 1.2.9beta1 [February 21, 2006]
Fixed scripts/makefile.cygwin (Christian Biesinger, Cosmin).
Default iTXt support was inadvertently enabled.
-version 1.2.9beta2 [February 21, 2006]
-
+Version 1.2.9beta2 [February 21, 2006]
Check for png_rgb_to_gray and png_gray_to_rgb read transformations before
checking for png_read_dither in pngrtran.c
Revised checking of chromaticity limits to accommodate extended RGB
@@ -1453,8 +1611,7 @@ version 1.2.9beta2 [February 21, 2006]
Eliminated distributions without the "configure" script.
Updated INSTALL instructions.
-version 1.2.9beta3 [February 24, 2006]
-
+Version 1.2.9beta3 [February 24, 2006]
Fixed CRCRLF line endings in contrib/visupng/VisualPng.dsp
Made libpng.pc respect EXEC_PREFIX (D. P. Kreil, J. Bowler)
Removed reference to pngasmrd.h from Makefile.am
@@ -1463,8 +1620,7 @@ version 1.2.9beta3 [February 24, 2006]
Renamed ANNOUNCE to NEWS.
Created AUTHORS file.
-version 1.2.9beta4 [March 3, 2006]
-
+Version 1.2.9beta4 [March 3, 2006]
Changed definition of PKGCONFIG from $prefix/lib to $libdir in configure.ac
Reverted to filenames LICENSE and ANNOUNCE; removed AUTHORS and COPYING.
Removed newline from the end of some error and warning messages.
@@ -1475,17 +1631,17 @@ version 1.2.9beta4 [March 3, 2006]
Added "OS2" to list of systems that don't need underscores, in pnggccrd.c
Removed libpng version and date from *.c files.
-version 1.2.9beta5 [March 4, 2006]
+Version 1.2.9beta5 [March 4, 2006]
Removed trailing blanks from source files.
Put version and date of latest change in each source file, and changed
copyright year accordingly.
- More cleanup of configure.ac, Makefile.ac, and associated scripts.
+ More cleanup of configure.ac, Makefile.am, and associated scripts.
Restored scripts/makefile.elf which was inadvertently deleted.
-version 1.2.9beta6 [March 6, 2006]
+Version 1.2.9beta6 [March 6, 2006]
Fixed typo (RELEASE) in configuration files.
-version 1.2.9beta7 [March 7, 2006]
+Version 1.2.9beta7 [March 7, 2006]
Removed libpng.vers and libpng.sym from libpng12_la_SOURCES in Makefile.am
Fixed inconsistent #ifdef's around png_sig_bytes() and png_set_sCAL_s()
in png.h.
@@ -1493,7 +1649,7 @@ version 1.2.9beta7 [March 7, 2006]
Made cosmetic changes to some makefiles, adding LN_SF and other macros.
Made some makefiles accept "exec_prefix".
-version 1.2.9beta8 [March 9, 2006]
+Version 1.2.9beta8 [March 9, 2006]
Fixed some "#if defined (..." which should be "#if defined(..."
Bug introduced in libpng-1.2.8.
Fixed inconsistency in definition of png_default_read_data()
@@ -1504,82 +1660,82 @@ version 1.2.9beta8 [March 9, 2006]
Added png_set_expand_gray_1_2_4_to_8() and deprecated
png_set_gray_1_2_4_to_8() which also expands tRNS to alpha.
-version 1.2.9beta9 [March 10, 2006]
+Version 1.2.9beta9 [March 10, 2006]
Include "config.h" in pngconf.h when available.
Added some checks for NULL png_ptr or NULL info_ptr (timeless)
-version 1.2.9beta10 [March 20, 2006]
+Version 1.2.9beta10 [March 20, 2006]
Removed extra CR from contrib/visualpng/VisualPng.dsw (Cosmin)
Made pnggccrd.c PIC-compliant (Christian Aichinger).
Added makefile.mingw (Wolfgang Glas).
Revised pngconf.h MMX checking.
-version 1.2.9beta11 [March 22, 2006]
+Version 1.2.9beta11 [March 22, 2006]
Fixed out-of-order declaration in pngwrite.c that was introduced in beta9
Simplified some makefiles by using LIBSO, LIBSOMAJ, and LIBSOVER macros.
-version 1.2.9rc1 [March 31, 2006]
+Version 1.2.9rc1 [March 31, 2006]
Defined PNG_USER_PRIVATEBUILD when including "pngusr.h" (Cosmin).
Removed nonsensical assertion check from pngtest.c (Cosmin).
-version 1.2.9 [April 14, 2006]
+Version 1.2.9 [April 14, 2006]
Revised makefile.beos and added "none" selector in ltmain.sh
-version 1.2.10beta1 [April 15, 2006]
+Version 1.2.10beta1 [April 15, 2006]
Renamed "config.h" to "png_conf.h" and revised Makefile.am to add
-DPNG_BUILDING_LIBPNG to compile directive, and modified pngconf.h
to include png_conf.h only when PNG_BUILDING_LIBPNG is defined.
-version 1.2.10beta2 [April 15, 2006]
+Version 1.2.10beta2 [April 15, 2006]
Manually updated Makefile.in and configure. Changed png_conf.h.in
back to config.h.
-version 1.2.10beta3 [April 15, 2006]
+Version 1.2.10beta3 [April 15, 2006]
Change png_conf.h back to config.h in pngconf.h.
-version 1.2.10beta4 [April 16, 2006]
+Version 1.2.10beta4 [April 16, 2006]
Change PNG_BUILDING_LIBPNG to PNG_CONFIGURE_LIBPNG in config/Makefile*.
-version 1.2.10beta5 [April 16, 2006]
+Version 1.2.10beta5 [April 16, 2006]
Added a configure check for compiling assembler code in pnggccrd.c
-version 1.2.10beta6 [April 17, 2006]
+Version 1.2.10beta6 [April 17, 2006]
Revised the configure check for pnggccrd.c
Moved -DPNG_CONFIGURE_LIBPNG into @LIBPNG_DEFINES@
Added @LIBPNG_DEFINES@ to arguments when building libpng.sym
-version 1.2.10beta7 [April 18, 2006]
+Version 1.2.10beta7 [April 18, 2006]
Change "exec_prefix=$prefix" to "exec_prefix=$(prefix)" in makefiles.
-version 1.2.10rc1 [April 19, 2006]
+Version 1.2.10rc1 [April 19, 2006]
Ensure pngconf.h doesn't define both PNG_USE_PNGGCCRD and PNG_USE_PNGVCRD
Fixed "LN_FS" typo in makefile.sco and makefile.solaris.
-version 1.2.10rc2 [April 20, 2006]
+Version 1.2.10rc2 [April 20, 2006]
Added a backslash between -DPNG_CONFIGURE_LIBPNG and -DPNG_NO_ASSEMBLER_CODE
in configure.ac and configure
Made the configure warning about versioned symbols less arrogant.
-version 1.2.10rc3 [April 21, 2006]
+Version 1.2.10rc3 [April 21, 2006]
Added a note in libpng.txt that png_set_sig_bytes(8) can be used when
writing an embedded PNG without the 8-byte signature.
Revised makefiles and configure to avoid making links to libpng.so.*
-version 1.2.10 [April 23, 2006]
+Version 1.2.10 [April 23, 2006]
Reverted configure to "rc2" state.
-version 1.2.11beta1 [May 31, 2006]
+Version 1.2.11beta1 [May 31, 2006]
scripts/libpng.pc.in contained "configure" style version info and would
not work with makefiles.
The shared-library makefiles were linking to libpng.so.0 instead of
libpng.so.3 compatibility as the library.
-version 1.2.11beta2 [June 2, 2006]
+Version 1.2.11beta2 [June 2, 2006]
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
buffer overflow.
Fixed bug in example.c (png_set_palette_rgb -> png_set_palette_to_rgb)
-version 1.2.11beta3 [June 5, 2006]
+Version 1.2.11beta3 [June 5, 2006]
Prepended "#! /bin/sh" to ltmail.sh and contrib/pngminus/*.sh (Cosmin).
Removed the accidental leftover Makefile.in~ (Cosmin).
Avoided potential buffer overflow and optimized buffer in
@@ -1587,116 +1743,116 @@ version 1.2.11beta3 [June 5, 2006]
Removed the include directories and libraries from CFLAGS and LDFLAGS
in scripts/makefile.gcc (Nelson A. de Oliveira, Cosmin).
-version 1.2.11beta4 [June 6, 2006]
+Version 1.2.11beta4 [June 6, 2006]
Allow zero-length IDAT chunks after the entire zlib datastream, but not
after another intervening chunk type.
-version 1.0.19rc1, 1.2.11rc1 [June 13, 2006]
+Version 1.0.19rc1, 1.2.11rc1 [June 13, 2006]
Deleted extraneous square brackets from [config.h] in configure.ac
-version 1.0.19rc2, 1.2.11rc2 [June 14, 2006]
+Version 1.0.19rc2, 1.2.11rc2 [June 14, 2006]
Added prototypes for PNG_INCH_CONVERSIONS functions to png.h
Revised INSTALL and autogen.sh
Fixed typo in several makefiles (-W1 should be -Wl)
Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
-version 1.0.19rc3, 1.2.11rc3 [June 15, 2006]
+Version 1.0.19rc3, 1.2.11rc3 [June 15, 2006]
Removed the new typedefs for 64-bit systems (delay until version 1.4.0)
Added one zero element to png_gamma_shift[] array in pngrtran.c to avoid
reading out of bounds.
-version 1.0.19rc4, 1.2.11rc4 [June 15, 2006]
+Version 1.0.19rc4, 1.2.11rc4 [June 15, 2006]
Really removed the new typedefs for 64-bit systems.
-version 1.0.19rc5, 1.2.11rc5 [June 22, 2006]
+Version 1.0.19rc5, 1.2.11rc5 [June 22, 2006]
Removed png_sig_bytes entry from scripts/pngw32.def
-version 1.0.19, 1.2.11 [June 26, 2006]
+Version 1.0.19, 1.2.11 [June 26, 2006]
None.
-version 1.0.20, 1.2.12 [June 27, 2006]
+Version 1.0.20, 1.2.12 [June 27, 2006]
Really increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
buffer overflow.
-version 1.2.13beta1 [October 2, 2006]
+Version 1.2.13beta1 [October 2, 2006]
Removed AC_FUNC_MALLOC from configure.ac
Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h
Change "logical" to "bitwise" throughout documentation.
Detect and fix attempt to write wrong iCCP profile length.
-version 1.0.21, 1.2.13 [November 14, 2006]
+Version 1.0.21, 1.2.13 [November 14, 2006]
Fix potential buffer overflow in sPLT chunk handler.
Fix Makefile.am to not try to link to noexistent files.
Check all exported functions for NULL png_ptr.
-version 1.2.14beta1 [November 17, 2006]
+Version 1.2.14beta1 [November 17, 2006]
Relocated three misplaced tests for NULL png_ptr.
Built Makefile.in with automake-1.9.6 instead of 1.9.2.
Build configure with autoconf-2.60 instead of 2.59
-version 1.2.14beta2 [November 17, 2006]
+Version 1.2.14beta2 [November 17, 2006]
Added some typecasts in png_zalloc().
-version 1.2.14rc1 [November 20, 2006]
+Version 1.2.14rc1 [November 20, 2006]
Changed "strtod" to "png_strtod" in pngrutil.c
-version 1.0.22, 1.2.14 [November 27, 2006]
+Version 1.0.22, 1.2.14 [November 27, 2006]
Added missing "$(srcdir)" in Makefile.am and Makefile.in
-version 1.2.15beta1 [December 3, 2006]
+Version 1.2.15beta1 [December 3, 2006]
Generated configure with autoconf-2.61 instead of 2.60
Revised configure.ac to update libpng.pc and libpng-config.
-version 1.2.15beta2 [December 3, 2006]
+Version 1.2.15beta2 [December 3, 2006]
Always export MMX asm functions, just stubs if not building pnggccrd.c
-version 1.2.15beta3 [December 4, 2006]
+Version 1.2.15beta3 [December 4, 2006]
Add "png_bytep" typecast to profile while calculating length in pngwutil.c
-version 1.2.15beta4 [December 7, 2006]
+Version 1.2.15beta4 [December 7, 2006]
Added scripts/CMakeLists.txt
Changed PNG_NO_ASSEMBLER_CODE to PNG_NO_MMX_CODE in scripts, like 1.4.0beta
-version 1.2.15beta5 [December 7, 2006]
+Version 1.2.15beta5 [December 7, 2006]
Changed some instances of PNG_ASSEMBLER_* to PNG_MMX_* in pnggccrd.c
Revised scripts/CMakeLists.txt
-version 1.2.15beta6 [December 13, 2006]
+Version 1.2.15beta6 [December 13, 2006]
Revised scripts/CMakeLists.txt and configure.ac
-version 1.2.15rc1 [December 18, 2006]
+Version 1.2.15rc1 [December 18, 2006]
Revised scripts/CMakeLists.txt
-version 1.2.15rc2 [December 21, 2006]
+Version 1.2.15rc2 [December 21, 2006]
Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers.
Added scripts/makefile.nommx
-version 1.2.15rc3 [December 25, 2006]
- Fixed shared library numbering error that was intruduced in 1.2.15beta6.
+Version 1.2.15rc3 [December 25, 2006]
+ Fixed shared library numbering error that was introduced in 1.2.15beta6.
-version 1.2.15rc4 [December 27, 2006]
+Version 1.2.15rc4 [December 27, 2006]
Fixed handling of rgb_to_gray when png_ptr->color.gray isn't set.
-version 1.2.15rc5 [December 31, 2006]
+Version 1.2.15rc5 [December 31, 2006]
Revised handling of rgb_to_gray.
-version 1.2.15 [January 5, 2007]
+Version 1.2.15 [January 5, 2007]
Added some (unsigned long) typecasts in pngtest.c to avoid printing errors.
-version 1.2.16beta1 [January 6, 2007]
+Version 1.2.16beta1 [January 6, 2007]
Fix bugs in makefile.nommx
-version 1.2.16beta2 [January 16, 2007]
+Version 1.2.16beta2 [January 16, 2007]
Revised scripts/CMakeLists.txt
-version 1.2.16 [January 31, 2007]
+Version 1.2.16 [January 31, 2007]
No changes.
-version 1.2.17beta1 [March 6, 2007]
+Version 1.2.17beta1 [March 6, 2007]
Revised scripts/CMakeLists.txt to install both shared and static libraries.
Deleted a redundant line from pngset.c.
-version 1.2.17beta2 [April 26, 2007]
+Version 1.2.17beta2 [April 26, 2007]
Relocated misplaced test for png_ptr == NULL in pngpread.c
Change "==" to "&" for testing PNG_RGB_TO_GRAY_ERR & PNG_RGB_TO_GRAY_WARN
flags.
@@ -1705,10 +1861,10 @@ version 1.2.17beta2 [April 26, 2007]
Added "const" to some array declarations.
Mention examples of libpng usage in the libpng*.txt and libpng.3 documents.
-version 1.2.17rc1 [May 4, 2007]
+Version 1.2.17rc1 [May 4, 2007]
No changes.
-version 1.2.17rc2 [May 8, 2007]
+Version 1.2.17rc2 [May 8, 2007]
Moved several PNG_HAVE_* macros out of PNG_INTERNAL because applications
calling set_unknown_chunk_location() need them.
Changed transformation flag from PNG_EXPAND_tRNS to PNG_EXPAND in
@@ -1717,64 +1873,64 @@ version 1.2.17rc2 [May 8, 2007]
can be free'ed in case of error. Revised unknown chunk handling in
pngrutil.c and pngpread.c to use this structure.
-version 1.2.17rc3 [May 8, 2007]
+Version 1.2.17rc3 [May 8, 2007]
Revised symbol-handling in configure script.
-version 1.2.17rc4 [May 10, 2007]
+Version 1.2.17rc4 [May 10, 2007]
Revised unknown chunk handling to avoid storing unknown critical chunks.
-version 1.0.25 [May 15, 2007]
-version 1.2.17 [May 15, 2007]
+Version 1.0.25 [May 15, 2007]
+Version 1.2.17 [May 15, 2007]
Added "png_ptr->num_trans=0" before error return in png_handle_tRNS,
to eliminate a vulnerability (CVE-2007-2445, CERT VU#684664)
-version 1.0.26 [May 15, 2007]
-version 1.2.18 [May 15, 2007]
+Version 1.0.26 [May 15, 2007]
+Version 1.2.18 [May 15, 2007]
Reverted the libpng-1.2.17rc3 change to symbol-handling in configure script
-version 1.2.19beta1 [May 18, 2007]
+Version 1.2.19beta1 [May 18, 2007]
Changed "const static" to "static PNG_CONST" everywhere, mostly undoing
change of libpng-1.2.17beta2. Changed other "const" to "PNG_CONST"
Changed some handling of unused parameters, to avoid compiler warnings.
"if (unused == NULL) return;" becomes "unused = unused".
-version 1.2.19beta2 [May 18, 2007]
+Version 1.2.19beta2 [May 18, 2007]
Only use the valid bits of tRNS value in png_do_expand() (Brian Cartier)
-version 1.2.19beta3 [May 19, 2007]
+Version 1.2.19beta3 [May 19, 2007]
Add some "png_byte" typecasts in png_check_keyword() and write new_key
instead of key in zTXt chunk (Kevin Ryde).
-version 1.2.19beta4 [May 21, 2007]
+Version 1.2.19beta4 [May 21, 2007]
Add png_snprintf() function and use it in place of sprint() for improved
defense against buffer overflows.
-version 1.2.19beta5 [May 21, 2007]
+Version 1.2.19beta5 [May 21, 2007]
Fixed png_handle_tRNS() to only use the valid bits of tRNS value.
Changed handling of more unused parameters, to avoid compiler warnings.
Removed some PNG_CONST in pngwutil.c to avoid compiler warnings.
-version 1.2.19beta6 [May 22, 2007]
+Version 1.2.19beta6 [May 22, 2007]
Added some #ifdef PNG_MMX_CODE_SUPPORTED where needed in pngvcrd.c
Added a special "_MSC_VER" case that defines png_snprintf to _snprintf
-version 1.2.19beta7 [May 22, 2007]
+Version 1.2.19beta7 [May 22, 2007]
Squelched png_squelch_warnings() in pnggccrd.c and added
an #ifdef PNG_MMX_CODE_SUPPORTED block around the declarations that caused
the warnings that png_squelch_warnings was squelching.
-version 1.2.19beta8 [May 22, 2007]
+Version 1.2.19beta8 [May 22, 2007]
Removed __MMX__ from test in pngconf.h.
-version 1.2.19beta9 [May 23, 2007]
+Version 1.2.19beta9 [May 23, 2007]
Made png_squelch_warnings() available via PNG_SQUELCH_WARNINGS macro.
Revised png_squelch_warnings() so it might work.
Updated makefile.sgcc and makefile.solaris; added makefile.solaris-x86.
-version 1.2.19beta10 [May 24, 2007]
+Version 1.2.19beta10 [May 24, 2007]
Resquelched png_squelch_warnings(), use "__attribute__((used))" instead.
-version 1.4.0beta1 [April 20, 2006]
+Version 1.4.0beta1 [April 20, 2006]
Enabled iTXt support (changes png_struct, thus requires so-number change).
Cleaned up PNG_ASSEMBLER_CODE_SUPPORTED vs PNG_MMX_CODE_SUPPORTED
Eliminated PNG_1_0_X and PNG_1_2_X macros.
@@ -1786,12 +1942,12 @@ version 1.4.0beta1 [April 20, 2006]
Reduced dependency on C-runtime library when on Windows (Simon-Pierre)
Replaced sprintf() with png_sprintf() (Simon-Pierre)
-version 1.4.0beta2 [April 20, 2006]
+Version 1.4.0beta2 [April 20, 2006]
Revised makefiles and configure to avoid making links to libpng.so.*
Moved some leftover MMX-related defines from pngconf.h to pngintrn.h
Updated scripts/pngos2.def, pngw32.def, and projects/wince/png32ce.def
-version 1.4.0beta3 [May 10, 2006]
+Version 1.4.0beta3 [May 10, 2006]
Updated scripts/pngw32.def to comment out MMX functions.
Added PNG_NO_GET_INT_32 and PNG_NO_SAVE_INT_32 macros.
Scripts/libpng.pc.in contained "configure" style version info and would
@@ -1799,21 +1955,21 @@ version 1.4.0beta3 [May 10, 2006]
Revised pngconf.h and added pngconf.h.in, so makefiles and configure can
pass defines to libpng and applications.
-version 1.4.0beta4 [May 11, 2006]
+Version 1.4.0beta4 [May 11, 2006]
Revised configure.ac, Makefile.am, and many of the makefiles to write
their defines in pngconf.h.
-version 1.4.0beta5 [May 15, 2006]
+Version 1.4.0beta5 [May 15, 2006]
Added a missing semicolon in Makefile.am and Makefile.in
Deleted extraneous square brackets from configure.ac
-version 1.4.0beta6 [June 2, 2006]
+Version 1.4.0beta6 [June 2, 2006]
Increased sprintf buffer from 50 to 52 chars in pngrutil.c to avoid
buffer overflow.
Changed sonum from 0 to 1.
Removed unused prototype for png_check_sig() from png.h
-version 1.4.0beta7 [June 16, 2006]
+Version 1.4.0beta7 [June 16, 2006]
Exported png_write_sig (Cosmin).
Optimized buffer in png_handle_cHRM() (Cosmin).
Set pHYs = 2835 x 2835 pixels per meter, and added
@@ -1822,11 +1978,11 @@ version 1.4.0beta7 [June 16, 2006]
Added typedef for png_int_32 and png_uint_32 on 64-bit systems.
Added "(unsigned long)" typecast on png_uint_32 variables in printf lists.
-version 1.4.0beta8 [June 22, 2006]
+Version 1.4.0beta8 [June 22, 2006]
Added demonstration of user chunk support in pngtest.c, to support the
public sTER chunk and a private vpAg chunk.
-version 1.4.0beta9 [July 3, 2006]
+Version 1.4.0beta9 [July 3, 2006]
Removed ordinals from scripts/pngw32.def and removed png_info_int and
png_set_gray_1_2_4_to_8 entries.
Inline call of png_get_uint_32() in png_get_uint_31().
@@ -1834,14 +1990,14 @@ version 1.4.0beta9 [July 3, 2006]
Removed WINCE and Netware projects.
Removed standalone Y2KINFO file.
-version 1.4.0beta10 [July 12, 2006]
+Version 1.4.0beta10 [July 12, 2006]
Eliminated automatic copy of pngconf.h to pngconf.h.in from configure and
some makefiles, because it was not working reliably. Instead, distribute
pngconf.h.in along with pngconf.h and cause configure and some of the
makefiles to update pngconf.h from pngconf.h.in.
Added pngconf.h to DEPENDENCIES in Makefile.am
-version 1.4.0beta11 [August 19, 2006]
+Version 1.4.0beta11 [August 19, 2006]
Removed AC_FUNC_MALLOC from configure.ac.
Added a warning when writing iCCP profile with mismatched profile length.
Patched pnggccrd.c to assemble on x86_64 platforms.
@@ -1886,41 +2042,41 @@ version 1.4.0beta11 [August 19, 2006]
pngconf.h.in (Glenn).
Detect and fix attempt to write wrong iCCP profile length.
-version 1.4.0beta12 [October 19, 2006]
+Version 1.4.0beta12 [October 19, 2006]
Changed "logical" to "bitwise" in the documentation.
Work around Intel-Mac compiler bug by setting PNG_NO_MMX_CODE in pngconf.h
Add a typecast to stifle compiler warning in pngrutil.c
-version 1.4.0beta13 [November 10, 2006]
+Version 1.4.0beta13 [November 10, 2006]
Fix potential buffer overflow in sPLT chunk handler.
Fix Makefile.am to not try to link to noexistent files.
-version 1.4.0beta14 [November 15, 2006]
+Version 1.4.0beta14 [November 15, 2006]
Check all exported functions for NULL png_ptr.
-version 1.4.0beta15 [November 17, 2006]
+Version 1.4.0beta15 [November 17, 2006]
Relocated two misplaced tests for NULL png_ptr.
Built Makefile.in with automake-1.9.6 instead of 1.9.2.
Build configure with autoconf-2.60 instead of 2.59
Add "install: all" in Makefile.am so "configure; make install" will work.
-version 1.4.0beta16 [November 17, 2006]
+Version 1.4.0beta16 [November 17, 2006]
Added a typecast in png_zalloc().
-version 1.4.0beta17 [December 4, 2006]
+Version 1.4.0beta17 [December 4, 2006]
Changed "new_key[79] = '\0';" to "(*new_key)[79] = '\0';" in pngwutil.c
Add "png_bytep" typecast to profile while calculating length in pngwutil.c
-version 1.4.0beta18 [December 7, 2006]
+Version 1.4.0beta18 [December 7, 2006]
Added scripts/CMakeLists.txt
-version 1.4.0beta19 [May 16, 2007]
+Version 1.4.0beta19 [May 16, 2007]
Revised scripts/CMakeLists.txt
Rebuilt configure and Makefile.in with newer tools.
Added conditional #undef jmpbuf in pngtest.c to undo #define in AIX headers.
Added scripts/makefile.nommx
-version 1.4.0beta20 [July 9, 2008]
+Version 1.4.0beta20 [July 9, 2008]
Moved several PNG_HAVE_* macros from pngpriv.h to png.h because applications
calling set_unknown_chunk_location() need them.
Moved several macro definitions from pngpriv.h to pngconf.h
@@ -1928,19 +2084,19 @@ version 1.4.0beta20 [July 9, 2008]
Deleted all use of the MMX assembler code and Intel-licensed optimizations.
Revised makefile.mingw
-version 1.4.0beta21 [July 21, 2008]
+Version 1.4.0beta21 [July 21, 2008]
Moved local array "chunkdata" from pngrutil.c to the png_struct, so
it will be freed by png_read_destroy() in case of a read error (Kurt
Christensen).
-version 1.4.0beta22 [July 21, 2008]
+Version 1.4.0beta22 [July 21, 2008]
Change "purpose" and "buffer" to png_ptr->chunkdata to avoid memory leaking.
-version 1.4.0beta23 [July 22, 2008]
+Version 1.4.0beta23 [July 22, 2008]
Change "chunkdata = NULL" to "png_ptr->chunkdata = NULL" several places in
png_decompress_chunk().
-version 1.4.0beta24 [July 25, 2008]
+Version 1.4.0beta24 [July 25, 2008]
Change all remaining "chunkdata" to "png_ptr->chunkdata" in
png_decompress_chunk(), and remove "chunkdata" from parameter list.
Put a call to png_check_chunk_name() in png_read_chunk_header().
@@ -1948,7 +2104,7 @@ version 1.4.0beta24 [July 25, 2008]
Removed two calls to png_check_chunk_name() occuring later in the process.
Define PNG_NO_ERROR_NUMBERS by default in pngconf.h
-version 1.4.0beta25 [July 30, 2008]
+Version 1.4.0beta25 [July 30, 2008]
Added a call to png_check_chunk_name() in pngpread.c
Reverted png_check_chunk_name() to accept a name with a lowercase 3rd byte.
Added png_push_have_buffer() function to pngpread.c
@@ -1959,7 +2115,7 @@ version 1.4.0beta25 [July 30, 2008]
Eliminated no-longer-used pngdefs.h (but it's still built in the makefiles)
Relocated a misplaced "#endif /* PNG_NO_WRITE_FILTER */" in pngwutil.c
-version 1.4.0beta26 [August 4, 2008]
+Version 1.4.0beta26 [August 4, 2008]
Removed png_push_have_buffer() function in pngpread.c. It increased the
compiled library size slightly.
Changed "-Wall" to "-W -Wall" in the CFLAGS in all makefiles (Cosmin Truta)
@@ -1967,102 +2123,105 @@ version 1.4.0beta26 [August 4, 2008]
Updated contrib/visupng/cexcept.h to version 2.0.1
Added PNG_LITERAL_CHARACTER macros for #, [, and ].
-version 1.4.0beta27 [August 5, 2008]
+Version 1.4.0beta27 [August 5, 2008]
Revised usage of PNG_LITERAL_SHARP in pngerror.c.
Moved newline character from individual png_debug messages into the
png_debug macros.
Allow user to #define their own png_debug, png_debug1, and png_debug2.
-version 1.4.0beta28 [August 5, 2008]
+Version 1.4.0beta28 [August 5, 2008]
Revised usage of PNG_LITERAL_SHARP in pngerror.c.
Added PNG_STRING_NEWLINE macro
-version 1.4.0beta29 [August 9, 2008]
+Version 1.4.0beta29 [August 9, 2008]
Revised usage of PNG_STRING_NEWLINE to work on non-ISO compilers.
Added PNG_STRING_COPYRIGHT macro.
Added non-ISO versions of png_debug macros.
-version 1.4.0beta30 [August 14, 2008]
+Version 1.4.0beta30 [August 14, 2008]
Added premultiplied alpha feature (Volker Wiendl).
-version 1.4.0beta31 [August 18, 2008]
+Version 1.4.0beta31 [August 18, 2008]
Moved png_set_premultiply_alpha from pngtrans.c to pngrtran.c
Removed extra crc check at the end of png_handle_cHRM(). Bug introduced
in libpng-1.4.0beta20.
-version 1.4.0beta32 [August 19, 2008]
+Version 1.4.0beta32 [August 19, 2008]
Added PNG_WRITE_FLUSH_SUPPORTED block around new png_flush() call.
Revised PNG_NO_STDIO version of png_write_flush()
-version 1.4.0beta33 [August 20, 2008]
+Version 1.4.0beta33 [August 20, 2008]
Added png_get|set_chunk_cache_max() to limit the total number of sPLT,
text, and unknown chunks that can be stored.
-version 1.4.0beta34 [September 6, 2008]
+Version 1.4.0beta34 [September 6, 2008]
Shortened tIME_string to 29 bytes in pngtest.c
Fixed off-by-one error introduced in png_push_read_zTXt() function in
libpng-1.2.30beta04/pngpread.c (Harald van Dijk)
-version 1.4.0beta35 [October 6, 2008]
+Version 1.4.0beta35 [October 6, 2008]
Changed "trans_values" to "trans_color".
Changed so-number from 0 to 14. Some OS do not like 0.
Revised makefile.darwin to fix shared library numbering.
Change png_set_gray_1_2_4_to_8() to png_set_expand_gray_1_2_4_to_8()
in example.c (debian bug report)
-version 1.4.0beta36 [October 25, 2008]
+Version 1.4.0beta36 [October 25, 2008]
Sync with tEXt vulnerability fix in libpng-1.2.33rc02.
-version 1.4.0beta37 [November 13, 2008]
+Version 1.4.0beta37 [November 13, 2008]
Added png_check_cHRM in png.c and moved checking from pngget.c, pngrutil.c,
and pngwrite.c
-version 1.4.0beta38 [November 22, 2008]
+Version 1.4.0beta38 [November 22, 2008]
Added check for zero-area RGB cHRM triangle in png_check_cHRM() and
png_check_cHRM_fixed().
-version 1.4.0beta39 [November 23, 2008]
+Version 1.4.0beta39 [November 23, 2008]
Revised png_warning() to write its message on standard output by default
when warning_fn is NULL.
-version 1.4.0beta40 [November 24, 2008]
+Version 1.4.0beta40 [November 24, 2008]
Eliminated png_check_cHRM(). Instead, always use png_check_cHRM_fixed().
In png_check_cHRM_fixed(), ensure white_y is > 0, and removed redundant
check for all-zero coordinates that is detected by the triangle check.
-version 1.4.0beta41 [November 26, 2008]
+Version 1.4.0beta41 [November 26, 2008]
Fixed string vs pointer-to-string error in png_check_keyword().
Rearranged test expressions in png_check_cHRM_fixed() to avoid internal
overflows.
Added PNG_NO_CHECK_cHRM conditional.
-version 1.4.0beta42, 43 [December 1, 2008]
+Version 1.4.0beta42, 43 [December 1, 2008]
Merge png_debug with version 1.2.34beta04.
-version 1.4.0beta44 [December 6, 2008]
+Version 1.4.0beta44 [December 6, 2008]
Removed redundant check for key==NULL before calling png_check_keyword()
to ensure that new_key gets initialized and removed extra warning
(Merge with version 1.2.34beta05 -- Arvan Pritchard).
-version 1.4.0beta45 [December 9, 2008]
+Version 1.4.0beta45 [December 9, 2008]
In png_write_png(), respect the placement of the filler bytes in an earlier
call to png_set_filler() (Jim Barry).
-version 1.4.0beta46 [December 10, 2008]
+Version 1.4.0beta46 [December 10, 2008]
Undid previous change and added PNG_TRANSFORM_STRIP_FILLER_BEFORE and
PNG_TRANSFORM_STRIP_FILLER_AFTER conditionals and deprecated
PNG_TRANSFORM_STRIP_FILLER (Jim Barry).
-version 1.4.0beta47 [December 15, 2008]
- Turned off PNG_READ_DITHER_SUPPORTED by default.
+Version 1.4.0beta47 [December 15, 2008]
+ Support for dithering was disabled by default, because it has never
+ been well tested and doesn't work very well. The code has not
+ been removed, however, and can be enabled by building libpng with
+ PNG_READ_DITHER_SUPPORTED defined.
-version 1.4.0beta48 [February 14, 2009]
+Version 1.4.0beta48 [February 14, 2009]
Added new exported function png_calloc().
Combined several instances of png_malloc(); png_memset() into png_calloc().
Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24
but was never defined.
-version 1.4.0beta49 [February 28, 2009]
+Version 1.4.0beta49 [February 28, 2009]
Added png_fileno() macro to pngconf.h, used in pngwio.c
Corrected order of #ifdef's in png_debug definition in png.h
Fixed bug introduced in libpng-1.4.0beta48 with the memset arguments
@@ -2071,7 +2230,7 @@ version 1.4.0beta49 [February 28, 2009]
(bug introduced in libpng-1.2.34/1.4.0beta29).
Revised comments in png_set_read_fn() and png_set_write_fn().
-version 1.4.0beta50 [March 18, 2009]
+Version 1.4.0beta50 [March 18, 2009]
Use png_calloc() instead of png_malloc() to allocate big_row_buf when
reading an interlaced file, to avoid a possible UMR.
Undid revision of PNG_NO_STDIO version of png_write_flush(). Users
@@ -2082,21 +2241,21 @@ version 1.4.0beta50 [March 18, 2009]
Removed fflush() from pngtest.c.
Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h
-version 1.4.0beta51 [March 21, 2009]
+Version 1.4.0beta51 [March 21, 2009]
Removed new png_fileno() macro from pngconf.h .
-version 1.4.0beta52 [March 27, 2009]
+Version 1.4.0beta52 [March 27, 2009]
Relocated png_do_chop() ahead of building gamma tables in pngrtran.c
This avoids building 16-bit gamma tables unnecessarily.
Removed fflush() from pngtest.c.
Added "#define PNG_NO_WRITE_FLUSH" to contrib/pngminim/encoder/pngusr.h
Added a section on differences between 1.0.x and 1.2.x to libpng.3/libpng.txt
-version 1.4.0beta53 [April 1, 2009]
+Version 1.4.0beta53 [April 1, 2009]
Removed some remaining MMX macros from pngpriv.h
Fixed potential memory leak of "new_name" in png_write_iCCP() (Ralph Giles)
-version 1.4.0beta54 [April 13, 2009]
+Version 1.4.0beta54 [April 13, 2009]
Added "ifndef PNG_SKIP_SETJMP_CHECK" block in pngconf.h to allow
application code writers to bypass the check for multiple inclusion
of setjmp.h when they know that it is safe to ignore the situation.
@@ -2105,54 +2264,54 @@ version 1.4.0beta54 [April 13, 2009]
pngtest now produces, and made some cosmetic changes to pngtest output.
Eliminated deprecated png_read_init_3() and png_write_init_3() functions.
-version 1.4.0beta55 [April 15, 2009]
+Version 1.4.0beta55 [April 15, 2009]
Simplified error handling in pngread.c and pngwrite.c by putting
the new png_read_cleanup() and png_write_cleanup() functions inline.
-version 1.4.0beta56 [April 25, 2009]
+Version 1.4.0beta56 [April 25, 2009]
Renamed "user_chunk_data" to "my_user_chunk_data" in pngtest.c to suppress
"shadowed declaration" warning from gcc-4.3.3.
Renamed "gamma" to "png_gamma" in pngset.c to avoid "shadowed declaration"
warning about a global "gamma" variable in math.h on some platforms.
-version 1.4.0beta57 [May 2, 2009]
+Version 1.4.0beta57 [May 2, 2009]
Removed prototype for png_freeptr() that was added in libpng-1.4.0beta24
but was never defined (again).
Rebuilt configure scripts with autoconf-2.63 instead of 2.62
Removed pngprefs.h and MMX from makefiles
-version 1.4.0beta58 [May 14, 2009]
- Changed pngw32.def to pngwin.def in makefile.mingw (typo was intruduced
+Version 1.4.0beta58 [May 14, 2009]
+ Changed pngw32.def to pngwin.def in makefile.mingw (typo was introduced
in beta57).
Clarified usage of sig_bit versus sig_bit_p in example.c (Vincent Torri)
-version 1.4.0beta59 [May 15, 2009]
+Version 1.4.0beta59 [May 15, 2009]
Reformated sources in libpng style (3-space intentation, comment format)
Fixed typo in libpng docs (PNG_FILTER_AVE should be PNG_FILTER_AVG)
Added sections about the git repository and our coding style to the
documentation
Relocated misplaced #endif in pngwrite.c, sCAL chunk handler.
-version 1.4.0beta60 [May 19, 2009]
+Version 1.4.0beta60 [May 19, 2009]
Conditionally compile png_read_finish_row() which is not used by
progressive readers.
Added contrib/pngminim/preader to demonstrate building minimal progressive
decoder, based on contrib/gregbook with embedded libpng and zlib.
-version 1.4.0beta61 [May 20, 2009]
+Version 1.4.0beta61 [May 20, 2009]
In contrib/pngminim/*, renamed "makefile.std" to "makefile", since there
is only one makefile in those directories, and revised the README files
accordingly.
More reformatting of comments, mostly to capitalize sentences.
-version 1.4.0beta62 [June 2, 2009]
+Version 1.4.0beta62 [June 2, 2009]
Added "#define PNG_NO_WRITE_SWAP" to contrib/pngminim/encoder/pngusr.h
and "define PNG_NO_READ_SWAP" to decoder/pngusr.h and preader/pngusr.h
Reformatted several remaining "else statement" into two lines.
Added a section to the libpng documentation about using png_get_io_ptr()
in configure scripts to detect the presence of libpng.
-version 1.4.0beta63 [June 15, 2009]
+Version 1.4.0beta63 [June 15, 2009]
Revised libpng*.txt and libpng.3 to mention calling png_set_IHDR()
multiple times and to specify the sample order in the tRNS chunk,
because the ISO PNG specification has a typo in the tRNS table.
@@ -2162,26 +2321,26 @@ version 1.4.0beta63 [June 15, 2009]
Adopted preference for consistent use of "#ifdef" and "#ifndef" versus
"#if defined()" and "if !defined()" where possible.
-version 1.4.0beta64 [June 24, 2009]
+Version 1.4.0beta64 [June 24, 2009]
Eliminated PNG_LEGACY_SUPPORTED code.
Moved the various unknown chunk macro definitions outside of the
PNG_READ|WRITE_ANCILLARY_CHUNK_SUPPORTED blocks.
-version 1.4.0beta65 [June 26, 2009]
+Version 1.4.0beta65 [June 26, 2009]
Added a reference to the libpng license in each file.
-version 1.4.0beta66 [June 27, 2009]
+Version 1.4.0beta66 [June 27, 2009]
Refer to the libpng license instead of the libpng license in each file.
-version 1.4.0beta67 [July 6, 2009]
+Version 1.4.0beta67 [July 6, 2009]
Relocated INVERT_ALPHA within png_read_png() and png_write_png().
Added high-level API transform PNG_TRANSFORM_GRAY_TO_RGB.
Added an "xcode" project to the projects directory (Alam Arias).
-version 1.4.0beta68 [July 19, 2009]
+Version 1.4.0beta68 [July 19, 2009]
Avoid some tests in filter selection in pngwutil.c
-version 1.4.0beta69 [July 25, 2009]
+Version 1.4.0beta69 [July 25, 2009]
Simplified the new filter-selection test. This runs faster in the
common "PNG_ALL_FILTERS" and PNG_FILTER_NONE cases.
Removed extraneous declaration from the new call to png_read_gray_to_rgb()
@@ -2189,54 +2348,54 @@ version 1.4.0beta69 [July 25, 2009]
Fixed up xcode project (Alam Arias)
Added a prototype for png_64bit_product() in png.c
-version 1.4.0beta70 [July 27, 2009]
+Version 1.4.0beta70 [July 27, 2009]
Avoid a possible NULL dereference in debug build, in png_set_text_2().
(bug introduced in libpng-0.95, discovered by Evan Rouault)
-version 1.4.0beta71 [July 29, 2009]
+Version 1.4.0beta71 [July 29, 2009]
Rebuilt configure scripts with autoconf-2.64.
-version 1.4.0beta72 [August 1, 2009]
+Version 1.4.0beta72 [August 1, 2009]
Replaced *.tar.lzma with *.tar.xz in distribution. Get the xz codec
from <http://tukaani.org/xz>.
-version 1.4.0beta73 [August 1, 2009]
+Version 1.4.0beta73 [August 1, 2009]
Reject attempt to write iCCP chunk with negative embedded profile length
(JD Chen)
-version 1.4.0beta74 [August 8, 2009]
+Version 1.4.0beta74 [August 8, 2009]
Changed png_ptr and info_ptr member "trans" to "trans_alpha".
-version 1.4.0beta75 [August 21, 2009]
+Version 1.4.0beta75 [August 21, 2009]
Removed an extra png_debug() recently added to png_write_find_filter().
Fixed incorrect #ifdef in pngset.c regarding unknown chunk support.
-version 1.4.0beta76 [August 22, 2009]
+Version 1.4.0beta76 [August 22, 2009]
Moved an incorrectly located test in png_read_row() in pngread.c
-version 1.4.0beta77 [August 27, 2009]
+Version 1.4.0beta77 [August 27, 2009]
Removed lpXYZ.tar.bz2 (with CRLF), KNOWNBUG, libpng-x.y.z-KNOWNBUG.txt,
and the "noconfig" files from the distribution.
Moved CMakeLists.txt from scripts into the main libpng directory.
Various bugfixes and improvements to CMakeLists.txt (Philip Lowman)
-version 1.4.0beta78 [August 31, 2009]
+Version 1.4.0beta78 [August 31, 2009]
Converted all PNG_NO_* tests to PNG_*_SUPPORTED everywhere except pngconf.h
Eliminated PNG_NO_FREE_ME and PNG_FREE_ME_SUPPORTED macros.
Use png_malloc plus a loop instead of png_calloc() to initialize
row_pointers in png_read_png().
-version 1.4.0beta79 [September 1, 2009]
+Version 1.4.0beta79 [September 1, 2009]
Eliminated PNG_GLOBAL_ARRAYS and PNG_LOCAL_ARRAYS; always use local arrays.
Eliminated PNG_CALLOC_SUPPORTED macro and always provide png_calloc().
-version 1.4.0beta80 [September 17, 2009]
+Version 1.4.0beta80 [September 17, 2009]
Removed scripts/libpng.icc
Changed typecast of filler from png_byte to png_uint_16 in png_set_filler().
(Dennis Gustafsson)
Fixed typo introduced in beta78 in pngtest.c ("#if def " should be "#ifdef ")
-version 1.4.0beta81 [September 23, 2009]
+Version 1.4.0beta81 [September 23, 2009]
Eliminated unused PNG_FLAG_FREE_* defines from pngpriv.h
Expanded TAB characters in pngrtran.c
Removed PNG_CONST from all "PNG_CONST PNG_CHNK" declarations to avoid
@@ -2244,60 +2403,60 @@ version 1.4.0beta81 [September 23, 2009]
Changed all "#if [!]defined(X)" to "if[n]def X" where possible.
Eliminated unused png_ptr->row_buf_size
-version 1.4.0beta82 [September 25, 2009]
+Version 1.4.0beta82 [September 25, 2009]
Moved redundant IHDR checking into new png_check_IHDR() in png.c
and report all errors found in the IHDR data.
Eliminated useless call to png_check_cHRM() from pngset.c
-version 1.4.0beta83 [September 25, 2009]
+Version 1.4.0beta83 [September 25, 2009]
Revised png_check_IHDR() to eliminate bogus complaint about filter_type.
-version 1.4.0beta84 [September 30, 2009]
+Version 1.4.0beta84 [September 30, 2009]
Fixed some inconsistent indentation in pngconf.h
Revised png_check_IHDR() to add a test for width variable less than 32-bit.
-version 1.4.0beta85 [October 1, 2009]
+Version 1.4.0beta85 [October 1, 2009]
Revised png_check_IHDR() again, to check info_ptr members instead of
the contents of the returned parameters.
-version 1.4.0beta86 [October 9, 2009]
+Version 1.4.0beta86 [October 9, 2009]
Updated the "xcode" project (Alam Arias).
Eliminated a shadowed declaration of "pp" in png_handle_sPLT().
-version 1.4.0rc01 [October 19, 2009]
+Version 1.4.0rc01 [October 19, 2009]
Trivial cosmetic changes.
-version 1.4.0beta87 [October 30, 2009]
+Version 1.4.0beta87 [October 30, 2009]
Moved version 1.4.0 back into beta.
-version 1.4.0beta88 [October 30, 2009]
+Version 1.4.0beta88 [October 30, 2009]
Revised libpng*.txt section about differences between 1.2.x and 1.4.0
because most of the new features have now been ported back to 1.2.41
-version 1.4.0beta89 [November 1, 2009]
+Version 1.4.0beta89 [November 1, 2009]
More bugfixes and improvements to CMakeLists.txt (Philip Lowman)
Removed a harmless extra png_set_invert_alpha() from pngwrite.c
Apply png_user_chunk_cache_max within png_decompress_chunk().
Merged libpng-1.2.41.txt with libpng-1.4.0.txt where appropriate.
-version 1.4.0beta90 [November 2, 2009]
+Version 1.4.0beta90 [November 2, 2009]
Removed all remaining WIN32_WCE #ifdefs except those involving the
time.h "tm" structure
-version 1.4.0beta91 [November 3, 2009]
+Version 1.4.0beta91 [November 3, 2009]
Updated scripts/pngw32.def and projects/wince/png32ce.def
Copied projects/wince/png32ce.def to the scripts directory.
Added scripts/makefile.wce
Patched ltmain.sh for wince support.
Added PNG_CONVERT_tIME_SUPPORTED macro.
-version 1.4.0beta92 [November 4, 2009]
+Version 1.4.0beta92 [November 4, 2009]
Make inclusion of time.h in pngconf.h depend on PNG_CONVERT_tIME_SUPPORTED
Make #define PNG_CONVERT_tIME_SUPPORTED depend on PNG_WRITE_tIME_SUPPORTED
Revised libpng*.txt to describe differences from 1.2.40 to 1.4.0 (instead
of differences from 1.2.41 to 1.4.0)
-version 1.4.0beta93 [November 7, 2009]
+Version 1.4.0beta93 [November 7, 2009]
Added PNG_DEPSTRUCT, PNG_DEPRECATED, PNG_USE_RESULT, PNG_NORETURN, and
PNG_ALLOCATED macros to detect deprecated direct access to the
png_struct or info_struct members and other deprecated usage in
@@ -2320,13 +2479,13 @@ version 1.4.0beta93 [November 7, 2009]
Moved the synopsis lines for png_read_destroy(), png_write_destroy()
png_debug(), png_debug1(), and png_debug2() from libpng.3 to libpngpf.3.
-version 1.4.0beta94 [November 9, 2009]
+Version 1.4.0beta94 [November 9, 2009]
Removed the obsolete, unused pnggccrd.c and pngvcrd.c files.
Updated CMakeLists.txt to add "-DPNG_CONFIGURE_LIBPNG" to the definitions.
Removed dependency of pngtest.o on pngpriv.h in the makefiles.
Only #define PNG_DEPSTRUCT, etc. in pngconf.h if not already defined.
-version 1.4.0beta95 [November 10, 2009]
+Version 1.4.0beta95 [November 10, 2009]
Changed png_check_sig() to !png_sig_cmp() in contrib programs.
Added -DPNG_CONFIGURE_LIBPNG to contrib/pngminm/*/makefile
Changed png_check_sig() to !png_sig_cmp() in contrib programs.
@@ -2334,7 +2493,7 @@ version 1.4.0beta95 [November 10, 2009]
Changed pngminim/*/gather.sh to stop trying to remove pnggccrd.c and pngvcrd.c
Added dependency on pngpriv.h in contrib/pngminim/*/makefile
-version 1.4.0beta96 [November 12, 2009]
+Version 1.4.0beta96 [November 12, 2009]
Renamed scripts/makefile.wce to scripts/makefile.cegcc
Revised Makefile.am to use libpng.sys while building libpng.so
so that only PNG_EXPORT functions are exported.
@@ -2344,42 +2503,42 @@ version 1.4.0beta96 [November 12, 2009]
(evidently the same change made in libpng-1.0beta54 was lost).
Added PNG_PRIVATE macro definition in pngconf.h for possible future use.
-version 1.4.0beta97 [November 13, 2009]
+Version 1.4.0beta97 [November 13, 2009]
Restored pngtest.png to the libpng-1.4.0beta7 version.
Removed projects/beos and netware.txt; no one seems to be supporting them.
Revised Makefile.in
-version 1.4.0beta98 [November 13, 2009]
+Version 1.4.0beta98 [November 13, 2009]
Added the "xcode" project to zip distributions,
Fixed a typo in scripts/pngwin.def introduced in beta97.
-version 1.4.0beta99 [November 14, 2009]
+Version 1.4.0beta99 [November 14, 2009]
Moved libpng-config.in and libpng.pc-configure.in out of the scripts
directory, to libpng-config.in and libpng-pc.in, respectively, and
modified Makefile.am and configure.ac accordingly. Now "configure"
needs nothing from the "scripts" directory.
Avoid redefining PNG_CONST in pngconf.h
-version 1.4.0beta100 [November 14, 2009]
+Version 1.4.0beta100 [November 14, 2009]
Removed ASM builds from projects/visualc6 and projects/visualc71
Removed scripts/makefile.nommx and makefile.vcawin32
Revised CMakeLists.txt to account for new location of libpng-config.in
and libpng-pc.in
Updated INSTALL to reflect removal and relocation of files.
-version 1.4.0beta101 [November 14, 2009]
+Version 1.4.0beta101 [November 14, 2009]
Restored the binary files (*.jpg, *.png, some project files) that were
accidentally deleted from the zip and 7z distributions when the xcode
project was added.
-version 1.4.0beta102 [November 18, 2009]
+Version 1.4.0beta102 [November 18, 2009]
Added libpng-config.in and libpng-pc.in to the zip and 7z distributions.
Fixed a typo in projects/visualc6/pngtest.dsp, introduced in beta100.
Moved descriptions of makefiles and other scripts out of INSTALL into
scripts/README.txt
Updated the copyright year in scripts/pngwin.rc from 2006 to 2009.
-version 1.4.0beta103 [November 21, 2009]
+Version 1.4.0beta103 [November 21, 2009]
Removed obsolete comments about ASM from projects/visualc71/README_zlib.txt
Align row_buf on 16-byte boundary in memory.
Restored the PNG_WRITE_FLUSH_AFTER_IEND_SUPPORTED guard around the call
@@ -2391,71 +2550,696 @@ version 1.4.0beta103 [November 21, 2009]
jmp_buf buffer, and marked direct access to jmpbuf 'deprecated'.
(John Bowler)
-version 1.4.0beta104 [November 22, 2009]
+Version 1.4.0beta104 [November 22, 2009]
Removed png_longjmp_ptr from scripts/*.def and libpng.3
Rebuilt configure scripts with autoconf-2.65
-version 1.4.0beta105 [November 25, 2009]
+Version 1.4.0beta105 [November 25, 2009]
Use fast integer PNG_DIVIDE_BY_255() or PNG_DIVIDE_BY_65535()
to accomplish alpha premultiplication when
PNG_READ_COMPOSITE_NODIV_SUPPORTED is defined.
Changed "/255" to "/255.0" in background calculations to make it clear
that the 255 is used as a double.
-version 1.4.0beta106 [November 27, 2009]
+Version 1.4.0beta106 [November 27, 2009]
Removed premultiplied alpha feature.
-version 1.4.0beta107 [December 4, 2009]
+Version 1.4.0beta107 [December 4, 2009]
Updated README
Added "#define PNG_NO_PEDANTIC_WARNINGS" in the libpng source files.
Removed "-DPNG_CONFIGURE_LIBPNG" from the makefiles and projects.
Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco
to put png.h and pngconf.h in $prefix/include, like the other scripts,
instead of in $prefix/include/libpng. Also revised makefile.sco
- to put them in $prefix/include/libpng14 instead of in
- $prefix/include/libpng/libpng14.
+ to put them in $prefix/include/libpng15 instead of in
+ $prefix/include/libpng/libpng15.
-version 1.4.0beta108 [December 11, 2009]
+Version 1.4.0beta108 [December 11, 2009]
Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile
Relocated png_do_chop() to its original position in pngrtran.c; the
change in version 1.2.41beta08 caused transparency to be handled wrong
in some 16-bit datastreams (Yusaku Sugai).
-version 1.4.0beta109 [December 13, 2009]
+Version 1.4.0beta109 [December 13, 2009]
Added "bit_depth" parameter to the private png_build_gamma_table() function.
Pass bit_depth=8 to png_build_gamma_table() when bit_depth is 16 but the
PNG_16_TO_8 transform has been set, to avoid unnecessary build of 16-bit
tables.
-version 1.4.0rc02 [December 20, 2009]
+Version 1.4.0rc02 [December 20, 2009]
Declared png_cleanup_needed "volatile" in pngread.c and pngwrite.c
-version 1.4.0rc03 [December 22, 2009]
+Version 1.4.0rc03 [December 22, 2009]
Renamed libpng-pc.in back to libpng.pc.in and revised CMakeLists.txt
(revising the change in 1.4.0beta99)
-version 1.4.0rc04 [December 25, 2009]
+Version 1.4.0rc04 [December 25, 2009]
Swapped PNG_UNKNOWN_CHUNKS_SUPPORTED and PNG_HANDLE_AS_UNKNOWN_SUPPORTED
in pngset.c to be consistent with other changes in version 1.2.38.
-version 1.4.0rc05 [December 25, 2009]
+Version 1.4.0rc05 [December 25, 2009]
Changed "libpng-pc.in" to "libpng.pc.in" in configure.ac, configure, and
Makefile.in to be consistent with changes in libpng-1.4.0rc03
-version 1.4.0rc06 [December 29, 2009]
+Version 1.4.0rc06 [December 29, 2009]
Reverted the gamma_table changes from libpng-1.4.0beta109.
Fixed some indentation errors.
-version 1.4.0rc07 [January 1, 2010]
+Version 1.4.0rc07 [January 1, 2010]
Revised libpng*.txt and libpng.3 about 1.2.x->1.4.x differences.
Use png_calloc() instead of png_malloc(); png_memset() in pngrutil.c
Update copyright year to 2010.
-version 1.4.0rc08 [January 2, 2010]
+Version 1.4.0rc08 [January 2, 2010]
Avoid deprecated references to png_ptr-io_ptr and png_ptr->error_ptr
in pngtest.c
-version 1.4.0 [January 3, 2010]
+Version 1.4.0 [January 3, 2010]
+ No changes.
+
+Version 1.4.1beta01 [January 8, 2010]
+ Updated CMakeLists.txt for consistent indentation and to avoid an
+ unclosed if-statement warning (Philip Lowman).
+ Revised Makefile.am and Makefile.in to remove references to Y2KINFO,
+ KNOWNBUG, and libpng.la (Robert Schwebel).
+ Revised the makefiles to install the same files and symbolic
+ links as configure, except for libpng.la and libpng14.la.
+ Make png_set|get_compression_buffer_size() available even when
+ PNG_WRITE_SUPPORTED is not enabled.
+ Revised Makefile.am and Makefile.in to simplify their maintenance.
+ Revised scripts/makefile.linux to install a link to libpng14.so.14.1
+
+Version 1.4.1beta02 [January 9, 2010]
+ Revised the rest of the makefiles to install a link to libpng14.so.14.1
+
+Version 1.4.1beta03 [January 10, 2010]
+ Removed png_set_premultiply_alpha() from scripts/*.def
+
+Version 1.4.1rc01 [January 16, 2010]
+ No changes.
+
+Version 1.4.1beta04 [January 23, 2010]
+ Revised png_decompress_chunk() to improve speed and memory usage when
+ decoding large chunks.
+ Added png_set|get_chunk_malloc_max() functions.
+
+Version 1.4.1beta05 [January 26, 2010]
+ Relocated "int k" declaration in pngtest.c to minimize its scope.
+
+Version 1.4.1beta06 [January 28, 2010]
+ Revised png_decompress_chunk() to use a two-pass method suggested by
+ John Bowler.
+
+Version 1.4.1beta07 [February 6, 2010]
+ Folded some long lines in the source files.
+ Added defineable PNG_USER_CHUNK_CACHE_MAX, PNG_USER_CHUNK_MALLOC_MAX,
+ and a PNG_USER_LIMITS_SUPPORTED flag.
+ Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as
+ png_ptr->png_user_chunk_malloc_max.
+ Revised png_push_save_buffer() to do fewer but larger png_malloc() calls.
+
+Version 1.4.1beta08 [February 6, 2010]
+ Minor cleanup and updating of dates and copyright year.
+
+Version 1.5.0beta01 [February 7, 2010]
+ Moved declaration of png_struct into private pngstruct.h and png_info
+ into pnginfo.h
+
+Version 1.4.1beta09 and 1.5.0beta02 [February 7, 2010]
+ Reverted to original png_push_save_buffer() code.
+
+Version 1.4.1beta10 and 1.5.0beta03 [February 8, 2010]
+ Return allocated "old_buffer" in png_push_save_buffer() before
+ calling png_error(), to avoid a potential memory leak.
+ Updated configure script to use SO number 15.
+
+Version 1.5.0beta04 [February 9, 2010]
+ Removed malformed "incomplete struct declaration" of png_info from png.h
+
+Version 1.5.0beta05 [February 12, 2010]
+ Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the
+ linewrapping that it entailed.
+ Revised comments in pngstruct.h and pnginfo.h and added pointers to
+ the libpng license.
+ Changed PNG_INTERNAL to PNG_EXPOSE_INTERNAL_STRUCTURES
+ Removed the cbuilder5 project, which has not been updated to 1.4.0.
+
+Version 1.4.1beta12 and 1.5.0beta06 [February 14, 2010]
+ Fixed type declaration of png_get_chunk_malloc_max() in pngget.c (Daisuke
+ Nishikawa)
+
+Version 1.5.0beta07 [omitted]
+
+Version 1.5.0beta08 [February 19, 2010]
+ Changed #ifdef PNG_NO_STDIO_SUPPORTED to #ifdef PNG_NO_CONSOLE_IO_SUPPORTED
+ wherever png_snprintf() is used to construct error and warning messages.
+ Noted in scripts/makefile.mingw that it expects to be run under MSYS.
+ Removed obsolete unused MMX-querying support from contrib/gregbook
+ Added exported png_longjmp() function.
+ Removed the AIX redefinition of jmpbuf in png.h
+ Added -D_ALLSOURCE in configure.ac, makefile.aix, and CMakeLists.txt
+ when building on AIX.
+
+Version 1.5.0beta09 [February 19, 2010]
+ Removed -D_ALLSOURCE from configure.ac, makefile.aix, and CMakeLists.txt.
+ Changed the name of png_ptr->jmpbuf to png_ptr->png_jmpbuf in pngstruct.h
+
+Version 1.5.0beta10 [February 25, 2010]
+ Removed unused gzio.c from contrib/pngminim gather and makefile scripts
+ Removed replacement error handlers from contrib/gregbook. Because of
+ the new png_longjmp() function they are no longer needed.
+
+Version 1.5.0beta11 [March 6, 2010]
+ Removed checking for already-included setjmp.h from pngconf.h
+ Fixed inconsistent indentations and made numerous cosmetic changes.
+ Revised the "SEE ALSO" style of libpng.3, libpngpf.3, and png.5
+
+Version 1.5.0beta12 [March 9, 2010]
+ Moved "#include png.h" inside pngpriv.h and removed "#include png.h" from
+ the source files, along with "#define PNG_EXPOSE_INTERNAL_STRUCTURES"
+ and "#define PNG_NO_PEDANTIC_WARNINGS" (John Bowler).
+ Created new pngdebug.h and moved debug definitions there.
+
+Version 1.5.0beta13 [March 10, 2010]
+ Protect pngstruct.h, pnginfo.h, and pngdebug.h from being included twice.
+ Revise the "#ifdef" blocks in png_inflate() so it will compile when neither
+ PNG_USER_CHUNK_MALLOC_MAX nor PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
+ is defined.
+ Removed unused png_measure_compressed_chunk() from pngpriv.h and libpngpf.3
+ Moved the 'config.h' support from pngconf.h to pngpriv.h
+ Removed PNGAPI from the png_longjmp_ptr typedef.
+ Eliminated dependence of pngtest.c on the private pngdebug.h file.
+ Make all png_debug macros into *unterminated* statements or
+ expressions (i.e. a trailing ';' must always be added) and correct
+ the format statements in various png_debug messages.
+
+Version 1.5.0beta14 [March 14, 2010]
+ Removed direct access to png_ptr->io_ptr from the Windows code in pngtest.c
+ Revised Makefile.am to account for recent additions and replacements.
+ Corrected CE and OS/2 DEF files (scripts/png*def) for symbols removed and
+ added ordinal numbers to the Windows DEF file and corrected the duplicated
+ ordinal numbers on CE symbols that are commented out.
+ Added back in export symbols that can be present in the Windows build but
+ are disabled by default.
+ PNG_EXPORT changed to include an 'ordinal' field for DEF file generation.
+ PNG_CALLBACK added to make callback definitions uniform. PNGAPI split
+ into PNGCAPI (base C form), PNGAPI (exports) and PNGCBAPI (callbacks),
+ and appropriate changes made to all files. Cygwin builds re-hinged to
+ allow procedure call standard changes and to remove the need for the DEF
+ file (fixes build on Cygwin).
+ Enabled 'attribute' warnings that are relevant to library APIs and callbacks.
+ Changed rules for generation of the various symbol files and added a new
+ rule for a DEF file (which is also added to the distribution).
+ Updated the symbol file generation to stop it adding spurious spaces
+ to EOL (coming from preprocessor macro expansion). Added a facility
+ to join tokens in the output and rewrite *.dfn to use this.
+ Eliminated scripts/*.def in favor of libpng.def; updated projects/visualc71
+ and removed scripts/makefile.cygwin.
+ Made PNG_BUILD_DLL safe: it can be set whenever a DLL is being built.
+ Removed the include of sys/types.h - apparently unnecessary now on the
+ platforms on which it happened (all but Mac OS and RISC OS).
+ Moved the Mac OS test into pngpriv.h (the only place it is used.)
+
+Version 1.5.0beta15 [March 17, 2010]
+ Added symbols.chk target to Makefile.am to validate the symbols in png.h
+ against the new DEF file scripts/symbols.def.
+ Changed the default DEF file back to pngwin.def.
+ Removed makefile.mingw.
+ Eliminated PNG_NO_EXTERN and PNG_ALL_EXTERN
+
+Version 1.5.0beta16 [April 1, 2010]
+ Make png_text_struct independent of PNG_iTXt_SUPPORTED, so that
+ fields are initialized in all configurations. The READ/WRITE
+ macros (PNG_(READ|WRITE)_iTXt_SUPPORTED) still function as
+ before to disable code to actually read or write iTXt chunks
+ and iTXt_SUPPORTED can be used to detect presence of either
+ read or write support (but it is probably better to check for
+ the one actually required - read or write.)
+ Combined multiple png_warning() calls for a single error.
+ Restored the macro definition of png_check_sig().
+
+Version 1.5.0beta17 [April 17, 2010]
+ Added some "(long)" typecasts to printf calls in png_handle_cHRM().
+ Documented the fact that png_set_dither() was disabled since libpng-1.4.0.
+ Reenabled png_set_dither() but renamed it to png_set_quantize() to reflect
+ more accurately what it actually does. At the same time, renamed
+ the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros to
+ PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS.
+ Added some "(long)" typecasts to printf calls in png_handle_cHRM().
+ Freeze build-time only configuration in the build.
+ In all prior versions of libpng most configuration options
+ controlled by compiler #defines had to be repeated by the
+ application code that used libpng. This patch changes this
+ so that compilation options that can only be changed at build
+ time are frozen in the build. Options that are compiler
+ dependent (and those that are system dependent) are evaluated
+ each time - pngconf.h holds these. Options that can be changed
+ per-file in the application are in png.h. Frozen options are
+ in the new installed header file pnglibconf.h (John Bowler)
+ Removed the xcode project because it has not been updated to work
+ with libpng-1.5.0.
+ Removed the ability to include optional pngusr.h
+
+Version 1.5.0beta18 [April 17, 2010]
+ Restored the ability to include optional pngusr.h
+ Moved replacements for png_error() and png_warning() from the
+ contrib/pngminim project to pngerror.c, for use when warnings or
+ errors are disabled via PNG_NO_WARN or PNG_NO_ERROR_TEXT, to avoid
+ storing unneeded error/warning text.
+ Updated contrib/pngminim project to work with the new pnglibconf.h
+ Added some PNG_NO_* defines to contrib/pngminim/*/pngusr.h to save space.
+
+Version 1.5.0beta19 [April 24, 2010]
+ Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the functions
+ to read and write ints to be disabled independently of PNG_USE_READ_MACROS,
+ which allows libpng to be built with the functions even though the default
+ is to use the macros - this allows applications to choose at app build
+ time whether or not to use macros (previously impossible because the
+ functions weren't in the default build.)
+ Changed Windows calling convention back to __cdecl for API functions.
+ For Windows/x86 platforms only:
+ __stdcall is no longer needed for Visual Basic, so libpng-1.5.0 uses
+ __cdecl throughout (both API functions and callbacks) on Windows/x86
+ platforms.
+ Replaced visualc6 and visualc71 projects with new vstudio project
+ Relaxed the overly-restrictive permissions of some files.
+
+Version 1.5.0beta20 [April 24, 2010]
+ Relaxed more overly-restrictive permissions of some files.
+
+Version 1.5.0beta21 [April 27, 2010]
+ Removed some unwanted binary bytes and changed CRLF to NEWLINE in the new
+ vstudio project files, and some trivial editing of some files in the
+ scripts directory.
+ Set PNG_NO_READ_BGR, PNG_NO_IO_STATE, and PNG_NO_TIME_RFC1123 in
+ contrib/pngminim/decoder/pngusr.h to make a smaller decoder application.
+
+Version 1.5.0beta22 [April 28, 2010]
+ Fixed dependencies of GET_INT_32 - it does not require READ_INT_FUNCTIONS
+ because it has a macro equivalent.
+ Improved the options.awk script; added an "everything off" option.
+ Revised contrib/pngminim to use the "everything off" option in pngusr.dfa.
+
+Version 1.5.0beta23 [April 29, 2010]
+ Corrected PNG_REMOVED macro to take five arguments.
+ The macro was documented with two arguments (name,ordinal), however
+ the symbol checking .dfn files assumed five arguments. The five
+ argument form seems more useful so it is changed to that.
+ Corrected PNG_UNKNOWN_CHUNKS_SUPPORTED to PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+ in gregbook/readpng2.c
+ Corrected protection of png_get_user_transform_ptr. The API declaration in
+ png.h is removed if both READ and WRITE USER_TRANSFORM are turned off
+ but was left defined in pngtrans.c
+ Added logunsupported=1 to cause pnglibconf.h to document disabled options.
+ This makes the installed pnglibconf.h more readable but causes no
+ other change. The intention is that users of libpng will find it
+ easier to understand if an API they need is missing.
+ Include png_reset_zstream() in png.c only when PNG_READ_SUPPORTED is defined.
+ Removed dummy_inflate.c from contrib/pngminim/encoder
+ Removed contrib/pngminim/*/gather.sh; gathering is now done in the makefile.
+
+Version 1.5.0beta24 [May 7, 2010]
+ Use bitwise "&" instead of arithmetic mod in pngrutil.c calculation of the
+ offset of the png_ptr->rowbuf pointer into png_ptr->big_row_buf.
+ Added more blank lines for readability.
+
+Version 1.5.0beta25 [June 18, 2010]
+ In pngpread.c: png_push_have_row() add check for new_row > height
+ Removed the now-redundant check for out-of-bounds new_row from example.c
+
+Version 1.5.0beta26 [June 18, 2010]
+ In pngpread.c: png_push_process_row() add check for too many rows.
+
+Version 1.5.0beta27 [June 18, 2010]
+ Removed the check added in beta25 as it is now redundant.
+
+Version 1.5.0beta28 [June 20, 2010]
+ Rewrote png_process_IDAT_data to consistently treat extra data as warnings
+ and handle end conditions more cleanly.
+ Removed the new (beta26) check in png_push_process_row().
+
+Version 1.5.0beta29 [June 21, 2010]
+ Revised scripts/options.awk to work on Sunos (but still doesn't work)
+ Added comment to options.awk and contrib/pngminim/*/makefile to try nawk.
+
+Version 1.5.0beta30 [June 22, 2010]
+ Stop memory leak when reading a malformed sCAL chunk.
+
+Version 1.5.0beta31 [June 26, 2010]
+ Revised pngpread.c patch of beta28 to avoid an endless loop.
+ Removed some trailing blanks.
+
+Version 1.5.0beta32 [June 26, 2010]
+ Removed leftover scripts/options.patch and scripts/options.rej
+
+Version 1.5.0beta33 [July 6, 3010]
+ Made FIXED and FLOATING options consistent in the APIs they enable and
+ disable. Corrected scripts/options.awk to handle both command line
+ options and options specified in the .dfa files.
+ Changed char *msg to PNG_CONST char *msg in pngrutil.c
+ Make png_set_sRGB_gAMA_and_cHRM set values using either the fixed or
+ floating point APIs, but not both.
+ Reversed patch to remove error handler when the jmp_buf is stored in the
+ main program structure, not the png_struct.
+ The error handler is needed because the default handler in libpng will
+ always use the jmp_buf in the library control structure; this is never
+ set. The gregbook code is a useful example because, even though it
+ uses setjmp/longjmp, it shows how error handling can be implemented
+ using control mechanisms not directly supported by libpng. The
+ technique will work correctly with mechanisms such as Microsoft
+ Structure Exceptions or C++ exceptions (compiler willing - note that gcc
+ does not by default support interworking of C and C++ error handling.)
+ Reverted changes to call png_longjmp in contrib/gregbook where it is not
+ appropriate. If mainprog->jmpbuf is used by setjmp, then png_longjmp
+ cannot be used.
+ Changed "extern PNG_EXPORT" to "PNG_EXPORT" in png.h (Jan Nijtmans)
+ Changed "extern" to "PNG_EXTERN" in pngpriv.h (except for the 'extern "C" {')
+
+Version 1.5.0beta34 [July 12, 2010]
+ Put #ifndef PNG_EXTERN, #endif around the define PNG_EXTERN in pngpriv.h
+
+Version 1.5.0beta35 [July 24, 2010]
+ Removed some newly-added TAB characters.
+ Added -DNO_PNG_SNPRINTF to CFLAGS in scripts/makefile.dj2
+ Moved the definition of png_snprintf() outside of the enclosing
+ #ifdef blocks in pngconf.h
+
+Version 1.5.0beta36 [July 29, 2010]
+ Patches by John Bowler:
+ Fixed point APIs are now supported throughout (no missing APIs).
+ Internal fixed point arithmetic support exists for all internal floating
+ point operations.
+ sCAL validates the floating point strings it is passed.
+ Safe, albeit rudimentary, Watcom support is provided by PNG_API_RULE==2
+ Two new APIs exist to get the number of passes without turning on the
+ PNG_INTERLACE transform and to get the number of rows in the current
+ pass.
+ A new test program, pngvalid.c, validates the gamma code.
+ Errors in the 16 bit gamma correction (overflows) have been corrected.
+ cHRM chunk testing is done consistently (previously the floating point
+ API bypassed it, because the test really didn't work on FP, now the test
+ is performed on the actual values to be stored in the PNG file so it
+ works in the FP case too.)
+ Most floating point APIs now simply call the fixed point APIs after
+ converting the values to the fixed point form used in the PNG file.
+ The standard headers no longer include zlib.h, which is currently only
+ required for pngstruct.h and can therefore be internal.
+ Revised png_get_int_32 to undo the PNG two's complement representation of
+ negative numbers.
+
+Version 1.5.0beta37 [July 30, 2010]
+ Added a typecast in png_get_int_32() in png.h and pngrutil.h to avoid
+ a compiler warning.
+ Replaced oFFs 0,0 with oFFs -10,20 in pngtest.png
+
+Version 1.5.0beta38 [July 31, 2010]
+ Implemented remaining "_fixed" functions.
+ Corrected a number of recently introduced warnings mostly resulting from
+ safe but uncast assignments to shorter integers. Also added a zlib
+ VStudio release library project because the latest zlib Official Windows
+ build does not include such a thing.
+ Revised png_get_int_16() to be similar to png_get_int_32().
+ Restored projects/visualc71.
+
+Version 1.5.0beta39 [August 2, 2010]
+ VisualC/GCC warning fixes, VisualC build fixes
+ The changes include support for function attributes in VC in addition to
+ those already present in GCC - necessary because without these some
+ warnings are unavoidable. Fixes include signed/unsigned fixes in
+ pngvalid and checks with gcc -Wall -Wextra -Wunused.
+ VC requires function attributes on function definitions as well as
+ declarations, PNG_FUNCTION has been added to enable this and the
+ relevant function definitions changed.
+
+Version 1.5.0beta40 [August 6, 2010]
+ Correct use of _WINDOWS_ in pngconf.h
+ Removed png_mem_ #defines; they are no longer used.
+ Added the sRGB chunk to pngtest.png
+
+Version 1.5.0beta41 [August 11, 2010]
+ Added the cHRM chunk to pngtest.png
+ Don't try to use version-script with cygwin/mingw.
+ Revised contrib/gregbook to work under cygwin/mingw.
+
+Version 1.5.0beta42 [August 18, 2010]
+ Add .dll.a to the list of extensions to be symlinked by Makefile.am (Yaakov)
+ Made all API functions that have const arguments and constant string
+ literal pointers declare them (John Bowler).
+
+Version 1.5.0beta43 [August 20, 2010]
+ Removed spurious tabs, shorten long lines (no source change)
+ Also added scripts/chkfmt to validate the format of all the files that can
+ reasonably be validated (it is suggested to run "make distclean" before
+ checking, because some machine generated files have long lines.)
+ Reformatted the CHANGES file to be more consistent throughout.
+ Made changes to address various issues identified by GCC, mostly
+ signed/unsigned and shortening problems on assignment but also a few
+ difficult to optimize (for GCC) loops.
+ Fixed non-GCC fixed point builds. In png.c a declaration was misplaced
+ in an earlier update. Fixed to declare the auto variables at the head.
+ Use cexcept.h in pngvalid.c.
+
+Version 1.5.0beta44 [August 24, 2010]
+ Updated CMakeLists.txt to use CMAKE_INSTALL_LIBDIR variable; useful for
+ installing libpng in /usr/lib64 (Funda Wang).
+ Revised CMakeLists.txt to put the man pages in share/man/man* not man/man*
+ Revised CMakeLists.txt to make symlinks instead of copies when installing.
+ Changed PNG_LIB_NAME from pngNN to libpngNN in CMakeLists.txt (Philip Lowman)
+ Implemented memory checks within pngvalid
+ Reformatted/rearranged pngvalid.c to assist use of progressive reader.
+ Check interlaced images in pngvalid
+ Clarified pngusr.h comments in pnglibconf.dfa
+ Simplified the pngvalid error-handling code now that cexcept.h is in place.
+ Implemented progressive reader in pngvalid.c for standard tests
+ Implemented progressive read in pngvalid.c gamma tests
+ Turn on progressive reader in pngvalid.c by default and tidy code.
+
+Version 1.5.0beta45 [August 26, 2010]
+ Added an explicit make step to projects/vstudio for pnglibconf.h
+ Also corrected zlib.vcxproj into which Visual Studio had introduced
+ what it calls an "authoring error". The change to make pnglibconf.h
+ simply copies the file; in the future it may actually generate the
+ file from scripts/pnglibconf.dfa as the other build systems do.
+ Changed pngvalid to work when floating point APIs are disabled
+ Renamed the prebuilt scripts/pnglibconf.h to scripts/pnglibconf.h.prebuilt
+ Supply default values for PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX
+ in pngpriv.h in case the user neglected to define them in their pngusr.h
+
+Version 1.5.0beta46 [August 28, 2010]
+ Added new private header files to libpng_sources in CMakeLists.txt
+ Added PNG_READ_16BIT, PNG_WRITE_16BIT, and PNG_16BIT options.
+ Added reference to scripts/pnglibconf.h.prebuilt in the visualc71 project.
+
+Version 1.5.0beta47 [September 11, 2010]
+ Fixed a number of problems with 64-bit compilation reported by Visual
+ Studio 2010 (John Bowler).
+
+Version 1.5.0beta48 [October 4, 2010]
+ Updated CMakeLists.txt (Philip Lowman).
+ Revised autogen.sh to recognize and use $AUTOCONF, $AUTOMAKE, $AUTOHEADER,
+ $AUTOPOINT, $ACLOCAL and $LIBTOOLIZE
+ Fixed problem with symbols creation in Makefile.am which was assuming that
+ all versions of ccp write to standard output by default (Martin Banky). The
+ bug was introduced in libpng-1.2.9beta5.
+ Removed unused mkinstalldirs.
+
+Version 1.5.0beta49 [October 8, 2010]
+ Undid Makefile.am revision of 1.5.0beta48.
+
+Version 1.5.0beta50 [October 14, 2010]
+ Revised Makefile.in to account for mkinstalldirs being removed.
+ Added some "(unsigned long)" typecasts in printf statements in pngvalid.c.
+ Suppressed a compiler warning in png_handle_sPLT().
+ Check for out-of-range text compression mode in png_set_text().
+
+Version 1.5.0beta51 [October 15, 2010]
+ Changed embedded dates to "(PENDING RELEASE) in beta releases (and future
+ rc releases) to minimize the difference between releases.
+
+Version 1.5.0beta52 [October 16, 2010]
+ Restored some of the embedded dates (in png.h, png.c, documentation, etc.)
+
+Version 1.5.0beta53 [October 18, 2010]
+ Updated INSTALL to mention using "make maintainer-clean" and to remove
+ obsolete statement about a custom ltmain.sh
+ Disabled "color-tests" by default in Makefile.am so it will work with
+ automake versions earlier than 1.11.1
+ Use document name "libpng-manual.txt" instead of "libpng-<version>.txt"
+ to simplify version differences.
+ Removed obsolete remarks about setjmp handling from INSTALL.
+ Revised and renamed the typedef in png.h and png.c that was designed
+ to catch library and header mismatch.
+
+Version 1.5.0beta54 [November 10, 2010]
+ Require 48 bytes, not 64 bytes, for big_row_buf in overflow checks.
+ Used a consistent structure for the pngget.c functions.
+
+Version 1.5.0beta55 [November 21, 2010]
+ Revised png_get_uint_32, png_get_int_32, png_get_uint_16 (Cosmin)
+ Moved reading of file signature into png_read_sig (Cosmin)
+ Fixed atomicity of chunk header serialization (Cosmin)
+ Added test for io_state in pngtest.c (Cosmin)
+ Added "#!/bin/sh" at the top of contrib/pngminim/*/gather.sh scripts.
+ Changes to remove gcc warnings (John Bowler)
+ Certain optional gcc warning flags resulted in warnings in libpng code.
+ With these changes only -Wconversion and -Wcast-qual cannot be turned on.
+ Changes are trivial rearrangements of code. -Wconversion is not possible
+ for pngrutil.c (because of the widespread use of += et al on variables
+ smaller than (int) or (unsigned int)) and -Wcast-qual is not possible
+ with pngwio.c and pngwutil.c because the 'write' callback and zlib
+ compression both fail to declare their input buffers with 'const'.
+
+Version 1.5.0beta56 [December 7, 2010]
+ Added the private PNG_UNUSED() macro definition in pngpriv.h.
+ Added some commentary about PNG_EXPORT in png.h and pngconf.h
+ Revised PNG_EXPORT() macro and added PNG_EXPORTA() macro, with the
+ objective of simplifying and improving the cosmetic appearance of png.h.
+ Fixed some incorrect "=" macro names in pnglibconf.dfa
+ Included documentation of changes in 1.5.0 from 1.4.x in libpng-manual.txt
+
+Version 1.5.0beta57 [December 9, 2010]
+ Documented the pngvalid gamma error summary with additional comments and
+ print statements.
+ Improved missing symbol handling in checksym.awk; symbols missing in both
+ the old and new files can now be optionally ignored, treated as errors
+ or warnings.
+ Removed references to pngvcrd.c and pnggccrd.c from the vstudio project.
+ Updated "libpng14" to "libpng15" in the visualc71 project.
+ Enabled the strip16 tests in pngvalid.`
+ Don't display test results (except PASS/FAIL) when running "make test".
+ Instead put them in pngtest-log.txt
+ Added "--with-zprefix=<string>" to configure.ac
+ Updated the prebuilt configuration files to autoconf version 2.68
+
+Version 1.5.0beta58 [December 19, 2010]
+ Fixed interlace image handling and add test cases (John Bowler)
+ Fixed the clean rule in Makefile.am to remove pngtest-log.txt
+ Made minor changes to work around warnings in gcc 3.4
+
+Version 1.5.0rc01 [December 27, 2010]
+ No changes.
+
+Version 1.5.0rc02 [December 27, 2010]
+ Eliminated references to the scripts/*.def files in project/visualc71.
+
+Version 1.5.0rc03 [December 28, 2010]
+ Eliminated scripts/*.def and revised Makefile.am accordingly
+
+Version 1.5.0rc04 [December 29, 2010]
+ Fixed bug in background transformation handling in pngrtran.c (it was
+ looking for the flag in png_ptr->transformations instead of in
+ png_ptr->flags) (David Raymond).
+
+Version 1.5.0rc05 [December 31, 2010]
+ Fixed typo in a comment in CMakeLists.txt (libpng14 => libpng15) (Cosmin)
+
+Version 1.5.0rc06 [January 4, 2011]
+ Changed the new configure option "zprefix=string" to "zlib-prefix=string"
+
+Version 1.5.0rc07 [January 4, 2011]
+ Updated copyright year.
+
+Version 1.5.0 [January 6, 2011]
+ No changes.
+
+version 1.5.1beta01 [January 8, 2011]
+ Added description of png_set_crc_action() to the manual.
+ Added a note in the manual that the type of the iCCP profile was changed
+ from png_charpp to png_bytepp in png_get_iCCP(). This change happened
+ in version 1.5.0beta36 but is not noted in the CHANGES. Similarly,
+ it was changed from png_charpp to png_const_bytepp in png_set_iCCP().
+ Ensure that png_rgb_to_gray ignores palette mapped images, if libpng
+ internally happens to call it with one.
+ Fixed a failure to handle palette mapped images correctly.
+
+Version 1.5.1beta02 [January 14, 2011]
+ Fixed a bug in handling of interlaced images (bero at arklinux.org).
+ Updated CMakeLists.txt (Clifford Yapp)
+
+Version 1.5.1beta03 [January 14, 2011]
+ Fixed typecasting of some png_debug() statements (Cosmin)
+
+Version 1.5.1beta04 [January 16, 2011]
+ Updated documentation of png_set|get_tRNS() (Thomas Klausner).
+ Mentioned in the documentation that applications must #include "zlib.h"
+ if they need access to anything in zlib.h, and that a number of
+ macros such as png_memset() are no longer accessible by applications.
+ Corrected pngvalid gamma test "sample" function to access all of the color
+ samples of each pixel, instead of sampling the red channel three times.
+ Prefixed variable names index, div, exp, gamma with "png_" to avoid "shadow"
+ warnings, and (mistakenly) changed png_exp() to exp().
+
+Version 1.5.1beta05 [January 16, 2011]
+ Changed variable names png_index, png_div, png_exp, and png_gamma to
+ char_index, divisor, exp_b10, and gamma_val, respectively, and
+ changed exp() back to png_exp().
+
+Version 1.5.1beta06 [January 20, 2011]
+ Prevent png_push_crc_skip() from hanging while reading an unknown chunk
+ or an over-large compressed zTXt chunk with the progressive reader.
+ Eliminated more GCC "shadow" warnings.
+ Revised png_fixed() in png.c to avoid compiler warning about reaching the
+ end without returning anything.
+
+Version 1.5.1beta07 [January 22, 2011]
+ In the manual, describe the png_get_IHDR() arguments in the correct order.
+ Added const_png_structp and const_png_infop types, and used them in
+ prototypes for most png_get_*() functions.
+
+Version 1.5.1beta08 [January 23, 2011]
+ Added png_get_io_chunk_type() and deprecated png_get_io_chunk_name()
+ Added synopses for the IO_STATE functions and other missing synopses
+ to the manual. Removed the synopses from libpngpf.3 because they
+ were out of date and no longer useful. Better information can be
+ obtained by reading the prototypes and comments in pngpriv.h
+ Attempted to fix cpp on Solaris with S. Studio 12 cc, fix build
+ Added a make macro DFNCPP that is a CPP that will accept the tokens in
+ a .dfn file and adds configure stuff to test for such a CPP. ./configure
+ should fail if one is not available.
+ Corrected const_png_ in png.h to png_const_ to avoid polluting the namespace.
+ Added png_get_current_row_number and png_get_current_pass_number for the
+ benefit of the user transform callback.
+ Added png_process_data_pause and png_process_data_skip for the benefit of
+ progressive readers that need to stop data processing or want to optimize
+ skipping of unread data (e.g., if the reader marks a chunk to be skipped.)
+
+Version 1.5.1beta09 [January 24, 2011]
+ Enhanced pngvalid, corrected an error in gray_to_rgb, corrected doc error.
+ pngvalid contains tests of transforms, which tests are currently disabled
+ because they are incompletely tested. gray_to_rgb was failing to expand
+ the bit depth for smaller bit depth images; this seems to be a long
+ standing error and resulted, apparently, in invalid output. The
+ documentation did not accurately describe what libpng really does when
+ converting RGB to gray.
+
+Version 1.5.1beta10 [January 27, 2010]
+ Fixed incorrect examples of callback prototypes in the manual, that were
+ introduced in libpng-1.0.0.
+ In addition the order of the png_get_uint macros with respect to the
+ relevant function definitions has been reversed. This helps the
+ preprocessing of the symbol files be more robust. Furthermore, the
+ symbol file preprocessing now uses -DPNG_NO_USE_READ_MACROS even when
+ the library may actually be built with PNG_USE_READ_MACROS; this stops
+ the read macros interfering with the symbol file format.
+ Made the manual, synopses, and function prototypes use the function
+ argument names file_gamma, int_file_gamma, and srgb_intent consistently.
+
+Version 1.5.1beta11 [January 28, 2011]
+ Changed PNG_UNUSED from "param=param;" to "{if(param){}}".
+ Corrected local variable type in new API png_process_data_skip()
+ The type was self-evidently incorrect but only causes problems on 64 bit
+ architectures.
+ Added transform tests to pngvalid and simplified the arguments.
+
+Version 1.5.1rc01 [January 29, 2011]
+ No changes.
+
+Version 1.5.1rc02 [January 31, 2011]
+ Added a request in the manual that applications do not use "png_" or
+ "PNG_" to begin any of their own symbols.
+ Changed PNG_UNUSED to "(void)param;" and updated the commentary in pngpriv.h
+
+Version 1.5.1 [February 3, 2011]
No changes.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
diff --git a/src/3rdparty/libpng/CMakeLists.txt b/src/3rdparty/libpng/CMakeLists.txt
index a95e0ec..2ee5bf3 100644
--- a/src/3rdparty/libpng/CMakeLists.txt
+++ b/src/3rdparty/libpng/CMakeLists.txt
@@ -1,43 +1,58 @@
-cmake_minimum_required(VERSION 2.4.3)
+cmake_minimum_required(VERSION 2.4.4)
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
+
if(UNIX AND NOT DEFINED CMAKE_BUILD_TYPE)
- set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of
- build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug
- Release RelWithDebInfo MinSizeRel.")
+ if(CMAKE_MAJOR_VERSION EQUAL 2 AND CMAKE_MINOR_VERSION EQUAL 4)
+ # workaround CMake 2.4.x bug
+ set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
+ "Choose the type of build, options are:
+ None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
+ Debug
+ Release
+ RelWithDebInfo
+ MinSizeRel.")
+ else()
+ set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING
+ "Choose the type of build, options are:
+ None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used)
+ Debug
+ Release
+ RelWithDebInfo
+ MinSizeRel.")
+ endif()
endif()
-project(PNG C)
+project(libpng C)
enable_testing()
-# Copyright (C) 2007-2010 Glenn Randers-Pehrson
+# Copyright (C) 2007-2011 Glenn Randers-Pehrson
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
# and license in png.h
set(PNGLIB_MAJOR 1)
-set(PNGLIB_MINOR 4)
-set(PNGLIB_RELEASE 0)
+set(PNGLIB_MINOR 5)
+set(PNGLIB_RELEASE 1)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
-set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
-
# needed packages
find_package(ZLIB REQUIRED)
include_directories(${ZLIB_INCLUDE_DIR})
if(NOT WIN32)
- find_library(M_LIBRARY
- NAMES m
- PATHS /usr/lib /usr/local/lib
- )
- if(NOT M_LIBRARY)
- message(STATUS
- "math library 'libm' not found - floating point support disabled")
- endif()
+ find_library(M_LIBRARY
+ NAMES m
+ PATHS /usr/lib /usr/local/lib
+ )
+ if(NOT M_LIBRARY)
+ message(STATUS
+ "math library 'libm' not found - floating point support disabled")
+ endif()
else()
- # not needed on windows
- set(M_LIBRARY "")
+ # not needed on windows
+ set(M_LIBRARY "")
endif()
# COMMAND LINE OPTIONS
@@ -54,9 +69,9 @@ endif()
if(MINGW)
option(PNG_TESTS "Build pngtest" NO)
-else(MINGW)
+else()
option(PNG_TESTS "Build pngtest" YES)
-endif(MINGW)
+endif()
option(PNG_NO_CONSOLE_IO "FIXME" YES)
option(PNG_NO_STDIO "FIXME" YES)
@@ -68,21 +83,22 @@ option(PNGARG "FIXME" YES)
# maybe needs improving, but currently I don't know when we can enable what :)
set(png_asm_tmp "OFF")
if(NOT WIN32)
- find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
- if(uname_executable)
- EXEC_PROGRAM(${uname_executable} ARGS --machine OUTPUT_VARIABLE uname_output)
- if("uname_output" MATCHES "^.*i[1-9]86.*$")
+ find_program(uname_executable NAMES uname PATHS /bin /usr/bin /usr/local/bin)
+ if(uname_executable)
+ exec_program(${uname_executable}
+ ARGS --machine OUTPUT_VARIABLE uname_output)
+ if("uname_output" MATCHES "^.*i[1-9]86.*$")
set(png_asm_tmp "ON")
- else("uname_output" MATCHES "^.*i[1-9]86.*$")
+ else("uname_output" MATCHES "^.*i[1-9]86.*$")
set(png_asm_tmp "OFF")
- endif("uname_output" MATCHES "^.*i[1-9]86.*$")
- endif(uname_executable)
+ endif("uname_output" MATCHES "^.*i[1-9]86.*$")
+ endif(uname_executable)
else()
- # this env var is normally only set on win64
- SET(TEXT "ProgramFiles(x86)")
- if("$ENV{${TEXT}}" STREQUAL "")
- set(png_asm_tmp "ON")
- endif("$ENV{${TEXT}}" STREQUAL "")
+ # this env var is normally only set on win64
+ set(TEXT "ProgramFiles(x86)")
+ if("$ENV{${TEXT}}" STREQUAL "")
+ set(png_asm_tmp "ON")
+ endif("$ENV{${TEXT}}" STREQUAL "")
endif()
# SET LIBNAME
@@ -91,165 +107,290 @@ set(PNG_LIB_NAME png${PNGLIB_MAJOR}${PNGLIB_MINOR})
# to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d")
+# Use the prebuilt pnglibconf.h file from the scripts folder
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/pnglibconf.h.prebuilt
+ ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
# OUR SOURCES
+set(libpng_public_hdrs
+ png.h
+ pngconf.h
+ ${CMAKE_CURRENT_BINARY_DIR}/pnglibconf.h
+)
set(libpng_sources
- png.h
- pngconf.h
- pngpriv.h
- png.c
- pngerror.c
- pngget.c
- pngmem.c
- pngpread.c
- pngread.c
- pngrio.c
- pngrtran.c
- pngrutil.c
- pngset.c
- pngtrans.c
- pngwio.c
- pngwrite.c
- pngwtran.c
- pngwutil.c
+ ${libpng_public_hdrs}
+ pngdebug.h
+ pnginfo.h
+ pngpriv.h
+ pngstruct.h
+ png.c
+ pngerror.c
+ pngget.c
+ pngmem.c
+ pngpread.c
+ pngread.c
+ pngrio.c
+ pngrtran.c
+ pngrutil.c
+ pngset.c
+ pngtrans.c
+ pngwio.c
+ pngwrite.c
+ pngwtran.c
+ pngwutil.c
)
set(pngtest_sources
- pngtest.c
+ pngtest.c
)
# SOME NEEDED DEFINITIONS
add_definitions(-DPNG_CONFIGURE_LIBPNG)
+if(_AIX)
+ add_definitions(-D_ALL_SOURCE)
+endif(_AIX)
+
if(MSVC)
add_definitions(-DPNG_NO_MODULEDEF -D_CRT_SECURE_NO_DEPRECATE)
endif(MSVC)
if(PNG_SHARED OR NOT MSVC)
- #if building msvc static this has NOT to be defined
- add_definitions(-DZLIB_DLL)
+ #if building msvc static this has NOT to be defined
+ add_definitions(-DZLIB_DLL)
endif()
+
if(PNG_CONSOLE_IO_SUPPORTED)
- add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
+ add_definitions(-DPNG_CONSOLE_IO_SUPPORTED)
endif()
if(PNG_NO_CONSOLE_IO)
- add_definitions(-DPNG_NO_CONSOLE_IO)
+ add_definitions(-DPNG_NO_CONSOLE_IO)
endif()
if(PNG_NO_STDIO)
- add_definitions(-DPNG_NO_STDIO)
+ add_definitions(-DPNG_NO_STDIO)
endif()
if(PNG_DEBUG)
- add_definitions(-DPNG_DEBUG)
+ add_definitions(-DPNG_DEBUG)
endif()
if(NOT M_LIBRARY AND NOT WIN32)
- add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
+ add_definitions(-DPNG_NO_FLOATING_POINT_SUPPORTED)
endif()
# NOW BUILD OUR TARGET
-include_directories(${PNG_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
+include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${ZLIB_INCLUDE_DIR})
if(PNG_SHARED)
- add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
- if(MSVC)
- # msvc does not append 'lib' - do it here to have consistent name
- set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
- endif()
- target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
+ add_library(${PNG_LIB_NAME} SHARED ${libpng_sources})
+ if(MSVC)
+ # msvc does not append 'lib' - do it here to have consistent name
+ set_target_properties(${PNG_LIB_NAME} PROPERTIES PREFIX "lib")
+ set_target_properties(${PNG_LIB_NAME} PROPERTIES IMPORT_PREFIX "lib")
+ endif()
+ target_link_libraries(${PNG_LIB_NAME} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif()
if(PNG_STATIC)
# does not work without changing name
- set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
- add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
- if(MSVC)
- # msvc does not append 'lib' - do it here to have consistent name
- set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
- endif()
+ set(PNG_LIB_NAME_STATIC ${PNG_LIB_NAME}_static)
+ add_library(${PNG_LIB_NAME_STATIC} STATIC ${libpng_sources})
+ if(MSVC)
+ # msvc does not append 'lib' - do it here to have consistent name
+ set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES PREFIX "lib")
+ endif()
+ target_link_libraries(${PNG_LIB_NAME_STATIC} ${ZLIB_LIBRARY} ${M_LIBRARY})
endif()
if(PNG_SHARED AND WIN32)
- set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
+ set_target_properties(${PNG_LIB_NAME} PROPERTIES DEFINE_SYMBOL PNG_BUILD_DLL)
endif()
if(PNG_TESTS AND PNG_SHARED)
-# does not work with msvc due to png_lib_ver issue
- add_executable(pngtest ${pngtest_sources})
- target_link_libraries(pngtest ${PNG_LIB_NAME})
- add_test(pngtest pngtest ${PNG_SOURCE_DIR}/pngtest.png)
+ # does not work with msvc due to png_lib_ver issue
+ add_executable(pngtest ${pngtest_sources})
+ target_link_libraries(pngtest ${PNG_LIB_NAME})
+ add_test(pngtest ./pngtest ${CMAKE_CURRENT_SOURCE_DIR}/pngtest.png)
endif()
+#
+# Set a variable with CMake code which:
+# Creates a symlink from src to dest (if possible) or alternatively
+# copies if different.
+macro(_png_generate_symlink_code CODE SRC DEST)
+ if(WIN32 AND NOT CYGWIN)
+ set(_png_gsc_message "Copying ${SRC} to ${DEST} if needed")
+ set(_png_gsc_operation "copy_if_different")
+ else()
+ set(_png_gsc_message "Symlinking ${SRC} to ${DEST}")
+ set(_png_gsc_operation "create_symlink")
+ endif()
+
+ set(${CODE} "
+ message(STATUS \"${_png_gsc_message}\")
+ execute_process(COMMAND \${CMAKE_COMMAND} -E ${_png_gsc_operation}
+ \"${SRC}\" \"${DEST}\")
+ ")
+endmacro()
# CREATE PKGCONFIG FILES
# we use the same files like ./configure, so we have to set its vars
+if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
+ set(CMAKE_INSTALL_LIBDIR lib)
+endif(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(prefix ${CMAKE_INSTALL_PREFIX})
set(exec_prefix ${CMAKE_INSTALL_PREFIX})
-set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
+set(libdir ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR})
set(includedir ${CMAKE_INSTALL_PREFIX}/include)
-
-configure_file(${PNG_SOURCE_DIR}/libpng.pc.in
- ${PNG_BINARY_DIR}/libpng.pc)
-configure_file(${PNG_SOURCE_DIR}/libpng-config.in
- ${PNG_BINARY_DIR}/libpng-config)
-configure_file(${PNG_SOURCE_DIR}/libpng.pc.in
- ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc)
-configure_file(${PNG_SOURCE_DIR}/libpng-config.in
- ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config)
+set(LIBS "-lz -lm")
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng.pc.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc @ONLY)
+_png_generate_symlink_code(PNG_PC_INSTALL_CODE
+ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc)
+install(CODE ${PNG_PC_INSTALL_CODE})
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/libpng-config.in
+ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config @ONLY)
+_png_generate_symlink_code(PNG_CONFIG_INSTALL_CODE
+ ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng-config)
+install(CODE ${PNG_CONFIG_INSTALL_CODE})
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES
-# VERSION 14.${PNGLIB_RELEASE}.1.4.0
- VERSION 14.${PNGLIB_RELEASE}.0
- SOVERSION 14
- CLEAN_DIRECT_OUTPUT 1)
+# VERSION 15.${PNGLIB_RELEASE}.1.5.1
+ VERSION 15.${PNGLIB_RELEASE}.0
+ SOVERSION 15
+ CLEAN_DIRECT_OUTPUT 1)
endif()
if(PNG_STATIC)
- if(NOT WIN32)
- # that's uncool on win32 - it overwrites our static import lib...
+ # MSVC doesn't use a different file extension for shared vs. static
+ # libs. We are able to change OUTPUT_NAME to remove the _static
+ # for all other platforms.
+ if(NOT MSVC)
set_target_properties(${PNG_LIB_NAME_STATIC} PROPERTIES
- OUTPUT_NAME ${PNG_LIB_NAME}
- CLEAN_DIRECT_OUTPUT 1)
+ OUTPUT_NAME ${PNG_LIB_NAME}
+ CLEAN_DIRECT_OUTPUT 1)
endif()
endif()
+# If CMake > 2.4.x, we set a variable used below to export
+# targets to an export file.
+# TODO: Use VERSION_GREATER after our cmake_minimum_required >= 2.6.2
+if(CMAKE_MAJOR_VERSION GREATER 1 AND CMAKE_MINOR_VERSION GREATER 4)
+ set(PNG_EXPORT_RULE EXPORT libpng)
+elseif(CMAKE_MAJOR_VERSION GREATER 2) # future proof
+ set(PNG_EXPORT_RULE EXPORT libpng)
+endif()
+
# INSTALL
if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
- if(PNG_SHARED)
- install(TARGETS ${PNG_LIB_NAME}
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
+ if(PNG_SHARED)
+ install(TARGETS ${PNG_LIB_NAME}
+ ${PNG_EXPORT_RULE}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+
+ # Create a symlink for libpng.dll.a => libpng15.dll.a on Cygwin
+ if(CYGWIN)
+ _png_generate_symlink_code(PNG_SHARED_IMPLIB_INSTALL_CODE
+ ${PNGLIB_NAME}${CMAKE_IMPORT_LIBRARY_SUFFIX}
+ libpng${CMAKE_IMPORT_LIBRARY_SUFFIX})
+ install(CODE ${PNG_SHARED_IMPLIB_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_IMPORT_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
endif()
- if(PNG_STATIC)
- install(TARGETS ${PNG_LIB_NAME_STATIC}
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib)
+
+ if(NOT WIN32)
+ IF(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+ _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
+ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
+ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
+ install(CODE ${PNG_SHARED_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ELSE(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
+ _png_generate_symlink_code(PNG_SHARED_INSTALL_CODE
+ ${PNGLIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}
+ libpng${CMAKE_SHARED_LIBRARY_SUFFIX})
+ install(CODE ${PNG_SHARED_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_SHARED_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ENDIF(CMAKE_LIBRARY_OUTPUT_DIRECTORY)
endif()
+ endif()
+
+ if(PNG_STATIC)
+ install(TARGETS ${PNG_LIB_NAME_STATIC}
+ ${PNG_EXPORT_RULE}
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ if(NOT WIN32 OR CYGWIN)
+ IF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+ _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
+${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
+ ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
+ install(CODE ${PNG_STATIC_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ELSE(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+ _png_generate_symlink_code(PNG_STATIC_INSTALL_CODE
+ ${PNGLIB_NAME}${CMAKE_STATIC_LIBRARY_SUFFIX}
+ libpng${CMAKE_STATIC_LIBRARY_SUFFIX})
+ install(CODE ${PNG_STATIC_INSTALL_CODE})
+ install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/libpng${CMAKE_STATIC_LIBRARY_SUFFIX}
+ DESTINATION ${CMAKE_INSTALL_LIBDIR})
+ ENDIF(CMAKE_ARCHIVE_OUTPUT_DIRECTORY)
+ endif()
+ endif()
endif()
if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
- install(FILES png.h pngconf.h pngpriv.h DESTINATION include)
- install(FILES png.h pngconf.h pngpriv.h DESTINATION include/${PNGLIB_NAME})
+ install(FILES ${libpng_public_hdrs} DESTINATION include)
+ install(FILES ${libpng_public_hdrs} DESTINATION include/${PNGLIB_NAME})
endif()
if(NOT SKIP_INSTALL_EXECUTABLES AND NOT SKIP_INSTALL_ALL )
- install(PROGRAMS ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
- install(PROGRAMS ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config DESTINATION bin)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
+ DESTINATION bin)
endif()
if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
- install(FILES libpng.3 libpngpf.3 DESTINATION man/man3)
- install(FILES png.5 DESTINATION man/man5)
- install(FILES ${PNG_BINARY_DIR}/libpng.pc DESTINATION lib/pkgconfig)
- install(FILES ${PNG_BINARY_DIR}/libpng-config DESTINATION bin)
- install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}.pc DESTINATION lib/pkgconfig)
- install(FILES ${PNG_BINARY_DIR}/${PNGLIB_NAME}-config DESTINATION bin)
+ # Install man pages
+ if(NOT PNG_MAN_DIR)
+ set(PNG_MAN_DIR "share/man")
+ endif()
+ install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
+ install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
+ # Install pkg-config files
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
+ DESTINATION bin)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}.pc
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
+ install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PNGLIB_NAME}-config
+ DESTINATION bin)
+endif()
+
+# On versions of CMake that support it, create an export file CMake
+# users can include() to import our targets
+if(PNG_EXPORT_RULE AND NOT SKIP_INSTALL_EXPORT AND NOT SKIP_INSTALL_ALL )
+ install(EXPORT libpng DESTINATION lib/libpng FILE lib${PNG_LIB_NAME}.cmake)
endif()
-# what's with libpng.txt and all the extra files?
+# what's with libpng-$VER%.txt and all the extra files?
# UNINSTALL
diff --git a/src/3rdparty/libpng/INSTALL b/src/3rdparty/libpng/INSTALL
index 79f02e77..353bfff 100644
--- a/src/3rdparty/libpng/INSTALL
+++ b/src/3rdparty/libpng/INSTALL
@@ -1,5 +1,5 @@
-Installing libpng version 1.4.0 - January 3, 2010
+Installing libpng
On Unix/Linux and similar systems, you can simply type
@@ -13,10 +13,16 @@ If configure does not work on your system and you have a reasonably
up-to-date set of tools, running ./autogen.sh before running ./configure
may fix the problem. You can also run the individual commands in
autogen.sh with the --force option, if supported by your version of
-the tools. If you run 'libtoolize --force', though, this will replace
-the distributed, patched, version of ltmain.sh with an unpatched version
-and your shared library builds may fail to produce libraries with the
-correct version numbers.
+the tools. To be really sure that you aren't using any of the included
+pre-built scripts, you can do this:
+
+ ./configure --enable-maintainer-mode
+ make maintainer-clean
+ ./autogen.sh
+ ./configure [--prefix=/path] [other options]
+ make
+ make install
+ make check
Instead, you can use one of the custom-built makefiles in the
"scripts" directory
@@ -46,8 +52,8 @@ to have access to the zlib.h and zconf.h include files that
correspond to the version of zlib that's installed.
You can rename the directories that you downloaded (they
-might be called "libpng-1.4.0" or "libpng14" and "zlib-1.2.3"
-or "zlib123") so that you have directories called "zlib" and "libpng".
+might be called "libpng-x.y.z" or "libpngNN" and "zlib-1.2.5"
+or "zlib125") so that you have directories called "zlib" and "libpng".
Your directory structure should look like this:
@@ -60,8 +66,8 @@ Your directory structure should look like this:
CMakeLists.txt => "cmake" script
configuration files:
configure.ac, configure, Makefile.am, Makefile.in,
- autogen.sh, config.guess, ltmain.sh, missing,
- aclocal.m4, config.h.in, config.sub,
+ autogen.sh, config.guess, ltmain.sh, missing, libpng.pc.in,
+ libpng-config.in, aclocal.m4, config.h.in, config.sub,
depcomp, install-sh, mkinstalldirs, test-pngtest.sh
contrib
gregbook
@@ -70,13 +76,12 @@ Your directory structure should look like this:
pngsuite
visupng
projects
- cbuilder5 (Borland)
- visualc6 (msvc)
visualc71
- xcode
+ vstudio
scripts
makefile.*
*.def (module definition files)
+ etc.
pngtest.png
etc.
zlib
@@ -107,7 +112,7 @@ scripts directory into this directory, for example
Read the makefile to see if you need to change any source or
target directories to match your preferences.
-Then read pngconf.h to see if you want to make any configuration
+Then read pnglibconf.dfa to see if you want to make any configuration
changes.
Then just run "make" which will create the libpng library in
@@ -125,19 +130,6 @@ do that, run "make install" in the zlib directory first if necessary).
Some also allow you to run "make test-installed" after you have
run "make install".
-If you encounter a compiler error message complaining about the
-lines
-
- __png.h__ already includes setjmp.h;
- __dont__ include it again.;
-
-this means you have compiled another module that includes setjmp.h,
-which is hazardous because the two modules might not include exactly
-the same setjmp.h. If you are sure that you know what you are doing
-and that they are exactly the same, then you can comment out or
-delete the two lines. Better yet, use the cexcept interface
-instead, as demonstrated in contrib/visupng of the libpng distribution.
-
-Further information can be found in the README and libpng.txt
+Further information can be found in the README and libpng-manual.txt
files, in the individual makefiles, in png.h, and the manual pages
libpng.3 and png.5.
diff --git a/src/3rdparty/libpng/LICENSE b/src/3rdparty/libpng/LICENSE
index 7462ec3..b28f15c 100644
--- a/src/3rdparty/libpng/LICENSE
+++ b/src/3rdparty/libpng/LICENSE
@@ -10,8 +10,8 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.4.0, January 3, 2010, are
-Copyright (c) 2004, 2006-2007 Glenn Randers-Pehrson, and are
+libpng versions 1.2.6, August 15, 2004, through 1.5.1, February 3, 2011, are
+Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-January 3, 2010
+February 3, 2011
diff --git a/src/3rdparty/libpng/README b/src/3rdparty/libpng/README
index 68d7a8e..9dd6745 100644
--- a/src/3rdparty/libpng/README
+++ b/src/3rdparty/libpng/README
@@ -1,4 +1,4 @@
-README for libpng version 1.4.0 - January 3, 2010 (shared library 14.0)
+README for libpng version 1.5.1 - February 3, 2011 (shared library 15.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.
@@ -58,7 +58,7 @@ on the PNG-implement mailing list and not on material submitted
privately to Guy, Andreas, or Glenn. They will forward any good
suggestions to the list.
-For a detailed description on using libpng, read libpng.txt. For
+For a detailed description on using libpng, read libpng-manual.txt. For
examples of libpng in a program, see example.c and pngtest.c. For usage
information and restrictions (what little they are) on libpng, see
png.h. For a description on using zlib (the compression library used by
@@ -141,13 +141,17 @@ Files in this distribution:
TODO => Things not implemented in the current library
Y2KINFO => Statement of Y2K compliance
example.c => Example code for using libpng functions
- libpng.3 => manual page for libpng (includes libpng.txt)
- libpng.txt => Description of libpng and its functions
+ libpng.3 => manual page for libpng (includes libpng-manual.txt)
+ libpng-manual.txt => Description of libpng and its functions
libpngpf.3 => manual page for libpng's private functions
png.5 => manual page for the PNG format
png.c => Basic interface functions common to library
- png.h => Library function and interface declarations
- pngconf.h => System specific library configuration
+ png.h => Library function and interface declarations (public)
+ pngpriv.h => Library function and interface declarations (private)
+ pngconf.h => System specific library configuration (public)
+ pngstruct.h => png_struct declaration (private)
+ pnginfo.h => png_info struct declaration (private)
+ pngdebug.h => debugging macros (private)
pngerror.c => Error/warning message I/O functions
pngget.c => Functions for retrieving info from struct
pngmem.c => Memory handling functions
@@ -176,72 +180,16 @@ Files in this distribution:
visupng => Contains a MSVC workspace for VisualPng
projects => Contains project files and workspaces for
building a DLL
- c5builder => Contains a Borland workspace for building
+ cbuilder5 => Contains a Borland workspace for building
libpng and zlib
visualc6 => Contains a Microsoft Visual C++ (MSVC)
workspace for building libpng and zlib
+ visualc71 => Contains a Microsoft Visual C++ (MSVC)
+ workspace for building libpng and zlib
+ xcode => Contains an Apple xcode
+ workspace for building libpng and zlib
scripts => Directory containing scripts for building libpng:
- descrip.mms => VMS makefile for MMS or MMK
- makefile.std => Generic UNIX makefile (cc, creates static
- libpng.a)
- makefile.elf => Linux/ELF makefile symbol versioning,
- gcc, creates libpng14.so.14.1.4.0)
- makefile.linux => Linux/ELF makefile
- (gcc, creates libpng14.so.14.1.4.0)
- makefile.gcc => Generic makefile (gcc, creates static libpng.a)
- makefile.knr => Archaic UNIX Makefile that converts files with
- ansi2knr (Requires ansi2knr.c from
- ftp://ftp.cs.wisc.edu/ghost)
- makefile.aix => AIX makefile
- makefile.cygwin => Cygwin/gcc makefile
- makefile.darwin => Darwin makefile
- makefile.dec => DEC Alpha UNIX makefile
- makefile.freebsd => FreeBSD makefile
- makefile.hpgcc => HPUX makefile using gcc
- makefile.hpux => HPUX (10.20 and 11.00) makefile
- makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64 bit
- makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
- makefile.intel => Intel C/C++ version 4.0 and later
- makefile.mingw => Mingw/gcc makefile
- makefile.netbsd => NetBSD/cc makefile, makes libpng.so.
- makefile.ne14bsd => NetBSD/cc makefile, makes
- libpng14.so
- makefile.openbsd => OpenBSD makefile
- makefile.sgi => Silicon Graphics IRIX (cc, creates static lib)
- makefile.sggcc => Silicon Graphics
- (gcc, creates libpng14.so.14.1.4.0)
- makefile.sunos => Sun makefile
- makefile.solaris => Solaris 2.X makefile
- (gcc, creates libpng14.so.14.1.4.0)
- makefile.so9 => Solaris 9 makefile
- (gcc, creates libpng14.so.14.1.4.0)
- makefile.32sunu => Sun Ultra 32-bit makefile
- makefile.64sunu => Sun Ultra 64-bit makefile
- makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
- makefile.mips => MIPS makefile
- makefile.acorn => Acorn makefile
- makefile.amiga => Amiga makefile
- smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC
- compiler (Requires SCOPTIONS, copied from
- scripts/SCOPTIONS.ppc)
- makefile.atari => Atari makefile
- makefile.beos => BEOS makefile for X86
- makefile.bor => Borland makefile (uses bcc)
- makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
- makefile.tc3 => Turbo C 3.0 makefile
- makefile.dj2 => DJGPP 2 makefile
- makefile.msc => Microsoft C makefile
- makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and
- later (does not use assembler code)
- makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
- png32ce.def => module definition for makefile.cegccg
- pngos2.def => OS/2 module definition file used by
- makefile.os2
- pngwin.def => module definition file used by
- makefile.cygwin and makefile.mingw
- makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
- makevms.com => VMS build script
- SCOPTIONS.ppc => Used with smakefile.ppc
+ (see scripts/README.txt for the list of scripts)
Good luck, and happy coding.
diff --git a/src/3rdparty/libpng/TODO b/src/3rdparty/libpng/TODO
index 7fe1ddf..6e1f028 100644
--- a/src/3rdparty/libpng/TODO
+++ b/src/3rdparty/libpng/TODO
@@ -2,12 +2,10 @@
TODO - list of things to do for libpng:
Final bug fixes.
-Improve API by hiding the png_struct and png_info structs.
-Finish work on the no-floating-point version (including gamma compensation)
Better C++ wrapper/full C++ implementation?
Fix problem with C++ and EXTERN "C".
cHRM transformation.
-Improve setjmp/longjmp usage or remove it in favor of returning error codes.
+Remove setjmp/longjmp usage in favor of returning error codes.
Add "grayscale->palette" transformation and "palette->grayscale" detection.
Improved dithering.
Multi-lingual error and warning message support.
@@ -18,14 +16,12 @@ Better filter selection
(counting huffman bits/precompression? filter inertia? filter costs?).
Histogram creation.
Text conversion between different code pages (Latin-1 -> Mac and DOS).
-Build gamma tables using fixed point (and do away with floating point entirely).
Avoid building gamma tables whenever possible.
Use greater precision when changing to linear gamma for compositing against
background and doing rgb-to-gray transformation.
Investigate pre-incremented loop counters and other loop constructions.
Add interpolated method of handling interlacing.
-Provide for conditional compilation of 16-bit support (except for the
- initial stripping down to 8-bits when reading a 16-bit PNG datastream).
Switch to the simpler zlib (zlib/libpng) license if legally possible.
+Extend pngvalid.c to validate more of the libpng transformations.
*/
diff --git a/src/3rdparty/libpng/aclocal.m4 b/src/3rdparty/libpng/aclocal.m4
deleted file mode 100644
index 27bc57c..0000000
--- a/src/3rdparty/libpng/aclocal.m4
+++ /dev/null
@@ -1,8949 +0,0 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 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.
-
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
-You have another version of autoconf. It may work, but is not guaranteed to.
-If you have problems, you may need to regenerate the build system entirely.
-To do so, use the procedure documented by the package, typically `autoreconf'.])])
-
-# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 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.
-
-m4_define([_LT_COPYING], [dnl
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-])
-
-# serial 56 LT_INIT
-
-
-# LT_PREREQ(VERSION)
-# ------------------
-# Complain and exit if this libtool version is less that VERSION.
-m4_defun([LT_PREREQ],
-[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
- [m4_default([$3],
- [m4_fatal([Libtool version $1 or higher is required],
- 63)])],
- [$2])])
-
-
-# _LT_CHECK_BUILDDIR
-# ------------------
-# Complain if the absolute build directory name contains unusual characters
-m4_defun([_LT_CHECK_BUILDDIR],
-[case `pwd` in
- *\ * | *\ *)
- AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
-esac
-])
-
-
-# LT_INIT([OPTIONS])
-# ------------------
-AC_DEFUN([LT_INIT],
-[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
-AC_BEFORE([$0], [LT_LANG])dnl
-AC_BEFORE([$0], [LT_OUTPUT])dnl
-AC_BEFORE([$0], [LTDL_INIT])dnl
-m4_require([_LT_CHECK_BUILDDIR])dnl
-
-dnl Autoconf doesn't catch unexpanded LT_ macros by default:
-m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
-m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
-dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
-dnl unless we require an AC_DEFUNed macro:
-AC_REQUIRE([LTOPTIONS_VERSION])dnl
-AC_REQUIRE([LTSUGAR_VERSION])dnl
-AC_REQUIRE([LTVERSION_VERSION])dnl
-AC_REQUIRE([LTOBSOLETE_VERSION])dnl
-m4_require([_LT_PROG_LTMAIN])dnl
-
-dnl Parse OPTIONS
-_LT_SET_OPTIONS([$0], [$1])
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-AC_SUBST(LIBTOOL)dnl
-
-_LT_SETUP
-
-# Only expand once:
-m4_define([LT_INIT])
-])# LT_INIT
-
-# Old names:
-AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
-AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
-dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
-
-
-# _LT_CC_BASENAME(CC)
-# -------------------
-# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
-m4_defun([_LT_CC_BASENAME],
-[for cc_temp in $1""; do
- case $cc_temp in
- compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
- distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-])
-
-
-# _LT_FILEUTILS_DEFAULTS
-# ----------------------
-# It is okay to use these file commands and assume they have been set
-# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
-m4_defun([_LT_FILEUTILS_DEFAULTS],
-[: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-])# _LT_FILEUTILS_DEFAULTS
-
-
-# _LT_SETUP
-# ---------
-m4_defun([_LT_SETUP],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-_LT_DECL([], [host_alias], [0], [The host system])dnl
-_LT_DECL([], [host], [0])dnl
-_LT_DECL([], [host_os], [0])dnl
-dnl
-_LT_DECL([], [build_alias], [0], [The build system])dnl
-_LT_DECL([], [build], [0])dnl
-_LT_DECL([], [build_os], [0])dnl
-dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-dnl
-AC_REQUIRE([AC_PROG_LN_S])dnl
-test -z "$LN_S" && LN_S="ln -s"
-_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
-dnl
-AC_REQUIRE([LT_CMD_MAX_LEN])dnl
-_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
-_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
-dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_CHECK_SHELL_FEATURES])dnl
-m4_require([_LT_CMD_RELOAD])dnl
-m4_require([_LT_CHECK_MAGIC_METHOD])dnl
-m4_require([_LT_CMD_OLD_ARCHIVE])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-
-_LT_CONFIG_LIBTOOL_INIT([
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-])
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-_LT_CHECK_OBJDIR
-
-m4_require([_LT_TAG_COMPILER])dnl
-_LT_PROG_ECHO_BACKSLASH
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\([["`\\]]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-_LT_CC_BASENAME([$compiler])
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- _LT_PATH_MAGIC
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-LT_SUPPORTED_TAG([CC])
-_LT_LANG_C_CONFIG
-_LT_LANG_DEFAULT_CONFIG
-_LT_CONFIG_COMMANDS
-])# _LT_SETUP
-
-
-# _LT_PROG_LTMAIN
-# ---------------
-# Note that this code is called both from `configure', and `config.status'
-# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
-# `config.status' has no value for ac_aux_dir unless we are using Automake,
-# so we pass a copy along to make sure it has a sensible value anyway.
-m4_defun([_LT_PROG_LTMAIN],
-[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
-_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
-ltmain="$ac_aux_dir/ltmain.sh"
-])# _LT_PROG_LTMAIN
-
-
-
-# So that we can recreate a full libtool script including additional
-# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
-# in macros and then make a single call at the end using the `libtool'
-# label.
-
-
-# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
-# ----------------------------------------
-# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL_INIT],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_INIT])
-
-
-# _LT_CONFIG_LIBTOOL([COMMANDS])
-# ------------------------------
-# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
-m4_define([_LT_CONFIG_LIBTOOL],
-[m4_ifval([$1],
- [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
- [$1
-])])])
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
-
-
-# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
-# -----------------------------------------------------
-m4_defun([_LT_CONFIG_SAVE_COMMANDS],
-[_LT_CONFIG_LIBTOOL([$1])
-_LT_CONFIG_LIBTOOL_INIT([$2])
-])
-
-
-# _LT_FORMAT_COMMENT([COMMENT])
-# -----------------------------
-# Add leading comment marks to the start of each line, and a trailing
-# full-stop to the whole comment if one is not present already.
-m4_define([_LT_FORMAT_COMMENT],
-[m4_ifval([$1], [
-m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
- [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
-)])
-
-
-
-
-
-# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
-# -------------------------------------------------------------------
-# CONFIGNAME is the name given to the value in the libtool script.
-# VARNAME is the (base) name used in the configure script.
-# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
-# VARNAME. Any other value will be used directly.
-m4_define([_LT_DECL],
-[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
- [m4_ifval([$1], [$1], [$2])])
- lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
- m4_ifval([$4],
- [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
- lt_dict_add_subkey([lt_decl_dict], [$2],
- [tagged?], [m4_ifval([$5], [yes], [no])])])
-])
-
-
-# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
-# --------------------------------------------------------
-m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
-
-
-# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_tag_varnames],
-[_lt_decl_filter([tagged?], [yes], $@)])
-
-
-# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
-# ---------------------------------------------------------
-m4_define([_lt_decl_filter],
-[m4_case([$#],
- [0], [m4_fatal([$0: too few arguments: $#])],
- [1], [m4_fatal([$0: too few arguments: $#: $1])],
- [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
- [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
- [lt_dict_filter([lt_decl_dict], $@)])[]dnl
-])
-
-
-# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
-# --------------------------------------------------
-m4_define([lt_decl_quote_varnames],
-[_lt_decl_filter([value], [1], $@)])
-
-
-# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_dquote_varnames],
-[_lt_decl_filter([value], [2], $@)])
-
-
-# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
-# ---------------------------------------------------
-m4_define([lt_decl_varnames_tagged],
-[m4_assert([$# <= 2])dnl
-_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
- m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
-m4_define([_lt_decl_varnames_tagged],
-[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
-
-
-# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
-# ------------------------------------------------
-m4_define([lt_decl_all_varnames],
-[_$0(m4_quote(m4_default([$1], [[, ]])),
- m4_if([$2], [],
- m4_quote(lt_decl_varnames),
- m4_quote(m4_shift($@))))[]dnl
-])
-m4_define([_lt_decl_all_varnames],
-[lt_join($@, lt_decl_varnames_tagged([$1],
- lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
-])
-
-
-# _LT_CONFIG_STATUS_DECLARE([VARNAME])
-# ------------------------------------
-# Quote a variable value, and forward it to `config.status' so that its
-# declaration there will have the same value as in `configure'. VARNAME
-# must have a single quote delimited value for this to work.
-m4_define([_LT_CONFIG_STATUS_DECLARE],
-[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
-
-
-# _LT_CONFIG_STATUS_DECLARATIONS
-# ------------------------------
-# We delimit libtool config variables with single quotes, so when
-# we write them to config.status, we have to be sure to quote all
-# embedded single quotes properly. In configure, this macro expands
-# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
-#
-# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
-m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
- [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAGS
-# ----------------
-# Output comment and list of tags supported by the script
-m4_defun([_LT_LIBTOOL_TAGS],
-[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
-available_tags="_LT_TAGS"dnl
-])
-
-
-# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
-# -----------------------------------
-# Extract the dictionary values for VARNAME (optionally with TAG) and
-# expand to a commented shell variable setting:
-#
-# # Some comment about what VAR is for.
-# visible_name=$lt_internal_name
-m4_define([_LT_LIBTOOL_DECLARE],
-[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
- [description])))[]dnl
-m4_pushdef([_libtool_name],
- m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
-m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
- [0], [_libtool_name=[$]$1],
- [1], [_libtool_name=$lt_[]$1],
- [2], [_libtool_name=$lt_[]$1],
- [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
-m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
-])
-
-
-# _LT_LIBTOOL_CONFIG_VARS
-# -----------------------
-# Produce commented declarations of non-tagged libtool config variables
-# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
-# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
-# section) are produced by _LT_LIBTOOL_TAG_VARS.
-m4_defun([_LT_LIBTOOL_CONFIG_VARS],
-[m4_foreach([_lt_var],
- m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
-
-
-# _LT_LIBTOOL_TAG_VARS(TAG)
-# -------------------------
-m4_define([_LT_LIBTOOL_TAG_VARS],
-[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
- [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
-
-
-# _LT_TAGVAR(VARNAME, [TAGNAME])
-# ------------------------------
-m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
-
-
-# _LT_CONFIG_COMMANDS
-# -------------------
-# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
-# variables for single and double quote escaping we saved from calls
-# to _LT_DECL, we can put quote escaped variables declarations
-# into `config.status', and then the shell code to quote escape them in
-# for loops in `config.status'. Finally, any additional code accumulated
-# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
-m4_defun([_LT_CONFIG_COMMANDS],
-[AC_PROVIDE_IFELSE([LT_OUTPUT],
- dnl If the libtool generation code has been placed in $CONFIG_LT,
- dnl instead of duplicating it all over again into config.status,
- dnl then we will have config.status run $CONFIG_LT later, so it
- dnl needs to know what name is stored there:
- [AC_CONFIG_COMMANDS([libtool],
- [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
- dnl If the libtool generation code is destined for config.status,
- dnl expand the accumulated commands and init code now:
- [AC_CONFIG_COMMANDS([libtool],
- [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
-])#_LT_CONFIG_COMMANDS
-
-
-# Initialize.
-m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
-[
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-_LT_CONFIG_STATUS_DECLARATIONS
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_quote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in lt_decl_all_varnames([[ \
-]], lt_decl_dquote_varnames); do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[[\\\\\\\`\\"\\\$]]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\[$]0 --fallback-echo"')dnl "
- lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
- ;;
-esac
-
-_LT_OUTPUT_LIBTOOL_INIT
-])
-
-
-# LT_OUTPUT
-# ---------
-# This macro allows early generation of the libtool script (before
-# AC_OUTPUT is called), incase it is used in configure for compilation
-# tests.
-AC_DEFUN([LT_OUTPUT],
-[: ${CONFIG_LT=./config.lt}
-AC_MSG_NOTICE([creating $CONFIG_LT])
-cat >"$CONFIG_LT" <<_LTEOF
-#! $SHELL
-# Generated by $as_me.
-# Run this file to recreate a libtool stub with the current configuration.
-
-lt_cl_silent=false
-SHELL=\${CONFIG_SHELL-$SHELL}
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AS_SHELL_SANITIZE
-_AS_PREPARE
-
-exec AS_MESSAGE_FD>&1
-exec AS_MESSAGE_LOG_FD>>config.log
-{
- echo
- AS_BOX([Running $as_me.])
-} >&AS_MESSAGE_LOG_FD
-
-lt_cl_help="\
-\`$as_me' creates a local libtool stub from the current configuration,
-for use in further configure time tests before the real libtool is
-generated.
-
-Usage: $[0] [[OPTIONS]]
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
-
-Report bugs to <bug-libtool@gnu.org>."
-
-lt_cl_version="\
-m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
-m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
-configured by $[0], generated by m4_PACKAGE_STRING.
-
-Copyright (C) 2008 Free Software Foundation, Inc.
-This config.lt script is free software; the Free Software Foundation
-gives unlimited permision to copy, distribute and modify it."
-
-while test $[#] != 0
-do
- case $[1] in
- --version | --v* | -V )
- echo "$lt_cl_version"; exit 0 ;;
- --help | --h* | -h )
- echo "$lt_cl_help"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --quiet | --q* | --silent | --s* | -q )
- lt_cl_silent=: ;;
-
- -*) AC_MSG_ERROR([unrecognized option: $[1]
-Try \`$[0] --help' for more information.]) ;;
-
- *) AC_MSG_ERROR([unrecognized argument: $[1]
-Try \`$[0] --help' for more information.]) ;;
- esac
- shift
-done
-
-if $lt_cl_silent; then
- exec AS_MESSAGE_FD>/dev/null
-fi
-_LTEOF
-
-cat >>"$CONFIG_LT" <<_LTEOF
-_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
-_LTEOF
-
-cat >>"$CONFIG_LT" <<\_LTEOF
-AC_MSG_NOTICE([creating $ofile])
-_LT_OUTPUT_LIBTOOL_COMMANDS
-AS_EXIT(0)
-_LTEOF
-chmod +x "$CONFIG_LT"
-
-# configure is writing to config.log, but config.lt does its own redirection,
-# appending to config.log, which fails on DOS, as config.log is still kept
-# open by configure. Here we exec the FD to /dev/null, effectively closing
-# config.log, so it can be properly (re)opened and appended to by config.lt.
-if test "$no_create" != yes; then
- lt_cl_success=:
- test "$silent" = yes &&
- lt_config_lt_args="$lt_config_lt_args --quiet"
- exec AS_MESSAGE_LOG_FD>/dev/null
- $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
- exec AS_MESSAGE_LOG_FD>>config.log
- $lt_cl_success || AS_EXIT(1)
-fi
-])# LT_OUTPUT
-
-
-# _LT_CONFIG(TAG)
-# ---------------
-# If TAG is the built-in tag, create an initial libtool script with a
-# default configuration from the untagged config vars. Otherwise add code
-# to config.status for appending the configuration named by TAG from the
-# matching tagged config vars.
-m4_defun([_LT_CONFIG],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_CONFIG_SAVE_COMMANDS([
- m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
- m4_if(_LT_TAG, [C], [
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-_LT_COPYING
-_LT_LIBTOOL_TAGS
-
-# ### BEGIN LIBTOOL CONFIG
-_LT_LIBTOOL_CONFIG_VARS
-_LT_LIBTOOL_TAG_VARS
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
- _LT_PROG_LTMAIN
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- _LT_PROG_XSI_SHELLFNS
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-],
-[cat <<_LT_EOF >> "$ofile"
-
-dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
-dnl in a comment (ie after a #).
-# ### BEGIN LIBTOOL TAG CONFIG: $1
-_LT_LIBTOOL_TAG_VARS(_LT_TAG)
-# ### END LIBTOOL TAG CONFIG: $1
-_LT_EOF
-])dnl /m4_if
-],
-[m4_if([$1], [], [
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'], [])
-])dnl /_LT_CONFIG_SAVE_COMMANDS
-])# _LT_CONFIG
-
-
-# LT_SUPPORTED_TAG(TAG)
-# ---------------------
-# Trace this macro to discover what tags are supported by the libtool
-# --tag option, using:
-# autoconf --trace 'LT_SUPPORTED_TAG:$1'
-AC_DEFUN([LT_SUPPORTED_TAG], [])
-
-
-# C support is built-in for now
-m4_define([_LT_LANG_C_enabled], [])
-m4_define([_LT_TAGS], [])
-
-
-# LT_LANG(LANG)
-# -------------
-# Enable libtool support for the given language if not already enabled.
-AC_DEFUN([LT_LANG],
-[AC_BEFORE([$0], [LT_OUTPUT])dnl
-m4_case([$1],
- [C], [_LT_LANG(C)],
- [C++], [_LT_LANG(CXX)],
- [Java], [_LT_LANG(GCJ)],
- [Fortran 77], [_LT_LANG(F77)],
- [Fortran], [_LT_LANG(FC)],
- [Windows Resource], [_LT_LANG(RC)],
- [m4_ifdef([_LT_LANG_]$1[_CONFIG],
- [_LT_LANG($1)],
- [m4_fatal([$0: unsupported language: "$1"])])])dnl
-])# LT_LANG
-
-
-# _LT_LANG(LANGNAME)
-# ------------------
-m4_defun([_LT_LANG],
-[m4_ifdef([_LT_LANG_]$1[_enabled], [],
- [LT_SUPPORTED_TAG([$1])dnl
- m4_append([_LT_TAGS], [$1 ])dnl
- m4_define([_LT_LANG_]$1[_enabled], [])dnl
- _LT_LANG_$1_CONFIG($1)])dnl
-])# _LT_LANG
-
-
-# _LT_LANG_DEFAULT_CONFIG
-# -----------------------
-m4_defun([_LT_LANG_DEFAULT_CONFIG],
-[AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [LT_LANG(CXX)],
- [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_F77],
- [LT_LANG(F77)],
- [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
-
-AC_PROVIDE_IFELSE([AC_PROG_FC],
- [LT_LANG(FC)],
- [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
-
-dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
-dnl pulling things in needlessly.
-AC_PROVIDE_IFELSE([AC_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
- [LT_LANG(GCJ)],
- [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
- [LT_LANG(GCJ)],
- [m4_ifdef([AC_PROG_GCJ],
- [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([A][M_PROG_GCJ],
- [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
- m4_ifdef([LT_PROG_GCJ],
- [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
-
-AC_PROVIDE_IFELSE([LT_PROG_RC],
- [LT_LANG(RC)],
- [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
-])# _LT_LANG_DEFAULT_CONFIG
-
-# Obsolete macros:
-AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
-AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
-AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
-AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
-dnl AC_DEFUN([AC_LIBTOOL_F77], [])
-dnl AC_DEFUN([AC_LIBTOOL_FC], [])
-dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
-
-
-# _LT_TAG_COMPILER
-# ----------------
-m4_defun([_LT_TAG_COMPILER],
-[AC_REQUIRE([AC_PROG_CC])dnl
-
-_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
-_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
-_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
-_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-])# _LT_TAG_COMPILER
-
-
-# _LT_COMPILER_BOILERPLATE
-# ------------------------
-# Check for compiler boilerplate output or warnings with
-# the simple compiler test code.
-m4_defun([_LT_COMPILER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-])# _LT_COMPILER_BOILERPLATE
-
-
-# _LT_LINKER_BOILERPLATE
-# ----------------------
-# Check for linker boilerplate output or warnings with
-# the simple link test code.
-m4_defun([_LT_LINKER_BOILERPLATE],
-[m4_require([_LT_DECL_SED])dnl
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-])# _LT_LINKER_BOILERPLATE
-
-# _LT_REQUIRED_DARWIN_CHECKS
-# -------------------------
-m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
- case $host_os in
- rhapsody* | darwin*)
- AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
- AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
- AC_CHECK_TOOL([LIPO], [lipo], [:])
- AC_CHECK_TOOL([OTOOL], [otool], [:])
- AC_CHECK_TOOL([OTOOL64], [otool64], [:])
- _LT_DECL([], [DSYMUTIL], [1],
- [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
- _LT_DECL([], [NMEDIT], [1],
- [Tool to change global to local symbols on Mac OS X])
- _LT_DECL([], [LIPO], [1],
- [Tool to manipulate fat objects and archives on Mac OS X])
- _LT_DECL([], [OTOOL], [1],
- [ldd/readelf like tool for Mach-O binaries on Mac OS X])
- _LT_DECL([], [OTOOL64], [1],
- [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
-
- AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
- [lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&AS_MESSAGE_LOG_FD
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi])
- AC_CACHE_CHECK([for -exported_symbols_list linker flag],
- [lt_cv_ld_exported_symbols_list],
- [lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [lt_cv_ld_exported_symbols_list=yes],
- [lt_cv_ld_exported_symbols_list=no])
- LDFLAGS="$save_LDFLAGS"
- ])
- case $host_os in
- rhapsody* | darwin1.[[012]])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[[012]]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-])
-
-
-# _LT_DARWIN_LINKER_FEATURES
-# --------------------------
-# Checks for linker and compiler features on darwin
-m4_defun([_LT_DARWIN_LINKER_FEATURES],
-[
- m4_require([_LT_REQUIRED_DARWIN_CHECKS])
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_automatic, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(whole_archive_flag_spec, $1)=''
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
- m4_if([$1], [CXX],
-[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
- _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
- _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
- fi
-],[])
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
-])
-
-# _LT_SYS_MODULE_PATH_AIX
-# -----------------------
-# Links a minimal program and checks the executable
-# for the system default hardcoded library path. In most cases,
-# this is /usr/lib:/lib, but when the MPI compilers are used
-# the location of the communication and MPI libs are included too.
-# If we don't find anything, use the default library path according
-# to the aix ld manual.
-m4_defun([_LT_SYS_MODULE_PATH_AIX],
-[m4_require([_LT_DECL_SED])dnl
-AC_LINK_IFELSE(AC_LANG_PROGRAM,[
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi],[])
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-])# _LT_SYS_MODULE_PATH_AIX
-
-
-# _LT_SHELL_INIT(ARG)
-# -------------------
-m4_define([_LT_SHELL_INIT],
-[ifdef([AC_DIVERSION_NOTICE],
- [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
- [AC_DIVERT_PUSH(NOTICE)])
-$1
-AC_DIVERT_POP
-])# _LT_SHELL_INIT
-
-
-# _LT_PROG_ECHO_BACKSLASH
-# -----------------------
-# Add some code to the start of the generated configure script which
-# will find an echo command which doesn't interpret backslashes.
-m4_defun([_LT_PROG_ECHO_BACKSLASH],
-[_LT_SHELL_INIT([
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-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.
- exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
-fi
-
-if test "X[$]1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-[$]*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "[$]0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
-fi
-
-AC_SUBST(lt_ECHO)
-])
-_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
-_LT_DECL([], [ECHO], [1],
- [An echo program that does not interpret backslashes])
-])# _LT_PROG_ECHO_BACKSLASH
-
-
-# _LT_ENABLE_LOCK
-# ---------------
-m4_defun([_LT_ENABLE_LOCK],
-[AC_ARG_ENABLE([libtool-lock],
- [AS_HELP_STRING([--disable-libtool-lock],
- [avoid locking (might break parallel builds)])])
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '[#]line __oline__ "configure"' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
- [AC_LANG_PUSH(C)
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
- AC_LANG_POP])
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if AC_TRY_EVAL(ac_compile); then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-])# _LT_ENABLE_LOCK
-
-
-# _LT_CMD_OLD_ARCHIVE
-# -------------------
-m4_defun([_LT_CMD_OLD_ARCHIVE],
-[AC_CHECK_TOOL(AR, ar, false)
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-_LT_DECL([], [AR], [1], [The archiver])
-_LT_DECL([], [AR_FLAGS], [1])
-
-AC_CHECK_TOOL(STRIP, strip, :)
-test -z "$STRIP" && STRIP=:
-_LT_DECL([], [STRIP], [1], [A symbol stripping program])
-
-AC_CHECK_TOOL(RANLIB, ranlib, :)
-test -z "$RANLIB" && RANLIB=:
-_LT_DECL([], [RANLIB], [1],
- [Commands used to install an old-style archive])
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-_LT_DECL([], [old_postinstall_cmds], [2])
-_LT_DECL([], [old_postuninstall_cmds], [2])
-_LT_TAGDECL([], [old_archive_cmds], [2],
- [Commands used to build an old-style archive])
-])# _LT_CMD_OLD_ARCHIVE
-
-
-# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------------------
-# Check whether the given compiler option works
-AC_DEFUN([_LT_COMPILER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$3"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- fi
- $RM conftest*
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$5], , :, [$5])
-else
- m4_if([$6], , :, [$6])
-fi
-])# _LT_COMPILER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
-
-
-# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
-# [ACTION-SUCCESS], [ACTION-FAILURE])
-# ----------------------------------------------------
-# Check whether the given linker option works
-AC_DEFUN([_LT_LINKER_OPTION],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_CACHE_CHECK([$1], [$2],
- [$2=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $3"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&AS_MESSAGE_LOG_FD
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- $2=yes
- fi
- else
- $2=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-])
-
-if test x"[$]$2" = xyes; then
- m4_if([$4], , :, [$4])
-else
- m4_if([$5], , :, [$5])
-fi
-])# _LT_LINKER_OPTION
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
-
-
-# LT_CMD_MAX_LEN
-#---------------
-AC_DEFUN([LT_CMD_MAX_LEN],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-# find the maximum length of command line arguments
-AC_MSG_CHECKING([the maximum length of command line arguments])
-AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-])
-if test -n $lt_cv_sys_max_cmd_len ; then
- AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
-else
- AC_MSG_RESULT(none)
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-_LT_DECL([], [max_cmd_len], [0],
- [What is the maximum length of a command?])
-])# LT_CMD_MAX_LEN
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
-
-
-# _LT_HEADER_DLFCN
-# ----------------
-m4_defun([_LT_HEADER_DLFCN],
-[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
-])# _LT_HEADER_DLFCN
-
-
-# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
-# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
-# ----------------------------------------------------------------
-m4_defun([_LT_TRY_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "$cross_compiling" = yes; then :
- [$4]
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-[#line __oline__ "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}]
-_LT_EOF
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) $1 ;;
- x$lt_dlneed_uscore) $2 ;;
- x$lt_dlunknown|x*) $3 ;;
- esac
- else :
- # compilation failed
- $3
- fi
-fi
-rm -fr conftest*
-])# _LT_TRY_DLOPEN_SELF
-
-
-# LT_SYS_DLOPEN_SELF
-# ------------------
-AC_DEFUN([LT_SYS_DLOPEN_SELF],
-[m4_require([_LT_HEADER_DLFCN])dnl
-if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ])
- ;;
-
- *)
- AC_CHECK_FUNC([shl_load],
- [lt_cv_dlopen="shl_load"],
- [AC_CHECK_LIB([dld], [shl_load],
- [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
- [AC_CHECK_FUNC([dlopen],
- [lt_cv_dlopen="dlopen"],
- [AC_CHECK_LIB([dl], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
- [AC_CHECK_LIB([svld], [dlopen],
- [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
- [AC_CHECK_LIB([dld], [dld_link],
- [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
- ])
- ])
- ])
- ])
- ])
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- AC_CACHE_CHECK([whether a program can dlopen itself],
- lt_cv_dlopen_self, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
- lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
- ])
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
- lt_cv_dlopen_self_static, [dnl
- _LT_TRY_DLOPEN_SELF(
- lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
- lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
- ])
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-_LT_DECL([dlopen_support], [enable_dlopen], [0],
- [Whether dlopen is supported])
-_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
- [Whether dlopen of programs is supported])
-_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
- [Whether dlopen of statically linked programs is supported])
-])# LT_SYS_DLOPEN_SELF
-
-# Old name:
-AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
-
-
-# _LT_COMPILER_C_O([TAGNAME])
-# ---------------------------
-# Check to see if options -c and -o are simultaneously supported by compiler.
-# This macro does not hard code the compiler like AC_PROG_CC_C_O.
-m4_defun([_LT_COMPILER_C_O],
-[m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
- [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&AS_MESSAGE_LOG_FD
- echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
- fi
- fi
- chmod u+w . 2>&AS_MESSAGE_LOG_FD
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-])
-_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
- [Does compiler simultaneously support -c and -o options?])
-])# _LT_COMPILER_C_O
-
-
-# _LT_COMPILER_FILE_LOCKS([TAGNAME])
-# ----------------------------------
-# Check to see if we can do hard links to lock some files if needed
-m4_defun([_LT_COMPILER_FILE_LOCKS],
-[m4_require([_LT_ENABLE_LOCK])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-_LT_COMPILER_C_O([$1])
-
-hard_links="nottested"
-if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- AC_MSG_CHECKING([if we can lock with hard links])
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- AC_MSG_RESULT([$hard_links])
- if test "$hard_links" = no; then
- AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
-])# _LT_COMPILER_FILE_LOCKS
-
-
-# _LT_CHECK_OBJDIR
-# ----------------
-m4_defun([_LT_CHECK_OBJDIR],
-[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
-[rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null])
-objdir=$lt_cv_objdir
-_LT_DECL([], [objdir], [0],
- [The name of the directory that contains temporary libtool files])dnl
-m4_pattern_allow([LT_OBJDIR])dnl
-AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
- [Define to the sub-directory in which libtool stores uninstalled libraries.])
-])# _LT_CHECK_OBJDIR
-
-
-# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
-# --------------------------------------
-# Check hardcoding attributes.
-m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
-[AC_MSG_CHECKING([how to hardcode library paths into programs])
-_LT_TAGVAR(hardcode_action, $1)=
-if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
- test -n "$_LT_TAGVAR(runpath_var, $1)" ||
- test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
- test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
- # Linking always hardcodes the temporary library directory.
- _LT_TAGVAR(hardcode_action, $1)=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- _LT_TAGVAR(hardcode_action, $1)=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- _LT_TAGVAR(hardcode_action, $1)=unsupported
-fi
-AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
-
-if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
- test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-_LT_TAGDECL([], [hardcode_action], [0],
- [How to hardcode a shared library path into an executable])
-])# _LT_LINKER_HARDCODE_LIBPATH
-
-
-# _LT_CMD_STRIPLIB
-# ----------------
-m4_defun([_LT_CMD_STRIPLIB],
-[m4_require([_LT_DECL_EGREP])
-striplib=
-old_striplib=
-AC_MSG_CHECKING([whether stripping libraries is possible])
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- AC_MSG_RESULT([yes])
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- AC_MSG_RESULT([yes])
- else
- AC_MSG_RESULT([no])
- fi
- ;;
- *)
- AC_MSG_RESULT([no])
- ;;
- esac
-fi
-_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
-_LT_DECL([], [striplib], [1])
-])# _LT_CMD_STRIPLIB
-
-
-# _LT_SYS_DYNAMIC_LINKER([TAG])
-# -----------------------------
-# PORTME Fill in your ld.so characteristics
-m4_defun([_LT_SYS_DYNAMIC_LINKER],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_OBJDUMP])dnl
-m4_require([_LT_DECL_SED])dnl
-AC_MSG_CHECKING([dynamic linker characteristics])
-m4_if([$1],
- [], [
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[[lt_foo]]++; }
- if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi])
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[[4-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[[01]] | aix4.[[01]].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[[45]]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-m4_if([$1], [],[
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[[123]]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[[01]]* | freebsdelf3.[[01]]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
- freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[[3-9]]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
- LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
- AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
- [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
- [shlibpath_overrides_runpath=yes])])
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[[89]] | openbsd2.[[89]].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-AC_MSG_RESULT([$dynamic_linker])
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-_LT_DECL([], [variables_saved_for_relink], [1],
- [Variables whose values should be saved in libtool wrapper scripts and
- restored at link time])
-_LT_DECL([], [need_lib_prefix], [0],
- [Do we need the "lib" prefix for modules?])
-_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
-_LT_DECL([], [version_type], [0], [Library versioning type])
-_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
-_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
-_LT_DECL([], [shlibpath_overrides_runpath], [0],
- [Is shlibpath searched before the hard-coded library search path?])
-_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
-_LT_DECL([], [library_names_spec], [1],
- [[List of archive names. First name is the real one, the rest are links.
- The last name is the one that the linker finds with -lNAME]])
-_LT_DECL([], [soname_spec], [1],
- [[The coded name of the library, if different from the real name]])
-_LT_DECL([], [postinstall_cmds], [2],
- [Command to use after installation of a shared archive])
-_LT_DECL([], [postuninstall_cmds], [2],
- [Command to use after uninstallation of a shared archive])
-_LT_DECL([], [finish_cmds], [2],
- [Commands used to finish a libtool library installation in a directory])
-_LT_DECL([], [finish_eval], [1],
- [[As "finish_cmds", except a single script fragment to be evaled but
- not shown]])
-_LT_DECL([], [hardcode_into_libs], [0],
- [Whether we should hardcode library paths into libraries])
-_LT_DECL([], [sys_lib_search_path_spec], [2],
- [Compile-time system search path for libraries])
-_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
- [Run-time system search path for libraries])
-])# _LT_SYS_DYNAMIC_LINKER
-
-
-# _LT_PATH_TOOL_PREFIX(TOOL)
-# --------------------------
-# find a file program which can recognize shared library
-AC_DEFUN([_LT_PATH_TOOL_PREFIX],
-[m4_require([_LT_DECL_EGREP])dnl
-AC_MSG_CHECKING([for $1])
-AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
-[case $MAGIC_CMD in
-[[\\/*] | ?:[\\/]*])
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
-dnl $ac_dummy forces splitting on constant user-supplied paths.
-dnl POSIX.2 word splitting is done only on the output of word expansions,
-dnl not every word. This closes a longstanding sh security hole.
- ac_dummy="m4_if([$2], , $PATH, [$2])"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$1; then
- lt_cv_path_MAGIC_CMD="$ac_dir/$1"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac])
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- AC_MSG_RESULT($MAGIC_CMD)
-else
- AC_MSG_RESULT(no)
-fi
-_LT_DECL([], [MAGIC_CMD], [0],
- [Used to examine libraries when file_magic_cmd begins with "file"])dnl
-])# _LT_PATH_TOOL_PREFIX
-
-# Old name:
-AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
-
-
-# _LT_PATH_MAGIC
-# --------------
-# find a file program which can recognize a shared library
-m4_defun([_LT_PATH_MAGIC],
-[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
- else
- MAGIC_CMD=:
- fi
-fi
-])# _LT_PATH_MAGIC
-
-
-# LT_PATH_LD
-# ----------
-# find the pathname to the GNU or non-GNU linker
-AC_DEFUN([LT_PATH_LD],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_CANONICAL_BUILD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
- [assume the C compiler uses GNU ld @<:@default=no@:>@])],
- [test "$withval" = no || with_gnu_ld=yes],
- [with_gnu_ld=no])dnl
-
-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 $CC])
- 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.
- [[\\/]]* | ?:[[\\/]]*)
- re_direlt='/[[^/]][[^/]]*/\.\./'
- # Canonicalize the pathname 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(lt_cv_path_LD,
-[if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_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="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi])
-LD="$lt_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])
-_LT_PATH_LD_GNU
-AC_SUBST([LD])
-
-_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
-])# LT_PATH_LD
-
-# Old names:
-AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
-AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_LD], [])
-dnl AC_DEFUN([AC_PROG_LD], [])
-
-
-# _LT_PATH_LD_GNU
-#- --------------
-m4_defun([_LT_PATH_LD_GNU],
-[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
-[# I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac])
-with_gnu_ld=$lt_cv_prog_gnu_ld
-])# _LT_PATH_LD_GNU
-
-
-# _LT_CMD_RELOAD
-# --------------
-# find reload flag for linker
-# -- PORTME Some linkers may need a different reload flag.
-m4_defun([_LT_CMD_RELOAD],
-[AC_CACHE_CHECK([for $LD option to reload object files],
- lt_cv_ld_reload_flag,
- [lt_cv_ld_reload_flag='-r'])
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
-_LT_DECL([], [reload_cmds], [2])dnl
-])# _LT_CMD_RELOAD
-
-
-# _LT_CHECK_MAGIC_METHOD
-# ----------------------
-# how to check for library dependencies
-# -- PORTME fill in with the dynamic library characteristics
-m4_defun([_LT_CHECK_MAGIC_METHOD],
-[m4_require([_LT_DECL_EGREP])
-m4_require([_LT_DECL_OBJDUMP])
-AC_CACHE_CHECK([how to recognize dependent libraries],
-lt_cv_deplibs_check_method,
-[lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[[4-9]]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[[45]]*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[[3-9]]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-])
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-_LT_DECL([], [deplibs_check_method], [1],
- [Method to check whether dependent libraries are shared objects])
-_LT_DECL([], [file_magic_cmd], [1],
- [Command to use when deplibs_check_method == "file_magic"])
-])# _LT_CHECK_MAGIC_METHOD
-
-
-# LT_PATH_NM
-# ----------
-# find the pathname to a BSD- or MS-compatible name lister
-AC_DEFUN([LT_PATH_NM],
-[AC_REQUIRE([AC_PROG_CC])dnl
-AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
-[if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi])
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
- AC_SUBST([DUMPBIN])
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-AC_SUBST([NM])
-_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
-
-AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
- [lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&AS_MESSAGE_LOG_FD
- (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
- cat conftest.out >&AS_MESSAGE_LOG_FD
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*])
-])# LT_PATH_NM
-
-# Old names:
-AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
-AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_PROG_NM], [])
-dnl AC_DEFUN([AC_PROG_NM], [])
-
-
-# LT_LIB_M
-# --------
-# check for math library
-AC_DEFUN([LT_LIB_M],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-LIBM=
-case $host in
-*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
- # These system don't have libm, or don't need it
- ;;
-*-ncr-sysv4.3*)
- AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
- AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
- ;;
-*)
- AC_CHECK_LIB(m, cos, LIBM="-lm")
- ;;
-esac
-AC_SUBST([LIBM])
-])# LT_LIB_M
-
-# Old name:
-AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_CHECK_LIBM], [])
-
-
-# _LT_COMPILER_NO_RTTI([TAGNAME])
-# -------------------------------
-m4_defun([_LT_COMPILER_NO_RTTI],
-[m4_require([_LT_TAG_COMPILER])dnl
-
-_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
-
-if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
-
- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
- lt_cv_prog_compiler_rtti_exceptions,
- [-fno-rtti -fno-exceptions], [],
- [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
-fi
-_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
- [Compiler flag to turn off builtin functions])
-])# _LT_COMPILER_NO_RTTI
-
-
-# _LT_CMD_GLOBAL_SYMBOLS
-# ----------------------
-m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-AC_REQUIRE([AC_PROG_CC])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-AC_REQUIRE([LT_PATH_LD])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-AC_MSG_CHECKING([command to parse $NM output from $compiler object])
-AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
-[
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[[BCDEGRST]]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[[BCDT]]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[[ABCDGISTW]]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[[ABCDEGRST]]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[[BCDEGRST]]'
- ;;
-osf*)
- symcode='[[BCDEGQRST]]'
- ;;
-solaris*)
- symcode='[[BDRT]]'
- ;;
-sco3.2v5*)
- symcode='[[DT]]'
- ;;
-sysv4.2uw2*)
- symcode='[[DT]]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[[ABDT]]'
- ;;
-sysv4)
- symcode='[[DFNSTU]]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[[ABCDGIRSTW]]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK ['"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx]"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if AC_TRY_EVAL(ac_compile); then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[[]] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
- if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
- fi
- else
- echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-])
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- AC_MSG_RESULT(failed)
-else
- AC_MSG_RESULT(ok)
-fi
-
-_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
- [Take the output of nm and produce a listing of raw symbols and C names])
-_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
- [Transform the output of nm in a proper C declaration])
-_LT_DECL([global_symbol_to_c_name_address],
- [lt_cv_sys_global_symbol_to_c_name_address], [1],
- [Transform the output of nm in a C name address pair])
-_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
- [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
- [Transform the output of nm in a C name address pair when lib prefix is needed])
-]) # _LT_CMD_GLOBAL_SYMBOLS
-
-
-# _LT_COMPILER_PIC([TAGNAME])
-# ---------------------------
-m4_defun([_LT_COMPILER_PIC],
-[m4_require([_LT_TAG_COMPILER])dnl
-_LT_TAGVAR(lt_prog_compiler_wl, $1)=
-_LT_TAGVAR(lt_prog_compiler_pic, $1)=
-_LT_TAGVAR(lt_prog_compiler_static, $1)=
-
-AC_MSG_CHECKING([for $compiler option to produce PIC])
-m4_if([$1], [CXX], [
- # C++ specific cases for pic, static, wl, etc.
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
- mingw* | cygwin* | os2* | pw32* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
- *djgpp*)
- # DJGPP does not support shared libraries at all
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- case $host_os in
- aix[[4-9]]*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
- chorus*)
- case $cc_basename in
- cxch68*)
- # Green Hills C++ Compiler
- # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
- ;;
- esac
- ;;
- dgux*)
- case $cc_basename in
- ec++*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- freebsd* | dragonfly*)
- # FreeBSD uses GNU C++
- ;;
- hpux9* | hpux10* | hpux11*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- fi
- ;;
- aCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- ;;
- *)
- ;;
- esac
- ;;
- interix*)
- # This is c89, which is MS Visual C++ (no shared libs)
- # Anyone wants to do a port?
- ;;
- irix5* | irix6* | nonstopux*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- # CC pic flag -KPIC is the default.
- ;;
- *)
- ;;
- esac
- ;;
- linux* | k*bsd*-gnu)
- case $cc_basename in
- KCC*)
- # KAI C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- ecpc* )
- # old Intel C++ for x86_64 which still supported -KPIC.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- icpc* )
- # Intel C++, used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- cxx*)
- # Compaq C++
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xlc* | xlC*)
- # IBM XL 8.0 on PPC
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- esac
- ;;
- esac
- ;;
- lynxos*)
- ;;
- m88k*)
- ;;
- mvs*)
- case $cc_basename in
- cxx*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
- ;;
- *)
- ;;
- esac
- ;;
- netbsd*)
- ;;
- *qnx* | *nto*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
- ;;
- RCC*)
- # Rational C++ 2.4.1
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- cxx*)
- # Digital/Compaq C++
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # Make sure the PIC flag is empty. It appears that all Alpha
- # Linux and Compaq Tru64 Unix objects are PIC.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- *)
- ;;
- esac
- ;;
- psos*)
- ;;
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- ;;
- *)
- ;;
- esac
- ;;
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- lcc*)
- # Lucid
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- ;;
- *)
- ;;
- esac
- ;;
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- case $cc_basename in
- CC*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- esac
- ;;
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- ;;
- *)
- ;;
- esac
- ;;
- vxworks*)
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-],
-[
- if test "$GCC" = yes; then
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
- fi
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- else
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- m4_if([$1], [GCJ], [],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
- ;;
-
- hpux9* | hpux10* | hpux11*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # PIC (with -KPIC) is the default.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
- ccc*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All Alpha code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- # All OSF/1 code is PIC.
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- rdos*)
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
- ;;
-
- solaris*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
- *)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- unicos*)
- _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
-
- uts4*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
- _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
- ;;
-
- *)
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
- ;;
- esac
- fi
-])
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)=
- ;;
- *)
- _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
- ;;
-esac
-AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
-_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
- [How to pass a linker flag through the compiler])
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
- [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
- [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
- [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
- "" | " "*) ;;
- *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
- esac],
- [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
- _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
-fi
-_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
- [Additional compiler flags for building library objects])
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
-_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
- _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
- $lt_tmp_static_flag,
- [],
- [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
-_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
- [Compiler flag to prevent dynamic linking])
-])# _LT_COMPILER_PIC
-
-
-# _LT_LINKER_SHLIBS([TAGNAME])
-# ----------------------------
-# See if the linker supports building shared libraries.
-m4_defun([_LT_LINKER_SHLIBS],
-[AC_REQUIRE([LT_PATH_LD])dnl
-AC_REQUIRE([LT_PATH_NM])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-m4_require([_LT_DECL_SED])dnl
-m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
-m4_require([_LT_TAG_COMPILER])dnl
-AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
-m4_if([$1], [CXX], [
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- case $host_os in
- aix[[4-9]]*)
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- ;;
- pw32*)
- _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
- ;;
- cygwin* | mingw* | cegcc*)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- *)
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- ;;
- esac
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
-], [
- runpath_var=
- _LT_TAGVAR(allow_undefined_flag, $1)=
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(archive_cmds, $1)=
- _LT_TAGVAR(archive_expsym_cmds, $1)=
- _LT_TAGVAR(compiler_needs_object, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- _LT_TAGVAR(hardcode_automatic, $1)=no
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- _LT_TAGVAR(hardcode_minus_L, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
- _LT_TAGVAR(inherit_rpath, $1)=no
- _LT_TAGVAR(link_all_deplibs, $1)=unknown
- _LT_TAGVAR(module_cmds, $1)=
- _LT_TAGVAR(module_expsym_cmds, $1)=
- _LT_TAGVAR(old_archive_from_new_cmds, $1)=
- _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
- _LT_TAGVAR(thread_safe_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- _LT_TAGVAR(include_expsyms, $1)=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
-dnl Note also adjust exclude_expsyms for C++ above.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # 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
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- _LT_TAGVAR(ld_shlibs, $1)=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[[3-9]]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- tmp_sharedflag='--shared' ;;
- xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
-
- if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
- runpath_var=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=yes
- _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- fi
- ;;
-
- aix[[4-9]]*)
- 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
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- 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]].*|aix[[5-9]]*)
- 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
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)=''
- ;;
- m68k)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- ;;
-
- bsdi[[45]]*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # 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.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
- # FIXME: Should let the user specify the lib program.
- _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
- _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
- ;;
-
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- freebsd1*)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
-
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- ;;
- esac
- fi
- ;;
-
- irix5* | irix6* | nonstopux*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- AC_LINK_IFELSE(int foo(void) {},
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
- )
- LDFLAGS="$save_LDFLAGS"
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- newsos6)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- else
- case $host_os in
- openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- os2*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- else
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- fi
- _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- ;;
-
- solaris*)
- _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
- _LT_TAGVAR(hardcode_direct, $1)=no
- ;;
- motorola)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- sysv4.3*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- _LT_TAGVAR(ld_shlibs, $1)=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
-
- *)
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-])
-AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
-test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
-_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
-
-_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
-_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
-_LT_DECL([], [extract_expsyms_cmds], [2],
- [The commands to extract the exported symbol list from a shared archive])
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
-x|xyes)
- # Assume -lc should be added
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $_LT_TAGVAR(archive_cmds, $1) in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- AC_MSG_CHECKING([whether -lc should be explicitly linked in])
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
- pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
- _LT_TAGVAR(allow_undefined_flag, $1)=
- if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
- then
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- else
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- fi
- _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
- ;;
- esac
- fi
- ;;
-esac
-
-_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
- [Whether or not to add -lc for building shared libraries])
-_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
- [enable_shared_with_static_runtimes], [0],
- [Whether or not to disallow shared libs when runtime libs are static])
-_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
- [Compiler flag to allow reflexive dlopens])
-_LT_TAGDECL([], [whole_archive_flag_spec], [1],
- [Compiler flag to generate shared objects directly from archives])
-_LT_TAGDECL([], [compiler_needs_object], [1],
- [Whether the compiler copes with passing no objects directly])
-_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
- [Create an old-style archive from a shared archive])
-_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
- [Create a temporary old-style archive to link instead of a shared archive])
-_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
-_LT_TAGDECL([], [archive_expsym_cmds], [2])
-_LT_TAGDECL([], [module_cmds], [2],
- [Commands used to build a loadable module if different from building
- a shared archive.])
-_LT_TAGDECL([], [module_expsym_cmds], [2])
-_LT_TAGDECL([], [with_gnu_ld], [1],
- [Whether we are building with GNU ld or not])
-_LT_TAGDECL([], [allow_undefined_flag], [1],
- [Flag that allows shared libraries with undefined symbols to be built])
-_LT_TAGDECL([], [no_undefined_flag], [1],
- [Flag that enforces no undefined symbols])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
- [Flag to hardcode $libdir into a binary during linking.
- This must work even if $libdir does not exist])
-_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
- [[If ld is used when linking, flag to hardcode $libdir into a binary
- during linking. This must work even if $libdir does not exist]])
-_LT_TAGDECL([], [hardcode_libdir_separator], [1],
- [Whether we need a single "-rpath" flag with a separated argument])
-_LT_TAGDECL([], [hardcode_direct], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary])
-_LT_TAGDECL([], [hardcode_direct_absolute], [0],
- [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
- DIR into the resulting binary and the resulting library dependency is
- "absolute", i.e impossible to change by setting ${shlibpath_var} if the
- library is relocated])
-_LT_TAGDECL([], [hardcode_minus_L], [0],
- [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
- [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
- into the resulting binary])
-_LT_TAGDECL([], [hardcode_automatic], [0],
- [Set to "yes" if building a shared library automatically hardcodes DIR
- into the library and all subsequent libraries and executables linked
- against it])
-_LT_TAGDECL([], [inherit_rpath], [0],
- [Set to yes if linker adds runtime paths of dependent libraries
- to runtime path list])
-_LT_TAGDECL([], [link_all_deplibs], [0],
- [Whether libtool must link a program against all its dependency libraries])
-_LT_TAGDECL([], [fix_srcfile_path], [1],
- [Fix the shell variable $srcfile for the compiler])
-_LT_TAGDECL([], [always_export_symbols], [0],
- [Set to "yes" if exported symbols are required])
-_LT_TAGDECL([], [export_symbols_cmds], [2],
- [The commands to list exported symbols])
-_LT_TAGDECL([], [exclude_expsyms], [1],
- [Symbols that should not be listed in the preloaded symbols])
-_LT_TAGDECL([], [include_expsyms], [1],
- [Symbols that must always be exported])
-_LT_TAGDECL([], [prelink_cmds], [2],
- [Commands necessary for linking programs (against libraries) with templates])
-_LT_TAGDECL([], [file_list_spec], [1],
- [Specify filename containing input files])
-dnl FIXME: Not yet implemented
-dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
-dnl [Compiler flag to generate thread safe objects])
-])# _LT_LINKER_SHLIBS
-
-
-# _LT_LANG_C_CONFIG([TAG])
-# ------------------------
-# Ensure that the configuration variables for a C compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_C_CONFIG],
-[m4_require([_LT_DECL_EGREP])dnl
-lt_save_CC="$CC"
-AC_LANG_PUSH(C)
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-_LT_TAG_COMPILER
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
- LT_SYS_DLOPEN_SELF
- _LT_CMD_STRIPLIB
-
- # Report which library types will actually be built
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_CONFIG($1)
-fi
-AC_LANG_POP
-CC="$lt_save_CC"
-])# _LT_LANG_C_CONFIG
-
-
-# _LT_PROG_CXX
-# ------------
-# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
-# compiler, we have our own version here.
-m4_defun([_LT_PROG_CXX],
-[
-pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
-AC_PROG_CXX
-if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
- ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
- (test "X$CXX" != "Xg++"))) ; then
- AC_PROG_CXXCPP
-else
- _lt_caught_CXX_error=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_CXX
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_CXX], [])
-
-
-# _LT_LANG_CXX_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a C++ compiler are suitably
-# defined. These variables are subsequently used by _LT_CONFIG to write
-# the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_CXX_CONFIG],
-[AC_REQUIRE([_LT_PROG_CXX])dnl
-m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-m4_require([_LT_DECL_EGREP])dnl
-
-AC_LANG_PUSH(C++)
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(compiler_needs_object, $1)=no
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for C++ test sources.
-ac_ext=cpp
-
-# Object file extension for compiled C++ test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the CXX compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_caught_CXX_error" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="int some_variable = 0;"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC=$CC
- lt_save_LD=$LD
- lt_save_GCC=$GCC
- GCC=$GXX
- lt_save_with_gnu_ld=$with_gnu_ld
- lt_save_path_LD=$lt_cv_path_LD
- if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
- lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
- else
- $as_unset lt_cv_prog_gnu_ld
- fi
- if test -n "${lt_cv_path_LDCXX+set}"; then
- lt_cv_path_LD=$lt_cv_path_LDCXX
- else
- $as_unset lt_cv_path_LD
- fi
- test -z "${LDCXX+set}" || LD=$LDCXX
- CC=${CXX-"c++"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- # We don't want -fno-exception when compiling C++ code, so set the
- # no_builtin_flag separately
- if test "$GXX" = yes; then
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
- else
- _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
- fi
-
- if test "$GXX" = yes; then
- # Set up default GNU C++ configuration
-
- LT_PATH_LD
-
- # Check if GNU C++ uses GNU ld as the underlying linker, since the
- # archiving commands below assume that GNU ld is being used.
- if test "$with_gnu_ld" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # If archive_cmds runs LD, not CC, wlarc should be empty
- # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
- # investigate it a little bit more. (MM)
- wlarc='${wl}'
-
- # ancient GNU ld didn't support --whole-archive et. al.
- if eval "`$CC -print-prog-name=ld` --help 2>&1" |
- $GREP 'no-whole-archive' > /dev/null; then
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- _LT_TAGVAR(whole_archive_flag_spec, $1)=
- fi
- else
- with_gnu_ld=no
- wlarc=
-
- # A generic and very simple default shared library creation
- # command for GNU C++ for the case where it uses the native
- # linker, instead of GNU ld. If possible, this setting should
- # overridden to take advantage of the native linker features on
- # the platform it is being used on.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- fi
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- GXX=no
- with_gnu_ld=no
- wlarc=
- fi
-
- # PORTME: fill in a description of your system's C++ link characteristics
- AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
- _LT_TAGVAR(ld_shlibs, $1)=yes
- case $host_os in
- aix3*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aix[[4-9]]*)
- 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
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- 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]].*|aix[[5-9]]*)
- for ld_flag in $LDFLAGS; do
- case $ld_flag in
- *-brtl*)
- aix_use_runtimelinking=yes
- break
- ;;
- esac
- done
- ;;
- esac
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- _LT_TAGVAR(archive_cmds, $1)=''
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
-
- if test "$GXX" = yes; then
- case $host_os in aix4.[[012]]|aix4.[[012]].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- _LT_TAGVAR(hardcode_direct, $1)=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- _LT_TAGVAR(hardcode_minus_L, $1)=yes
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=
- fi
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to
- # export.
- _LT_TAGVAR(always_export_symbols, $1)=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
- # Determine the default libpath from the value encoded in an empty
- # executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
-
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
- _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- _LT_SYS_MODULE_PATH_AIX
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
- # This is similar to how AIX traditionally builds its shared
- # libraries.
- _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- chorus*)
- case $cc_basename in
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
- # as there is no search path for DLLs.
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
- _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
- _LT_TAGVAR(always_export_symbols, $1)=no
- _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- darwin* | rhapsody*)
- _LT_DARWIN_LINKER_FEATURES($1)
- ;;
-
- dgux*)
- case $cc_basename in
- ec++*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- ghcx*)
- # Green Hills C++ Compiler
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- freebsd[[12]]*)
- # C++ shared libraries reported to be fairly broken before
- # switch to ELF
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- freebsd-elf*)
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- ;;
-
- freebsd* | dragonfly*)
- # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
- # conventions
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- gnu*)
- ;;
-
- hpux9*)
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- hpux10*|hpux11*)
- if test $with_gnu_ld = no; then
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- ;;
- *)
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- ;;
- esac
- fi
- case $host_cpu in
- hppa*64*|ia64*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- ;;
- *)
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
- # but as the default
- # location of the library.
- ;;
- esac
-
- case $cc_basename in
- CC*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- aCC*)
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes; then
- if test $with_gnu_ld = no; then
- case $host_cpu in
- hppa*64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- ia64*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- ;;
- esac
- fi
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- interix[[3-9]]*)
- _LT_TAGVAR(hardcode_direct, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
- irix5* | irix6*)
- case $cc_basename in
- CC*)
- # SGI C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
-
- # Archives containing C++ object files must be created using
- # "CC -ar", where "CC" is the IRIX C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
- ;;
- *)
- if test "$GXX" = yes; then
- if test "$with_gnu_ld" = no; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
- fi
- fi
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- ;;
- esac
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
- _LT_TAGVAR(inherit_rpath, $1)=yes
- ;;
-
- linux* | k*bsd*-gnu)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
-
- # Archives containing C++ object files must be created using
- # "CC -Bstatic", where "CC" is the KAI C++ compiler.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
- ;;
- icpc* | ecpc* )
- # Intel C++
- with_gnu_ld=yes
- # version 8.0 and above of icpc choke on multiply defined symbols
- # if we add $predep_objects and $postdep_objects, however 7.1 and
- # earlier do not add the objects themselves.
- case `$CC -V 2>&1` in
- *"Version 7."*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- *) # Version 8.0 or newer
- tmp_idyn=
- case $host_cpu in
- ia64*) tmp_idyn=' -i_dynamic';;
- esac
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- ;;
- esac
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
- ;;
- pgCC* | pgcpp*)
- # Portland Group C++ compiler
- case `$CC -V` in
- *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
- _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
- compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
- _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
- $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
- $RANLIB $oldlib'
- _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
- rm -rf $tpldir~
- $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
- $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- *) # Version 6 will use weak symbols
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- ;;
- cxx*)
- # Compaq C++
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
-
- runpath_var=LD_RUN_PATH
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- xl*)
- # IBM XL 8.0 on PPC, with GNU ld
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
- _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- _LT_TAGVAR(compiler_needs_object, $1)=yes
-
- # Not sure whether something based on
- # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
- # would be better.
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- esac
- ;;
- esac
- ;;
-
- lynxos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- m88k*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- mvs*)
- case $cc_basename in
- cxx*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
- wlarc=
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- fi
- # Workaround some broken pre-1.5 toolchains
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
- ;;
-
- *nto* | *qnx*)
- _LT_TAGVAR(ld_shlibs, $1)=yes
- ;;
-
- openbsd2*)
- # C++ shared libraries are fairly broken
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- _LT_TAGVAR(hardcode_direct, $1)=yes
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
- _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- fi
- output_verbose_link_cmd=echo
- else
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
-
- osf3* | osf4* | osf5*)
- case $cc_basename in
- KCC*)
- # Kuck and Associates, Inc. (KAI) C++ Compiler
-
- # KCC will only create a shared library if the output file
- # ends with ".so" (or ".sl" for HP-UX), so rename the library
- # to its proper name (with version) after linking.
- _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Archives containing C++ object files must be created using
- # the KAI C++ compiler.
- case $host in
- osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
- *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
- esac
- ;;
- RCC*)
- # Rational C++ 2.4.1
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- cxx*)
- case $host in
- osf3*)
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- ;;
- *)
- _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
- echo "-hidden">> $lib.exp~
- $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
- $RM $lib.exp'
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- #
- # There doesn't appear to be a way to prevent this compiler from
- # explicitly linking system object files so we need to strip them
- # from the output so that they don't get included in the library
- # dependencies.
- output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
- ;;
- *)
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
- case $host in
- osf3*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- ;;
- esac
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=:
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
-
- else
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- fi
- ;;
- esac
- ;;
-
- psos*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- sunos4*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.x
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- lcc*)
- # Lucid
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- solaris*)
- case $cc_basename in
- CC*)
- # Sun C++ 4.2, 5.x and Centerline C++
- _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
- _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
- ;;
- esac
- _LT_TAGVAR(link_all_deplibs, $1)=yes
-
- output_verbose_link_cmd='echo'
-
- # Archives containing C++ object files must be created using
- # "CC -xar", where "CC" is the Sun C++ compiler. This is
- # necessary to make sure instantiated templates are included
- # in the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
- ;;
- gcx*)
- # Green Hills C++ Compiler
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
-
- # The C++ compiler must be used to create the archive.
- _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
- ;;
- *)
- # GNU C++ compiler with Solaris linker
- if test "$GXX" = yes && test "$with_gnu_ld" = no; then
- _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
- if $CC --version | $GREP -v '^2\.7' > /dev/null; then
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- else
- # g++ 2.7 appears to require `-G' NOT `-shared' on this
- # platform.
- _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
- _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
-
- # Commands to make compiler produce verbose output that lists
- # what "hidden" libraries, object files and flags are used when
- # linking a shared library.
- output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
- fi
-
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
- case $host_os in
- solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
- *)
- _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- ;;
- esac
- fi
- ;;
- esac
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
- _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
- _LT_TAGVAR(archive_cmds_need_lc, $1)=no
- _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
- _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
- _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
- _LT_TAGVAR(link_all_deplibs, $1)=yes
- _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- case $cc_basename in
- CC*)
- _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- ;;
-
- tandem*)
- case $cc_basename in
- NCC*)
- # NonStop-UX NCC 3.20
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
- ;;
-
- vxworks*)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
-
- *)
- # FIXME: insert proper C++ library support
- _LT_TAGVAR(ld_shlibs, $1)=no
- ;;
- esac
-
- AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
- test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
-
- _LT_TAGVAR(GCC, $1)="$GXX"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- CC=$lt_save_CC
- LDCXX=$LD
- LD=$lt_save_LD
- GCC=$lt_save_GCC
- with_gnu_ld=$lt_save_with_gnu_ld
- lt_cv_path_LDCXX=$lt_cv_path_LD
- lt_cv_path_LD=$lt_save_path_LD
- lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
- lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
-fi # test "$_lt_caught_CXX_error" != yes
-
-AC_LANG_POP
-])# _LT_LANG_CXX_CONFIG
-
-
-# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
-# ---------------------------------
-# Figure out "hidden" library dependencies from verbose
-# compiler output when linking a shared library.
-# Parse the compiler output and extract the necessary
-# objects, libraries and library flags.
-m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
-[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
-# Dependencies to place before and after the object being linked:
-_LT_TAGVAR(predep_objects, $1)=
-_LT_TAGVAR(postdep_objects, $1)=
-_LT_TAGVAR(predeps, $1)=
-_LT_TAGVAR(postdeps, $1)=
-_LT_TAGVAR(compiler_lib_search_path, $1)=
-
-dnl we can't use the lt_simple_compile_test_code here,
-dnl because it contains code intended for an executable,
-dnl not a library. It's possible we should let each
-dnl tag define a new lt_????_link_test_code variable,
-dnl but it's only used here...
-m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
-int a;
-void foo (void) { a = 0; }
-_LT_EOF
-], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
-class Foo
-{
-public:
- Foo (void) { a = 0; }
-private:
- int a;
-};
-_LT_EOF
-], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer*4 a
- a=0
- return
- end
-_LT_EOF
-], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
- subroutine foo
- implicit none
- integer a
- a=0
- return
- end
-_LT_EOF
-], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
-public class foo {
- private int a;
- public void bar (void) {
- a = 0;
- }
-};
-_LT_EOF
-])
-dnl Parse the compiler output and extract the necessary
-dnl objects, libraries and library flags.
-if AC_TRY_EVAL(ac_compile); then
- # Parse the compiler output and extract the necessary
- # objects, libraries and library flags.
-
- # Sentinel used to keep track of whether or not we are before
- # the conftest object file.
- pre_test_object_deps_done=no
-
- for p in `eval "$output_verbose_link_cmd"`; do
- case $p in
-
- -L* | -R* | -l*)
- # Some compilers place space between "-{L,R}" and the path.
- # Remove the space.
- if test $p = "-L" ||
- test $p = "-R"; then
- prev=$p
- continue
- else
- prev=
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- case $p in
- -L* | -R*)
- # Internal compiler library paths should come after those
- # provided the user. The postdeps already come after the
- # user supplied libs so there is no need to process them.
- if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
- _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
- else
- _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
- fi
- ;;
- # The "-l" case would never come before the object being
- # linked, so don't bother handling this case.
- esac
- else
- if test -z "$_LT_TAGVAR(postdeps, $1)"; then
- _LT_TAGVAR(postdeps, $1)="${prev}${p}"
- else
- _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
- fi
- fi
- ;;
-
- *.$objext)
- # This assumes that the test object file only shows up
- # once in the compiler output.
- if test "$p" = "conftest.$objext"; then
- pre_test_object_deps_done=yes
- continue
- fi
-
- if test "$pre_test_object_deps_done" = no; then
- if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
- _LT_TAGVAR(predep_objects, $1)="$p"
- else
- _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
- fi
- else
- if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
- _LT_TAGVAR(postdep_objects, $1)="$p"
- else
- _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
- fi
- fi
- ;;
-
- *) ;; # Ignore the rest.
-
- esac
- done
-
- # Clean up.
- rm -f a.out a.exe
-else
- echo "libtool.m4: error: problem compiling $1 test program"
-fi
-
-$RM -f confest.$objext
-
-# PORTME: override above test on systems where it is broken
-m4_if([$1], [CXX],
-[case $host_os in
-interix[[3-9]]*)
- # Interix 3.5 installs completely hosed .la files for C++, so rather than
- # hack all around it, let's just trust "g++" to DTRT.
- _LT_TAGVAR(predep_objects,$1)=
- _LT_TAGVAR(postdep_objects,$1)=
- _LT_TAGVAR(postdeps,$1)=
- ;;
-
-linux*)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C++ 5.9
-
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-
-solaris*)
- case $cc_basename in
- CC*)
- # The more standards-conforming stlport4 library is
- # incompatible with the Cstd library. Avoid specifying
- # it if it's in CXXFLAGS. Ignore libCrun as
- # -library=stlport4 depends on it.
- case " $CXX $CXXFLAGS " in
- *" -library=stlport4 "*)
- solaris_use_stlport4=yes
- ;;
- esac
-
- # Adding this requires a known-good setup of shared libraries for
- # Sun compiler versions before 5.6, else PIC objects from an old
- # archive will be linked into the output, leading to subtle bugs.
- if test "$solaris_use_stlport4" != yes; then
- _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
- fi
- ;;
- esac
- ;;
-esac
-])
-
-case " $_LT_TAGVAR(postdeps, $1) " in
-*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
-esac
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=
-if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
- _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
-fi
-_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
- [The directories searched by this compiler when creating a shared library])
-_LT_TAGDECL([], [predep_objects], [1],
- [Dependencies to place before and after the objects being linked to
- create a shared library])
-_LT_TAGDECL([], [postdep_objects], [1])
-_LT_TAGDECL([], [predeps], [1])
-_LT_TAGDECL([], [postdeps], [1])
-_LT_TAGDECL([], [compiler_lib_search_path], [1],
- [The library search path used internally by the compiler when linking
- a shared library])
-])# _LT_SYS_HIDDEN_LIBDEPS
-
-
-# _LT_PROG_F77
-# ------------
-# Since AC_PROG_F77 is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_F77],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
-AC_PROG_F77
-if test -z "$F77" || test "X$F77" = "Xno"; then
- _lt_disable_F77=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_F77
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_F77], [])
-
-
-# _LT_LANG_F77_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for a Fortran 77 compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_F77_CONFIG],
-[AC_REQUIRE([_LT_PROG_F77])dnl
-AC_LANG_PUSH(Fortran 77)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for f77 test sources.
-ac_ext=f
-
-# Object file extension for compiled f77 test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the F77 compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_F77" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- CC=${F77-"f77"}
- compiler=$CC
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
- GCC=$G77
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$G77"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
-fi # test "$_lt_disable_F77" != yes
-
-AC_LANG_POP
-])# _LT_LANG_F77_CONFIG
-
-
-# _LT_PROG_FC
-# -----------
-# Since AC_PROG_FC is broken, in that it returns the empty string
-# if there is no fortran compiler, we have our own version here.
-m4_defun([_LT_PROG_FC],
-[
-pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
-AC_PROG_FC
-if test -z "$FC" || test "X$FC" = "Xno"; then
- _lt_disable_FC=yes
-fi
-popdef([AC_MSG_ERROR])
-])# _LT_PROG_FC
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([_LT_PROG_FC], [])
-
-
-# _LT_LANG_FC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for a Fortran compiler are
-# suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_FC_CONFIG],
-[AC_REQUIRE([_LT_PROG_FC])dnl
-AC_LANG_PUSH(Fortran)
-
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-_LT_TAGVAR(allow_undefined_flag, $1)=
-_LT_TAGVAR(always_export_symbols, $1)=no
-_LT_TAGVAR(archive_expsym_cmds, $1)=
-_LT_TAGVAR(export_dynamic_flag_spec, $1)=
-_LT_TAGVAR(hardcode_direct, $1)=no
-_LT_TAGVAR(hardcode_direct_absolute, $1)=no
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
-_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
-_LT_TAGVAR(hardcode_libdir_separator, $1)=
-_LT_TAGVAR(hardcode_minus_L, $1)=no
-_LT_TAGVAR(hardcode_automatic, $1)=no
-_LT_TAGVAR(inherit_rpath, $1)=no
-_LT_TAGVAR(module_cmds, $1)=
-_LT_TAGVAR(module_expsym_cmds, $1)=
-_LT_TAGVAR(link_all_deplibs, $1)=unknown
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-_LT_TAGVAR(no_undefined_flag, $1)=
-_LT_TAGVAR(whole_archive_flag_spec, $1)=
-_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
-
-# Source file extension for fc test sources.
-ac_ext=${ac_fc_srcext-f}
-
-# Object file extension for compiled fc test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# No sense in running all these tests if we already determined that
-# the FC compiler isn't working. Some variables (like enable_shared)
-# are currently assumed to apply to all compilers on this platform,
-# and will be corrupted by setting them based on a non-working compiler.
-if test "$_lt_disable_FC" != yes; then
- # Code to be used in simple compile tests
- lt_simple_compile_test_code="\
- subroutine t
- return
- end
-"
-
- # Code to be used in simple link tests
- lt_simple_link_test_code="\
- program t
- end
-"
-
- # ltmain only uses $CC for tagged configurations so make sure $CC is set.
- _LT_TAG_COMPILER
-
- # save warnings/boilerplate of simple test code
- _LT_COMPILER_BOILERPLATE
- _LT_LINKER_BOILERPLATE
-
- # Allow CC to be a program name with arguments.
- lt_save_CC="$CC"
- lt_save_GCC=$GCC
- CC=${FC-"f95"}
- compiler=$CC
- GCC=$ac_cv_fc_compiler_gnu
-
- _LT_TAGVAR(compiler, $1)=$CC
- _LT_CC_BASENAME([$compiler])
-
- if test -n "$compiler"; then
- AC_MSG_CHECKING([if libtool supports shared libraries])
- AC_MSG_RESULT([$can_build_shared])
-
- AC_MSG_CHECKING([whether to build shared libraries])
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
- aix[[4-9]]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- AC_MSG_RESULT([$enable_shared])
-
- AC_MSG_CHECKING([whether to build static libraries])
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- AC_MSG_RESULT([$enable_static])
-
- _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
- _LT_TAGVAR(LD, $1)="$LD"
-
- ## CAVEAT EMPTOR:
- ## There is no encapsulation within the following macros, do not change
- ## the running order or otherwise move them around unless you know exactly
- ## what you are doing...
- _LT_SYS_HIDDEN_LIBDEPS($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_SYS_DYNAMIC_LINKER($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
- fi # test -n "$compiler"
-
- GCC=$lt_save_GCC
- CC="$lt_save_CC"
-fi # test "$_lt_disable_FC" != yes
-
-AC_LANG_POP
-])# _LT_LANG_FC_CONFIG
-
-
-# _LT_LANG_GCJ_CONFIG([TAG])
-# --------------------------
-# Ensure that the configuration variables for the GNU Java Compiler compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_GCJ_CONFIG],
-[AC_REQUIRE([LT_PROG_GCJ])dnl
-AC_LANG_SAVE
-
-# Source file extension for Java test sources.
-ac_ext=java
-
-# Object file extension for compiled Java test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="class foo {}"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=yes
-CC=${GCJ-"gcj"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_TAGVAR(LD, $1)="$LD"
-_LT_CC_BASENAME([$compiler])
-
-# GCJ did not exist at the time GCC didn't implicitly link libc in.
-_LT_TAGVAR(archive_cmds_need_lc, $1)=no
-
-_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
-
-if test -n "$compiler"; then
- _LT_COMPILER_NO_RTTI($1)
- _LT_COMPILER_PIC($1)
- _LT_COMPILER_C_O($1)
- _LT_COMPILER_FILE_LOCKS($1)
- _LT_LINKER_SHLIBS($1)
- _LT_LINKER_HARDCODE_LIBPATH($1)
-
- _LT_CONFIG($1)
-fi
-
-AC_LANG_RESTORE
-
-GCC=$lt_save_GCC
-CC="$lt_save_CC"
-])# _LT_LANG_GCJ_CONFIG
-
-
-# _LT_LANG_RC_CONFIG([TAG])
-# -------------------------
-# Ensure that the configuration variables for the Windows resource compiler
-# are suitably defined. These variables are subsequently used by _LT_CONFIG
-# to write the compiler configuration to `libtool'.
-m4_defun([_LT_LANG_RC_CONFIG],
-[AC_REQUIRE([LT_PROG_RC])dnl
-AC_LANG_SAVE
-
-# Source file extension for RC test sources.
-ac_ext=rc
-
-# Object file extension for compiled RC test sources.
-objext=o
-_LT_TAGVAR(objext, $1)=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
-
-# Code to be used in simple link tests
-lt_simple_link_test_code="$lt_simple_compile_test_code"
-
-# ltmain only uses $CC for tagged configurations so make sure $CC is set.
-_LT_TAG_COMPILER
-
-# save warnings/boilerplate of simple test code
-_LT_COMPILER_BOILERPLATE
-_LT_LINKER_BOILERPLATE
-
-# Allow CC to be a program name with arguments.
-lt_save_CC="$CC"
-lt_save_GCC=$GCC
-GCC=
-CC=${RC-"windres"}
-compiler=$CC
-_LT_TAGVAR(compiler, $1)=$CC
-_LT_CC_BASENAME([$compiler])
-_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
-
-if test -n "$compiler"; then
- :
- _LT_CONFIG($1)
-fi
-
-GCC=$lt_save_GCC
-AC_LANG_RESTORE
-CC="$lt_save_CC"
-])# _LT_LANG_RC_CONFIG
-
-
-# LT_PROG_GCJ
-# -----------
-AC_DEFUN([LT_PROG_GCJ],
-[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
- [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
- [AC_CHECK_TOOL(GCJ, gcj,)
- test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
- AC_SUBST(GCJFLAGS)])])[]dnl
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
-
-
-# LT_PROG_RC
-# ----------
-AC_DEFUN([LT_PROG_RC],
-[AC_CHECK_TOOL(RC, windres,)
-])
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_RC], [])
-
-
-# _LT_DECL_EGREP
-# --------------
-# If we don't have a new enough Autoconf to choose the best grep
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_EGREP],
-[AC_REQUIRE([AC_PROG_EGREP])dnl
-AC_REQUIRE([AC_PROG_FGREP])dnl
-test -z "$GREP" && GREP=grep
-_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
-_LT_DECL([], [EGREP], [1], [An ERE matcher])
-_LT_DECL([], [FGREP], [1], [A literal string matcher])
-dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
-AC_SUBST([GREP])
-])
-
-
-# _LT_DECL_OBJDUMP
-# --------------
-# If we don't have a new enough Autoconf to choose the best objdump
-# available, choose the one first in the user's PATH.
-m4_defun([_LT_DECL_OBJDUMP],
-[AC_CHECK_TOOL(OBJDUMP, objdump, false)
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
-AC_SUBST([OBJDUMP])
-])
-
-
-# _LT_DECL_SED
-# ------------
-# Check for a fully-functional sed program, that truncates
-# as few characters as possible. Prefer GNU sed if found.
-m4_defun([_LT_DECL_SED],
-[AC_PROG_SED
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
-_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
- [Sed that helps us avoid accidentally triggering echo(1) options like -n])
-])# _LT_DECL_SED
-
-m4_ifndef([AC_PROG_SED], [
-# NOTE: This macro has been submitted for inclusion into #
-# GNU Autoconf as AC_PROG_SED. When it is available in #
-# a released version of Autoconf we should remove this #
-# macro and use it instead. #
-
-m4_defun([AC_PROG_SED],
-[AC_MSG_CHECKING([for a sed that does not truncate output])
-AC_CACHE_VAL(lt_cv_path_SED,
-[# Loop through the user's path and test for sed and gsed.
-# Then use that list of sed's as ones to test for truncation.
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for lt_ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
- lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
- fi
- done
- done
-done
-IFS=$as_save_IFS
-lt_ac_max=0
-lt_ac_count=0
-# Add /usr/xpg4/bin/sed as it is typically found on Solaris
-# along with /bin/sed that truncates output.
-for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
- test ! -f $lt_ac_sed && continue
- cat /dev/null > conftest.in
- lt_ac_count=0
- echo $ECHO_N "0123456789$ECHO_C" >conftest.in
- # Check for GNU sed and select it if it is found.
- if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
- lt_cv_path_SED=$lt_ac_sed
- break
- fi
- while true; do
- cat conftest.in conftest.in >conftest.tmp
- mv conftest.tmp conftest.in
- cp conftest.in conftest.nl
- echo >>conftest.nl
- $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
- cmp -s conftest.out conftest.nl || break
- # 10000 chars as input seems more than enough
- test $lt_ac_count -gt 10 && break
- lt_ac_count=`expr $lt_ac_count + 1`
- if test $lt_ac_count -gt $lt_ac_max; then
- lt_ac_max=$lt_ac_count
- lt_cv_path_SED=$lt_ac_sed
- fi
- done
-done
-])
-SED=$lt_cv_path_SED
-AC_SUBST([SED])
-AC_MSG_RESULT([$SED])
-])#AC_PROG_SED
-])#m4_ifndef
-
-# Old name:
-AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([LT_AC_PROG_SED], [])
-
-
-# _LT_CHECK_SHELL_FEATURES
-# ------------------------
-# Find out whether the shell is Bourne or XSI compatible,
-# or has some other useful features.
-m4_defun([_LT_CHECK_SHELL_FEATURES],
-[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-AC_MSG_RESULT([$xsi_shell])
-_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
-
-AC_MSG_CHECKING([whether the shell understands "+="])
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-AC_MSG_RESULT([$lt_shell_append])
-_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
-_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
-])# _LT_CHECK_SHELL_FEATURES
-
-
-# _LT_PROG_XSI_SHELLFNS
-# ---------------------
-# Bourne and XSI compatible variants of some useful shell functions.
-m4_defun([_LT_PROG_XSI_SHELLFNS],
-[case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=$(( $[*] ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=${#1}
-}
-
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-dnl func_dirname_and_basename
-dnl A portable version of this function is already defined in general.m4sh
-dnl so there is no need for it here.
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[[^=]]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=`expr "$[@]"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$[1]+=\$[2]"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$[1]=\$$[1]\$[2]"
-}
-
-_LT_EOF
- ;;
- esac
-])
-
-# Helper functions for option handling. -*- Autoconf -*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# 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.
-
-# serial 6 ltoptions.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
-
-
-# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
-# ------------------------------------------
-m4_define([_LT_MANGLE_OPTION],
-[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
-
-
-# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
-# ---------------------------------------
-# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
-# matching handler defined, dispatch to it. Other OPTION-NAMEs are
-# saved as a flag.
-m4_define([_LT_SET_OPTION],
-[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
-m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
- _LT_MANGLE_DEFUN([$1], [$2]),
- [m4_warning([Unknown $1 option `$2'])])[]dnl
-])
-
-
-# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
-# ------------------------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-m4_define([_LT_IF_OPTION],
-[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
-
-
-# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
-# -------------------------------------------------------
-# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
-# are set.
-m4_define([_LT_UNLESS_OPTIONS],
-[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
- [m4_define([$0_found])])])[]dnl
-m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
-])[]dnl
-])
-
-
-# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
-# ----------------------------------------
-# OPTION-LIST is a space-separated list of Libtool options associated
-# with MACRO-NAME. If any OPTION has a matching handler declared with
-# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
-# the unknown option and exit.
-m4_defun([_LT_SET_OPTIONS],
-[# Set options
-m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
- [_LT_SET_OPTION([$1], _LT_Option)])
-
-m4_if([$1],[LT_INIT],[
- dnl
- dnl Simply set some default values (i.e off) if boolean options were not
- dnl specified:
- _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
- ])
- _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
- ])
- dnl
- dnl If no reference was made to various pairs of opposing options, then
- dnl we run the default mode handler for the pair. For example, if neither
- dnl `shared' nor `disable-shared' was passed, we enable building of shared
- dnl archives by default:
- _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
- _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
- _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
- [_LT_ENABLE_FAST_INSTALL])
- ])
-])# _LT_SET_OPTIONS
-
-
-
-# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
-# -----------------------------------------
-m4_define([_LT_MANGLE_DEFUN],
-[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
-
-
-# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
-# -----------------------------------------------
-m4_define([LT_OPTION_DEFINE],
-[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
-])# LT_OPTION_DEFINE
-
-
-# dlopen
-# ------
-LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
-])
-
-AU_DEFUN([AC_LIBTOOL_DLOPEN],
-[_LT_SET_OPTION([LT_INIT], [dlopen])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `dlopen' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
-
-
-# win32-dll
-# ---------
-# Declare package support for building win32 dll's.
-LT_OPTION_DEFINE([LT_INIT], [win32-dll],
-[enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
- AC_CHECK_TOOL(AS, as, false)
- AC_CHECK_TOOL(DLLTOOL, dlltool, false)
- AC_CHECK_TOOL(OBJDUMP, objdump, false)
- ;;
-esac
-
-test -z "$AS" && AS=as
-_LT_DECL([], [AS], [0], [Assembler program])dnl
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
-])# win32-dll
-
-AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
-[AC_REQUIRE([AC_CANONICAL_HOST])dnl
-_LT_SET_OPTION([LT_INIT], [win32-dll])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `win32-dll' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
-
-
-# _LT_ENABLE_SHARED([DEFAULT])
-# ----------------------------
-# implement the --enable-shared flag, and supports the `shared' and
-# `disable-shared' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_SHARED],
-[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([shared],
- [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
- [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
-
- _LT_DECL([build_libtool_libs], [enable_shared], [0],
- [Whether or not to build shared libraries])
-])# _LT_ENABLE_SHARED
-
-LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
-])
-
-AC_DEFUN([AC_DISABLE_SHARED],
-[_LT_SET_OPTION([LT_INIT], [disable-shared])
-])
-
-AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
-AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_SHARED], [])
-dnl AC_DEFUN([AM_DISABLE_SHARED], [])
-
-
-
-# _LT_ENABLE_STATIC([DEFAULT])
-# ----------------------------
-# implement the --enable-static flag, and support the `static' and
-# `disable-static' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_STATIC],
-[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([static],
- [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
- [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
-
- _LT_DECL([build_old_libs], [enable_static], [0],
- [Whether or not to build static libraries])
-])# _LT_ENABLE_STATIC
-
-LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
-
-# Old names:
-AC_DEFUN([AC_ENABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
-])
-
-AC_DEFUN([AC_DISABLE_STATIC],
-[_LT_SET_OPTION([LT_INIT], [disable-static])
-])
-
-AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
-AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AM_ENABLE_STATIC], [])
-dnl AC_DEFUN([AM_DISABLE_STATIC], [])
-
-
-
-# _LT_ENABLE_FAST_INSTALL([DEFAULT])
-# ----------------------------------
-# implement the --enable-fast-install flag, and support the `fast-install'
-# and `disable-fast-install' LT_INIT options.
-# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
-m4_define([_LT_ENABLE_FAST_INSTALL],
-[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
-AC_ARG_ENABLE([fast-install],
- [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
- [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
- [p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac],
- [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
-
-_LT_DECL([fast_install], [enable_fast_install], [0],
- [Whether or not to optimize for fast installation])dnl
-])# _LT_ENABLE_FAST_INSTALL
-
-LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
-LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
-
-# Old names:
-AU_DEFUN([AC_ENABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `fast-install' option into LT_INIT's first parameter.])
-])
-
-AU_DEFUN([AC_DISABLE_FAST_INSTALL],
-[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you put
-the `disable-fast-install' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
-dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
-
-
-# _LT_WITH_PIC([MODE])
-# --------------------
-# implement the --with-pic flag, and support the `pic-only' and `no-pic'
-# LT_INIT options.
-# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
-m4_define([_LT_WITH_PIC],
-[AC_ARG_WITH([pic],
- [AS_HELP_STRING([--with-pic],
- [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
- [pic_mode="$withval"],
- [pic_mode=default])
-
-test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
-
-_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
-])# _LT_WITH_PIC
-
-LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
-LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
-
-# Old name:
-AU_DEFUN([AC_LIBTOOL_PICMODE],
-[_LT_SET_OPTION([LT_INIT], [pic-only])
-AC_DIAGNOSE([obsolete],
-[$0: Remove this warning and the call to _LT_SET_OPTION when you
-put the `pic-only' option into LT_INIT's first parameter.])
-])
-
-dnl aclocal-1.4 backwards compatibility:
-dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
-
-
-m4_define([_LTDL_MODE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
- [m4_define([_LTDL_MODE], [nonrecursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [recursive],
- [m4_define([_LTDL_MODE], [recursive])])
-LT_OPTION_DEFINE([LTDL_INIT], [subproject],
- [m4_define([_LTDL_MODE], [subproject])])
-
-m4_define([_LTDL_TYPE], [])
-LT_OPTION_DEFINE([LTDL_INIT], [installable],
- [m4_define([_LTDL_TYPE], [installable])])
-LT_OPTION_DEFINE([LTDL_INIT], [convenience],
- [m4_define([_LTDL_TYPE], [convenience])])
-
-# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan, 2004
-#
-# 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.
-
-# serial 6 ltsugar.m4
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
-
-
-# lt_join(SEP, ARG1, [ARG2...])
-# -----------------------------
-# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
-# associated separator.
-# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
-# versions in m4sugar had bugs.
-m4_define([lt_join],
-[m4_if([$#], [1], [],
- [$#], [2], [[$2]],
- [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
-m4_define([_lt_join],
-[m4_if([$#$2], [2], [],
- [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
-
-
-# lt_car(LIST)
-# lt_cdr(LIST)
-# ------------
-# Manipulate m4 lists.
-# These macros are necessary as long as will still need to support
-# Autoconf-2.59 which quotes differently.
-m4_define([lt_car], [[$1]])
-m4_define([lt_cdr],
-[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
- [$#], 1, [],
- [m4_dquote(m4_shift($@))])])
-m4_define([lt_unquote], $1)
-
-
-# lt_append(MACRO-NAME, STRING, [SEPARATOR])
-# ------------------------------------------
-# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
-# Note that neither SEPARATOR nor STRING are expanded; they are appended
-# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
-# No SEPARATOR is output if MACRO-NAME was previously undefined (different
-# than defined and empty).
-#
-# This macro is needed until we can rely on Autoconf 2.62, since earlier
-# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
-m4_define([lt_append],
-[m4_define([$1],
- m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
-
-
-
-# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
-# ----------------------------------------------------------
-# Produce a SEP delimited list of all paired combinations of elements of
-# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
-# has the form PREFIXmINFIXSUFFIXn.
-# Needed until we can rely on m4_combine added in Autoconf 2.62.
-m4_define([lt_combine],
-[m4_if(m4_eval([$# > 3]), [1],
- [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
-[[m4_foreach([_Lt_prefix], [$2],
- [m4_foreach([_Lt_suffix],
- ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
- [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
-
-
-# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
-# -----------------------------------------------------------------------
-# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
-# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
-m4_define([lt_if_append_uniq],
-[m4_ifdef([$1],
- [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
- [lt_append([$1], [$2], [$3])$4],
- [$5])],
- [lt_append([$1], [$2], [$3])$4])])
-
-
-# lt_dict_add(DICT, KEY, VALUE)
-# -----------------------------
-m4_define([lt_dict_add],
-[m4_define([$1($2)], [$3])])
-
-
-# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
-# --------------------------------------------
-m4_define([lt_dict_add_subkey],
-[m4_define([$1($2:$3)], [$4])])
-
-
-# lt_dict_fetch(DICT, KEY, [SUBKEY])
-# ----------------------------------
-m4_define([lt_dict_fetch],
-[m4_ifval([$3],
- m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
- m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
-
-
-# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
-# -----------------------------------------------------------------
-m4_define([lt_if_dict_fetch],
-[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
- [$5],
- [$6])])
-
-
-# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
-# --------------------------------------------------------------
-m4_define([lt_dict_filter],
-[m4_if([$5], [], [],
- [lt_join(m4_quote(m4_default([$4], [[, ]])),
- lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
- [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
-])
-
-# ltversion.m4 -- version numbers -*- Autoconf -*-
-#
-# Copyright (C) 2004 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004
-#
-# 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.
-
-# Generated from ltversion.in.
-
-# serial 3017 ltversion.m4
-# This file is part of GNU Libtool
-
-m4_define([LT_PACKAGE_VERSION], [2.2.6b])
-m4_define([LT_PACKAGE_REVISION], [1.3017])
-
-AC_DEFUN([LTVERSION_VERSION],
-[macro_version='2.2.6b'
-macro_revision='1.3017'
-_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
-_LT_DECL(, macro_revision, 0)
-])
-
-# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
-#
-# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
-# Written by Scott James Remnant, 2004.
-#
-# 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.
-
-# serial 4 lt~obsolete.m4
-
-# These exist entirely to fool aclocal when bootstrapping libtool.
-#
-# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
-# which have later been changed to m4_define as they aren't part of the
-# exported API, or moved to Autoconf or Automake where they belong.
-#
-# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
-# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
-# using a macro with the same name in our local m4/libtool.m4 it'll
-# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
-# and doesn't know about Autoconf macros at all.)
-#
-# So we provide this file, which has a silly filename so it's always
-# included after everything else. This provides aclocal with the
-# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
-# because those macros already exist, or will be overwritten later.
-# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
-#
-# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
-# Yes, that means every name once taken will need to remain here until
-# we give up compatibility with versions before 1.7, at which point
-# we need to keep only those names which we still refer to.
-
-# This is to help aclocal find these macros, as it can't see m4_define.
-AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
-
-m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
-m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
-m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
-m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
-m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
-m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
-m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
-m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
-m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
-m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
-m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
-m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
-m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
-m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
-m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
-m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
-m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
-m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
-m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
-m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
-m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
-m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
-m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
-m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
-m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
-m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
-m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
-m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
-m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
-m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
-m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
-m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
-m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
-m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
-m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
-m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
-m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
-m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
-m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
-m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
-m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
-m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
-m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
-m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
-m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
-m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
-m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
-m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
-m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
-m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
-
-# Copyright (C) 2002, 2003, 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.
-
-# AM_AUTOMAKE_VERSION(VERSION)
-# ----------------------------
-# Automake X.Y traces this macro to ensure aclocal.m4 has been
-# generated from the m4 files accompanying Automake X.Y.
-# (This private macro should not be called outside this file.)
-AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.11'
-dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
-dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11], [],
- [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
-])
-
-# _AM_AUTOCONF_VERSION(VERSION)
-# -----------------------------
-# aclocal traces this macro to find the Autoconf version.
-# This is a private macro too. Using m4_define simplifies
-# the logic in aclocal, which can simply ignore this definition.
-m4_define([_AM_AUTOCONF_VERSION], [])
-
-# AM_SET_CURRENT_AUTOMAKE_VERSION
-# -------------------------------
-# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
-AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
-m4_ifndef([AC_AUTOCONF_VERSION],
- [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
-
-# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-
-# Copyright (C) 2001, 2003, 2005 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.
-
-# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
-# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
-# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
-#
-# Of course, Automake must honor this variable whenever it calls a
-# tool from the auxiliary directory. The problem is that $srcdir (and
-# therefore $ac_aux_dir as well) can be either absolute or relative,
-# depending on how configure is run. This is pretty annoying, since
-# it makes $ac_aux_dir quite unusable in subdirectories: in the top
-# source directory, any form will work fine, but in subdirectories a
-# relative path needs to be adjusted first.
-#
-# $ac_aux_dir/missing
-# fails when called from a subdirectory if $ac_aux_dir is relative
-# $top_srcdir/$ac_aux_dir/missing
-# fails if $ac_aux_dir is absolute,
-# fails when called from a subdirectory in a VPATH build with
-# a relative $ac_aux_dir
-#
-# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
-# are both prefixed by $srcdir. In an in-source build this is usually
-# harmless because $srcdir is `.', but things will broke when you
-# start a VPATH build or use an absolute $srcdir.
-#
-# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
-# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
-# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
-# and then we would define $MISSING as
-# MISSING="\${SHELL} $am_aux_dir/missing"
-# This will work as long as MISSING is not called from configure, because
-# unfortunately $(top_srcdir) has no meaning in configure.
-# However there are other variables, like CC, which are often used in
-# configure, and could therefore not use this "fixed" $ac_aux_dir.
-#
-# Another solution, used here, is to always expand $ac_aux_dir to an
-# absolute PATH. The drawback is that using absolute paths prevent a
-# configured tree to be moved without reconfiguration.
-
-AC_DEFUN([AM_AUX_DIR_EXPAND],
-[dnl Rely on autoconf to set up CDPATH properly.
-AC_PREREQ([2.50])dnl
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-])
-
-# AM_CONDITIONAL -*- Autoconf -*-
-
-# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 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.
-
-# serial 9
-
-# AM_CONDITIONAL(NAME, SHELL-CONDITION)
-# -------------------------------------
-# Define a conditional.
-AC_DEFUN([AM_CONDITIONAL],
-[AC_PREREQ(2.52)dnl
- ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
- [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
-AC_SUBST([$1_TRUE])dnl
-AC_SUBST([$1_FALSE])dnl
-_AM_SUBST_NOTMAKE([$1_TRUE])dnl
-_AM_SUBST_NOTMAKE([$1_FALSE])dnl
-m4_define([_AM_COND_VALUE_$1], [$2])dnl
-if $2; then
- $1_TRUE=
- $1_FALSE='#'
-else
- $1_TRUE='#'
- $1_FALSE=
-fi
-AC_CONFIG_COMMANDS_PRE(
-[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
- AC_MSG_ERROR([[conditional "$1" was never defined.
-Usually this means the macro was only invoked conditionally.]])
-fi])])
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# 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.
-
-# serial 10
-
-# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
-# written in clear, in which case automake, when reading aclocal.m4,
-# will think it sees a *use*, and therefore will trigger all it's
-# C support machinery. Also note that it means that autoscan, seeing
-# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
-
-
-# _AM_DEPENDENCIES(NAME)
-# ----------------------
-# See how the compiler implements dependency checking.
-# NAME is "CC", "CXX", "GCJ", or "OBJC".
-# We try a few techniques and use that to set a single cache variable.
-#
-# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
-# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
-# dependency, and given that the user is not expected to run this macro,
-# just rely on AC_PROG_CC.
-AC_DEFUN([_AM_DEPENDENCIES],
-[AC_REQUIRE([AM_SET_DEPDIR])dnl
-AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
-AC_REQUIRE([AM_MAKE_INCLUDE])dnl
-AC_REQUIRE([AM_DEP_TRACK])dnl
-
-ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
- [$1], CXX, [depcc="$CXX" am_compiler_list=],
- [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
- [$1], UPC, [depcc="$UPC" am_compiler_list=],
- [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
- [depcc="$$1" am_compiler_list=])
-
-AC_CACHE_CHECK([dependency style of $depcc],
- [am_cv_$1_dependencies_compiler_type],
-[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_$1_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
- fi
- am__universal=false
- m4_case([$1], [CC],
- [case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac],
- [CXX],
- [case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac])
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_$1_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_$1_dependencies_compiler_type=none
-fi
-])
-AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
-AM_CONDITIONAL([am__fastdep$1], [
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
-])
-
-
-# AM_SET_DEPDIR
-# -------------
-# Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
-AC_DEFUN([AM_SET_DEPDIR],
-[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
-])
-
-
-# AM_DEP_TRACK
-# ------------
-AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
-AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
-AC_SUBST([AMDEPBACKSLASH])dnl
-_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
-])
-
-# Generate code to set up dependency tracking. -*- Autoconf -*-
-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 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.
-
-#serial 5
-
-# _AM_OUTPUT_DEPENDENCY_COMMANDS
-# ------------------------------
-AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[{
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
- shift
- for mf
- do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`AS_DIRNAME("$mf")`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`AS_DIRNAME(["$file"])`
- AS_MKDIR_P([$dirpart/$fdir])
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
- done
-}
-])# _AM_OUTPUT_DEPENDENCY_COMMANDS
-
-
-# AM_OUTPUT_DEPENDENCY_COMMANDS
-# -----------------------------
-# This macro should only be invoked once -- use via AC_REQUIRE.
-#
-# This code is only required when automatic dependency tracking
-# is enabled. FIXME. This creates each `.P' file that we will
-# need in order to bootstrap the dependency handling code.
-AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
-[AC_CONFIG_COMMANDS([depfiles],
- [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
- [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
-])
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
-# 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.
-
-# serial 8
-
-# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS.
-AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)])
-
-# Do all the work for Automake. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008, 2009 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.
-
-# serial 16
-
-# This macro actually does too much. Some checks are only needed if
-# your package does certain things. But this isn't really a big deal.
-
-# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
-# AM_INIT_AUTOMAKE([OPTIONS])
-# -----------------------------------------------
-# The call with PACKAGE and VERSION arguments is the old style
-# call (pre autoconf-2.50), which is being phased out. PACKAGE
-# and VERSION should now be passed to AC_INIT and removed from
-# the call to AM_INIT_AUTOMAKE.
-# We support both call styles for the transition. After
-# the next Automake release, Autoconf can make the AC_INIT
-# arguments mandatory, and then we can depend on a new Autoconf
-# release and drop the old call support.
-AC_DEFUN([AM_INIT_AUTOMAKE],
-[AC_PREREQ([2.62])dnl
-dnl Autoconf wants to disallow AM_ names. We explicitly allow
-dnl the ones we care about.
-m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
-AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
-AC_REQUIRE([AC_PROG_INSTALL])dnl
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
- # is not polluted with repeated "-I."
- AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
- # test to see if srcdir already configured
- if test -f $srcdir/config.status; then
- AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
- fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-AC_SUBST([CYGPATH_W])
-
-# Define the identity of the package.
-dnl Distinguish between old-style and new-style calls.
-m4_ifval([$2],
-[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
- AC_SUBST([PACKAGE], [$1])dnl
- AC_SUBST([VERSION], [$2])],
-[_AM_SET_OPTIONS([$1])dnl
-dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
-m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
- [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
-
-_AM_IF_OPTION([no-define],,
-[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
- AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
-
-# Some tools Automake needs.
-AC_REQUIRE([AM_SANITY_CHECK])dnl
-AC_REQUIRE([AC_ARG_PROGRAM])dnl
-AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
-AM_MISSING_PROG(AUTOCONF, autoconf)
-AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
-AM_MISSING_PROG(AUTOHEADER, autoheader)
-AM_MISSING_PROG(MAKEINFO, makeinfo)
-AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
-AC_REQUIRE([AM_PROG_MKDIR_P])dnl
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-AC_REQUIRE([AC_PROG_AWK])dnl
-AC_REQUIRE([AC_PROG_MAKE_SET])dnl
-AC_REQUIRE([AM_SET_LEADING_DOT])dnl
-_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
- [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
- [_AM_PROG_TAR([v7])])])
-_AM_IF_OPTION([no-dependencies],,
-[AC_PROVIDE_IFELSE([AC_PROG_CC],
- [_AM_DEPENDENCIES(CC)],
- [define([AC_PROG_CC],
- defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_CXX],
- [_AM_DEPENDENCIES(CXX)],
- [define([AC_PROG_CXX],
- defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
-AC_PROVIDE_IFELSE([AC_PROG_OBJC],
- [_AM_DEPENDENCIES(OBJC)],
- [define([AC_PROG_OBJC],
- defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
-])
-_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
-dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
-dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
-dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
-AC_CONFIG_COMMANDS_PRE(dnl
-[m4_provide_if([_AM_COMPILER_EXEEXT],
- [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
-])
-
-dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
-dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
-dnl mangled by Autoconf and run in a shell conditional statement.
-m4_define([_AC_COMPILER_EXEEXT],
-m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
-
-
-# When config.status generates a header, we must update the stamp-h file.
-# This file resides in the same directory as the config header
-# that is generated. The stamp files are numbered to have different names.
-
-# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
-# loop where config.status creates the headers, so we can generate
-# our stamp files there.
-AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
-[# Compute $1's index in $config_headers.
-_am_arg=$1
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-
-# Copyright (C) 2001, 2003, 2005, 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.
-
-# AM_PROG_INSTALL_SH
-# ------------------
-# Define $install_sh.
-AC_DEFUN([AM_PROG_INSTALL_SH],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-if test x"${install_sh}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
- *)
- install_sh="\${SHELL} $am_aux_dir/install-sh"
- esac
-fi
-AC_SUBST(install_sh)])
-
-# Copyright (C) 2003, 2005 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.
-
-# serial 2
-
-# Check whether the underlying file-system supports filenames
-# with a leading dot. For instance MS-DOS doesn't.
-AC_DEFUN([AM_SET_LEADING_DOT],
-[rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-AC_SUBST([am__leading_dot])])
-
-# Add --enable-maintainer-mode option to configure. -*- Autoconf -*-
-# From Jim Meyering
-
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 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.
-
-# serial 5
-
-# AM_MAINTAINER_MODE([DEFAULT-MODE])
-# ----------------------------------
-# Control maintainer-specific portions of Makefiles.
-# Default is to disable them, unless `enable' is passed literally.
-# For symmetry, `disable' may be passed as well. Anyway, the user
-# can override the default with the --enable/--disable switch.
-AC_DEFUN([AM_MAINTAINER_MODE],
-[m4_case(m4_default([$1], [disable]),
- [enable], [m4_define([am_maintainer_other], [disable])],
- [disable], [m4_define([am_maintainer_other], [enable])],
- [m4_define([am_maintainer_other], [enable])
- m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])])
-AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
- dnl maintainer-mode's default is 'disable' unless 'enable' is passed
- AC_ARG_ENABLE([maintainer-mode],
-[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- [USE_MAINTAINER_MODE=$enableval],
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
- AC_MSG_RESULT([$USE_MAINTAINER_MODE])
- AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
- MAINT=$MAINTAINER_MODE_TRUE
- AC_SUBST([MAINT])dnl
-]
-)
-
-AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
-
-# Check to see how 'make' treats includes. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 2009 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.
-
-# serial 4
-
-# AM_MAKE_INCLUDE()
-# -----------------
-# Check to see how make treats includes.
-AC_DEFUN([AM_MAKE_INCLUDE],
-[am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-AC_MSG_CHECKING([for style of include used by $am_make])
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-AC_SUBST([am__include])
-AC_SUBST([am__quote])
-AC_MSG_RESULT([$_am_result])
-rm -f confinc confmf
-])
-
-# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
-
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 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.
-
-# serial 6
-
-# AM_MISSING_PROG(NAME, PROGRAM)
-# ------------------------------
-AC_DEFUN([AM_MISSING_PROG],
-[AC_REQUIRE([AM_MISSING_HAS_RUN])
-$1=${$1-"${am_missing_run}$2"}
-AC_SUBST($1)])
-
-
-# AM_MISSING_HAS_RUN
-# ------------------
-# Define MISSING if not defined so far and test if it supports --run.
-# If it does, set am_missing_run to use it, otherwise, to nothing.
-AC_DEFUN([AM_MISSING_HAS_RUN],
-[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-AC_REQUIRE_AUX_FILE([missing])dnl
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- AC_MSG_WARN([`missing' script is too old or missing])
-fi
-])
-
-# 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
-])
-
-# Helper functions for option handling. -*- Autoconf -*-
-
-# Copyright (C) 2001, 2002, 2003, 2005, 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.
-
-# serial 4
-
-# _AM_MANGLE_OPTION(NAME)
-# -----------------------
-AC_DEFUN([_AM_MANGLE_OPTION],
-[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
-
-# _AM_SET_OPTION(NAME)
-# ------------------------------
-# Set option NAME. Presently that only means defining a flag for this option.
-AC_DEFUN([_AM_SET_OPTION],
-[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
-
-# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
-# OPTIONS is a space-separated list of Automake options.
-AC_DEFUN([_AM_SET_OPTIONS],
-[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
-
-# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
-# -------------------------------------------
-# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
-AC_DEFUN([_AM_IF_OPTION],
-[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
-
-# Check to make sure that the build environment is sane. -*- Autoconf -*-
-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 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.
-
-# serial 5
-
-# AM_SANITY_CHECK
-# ---------------
-AC_DEFUN([AM_SANITY_CHECK],
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name. Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
- *[[\\\"\#\$\&\'\`$am_lf]]*)
- AC_MSG_ERROR([unsafe absolute working directory name]);;
-esac
-case $srcdir in
- *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
- AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$[*]" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$[*]" != "X $srcdir/configure conftest.file" \
- && test "$[*]" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
-alias in your environment])
- fi
-
- test "$[2]" = conftest.file
- )
-then
- # Ok.
- :
-else
- AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-AC_MSG_RESULT(yes)])
-
-# Copyright (C) 2001, 2003, 2005 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_INSTALL_STRIP
-# ---------------------
-# One issue with vendor `install' (even GNU) is that you can't
-# specify the program used to strip binaries. This is especially
-# annoying in cross-compiling environments, where the build's strip
-# is unlikely to handle the host's binaries.
-# Fortunately install-sh will honor a STRIPPROG variable, so we
-# always use install-sh in `make install-strip', and initialize
-# STRIPPROG with the value of the STRIP variable (set by the user).
-AC_DEFUN([AM_PROG_INSTALL_STRIP],
-[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
-if test "$cross_compiling" != no; then
- AC_CHECK_TOOL([STRIP], [strip], :)
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-AC_SUBST([INSTALL_STRIP_PROGRAM])])
-
-# Copyright (C) 2006, 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.
-
-# serial 2
-
-# _AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
-# This macro is traced by Automake.
-AC_DEFUN([_AM_SUBST_NOTMAKE])
-
-# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
-# Public sister of _AM_SUBST_NOTMAKE.
-AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
-
-# Check how to create a tarball. -*- Autoconf -*-
-
-# Copyright (C) 2004, 2005 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.
-
-# serial 2
-
-# _AM_PROG_TAR(FORMAT)
-# --------------------
-# Check how to create a tarball in format FORMAT.
-# FORMAT should be one of `v7', `ustar', or `pax'.
-#
-# Substitute a variable $(am__tar) that is a command
-# writing to stdout a FORMAT-tarball containing the directory
-# $tardir.
-# tardir=directory && $(am__tar) > result.tar
-#
-# Substitute a variable $(am__untar) that extract such
-# a tarball read from stdin.
-# $(am__untar) < result.tar
-AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
-m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
- [m4_case([$1], [ustar],, [pax],,
- [m4_fatal([Unknown tar format])])
-AC_MSG_CHECKING([how to create a $1 tar archive])
-# Loop over all known methods to create a tar archive until one works.
-_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
-_am_tools=${am_cv_prog_tar_$1-$_am_tools}
-# Do not fold the above two line into one, because Tru64 sh and
-# Solaris sh will not grok spaces in the rhs of `-'.
-for _am_tool in $_am_tools
-do
- case $_am_tool in
- gnutar)
- for _am_tar in tar gnutar gtar;
- do
- AM_RUN_LOG([$_am_tar --version]) && break
- done
- am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
- am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
- am__untar="$_am_tar -xf -"
- ;;
- plaintar)
- # Must skip GNU tar: if it does not support --format= it doesn't create
- # ustar tarball either.
- (tar --version) >/dev/null 2>&1 && continue
- am__tar='tar chf - "$$tardir"'
- am__tar_='tar chf - "$tardir"'
- am__untar='tar xf -'
- ;;
- pax)
- am__tar='pax -L -x $1 -w "$$tardir"'
- am__tar_='pax -L -x $1 -w "$tardir"'
- am__untar='pax -r'
- ;;
- cpio)
- am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
- am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
- am__untar='cpio -i -H $1 -d'
- ;;
- none)
- am__tar=false
- am__tar_=false
- am__untar=false
- ;;
- esac
-
- # If the value was cached, stop now. We just wanted to have am__tar
- # and am__untar set.
- test -n "${am_cv_prog_tar_$1}" && break
-
- # tar/untar a dummy directory, and stop if the command works
- rm -rf conftest.dir
- mkdir conftest.dir
- echo GrepMe > conftest.dir/file
- AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
- rm -rf conftest.dir
- if test -s conftest.tar; then
- AM_RUN_LOG([$am__untar <conftest.tar])
- grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
- fi
-done
-rm -rf conftest.dir
-
-AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
-AC_MSG_RESULT([$am_cv_prog_tar_$1])])
-AC_SUBST([am__tar])
-AC_SUBST([am__untar])
-]) # _AM_PROG_TAR
-
diff --git a/src/3rdparty/libpng/autogen.sh b/src/3rdparty/libpng/autogen.sh
deleted file mode 100755
index 77b6308..0000000
--- a/src/3rdparty/libpng/autogen.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-#! /bin/sh
-# a quick hack script to generate necessary files from
-# auto* tools.
-#
-# WARNING: if you run this you will change the versions
-# of the tools which are used and, maybe, required!
- touch Makefile.am configure.ac
-{
- echo "running libtoolize" >&2
- libtoolize --force --copy --automake
-} && {
- echo "running aclocal" >&2
- aclocal
-} && {
- echo "running autoheader [ignore the warnings]" >&2
- autoheader
-} && {
- echo "running automake" >&2
- automake --force-missing --foreign -a -c
-} && {
- echo "running autoconf" >&2
- autoconf
-} &&
- echo "autogen complete" >&2 ||
- echo "ERROR: autogen.sh failed, autogen is incomplete" >&2
diff --git a/src/3rdparty/libpng/config.guess b/src/3rdparty/libpng/config.guess
index da83314..dc84c68 100755..100644
--- a/src/3rdparty/libpng/config.guess
+++ b/src/3rdparty/libpng/config.guess
@@ -1,10 +1,10 @@
#! /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, 2007, 2008
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
-timestamp='2009-04-27'
+timestamp='2009-11-20'
# 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
@@ -27,16 +27,16 @@ timestamp='2009-04-27'
# 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.
+# Originally written by Per Bothner. Please send patches (context
+# diff format) to <config-patches@gnu.org> and include a 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.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD
me=`echo "$0" | sed -e 's,.*/,,'`
@@ -170,7 +170,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 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
+ | grep -q __ELF__
then
# Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
# Return netbsd for either. FIX?
@@ -333,6 +333,9 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
exit ;;
+ i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*)
+ echo i386-pc-auroraux${UNAME_RELEASE}
+ exit ;;
i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
eval $set_cc_for_build
SUN_ARCH="i386"
@@ -656,7 +659,7 @@ EOF
# => hppa64-hp-hpux11.23
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
- grep __LP64__ >/dev/null
+ grep -q __LP64__
then
HP_ARCH="hppa2.0w"
else
@@ -807,12 +810,12 @@ EOF
i*:PW*:*)
echo ${UNAME_MACHINE}-pc-pw32
exit ;;
- *:Interix*:[3456]*)
+ *:Interix*:*)
case ${UNAME_MACHINE} in
x86)
echo i586-pc-interix${UNAME_RELEASE}
exit ;;
- EM64T | authenticamd | genuineintel)
+ authenticamd | genuineintel | EM64T)
echo x86_64-unknown-interix${UNAME_RELEASE}
exit ;;
IA64)
@@ -822,6 +825,9 @@ EOF
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
echo i${UNAME_MACHINE}-pc-mks
exit ;;
+ 8664:Windows_NT:*)
+ echo x86_64-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
@@ -851,6 +857,20 @@ EOF
i*86:Minix:*:*)
echo ${UNAME_MACHINE}-pc-minix
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 -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
arm*:Linux:*:*)
eval $set_cc_for_build
if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
@@ -873,6 +893,17 @@ EOF
frv:Linux:*:*)
echo frv-unknown-linux-gnu
exit ;;
+ i*86:Linux:*:*)
+ LIBC=gnu
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'`
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit ;;
ia64:Linux:*:*)
echo ${UNAME_MACHINE}-unknown-linux-gnu
exit ;;
@@ -882,78 +913,34 @@ EOF
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:*:*)
+ mips:Linux:*:* | mips64:Linux:*:*)
eval $set_cc_for_build
sed 's/^ //' << EOF >$dummy.c
#undef CPU
- #undef mips64
- #undef mips64el
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
- CPU=mips64el
+ CPU=${UNAME_MACHINE}el
#else
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
- CPU=mips64
+ CPU=${UNAME_MACHINE}
#else
CPU=
#endif
#endif
EOF
- eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
- /^CPU/{
- s: ::g
- p
- }'`"
+ eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'`
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 ;;
padre:Linux:*:*)
echo sparc-unknown-linux-gnu
exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
parisc:Linux:*:* | hppa:Linux:*:*)
# Look for CPU level
case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -962,8 +949,11 @@ EOF
*) echo hppa-unknown-linux-gnu ;;
esac
exit ;;
- parisc64:Linux:*:* | hppa64:Linux:*:*)
- echo hppa64-unknown-linux-gnu
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
exit ;;
s390:Linux:*:* | s390x:Linux:*:*)
echo ${UNAME_MACHINE}-ibm-linux
@@ -986,66 +976,6 @@ EOF
xtensa*:Linux:*:*)
echo ${UNAME_MACHINE}-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 ;;
- "")
- # 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
@@ -1074,7 +1004,7 @@ EOF
i*86:syllable:*:*)
echo ${UNAME_MACHINE}-pc-syllable
exit ;;
- i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*)
echo i386-unknown-lynxos${UNAME_RELEASE}
exit ;;
i*86:*DOS:*:*)
@@ -1182,7 +1112,7 @@ EOF
rs6000:LynxOS:2.*:*)
echo rs6000-unknown-lynxos${UNAME_RELEASE}
exit ;;
- PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*)
echo powerpc-unknown-lynxos${UNAME_RELEASE}
exit ;;
SM[BE]S:UNIX_SV:*:*)
@@ -1275,6 +1205,16 @@ EOF
*:Darwin:*:*)
UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
case $UNAME_PROCESSOR in
+ i386)
+ eval $set_cc_for_build
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ UNAME_PROCESSOR="x86_64"
+ fi
+ fi ;;
unknown) UNAME_PROCESSOR=powerpc ;;
esac
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
diff --git a/src/3rdparty/libpng/config.sub b/src/3rdparty/libpng/config.sub
index a39437d..2a55a50 100755..100644
--- a/src/3rdparty/libpng/config.sub
+++ b/src/3rdparty/libpng/config.sub
@@ -1,10 +1,10 @@
#! /bin/sh
# Configuration validation subroutine script.
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
-# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
# Free Software Foundation, Inc.
-timestamp='2009-04-17'
+timestamp='2009-11-20'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -32,13 +32,16 @@ timestamp='2009-04-17'
# Please send patches to <config-patches@gnu.org>. Submit a context
-# diff and a properly formatted ChangeLog entry.
+# diff and a properly formatted GNU 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.
+# You can get the latest version of this script from:
+# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD
+
# 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.
@@ -149,10 +152,13 @@ case $os in
-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)
+ -apple | -axis | -knuth | -cray | -microblaze)
os=
basic_machine=$1
;;
+ -bluegene*)
+ os=-cnk
+ ;;
-sim | -cisco | -oki | -wec | -winbond)
os=
basic_machine=$1
@@ -281,6 +287,7 @@ case $basic_machine in
| pdp10 | pdp11 | pj | pjl \
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
| pyramid \
+ | rx \
| score \
| sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
| sh64 | sh64le \
@@ -288,13 +295,14 @@ case $basic_machine in
| sparcv8 | sparcv9 | sparcv9b | sparcv9v \
| spu | strongarm \
| tahoe | thumb | tic4x | tic80 | tron \
+ | ubicom32 \
| v850 | v850e \
| we32k \
| x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
| z8k | z80)
basic_machine=$basic_machine-unknown
;;
- m6811 | m68hc11 | m6812 | m68hc12)
+ m6811 | m68hc11 | m6812 | m68hc12 | picochip)
# Motorola 68HC11/12.
basic_machine=$basic_machine-unknown
os=-none
@@ -337,7 +345,7 @@ case $basic_machine in
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -365,7 +373,7 @@ case $basic_machine in
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
| pyramid-* \
- | romp-* | rs6000-* \
+ | romp-* | rs6000-* | rx-* \
| sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
| sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
@@ -374,6 +382,7 @@ case $basic_machine in
| tahoe-* | thumb-* \
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
| tron-* \
+ | ubicom32-* \
| v850-* | v850e-* | vax-* \
| we32k-* \
| x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
@@ -467,6 +476,10 @@ case $basic_machine in
basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
os=-linux
;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
c90)
basic_machine=c90-cray
os=-unicos
@@ -719,6 +732,9 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
+ microblaze)
+ basic_machine=microblaze-xilinx
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -1240,6 +1256,9 @@ 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.
+ -auroraux)
+ os=-auroraux
+ ;;
-solaris1 | -solaris1.*)
os=`echo $os | sed -e 's|solaris1|sunos4|'`
;;
@@ -1260,9 +1279,9 @@ case $os in
# 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* \
- | -kopensolaris* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \
+ | -sym* | -kopensolaris* \
| -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
| -aos* | -aros* \
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
@@ -1283,7 +1302,7 @@ case $os in
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
- | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*)
# Remember, each alternative MUST END IN *, to match a version number.
;;
-qnx*)
@@ -1613,7 +1632,7 @@ case $basic_machine in
-sunos*)
vendor=sun
;;
- -aix*)
+ -cnk*|-aix*)
vendor=ibm
;;
-beos*)
diff --git a/src/3rdparty/libpng/configure b/src/3rdparty/libpng/configure
deleted file mode 100755
index 347d34b..0000000
--- a/src/3rdparty/libpng/configure
+++ /dev/null
@@ -1,13839 +0,0 @@
-#! /bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for libpng 1.4.0.
-#
-# Report bugs to <png-mng-implement@lists.sourceforge.net>.
-#
-#
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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
-
-
-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
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (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
-
-
-# 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
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test "x$CONFIG_SHELL" = x; then
- as_bourne_compatible="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_required="as_fn_return () { (exit \$1); }
-as_fn_success () { as_fn_return 0; }
-as_fn_failure () { as_fn_return 1; }
-as_fn_ret_success () { return 0; }
-as_fn_ret_failure () { return 1; }
-
-exitcode=0
-as_fn_success || { exitcode=1; echo as_fn_success failed.; }
-as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
-as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
-as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
-if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
-
-else
- exitcode=1; echo positional parameters were not saved.
-fi
-test x\$exitcode = x0 || exit 1"
- as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
- as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
- eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
- test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
-test \$(( 1 + 1 )) = 2 || exit 1"
- if (eval "$as_required") 2>/dev/null; then :
- as_have_required=yes
-else
- as_have_required=no
-fi
- if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
-
-else
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-as_found=false
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- as_found=:
- case $as_dir in #(
- /*)
- for as_base in sh bash ksh sh5; do
- # Try only shells that exist, to save several forks.
- as_shell=$as_dir/$as_base
- if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
- CONFIG_SHELL=$as_shell as_have_required=yes
- if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
- break 2
-fi
-fi
- done;;
- esac
- as_found=false
-done
-$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
- { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
- CONFIG_SHELL=$SHELL as_have_required=yes
-fi; }
-IFS=$as_save_IFS
-
-
- if test "x$CONFIG_SHELL" != x; then :
- # We cannot yet assume a decent shell, so we have to provide a
- # neutralization value for shells without unset; and this also
- # works around shells that cannot unset nonexistent variables.
- BASH_ENV=/dev/null
- ENV=/dev/null
- (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
-fi
-
- if test x$as_have_required = xno; then :
- $as_echo "$0: This script requires a shell more modern than all"
- $as_echo "$0: the shells that I found on your system."
- if test x${ZSH_VERSION+set} = xset ; then
- $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
- $as_echo "$0: be upgraded to zsh 4.3.4 or later."
- else
- $as_echo "$0: Please tell bug-autoconf@gnu.org and
-$0: png-mng-implement@lists.sourceforge.net about your
-$0: system, including any error possibly output before this
-$0: message. Then install a modern shell, or manually run
-$0: the script under such a shell if you do have one."
- fi
- exit 1
-fi
-fi
-fi
-SHELL=${CONFIG_SHELL-/bin/sh}
-export SHELL
-# Unset more variables known to interfere with behavior of common tools.
-CLICOLOR_FORCE= GREP_OPTIONS=
-unset CLICOLOR_FORCE GREP_OPTIONS
-
-## --------------------- ##
-## M4sh Shell Functions. ##
-## --------------------- ##
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- 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_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
- fi
- $as_echo "$as_me: error: $1" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-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
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-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'`
-
-# 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_lineno_1=$LINENO as_lineno_1a=$LINENO
- as_lineno_2=$LINENO as_lineno_2a=$LINENO
- eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
- test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
- # 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; as_fn_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
-}
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-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='mkdir -p "$as_dir"'
-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'"
-
-
-
-# Check that we are running under the correct shell.
-SHELL=${CONFIG_SHELL-/bin/sh}
-
-case X$lt_ECHO in
-X*--fallback-echo)
- # Remove one level of quotation (which was required for Make).
- ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
- ;;
-esac
-
-ECHO=${lt_ECHO-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.
- exec $SHELL "$0" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<_LT_EOF
-$*
-_LT_EOF
- exit 0
-fi
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-if test -z "$lt_ECHO"; then
- if test "X${echo_test_string+set}" != Xset; then
- # find a string as large as possible, as long as the shell can cope with it
- for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
- # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
- if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
- { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
- then
- break
- fi
- done
- fi
-
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- :
- else
- # The Solaris, AIX, and Digital Unix default echo programs unquote
- # backslashes. This makes it impossible to quote backslashes using
- # echo "$something" | sed 's/\\/\\\\/g'
- #
- # So, first we look for a working echo in the user's PATH.
-
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for dir in $PATH /usr/ucb; do
- IFS="$lt_save_ifs"
- if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
- test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$dir/echo"
- break
- fi
- done
- IFS="$lt_save_ifs"
-
- if test "X$ECHO" = Xecho; then
- # We didn't find a better echo, so look for alternatives.
- if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # This shell has a builtin print -r that does the trick.
- ECHO='print -r'
- elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
- test "X$CONFIG_SHELL" != X/bin/ksh; then
- # If we have ksh, try running configure again with it.
- ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
- export ORIGINAL_CONFIG_SHELL
- CONFIG_SHELL=/bin/ksh
- export CONFIG_SHELL
- exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
- else
- # Try using printf.
- ECHO='printf %s\n'
- if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
- echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- # Cool, printf works
- :
- elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
- export CONFIG_SHELL
- SHELL="$CONFIG_SHELL"
- export SHELL
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
- test "X$echo_testing_string" = 'X\t' &&
- echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
- test "X$echo_testing_string" = "X$echo_test_string"; then
- ECHO="$CONFIG_SHELL $0 --fallback-echo"
- else
- # maybe with a smaller string...
- prev=:
-
- for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
- if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
- then
- break
- fi
- prev="$cmd"
- done
-
- if test "$prev" != 'sed 50q "$0"'; then
- echo_test_string=`eval $prev`
- export echo_test_string
- exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
- else
- # Oops. We lost completely, so just stick with echo.
- ECHO=echo
- fi
- fi
- fi
- fi
- fi
-fi
-
-# Copy echo and quote the copy suitably for passing to libtool from
-# the Makefile, instead of quoting the original, which is used later.
-lt_ECHO=$ECHO
-if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
- lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
-fi
-
-
-
-
-test -n "$DJDIR" || exec 7<&0 </dev/null
-exec 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=
-
-# Identity of this package.
-PACKAGE_NAME='libpng'
-PACKAGE_TARNAME='libpng'
-PACKAGE_VERSION='1.4.0'
-PACKAGE_STRING='libpng 1.4.0'
-PACKAGE_BUGREPORT='png-mng-implement@lists.sourceforge.net'
-PACKAGE_URL=''
-
-ac_unique_file="pngget.c"
-# 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='am__EXEEXT_FALSE
-am__EXEEXT_TRUE
-LTLIBOBJS
-binconfigs
-pkgconfigdir
-PNGLIB_RELEASE
-PNGLIB_MINOR
-PNGLIB_MAJOR
-PNGLIB_VERSION
-SYMBOL_PREFIX
-HAVE_LD_VERSION_SCRIPT_FALSE
-HAVE_LD_VERSION_SCRIPT_TRUE
-LIBPNG_DEFINES
-LIBOBJS
-POW_LIB
-OTOOL64
-OTOOL
-LIPO
-NMEDIT
-DSYMUTIL
-lt_ECHO
-RANLIB
-AR
-NM
-ac_ct_DUMPBIN
-DUMPBIN
-LIBTOOL
-LN_S
-OBJDUMP
-DLLTOOL
-AS
-CPP
-LD
-FGREP
-EGREP
-GREP
-SED
-host_os
-host_vendor
-host_cpu
-host
-build_os
-build_vendor
-build_cpu
-build
-am__fastdepCC_FALSE
-am__fastdepCC_TRUE
-CCDEPMODE
-AMDEPBACKSLASH
-AMDEP_FALSE
-AMDEP_TRUE
-am__quote
-am__include
-DEPDIR
-OBJEXT
-EXEEXT
-ac_ct_CC
-CPPFLAGS
-LDFLAGS
-CFLAGS
-CC
-MAINT
-MAINTAINER_MODE_FALSE
-MAINTAINER_MODE_TRUE
-am__untar
-am__tar
-AMTAR
-am__leading_dot
-SET_MAKE
-AWK
-mkdir_p
-MKDIR_P
-INSTALL_STRIP_PROGRAM
-STRIP
-install_sh
-MAKEINFO
-AUTOHEADER
-AUTOMAKE
-AUTOCONF
-ACLOCAL
-VERSION
-PACKAGE
-CYGPATH_W
-am__isrc
-INSTALL_DATA
-INSTALL_SCRIPT
-INSTALL_PROGRAM
-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_URL
-PACKAGE_BUGREPORT
-PACKAGE_STRING
-PACKAGE_VERSION
-PACKAGE_TARNAME
-PACKAGE_NAME
-PATH_SEPARATOR
-SHELL'
-ac_subst_files=''
-ac_user_opts='
-enable_option_checking
-enable_maintainer_mode
-enable_dependency_tracking
-with_gnu_ld
-enable_shared
-enable_static
-with_pic
-enable_fast_install
-enable_libtool_lock
-with_pkgconfigdir
-with_binconfigs
-'
- ac_precious_vars='build_alias
-host_alias
-target_alias
-CC
-CFLAGS
-LDFLAGS
-LIBS
-CPPFLAGS
-CPP'
-
-
-# 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_fn_error "invalid feature name: $ac_useropt"
- 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_fn_error "invalid feature name: $ac_useropt"
- 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_fn_error "invalid package name: $ac_useropt"
- 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_fn_error "invalid package name: $ac_useropt"
- 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_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
- ;;
-
- *=*)
- ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
- # Reject names that are not valid shell variable names.
- case $ac_envvar in #(
- '' | [0-9]* | *[!_$as_cr_alnum]* )
- as_fn_error "invalid variable name: \`$ac_envvar'" ;;
- esac
- 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_fn_error "missing argument to $ac_option"
-fi
-
-if test -n "$ac_unrecognized_opts"; then
- case $enable_option_checking in
- no) ;;
- fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
- *) $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_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
-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_fn_error "working directory cannot be determined"
-test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
- as_fn_error "pwd does not report name of working directory"
-
-
-# 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_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
-fi
-ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
-ac_abs_confdir=`(
- cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
- 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 libpng 1.4.0 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/libpng]
- --htmldir=DIR html documentation [DOCDIR]
- --dvidir=DIR dvi documentation [DOCDIR]
- --pdfdir=DIR pdf documentation [DOCDIR]
- --psdir=DIR ps documentation [DOCDIR]
-_ACEOF
-
- cat <<\_ACEOF
-
-Program names:
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM run sed PROGRAM on installed program names
-
-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 libpng 1.4.0:";;
- 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-maintainer-mode enable make rules and dependencies not useful
- (and sometimes confusing) to the casual installer
- --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors
- --enable-shared[=PKGS] build shared libraries [default=yes]
- --enable-static[=PKGS] build static libraries [default=yes]
- --enable-fast-install[=PKGS]
- optimize for fast installation [default=yes]
- --disable-libtool-lock avoid locking (might break parallel builds)
-
-Optional Packages:
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --with-gnu-ld assume the C compiler uses GNU ld [default=no]
- --with-pic try to use only PIC/non-PIC objects [default=use
- both]
- --with-pkgconfigdir Use the specified pkgconfig dir (default is
- libdir/pkgconfig)
- --with-binconfigs Generate shell libpng-config scripts as well as
- pkg-config data [default=yes]
-
-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 (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
- you have headers in a nonstandard directory <include dir>
- CPP C preprocessor
-
-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 <png-mng-implement@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
-libpng configure 1.4.0
-generated by GNU Autoconf 2.65
-
-Copyright (C) 2009 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
-
-## ------------------------ ##
-## Autoconf initialization. ##
-## ------------------------ ##
-
-# ac_fn_c_try_compile LINENO
-# --------------------------
-# Try to compile conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- 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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- test -z "$ac_c_werror_flag" ||
- test ! -s conftest.err
- } && test -s conftest.$ac_objext; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_compile
-
-# ac_fn_c_try_cpp LINENO
-# ----------------------
-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_cpp ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- 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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } >/dev/null && {
- test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
- test ! -s conftest.err
- }; then :
- ac_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_cpp
-
-# ac_fn_c_try_link LINENO
-# -----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded.
-ac_fn_c_try_link ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- 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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- grep -v '^ *+' conftest.err >conftest.er1
- cat conftest.er1 >&5
- mv -f conftest.er1 conftest.err
- fi
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && {
- 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_retval=0
-else
- $as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
- ac_retval=1
-fi
- # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
- # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
- # interfere with the next link command; also delete a directory that is
- # left behind by Apple's compiler. We do this before executing the actions.
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_link
-
-# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists and can be compiled using the include files in
-# INCLUDES, setting the cache variable VAR accordingly.
-ac_fn_c_check_header_compile ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_compile
-
-# ac_fn_c_try_run LINENO
-# ----------------------
-# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
-# that executables *can* be run.
-ac_fn_c_try_run ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- 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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && { 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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then :
- ac_retval=0
-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
-
- ac_retval=$ac_status
-fi
- rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
- as_fn_set_status $ac_retval
-
-} # ac_fn_c_try_run
-
-# ac_fn_c_check_func LINENO FUNC VAR
-# ----------------------------------
-# Tests whether FUNC exists, setting the cache variable VAR accordingly
-ac_fn_c_check_func ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
- For example, HP-UX 11i <limits.h> declares gettimeofday. */
-#define $2 innocuous_$2
-
-/* System header to define __stub macros and hopefully few prototypes,
- which can conflict with char $2 (); 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 $2
-
-/* 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 $2 ();
-/* 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_$2 || defined __stub___$2
-choke me
-#endif
-
-int
-main ()
-{
-return $2 ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- eval "$3=yes"
-else
- eval "$3=no"
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_func
-
-# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
-# -------------------------------------------------------
-# Tests whether HEADER exists, giving a warning if it cannot be compiled using
-# the include files in INCLUDES and setting the cache variable VAR
-# accordingly.
-ac_fn_c_check_header_mongrel ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-else
- # Is the header compilable?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
-$as_echo_n "checking $2 usability... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-#include <$2>
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_header_compiler=yes
-else
- ac_header_compiler=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
-$as_echo "$ac_header_compiler" >&6; }
-
-# Is the header present?
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
-$as_echo_n "checking $2 presence... " >&6; }
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <$2>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- ac_header_preproc=yes
-else
- ac_header_preproc=no
-fi
-rm -f conftest.err conftest.$ac_ext
-{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
-$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
- ;;
- no:yes:* )
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
-$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
-$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
-$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
-$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
-$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
-( cat <<\_ASBOX
-## ------------------------------------------------------ ##
-## Report this to png-mng-implement@lists.sourceforge.net ##
-## ------------------------------------------------------ ##
-_ASBOX
- ) | sed "s/^/$as_me: WARNING: /" >&2
- ;;
-esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=\$ac_header_compiler"
-fi
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
-fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_header_mongrel
-
-# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
-# -------------------------------------------
-# Tests whether TYPE exists after having included INCLUDES, setting cache
-# variable VAR accordingly.
-ac_fn_c_check_type ()
-{
- as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
-$as_echo_n "checking for $2... " >&6; }
-if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then :
- $as_echo_n "(cached) " >&6
-else
- eval "$3=no"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof ($2))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-$4
-int
-main ()
-{
-if (sizeof (($2)))
- return 0;
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- eval "$3=yes"
-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
-eval ac_res=\$$3
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
-$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
-
-} # ac_fn_c_check_type
-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 libpng $as_me 1.4.0, which was
-generated by GNU Autoconf 2.65. 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) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
- 2)
- as_fn_append 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
- as_fn_append ac_configure_args " '$ac_arg'"
- ;;
- esac
- done
-done
-{ ac_configure_args0=; unset ac_configure_args0;}
-{ ac_configure_args1=; unset 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:${as_lineno-$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= ;; #(
- *) { eval $ac_var=; 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'; as_fn_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
-
-$as_echo "/* confdefs.h */" > 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
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE_URL "$PACKAGE_URL"
-_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 /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
- { $as_echo "$as_me:${as_lineno-$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. DJGPP emulates it as a regular file.
- if test /dev/null != "$cache_file" && test -f "$cache_file"; then
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: creating cache $cache_file" >&5
-$as_echo "$as_me: creating cache $cache_file" >&6;}
- >$cache_file
-fi
-
-# 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
-$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
- { $as_echo "$as_me:${as_lineno-$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.
- *) as_fn_append ac_configure_args " '$ac_arg'" ;;
- esac
- fi
-done
-if $ac_cache_corrupted; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
- { $as_echo "$as_me:${as_lineno-$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_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
-fi
-## -------------------- ##
-## Main body of script. ##
-## -------------------- ##
-
-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
-
-
-am__api_version='1.11'
-
-ac_aux_dir=
-for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
- for ac_t in install-sh install.sh shtool; do
- if test -f "$ac_dir/$ac_t"; then
- ac_aux_dir=$ac_dir
- ac_install_sh="$ac_aux_dir/$ac_t -c"
- break 2
- fi
- done
-done
-if test -z "$ac_aux_dir"; then
- as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
-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.
-
-
-# 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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
-$as_echo_n "checking whether build environment is sane... " >&6; }
-# Just in case
-sleep 1
-echo timestamp > conftest.file
-# Reject unsafe characters in $srcdir or the absolute working directory
-# name. Accept space and tab only in the latter.
-am_lf='
-'
-case `pwd` in
- *[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
-esac
-case $srcdir in
- *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
-esac
-
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments. Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
- set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
- if test "$*" = "X"; then
- # -L didn't work.
- set X `ls -t "$srcdir/configure" conftest.file`
- fi
- rm -f conftest.file
- if test "$*" != "X $srcdir/configure conftest.file" \
- && test "$*" != "X conftest.file $srcdir/configure"; then
-
- # If neither matched, then we have a broken ls. This can happen
- # if, for instance, CONFIG_SHELL is bash and it inherits a
- # broken ls alias from the environment. This has actually
- # happened. Such a system could not be considered "sane".
- as_fn_error "ls -t appears to fail. Make sure there is not a broken
-alias in your environment" "$LINENO" 5
- fi
-
- test "$2" = conftest.file
- )
-then
- # Ok.
- :
-else
- as_fn_error "newly created file is older than distributed files!
-Check your system clock" "$LINENO" 5
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-test "$program_prefix" != NONE &&
- program_transform_name="s&^&$program_prefix&;$program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
- program_transform_name="s&\$&$program_suffix&;$program_transform_name"
-# Double any \ or $.
-# By default was `s,x,x', remove it if useless.
-ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
-program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
-
-# expand $ac_aux_dir to an absolute path
-am_aux_dir=`cd $ac_aux_dir && pwd`
-
-if test x"${MISSING+set}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
- *)
- MISSING="\${SHELL} $am_aux_dir/missing" ;;
- esac
-fi
-# Use eval to expand $SHELL
-if eval "$MISSING --run true"; then
- am_missing_run="$MISSING --run "
-else
- am_missing_run=
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
-$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
-fi
-
-if test x"${install_sh}" != xset; then
- case $am_aux_dir in
- *\ * | *\ *)
- install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
- *)
- install_sh="\${SHELL} $am_aux_dir/install-sh"
- esac
-fi
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'. However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
-{ $as_echo "$as_me:${as_lineno-$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
-
- test -d ./--version && rmdir ./--version
- 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.
- MKDIR_P="$ac_install_sh -d"
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$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
-
-for ac_prog in gawk mawk nawk awk
-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:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AWK"; then
- ac_cv_prog_AWK="$AWK" # 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_AWK="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AWK=$ac_cv_prog_AWK
-if test -n "$AWK"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
-$as_echo "$AWK" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$AWK" && break
-done
-
-{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-rm -rf .tst 2>/dev/null
-mkdir .tst 2>/dev/null
-if test -d .tst; then
- am__leading_dot=.
-else
- am__leading_dot=_
-fi
-rmdir .tst 2>/dev/null
-
-if test "`cd $srcdir && pwd`" != "`pwd`"; then
- # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
- # is not polluted with repeated "-I."
- am__isrc=' -I$(srcdir)'
- # test to see if srcdir already configured
- if test -f $srcdir/config.status; then
- as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
- fi
-fi
-
-# test whether we have cygpath
-if test -z "$CYGPATH_W"; then
- if (cygpath --version) >/dev/null 2>/dev/null; then
- CYGPATH_W='cygpath -w'
- else
- CYGPATH_W=echo
- fi
-fi
-
-
-# Define the identity of the package.
- PACKAGE='libpng'
- VERSION='1.4.0'
-
-
-cat >>confdefs.h <<_ACEOF
-#define PACKAGE "$PACKAGE"
-_ACEOF
-
-
-cat >>confdefs.h <<_ACEOF
-#define VERSION "$VERSION"
-_ACEOF
-
-# Some tools Automake needs.
-
-ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
-
-
-AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
-
-
-AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
-
-
-AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
-
-
-MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
-
-# We need awk for the "check" target. The system "awk" is bad on
-# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
-
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
-$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
- # Check whether --enable-maintainer-mode was given.
-if test "${enable_maintainer_mode+set}" = set; then :
- enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
-else
- USE_MAINTAINER_MODE=no
-fi
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
-$as_echo "$USE_MAINTAINER_MODE" >&6; }
- if test $USE_MAINTAINER_MODE = yes; then
- MAINTAINER_MODE_TRUE=
- MAINTAINER_MODE_FALSE='#'
-else
- MAINTAINER_MODE_TRUE='#'
- MAINTAINER_MODE_FALSE=
-fi
-
- MAINT=$MAINTAINER_MODE_TRUE
-
-
-
-PNGLIB_VERSION=1.4.0
-PNGLIB_MAJOR=1
-PNGLIB_MINOR=4
-PNGLIB_RELEASE=0
-
-
-
-ac_config_headers="$ac_config_headers config.h"
-
-
-# Checks for programs.
-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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $CC" >&5
-$as_echo "$CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
-$as_echo "$ac_ct_CC" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "no acceptable C compiler found in \$PATH
-See \`config.log' for more details." "$LINENO" 5; }
-
-# Provide some information about the compiler.
-$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
-set X $ac_compile
-ac_compiler=$2
-for ac_option in --version -v -V -qversion; do
- { { ac_try="$ac_compiler $ac_option >&5"
-case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compiler $ac_option >&5") 2>conftest.err
- ac_status=$?
- if test -s conftest.err; then
- sed '10a\
-... rest of stderr output deleted ...
- 10q' conftest.err >conftest.er1
- cat conftest.er1 >&5
- fi
- rm -f conftest.er1 conftest.err
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
-done
-
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
-$as_echo_n "checking whether the C compiler works... " >&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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link_default") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; 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
-if test -z "$ac_file"; then :
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-$as_echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-{ as_fn_set_status 77
-as_fn_error "C compiler cannot create executables
-See \`config.log' for more details." "$LINENO" 5; }; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
-$as_echo_n "checking for C compiler default output file name... " >&6; }
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
-$as_echo "$ac_file" >&6; }
-ac_exeext=$ac_cv_exeext
-
-rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest conftest$ac_cv_exeext
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
-$as_echo "$ac_cv_exeext" >&6; }
-
-rm -f conftest.$ac_ext
-EXEEXT=$ac_cv_exeext
-ac_exeext=$EXEEXT
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdio.h>
-int
-main ()
-{
-FILE *f = fopen ("conftest.out", "w");
- return ferror (f) || fclose (f) != 0;
-
- ;
- return 0;
-}
-_ACEOF
-ac_clean_files="$ac_clean_files conftest.out"
-# Check that the compiler produces executables we can run. If not, either
-# the compiler is broken, or we cross compile.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
-$as_echo_n "checking whether we are cross compiling... " >&6; }
-if test "$cross_compiling" != yes; then
- { { 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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_link") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- if { ac_try='./conftest$ac_cv_exeext'
- { { case "(($ac_try" in
- *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
- *) ac_try_echo=$ac_try;;
-esac
-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_try") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; }; then
- cross_compiling=no
- else
- if test "$cross_compiling" = maybe; then
- cross_compiling=yes
- else
- { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot run C compiled programs.
-If you meant to cross compile, use \`--host'.
-See \`config.log' for more details." "$LINENO" 5; }
- fi
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
-$as_echo "$cross_compiling" >&6; }
-
-rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
-ac_clean_files=$ac_clean_files_save
-{ $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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:${as_lineno-$LINENO}: $ac_try_echo\""
-$as_echo "$ac_try_echo"; } >&5
- (eval "$ac_compile") 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details." "$LINENO" 5; }
-fi
-rm -f conftest.$ac_cv_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
-$as_echo "$ac_cv_objext" >&6; }
-OBJEXT=$ac_cv_objext
-ac_objext=$OBJEXT
-{ $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-#ifndef __GNUC__
- choke me
-#endif
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_compiler_gnu=yes
-else
- 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:${as_lineno-$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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-else
- CFLAGS=""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
-
-else
- ac_c_werror_flag=$ac_save_c_werror_flag
- CFLAGS="-g"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_g=yes
-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:${as_lineno-$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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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"
- if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_prog_cc_c89=$ac_arg
-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:${as_lineno-$LINENO}: result: none needed" >&5
-$as_echo "none needed" >&6; } ;;
- xno)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
-$as_echo "unsupported" >&6; } ;;
- *)
- CC="$CC $ac_cv_prog_cc_c89"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
-$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
-esac
-if test "x$ac_cv_prog_cc_c89" != xno; then :
-
-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
-DEPDIR="${am__leading_dot}deps"
-
-ac_config_commands="$ac_config_commands depfiles"
-
-
-am_make=${MAKE-make}
-cat > confinc << 'END'
-am__doit:
- @echo this is the am__doit target
-.PHONY: am__doit
-END
-# If we don't find an include directive, just comment out the code.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
-$as_echo_n "checking for style of include used by $am_make... " >&6; }
-am__include="#"
-am__quote=
-_am_result=none
-# First try GNU make style include.
-echo "include confinc" > confmf
-# Ignore all kinds of additional output from `make'.
-case `$am_make -s -f confmf 2> /dev/null` in #(
-*the\ am__doit\ target*)
- am__include=include
- am__quote=
- _am_result=GNU
- ;;
-esac
-# Now try BSD make style include.
-if test "$am__include" = "#"; then
- echo '.include "confinc"' > confmf
- case `$am_make -s -f confmf 2> /dev/null` in #(
- *the\ am__doit\ target*)
- am__include=.include
- am__quote="\""
- _am_result=BSD
- ;;
- esac
-fi
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
-$as_echo "$_am_result" >&6; }
-rm -f confinc confmf
-
-# Check whether --enable-dependency-tracking was given.
-if test "${enable_dependency_tracking+set}" = set; then :
- enableval=$enable_dependency_tracking;
-fi
-
-if test "x$enable_dependency_tracking" != xno; then
- am_depcomp="$ac_aux_dir/depcomp"
- AMDEPBACKSLASH='\'
-fi
- if test "x$enable_dependency_tracking" != xno; then
- AMDEP_TRUE=
- AMDEP_FALSE='#'
-else
- AMDEP_TRUE='#'
- AMDEP_FALSE=
-fi
-
-
-
-depcc="$CC" am_compiler_list=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
-$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
- # We make a subdir and do the tests there. Otherwise we can end up
- # making bogus files that we don't know about and never remove. For
- # instance it was reported that on HP-UX the gcc test will end up
- # making a dummy file named `D' -- because `-MD' means `put the output
- # in D'.
- mkdir conftest.dir
- # Copy depcomp to subdir because otherwise we won't find it if we're
- # using a relative directory.
- cp "$am_depcomp" conftest.dir
- cd conftest.dir
- # We will build objects and dependencies in a subdirectory because
- # it helps to detect inapplicable dependency modes. For instance
- # both Tru64's cc and ICC support -MD to output dependencies as a
- # side effect of compilation, but ICC will put the dependencies in
- # the current directory while Tru64 will put them in the object
- # directory.
- mkdir sub
-
- am_cv_CC_dependencies_compiler_type=none
- if test "$am_compiler_list" = ""; then
- am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
- fi
- am__universal=false
- case " $depcc " in #(
- *\ -arch\ *\ -arch\ *) am__universal=true ;;
- esac
-
- for depmode in $am_compiler_list; do
- # Setup a source with many dependencies, because some compilers
- # like to wrap large dependency lists on column 80 (with \), and
- # we should not choose a depcomp mode which is confused by this.
- #
- # We need to recreate these files for each test, as the compiler may
- # overwrite some of them when testing with obscure command lines.
- # This happens at least with the AIX C compiler.
- : > sub/conftest.c
- for i in 1 2 3 4 5 6; do
- echo '#include "conftst'$i'.h"' >> sub/conftest.c
- # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
- # Solaris 8's {/usr,}/bin/sh.
- touch sub/conftst$i.h
- done
- echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
-
- # We check with `-c' and `-o' for the sake of the "dashmstdout"
- # mode. It turns out that the SunPro C++ compiler does not properly
- # handle `-M -o', and we need to detect this. Also, some Intel
- # versions had trouble with output in subdirs
- am__obj=sub/conftest.${OBJEXT-o}
- am__minus_obj="-o $am__obj"
- case $depmode in
- gcc)
- # This depmode causes a compiler race in universal mode.
- test "$am__universal" = false || continue
- ;;
- nosideeffect)
- # after this tag, mechanisms are not by side-effect, so they'll
- # only be used when explicitly requested
- if test "x$enable_dependency_tracking" = xyes; then
- continue
- else
- break
- fi
- ;;
- msvisualcpp | msvcmsys)
- # This compiler won't grok `-c -o', but also, the minuso test has
- # not run yet. These depmodes are late enough in the game, and
- # so weak that their functioning should not be impacted.
- am__obj=conftest.${OBJEXT-o}
- am__minus_obj=
- ;;
- none) break ;;
- esac
- if depmode=$depmode \
- source=sub/conftest.c object=$am__obj \
- depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
- $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
- >/dev/null 2>conftest.err &&
- grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
- grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
- grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
- ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
- # icc doesn't choke on unknown options, it will just issue warnings
- # or remarks (even with -Werror). So we grep stderr for any message
- # that says an option was ignored or not supported.
- # When given -MP, icc 7.0 and 7.1 complain thusly:
- # icc: Command line warning: ignoring option '-M'; no argument required
- # The diagnosis changed in icc 8.0:
- # icc: Command line remark: option '-MP' not supported
- if (grep 'ignoring option' conftest.err ||
- grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
- am_cv_CC_dependencies_compiler_type=$depmode
- break
- fi
- fi
- done
-
- cd ..
- rm -rf conftest.dir
-else
- am_cv_CC_dependencies_compiler_type=none
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
-$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
-CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
-
- if
- test "x$enable_dependency_tracking" != xno \
- && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
- am__fastdepCC_TRUE=
- am__fastdepCC_FALSE='#'
-else
- am__fastdepCC_TRUE='#'
- am__fastdepCC_FALSE=
-fi
-
-
-# Make sure we can run config.sub.
-$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
- as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
-
-{ $as_echo "$as_me:${as_lineno-$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_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
-ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
- as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
-$as_echo "$ac_cv_build" >&6; }
-case $ac_cv_build in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
-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:${as_lineno-$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_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
-$as_echo "$ac_cv_host" >&6; }
-case $ac_cv_host in
-*-*-*) ;;
-*) as_fn_error "invalid value of canonical host" "$LINENO" 5;;
-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
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
-$as_echo_n "checking for a sed that does not truncate output... " >&6; }
-if test "${ac_cv_path_SED+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
- for ac_i in 1 2 3 4 5 6 7; do
- ac_script="$ac_script$as_nl$ac_script"
- done
- echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
- { ac_script=; unset ac_script;}
- if test -z "$SED"; then
- ac_path_SED_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
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for ac_prog in sed gsed; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
-# Check for GNU ac_path_SED and select it if it is found.
- # Check for GNU $ac_path_SED
-case `"$ac_path_SED" --version 2>&1` in
-*GNU*)
- ac_cv_path_SED="$ac_path_SED" ac_path_SED_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 '' >> "conftest.nl"
- "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_SED_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_SED="$ac_path_SED"
- ac_path_SED_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_SED_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_SED"; then
- as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5
- fi
-else
- ac_cv_path_SED=$SED
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
-$as_echo "$ac_cv_path_SED" >&6; }
- SED="$ac_cv_path_SED"
- rm -f conftest.sed
-
-test -z "$SED" && SED=sed
-Xsed="$SED -e 1s/^X//"
-
-
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$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
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- 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_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_GREP=$GREP
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
-$as_echo "$ac_cv_path_GREP" >&6; }
- GREP="$ac_cv_path_GREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$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
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- 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_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_EGREP=$EGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
-$as_echo "$ac_cv_path_EGREP" >&6; }
- EGREP="$ac_cv_path_EGREP"
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
-$as_echo_n "checking for fgrep... " >&6; }
-if test "${ac_cv_path_FGREP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
- then ac_cv_path_FGREP="$GREP -F"
- else
- if test -z "$FGREP"; then
- ac_path_FGREP_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 fgrep; do
- for ac_exec_ext in '' $ac_executable_extensions; do
- ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
- { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
-# Check for GNU ac_path_FGREP and select it if it is found.
- # Check for GNU $ac_path_FGREP
-case `"$ac_path_FGREP" --version 2>&1` in
-*GNU*)
- ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_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 'FGREP' >> "conftest.nl"
- "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
- diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
- as_fn_arith $ac_count + 1 && ac_count=$as_val
- if test $ac_count -gt ${ac_path_FGREP_max-0}; then
- # Best one so far, save it but keep looking for a better one
- ac_cv_path_FGREP="$ac_path_FGREP"
- ac_path_FGREP_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_FGREP_found && break 3
- done
- done
- done
-IFS=$as_save_IFS
- if test -z "$ac_cv_path_FGREP"; then
- as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
- fi
-else
- ac_cv_path_FGREP=$FGREP
-fi
-
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
-$as_echo "$ac_cv_path_FGREP" >&6; }
- FGREP="$ac_cv_path_FGREP"
-
-
-test -z "$GREP" && GREP=grep
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# 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
-
-ac_prog=ld
-if test "$GCC" = yes; then
- # Check if gcc -print-prog-name=ld gives a path.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
-$as_echo_n "checking for ld used by $CC... " >&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.
- [\\/]* | ?:[\\/]*)
- re_direlt='/[^/][^/]*/\.\./'
- # Canonicalize the pathname 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:${as_lineno-$LINENO}: checking for GNU ld" >&5
-$as_echo_n "checking for GNU ld... " >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
-$as_echo_n "checking for non-GNU ld... " >&6; }
-fi
-if test "${lt_cv_path_LD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -z "$LD"; then
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
- lt_cv_path_LD="$ac_dir/$ac_prog"
- # Check to see if the program is GNU ld. I'd rather use --version,
- # but apparently some variants of GNU ld only accept -v.
- # Break only if it was the GNU/non-GNU ld that we prefer.
- case `"$lt_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="$lt_save_ifs"
-else
- lt_cv_path_LD="$LD" # Let the user override the test with a path.
-fi
-fi
-
-LD="$lt_cv_path_LD"
-if test -n "$LD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
-$as_echo "$LD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
-$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
-if test "${lt_cv_prog_gnu_ld+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- # I'd rather use --version here, but apparently some GNU lds only accept -v.
-case `$LD -v 2>&1 </dev/null` in
-*GNU* | *'with BFD'*)
- lt_cv_prog_gnu_ld=yes
- ;;
-*)
- lt_cv_prog_gnu_ld=no
- ;;
-esac
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
-$as_echo "$lt_cv_prog_gnu_ld" >&6; }
-with_gnu_ld=$lt_cv_prog_gnu_ld
-
-
-
-
-
-
-
-
-
-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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # 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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#ifdef __STDC__
-# include <limits.h>
-#else
-# include <assert.h>
-#endif
- Syntax error
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
-
-else
- # 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <ac_nonexistent.h>
-_ACEOF
-if ac_fn_c_try_cpp "$LINENO"; then :
- # Broken: success on invalid input.
-continue
-else
- # 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:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
-as_fn_error "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details." "$LINENO" 5; }
-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
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}sed", so it can be a program name with args.
-set dummy ${ac_tool_prefix}sed; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_SED+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$SED"; then
- ac_cv_prog_SED="$SED" # 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_SED="${ac_tool_prefix}sed"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-SED=$ac_cv_prog_SED
-if test -n "$SED"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
-$as_echo "$SED" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_SED"; then
- ac_ct_SED=$SED
- # Extract the first word of "sed", so it can be a program name with args.
-set dummy sed; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_SED+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_SED"; then
- ac_cv_prog_ac_ct_SED="$ac_ct_SED" # 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_SED="sed"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_SED=$ac_cv_prog_ac_ct_SED
-if test -n "$ac_ct_SED"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_SED" >&5
-$as_echo "$ac_ct_SED" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_SED" = x; then
- SED=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- SED=$ac_ct_SED
- fi
-else
- SED="$ac_cv_prog_SED"
-fi
-
-enable_win32_dll=yes
-
-case $host in
-*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
-set dummy ${ac_tool_prefix}as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AS"; then
- ac_cv_prog_AS="$AS" # 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_AS="${ac_tool_prefix}as"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AS=$ac_cv_prog_AS
-if test -n "$AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
-$as_echo "$AS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AS"; then
- ac_ct_AS=$AS
- # Extract the first word of "as", so it can be a program name with args.
-set dummy as; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AS"; then
- ac_cv_prog_ac_ct_AS="$ac_ct_AS" # 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_AS="as"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AS=$ac_cv_prog_ac_ct_AS
-if test -n "$ac_ct_AS"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
-$as_echo "$ac_ct_AS" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AS" = x; then
- AS="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- AS=$ac_ct_AS
- fi
-else
- AS="$ac_cv_prog_AS"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DLLTOOL"; then
- ac_cv_prog_DLLTOOL="$DLLTOOL" # 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_DLLTOOL="${ac_tool_prefix}dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DLLTOOL=$ac_cv_prog_DLLTOOL
-if test -n "$DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
-$as_echo "$DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DLLTOOL"; then
- ac_ct_DLLTOOL=$DLLTOOL
- # Extract the first word of "dlltool", so it can be a program name with args.
-set dummy dlltool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DLLTOOL"; then
- ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # 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_DLLTOOL="dlltool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
-if test -n "$ac_ct_DLLTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
-$as_echo "$ac_ct_DLLTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DLLTOOL" = x; then
- DLLTOOL="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- DLLTOOL=$ac_ct_DLLTOOL
- fi
-else
- DLLTOOL="$ac_cv_prog_DLLTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
- ;;
-esac
-
-test -z "$AS" && AS=as
-
-
-
-
-
-test -z "$DLLTOOL" && DLLTOOL=dlltool
-
-
-
-
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
-$as_echo_n "checking whether ln -s works... " >&6; }
-LN_S=$as_ln_s
-if test "$LN_S" = "ln -s"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
-$as_echo "no, using $LN_S" >&6; }
-fi
-
-{ $as_echo "$as_me:${as_lineno-$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:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- SET_MAKE=
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-case `pwd` in
- *\ * | *\ *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
-$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
-esac
-
-
-
-macro_version='2.2.6b'
-macro_revision='1.3017'
-
-
-
-
-
-
-
-
-
-
-
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
-$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
-if test "${lt_cv_path_NM+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NM"; then
- # Let the user override the test.
- lt_cv_path_NM="$NM"
-else
- lt_nm_to_check="${ac_tool_prefix}nm"
- if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
- lt_nm_to_check="$lt_nm_to_check nm"
- fi
- for lt_tmp_nm in $lt_nm_to_check; do
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- tmp_nm="$ac_dir/$lt_tmp_nm"
- if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
- # Check to see if the nm accepts a BSD-compat flag.
- # Adding the `sed 1q' prevents false positives on HP-UX, which says:
- # nm: unknown option "B" ignored
- # Tru64's nm complains that /dev/null is an invalid object file
- case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
- */dev/null* | *'Invalid file or object type'*)
- lt_cv_path_NM="$tmp_nm -B"
- break
- ;;
- *)
- case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
- */dev/null*)
- lt_cv_path_NM="$tmp_nm -p"
- break
- ;;
- *)
- lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
- continue # so that we can try to find one that supports BSD flags
- ;;
- esac
- ;;
- esac
- fi
- done
- IFS="$lt_save_ifs"
- done
- : ${lt_cv_path_NM=no}
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
-$as_echo "$lt_cv_path_NM" >&6; }
-if test "$lt_cv_path_NM" != "no"; then
- NM="$lt_cv_path_NM"
-else
- # Didn't find any BSD compatible name lister, look for dumpbin.
- if test -n "$ac_tool_prefix"; then
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
- 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:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DUMPBIN"; then
- ac_cv_prog_DUMPBIN="$DUMPBIN" # 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_DUMPBIN="$ac_tool_prefix$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DUMPBIN=$ac_cv_prog_DUMPBIN
-if test -n "$DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
-$as_echo "$DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$DUMPBIN" && break
- done
-fi
-if test -z "$DUMPBIN"; then
- ac_ct_DUMPBIN=$DUMPBIN
- for ac_prog in "dumpbin -symbols" "link -dump -symbols"
-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:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DUMPBIN"; then
- ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # 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_DUMPBIN="$ac_prog"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
-if test -n "$ac_ct_DUMPBIN"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
-$as_echo "$ac_ct_DUMPBIN" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- test -n "$ac_ct_DUMPBIN" && break
-done
-
- if test "x$ac_ct_DUMPBIN" = x; then
- DUMPBIN=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- DUMPBIN=$ac_ct_DUMPBIN
- fi
-fi
-
-
- if test "$DUMPBIN" != ":"; then
- NM="$DUMPBIN"
- fi
-fi
-test -z "$NM" && NM=nm
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
-$as_echo_n "checking the name lister ($NM) interface... " >&6; }
-if test "${lt_cv_nm_interface+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_nm_interface="BSD nm"
- echo "int some_variable = 0;" > conftest.$ac_ext
- (eval echo "\"\$as_me:5153: $ac_compile\"" >&5)
- (eval "$ac_compile" 2>conftest.err)
- cat conftest.err >&5
- (eval echo "\"\$as_me:5156: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
- (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
- cat conftest.err >&5
- (eval echo "\"\$as_me:5159: output\"" >&5)
- cat conftest.out >&5
- if $GREP 'External.*some_variable' conftest.out > /dev/null; then
- lt_cv_nm_interface="MS dumpbin"
- fi
- rm -f conftest*
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
-$as_echo "$lt_cv_nm_interface" >&6; }
-
-# find the maximum length of command line arguments
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
-$as_echo_n "checking the maximum length of command line arguments... " >&6; }
-if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- i=0
- teststring="ABCD"
-
- case $build_os in
- msdosdjgpp*)
- # On DJGPP, this test can blow up pretty badly due to problems in libc
- # (any single argument exceeding 2000 bytes causes a buffer overrun
- # during glob expansion). Even if it were fixed, the result of this
- # check would be larger than it should be.
- lt_cv_sys_max_cmd_len=12288; # 12K is about right
- ;;
-
- gnu*)
- # Under GNU Hurd, this test is not required because there is
- # no limit to the length of command line arguments.
- # Libtool will interpret -1 as no limit whatsoever
- lt_cv_sys_max_cmd_len=-1;
- ;;
-
- cygwin* | mingw* | cegcc*)
- # On Win9x/ME, this test blows up -- it succeeds, but takes
- # about 5 minutes as the teststring grows exponentially.
- # Worse, since 9x/ME are not pre-emptively multitasking,
- # you end up with a "frozen" computer, even though with patience
- # the test eventually succeeds (with a max line length of 256k).
- # Instead, let's just punt: use the minimum linelength reported by
- # all of the supported platforms: 8192 (on NT/2K/XP).
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- amigaos*)
- # On AmigaOS with pdksh, this test takes hours, literally.
- # So we just punt and use a minimum line length of 8192.
- lt_cv_sys_max_cmd_len=8192;
- ;;
-
- netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
- # This has been around since 386BSD, at least. Likely further.
- if test -x /sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
- elif test -x /usr/sbin/sysctl; then
- lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
- else
- lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
- fi
- # And add a safety zone
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- ;;
-
- interix*)
- # We know the value 262144 and hardcode it with a safety zone (like BSD)
- lt_cv_sys_max_cmd_len=196608
- ;;
-
- osf*)
- # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
- # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
- # nice to cause kernel panics so lets avoid the loop below.
- # First set a reasonable default.
- lt_cv_sys_max_cmd_len=16384
- #
- if test -x /sbin/sysconfig; then
- case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
- *1*) lt_cv_sys_max_cmd_len=-1 ;;
- esac
- fi
- ;;
- sco3.2v5*)
- lt_cv_sys_max_cmd_len=102400
- ;;
- sysv5* | sco5v6* | sysv4.2uw2*)
- kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
- if test -n "$kargmax"; then
- lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
- else
- lt_cv_sys_max_cmd_len=32768
- fi
- ;;
- *)
- lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
- if test -n "$lt_cv_sys_max_cmd_len"; then
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
- else
- # Make teststring a little bigger before we do anything with it.
- # a 1K string should be a reasonable start.
- for i in 1 2 3 4 5 6 7 8 ; do
- teststring=$teststring$teststring
- done
- SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
- # If test is not a shell built-in, we'll probably end up computing a
- # maximum length that is only half of the actual maximum length, but
- # we can't tell.
- while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
- = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
- test $i != 17 # 1/2 MB should be enough
- do
- i=`expr $i + 1`
- teststring=$teststring$teststring
- done
- # Only check the string length outside the loop.
- lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
- teststring=
- # Add a significant safety factor because C++ compilers can tack on
- # massive amounts of additional arguments before passing them to the
- # linker. It appears as though 1/2 is a usable value.
- lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
- fi
- ;;
- esac
-
-fi
-
-if test -n $lt_cv_sys_max_cmd_len ; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
-$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
-$as_echo "none" >&6; }
-fi
-max_cmd_len=$lt_cv_sys_max_cmd_len
-
-
-
-
-
-
-: ${CP="cp -f"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
-$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
-# Try some XSI features
-xsi_shell=no
-( _lt_dummy="a/b/c"
- test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
- = c,a/b,, \
- && eval 'test $(( 1 + 1 )) -eq 2 \
- && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
- && xsi_shell=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
-$as_echo "$xsi_shell" >&6; }
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
-$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
-lt_shell_append=no
-( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
- >/dev/null 2>&1 \
- && lt_shell_append=yes
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
-$as_echo "$lt_shell_append" >&6; }
-
-
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- lt_unset=unset
-else
- lt_unset=false
-fi
-
-
-
-
-
-# test EBCDIC or ASCII
-case `echo X|tr X '\101'` in
- A) # ASCII based system
- # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
- lt_SP2NL='tr \040 \012'
- lt_NL2SP='tr \015\012 \040\040'
- ;;
- *) # EBCDIC based system
- lt_SP2NL='tr \100 \n'
- lt_NL2SP='tr \r\n \100\100'
- ;;
-esac
-
-
-
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
-$as_echo_n "checking for $LD option to reload object files... " >&6; }
-if test "${lt_cv_ld_reload_flag+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_reload_flag='-r'
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
-$as_echo "$lt_cv_ld_reload_flag" >&6; }
-reload_flag=$lt_cv_ld_reload_flag
-case $reload_flag in
-"" | " "*) ;;
-*) reload_flag=" $reload_flag" ;;
-esac
-reload_cmds='$LD$reload_flag -o $output$reload_objs'
-case $host_os in
- darwin*)
- if test "$GCC" = yes; then
- reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
- else
- reload_cmds='$LD$reload_flag -o $output$reload_objs'
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
-set dummy ${ac_tool_prefix}objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OBJDUMP"; then
- ac_cv_prog_OBJDUMP="$OBJDUMP" # 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_OBJDUMP="${ac_tool_prefix}objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OBJDUMP=$ac_cv_prog_OBJDUMP
-if test -n "$OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
-$as_echo "$OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OBJDUMP"; then
- ac_ct_OBJDUMP=$OBJDUMP
- # Extract the first word of "objdump", so it can be a program name with args.
-set dummy objdump; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OBJDUMP"; then
- ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # 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_OBJDUMP="objdump"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
-if test -n "$ac_ct_OBJDUMP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
-$as_echo "$ac_ct_OBJDUMP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OBJDUMP" = x; then
- OBJDUMP="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- OBJDUMP=$ac_ct_OBJDUMP
- fi
-else
- OBJDUMP="$ac_cv_prog_OBJDUMP"
-fi
-
-test -z "$OBJDUMP" && OBJDUMP=objdump
-
-
-
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
-$as_echo_n "checking how to recognize dependent libraries... " >&6; }
-if test "${lt_cv_deplibs_check_method+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_file_magic_cmd='$MAGIC_CMD'
-lt_cv_file_magic_test_file=
-lt_cv_deplibs_check_method='unknown'
-# Need to set the preceding variable on all platforms that support
-# interlibrary dependencies.
-# 'none' -- dependencies not supported.
-# `unknown' -- same as none, but documents that we really don't know.
-# 'pass_all' -- all dependencies passed with no checks.
-# 'test_compile' -- check by making test program.
-# 'file_magic [[regex]]' -- check by looking for files in library path
-# which responds to the $file_magic_cmd with a given extended regex.
-# If you have `file' or equivalent on your system and you're not sure
-# whether `pass_all' will *always* work, you probably want this one.
-
-case $host_os in
-aix[4-9]*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-beos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-bsdi[45]*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
- lt_cv_file_magic_cmd='/usr/bin/file -L'
- lt_cv_file_magic_test_file=/shlib/libc.so
- ;;
-
-cygwin*)
- # func_win32_libid is a shell function defined in ltmain.sh
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- ;;
-
-mingw* | pw32*)
- # Base MSYS/MinGW do not provide the 'file' command needed by
- # func_win32_libid shell function, so use a weaker test based on 'objdump',
- # unless we find 'file', for example because we are cross-compiling.
- if ( file / ) >/dev/null 2>&1; then
- lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
- lt_cv_file_magic_cmd='func_win32_libid'
- else
- lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- fi
- ;;
-
-cegcc)
- # use the weaker test based on 'objdump'. See mingw*.
- lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
- lt_cv_file_magic_cmd='$OBJDUMP -f'
- ;;
-
-darwin* | rhapsody*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-freebsd* | dragonfly*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- case $host_cpu in
- i*86 )
- # Not sure whether the presence of OpenBSD here was a mistake.
- # Let's accept both of them until this is cleared up.
- lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
- ;;
- esac
- else
- lt_cv_deplibs_check_method=pass_all
- fi
- ;;
-
-gnu*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-hpux10.20* | hpux11*)
- lt_cv_file_magic_cmd=/usr/bin/file
- case $host_cpu in
- ia64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
- lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
- ;;
- hppa*64*)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
- lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
- ;;
- *)
- lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
- lt_cv_file_magic_test_file=/usr/lib/libc.sl
- ;;
- esac
- ;;
-
-interix[3-9]*)
- # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $LD in
- *-32|*"-32 ") libmagic=32-bit;;
- *-n32|*"-n32 ") libmagic=N32;;
- *-64|*"-64 ") libmagic=64-bit;;
- *) libmagic=never-match;;
- esac
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
- fi
- ;;
-
-newos6*)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
- lt_cv_file_magic_cmd=/usr/bin/file
- lt_cv_file_magic_test_file=/usr/lib/libnls.so
- ;;
-
-*nto* | *qnx*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-openbsd*)
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
- else
- lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
- fi
- ;;
-
-osf3* | osf4* | osf5*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-rdos*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-solaris*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-
-sysv4 | sysv4.3*)
- case $host_vendor in
- motorola)
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
- lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
- ;;
- ncr)
- lt_cv_deplibs_check_method=pass_all
- ;;
- sequent)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
- ;;
- sni)
- lt_cv_file_magic_cmd='/bin/file'
- lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
- lt_cv_file_magic_test_file=/lib/libc.so
- ;;
- siemens)
- lt_cv_deplibs_check_method=pass_all
- ;;
- pc)
- lt_cv_deplibs_check_method=pass_all
- ;;
- esac
- ;;
-
-tpf*)
- lt_cv_deplibs_check_method=pass_all
- ;;
-esac
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
-$as_echo "$lt_cv_deplibs_check_method" >&6; }
-file_magic_cmd=$lt_cv_file_magic_cmd
-deplibs_check_method=$lt_cv_deplibs_check_method
-test -z "$deplibs_check_method" && deplibs_check_method=unknown
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
-set dummy ${ac_tool_prefix}ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$AR"; then
- ac_cv_prog_AR="$AR" # 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_AR="${ac_tool_prefix}ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-AR=$ac_cv_prog_AR
-if test -n "$AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
-$as_echo "$AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_AR"; then
- ac_ct_AR=$AR
- # Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_AR"; then
- ac_cv_prog_ac_ct_AR="$ac_ct_AR" # 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_AR="ar"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_AR=$ac_cv_prog_ac_ct_AR
-if test -n "$ac_ct_AR"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
-$as_echo "$ac_ct_AR" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_AR" = x; then
- AR="false"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- AR=$ac_ct_AR
- fi
-else
- AR="$ac_cv_prog_AR"
-fi
-
-test -z "$AR" && AR=ar
-test -z "$AR_FLAGS" && AR_FLAGS=cru
-
-
-
-
-
-
-
-
-
-
-
-if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$STRIP"; then
- ac_cv_prog_STRIP="$STRIP" # 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_STRIP="${ac_tool_prefix}strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
- ac_ct_STRIP=$STRIP
- # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_STRIP"; then
- ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # 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_STRIP="strip"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_STRIP" = x; then
- STRIP=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- STRIP=$ac_ct_STRIP
- fi
-else
- STRIP="$ac_cv_prog_STRIP"
-fi
-
-test -z "$STRIP" && STRIP=:
-
-
-
-
-
-
-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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $RANLIB" >&5
-$as_echo "$RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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:${as_lineno-$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:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
-$as_echo "$ac_ct_RANLIB" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$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:${as_lineno-$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
-
-test -z "$RANLIB" && RANLIB=:
-
-
-
-
-
-
-# Determine commands to create old-style static archives.
-old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
-old_postinstall_cmds='chmod 644 $oldlib'
-old_postuninstall_cmds=
-
-if test -n "$RANLIB"; then
- case $host_os in
- openbsd*)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
- ;;
- *)
- old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
- ;;
- esac
- old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-
-# Check for command to grab the raw symbol name followed by C symbol from nm.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
-$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
-if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
-
-# These are sane defaults that work on at least a few old systems.
-# [They come from Ultrix. What could be older than Ultrix?!! ;)]
-
-# Character class describing NM global symbol codes.
-symcode='[BCDEGRST]'
-
-# Regexp to match symbols that can be accessed directly from C.
-sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
-
-# Define system-specific variables.
-case $host_os in
-aix*)
- symcode='[BCDT]'
- ;;
-cygwin* | mingw* | pw32* | cegcc*)
- symcode='[ABCDGISTW]'
- ;;
-hpux*)
- if test "$host_cpu" = ia64; then
- symcode='[ABCDEGRST]'
- fi
- ;;
-irix* | nonstopux*)
- symcode='[BCDEGRST]'
- ;;
-osf*)
- symcode='[BCDEGQRST]'
- ;;
-solaris*)
- symcode='[BDRT]'
- ;;
-sco3.2v5*)
- symcode='[DT]'
- ;;
-sysv4.2uw2*)
- symcode='[DT]'
- ;;
-sysv5* | sco5v6* | unixware* | OpenUNIX*)
- symcode='[ABDT]'
- ;;
-sysv4)
- symcode='[DFNSTU]'
- ;;
-esac
-
-# If we're using GNU nm, then use its standard symbol codes.
-case `$NM -V 2>&1` in
-*GNU* | *'with BFD'*)
- symcode='[ABCDGIRSTW]' ;;
-esac
-
-# Transform an extracted symbol line into a proper C declaration.
-# Some systems (esp. on ia64) link data and code symbols differently,
-# so use this general approach.
-lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
-
-# Transform an extracted symbol line into symbol name and symbol address
-lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
-
-# Handle CRLF in mingw tool chain
-opt_cr=
-case $build_os in
-mingw*)
- opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
- ;;
-esac
-
-# Try without a prefix underscore, then with it.
-for ac_symprfx in "" "_"; do
-
- # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
- symxfrm="\\1 $ac_symprfx\\2 \\2"
-
- # Write the raw and C identifiers.
- if test "$lt_cv_nm_interface" = "MS dumpbin"; then
- # Fake it for dumpbin and say T for any non-static function
- # and D for any global variable.
- # Also find C++ and __fastcall symbols from MSVC++,
- # which start with @ or ?.
- lt_cv_sys_global_symbol_pipe="$AWK '"\
-" {last_section=section; section=\$ 3};"\
-" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
-" \$ 0!~/External *\|/{next};"\
-" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
-" {if(hide[section]) next};"\
-" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
-" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
-" s[1]~/^[@?]/{print s[1], s[1]; next};"\
-" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
-" ' prfx=^$ac_symprfx"
- else
- lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
- fi
-
- # Check to see that the pipe works correctly.
- pipe_works=no
-
- rm -f conftest*
- cat > conftest.$ac_ext <<_LT_EOF
-#ifdef __cplusplus
-extern "C" {
-#endif
-char nm_test_var;
-void nm_test_func(void);
-void nm_test_func(void){}
-#ifdef __cplusplus
-}
-#endif
-int main(){nm_test_var='a';nm_test_func();return(0);}
-_LT_EOF
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- # Now try to grab the symbols.
- nlist=conftest.nm
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
- (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s "$nlist"; then
- # Try sorting and uniquifying the output.
- if sort "$nlist" | uniq > "$nlist"T; then
- mv -f "$nlist"T "$nlist"
- else
- rm -f "$nlist"T
- fi
-
- # Make sure that we snagged all the symbols we need.
- if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
- if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
- cat <<_LT_EOF > conftest.$ac_ext
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-_LT_EOF
- # Now generate the symbol file.
- eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
-
- cat <<_LT_EOF >> conftest.$ac_ext
-
-/* The mapping between symbol names and symbols. */
-const struct {
- const char *name;
- void *address;
-}
-lt__PROGRAM__LTX_preloaded_symbols[] =
-{
- { "@PROGRAM@", (void *) 0 },
-_LT_EOF
- $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
- cat <<\_LT_EOF >> conftest.$ac_ext
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt__PROGRAM__LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-_LT_EOF
- # Now try linking the two files.
- mv conftest.$ac_objext conftstm.$ac_objext
- lt_save_LIBS="$LIBS"
- lt_save_CFLAGS="$CFLAGS"
- LIBS="conftstm.$ac_objext"
- CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext}; then
- pipe_works=yes
- fi
- LIBS="$lt_save_LIBS"
- CFLAGS="$lt_save_CFLAGS"
- else
- echo "cannot find nm_test_func in $nlist" >&5
- fi
- else
- echo "cannot find nm_test_var in $nlist" >&5
- fi
- else
- echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
- fi
- else
- echo "$progname: failed program was:" >&5
- cat conftest.$ac_ext >&5
- fi
- rm -rf conftest* conftst*
-
- # Do not use the global_symbol_pipe unless it works.
- if test "$pipe_works" = yes; then
- break
- else
- lt_cv_sys_global_symbol_pipe=
- fi
-done
-
-fi
-
-if test -z "$lt_cv_sys_global_symbol_pipe"; then
- lt_cv_sys_global_symbol_to_cdecl=
-fi
-if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
-$as_echo "failed" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
-$as_echo "ok" >&6; }
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-# Check whether --enable-libtool-lock was given.
-if test "${enable_libtool_lock+set}" = set; then :
- enableval=$enable_libtool_lock;
-fi
-
-test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
-
-# Some flags need to be propagated to the compiler or linker for good
-# libtool support.
-case $host in
-ia64-*-hpux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.$ac_objext` in
- *ELF-32*)
- HPUX_IA64_MODE="32"
- ;;
- *ELF-64*)
- HPUX_IA64_MODE="64"
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-*-*-irix6*)
- # Find out which ABI we are using.
- echo '#line 6351 "configure"' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- if test "$lt_cv_prog_gnu_ld" = yes; then
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -melf32bsmip"
- ;;
- *N32*)
- LD="${LD-ld} -melf32bmipn32"
- ;;
- *64-bit*)
- LD="${LD-ld} -melf64bmip"
- ;;
- esac
- else
- case `/usr/bin/file conftest.$ac_objext` in
- *32-bit*)
- LD="${LD-ld} -32"
- ;;
- *N32*)
- LD="${LD-ld} -n32"
- ;;
- *64-bit*)
- LD="${LD-ld} -64"
- ;;
- esac
- fi
- fi
- rm -rf conftest*
- ;;
-
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
-s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *32-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_i386_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_i386"
- ;;
- ppc64-*linux*|powerpc64-*linux*)
- LD="${LD-ld} -m elf32ppclinux"
- ;;
- s390x-*linux*)
- LD="${LD-ld} -m elf_s390"
- ;;
- sparc64-*linux*)
- LD="${LD-ld} -m elf32_sparc"
- ;;
- esac
- ;;
- *64-bit*)
- case $host in
- x86_64-*kfreebsd*-gnu)
- LD="${LD-ld} -m elf_x86_64_fbsd"
- ;;
- x86_64-*linux*)
- LD="${LD-ld} -m elf_x86_64"
- ;;
- ppc*-*linux*|powerpc*-*linux*)
- LD="${LD-ld} -m elf64ppc"
- ;;
- s390*-*linux*|s390*-*tpf*)
- LD="${LD-ld} -m elf64_s390"
- ;;
- sparc*-*linux*)
- LD="${LD-ld} -m elf64_sparc"
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-
-*-*-sco3.2v5*)
- # On SCO OpenServer 5, we need -belf to get full-featured binaries.
- SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS -belf"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
-$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
-if test "${lt_cv_cc_needs_belf+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- 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
-
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_cc_needs_belf=yes
-else
- lt_cv_cc_needs_belf=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- 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
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
-$as_echo "$lt_cv_cc_needs_belf" >&6; }
- if test x"$lt_cv_cc_needs_belf" != x"yes"; then
- # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
- CFLAGS="$SAVE_CFLAGS"
- fi
- ;;
-sparc*-*solaris*)
- # Find out which ABI we are using.
- echo 'int i;' > conftest.$ac_ext
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }; then
- case `/usr/bin/file conftest.o` in
- *64-bit*)
- case $lt_cv_prog_gnu_ld in
- yes*) LD="${LD-ld} -m elf64_sparc" ;;
- *)
- if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
- LD="${LD-ld} -64"
- fi
- ;;
- esac
- ;;
- esac
- fi
- rm -rf conftest*
- ;;
-esac
-
-need_locks="$enable_libtool_lock"
-
-
- case $host_os in
- rhapsody* | darwin*)
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
-set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$DSYMUTIL"; then
- ac_cv_prog_DSYMUTIL="$DSYMUTIL" # 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_DSYMUTIL="${ac_tool_prefix}dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-DSYMUTIL=$ac_cv_prog_DSYMUTIL
-if test -n "$DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
-$as_echo "$DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_DSYMUTIL"; then
- ac_ct_DSYMUTIL=$DSYMUTIL
- # Extract the first word of "dsymutil", so it can be a program name with args.
-set dummy dsymutil; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_DSYMUTIL"; then
- ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # 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_DSYMUTIL="dsymutil"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
-if test -n "$ac_ct_DSYMUTIL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
-$as_echo "$ac_ct_DSYMUTIL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_DSYMUTIL" = x; then
- DSYMUTIL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- DSYMUTIL=$ac_ct_DSYMUTIL
- fi
-else
- DSYMUTIL="$ac_cv_prog_DSYMUTIL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
-set dummy ${ac_tool_prefix}nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_NMEDIT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$NMEDIT"; then
- ac_cv_prog_NMEDIT="$NMEDIT" # 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_NMEDIT="${ac_tool_prefix}nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-NMEDIT=$ac_cv_prog_NMEDIT
-if test -n "$NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
-$as_echo "$NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_NMEDIT"; then
- ac_ct_NMEDIT=$NMEDIT
- # Extract the first word of "nmedit", so it can be a program name with args.
-set dummy nmedit; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_NMEDIT"; then
- ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # 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_NMEDIT="nmedit"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
-if test -n "$ac_ct_NMEDIT"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
-$as_echo "$ac_ct_NMEDIT" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_NMEDIT" = x; then
- NMEDIT=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- NMEDIT=$ac_ct_NMEDIT
- fi
-else
- NMEDIT="$ac_cv_prog_NMEDIT"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
-set dummy ${ac_tool_prefix}lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_LIPO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$LIPO"; then
- ac_cv_prog_LIPO="$LIPO" # 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_LIPO="${ac_tool_prefix}lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-LIPO=$ac_cv_prog_LIPO
-if test -n "$LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
-$as_echo "$LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_LIPO"; then
- ac_ct_LIPO=$LIPO
- # Extract the first word of "lipo", so it can be a program name with args.
-set dummy lipo; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_LIPO"; then
- ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # 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_LIPO="lipo"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
-if test -n "$ac_ct_LIPO"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
-$as_echo "$ac_ct_LIPO" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_LIPO" = x; then
- LIPO=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- LIPO=$ac_ct_LIPO
- fi
-else
- LIPO="$ac_cv_prog_LIPO"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL"; then
- ac_cv_prog_OTOOL="$OTOOL" # 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_OTOOL="${ac_tool_prefix}otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL=$ac_cv_prog_OTOOL
-if test -n "$OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
-$as_echo "$OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL"; then
- ac_ct_OTOOL=$OTOOL
- # Extract the first word of "otool", so it can be a program name with args.
-set dummy otool; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL"; then
- ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # 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_OTOOL="otool"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
-if test -n "$ac_ct_OTOOL"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
-$as_echo "$ac_ct_OTOOL" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL" = x; then
- OTOOL=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- OTOOL=$ac_ct_OTOOL
- fi
-else
- OTOOL="$ac_cv_prog_OTOOL"
-fi
-
- if test -n "$ac_tool_prefix"; then
- # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
-set dummy ${ac_tool_prefix}otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_OTOOL64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$OTOOL64"; then
- ac_cv_prog_OTOOL64="$OTOOL64" # 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_OTOOL64="${ac_tool_prefix}otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-OTOOL64=$ac_cv_prog_OTOOL64
-if test -n "$OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
-$as_echo "$OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_OTOOL64"; then
- ac_ct_OTOOL64=$OTOOL64
- # Extract the first word of "otool64", so it can be a program name with args.
-set dummy otool64; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test -n "$ac_ct_OTOOL64"; then
- ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # 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_OTOOL64="otool64"
- $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
- break 2
- fi
-done
- done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
-if test -n "$ac_ct_OTOOL64"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
-$as_echo "$ac_ct_OTOOL64" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
- if test "x$ac_ct_OTOOL64" = x; then
- OTOOL64=":"
- else
- case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:${as_lineno-$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
- OTOOL64=$ac_ct_OTOOL64
- fi
-else
- OTOOL64="$ac_cv_prog_OTOOL64"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
-$as_echo_n "checking for -single_module linker flag... " >&6; }
-if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_apple_cc_single_mod=no
- if test -z "${LT_MULTI_MODULE}"; then
- # By default we will add the -single_module flag. You can override
- # by either setting the environment variable LT_MULTI_MODULE
- # non-empty at configure time, or by adding -multi_module to the
- # link flags.
- rm -rf libconftest.dylib*
- echo "int foo(void){return 1;}" > conftest.c
- echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
--dynamiclib -Wl,-single_module conftest.c" >&5
- $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
- -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
- _lt_result=$?
- if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
- lt_cv_apple_cc_single_mod=yes
- else
- cat conftest.err >&5
- fi
- rm -rf libconftest.dylib*
- rm -f conftest.*
- fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
-$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
-$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
-if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_ld_exported_symbols_list=no
- save_LDFLAGS=$LDFLAGS
- echo "_main" > conftest.sym
- LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- lt_cv_ld_exported_symbols_list=yes
-else
- lt_cv_ld_exported_symbols_list=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
-$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
- case $host_os in
- rhapsody* | darwin1.[012])
- _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
- darwin1.*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- darwin*) # darwin 5.x on
- # if running on 10.5 or later, the deployment target defaults
- # to the OS version, if on x86, and 10.4, the deployment
- # target defaults to 10.4. Don't you love it?
- case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
- 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- 10.[012]*)
- _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
- 10.*)
- _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
- esac
- ;;
- esac
- if test "$lt_cv_apple_cc_single_mod" = "yes"; then
- _lt_dar_single_mod='$single_module'
- fi
- if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
- _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
- else
- _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
- fi
- if test "$DSYMUTIL" != ":"; then
- _lt_dsymutil='~$DSYMUTIL $lib || :'
- else
- _lt_dsymutil=
- fi
- ;;
- esac
-
-
-{ $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-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`
-ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
-"
-eval as_val=\$$as_ac_Header
- 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 dlfcn.h
-do :
- ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
-"
-if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_DLFCN_H 1
-_ACEOF
-
-fi
-
-done
-
-
-
-# Set options
-
-
-
- enable_dlopen=no
-
-
-
- # Check whether --enable-shared was given.
-if test "${enable_shared+set}" = set; then :
- enableval=$enable_shared; p=${PACKAGE-default}
- case $enableval in
- yes) enable_shared=yes ;;
- no) enable_shared=no ;;
- *)
- enable_shared=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_shared=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_shared=yes
-fi
-
-
-
-
-
-
-
-
-
- # Check whether --enable-static was given.
-if test "${enable_static+set}" = set; then :
- enableval=$enable_static; p=${PACKAGE-default}
- case $enableval in
- yes) enable_static=yes ;;
- no) enable_static=no ;;
- *)
- enable_static=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_static=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_static=yes
-fi
-
-
-
-
-
-
-
-
-
-
-# Check whether --with-pic was given.
-if test "${with_pic+set}" = set; then :
- withval=$with_pic; pic_mode="$withval"
-else
- pic_mode=default
-fi
-
-
-test -z "$pic_mode" && pic_mode=default
-
-
-
-
-
-
-
- # Check whether --enable-fast-install was given.
-if test "${enable_fast_install+set}" = set; then :
- enableval=$enable_fast_install; p=${PACKAGE-default}
- case $enableval in
- yes) enable_fast_install=yes ;;
- no) enable_fast_install=no ;;
- *)
- enable_fast_install=no
- # Look at the argument we got. We use all the common list separators.
- lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
- for pkg in $enableval; do
- IFS="$lt_save_ifs"
- if test "X$pkg" = "X$p"; then
- enable_fast_install=yes
- fi
- done
- IFS="$lt_save_ifs"
- ;;
- esac
-else
- enable_fast_install=yes
-fi
-
-
-
-
-
-
-
-
-
-
-
-# This can be used to rebuild libtool when needed
-LIBTOOL_DEPS="$ltmain"
-
-# Always use our own libtool.
-LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-test -z "$LN_S" && LN_S="ln -s"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
-$as_echo_n "checking for objdir... " >&6; }
-if test "${lt_cv_objdir+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- rm -f .libs 2>/dev/null
-mkdir .libs 2>/dev/null
-if test -d .libs; then
- lt_cv_objdir=.libs
-else
- # MS-DOS does not allow filenames that begin with a dot.
- lt_cv_objdir=_libs
-fi
-rmdir .libs 2>/dev/null
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
-$as_echo "$lt_cv_objdir" >&6; }
-objdir=$lt_cv_objdir
-
-
-
-
-
-cat >>confdefs.h <<_ACEOF
-#define LT_OBJDIR "$lt_cv_objdir/"
-_ACEOF
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-case $host_os in
-aix3*)
- # AIX sometimes has problems with the GCC collect2 program. For some
- # reason, if we set the COLLECT_NAMES environment variable, the problems
- # vanish in a puff of smoke.
- if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
- fi
- ;;
-esac
-
-# Sed substitution that helps us do robust quoting. It backslashifies
-# metacharacters that are still active within double-quoted strings.
-sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Sed substitution to delay expansion of an escaped shell variable in a
-# double_quote_subst'ed string.
-delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
-
-# Sed substitution to delay expansion of an escaped single quote.
-delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
-
-# Sed substitution to avoid accidental globbing in evaled expressions
-no_glob_subst='s/\*/\\\*/g'
-
-# Global variables:
-ofile=libtool
-can_build_shared=yes
-
-# All known linkers require a `.a' archive for static linking (except MSVC,
-# which needs '.lib').
-libext=a
-
-with_gnu_ld="$lt_cv_prog_gnu_ld"
-
-old_CC="$CC"
-old_CFLAGS="$CFLAGS"
-
-# Set sane defaults for various variables
-test -z "$CC" && CC=cc
-test -z "$LTCC" && LTCC=$CC
-test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
-test -z "$LD" && LD=ld
-test -z "$ac_objext" && ac_objext=o
-
-for cc_temp in $compiler""; do
- case $cc_temp in
- compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
- distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
- \-*) ;;
- *) break;;
- esac
-done
-cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
-
-
-# Only perform the check for file, if the check method requires it
-test -z "$MAGIC_CMD" && MAGIC_CMD=file
-case $deplibs_check_method in
-file_magic*)
- if test "$file_magic_cmd" = '$MAGIC_CMD'; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
-$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/${ac_tool_prefix}file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-
-
-
-if test -z "$lt_cv_path_MAGIC_CMD"; then
- if test -n "$ac_tool_prefix"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
-$as_echo_n "checking for file... " >&6; }
-if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- case $MAGIC_CMD in
-[\\/*] | ?:[\\/]*)
- lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
- ;;
-*)
- lt_save_MAGIC_CMD="$MAGIC_CMD"
- lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
- ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
- for ac_dir in $ac_dummy; do
- IFS="$lt_save_ifs"
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/file; then
- lt_cv_path_MAGIC_CMD="$ac_dir/file"
- if test -n "$file_magic_test_file"; then
- case $deplibs_check_method in
- "file_magic "*)
- file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
- MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
- if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
- $EGREP "$file_magic_regex" > /dev/null; then
- :
- else
- cat <<_LT_EOF 1>&2
-
-*** Warning: the command libtool uses to detect shared libraries,
-*** $file_magic_cmd, produces output that libtool cannot recognize.
-*** The result is that libtool may fail to recognize shared libraries
-*** as such. This will affect the creation of libtool libraries that
-*** depend on shared libraries, but programs linked with such libtool
-*** libraries will work regardless of this problem. Nevertheless, you
-*** may want to report the problem to your system manager and/or to
-*** bug-libtool@gnu.org
-
-_LT_EOF
- fi ;;
- esac
- fi
- break
- fi
- done
- IFS="$lt_save_ifs"
- MAGIC_CMD="$lt_save_MAGIC_CMD"
- ;;
-esac
-fi
-
-MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
-if test -n "$MAGIC_CMD"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
-$as_echo "$MAGIC_CMD" >&6; }
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
- else
- MAGIC_CMD=:
- fi
-fi
-
- fi
- ;;
-esac
-
-# Use C for the default configuration in the libtool script
-
-lt_save_CC="$CC"
-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
-
-
-# Source file extension for C test sources.
-ac_ext=c
-
-# Object file extension for compiled C test sources.
-objext=o
-objext=$objext
-
-# Code to be used in simple compile tests
-lt_simple_compile_test_code="int some_variable = 0;"
-
-# Code to be used in simple link tests
-lt_simple_link_test_code='int main(){return(0);}'
-
-
-
-
-
-
-
-# If no C compiler was specified, use CC.
-LTCC=${LTCC-"$CC"}
-
-# If no C compiler flags were specified, use CFLAGS.
-LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
-
-# Allow CC to be a program name with arguments.
-compiler=$CC
-
-# Save the default compiler, since it gets overwritten when the other
-# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
-compiler_DEFAULT=$CC
-
-# save warnings/boilerplate of simple test code
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_compile_test_code" >conftest.$ac_ext
-eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_compiler_boilerplate=`cat conftest.err`
-$RM conftest*
-
-ac_outfile=conftest.$ac_objext
-echo "$lt_simple_link_test_code" >conftest.$ac_ext
-eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
-_lt_linker_boilerplate=`cat conftest.err`
-$RM -r conftest*
-
-
-if test -n "$compiler"; then
-
-lt_prog_compiler_no_builtin_flag=
-
-if test "$GCC" = yes; then
- lt_prog_compiler_no_builtin_flag=' -fno-builtin'
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
-$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
-if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_rtti_exceptions=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="-fno-rtti -fno-exceptions"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:7738: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:7742: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_rtti_exceptions=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
-$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
-
-if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
- lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
-else
- :
-fi
-
-fi
-
-
-
-
-
-
- lt_prog_compiler_wl=
-lt_prog_compiler_pic=
-lt_prog_compiler_static=
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
-$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
-
- if test "$GCC" = yes; then
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_static='-static'
-
- case $host_os in
- aix*)
- # All AIX code is PIC.
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- lt_prog_compiler_pic='-fPIC'
- ;;
- m68k)
- # FIXME: we need at least 68020 code to build shared libraries, but
- # adding the `-m68020' flag to GCC prevents building anything better,
- # like `-m68040'.
- lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
- ;;
- esac
- ;;
-
- beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
- # PIC is the default for these OSes.
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- # Although the cygwin gcc ignores -fPIC, still need this for old-style
- # (--disable-auto-import) libraries
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- darwin* | rhapsody*)
- # PIC is the default on this platform
- # Common symbols not allowed in MH_DYLIB files
- lt_prog_compiler_pic='-fno-common'
- ;;
-
- hpux*)
- # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
- # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
- # sets the default TLS model and affects inlining.
- case $host_cpu in
- hppa*64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- ;;
-
- interix[3-9]*)
- # Interix 3.x gcc -fpic/-fPIC options generate broken code.
- # Instead, we relocate shared libraries at runtime.
- ;;
-
- msdosdjgpp*)
- # Just because we use GCC doesn't mean we suddenly get shared libraries
- # on systems that don't support them.
- lt_prog_compiler_can_build_shared=no
- enable_shared=no
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- lt_prog_compiler_pic=-Kconform_pic
- fi
- ;;
-
- *)
- lt_prog_compiler_pic='-fPIC'
- ;;
- esac
- else
- # PORTME Check for flag to pass linker flags through the system compiler.
- case $host_os in
- aix*)
- lt_prog_compiler_wl='-Wl,'
- if test "$host_cpu" = ia64; then
- # AIX 5 now supports IA64 processor
- lt_prog_compiler_static='-Bstatic'
- else
- lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
- fi
- ;;
-
- mingw* | cygwin* | pw32* | os2* | cegcc*)
- # This hack is so that the source file can tell whether it is being
- # built for inclusion in a dll (and should export symbols for example).
- lt_prog_compiler_pic='-DDLL_EXPORT'
- ;;
-
- hpux9* | hpux10* | hpux11*)
- lt_prog_compiler_wl='-Wl,'
- # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
- # not for PA HP-UX.
- case $host_cpu in
- hppa*64*|ia64*)
- # +Z the default
- ;;
- *)
- lt_prog_compiler_pic='+Z'
- ;;
- esac
- # Is there a better lt_prog_compiler_static that works with the bundled CC?
- lt_prog_compiler_static='${wl}-a ${wl}archive'
- ;;
-
- irix5* | irix6* | nonstopux*)
- lt_prog_compiler_wl='-Wl,'
- # PIC (with -KPIC) is the default.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- linux* | k*bsd*-gnu)
- case $cc_basename in
- # old Intel for x86_64 which still supported -KPIC.
- ecc*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-static'
- ;;
- # icc used to be incompatible with GCC.
- # ICC 10 doesn't accept -KPIC any more.
- icc* | ifort*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fPIC'
- lt_prog_compiler_static='-static'
- ;;
- # Lahey Fortran 8.1.
- lf95*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='--shared'
- lt_prog_compiler_static='--static'
- ;;
- pgcc* | pgf77* | pgf90* | pgf95*)
- # Portland Group compilers (*not* the Pentium gcc compiler,
- # which looks to be a dead project)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-fpic'
- lt_prog_compiler_static='-Bstatic'
- ;;
- ccc*)
- lt_prog_compiler_wl='-Wl,'
- # All Alpha code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
- xl*)
- # IBM XL C 8.0/Fortran 10.1 on PPC
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-qpic'
- lt_prog_compiler_static='-qstaticlink'
- ;;
- *)
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*)
- # Sun C 5.9
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl='-Wl,'
- ;;
- *Sun\ F*)
- # Sun Fortran 8.3 passes all unrecognized flags to the linker
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- lt_prog_compiler_wl=''
- ;;
- esac
- ;;
- esac
- ;;
-
- newsos6)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *nto* | *qnx*)
- # QNX uses GNU C++, but need to define -shared option too, otherwise
- # it will coredump.
- lt_prog_compiler_pic='-fPIC -shared'
- ;;
-
- osf3* | osf4* | osf5*)
- lt_prog_compiler_wl='-Wl,'
- # All OSF/1 code is PIC.
- lt_prog_compiler_static='-non_shared'
- ;;
-
- rdos*)
- lt_prog_compiler_static='-non_shared'
- ;;
-
- solaris*)
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- case $cc_basename in
- f77* | f90* | f95*)
- lt_prog_compiler_wl='-Qoption ld ';;
- *)
- lt_prog_compiler_wl='-Wl,';;
- esac
- ;;
-
- sunos4*)
- lt_prog_compiler_wl='-Qoption ld '
- lt_prog_compiler_pic='-PIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4 | sysv4.2uw2* | sysv4.3*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec ;then
- lt_prog_compiler_pic='-Kconform_pic'
- lt_prog_compiler_static='-Bstatic'
- fi
- ;;
-
- sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_pic='-KPIC'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- unicos*)
- lt_prog_compiler_wl='-Wl,'
- lt_prog_compiler_can_build_shared=no
- ;;
-
- uts4*)
- lt_prog_compiler_pic='-pic'
- lt_prog_compiler_static='-Bstatic'
- ;;
-
- *)
- lt_prog_compiler_can_build_shared=no
- ;;
- esac
- fi
-
-case $host_os in
- # For platforms which do not support PIC, -DPIC is meaningless:
- *djgpp*)
- lt_prog_compiler_pic=
- ;;
- *)
- lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
-$as_echo "$lt_prog_compiler_pic" >&6; }
-
-
-
-
-
-
-#
-# Check to make sure the PIC flag actually works.
-#
-if test -n "$lt_prog_compiler_pic"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
-$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
-if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_pic_works=no
- ac_outfile=conftest.$ac_objext
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
- lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- # The option is referenced via a variable to avoid confusing sed.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8077: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>conftest.err)
- ac_status=$?
- cat conftest.err >&5
- echo "$as_me:8081: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s "$ac_outfile"; then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings other than the usual output.
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_pic_works=yes
- fi
- fi
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
-$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
- case $lt_prog_compiler_pic in
- "" | " "*) ;;
- *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
- esac
-else
- lt_prog_compiler_pic=
- lt_prog_compiler_can_build_shared=no
-fi
-
-fi
-
-
-
-
-
-
-#
-# Check to make sure the static flag actually works.
-#
-wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
-$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
-if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_static_works=no
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
- echo "$lt_simple_link_test_code" > conftest.$ac_ext
- if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
- # The linker can only warn and ignore the option if not recognized
- # So say no if there are warnings
- if test -s conftest.err; then
- # Append any errors to the config.log.
- cat conftest.err 1>&5
- $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
- $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
- if diff conftest.exp conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_static_works=yes
- fi
- else
- lt_cv_prog_compiler_static_works=yes
- fi
- fi
- $RM -r conftest*
- LDFLAGS="$save_LDFLAGS"
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
-$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
-
-if test x"$lt_cv_prog_compiler_static_works" = xyes; then
- :
-else
- lt_prog_compiler_static=
-fi
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8182: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:8186: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
-$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
-if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- lt_cv_prog_compiler_c_o=no
- $RM -r conftest 2>/dev/null
- mkdir conftest
- cd conftest
- mkdir out
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- lt_compiler_flag="-o out/conftest2.$ac_objext"
- # Insert the option either (1) after the last *FLAGS variable, or
- # (2) before a word containing "conftest.", or (3) at the end.
- # Note that $ac_compile itself does not contain backslashes and begins
- # with a dollar sign (not a hyphen), so the echo should work correctly.
- lt_compile=`echo "$ac_compile" | $SED \
- -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
- -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
- -e 's:$: $lt_compiler_flag:'`
- (eval echo "\"\$as_me:8237: $lt_compile\"" >&5)
- (eval "$lt_compile" 2>out/conftest.err)
- ac_status=$?
- cat out/conftest.err >&5
- echo "$as_me:8241: \$? = $ac_status" >&5
- if (exit $ac_status) && test -s out/conftest2.$ac_objext
- then
- # The compiler can only warn and ignore the option if not recognized
- # So say no if there are warnings
- $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
- $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
- if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
- lt_cv_prog_compiler_c_o=yes
- fi
- fi
- chmod u+w . 2>&5
- $RM conftest*
- # SGI C++ compiler will create directory out/ii_files/ for
- # template instantiation
- test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
- $RM out/* && rmdir out
- cd ..
- $RM -r conftest
- $RM conftest*
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
-$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
-
-
-
-
-hard_links="nottested"
-if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
- # do not overwrite the value of need_locks provided by the user
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
-$as_echo_n "checking if we can lock with hard links... " >&6; }
- hard_links=yes
- $RM conftest*
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- touch conftest.a
- ln conftest.a conftest.b 2>&5 || hard_links=no
- ln conftest.a conftest.b 2>/dev/null && hard_links=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
-$as_echo "$hard_links" >&6; }
- if test "$hard_links" = no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
-$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
- need_locks=warn
- fi
-else
- need_locks=no
-fi
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
-$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
-
- runpath_var=
- allow_undefined_flag=
- always_export_symbols=no
- archive_cmds=
- archive_expsym_cmds=
- compiler_needs_object=no
- enable_shared_with_static_runtimes=no
- export_dynamic_flag_spec=
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
- hardcode_automatic=no
- hardcode_direct=no
- hardcode_direct_absolute=no
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld=
- hardcode_libdir_separator=
- hardcode_minus_L=no
- hardcode_shlibpath_var=unsupported
- inherit_rpath=no
- link_all_deplibs=unknown
- module_cmds=
- module_expsym_cmds=
- old_archive_from_new_cmds=
- old_archive_from_expsyms_cmds=
- thread_safe_flag_spec=
- whole_archive_flag_spec=
- # include_expsyms should be a list of space-separated symbols to be *always*
- # included in the symbol list
- include_expsyms=
- # exclude_expsyms can be an extended regexp of symbols to exclude
- # it will be wrapped by ` (' and `)$', so one must not match beginning or
- # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
- # as well as any symbol that contains `d'.
- exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
- # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
- # platforms (ab)use it in PIC code, but their linkers get confused if
- # the symbol is explicitly referenced. Since portable code cannot
- # rely on this symbol name, it's probably fine to never include it in
- # preloaded symbol tables.
- # Exclude shared library initialization/finalization symbols.
- extract_expsyms_cmds=
-
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- # 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
- ;;
- interix*)
- # we just hope/assume this is gcc and not c89 (= MSVC++)
- with_gnu_ld=yes
- ;;
- openbsd*)
- with_gnu_ld=no
- ;;
- esac
-
- ld_shlibs=yes
- if test "$with_gnu_ld" = yes; then
- # If archive_cmds runs LD, not CC, wlarc should be empty
- wlarc='${wl}'
-
- # Set some defaults for GNU ld with shared library support. These
- # are reset later if shared libraries are not supported. Putting them
- # here allows them to be overridden if necessary.
- runpath_var=LD_RUN_PATH
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- export_dynamic_flag_spec='${wl}--export-dynamic'
- # ancient GNU ld didn't support --whole-archive et. al.
- if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
- whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
- else
- whole_archive_flag_spec=
- fi
- supports_anon_versioning=no
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
- *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
- *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
- *\ 2.11.*) ;; # other 2.11 versions
- *) supports_anon_versioning=yes ;;
- esac
-
- # See if GNU ld supports shared libraries.
- case $host_os in
- aix[3-9]*)
- # On AIX/PPC, the GNU linker is very broken
- if test "$host_cpu" != ia64; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: the GNU linker, at least up to release 2.9.1, is reported
-*** to be unable to reliably create shared libraries on AIX.
-*** Therefore, libtool is disabling shared libraries support. If you
-*** really care for shared libraries, you may want to modify your PATH
-*** so that a non-GNU linker is found, and then restart.
-
-_LT_EOF
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- beos*)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- allow_undefined_flag=unsupported
- # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
- # support --undefined. This deserves some investigation. FIXME
- archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
- # as there is no search path for DLLs.
- hardcode_libdir_flag_spec='-L$libdir'
- allow_undefined_flag=unsupported
- always_export_symbols=no
- enable_shared_with_static_runtimes=yes
- export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
-
- if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- # If the export-symbols file already is a .def file (1st line
- # is EXPORTS), use it as is; otherwise, prepend...
- archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
- cp $export_symbols $output_objdir/$soname.def;
- else
- echo EXPORTS > $output_objdir/$soname.def;
- cat $export_symbols >> $output_objdir/$soname.def;
- fi~
- $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- interix[3-9]*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
- # Instead, shared libraries are loaded at an image base (0x10000000 by
- # default) and relocated if they conflict, which is a slow very memory
- # consuming and fragmenting process. To avoid this, we pick a random,
- # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
- # time. Moving up from 0x10000000 also allows more sbrk(2) space.
- archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
- ;;
-
- gnu* | linux* | tpf* | k*bsd*-gnu)
- tmp_diet=no
- if test "$host_os" = linux-dietlibc; then
- case $cc_basename in
- diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
- esac
- fi
- if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
- && test "$tmp_diet" = no
- then
- tmp_addflag=
- tmp_sharedflag='-shared'
- case $cc_basename,$host_cpu in
- pgcc*) # Portland Group C compiler
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag'
- ;;
- pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
- whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- tmp_addflag=' $pic_flag -Mnomain' ;;
- ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
- tmp_addflag=' -i_dynamic' ;;
- efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
- tmp_addflag=' -i_dynamic -nofor_main' ;;
- ifc* | ifort*) # Intel Fortran compiler
- tmp_addflag=' -nofor_main' ;;
- lf95*) # Lahey Fortran 8.1
- whole_archive_flag_spec=
- tmp_sharedflag='--shared' ;;
- xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
- tmp_sharedflag='-qmkshrobj'
- tmp_addflag= ;;
- esac
- case `$CC -V 2>&1 | sed 5q` in
- *Sun\ C*) # Sun C 5.9
- whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
- compiler_needs_object=yes
- tmp_sharedflag='-G' ;;
- *Sun\ F*) # Sun Fortran 8.3
- tmp_sharedflag='-G' ;;
- esac
- archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
-
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
- fi
-
- case $cc_basename in
- xlf*)
- # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
- whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
- hardcode_libdir_flag_spec=
- hardcode_libdir_flag_spec_ld='-rpath $libdir'
- archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
- if test "x$supports_anon_versioning" = xyes; then
- archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
- echo "local: *; };" >> $output_objdir/$libname.ver~
- $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
- fi
- ;;
- esac
- else
- ld_shlibs=no
- fi
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
- wlarc=
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- fi
- ;;
-
- solaris*)
- if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: The releases 2.8.* of the GNU linker cannot reliably
-*** create shared libraries on Solaris systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.9.1 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
- case `$LD -v 2>&1` in
- *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
- ld_shlibs=no
- cat <<_LT_EOF 1>&2
-
-*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
-*** reliably create shared libraries on SCO systems. Therefore, libtool
-*** is disabling shared libraries support. We urge you to upgrade GNU
-*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
-*** your PATH or compiler configuration so that the native linker is
-*** used, and then restart.
-
-_LT_EOF
- ;;
- *)
- # For security reasons, it is highly recommended that you always
- # use absolute paths for naming shared libraries, and exclude the
- # DT_RUNPATH tag from executables and libraries. But doing so
- # requires that you compile everything twice, which is a pain.
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
- ;;
-
- sunos4*)
- archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- wlarc=
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- *)
- if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
- else
- ld_shlibs=no
- fi
- ;;
- esac
-
- if test "$ld_shlibs" = no; then
- runpath_var=
- hardcode_libdir_flag_spec=
- export_dynamic_flag_spec=
- whole_archive_flag_spec=
- fi
- else
- # PORTME fill in a description of your system's linker (not GNU ld)
- case $host_os in
- aix3*)
- allow_undefined_flag=unsupported
- always_export_symbols=yes
- archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
- # Note: this linker hardcodes the directories in LIBPATH if there
- # are no directories specified by -L.
- hardcode_minus_L=yes
- if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
- # Neither direct hardcoding nor static linking is supported with a
- # broken collect2.
- hardcode_direct=unsupported
- fi
- ;;
-
- aix[4-9]*)
- 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
- exp_sym_flag='-Bexport'
- no_entry_flag=""
- else
- # If we're using GNU nm, then we don't want the "-C" option.
- # -C means demangle to AIX nm, but means don't demangle with GNU nm
- if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
- export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- else
- export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
- fi
- 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].*|aix[5-9]*)
- 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
-
- exp_sym_flag='-bexport'
- no_entry_flag='-bnoentry'
- fi
-
- # When large executables or shared objects are built, AIX ld can
- # have problems creating the table of contents. If linking a library
- # or program results in "error TOC overflow" add -mminimal-toc to
- # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
- # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
-
- archive_cmds=''
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- file_list_spec='${wl}-f,'
-
- if test "$GCC" = yes; then
- case $host_os in aix4.[012]|aix4.[012].*)
- # We only want to do this on AIX 4.2 and lower, the check
- # below for broken collect2 doesn't work under 4.3+
- collect2name=`${CC} -print-prog-name=collect2`
- if test -f "$collect2name" &&
- strings "$collect2name" | $GREP resolve_lib_name >/dev/null
- then
- # We have reworked collect2
- :
- else
- # We have old collect2
- hardcode_direct=unsupported
- # It fails to find uninstalled libraries when the uninstalled
- # path is not listed in the libpath. Setting hardcode_minus_L
- # to unsupported forces relinking
- hardcode_minus_L=yes
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_libdir_separator=
- fi
- ;;
- esac
- shared_flag='-shared'
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag="$shared_flag "'${wl}-G'
- fi
- else
- # not using gcc
- if test "$host_cpu" = ia64; then
- # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
- # chokes on -Wl,-G. The following line is correct:
- shared_flag='-G'
- else
- if test "$aix_use_runtimelinking" = yes; then
- shared_flag='${wl}-G'
- else
- shared_flag='${wl}-bM:SRE'
- fi
- fi
- fi
-
- export_dynamic_flag_spec='${wl}-bexpall'
- # It seems that -bexpall does not export symbols beginning with
- # underscore (_), so it is better to generate a list of symbols to export.
- always_export_symbols=yes
- if test "$aix_use_runtimelinking" = yes; then
- # Warning - without using the other runtime loading flags (-brtl),
- # -berok will link without error, but may produce a broken library.
- allow_undefined_flag='-berok'
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
- else
- if test "$host_cpu" = ia64; then
- hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
- allow_undefined_flag="-z nodefs"
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
- else
- # Determine the default libpath from the value encoded in an
- # empty executable.
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
-
-lt_aix_libpath_sed='
- /Import File Strings/,/^$/ {
- /^0/ {
- s/^0 *\(.*\)$/\1/
- p
- }
- }'
-aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-# Check for a 64-bit object if we didn't find anything.
-if test -z "$aix_libpath"; then
- aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
-
- hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
- # Warning - without using the other run time loading flags,
- # -berok will link without error, but may produce a broken library.
- no_undefined_flag=' ${wl}-bernotok'
- allow_undefined_flag=' ${wl}-berok'
- # Exported symbols can be pulled into shared objects from archives
- whole_archive_flag_spec='$convenience'
- archive_cmds_need_lc=yes
- # This is similar to how AIX traditionally builds its shared libraries.
- archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
- fi
- fi
- ;;
-
- amigaos*)
- case $host_cpu in
- powerpc)
- # see comment about AmigaOS4 .so support
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
- archive_expsym_cmds=''
- ;;
- m68k)
- archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- ;;
- esac
- ;;
-
- bsdi[45]*)
- export_dynamic_flag_spec=-rdynamic
- ;;
-
- cygwin* | mingw* | pw32* | cegcc*)
- # 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=' '
- allow_undefined_flag=unsupported
- # Tell ltmain to make .lib files, not .a files.
- libext=lib
- # Tell ltmain to make .dll files, not .so files.
- shrext_cmds=".dll"
- # FIXME: Setting linknames here is a bad hack.
- archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
- # The linker will automatically build a .lib file if we build a DLL.
- old_archive_from_new_cmds='true'
- # FIXME: Should let the user specify the lib program.
- old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
- fix_srcfile_path='`cygpath -w "$srcfile"`'
- enable_shared_with_static_runtimes=yes
- ;;
-
- darwin* | rhapsody*)
-
-
- archive_cmds_need_lc=no
- hardcode_direct=no
- hardcode_automatic=yes
- hardcode_shlibpath_var=unsupported
- whole_archive_flag_spec=''
- link_all_deplibs=yes
- allow_undefined_flag="$_lt_dar_allow_undefined"
- case $cc_basename in
- ifort*) _lt_dar_can_shared=yes ;;
- *) _lt_dar_can_shared=$GCC ;;
- esac
- if test "$_lt_dar_can_shared" = "yes"; then
- output_verbose_link_cmd=echo
- archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
- module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
- archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
- module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
-
- else
- ld_shlibs=no
- fi
-
- ;;
-
- dgux*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- freebsd1*)
- ld_shlibs=no
- ;;
-
- # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
- # support. Future versions do this automatically, but an explicit c++rt0.o
- # does not break anything, and helps significantly (at the cost of a little
- # extra space).
- freebsd2.2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- # Unfortunately, older versions of FreeBSD 2 do not have this feature.
- freebsd2*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
- freebsd* | dragonfly*)
- archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- hpux9*)
- if test "$GCC" = yes; then
- archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- else
- archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
- fi
- 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
- export_dynamic_flag_spec='${wl}-E'
- ;;
-
- hpux10*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_flag_spec_ld='+b $libdir'
- hardcode_libdir_separator=:
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
- # hardcode_minus_L: Not really in the search PATH,
- # but as the default location of the library.
- hardcode_minus_L=yes
- fi
- ;;
-
- hpux11*)
- if test "$GCC" = yes -a "$with_gnu_ld" = no; then
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- else
- case $host_cpu in
- hppa*64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- ia64*)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- *)
- archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
- ;;
- esac
- fi
- if test "$with_gnu_ld" = no; then
- hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
- hardcode_libdir_separator=:
-
- case $host_cpu in
- hppa*64*|ia64*)
- hardcode_direct=no
- hardcode_shlibpath_var=no
- ;;
- *)
- hardcode_direct=yes
- hardcode_direct_absolute=yes
- export_dynamic_flag_spec='${wl}-E'
-
- # 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*)
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- # Try to use the -exported_symbol ld option, if it does not
- # work, assume that -exports_file does not work either and
- # implicitly export all symbols.
- save_LDFLAGS="$LDFLAGS"
- LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-int foo(void) {}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
-
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS="$save_LDFLAGS"
- else
- archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- inherit_rpath=yes
- link_all_deplibs=yes
- ;;
-
- netbsd*)
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
- else
- archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- ;;
-
- newsos6)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- hardcode_shlibpath_var=no
- ;;
-
- *nto* | *qnx*)
- ;;
-
- openbsd*)
- if test -f /usr/libexec/ld.so; then
- hardcode_direct=yes
- hardcode_shlibpath_var=no
- hardcode_direct_absolute=yes
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- export_dynamic_flag_spec='${wl}-E'
- else
- case $host_os in
- openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
- archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-R$libdir'
- ;;
- *)
- archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
- hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
- ;;
- esac
- fi
- else
- ld_shlibs=no
- fi
- ;;
-
- os2*)
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_minus_L=yes
- allow_undefined_flag=unsupported
- archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
- old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
- ;;
-
- osf3*)
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- hardcode_libdir_separator=:
- ;;
-
- osf4* | osf5*) # as osf3* with the addition of -msym flag
- if test "$GCC" = yes; then
- allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
- hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
- else
- allow_undefined_flag=' -expect_unresolved \*'
- archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
- archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
- $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
-
- # Both c and cxx compiler support -rpath directly
- hardcode_libdir_flag_spec='-rpath $libdir'
- fi
- archive_cmds_need_lc='no'
- hardcode_libdir_separator=:
- ;;
-
- solaris*)
- no_undefined_flag=' -z defs'
- if test "$GCC" = yes; then
- wlarc='${wl}'
- archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- else
- case `$CC -V 2>&1` in
- *"Compilers 5.0"*)
- wlarc=''
- archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
- ;;
- *)
- wlarc='${wl}'
- archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
- $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
- ;;
- esac
- fi
- hardcode_libdir_flag_spec='-R$libdir'
- hardcode_shlibpath_var=no
- case $host_os in
- solaris2.[0-5] | solaris2.[0-5].*) ;;
- *)
- # The compiler driver will combine and reorder linker options,
- # but understands `-z linker_flag'. GCC discards it without `$wl',
- # but is careful enough not to reorder.
- # Supported since Solaris 2.6 (maybe 2.5.1?)
- if test "$GCC" = yes; then
- whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
- else
- whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
- fi
- ;;
- esac
- link_all_deplibs=yes
- ;;
-
- sunos4*)
- if test "x$host_vendor" = xsequent; then
- # Use $CC to link under sequent, because it throws in some extra .o
- # files that make .init and .fini sections work.
- archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
- fi
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_direct=yes
- hardcode_minus_L=yes
- hardcode_shlibpath_var=no
- ;;
-
- sysv4)
- case $host_vendor in
- sni)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=yes # is this really true???
- ;;
- siemens)
- ## LD is ld it makes a PLAMLIB
- ## CC just makes a GrossModule.
- archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
- reload_cmds='$CC -r -o $output$reload_objs'
- hardcode_direct=no
- ;;
- motorola)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_direct=no #Motorola manual says yes, but my tests say they lie
- ;;
- esac
- runpath_var='LD_RUN_PATH'
- hardcode_shlibpath_var=no
- ;;
-
- sysv4.3*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- export_dynamic_flag_spec='-Bexport'
- ;;
-
- sysv4*MP*)
- if test -d /usr/nec; then
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_shlibpath_var=no
- runpath_var=LD_RUN_PATH
- hardcode_runpath_var=yes
- ld_shlibs=yes
- fi
- ;;
-
- sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
- no_undefined_flag='${wl}-z,text'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- sysv5* | sco3.2v5* | sco5v6*)
- # Note: We can NOT use -z defs as we might desire, because we do not
- # link with -lc, and that would cause any symbols used from libc to
- # always be unresolved, which means just about no library would
- # ever link correctly. If we're not using GNU ld we use -z text
- # though, which does catch some bad symbols but isn't as heavy-handed
- # as -z defs.
- no_undefined_flag='${wl}-z,text'
- allow_undefined_flag='${wl}-z,nodefs'
- archive_cmds_need_lc=no
- hardcode_shlibpath_var=no
- hardcode_libdir_flag_spec='${wl}-R,$libdir'
- hardcode_libdir_separator=':'
- link_all_deplibs=yes
- export_dynamic_flag_spec='${wl}-Bexport'
- runpath_var='LD_RUN_PATH'
-
- if test "$GCC" = yes; then
- archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- else
- archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
- fi
- ;;
-
- uts4*)
- archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
- hardcode_libdir_flag_spec='-L$libdir'
- hardcode_shlibpath_var=no
- ;;
-
- *)
- ld_shlibs=no
- ;;
- esac
-
- if test x$host_vendor = xsni; then
- case $host in
- sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
- export_dynamic_flag_spec='${wl}-Blargedynsym'
- ;;
- esac
- fi
- fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
-$as_echo "$ld_shlibs" >&6; }
-test "$ld_shlibs" = no && can_build_shared=no
-
-with_gnu_ld=$with_gnu_ld
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-#
-# Do we need to explicitly link libc?
-#
-case "x$archive_cmds_need_lc" in
-x|xyes)
- # Assume -lc should be added
- archive_cmds_need_lc=yes
-
- if test "$enable_shared" = yes && test "$GCC" = yes; then
- case $archive_cmds in
- *'~'*)
- # FIXME: we may have to deal with multi-command sequences.
- ;;
- '$CC '*)
- # Test whether the compiler implicitly links with -lc since on some
- # systems, -lgcc has to come before -lc. If gcc already passes -lc
- # to ld, don't add -lc before -lgcc.
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
-$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
- $RM conftest*
- echo "$lt_simple_compile_test_code" > conftest.$ac_ext
-
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
- (eval $ac_compile) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } 2>conftest.err; then
- soname=conftest
- lib=conftest
- libobjs=conftest.$ac_objext
- deplibs=
- wl=$lt_prog_compiler_wl
- pic_flag=$lt_prog_compiler_pic
- compiler_flags=-v
- linker_flags=-v
- verstring=
- output_objdir=.
- libname=conftest
- lt_save_allow_undefined_flag=$allow_undefined_flag
- allow_undefined_flag=
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
- (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; }
- then
- archive_cmds_need_lc=no
- else
- archive_cmds_need_lc=yes
- fi
- allow_undefined_flag=$lt_save_allow_undefined_flag
- else
- cat conftest.err 1>&5
- fi
- $RM conftest*
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
-$as_echo "$archive_cmds_need_lc" >&6; }
- ;;
- esac
- fi
- ;;
-esac
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
-$as_echo_n "checking dynamic linker characteristics... " >&6; }
-
-if test "$GCC" = yes; then
- case $host_os in
- darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
- *) lt_awk_arg="/^libraries:/" ;;
- esac
- lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
- # if the path contains ";" then we assume it to be the separator
- # otherwise default to the standard path separator (i.e. ":") - it is
- # assumed that no part of a normal pathname contains ";" but that should
- # okay in the real world where ";" in dirpaths is itself problematic.
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
- else
- lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- # Ok, now we have the path, separated by spaces, we can step through it
- # and add multilib dir if necessary.
- lt_tmp_lt_search_path_spec=
- lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
- for lt_sys_path in $lt_search_path_spec; do
- if test -d "$lt_sys_path/$lt_multi_os_dir"; then
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
- else
- test -d "$lt_sys_path" && \
- lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
- fi
- done
- lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
-BEGIN {RS=" "; FS="/|\n";} {
- lt_foo="";
- lt_count=0;
- for (lt_i = NF; lt_i > 0; lt_i--) {
- if ($lt_i != "" && $lt_i != ".") {
- if ($lt_i == "..") {
- lt_count++;
- } else {
- if (lt_count == 0) {
- lt_foo="/" $lt_i lt_foo;
- } else {
- lt_count--;
- }
- }
- }
- }
- if (lt_foo != "") { lt_freq[lt_foo]++; }
- if (lt_freq[lt_foo] == 1) { print lt_foo; }
-}'`
- sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
-else
- sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
-fi
-library_names_spec=
-libname_spec='lib$name'
-soname_spec=
-shrext_cmds=".so"
-postinstall_cmds=
-postuninstall_cmds=
-finish_cmds=
-finish_eval=
-shlibpath_var=
-shlibpath_overrides_runpath=unknown
-version_type=none
-dynamic_linker="$host_os ld.so"
-sys_lib_dlsearch_path_spec="/lib /usr/lib"
-need_lib_prefix=unknown
-hardcode_into_libs=no
-
-# when you set need_version to no, make sure it does not cause -set_version
-# flags to be left without arguments
-need_version=unknown
-
-case $host_os in
-aix3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
- shlibpath_var=LIBPATH
-
- # AIX 3 has no versioning support, so we append a major version to the name.
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
-
-aix[4-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- hardcode_into_libs=yes
- if test "$host_cpu" = ia64; then
- # AIX 5 supports IA64
- library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- else
- # With GCC up to 2.95.x, collect2 would create an import file
- # for dependence libraries. The import file would start with
- # the line `#! .'. This would cause the generated library to
- # depend on `.', always an invalid library. This was fixed in
- # development snapshots of GCC prior to 3.0.
- case $host_os in
- aix4 | aix4.[01] | aix4.[01].*)
- if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
- echo ' yes '
- echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
- :
- else
- can_build_shared=no
- fi
- ;;
- esac
- # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
- # soname into executable. Probably we can add versioning support to
- # collect2, so additional links can be useful in future.
- if test "$aix_use_runtimelinking" = yes; then
- # If using run time linking (on AIX 4.2 or later) use lib<name>.so
- # instead of lib<name>.a to let people know that these are not
- # typical AIX shared libraries.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- else
- # We preserve .a as extension for shared libraries through AIX4.2
- # and later when we are not doing run time linking.
- library_names_spec='${libname}${release}.a $libname.a'
- soname_spec='${libname}${release}${shared_ext}$major'
- fi
- shlibpath_var=LIBPATH
- fi
- ;;
-
-amigaos*)
- case $host_cpu in
- powerpc)
- # Since July 2007 AmigaOS4 officially supports .so libraries.
- # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- ;;
- m68k)
- library_names_spec='$libname.ixlibrary $libname.a'
- # Create ${libname}_ixlibrary.a entries in /sys/libs.
- finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
- ;;
- esac
- ;;
-
-beos*)
- library_names_spec='${libname}${shared_ext}'
- dynamic_linker="$host_os ld.so"
- shlibpath_var=LIBRARY_PATH
- ;;
-
-bsdi[45]*)
- version_type=linux
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
- sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
- # the default ld.so.conf also contains /usr/contrib/lib and
- # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
- # libtool to hard-code these into programs
- ;;
-
-cygwin* | mingw* | pw32* | cegcc*)
- version_type=windows
- shrext_cmds=".dll"
- need_version=no
- need_lib_prefix=no
-
- case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
- library_names_spec='$libname.dll.a'
- # DLL is installed to $(libdir)/../bin by postinstall_cmds
- postinstall_cmds='base_file=`basename \${file}`~
- dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
- dldir=$destdir/`dirname \$dlpath`~
- test -d \$dldir || mkdir -p \$dldir~
- $install_prog $dir/$dlname \$dldir/$dlname~
- chmod a+x \$dldir/$dlname~
- if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
- eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
- fi'
- postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
- dlpath=$dir/\$dldll~
- $RM \$dlpath'
- shlibpath_overrides_runpath=yes
-
- case $host_os in
- cygwin*)
- # Cygwin DLLs use 'cyg' prefix rather than 'lib'
- soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
- ;;
- mingw* | cegcc*)
- # MinGW DLLs use traditional 'lib' prefix
- soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
- if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
- # It is most probably a Windows format PATH printed by
- # mingw gcc, but we are running on Cygwin. Gcc prints its search
- # path with ; separators, and with drive letters. We can handle the
- # drive letters (cygwin fileutils understands them), so leave them,
- # especially as we might pass files found there to a mingw objdump,
- # which wouldn't understand a cygwinified path. Ahh.
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
- else
- sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
- fi
- ;;
- pw32*)
- # pw32 DLLs use 'pw' prefix rather than 'lib'
- library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
- ;;
- esac
- ;;
-
- *)
- library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
- ;;
- esac
- dynamic_linker='Win32 ld.exe'
- # FIXME: first we should search . and the directory the executable is in
- shlibpath_var=PATH
- ;;
-
-darwin* | rhapsody*)
- dynamic_linker="$host_os dyld"
- version_type=darwin
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
- soname_spec='${libname}${release}${major}$shared_ext'
- shlibpath_overrides_runpath=yes
- shlibpath_var=DYLD_LIBRARY_PATH
- shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
-
- sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
- sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
- ;;
-
-dgux*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-freebsd1*)
- dynamic_linker=no
- ;;
-
-freebsd* | dragonfly*)
- # DragonFly does not have aout. When/if they implement a new
- # versioning mechanism, adjust this.
- if test -x /usr/bin/objformat; then
- objformat=`/usr/bin/objformat`
- else
- case $host_os in
- freebsd[123]*) objformat=aout ;;
- *) objformat=elf ;;
- esac
- fi
- version_type=freebsd-$objformat
- case $version_type in
- freebsd-elf*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- need_version=no
- need_lib_prefix=no
- ;;
- freebsd-*)
- library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
- need_version=yes
- ;;
- esac
- shlibpath_var=LD_LIBRARY_PATH
- case $host_os in
- freebsd2*)
- shlibpath_overrides_runpath=yes
- ;;
- freebsd3.[01]* | freebsdelf3.[01]*)
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
- freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
- *) # from 4.6 on, and DragonFly
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
- esac
- ;;
-
-gnu*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- hardcode_into_libs=yes
- ;;
-
-hpux9* | hpux10* | hpux11*)
- # Give a soname corresponding to the major version so that dld.sl refuses to
- # link against other versions.
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- case $host_cpu in
- ia64*)
- shrext_cmds='.so'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.so"
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- if test "X$HPUX_IA64_MODE" = X32; then
- sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
- else
- sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
- fi
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- hppa*64*)
- shrext_cmds='.sl'
- hardcode_into_libs=yes
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
- shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
- sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
- ;;
- *)
- shrext_cmds='.sl'
- dynamic_linker="$host_os dld.sl"
- shlibpath_var=SHLIB_PATH
- shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- ;;
- esac
- # HP-UX runs *really* slowly unless shared libraries are mode 555.
- postinstall_cmds='chmod 555 $lib'
- ;;
-
-interix[3-9]*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-irix5* | irix6* | nonstopux*)
- case $host_os in
- nonstopux*) version_type=nonstopux ;;
- *)
- if test "$lt_cv_prog_gnu_ld" = yes; then
- version_type=linux
- else
- version_type=irix
- fi ;;
- esac
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
- case $host_os in
- irix5* | nonstopux*)
- libsuff= shlibsuff=
- ;;
- *)
- case $LD in # libtool.m4 will add one of these switches to LD
- *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
- libsuff= shlibsuff= libmagic=32-bit;;
- *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
- libsuff=32 shlibsuff=N32 libmagic=N32;;
- *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
- libsuff=64 shlibsuff=64 libmagic=64-bit;;
- *) libsuff= shlibsuff= libmagic=never-match;;
- esac
- ;;
- esac
- shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
- sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
- hardcode_into_libs=yes
- ;;
-
-# No shared lib support for Linux oldld, aout, or coff.
-linux*oldld* | linux*aout* | linux*coff*)
- dynamic_linker=no
- ;;
-
-# This must be Linux ELF.
-linux* | k*bsd*-gnu)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- # Some binutils ld are patched to set DT_RUNPATH
- save_LDFLAGS=$LDFLAGS
- save_libdir=$libdir
- eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
- LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
- shlibpath_overrides_runpath=yes
-fi
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
- LDFLAGS=$save_LDFLAGS
- libdir=$save_libdir
-
- # This implies no fast_install, which is unacceptable.
- # Some rework will be needed to allow for fast_install
- # before this can be enabled.
- hardcode_into_libs=yes
-
- # Append ld.so.conf contents to the search path
- if test -f /etc/ld.so.conf; then
- lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
- sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
- fi
-
- # We used to test for /lib/ld.so.1 and disable shared libraries on
- # powerpc, because MkLinux only supported shared libraries with the
- # GNU dynamic linker. Since this was broken with cross compilers,
- # most powerpc-linux boxes support dynamic linking these days and
- # people can always --disable-shared, the test was removed, and we
- # assume the GNU/Linux dynamic linker is in use.
- dynamic_linker='GNU/Linux ld.so'
- ;;
-
-netbsd*)
- version_type=sunos
- need_lib_prefix=no
- need_version=no
- if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- dynamic_linker='NetBSD (a.out) ld.so'
- else
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- dynamic_linker='NetBSD ld.elf_so'
- fi
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- ;;
-
-newsos6)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- ;;
-
-*nto* | *qnx*)
- version_type=qnx
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- dynamic_linker='ldqnx.so'
- ;;
-
-openbsd*)
- version_type=sunos
- sys_lib_dlsearch_path_spec="/usr/lib"
- need_lib_prefix=no
- # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
- case $host_os in
- openbsd3.3 | openbsd3.3.*) need_version=yes ;;
- *) need_version=no ;;
- esac
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
- case $host_os in
- openbsd2.[89] | openbsd2.[89].*)
- shlibpath_overrides_runpath=no
- ;;
- *)
- shlibpath_overrides_runpath=yes
- ;;
- esac
- else
- shlibpath_overrides_runpath=yes
- fi
- ;;
-
-os2*)
- libname_spec='$name'
- shrext_cmds=".dll"
- need_lib_prefix=no
- library_names_spec='$libname${shared_ext} $libname.a'
- dynamic_linker='OS/2 ld.exe'
- shlibpath_var=LIBPATH
- ;;
-
-osf3* | osf4* | osf5*)
- version_type=osf
- need_lib_prefix=no
- need_version=no
- soname_spec='${libname}${release}${shared_ext}$major'
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
- sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
- ;;
-
-rdos*)
- dynamic_linker=no
- ;;
-
-solaris*)
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- # ldd complains unless libraries are executable
- postinstall_cmds='chmod +x $lib'
- ;;
-
-sunos4*)
- version_type=sunos
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
- finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- if test "$with_gnu_ld" = yes; then
- need_lib_prefix=no
- fi
- need_version=yes
- ;;
-
-sysv4 | sysv4.3*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- case $host_vendor in
- sni)
- shlibpath_overrides_runpath=no
- need_lib_prefix=no
- runpath_var=LD_RUN_PATH
- ;;
- siemens)
- need_lib_prefix=no
- ;;
- motorola)
- need_lib_prefix=no
- need_version=no
- shlibpath_overrides_runpath=no
- sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
- ;;
- esac
- ;;
-
-sysv4*MP*)
- if test -d /usr/nec ;then
- version_type=linux
- library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
- soname_spec='$libname${shared_ext}.$major'
- shlibpath_var=LD_LIBRARY_PATH
- fi
- ;;
-
-sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
- version_type=freebsd-elf
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=yes
- hardcode_into_libs=yes
- if test "$with_gnu_ld" = yes; then
- sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
- else
- sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
- case $host_os in
- sco3.2v5*)
- sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
- ;;
- esac
- fi
- sys_lib_dlsearch_path_spec='/usr/lib'
- ;;
-
-tpf*)
- # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
- version_type=linux
- need_lib_prefix=no
- need_version=no
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- shlibpath_var=LD_LIBRARY_PATH
- shlibpath_overrides_runpath=no
- hardcode_into_libs=yes
- ;;
-
-uts4*)
- version_type=linux
- library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
- soname_spec='${libname}${release}${shared_ext}$major'
- shlibpath_var=LD_LIBRARY_PATH
- ;;
-
-*)
- dynamic_linker=no
- ;;
-esac
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
-$as_echo "$dynamic_linker" >&6; }
-test "$dynamic_linker" = no && can_build_shared=no
-
-variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
-if test "$GCC" = yes; then
- variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
-fi
-
-if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
- sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
-fi
-if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
- sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
-$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
-hardcode_action=
-if test -n "$hardcode_libdir_flag_spec" ||
- test -n "$runpath_var" ||
- test "X$hardcode_automatic" = "Xyes" ; then
-
- # We can hardcode non-existent directories.
- if test "$hardcode_direct" != no &&
- # If the only mechanism to avoid hardcoding is shlibpath_var, we
- # have to relink, otherwise we might link with an installed library
- # when we should be linking with a yet-to-be-installed one
- ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
- test "$hardcode_minus_L" != no; then
- # Linking always hardcodes the temporary library directory.
- hardcode_action=relink
- else
- # We can link without hardcoding, and we can hardcode nonexisting dirs.
- hardcode_action=immediate
- fi
-else
- # We cannot hardcode anything, or else we can only hardcode existing
- # directories.
- hardcode_action=unsupported
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
-$as_echo "$hardcode_action" >&6; }
-
-if test "$hardcode_action" = relink ||
- test "$inherit_rpath" = yes; then
- # Fast installation is not supported
- enable_fast_install=no
-elif test "$shlibpath_overrides_runpath" = yes ||
- test "$enable_shared" = no; then
- # Fast installation is not necessary
- enable_fast_install=needless
-fi
-
-
-
-
-
-
- if test "x$enable_dlopen" != xyes; then
- enable_dlopen=unknown
- enable_dlopen_self=unknown
- enable_dlopen_self_static=unknown
-else
- lt_cv_dlopen=no
- lt_cv_dlopen_libs=
-
- case $host_os in
- beos*)
- lt_cv_dlopen="load_add_on"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
- ;;
-
- mingw* | pw32* | cegcc*)
- lt_cv_dlopen="LoadLibrary"
- lt_cv_dlopen_libs=
- ;;
-
- cygwin*)
- lt_cv_dlopen="dlopen"
- lt_cv_dlopen_libs=
- ;;
-
- darwin*)
- # if libdl is installed we need to link against it
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
-
- lt_cv_dlopen="dyld"
- lt_cv_dlopen_libs=
- lt_cv_dlopen_self=yes
-
-fi
-
- ;;
-
- *)
- ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
-if test "x$ac_cv_func_shl_load" = x""yes; then :
- lt_cv_dlopen="shl_load"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
-$as_echo_n "checking for shl_load in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 shl_load ();
-int
-main ()
-{
-return shl_load ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_shl_load=yes
-else
- ac_cv_lib_dld_shl_load=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
-$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
-if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
- lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
-else
- ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
-if test "x$ac_cv_func_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
-$as_echo_n "checking for dlopen in -ldl... " >&6; }
-if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldl $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dl_dlopen=yes
-else
- ac_cv_lib_dl_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
-$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
-if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
-$as_echo_n "checking for dlopen in -lsvld... " >&6; }
-if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lsvld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 dlopen ();
-int
-main ()
-{
-return dlopen ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_svld_dlopen=yes
-else
- ac_cv_lib_svld_dlopen=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
-$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
-if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
- lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
-$as_echo_n "checking for dld_link in -ldld... " >&6; }
-if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-ldld $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 dld_link ();
-int
-main ()
-{
-return dld_link ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_dld_dld_link=yes
-else
- ac_cv_lib_dld_dld_link=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
-$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
-if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
- lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
-
-fi
-
- ;;
- esac
-
- if test "x$lt_cv_dlopen" != xno; then
- enable_dlopen=yes
- else
- enable_dlopen=no
- fi
-
- case $lt_cv_dlopen in
- dlopen)
- save_CPPFLAGS="$CPPFLAGS"
- test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
-
- save_LDFLAGS="$LDFLAGS"
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
-
- save_LIBS="$LIBS"
- LIBS="$lt_cv_dlopen_libs $LIBS"
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
-$as_echo_n "checking whether a program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 10604 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
-$as_echo "$lt_cv_dlopen_self" >&6; }
-
- if test "x$lt_cv_dlopen_self" = xyes; then
- wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
-$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
-if test "${lt_cv_dlopen_self_static+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- lt_cv_dlopen_self_static=cross
-else
- lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
- lt_status=$lt_dlunknown
- cat > conftest.$ac_ext <<_LT_EOF
-#line 10700 "configure"
-#include "confdefs.h"
-
-#if HAVE_DLFCN_H
-#include <dlfcn.h>
-#endif
-
-#include <stdio.h>
-
-#ifdef RTLD_GLOBAL
-# define LT_DLGLOBAL RTLD_GLOBAL
-#else
-# ifdef DL_GLOBAL
-# define LT_DLGLOBAL DL_GLOBAL
-# else
-# define LT_DLGLOBAL 0
-# endif
-#endif
-
-/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
- find out it does not work in some platform. */
-#ifndef LT_DLLAZY_OR_NOW
-# ifdef RTLD_LAZY
-# define LT_DLLAZY_OR_NOW RTLD_LAZY
-# else
-# ifdef DL_LAZY
-# define LT_DLLAZY_OR_NOW DL_LAZY
-# else
-# ifdef RTLD_NOW
-# define LT_DLLAZY_OR_NOW RTLD_NOW
-# else
-# ifdef DL_NOW
-# define LT_DLLAZY_OR_NOW DL_NOW
-# else
-# define LT_DLLAZY_OR_NOW 0
-# endif
-# endif
-# endif
-# endif
-#endif
-
-void fnord() { int i=42;}
-int main ()
-{
- void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
- int status = $lt_dlunknown;
-
- if (self)
- {
- if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
- else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
- /* dlclose (self); */
- }
- else
- puts (dlerror ());
-
- return status;
-}
-_LT_EOF
- if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
- (eval $ac_link) 2>&5
- ac_status=$?
- $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
- test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
- (./conftest; exit; ) >&5 2>/dev/null
- lt_status=$?
- case x$lt_status in
- x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
- x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
- esac
- else :
- # compilation failed
- lt_cv_dlopen_self_static=no
- fi
-fi
-rm -fr conftest*
-
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
-$as_echo "$lt_cv_dlopen_self_static" >&6; }
- fi
-
- CPPFLAGS="$save_CPPFLAGS"
- LDFLAGS="$save_LDFLAGS"
- LIBS="$save_LIBS"
- ;;
- esac
-
- case $lt_cv_dlopen_self in
- yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
- *) enable_dlopen_self=unknown ;;
- esac
-
- case $lt_cv_dlopen_self_static in
- yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
- *) enable_dlopen_self_static=unknown ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-striplib=
-old_striplib=
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
-$as_echo_n "checking whether stripping libraries is possible... " >&6; }
-if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
- test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
- test -z "$striplib" && striplib="$STRIP --strip-unneeded"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
-# FIXME - insert some real tests, host_os isn't really good enough
- case $host_os in
- darwin*)
- if test -n "$STRIP" ; then
- striplib="$STRIP -x"
- old_striplib="$STRIP -S"
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
- else
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- fi
- ;;
- *)
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- ;;
- esac
-fi
-
-
-
-
-
-
-
-
-
-
-
-
- # Report which library types will actually be built
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
-$as_echo_n "checking if libtool supports shared libraries... " >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
-$as_echo "$can_build_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
-$as_echo_n "checking whether to build shared libraries... " >&6; }
- test "$can_build_shared" = "no" && enable_shared=no
-
- # On AIX, shared libraries and static libraries use the same namespace, and
- # are all built from PIC.
- case $host_os in
- aix3*)
- test "$enable_shared" = yes && enable_static=no
- if test -n "$RANLIB"; then
- archive_cmds="$archive_cmds~\$RANLIB \$lib"
- postinstall_cmds='$RANLIB $lib'
- fi
- ;;
-
- aix[4-9]*)
- if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
- test "$enable_shared" = yes && enable_static=no
- fi
- ;;
- esac
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
-$as_echo "$enable_shared" >&6; }
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
-$as_echo_n "checking whether to build static libraries... " >&6; }
- # Make sure either enable_shared or enable_static is yes.
- test "$enable_shared" = yes || enable_static=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
-$as_echo "$enable_static" >&6; }
-
-
-
-
-fi
-ac_ext=c
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
-ac_compiler_gnu=$ac_cv_c_compiler_gnu
-
-CC="$lt_save_CC"
-
-
-
-
-
-
-
-
-
-
-
-
-
- ac_config_commands="$ac_config_commands libtool"
-
-
-
-
-# Only expand once:
-
-
-
-# Checks for header files.
-{ $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-
-int
-main ()
-{
-
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_header_stdc=yes
-else
- 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
-if ac_fn_c_try_run "$LINENO"; then :
-
-else
- ac_cv_header_stdc=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
-$as_echo "$ac_cv_header_stdc" >&6; }
-if test $ac_cv_header_stdc = yes; then
-
-$as_echo "#define STDC_HEADERS 1" >>confdefs.h
-
-fi
-
-for ac_header in malloc.h stdlib.h string.h strings.h
-do :
- as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
-ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
-eval as_val=\$$as_ac_Header
- 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
-
-
-# Checks for typedefs, structures, and compiler characteristics.
-{ $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_c_const=yes
-else
- ac_cv_c_const=no
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
-$as_echo "$ac_cv_c_const" >&6; }
-if test $ac_cv_c_const = no; then
-
-$as_echo "#define const /**/" >>confdefs.h
-
-fi
-
-ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-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:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
-if ac_fn_c_try_compile "$LINENO"; then :
- ac_cv_struct_tm=time.h
-else
- ac_cv_struct_tm=sys/time.h
-fi
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
-$as_echo "$ac_cv_struct_tm" >&6; }
-if test $ac_cv_struct_tm = sys/time.h; then
-
-$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
-
-fi
-
-
-# Checks for library functions.
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
-$as_echo_n "checking for working strtod... " >&6; }
-if test "${ac_cv_func_strtod+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- if test "$cross_compiling" = yes; then :
- ac_cv_func_strtod=no
-else
- cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* end confdefs.h. */
-
-$ac_includes_default
-#ifndef strtod
-double strtod ();
-#endif
-int
-main()
-{
- {
- /* Some versions of Linux strtod mis-parse strings with leading '+'. */
- char *string = " +69";
- char *term;
- double value;
- value = strtod (string, &term);
- if (value != 69 || term != (string + 4))
- return 1;
- }
-
- {
- /* Under Solaris 2.4, strtod returns the wrong value for the
- terminating character under some conditions. */
- char *string = "NaN";
- char *term;
- strtod (string, &term);
- if (term != string && *(term - 1) == 0)
- return 1;
- }
- return 0;
-}
-
-_ACEOF
-if ac_fn_c_try_run "$LINENO"; then :
- ac_cv_func_strtod=yes
-else
- ac_cv_func_strtod=no
-fi
-rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
- conftest.$ac_objext conftest.beam conftest.$ac_ext
-fi
-
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
-$as_echo "$ac_cv_func_strtod" >&6; }
-if test $ac_cv_func_strtod = no; then
- case " $LIBOBJS " in
- *" strtod.$ac_objext "* ) ;;
- *) LIBOBJS="$LIBOBJS strtod.$ac_objext"
- ;;
-esac
-
-ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
-if test "x$ac_cv_func_pow" = x""yes; then :
-
-fi
-
-if test $ac_cv_func_pow = no; then
- { $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_m_pow=yes
-else
- ac_cv_lib_m_pow=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
-$as_echo "$ac_cv_lib_m_pow" >&6; }
-if test "x$ac_cv_lib_m_pow" = x""yes; then :
- POW_LIB=-lm
-else
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
-$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
-fi
-
-fi
-
-fi
-
-for ac_func in memset
-do :
- ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset"
-if test "x$ac_cv_func_memset" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_MEMSET 1
-_ACEOF
-
-else
- as_fn_error "memset not found in libc" "$LINENO" 5
-fi
-done
-
-for ac_func in pow
-do :
- ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
-if test "x$ac_cv_func_pow" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_POW 1
-_ACEOF
-
-else
- { $as_echo "$as_me:${as_lineno-$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 confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_m_pow=yes
-else
- ac_cv_lib_m_pow=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_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"
-
-else
- as_fn_error "cannot find pow" "$LINENO" 5
-fi
-
-fi
-done
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlibVersion in -lz" >&5
-$as_echo_n "checking for zlibVersion in -lz... " >&6; }
-if test "${ac_cv_lib_z_zlibVersion+set}" = set; then :
- $as_echo_n "(cached) " >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lz $LIBS"
-cat confdefs.h - <<_ACEOF >conftest.$ac_ext
-/* 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 zlibVersion ();
-int
-main ()
-{
-return zlibVersion ();
- ;
- return 0;
-}
-_ACEOF
-if ac_fn_c_try_link "$LINENO"; then :
- ac_cv_lib_z_zlibVersion=yes
-else
- ac_cv_lib_z_zlibVersion=no
-fi
-rm -f core conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_zlibVersion" >&5
-$as_echo "$ac_cv_lib_z_zlibVersion" >&6; }
-if test "x$ac_cv_lib_z_zlibVersion" = x""yes; then :
- cat >>confdefs.h <<_ACEOF
-#define HAVE_LIBZ 1
-_ACEOF
-
- LIBS="-lz $LIBS"
-
-else
- as_fn_error "zlib not installed" "$LINENO" 5
-fi
-
-
-LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
-LIBPNG_DEFINES=$LIBPNG_DEFINES
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libraries can be versioned" >&5
-$as_echo_n "checking if libraries can be versioned... " >&6; }
-GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
-if test "$GLD"; then
- have_ld_version_script=yes
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
-$as_echo "yes" >&6; }
-else
- have_ld_version_script=no
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** You have not enabled versioned symbols." >&5
-$as_echo "$as_me: WARNING: *** You have not enabled versioned symbols." >&2;}
-fi
- if test "$have_ld_version_script" = "yes"; then
- HAVE_LD_VERSION_SCRIPT_TRUE=
- HAVE_LD_VERSION_SCRIPT_FALSE='#'
-else
- HAVE_LD_VERSION_SCRIPT_TRUE='#'
- HAVE_LD_VERSION_SCRIPT_FALSE=
-fi
-
-
-if test "$have_ld_version_script" = "yes"; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: checking for symbol prefix" >&5
-$as_echo_n "checking for symbol prefix... " >&6; }
- SYMBOL_PREFIX=`echo "PREFIX=__USER_LABEL_PREFIX__" \
- | ${CPP-${CC-gcc} -E} - 2>&1 \
- | ${EGREP-grep} "^PREFIX=" \
- | ${SED-sed} "s:^PREFIX=::"`
-
- { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMBOL_PREFIX" >&5
-$as_echo "$SYMBOL_PREFIX" >&6; }
-fi
-
-# Substitutions for .in files
-
-
-
-
-
-# Additional arguments (and substitutions)
-# Allow the pkg-config directory to be set
-
-# Check whether --with-pkgconfigdir was given.
-if test "${with_pkgconfigdir+set}" = set; then :
- withval=$with_pkgconfigdir; pkgconfigdir=${withval}
-else
- pkgconfigdir='${libdir}/pkgconfig'
-fi
-
-
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: pkgconfig directory is ${pkgconfigdir}" >&5
-$as_echo "$as_me: pkgconfig directory is ${pkgconfigdir}" >&6;}
-
-# Make the *-config binary config scripts optional
-
-# Check whether --with-binconfigs was given.
-if test "${with_binconfigs+set}" = set; then :
- withval=$with_binconfigs; if test "${withval}" = no; then
- binconfigs=
- { $as_echo "$as_me:${as_lineno-$LINENO}: libpng-config scripts will not be built" >&5
-$as_echo "$as_me: libpng-config scripts will not be built" >&6;}
- else
- binconfigs='${binconfigs}'
- fi
-else
- binconfigs='${binconfigs}'
-fi
-
-
-
-# Config files, substituting as above
-ac_config_files="$ac_config_files Makefile libpng.pc:libpng.pc.in"
-
-ac_config_files="$ac_config_files libpng-config:libpng-config.in"
-
-
-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:${as_lineno-$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= ;; #(
- *) { eval $ac_var=; 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:${as_lineno-$LINENO}: updating cache $cache_file" >&5
-$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
- else
- { $as_echo "$as_me:${as_lineno-$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.
- as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
- as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
-done
-LIBOBJS=$ac_libobjs
-
-LTLIBOBJS=$ac_ltlibobjs
-
-
- if test -n "$EXEEXT"; then
- am__EXEEXT_TRUE=
- am__EXEEXT_FALSE='#'
-else
- am__EXEEXT_TRUE='#'
- am__EXEEXT_FALSE=
-fi
-
-if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
- as_fn_error "conditional \"MAINTAINER_MODE\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
- as_fn_error "conditional \"AMDEP\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
- as_fn_error "conditional \"am__fastdepCC\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-if test -z "${HAVE_LD_VERSION_SCRIPT_TRUE}" && test -z "${HAVE_LD_VERSION_SCRIPT_FALSE}"; then
- as_fn_error "conditional \"HAVE_LD_VERSION_SCRIPT\" was never defined.
-Usually this means the macro was only invoked conditionally." "$LINENO" 5
-fi
-
-: ${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:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
-$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
-as_write_fail=0
-cat >$CONFIG_STATUS <<_ASEOF || as_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}
-export SHELL
-_ASEOF
-cat >>$CONFIG_STATUS <<\_ASEOF || as_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
-
-
-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
-# Prefer a ksh shell builtin over an external printf program on Solaris,
-# but without wasting forks for bash or zsh.
-if test -z "$BASH_VERSION$ZSH_VERSION" \
- && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
- as_echo='print -r --'
- as_echo_n='print -rn --'
-elif (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
-
-
-# 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
-fi
-
-# Unset variables that we do not need and which cause bugs (e.g. in
-# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
-# suppresses any "Segmentation fault" message there. '((' could
-# trigger a bug in pdksh 5.2.14.
-for as_var in BASH_ENV ENV MAIL MAILPATH
-do eval test x\${$as_var+set} = xset \
- && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
-done
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-LC_ALL=C
-export LC_ALL
-LANGUAGE=C
-export LANGUAGE
-
-# CDPATH.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
-# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
-# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
-as_fn_error ()
-{
- as_status=$?; test $as_status -eq 0 && as_status=1
- if test "$3"; then
- as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
- fi
- $as_echo "$as_me: error: $1" >&2
- as_fn_exit $as_status
-} # as_fn_error
-
-
-# as_fn_set_status STATUS
-# -----------------------
-# Set $? to STATUS, without forking.
-as_fn_set_status ()
-{
- return $1
-} # as_fn_set_status
-
-# as_fn_exit STATUS
-# -----------------
-# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
-as_fn_exit ()
-{
- set +e
- as_fn_set_status $1
- exit $1
-} # as_fn_exit
-
-# as_fn_unset VAR
-# ---------------
-# Portably unset VAR.
-as_fn_unset ()
-{
- { eval $1=; unset $1;}
-}
-as_unset=as_fn_unset
-# as_fn_append VAR VALUE
-# ----------------------
-# Append the text in VALUE to the end of the definition contained in VAR. Take
-# advantage of any shell optimizations that allow amortized linear growth over
-# repeated appends, instead of the typical quadratic growth present in naive
-# implementations.
-if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
- eval 'as_fn_append ()
- {
- eval $1+=\$2
- }'
-else
- as_fn_append ()
- {
- eval $1=\$$1\$2
- }
-fi # as_fn_append
-
-# as_fn_arith ARG...
-# ------------------
-# Perform arithmetic evaluation on the ARGs, and store the result in the
-# global $as_val. Take advantage of shells that can avoid forks. The arguments
-# must be portable across $(()) and expr.
-if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
- eval 'as_fn_arith ()
- {
- as_val=$(( $* ))
- }'
-else
- as_fn_arith ()
- {
- as_val=`expr "$@" || test $? -eq 1`
- }
-fi # as_fn_arith
-
-
-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
-
-if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
- as_dirname=dirname
-else
- as_dirname=false
-fi
-
-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'`
-
-# 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
-
-ECHO_C= ECHO_N= ECHO_T=
-case `echo -n x` in #(((((
--n*)
- case `echo 'xy\c'` in
- *c*) ECHO_T=' ';; # ECHO_T is single tab character.
- xy) ECHO_C='\c';;
- *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
- ECHO_T=' ';;
- esac;;
-*)
- ECHO_N='-n';;
-esac
-
-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
-
-
-# as_fn_mkdir_p
-# -------------
-# Create "$as_dir" as a directory, including parents if necessary.
-as_fn_mkdir_p ()
-{
-
- case $as_dir in #(
- -*) as_dir=./$as_dir;;
- esac
- test -d "$as_dir" || eval $as_mkdir_p || {
- 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_fn_error "cannot create directory $as_dir"
-
-
-} # as_fn_mkdir_p
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p='mkdir -p "$as_dir"'
-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
-## ----------------------------------- ##
-## Main body of $CONFIG_STATUS script. ##
-## ----------------------------------- ##
-_ASEOF
-test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
-
-cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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 libpng $as_me 1.4.0, which was
-generated by GNU Autoconf 2.65. 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 and other configuration actions
-from templates according to the current configuration. Unless the files
-and actions are specified as TAGs, all are instantiated by default.
-
-Usage: $0 [OPTION]... [TAG]...
-
- -h, --help print this help, then exit
- -V, --version print version number and configuration settings, then exit
- --config print configuration, 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 <png-mng-implement@lists.sourceforge.net>."
-
-_ACEOF
-cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
-ac_cs_version="\\
-libpng config.status 1.4.0
-configured by $0, generated by GNU Autoconf 2.65,
- with options \\"\$ac_cs_config\\"
-
-Copyright (C) 2009 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'
-AWK='$AWK'
-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 ;;
- --config | --confi | --conf | --con | --co | --c )
- $as_echo "$ac_cs_config"; 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
- as_fn_append 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
- as_fn_append CONFIG_HEADERS " '$ac_optarg'"
- ac_need_defaults=false;;
- --he | --h)
- # Conflict between --help and --header
- as_fn_error "ambiguous option: \`$1'
-Try \`$0 --help' for more information.";;
- --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_fn_error "unrecognized option: \`$1'
-Try \`$0 --help' for more information." ;;
-
- *) as_fn_append 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
-#
-AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
-
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-sed_quote_subst='$sed_quote_subst'
-double_quote_subst='$double_quote_subst'
-delay_variable_subst='$delay_variable_subst'
-SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
-Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
-GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
-EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
-FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
-LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
-AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
-DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
-macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
-macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
-enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
-pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
-enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
-host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
-host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
-host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
-build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
-build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
-build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
-NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
-LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
-max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
-ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
-exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
-lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
-lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
-lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
-reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
-reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
-file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
-AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
-AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
-RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
-old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
-CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
-compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
-GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
-SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
-ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
-MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
-lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
-lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
-need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
-DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
-NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
-LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
-OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
-libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
-shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
-enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
-export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
-allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
-inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
-link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
-fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
-always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
-export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
-prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
-variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
-need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
-need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
-version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
-runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
-shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
-libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
-soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
-postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
-finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
-hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
-enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
-old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
-striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
-
-LTCC='$LTCC'
-LTCFLAGS='$LTCFLAGS'
-compiler='$compiler_DEFAULT'
-
-# Quote evaled strings.
-for var in SED \
-GREP \
-EGREP \
-FGREP \
-LD \
-NM \
-LN_S \
-lt_SP2NL \
-lt_NL2SP \
-reload_flag \
-deplibs_check_method \
-file_magic_cmd \
-AR \
-AR_FLAGS \
-STRIP \
-RANLIB \
-CC \
-CFLAGS \
-compiler \
-lt_cv_sys_global_symbol_pipe \
-lt_cv_sys_global_symbol_to_cdecl \
-lt_cv_sys_global_symbol_to_c_name_address \
-lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
-SHELL \
-ECHO \
-lt_prog_compiler_no_builtin_flag \
-lt_prog_compiler_wl \
-lt_prog_compiler_pic \
-lt_prog_compiler_static \
-lt_cv_prog_compiler_c_o \
-need_locks \
-DSYMUTIL \
-NMEDIT \
-LIPO \
-OTOOL \
-OTOOL64 \
-shrext_cmds \
-export_dynamic_flag_spec \
-whole_archive_flag_spec \
-compiler_needs_object \
-with_gnu_ld \
-allow_undefined_flag \
-no_undefined_flag \
-hardcode_libdir_flag_spec \
-hardcode_libdir_flag_spec_ld \
-hardcode_libdir_separator \
-fix_srcfile_path \
-exclude_expsyms \
-include_expsyms \
-file_list_spec \
-variables_saved_for_relink \
-libname_spec \
-library_names_spec \
-soname_spec \
-finish_eval \
-old_striplib \
-striplib; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Double-quote double-evaled strings.
-for var in reload_cmds \
-old_postinstall_cmds \
-old_postuninstall_cmds \
-old_archive_cmds \
-extract_expsyms_cmds \
-old_archive_from_new_cmds \
-old_archive_from_expsyms_cmds \
-archive_cmds \
-archive_expsym_cmds \
-module_cmds \
-module_expsym_cmds \
-export_symbols_cmds \
-prelink_cmds \
-postinstall_cmds \
-postuninstall_cmds \
-finish_cmds \
-sys_lib_search_path_spec \
-sys_lib_dlsearch_path_spec; do
- case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
- *[\\\\\\\`\\"\\\$]*)
- eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
- ;;
- *)
- eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
- ;;
- esac
-done
-
-# Fix-up fallback echo if it was mangled by the above quoting rules.
-case \$lt_ECHO in
-*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
- ;;
-esac
-
-ac_aux_dir='$ac_aux_dir'
-xsi_shell='$xsi_shell'
-lt_shell_append='$lt_shell_append'
-
-# See if we are running on zsh, and set the options which allow our
-# commands through without removal of \ escapes INIT.
-if test -n "\${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
-fi
-
-
- PACKAGE='$PACKAGE'
- VERSION='$VERSION'
- TIMESTAMP='$TIMESTAMP'
- RM='$RM'
- ofile='$ofile'
-
-
-
-
-_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
- "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
- "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
- "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
- "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
- "libpng.pc") CONFIG_FILES="$CONFIG_FILES libpng.pc:libpng.pc.in" ;;
- "libpng-config") CONFIG_FILES="$CONFIG_FILES libpng-config:libpng-config.in" ;;
-
- *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
- 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 'as_fn_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_fn_error "cannot create a temporary directory in ." "$LINENO" 5
-
-# 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=`echo X | tr X '\015'`
-# On cygwin, bash can eat \r inside `` if the user requested igncr.
-# But we know of no other shell where ac_cr would be empty at this
-# point, so we can use a bashism as a fallback.
-if test "x$ac_cr" = x; then
- eval ac_cr=\$\'\\r\'
-fi
-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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-
- 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_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
- 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_fn_error "could not setup config files machinery" "$LINENO" 5
-_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_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5
- 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_fn_error "could not setup config headers machinery" "$LINENO" 5
-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_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
- :[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_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
- esac
- case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
- as_fn_append 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:${as_lineno-$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_fn_error "could not create $ac_file" "$LINENO" 5 ;;
- 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"; as_fn_mkdir_p
- 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:${as_lineno-$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_fn_error "could not create $ac_file" "$LINENO" 5
-
-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:${as_lineno-$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_fn_error "could not create $ac_file" "$LINENO" 5
- ;;
- :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_fn_error "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
- { $as_echo "$as_me:${as_lineno-$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_fn_error "could not create $ac_file" "$LINENO" 5
- fi
- else
- $as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
- || as_fn_error "could not create -" "$LINENO" 5
- fi
-# Compute "$ac_file"'s index in $config_headers.
-_am_arg="$ac_file"
-_am_stamp_count=1
-for _am_header in $config_headers :; do
- case $_am_header in
- $_am_arg | $_am_arg:* )
- break ;;
- * )
- _am_stamp_count=`expr $_am_stamp_count + 1` ;;
- esac
-done
-echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
-$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$_am_arg" : 'X\(//\)[^/]' \| \
- X"$_am_arg" : 'X\(//\)$' \| \
- X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$_am_arg" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`/stamp-h$_am_stamp_count
- ;;
-
- :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
-$as_echo "$as_me: executing $ac_file commands" >&6;}
- ;;
- esac
-
-
- case $ac_file$ac_mode in
- "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
- # Autoconf 2.62 quotes --file arguments for eval, but not when files
- # are listed without --file. Let's play safe and only enable the eval
- # if we detect the quoting.
- case $CONFIG_FILES in
- *\'*) eval set x "$CONFIG_FILES" ;;
- *) set x $CONFIG_FILES ;;
- esac
- shift
- for mf
- do
- # Strip MF so we end up with the name of the file.
- mf=`echo "$mf" | sed -e 's/:.*$//'`
- # Check whether this is an Automake generated Makefile or not.
- # We used to match only the files named `Makefile.in', but
- # some people rename them; so instead we look at the file content.
- # Grep'ing the first line is not enough: some people post-process
- # each Makefile.in and add a new line on top of each file to say so.
- # Grep'ing the whole file is not good either: AIX grep has a line
- # limit of 2048, but all sed's we know have understand at least 4000.
- if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
- dirpart=`$as_dirname -- "$mf" ||
-$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$mf" : 'X\(//\)[^/]' \| \
- X"$mf" : 'X\(//\)$' \| \
- X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$mf" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- else
- continue
- fi
- # Extract the definition of DEPDIR, am__include, and am__quote
- # from the Makefile without running `make'.
- DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
- test -z "$DEPDIR" && continue
- am__include=`sed -n 's/^am__include = //p' < "$mf"`
- test -z "am__include" && continue
- am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
- # When using ansi2knr, U may be empty or an underscore; expand it
- U=`sed -n 's/^U = //p' < "$mf"`
- # Find all dependency output files, they are included files with
- # $(DEPDIR) in their names. We invoke sed twice because it is the
- # simplest approach to changing $(DEPDIR) to its actual value in the
- # expansion.
- for file in `sed -n "
- s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
- sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
- # Make sure the directory exists.
- test -f "$dirpart/$file" && continue
- fdir=`$as_dirname -- "$file" ||
-$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$file" : 'X\(//\)[^/]' \| \
- X"$file" : 'X\(//\)$' \| \
- X"$file" : 'X\(/\)' \| . 2>/dev/null ||
-$as_echo X"$file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'`
- as_dir=$dirpart/$fdir; as_fn_mkdir_p
- # echo "creating $dirpart/$file"
- echo '# dummy' > "$dirpart/$file"
- done
- done
-}
- ;;
- "libtool":C)
-
- # See if we are running on zsh, and set the options which allow our
- # commands through without removal of \ escapes.
- if test -n "${ZSH_VERSION+set}" ; then
- setopt NO_GLOB_SUBST
- fi
-
- cfgfile="${ofile}T"
- trap "$RM \"$cfgfile\"; exit 1" 1 2 15
- $RM "$cfgfile"
-
- cat <<_LT_EOF >> "$cfgfile"
-#! $SHELL
-
-# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
-# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
-# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-# NOTE: Changes made to this file will be lost: look at ltmain.sh.
-#
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
-# 2006, 2007, 2008 Free Software Foundation, Inc.
-# Written by Gordon Matzigkeit, 1996
-#
-# This file is part of GNU Libtool.
-#
-# GNU Libtool 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.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
-# obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-
-# The names of the tagged configurations supported by this script.
-available_tags=""
-
-# ### BEGIN LIBTOOL CONFIG
-
-# A sed program that does not truncate output.
-SED=$lt_SED
-
-# Sed that helps us avoid accidentally triggering echo(1) options like -n.
-Xsed="\$SED -e 1s/^X//"
-
-# A grep program that handles long lines.
-GREP=$lt_GREP
-
-# An ERE matcher.
-EGREP=$lt_EGREP
-
-# A literal string matcher.
-FGREP=$lt_FGREP
-
-# Assembler program.
-AS=$AS
-
-# DLL creation program.
-DLLTOOL=$DLLTOOL
-
-# Object dumper program.
-OBJDUMP=$OBJDUMP
-
-# Which release of libtool.m4 was used?
-macro_version=$macro_version
-macro_revision=$macro_revision
-
-# Whether or not to build shared libraries.
-build_libtool_libs=$enable_shared
-
-# Whether or not to build static libraries.
-build_old_libs=$enable_static
-
-# What type of objects to build.
-pic_mode=$pic_mode
-
-# Whether or not to optimize for fast installation.
-fast_install=$enable_fast_install
-
-# The host system.
-host_alias=$host_alias
-host=$host
-host_os=$host_os
-
-# The build system.
-build_alias=$build_alias
-build=$build
-build_os=$build_os
-
-# A BSD- or MS-compatible name lister.
-NM=$lt_NM
-
-# Whether we need soft or hard links.
-LN_S=$lt_LN_S
-
-# What is the maximum length of a command?
-max_cmd_len=$max_cmd_len
-
-# Object file suffix (normally "o").
-objext=$ac_objext
-
-# Executable file suffix (normally "").
-exeext=$exeext
-
-# whether the shell understands "unset".
-lt_unset=$lt_unset
-
-# turn spaces into newlines.
-SP2NL=$lt_lt_SP2NL
-
-# turn newlines into spaces.
-NL2SP=$lt_lt_NL2SP
-
-# How to create reloadable object files.
-reload_flag=$lt_reload_flag
-reload_cmds=$lt_reload_cmds
-
-# Method to check whether dependent libraries are shared objects.
-deplibs_check_method=$lt_deplibs_check_method
-
-# Command to use when deplibs_check_method == "file_magic".
-file_magic_cmd=$lt_file_magic_cmd
-
-# The archiver.
-AR=$lt_AR
-AR_FLAGS=$lt_AR_FLAGS
-
-# A symbol stripping program.
-STRIP=$lt_STRIP
-
-# Commands used to install an old-style archive.
-RANLIB=$lt_RANLIB
-old_postinstall_cmds=$lt_old_postinstall_cmds
-old_postuninstall_cmds=$lt_old_postuninstall_cmds
-
-# A C compiler.
-LTCC=$lt_CC
-
-# LTCC compiler flags.
-LTCFLAGS=$lt_CFLAGS
-
-# Take the output of nm and produce a listing of raw symbols and C names.
-global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
-
-# Transform the output of nm in a proper C declaration.
-global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
-
-# Transform the output of nm in a C name address pair.
-global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
-
-# Transform the output of nm in a C name address pair when lib prefix is needed.
-global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
-
-# The name of the directory that contains temporary libtool files.
-objdir=$objdir
-
-# Shell to use when invoking shell scripts.
-SHELL=$lt_SHELL
-
-# An echo program that does not interpret backslashes.
-ECHO=$lt_ECHO
-
-# Used to examine libraries when file_magic_cmd begins with "file".
-MAGIC_CMD=$MAGIC_CMD
-
-# Must we lock files when doing compilation?
-need_locks=$lt_need_locks
-
-# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
-DSYMUTIL=$lt_DSYMUTIL
-
-# Tool to change global to local symbols on Mac OS X.
-NMEDIT=$lt_NMEDIT
-
-# Tool to manipulate fat objects and archives on Mac OS X.
-LIPO=$lt_LIPO
-
-# ldd/readelf like tool for Mach-O binaries on Mac OS X.
-OTOOL=$lt_OTOOL
-
-# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
-OTOOL64=$lt_OTOOL64
-
-# Old archive suffix (normally "a").
-libext=$libext
-
-# Shared library suffix (normally ".so").
-shrext_cmds=$lt_shrext_cmds
-
-# The commands to extract the exported symbol list from a shared archive.
-extract_expsyms_cmds=$lt_extract_expsyms_cmds
-
-# Variables whose values should be saved in libtool wrapper scripts and
-# restored at link time.
-variables_saved_for_relink=$lt_variables_saved_for_relink
-
-# Do we need the "lib" prefix for modules?
-need_lib_prefix=$need_lib_prefix
-
-# Do we need a version for libraries?
-need_version=$need_version
-
-# Library versioning type.
-version_type=$version_type
-
-# Shared library runtime path variable.
-runpath_var=$runpath_var
-
-# Shared library path variable.
-shlibpath_var=$shlibpath_var
-
-# Is shlibpath searched before the hard-coded library search path?
-shlibpath_overrides_runpath=$shlibpath_overrides_runpath
-
-# Format of library name prefix.
-libname_spec=$lt_libname_spec
-
-# List of archive names. First name is the real one, the rest are links.
-# The last name is the one that the linker finds with -lNAME
-library_names_spec=$lt_library_names_spec
-
-# The coded name of the library, if different from the real name.
-soname_spec=$lt_soname_spec
-
-# Command to use after installation of a shared archive.
-postinstall_cmds=$lt_postinstall_cmds
-
-# Command to use after uninstallation of a shared archive.
-postuninstall_cmds=$lt_postuninstall_cmds
-
-# Commands used to finish a libtool library installation in a directory.
-finish_cmds=$lt_finish_cmds
-
-# As "finish_cmds", except a single script fragment to be evaled but
-# not shown.
-finish_eval=$lt_finish_eval
-
-# Whether we should hardcode library paths into libraries.
-hardcode_into_libs=$hardcode_into_libs
-
-# Compile-time system search path for libraries.
-sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
-
-# Run-time system search path for libraries.
-sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
-
-# Whether dlopen is supported.
-dlopen_support=$enable_dlopen
-
-# Whether dlopen of programs is supported.
-dlopen_self=$enable_dlopen_self
-
-# Whether dlopen of statically linked programs is supported.
-dlopen_self_static=$enable_dlopen_self_static
-
-# Commands to strip libraries.
-old_striplib=$lt_old_striplib
-striplib=$lt_striplib
-
-
-# The linker used to build libraries.
-LD=$lt_LD
-
-# Commands used to build an old-style archive.
-old_archive_cmds=$lt_old_archive_cmds
-
-# A language specific compiler.
-CC=$lt_compiler
-
-# Is the compiler the GNU compiler?
-with_gcc=$GCC
-
-# Compiler flag to turn off builtin functions.
-no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
-
-# How to pass a linker flag through the compiler.
-wl=$lt_lt_prog_compiler_wl
-
-# Additional compiler flags for building library objects.
-pic_flag=$lt_lt_prog_compiler_pic
-
-# Compiler flag to prevent dynamic linking.
-link_static_flag=$lt_lt_prog_compiler_static
-
-# Does compiler simultaneously support -c and -o options?
-compiler_c_o=$lt_lt_cv_prog_compiler_c_o
-
-# Whether or not to add -lc for building shared libraries.
-build_libtool_need_lc=$archive_cmds_need_lc
-
-# Whether or not to disallow shared libs when runtime libs are static.
-allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
-
-# Compiler flag to allow reflexive dlopens.
-export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
-
-# Compiler flag to generate shared objects directly from archives.
-whole_archive_flag_spec=$lt_whole_archive_flag_spec
-
-# Whether the compiler copes with passing no objects directly.
-compiler_needs_object=$lt_compiler_needs_object
-
-# Create an old-style archive from a shared archive.
-old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
-
-# Create a temporary old-style archive to link instead of a shared archive.
-old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
-
-# Commands used to build a shared archive.
-archive_cmds=$lt_archive_cmds
-archive_expsym_cmds=$lt_archive_expsym_cmds
-
-# Commands used to build a loadable module if different from building
-# a shared archive.
-module_cmds=$lt_module_cmds
-module_expsym_cmds=$lt_module_expsym_cmds
-
-# Whether we are building with GNU ld or not.
-with_gnu_ld=$lt_with_gnu_ld
-
-# Flag that allows shared libraries with undefined symbols to be built.
-allow_undefined_flag=$lt_allow_undefined_flag
-
-# Flag that enforces no undefined symbols.
-no_undefined_flag=$lt_no_undefined_flag
-
-# Flag to hardcode \$libdir into a binary during linking.
-# This must work even if \$libdir does not exist
-hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
-
-# If ld is used when linking, flag to hardcode \$libdir into a binary
-# during linking. This must work even if \$libdir does not exist.
-hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
-
-# Whether we need a single "-rpath" flag with a separated argument.
-hardcode_libdir_separator=$lt_hardcode_libdir_separator
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary.
-hardcode_direct=$hardcode_direct
-
-# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
-# DIR into the resulting binary and the resulting library dependency is
-# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
-# library is relocated.
-hardcode_direct_absolute=$hardcode_direct_absolute
-
-# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
-# into the resulting binary.
-hardcode_minus_L=$hardcode_minus_L
-
-# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
-# into the resulting binary.
-hardcode_shlibpath_var=$hardcode_shlibpath_var
-
-# Set to "yes" if building a shared library automatically hardcodes DIR
-# into the library and all subsequent libraries and executables linked
-# against it.
-hardcode_automatic=$hardcode_automatic
-
-# Set to yes if linker adds runtime paths of dependent libraries
-# to runtime path list.
-inherit_rpath=$inherit_rpath
-
-# Whether libtool must link a program against all its dependency libraries.
-link_all_deplibs=$link_all_deplibs
-
-# Fix the shell variable \$srcfile for the compiler.
-fix_srcfile_path=$lt_fix_srcfile_path
-
-# Set to "yes" if exported symbols are required.
-always_export_symbols=$always_export_symbols
-
-# The commands to list exported symbols.
-export_symbols_cmds=$lt_export_symbols_cmds
-
-# Symbols that should not be listed in the preloaded symbols.
-exclude_expsyms=$lt_exclude_expsyms
-
-# Symbols that must always be exported.
-include_expsyms=$lt_include_expsyms
-
-# Commands necessary for linking programs (against libraries) with templates.
-prelink_cmds=$lt_prelink_cmds
-
-# Specify filename containing input files.
-file_list_spec=$lt_file_list_spec
-
-# How to hardcode a shared library path into an executable.
-hardcode_action=$hardcode_action
-
-# ### END LIBTOOL CONFIG
-
-_LT_EOF
-
- case $host_os in
- aix3*)
- cat <<\_LT_EOF >> "$cfgfile"
-# AIX sometimes has problems with the GCC collect2 program. For some
-# reason, if we set the COLLECT_NAMES environment variable, the problems
-# vanish in a puff of smoke.
-if test "X${COLLECT_NAMES+set}" != Xset; then
- COLLECT_NAMES=
- export COLLECT_NAMES
-fi
-_LT_EOF
- ;;
- esac
-
-
-ltmain="$ac_aux_dir/ltmain.sh"
-
-
- # We use sed instead of cat because bash on DJGPP gets confused if
- # if finds mixed CR/LF and LF-only lines. Since sed operates in
- # text mode, it properly converts lines to CR/LF. This bash problem
- # is reportedly fixed, but why not run on old versions too?
- sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- case $xsi_shell in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result="${1##*/}"
-}
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- case ${1} in
- */*) func_dirname_result="${1%/*}${2}" ;;
- * ) func_dirname_result="${3}" ;;
- esac
- func_basename_result="${1##*/}"
-}
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-func_stripname ()
-{
- # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
- # positional parameters, so assign one to ordinary parameter first.
- func_stripname_result=${3}
- func_stripname_result=${func_stripname_result#"${1}"}
- func_stripname_result=${func_stripname_result%"${2}"}
-}
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=${1%%=*}
- func_opt_split_arg=${1#*=}
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- case ${1} in
- *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
- *) func_lo2o_result=${1} ;;
- esac
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=${1%.*}.lo
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=$(( $* ))
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=${#1}
-}
-
-_LT_EOF
- ;;
- *) # Bourne compatible functions.
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_dirname file append nondir_replacement
-# Compute the dirname of FILE. If nonempty, add APPEND to the result,
-# otherwise set result to NONDIR_REPLACEMENT.
-func_dirname ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
-}
-
-# func_basename file
-func_basename ()
-{
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-
-# func_stripname prefix suffix name
-# strip PREFIX and SUFFIX off of NAME.
-# PREFIX and SUFFIX must not contain globbing or regex special
-# characters, hashes, percent signs, but SUFFIX may contain a leading
-# dot (in which case that matches only a dot).
-# func_strip_suffix prefix name
-func_stripname ()
-{
- case ${2} in
- .*) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
- *) func_stripname_result=`$ECHO "X${3}" \
- | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
- esac
-}
-
-# sed scripts:
-my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
-my_sed_long_arg='1s/^-[^=]*=//'
-
-# func_opt_split
-func_opt_split ()
-{
- func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
- func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
-}
-
-# func_lo2o object
-func_lo2o ()
-{
- func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
-}
-
-# func_xform libobj-or-source
-func_xform ()
-{
- func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
-}
-
-# func_arith arithmetic-term...
-func_arith ()
-{
- func_arith_result=`expr "$@"`
-}
-
-# func_len string
-# STRING may not start with a hyphen.
-func_len ()
-{
- func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
-}
-
-_LT_EOF
-esac
-
-case $lt_shell_append in
- yes)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1+=\$2"
-}
-_LT_EOF
- ;;
- *)
- cat << \_LT_EOF >> "$cfgfile"
-
-# func_append var value
-# Append VALUE to the end of shell variable VAR.
-func_append ()
-{
- eval "$1=\$$1\$2"
-}
-
-_LT_EOF
- ;;
- esac
-
-
- sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
- || (rm -f "$cfgfile"; exit 1)
-
- mv -f "$cfgfile" "$ofile" ||
- (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
- chmod +x "$ofile"
-
- ;;
- "libpng-config":F) chmod +x libpng-config ;;
-
- esac
-done # for ac_tag
-
-
-as_fn_exit 0
-_ACEOF
-ac_clean_files=$ac_clean_files_save
-
-test $ac_write_fail = 0 ||
- as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
-
-
-# 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 || as_fn_exit $?
-fi
-if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
- { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
-$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
-fi
-
diff --git a/src/3rdparty/libpng/configure.ac b/src/3rdparty/libpng/configure.ac
index dcdde1e..ff277a4 100644
--- a/src/3rdparty/libpng/configure.ac
+++ b/src/3rdparty/libpng/configure.ac
@@ -18,15 +18,15 @@ AC_PREREQ(2.59)
dnl Version number stuff here:
-AC_INIT([libpng], [1.4.0], [png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng], [1.5.1], [png-mng-implement@lists.sourceforge.net])
AM_INIT_AUTOMAKE
dnl stop configure from automagically running automake
AM_MAINTAINER_MODE
-PNGLIB_VERSION=1.4.0
+PNGLIB_VERSION=1.5.1
PNGLIB_MAJOR=1
-PNGLIB_MINOR=4
-PNGLIB_RELEASE=0
+PNGLIB_MINOR=5
+PNGLIB_RELEASE=1
dnl End of version number stuff
@@ -34,15 +34,38 @@ AC_CONFIG_SRCDIR([pngget.c])
AM_CONFIG_HEADER(config.h)
# Checks for programs.
+AC_LANG([C])
AC_PROG_CC
AC_PROG_LD
AC_PROG_CPP
AC_CHECK_TOOL(SED, sed, :)
-AC_LIBTOOL_WIN32_DLL
+AC_CHECK_TOOL(AWK, awk, :)
AC_PROG_INSTALL
AC_PROG_LN_S
AC_PROG_MAKE_SET
-AC_PROG_LIBTOOL
+LT_INIT([win32-dll])
+
+# On Solaris 10 and 12 CPP gets set to cc -E, however this still
+# does some input parsing. We need strict ANSI-C style tokenization,
+# check this:
+AC_REQUIRE_CPP
+AC_MSG_CHECKING([for a C preprocessor that does not parse its input])
+AC_TRY_CPP([1.5.0 16BIT],
+ [DFNCPP="$CPP"],
+ [DFNCPP=""
+ sav_CPP="$CPP"
+ for CPP in "${CC-cc} -E" "${CC-cc} -E -traditional-cpp" "/lib/cpp" "cpp"; do
+ AC_TRY_CPP([1.5.0 16BIT],
+ [DFNCPP="$CPP"]
+ [break],,)
+ done
+ CPP="$sav_CPP"])
+if test -n "$DFNCPP"; then
+ AC_MSG_RESULT([$DFNCPP])
+ AC_SUBST(DFNCPP)
+else
+ AC_MSG_FAILURE([not found], 1)
+fi
# Checks for header files.
AC_HEADER_STDC
@@ -57,13 +80,30 @@ AC_STRUCT_TM
AC_FUNC_STRTOD
AC_CHECK_FUNCS([memset], , AC_ERROR([memset not found in libc]))
AC_CHECK_FUNCS([pow], , AC_CHECK_LIB(m, pow, , AC_ERROR([cannot find pow])) )
-AC_CHECK_LIB(z, zlibVersion, , AC_ERROR([zlib not installed]))
+AC_ARG_WITH(zlib-prefix,
+ AC_HELP_STRING([--with-zlib-prefix],
+ [prefix that may have been used in installed zlib]),
+ [ZPREFIX=${withval}],
+ [ZPREFIX='z_'])
+AC_CHECK_LIB(z, zlibVersion, ,
+ AC_CHECK_LIB(z, ${ZPREFIX}zlibVersion, ,
+ AC_ERROR([zlib not installed])))
+
LIBPNG_DEFINES=-DPNG_CONFIGURE_LIBPNG
LIBPNG_DEFINES=$LIBPNG_DEFINES
AC_SUBST(LIBPNG_DEFINES)
AC_MSG_CHECKING([if libraries can be versioned])
+# Special case for PE/COFF platforms: ld reports
+# support for version-script, but doesn't actually
+# DO anything with it.
+case $host in
+*cygwin* | *mingw32* | *interix* )
+ have_ld_version_script=no
+ AC_MSG_RESULT(no)
+;;
+* )
GLD=`$LD --help < /dev/null 2>/dev/null | grep version-script`
if test "$GLD"; then
have_ld_version_script=yes
@@ -73,6 +113,9 @@ else
AC_MSG_RESULT(no)
AC_MSG_WARN(*** You have not enabled versioned symbols.)
fi
+;;
+esac
+
AM_CONDITIONAL(HAVE_LD_VERSION_SCRIPT, test "$have_ld_version_script" = "yes")
if test "$have_ld_version_script" = "yes"; then
diff --git a/src/3rdparty/libpng/depcomp b/src/3rdparty/libpng/depcomp
deleted file mode 100755
index df8eea7..0000000
--- a/src/3rdparty/libpng/depcomp
+++ /dev/null
@@ -1,630 +0,0 @@
-#! /bin/sh
-# depcomp - compile a program generating dependencies as side-effects
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
-
-# 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, 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 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 Alexandre Oliva <oliva@dcc.unicamp.br>.
-
-case $1 in
- '')
- echo "$0: No command. Try \`$0 --help' for more information." 1>&2
- exit 1;
- ;;
- -h | --h*)
- cat <<\EOF
-Usage: depcomp [--help] [--version] PROGRAM [ARGS]
-
-Run PROGRAMS ARGS to compile a file, generating dependencies
-as side-effects.
-
-Environment variables:
- depmode Dependency tracking mode.
- source Source file read by `PROGRAMS ARGS'.
- object Object file output by `PROGRAMS ARGS'.
- DEPDIR directory where to store dependencies.
- depfile Dependency file to output.
- tmpdepfile Temporary file to use when outputing dependencies.
- libtool Whether libtool is used (yes/no).
-
-Report bugs to <bug-automake@gnu.org>.
-EOF
- exit $?
- ;;
- -v | --v*)
- echo "depcomp $scriptversion"
- exit $?
- ;;
-esac
-
-if test -z "$depmode" || test -z "$source" || test -z "$object"; then
- echo "depcomp: Variables source, object and depmode must be set" 1>&2
- exit 1
-fi
-
-# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
-depfile=${depfile-`echo "$object" |
- sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
-tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
-
-rm -f "$tmpdepfile"
-
-# Some modes work just like other modes, but use different flags. We
-# parameterize here, but still list the modes in the big case below,
-# to make depend.m4 easier to write. Note that we *cannot* use a case
-# here, because this file can only contain one case statement.
-if test "$depmode" = hp; then
- # HP compiler uses -M and no extra arg.
- gccflag=-M
- depmode=gcc
-fi
-
-if test "$depmode" = dashXmstdout; then
- # This is just like dashmstdout with a different argument.
- dashmflag=-xM
- depmode=dashmstdout
-fi
-
-cygpath_u="cygpath -u -f -"
-if test "$depmode" = msvcmsys; then
- # This is just like msvisualcpp but w/o cygpath translation.
- # Just convert the backslash-escaped backslashes to single forward
- # slashes to satisfy depend.m4
- cygpath_u="sed s,\\\\\\\\,/,g"
- depmode=msvisualcpp
-fi
-
-case "$depmode" in
-gcc3)
-## gcc 3 implements dependency tracking that does exactly what
-## we want. Yay! Note: for some reason libtool 1.4 doesn't like
-## it if -MD -MP comes after the -MF stuff. Hmm.
-## Unfortunately, FreeBSD c89 acceptance of flags depends upon
-## the command line argument order; so add the flags where they
-## appear in depend2.am. Note that the slowdown incurred here
-## affects only configure: in makefiles, %FASTDEP% shortcuts this.
- for arg
- do
- case $arg in
- -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
- *) set fnord "$@" "$arg" ;;
- esac
- shift # fnord
- shift # $arg
- done
- "$@"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- mv "$tmpdepfile" "$depfile"
- ;;
-
-gcc)
-## There are various ways to get dependency output from gcc. Here's
-## why we pick this rather obscure method:
-## - Don't want to use -MD because we'd like the dependencies to end
-## up in a subdir. Having to rename by hand is ugly.
-## (We might end up doing this anyway to support other compilers.)
-## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
-## - Using -M directly means running the compiler twice (even worse
-## than renaming).
- if test -z "$gccflag"; then
- gccflag=-MD,
- fi
- "$@" -Wp,"$gccflag$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
-## The second -e expression handles DOS-style file names with drive letters.
- sed -e 's/^[^:]*: / /' \
- -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
-## The problem is that when a header file which appears in a .P file
-## is deleted, the dependency causes make to die (because there is
-## typically no way to rebuild the header). We avoid this by adding
-## dummy dependencies for each header file. Too bad gcc doesn't do
-## this for us directly.
- tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'. On the theory
-## that the space means something, we add a space to the output as
-## well.
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-sgi)
- if test "$libtool" = yes; then
- "$@" "-Wp,-MDupdate,$tmpdepfile"
- else
- "$@" -MDupdate "$tmpdepfile"
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
-
- if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
- echo "$object : \\" > "$depfile"
-
- # Clip off the initial element (the dependent). Don't try to be
- # clever and replace this with sed code, as IRIX sed won't handle
- # lines with more than a fixed number of characters (4096 in
- # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
- # the IRIX cc adds comments like `#:fec' to the end of the
- # dependency line.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
- tr '
-' ' ' >> "$depfile"
- echo >> "$depfile"
-
- # The second pass generates a dummy entry for each header file.
- tr ' ' '
-' < "$tmpdepfile" \
- | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
- >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-aix)
- # The C for AIX Compiler uses -M and outputs the dependencies
- # in a .u file. In older versions, this file always lives in the
- # current directory. Also, the AIX compiler puts `$object:' at the
- # start of each line; $object doesn't have directory information.
- # Version 6 uses the directory in both cases.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
- if test "$libtool" = yes; then
- tmpdepfile1=$dir$base.u
- tmpdepfile2=$base.u
- tmpdepfile3=$dir.libs/$base.u
- "$@" -Wc,-M
- else
- tmpdepfile1=$dir$base.u
- tmpdepfile2=$dir$base.u
- tmpdepfile3=$dir$base.u
- "$@" -M
- fi
- stat=$?
-
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- # Each line is of the form `foo.o: dependent.h'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- # The sourcefile does not contain any dependencies, so just
- # store a dummy comment line, to avoid errors with the Makefile
- # "include basename.Plo" scheme.
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-icc)
- # Intel's C compiler understands `-MD -MF file'. However on
- # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
- # ICC 7.0 will fill foo.d with something like
- # foo.o: sub/foo.c
- # foo.o: sub/foo.h
- # which is wrong. We want:
- # sub/foo.o: sub/foo.c
- # sub/foo.o: sub/foo.h
- # sub/foo.c:
- # sub/foo.h:
- # ICC 7.1 will output
- # foo.o: sub/foo.c sub/foo.h
- # and will wrap long lines using \ :
- # foo.o: sub/foo.c ... \
- # sub/foo.h ... \
- # ...
-
- "$@" -MD -MF "$tmpdepfile"
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile"
- exit $stat
- fi
- rm -f "$depfile"
- # Each line is of the form `foo.o: dependent.h',
- # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
- # Do two passes, one to just change these to
- # `$object: dependent.h' and one to simply `dependent.h:'.
- sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
- # Some versions of the HPUX 10.20 sed can't process this invocation
- # correctly. Breaking it into two sed invocations is a workaround.
- sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
- sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-hp2)
- # The "hp" stanza above does not work with aCC (C++) and HP's ia64
- # compilers, which have integrated preprocessors. The correct option
- # to use with these is +Maked; it writes dependencies to a file named
- # 'foo.d', which lands next to the object file, wherever that
- # happens to be.
- # Much of this is similar to the tru64 case; see comments there.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
- if test "$libtool" = yes; then
- tmpdepfile1=$dir$base.d
- tmpdepfile2=$dir.libs/$base.d
- "$@" -Wc,+Maked
- else
- tmpdepfile1=$dir$base.d
- tmpdepfile2=$dir$base.d
- "$@" +Maked
- fi
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
- # Add `dependent.h:' lines.
- sed -ne '2,${
- s/^ *//
- s/ \\*$//
- s/$/:/
- p
- }' "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile" "$tmpdepfile2"
- ;;
-
-tru64)
- # The Tru64 compiler uses -MD to generate dependencies as a side
- # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
- # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
- # dependencies in `foo.d' instead, so we check for that too.
- # Subdirectories are respected.
- dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
- test "x$dir" = "x$object" && dir=
- base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
-
- if test "$libtool" = yes; then
- # With Tru64 cc, shared objects can also be used to make a
- # static library. This mechanism is used in libtool 1.4 series to
- # handle both shared and static libraries in a single compilation.
- # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d.
- #
- # With libtool 1.5 this exception was removed, and libtool now
- # generates 2 separate objects for the 2 libraries. These two
- # compilations output dependencies in $dir.libs/$base.o.d and
- # in $dir$base.o.d. We have to check for both files, because
- # one of the two compilations can be disabled. We should prefer
- # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
- # automatically cleaned when .libs/ is deleted, while ignoring
- # the former would cause a distcleancheck panic.
- tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4
- tmpdepfile2=$dir$base.o.d # libtool 1.5
- tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5
- tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504
- "$@" -Wc,-MD
- else
- tmpdepfile1=$dir$base.o.d
- tmpdepfile2=$dir$base.d
- tmpdepfile3=$dir$base.d
- tmpdepfile4=$dir$base.d
- "$@" -MD
- fi
-
- stat=$?
- if test $stat -eq 0; then :
- else
- rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- exit $stat
- fi
-
- for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4"
- do
- test -f "$tmpdepfile" && break
- done
- if test -f "$tmpdepfile"; then
- sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
- # That's a tab and a space in the [].
- sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
- else
- echo "#dummy" > "$depfile"
- fi
- rm -f "$tmpdepfile"
- ;;
-
-#nosideeffect)
- # This comment above is used by automake to tell side-effect
- # dependency tracking mechanisms from slower ones.
-
-dashmstdout)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout, regardless of -o.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- test -z "$dashmflag" && dashmflag=-M
- # Require at least two characters before searching for `:'
- # in the target name. This is to cope with DOS-style filenames:
- # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
- "$@" $dashmflag |
- sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- tr ' ' '
-' < "$tmpdepfile" | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-dashXmstdout)
- # This case only exists to satisfy depend.m4. It is never actually
- # run, as this mode is specially recognized in the preamble.
- exit 1
- ;;
-
-makedepend)
- "$@" || exit $?
- # Remove any Libtool call
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
- # X makedepend
- shift
- cleared=no eat=no
- for arg
- do
- case $cleared in
- no)
- set ""; shift
- cleared=yes ;;
- esac
- if test $eat = yes; then
- eat=no
- continue
- fi
- case "$arg" in
- -D*|-I*)
- set fnord "$@" "$arg"; shift ;;
- # Strip any option that makedepend may not understand. Remove
- # the object too, otherwise makedepend will parse it as a source file.
- -arch)
- eat=yes ;;
- -*|$object)
- ;;
- *)
- set fnord "$@" "$arg"; shift ;;
- esac
- done
- obj_suffix=`echo "$object" | sed 's/^.*\././'`
- touch "$tmpdepfile"
- ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
- rm -f "$depfile"
- cat < "$tmpdepfile" > "$depfile"
- sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
-## Some versions of the HPUX 10.20 sed can't process this invocation
-## correctly. Breaking it into two sed invocations is a workaround.
- sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile" "$tmpdepfile".bak
- ;;
-
-cpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- # Remove `-o $object'.
- IFS=" "
- for arg
- do
- case $arg in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift # fnord
- shift # $arg
- ;;
- esac
- done
-
- "$@" -E |
- sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
- -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
- sed '$ s: \\$::' > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- cat < "$tmpdepfile" >> "$depfile"
- sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvisualcpp)
- # Important note: in order to support this mode, a compiler *must*
- # always write the preprocessed file to stdout.
- "$@" || exit $?
-
- # Remove the call to Libtool.
- if test "$libtool" = yes; then
- while test "X$1" != 'X--mode=compile'; do
- shift
- done
- shift
- fi
-
- IFS=" "
- for arg
- do
- case "$arg" in
- -o)
- shift
- ;;
- $object)
- shift
- ;;
- "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
- set fnord "$@"
- shift
- shift
- ;;
- *)
- set fnord "$@" "$arg"
- shift
- shift
- ;;
- esac
- done
- "$@" -E 2>/dev/null |
- sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
- rm -f "$depfile"
- echo "$object : \\" > "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile"
- echo " " >> "$depfile"
- sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
- rm -f "$tmpdepfile"
- ;;
-
-msvcmsys)
- # This case exists only to let depend.m4 do its work. It works by
- # looking at the text of this script. This case will never be run,
- # since it is checked for above.
- exit 1
- ;;
-
-none)
- exec "$@"
- ;;
-
-*)
- echo "Unknown depmode $depmode" 1>&2
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/src/3rdparty/libpng/example.c b/src/3rdparty/libpng/example.c
index 8c5d87b..cd3682f 100644
--- a/src/3rdparty/libpng/example.c
+++ b/src/3rdparty/libpng/example.c
@@ -2,15 +2,15 @@
#if 0 /* in case someone actually tries to compile this */
/* example.c - an example of using libpng
- * Last changed in libpng 1.4.0 [January 3, 2010]
+ * Last changed in libpng 1.5.0 [January 6, 2011]
* This file has been placed in the public domain by the authors.
- * Maintained 1998-2010 Glenn Randers-Pehrson
+ * Maintained 1998-2011 Glenn Randers-Pehrson
* Maintained 1996, 1997 Andreas Dilger)
* Written 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*/
/* This is an example of how to use libpng to read and write PNG files.
- * The file libpng.txt is much more verbose then this. If you have not
+ * The file libpng-manual.txt is much more verbose then this. If you have not
* read it, do so first. This was designed to be a starting point of an
* implementation. This is not officially part of libpng, is hereby placed
* in the public domain, and therefore does not require a copyright notice.
@@ -31,7 +31,7 @@
*/
#ifndef png_jmpbuf
-# define png_jmpbuf(png_ptr) ((png_ptr)->jmpbuf)
+# define png_jmpbuf(png_ptr) ((png_ptr)->png_jmpbuf)
#endif
/* Check to see if a file is a PNG file using png_sig_cmp(). png_sig_cmp()
@@ -160,7 +160,7 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
* If you have enough memory to read in the entire image at once,
* and you need to specify only transforms that can be controlled
* with one of the PNG_TRANSFORM_* bits (this presently excludes
- * dithering, filling, setting background, and doing gamma
+ * quantizing, filling, setting background, and doing gamma
* adjustment), then you can read the entire image (including
* pixels) into the info structure with this call:
*/
@@ -271,7 +271,8 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
png_set_gamma(png_ptr, screen_gamma, 0.45455);
}
- /* Dither RGB files down to 8 bit palette or reduce palettes
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+ /* Quantize RGB files down to 8 bit palette or reduce palettes
* to the number of colors available on your screen.
*/
if (color_type & PNG_COLOR_MASK_COLOR)
@@ -282,10 +283,10 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
/* This reduces the image to the application supplied palette */
if (/* We have our own palette */)
{
- /* An array of colors to which the image should be dithered */
+ /* An array of colors to which the image should be quantized */
png_color std_color_cube[MAX_SCREEN_COLORS];
- png_set_dither(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
+ png_set_quantize(png_ptr, std_color_cube, MAX_SCREEN_COLORS,
MAX_SCREEN_COLORS, NULL, 0);
}
/* This reduces the image to the palette supplied in the file */
@@ -295,10 +296,11 @@ void read_png(FILE *fp, unsigned int sig_read) /* File is already open */
png_get_hIST(png_ptr, info_ptr, &histogram);
- png_set_dither(png_ptr, palette, num_palette,
+ png_set_quantize(png_ptr, palette, num_palette,
max_screen_colors, histogram, 0);
}
}
+#endif /* PNG_READ_QUANTIZE_SUPPORTED */
/* Invert monochrome files to have 0 as white and 1 as black */
png_set_invert_mono(png_ptr);
@@ -509,20 +511,17 @@ row_callback(png_structp png_ptr, png_bytep new_row,
* shown below:
*/
- /* Check if row_num is in bounds. */
- if ((row_num >= 0) && (row_num < height))
- {
- /* Get pointer to corresponding row in our
- * PNG read buffer.
- */
- png_bytep old_row = ((png_bytep *)our_data)[row_num];
-
- /* If both rows are allocated then copy the new row
- * data to the corresponding row data.
- */
- if ((old_row != NULL) && (new_row != NULL))
- png_progressive_combine_row(png_ptr, old_row, new_row);
- }
+ /* Get pointer to corresponding row in our
+ * PNG read buffer.
+ */
+ png_bytep old_row = ((png_bytep *)our_data)[row_num];
+
+ /* If both rows are allocated then copy the new row
+ * data to the corresponding row data.
+ */
+ if ((old_row != NULL) && (new_row != NULL))
+ png_progressive_combine_row(png_ptr, old_row, new_row);
+
/*
* The rows and passes are called in order, so you don't really
* need the row_num and pass, but I'm supplying them because it
@@ -656,14 +655,18 @@ void write_png(char *file_name /* , ... other image information ... */)
/* Optional significant bit (sBIT) chunk */
png_color_8 sig_bit;
+
/* If we are dealing with a grayscale image then */
sig_bit.gray = true_bit_depth;
+
/* Otherwise, if we are dealing with a color image then */
sig_bit.red = true_red_bit_depth;
sig_bit.green = true_green_bit_depth;
sig_bit.blue = true_blue_bit_depth;
+
/* If the image has an alpha channel then */
sig_bit.alpha = true_alpha_bit_depth;
+
png_set_sBIT(png_ptr, info_ptr, &sig_bit);
@@ -676,17 +679,21 @@ void write_png(char *file_name /* , ... other image information ... */)
text_ptr[0].key = "Title";
text_ptr[0].text = "Mona Lisa";
text_ptr[0].compression = PNG_TEXT_COMPRESSION_NONE;
+ text_ptr[0].itxt_length = 0;
+ text_ptr[0].lang = NULL;
+ text_ptr[0].lang_key = NULL;
text_ptr[1].key = "Author";
text_ptr[1].text = "Leonardo DaVinci";
text_ptr[1].compression = PNG_TEXT_COMPRESSION_NONE;
+ text_ptr[1].itxt_length = 0;
+ text_ptr[1].lang = NULL;
+ text_ptr[1].lang_key = NULL;
text_ptr[2].key = "Description";
text_ptr[2].text = "<long text>";
text_ptr[2].compression = PNG_TEXT_COMPRESSION_zTXt;
-#ifdef PNG_iTXt_SUPPORTED
- text_ptr[0].lang = NULL;
- text_ptr[1].lang = NULL;
+ text_ptr[2].itxt_length = 0;
text_ptr[2].lang = NULL;
-#endif
+ text_ptr[2].lang_key = NULL;
png_set_text(png_ptr, info_ptr, text_ptr, 3);
/* Other optional chunks like cHRM, bKGD, tRNS, tIME, oFFs, pHYs */
@@ -751,6 +758,7 @@ void write_png(char *file_name /* , ... other image information ... */)
/* Turn on interlace handling if you are not using png_write_image() */
if (interlacing)
number_passes = png_set_interlace_handling(png_ptr);
+
else
number_passes = 1;
diff --git a/src/3rdparty/libpng/install-sh b/src/3rdparty/libpng/install-sh
deleted file mode 100755
index 6781b98..0000000
--- a/src/3rdparty/libpng/install-sh
+++ /dev/null
@@ -1,520 +0,0 @@
-#!/bin/sh
-# install - install a program, script, or datafile
-
-scriptversion=2009-04-28.21; # UTC
-
-# This originates from X11R5 (mit/util/scripts/install.sh), which was
-# later released in X11R6 (xc/config/util/install.sh) with the
-# following copyright and license.
-#
-# Copyright (C) 1994 X Consortium
-#
-# Permission is hereby granted, free of charge, to any person obtaining a copy
-# of this software and associated documentation files (the "Software"), to
-# deal in the Software without restriction, including without limitation the
-# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
-# sell copies of the Software, and to permit persons to whom the Software is
-# furnished to do so, subject to the following conditions:
-#
-# The above copyright notice and this permission notice shall be included in
-# all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
-# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
-# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-#
-# Except as contained in this notice, the name of the X Consortium shall not
-# be used in advertising or otherwise to promote the sale, use or other deal-
-# ings in this Software without prior written authorization from the X Consor-
-# tium.
-#
-#
-# FSF changes to this file are in the public domain.
-#
-# 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.
-
-nl='
-'
-IFS=" "" $nl"
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit=${DOITPROG-}
-if test -z "$doit"; then
- doit_exec=exec
-else
- doit_exec=$doit
-fi
-
-# Put in absolute file names if you don't have them in your path;
-# or use environment vars.
-
-chgrpprog=${CHGRPPROG-chgrp}
-chmodprog=${CHMODPROG-chmod}
-chownprog=${CHOWNPROG-chown}
-cmpprog=${CMPPROG-cmp}
-cpprog=${CPPROG-cp}
-mkdirprog=${MKDIRPROG-mkdir}
-mvprog=${MVPROG-mv}
-rmprog=${RMPROG-rm}
-stripprog=${STRIPPROG-strip}
-
-posix_glob='?'
-initialize_posix_glob='
- test "$posix_glob" != "?" || {
- if (set -f) 2>/dev/null; then
- posix_glob=
- else
- posix_glob=:
- fi
- }
-'
-
-posix_mkdir=
-
-# Desired mode of installed file.
-mode=0755
-
-chgrpcmd=
-chmodcmd=$chmodprog
-chowncmd=
-mvcmd=$mvprog
-rmcmd="$rmprog -f"
-stripcmd=
-
-src=
-dst=
-dir_arg=
-dst_arg=
-
-copy_on_change=false
-no_target_directory=
-
-usage="\
-Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
- or: $0 [OPTION]... SRCFILES... DIRECTORY
- or: $0 [OPTION]... -t DIRECTORY SRCFILES...
- or: $0 [OPTION]... -d DIRECTORIES...
-
-In the 1st form, copy SRCFILE to DSTFILE.
-In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
-In the 4th, create DIRECTORIES.
-
-Options:
- --help display this help and exit.
- --version display version info and exit.
-
- -c (ignored)
- -C install only if different (preserve the last data modification time)
- -d create directories instead of installing files.
- -g GROUP $chgrpprog installed files to GROUP.
- -m MODE $chmodprog installed files to MODE.
- -o USER $chownprog installed files to USER.
- -s $stripprog installed files.
- -t DIRECTORY install into DIRECTORY.
- -T report an error if DSTFILE is a directory.
-
-Environment variables override the default commands:
- CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
- RMPROG STRIPPROG
-"
-
-while test $# -ne 0; do
- case $1 in
- -c) ;;
-
- -C) copy_on_change=true;;
-
- -d) dir_arg=true;;
-
- -g) chgrpcmd="$chgrpprog $2"
- shift;;
-
- --help) echo "$usage"; exit $?;;
-
- -m) mode=$2
- case $mode in
- *' '* | *' '* | *'
-'* | *'*'* | *'?'* | *'['*)
- echo "$0: invalid mode: $mode" >&2
- exit 1;;
- esac
- shift;;
-
- -o) chowncmd="$chownprog $2"
- shift;;
-
- -s) stripcmd=$stripprog;;
-
- -t) dst_arg=$2
- shift;;
-
- -T) no_target_directory=true;;
-
- --version) echo "$0 $scriptversion"; exit $?;;
-
- --) shift
- break;;
-
- -*) echo "$0: invalid option: $1" >&2
- exit 1;;
-
- *) break;;
- esac
- shift
-done
-
-if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
- # When -d is used, all remaining arguments are directories to create.
- # When -t is used, the destination is already specified.
- # Otherwise, the last argument is the destination. Remove it from $@.
- for arg
- do
- if test -n "$dst_arg"; then
- # $@ is not empty: it contains at least $arg.
- set fnord "$@" "$dst_arg"
- shift # fnord
- fi
- shift # arg
- dst_arg=$arg
- done
-fi
-
-if test $# -eq 0; then
- if test -z "$dir_arg"; then
- echo "$0: no input file specified." >&2
- exit 1
- fi
- # It's OK to call `install-sh -d' without argument.
- # This can happen when creating conditional directories.
- exit 0
-fi
-
-if test -z "$dir_arg"; then
- trap '(exit $?); exit' 1 2 13 15
-
- # Set umask so as not to create temps with too-generous modes.
- # However, 'strip' requires both read and write access to temps.
- case $mode in
- # Optimize common cases.
- *644) cp_umask=133;;
- *755) cp_umask=22;;
-
- *[0-7])
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw='% 200'
- fi
- cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
- *)
- if test -z "$stripcmd"; then
- u_plus_rw=
- else
- u_plus_rw=,u+rw
- fi
- cp_umask=$mode$u_plus_rw;;
- esac
-fi
-
-for src
-do
- # Protect names starting with `-'.
- case $src in
- -*) src=./$src;;
- esac
-
- if test -n "$dir_arg"; then
- dst=$src
- dstdir=$dst
- test -d "$dstdir"
- dstdir_status=$?
- else
-
- # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
- # might cause directories to be created, which would be especially bad
- # if $src (and thus $dsttmp) contains '*'.
- if test ! -f "$src" && test ! -d "$src"; then
- echo "$0: $src does not exist." >&2
- exit 1
- fi
-
- if test -z "$dst_arg"; then
- echo "$0: no destination specified." >&2
- exit 1
- fi
-
- dst=$dst_arg
- # Protect names starting with `-'.
- case $dst in
- -*) dst=./$dst;;
- esac
-
- # If destination is a directory, append the input filename; won't work
- # if double slashes aren't ignored.
- if test -d "$dst"; then
- if test -n "$no_target_directory"; then
- echo "$0: $dst_arg: Is a directory" >&2
- exit 1
- fi
- dstdir=$dst
- dst=$dstdir/`basename "$src"`
- dstdir_status=0
- else
- # Prefer dirname, but fall back on a substitute if dirname fails.
- dstdir=`
- (dirname "$dst") 2>/dev/null ||
- expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$dst" : 'X\(//\)[^/]' \| \
- X"$dst" : 'X\(//\)$' \| \
- X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
- echo X"$dst" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
- s//\1/
- q
- }
- /^X\(\/\/\)[^/].*/{
- s//\1/
- q
- }
- /^X\(\/\/\)$/{
- s//\1/
- q
- }
- /^X\(\/\).*/{
- s//\1/
- q
- }
- s/.*/./; q'
- `
-
- test -d "$dstdir"
- dstdir_status=$?
- fi
- fi
-
- obsolete_mkdir_used=false
-
- if test $dstdir_status != 0; then
- case $posix_mkdir in
- '')
- # Create intermediate dirs using mode 755 as modified by the umask.
- # This is like FreeBSD 'install' as of 1997-10-28.
- umask=`umask`
- case $stripcmd.$umask in
- # Optimize common cases.
- *[2367][2367]) mkdir_umask=$umask;;
- .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
- *[0-7])
- mkdir_umask=`expr $umask + 22 \
- - $umask % 100 % 40 + $umask % 20 \
- - $umask % 10 % 4 + $umask % 2
- `;;
- *) mkdir_umask=$umask,go-w;;
- esac
-
- # With -d, create the new directory with the user-specified mode.
- # Otherwise, rely on $mkdir_umask.
- if test -n "$dir_arg"; then
- mkdir_mode=-m$mode
- else
- mkdir_mode=
- fi
-
- posix_mkdir=false
- case $umask in
- *[123567][0-7][0-7])
- # POSIX mkdir -p sets u+wx bits regardless of umask, which
- # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
- ;;
- *)
- tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
- trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
-
- if (umask $mkdir_umask &&
- exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
- then
- if test -z "$dir_arg" || {
- # Check for POSIX incompatibilities with -m.
- # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
- # other-writeable bit of parent directory when it shouldn't.
- # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
- ls_ld_tmpdir=`ls -ld "$tmpdir"`
- case $ls_ld_tmpdir in
- d????-?r-*) different_mode=700;;
- d????-?--*) different_mode=755;;
- *) false;;
- esac &&
- $mkdirprog -m$different_mode -p -- "$tmpdir" && {
- ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
- test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
- }
- }
- then posix_mkdir=:
- fi
- rmdir "$tmpdir/d" "$tmpdir"
- else
- # Remove any dirs left behind by ancient mkdir implementations.
- rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
- fi
- trap '' 0;;
- esac;;
- esac
-
- if
- $posix_mkdir && (
- umask $mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
- )
- then :
- else
-
- # The umask is ridiculous, or mkdir does not conform to POSIX,
- # or it failed possibly due to a race condition. Create the
- # directory the slow way, step by step, checking for races as we go.
-
- case $dstdir in
- /*) prefix='/';;
- -*) prefix='./';;
- *) prefix='';;
- esac
-
- eval "$initialize_posix_glob"
-
- oIFS=$IFS
- IFS=/
- $posix_glob set -f
- set fnord $dstdir
- shift
- $posix_glob set +f
- IFS=$oIFS
-
- prefixes=
-
- for d
- do
- test -z "$d" && continue
-
- prefix=$prefix$d
- if test -d "$prefix"; then
- prefixes=
- else
- if $posix_mkdir; then
- (umask=$mkdir_umask &&
- $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
- # Don't fail if two instances are running concurrently.
- test -d "$prefix" || exit 1
- else
- case $prefix in
- *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
- *) qprefix=$prefix;;
- esac
- prefixes="$prefixes '$qprefix'"
- fi
- fi
- prefix=$prefix/
- done
-
- if test -n "$prefixes"; then
- # Don't fail if two instances are running concurrently.
- (umask $mkdir_umask &&
- eval "\$doit_exec \$mkdirprog $prefixes") ||
- test -d "$dstdir" || exit 1
- obsolete_mkdir_used=true
- fi
- fi
- fi
-
- if test -n "$dir_arg"; then
- { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
- { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
- test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
- else
-
- # Make a couple of temp file names in the proper directory.
- dsttmp=$dstdir/_inst.$$_
- rmtmp=$dstdir/_rm.$$_
-
- # Trap to clean up those temp files at exit.
- trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
-
- # Copy the file name to the temp name.
- (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
-
- # 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 $cpprog $src $dsttmp" command.
- #
- { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
- { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
- { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
- { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
-
- # If -C, don't bother to copy if it wouldn't change the file.
- if $copy_on_change &&
- old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` &&
- new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` &&
-
- eval "$initialize_posix_glob" &&
- $posix_glob set -f &&
- set X $old && old=:$2:$4:$5:$6 &&
- set X $new && new=:$2:$4:$5:$6 &&
- $posix_glob set +f &&
-
- test "$old" = "$new" &&
- $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
- then
- rm -f "$dsttmp"
- else
- # Rename the file to the real destination.
- $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
-
- # The rename failed, perhaps because mv can't rename something else
- # to itself, or perhaps because mv is so ancient that it does not
- # support -f.
- {
- # Now remove or move aside any old file at destination location.
- # We try this two ways since rm can't unlink itself on some
- # systems and the destination file might be busy for other
- # reasons. In this case, the final cleanup might fail but the new
- # file should still install successfully.
- {
- test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
- { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
- } ||
- { echo "$0: cannot unlink or rename $dst" >&2
- (exit 1); exit 1
- }
- } &&
-
- # Now rename the file to the real destination.
- $doit $mvcmd "$dsttmp" "$dst"
- }
- fi || exit 1
-
- trap '' 0
- fi
-done
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/src/3rdparty/libpng/libpng-config.in b/src/3rdparty/libpng/libpng-config.in
deleted file mode 100755
index 2987cef..0000000
--- a/src/3rdparty/libpng/libpng-config.in
+++ /dev/null
@@ -1,127 +0,0 @@
-#! /bin/sh
-
-# libpng-config
-# provides configuration info for libpng.
-
-# Copyright (C) 2002, 2004, 2006, 2007 Glenn Randers-Pehrson
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Modeled after libxml-config.
-
-version="@PNGLIB_VERSION@"
-prefix="@prefix@"
-exec_prefix="@exec_prefix@"
-libdir="@libdir@"
-includedir="@includedir@/libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
-libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@"
-all_libs="-lpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ @LIBS@"
-I_opts="-I${includedir}"
-L_opts="-L${libdir}"
-R_opts=""
-cppflags=""
-ccopts=""
-ldopts=""
-
-usage()
-{
- cat <<EOF
-Usage: $0 [OPTION] ...
-
-Known values for OPTION are:
-
- --prefix print libpng prefix
- --libdir print path to directory containing library
- --libs print library linking information
- --ccopts print compiler options
- --cppflags print pre-processor flags
- --cflags print preprocessor flags, I_opts, and compiler options
- --I_opts print "-I" include options
- --L_opts print linker "-L" flags for dynamic linking
- --R_opts print dynamic linker "-R" or "-rpath" flags
- --ldopts print linker options
- --ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
- --static revise subsequent outputs for static linking
- --help print this help and exit
- --version print version information
-EOF
-
- exit $1
-}
-
-if test $# -eq 0; then
- usage 1
-fi
-
-while test $# -gt 0; do
- case "$1" in
-
- --prefix)
- echo ${prefix}
- ;;
-
- --version)
- echo ${version}
- exit 0
- ;;
-
- --help)
- usage 0
- ;;
-
- --ccopts)
- echo ${ccopts}
- ;;
-
- --cppflags)
- echo ${cppflags}
- ;;
-
- --cflags)
- echo ${I_opts} ${cppflags} ${ccopts}
- ;;
-
- --libdir)
- echo ${libdir}
- ;;
-
- --libs)
- echo ${libs}
- ;;
-
- --I_opts)
- echo ${I_opts}
- ;;
-
- --L_opts)
- echo ${L_opts}
- ;;
-
- --R_opts)
- echo ${R_opts}
- ;;
-
- --ldopts)
- echo ${ldopts}
- ;;
-
- --ldflags)
- echo ${ldopts} ${L_opts} ${R_opts} ${libs}
- ;;
-
- --static)
- R_opts=""
- libs=${all_libs}
- ;;
-
- *)
- usage
- exit 1
- ;;
- esac
- shift
-done
-
-exit 0
diff --git a/src/3rdparty/libpng/libpng-1.4.0.txt b/src/3rdparty/libpng/libpng-manual.txt
index 3da0aa8..77adf7a 100644
--- a/src/3rdparty/libpng/libpng-1.4.0.txt
+++ b/src/3rdparty/libpng/libpng-manual.txt
@@ -1,9 +1,9 @@
-libpng.txt - A description on how to use and modify libpng
+libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.4.0 - January 3, 2010
+ libpng version 1.5.1 - February 3, 2011
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
- Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ Copyright (c) 1998-2011 Glenn Randers-Pehrson
This document is released under the libpng license.
For conditions of distribution and use, see the disclaimer
@@ -11,9 +11,9 @@ libpng.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.4.0 - January 3, 2010
+ libpng versions 0.97, January 1998, through 1.5.1 - February 3, 2011
Updated and distributed by Glenn Randers-Pehrson
- Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ Copyright (c) 1998-2011 Glenn Randers-Pehrson
libpng 1.0 beta 6 version 0.96 May 28, 1997
Updated and distributed by Andreas Dilger
@@ -99,34 +99,181 @@ same instance of a structure.
II. Structures
There are two main structures that are important to libpng, png_struct
-and png_info. The first, png_struct, is an internal structure that
-will not, for the most part, be used by a user except as the first
-variable passed to every libpng function call.
+and png_info. Both are internal structures that are no longer exposed
+in the libpng interface (as of libpng 1.5.0).
The png_info structure is designed to provide information about the
PNG file. At one time, the fields of png_info were intended to be
directly accessible to the user. However, this tended to cause problems
with applications using dynamically loaded libraries, and as a result
a set of interface functions for png_info (the png_get_*() and png_set_*()
-functions) was developed. The fields of png_info are still available for
-older applications, but it is suggested that applications use the new
-interfaces if at all possible.
-
-Applications that do make direct access to the members of png_struct (except
-for png_ptr->jmpbuf) must be recompiled whenever the library is updated,
-and applications that make direct access to the members of png_info must
-be recompiled if they were compiled or loaded with libpng version 1.0.6,
-in which the members were in a different order. In version 1.0.7, the
-members of the png_info structure reverted to the old order, as they were
-in versions 0.97c through 1.0.5. Starting with version 2.0.0, both
-structures are going to be hidden, and the contents of the structures will
-only be accessible through the png_get/png_set functions.
+functions) was developed.
+
+The png_struct structure is the object used by the library to decode a
+single image. As of 1.5.0 this structure is also not exposed.
+
+Almost all libpng APIs require a pointer to a png_struct as the first argument.
+Many (in particular the png_set and png_get APIs) also require a pointer
+to png_info as the second argument. Some application visible macros
+defined in png.h designed for basic data access (reading and writing
+integers in the PNG format) break this rule, but it's almost always safe
+to assume that a (png_struct*) has to be passed to call an API function.
The png.h header file is an invaluable reference for programming with libpng.
And while I'm on the topic, make sure you include the libpng header file:
#include <png.h>
+Types
+
+The png.h header file defines a number of integral types used by the
+APIs. Most of these are fairly obvious; for example types corresponding
+to integers of particular sizes and types for passing color values.
+
+One exception is how non-integral numbers are handled. For application
+convenience most APIs that take such numbers have C (double) arguments,
+however internally PNG, and libpng, use 32 bit signed integers and encode
+the value by multiplying by 100,000. As of libpng 1.5.0 a convenience
+macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point)
+which is simply (png_int_32).
+
+All APIs that take (double) arguments also have an matching API that
+takes the corresponding fixed point integer arguments. The fixed point
+API has the same name as the floating point one with _fixed appended.
+The actual range of values permitted in the APIs is frequently less than
+the full range of (png_fixed_point) (-21474 to +21474). When APIs require
+a non-negative argument the type is recorded as png_uint_32 above. Consult
+the header file and the text below for more information.
+
+Special care must be take with sCAL chunk handling because the chunk itself
+uses non-integral values encoded as strings containing decimal floating point
+numbers. See the comments in the header file.
+
+Configuration
+
+The main header file function declarations are frequently protected by C
+preprocessing directives of the form:
+
+ #ifdef PNG_feature_SUPPORTED
+ declare-function
+ #endif
+
+The library can be built without support for these APIs, although a
+standard build will have all implemented APIs. Application programs
+should check the feature macros before using an API for maximum
+portability. From libpng 1.5.0 the feature macros set during the build
+of libpng are recorded in the header file "pnglibconf.h" and this file
+is always included by png.h.
+
+If you don't need to change the library configuration from the default skip to
+the next section ("Reading").
+
+Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all
+of the build project files in the 'projects' directory simply copy
+scripts/pnglibconf.h.prebuilt to pnglibconf.h. This means that these build
+systems do not permit easy auto-configuration of the library - they only
+support the default configuration.
+
+The easiest way to make minor changes to the libpng configuration when
+auto-configuration is supported is to add definitions to the command line
+using (typically) CPPFLAGS. For example:
+
+CPPFLAGS=-DPNG_NO_FLOATING_ARITHMETIC
+
+will change the internal libpng math implementation for gamma correction and
+other arithmetic calculations to fixed point, avoiding the need for fast
+floating point support. The result can be seen in the generated pnglibconf.h -
+make sure it contains the changed feature macro setting.
+
+If you need to make more extensive configuration changes - more than one or two
+feature macro settings - you can either add -DPNG_USER_CONFIG to the build
+command line and put a list of feature macro settings in pngusr.h or you can set
+DFA_XTRA (a makefile variable) to a file containing the same information in the
+form of 'option' settings.
+
+A. Changing pnglibconf.h
+
+A variety of methods exist to build libpng. Not all of these support
+reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be
+rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand.
+
+Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt and changing
+the lines defining the supported features, paying very close attention to the
+'option' information in scripts/pnglibconf.dfa that describes those features and
+their requirements. This is easy to get wrong.
+
+B. Configuration using DFA_XTRA
+
+Rebuilding from pnglibconf.dfa is easy if a functioning 'awk', or a later
+variant such as 'nawk' or 'gawk', is available. The configure build will
+automatically find an appropriate awk and build pnglibconf.h.
+scripts/pnglibconf.mak contains a set of make rules for doing the same thing if
+configure is not used, and many of the makefiles in the scripts directory use
+this approach.
+
+When rebuilding simply write new file containing changed options and set
+DFA_XTRA to the name of this file. This causes the build to append the new file
+to the end of scripts/pnglibconf.dfa. pngusr.dfa should contain lines of the
+following forms:
+
+everything = off
+
+This turns all optional features off. Include it at the start of pngusr.dfa to
+make it easier to build a minimal configuration. You will need to turn at least
+some features on afterward to enable either reading or writing code, or both.
+
+option feature on
+option feature off
+
+Enable or disable a single feature. This will automatically enable other
+features required by a feature that is turned on or disable other features that
+require a feature which is turned off. Conflicting settings will cause an error
+message to be emitted by awk.
+
+setting feature default value
+
+Changes the default value of setting 'feature' to 'value'. There are a small
+number of settings listed at the top of pnglibconf.h, they are documented in the
+source code. Most of these values have performance implications for the library
+but most of them have no visible effect on the API. Some can also be overridden
+from the API.
+
+C. Configuration using PNG_USR_CONFIG
+
+If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
+pngusr.h will automatically be included before the options in
+scripts/pnglibconf.dfa are processed. pngusr.h should contain only macro
+definitions turning features on or off or setting settings.
+
+Apart from the global setting "everything = off" all the options listed above
+can be set using macros in pngusr.h:
+
+#define PNG_feature_SUPPORTED
+
+is equivalent to:
+
+option feature on
+
+#define PNG_NO_feature
+
+is equivalent to:
+
+option feature off
+
+#define PNG_feature value
+
+is equivalent to:
+
+setting feature default value
+
+Notice that in both cases, pngusr.dfa and pngusr.h, the contents of the
+pngusr file you supply override the contents of scripts/pnglibconf.dfa
+
+If confusing or incomprehensible behavior results it is possible to
+examine the intermediate file pnglibconf.dfn to find the full set of
+dependency information for each setting and option. Simply locate the
+feature in the file and read the C comments that precede it.
+
III. Reading
We'll now walk you through the possible functions to call when reading
@@ -162,13 +309,15 @@ Customizing libpng.
FILE *fp = fopen(file_name, "rb");
if (!fp)
{
- return (ERROR);
+ return (ERROR);
}
+
fread(header, 1, number, fp);
is_png = !png_sig_cmp(header, 0, number);
+
if (!is_png)
{
- return (NOT_PNG);
+ return (NOT_PNG);
}
@@ -184,29 +333,32 @@ The structure allocation functions quietly return NULL if they fail to
create the structure, so your application should check for that.
png_structp png_ptr = png_create_read_struct
- (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
+ (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
user_error_fn, user_warning_fn);
+
if (!png_ptr)
- return (ERROR);
+ return (ERROR);
png_infop info_ptr = png_create_info_struct(png_ptr);
+
if (!info_ptr)
{
- png_destroy_read_struct(&png_ptr,
+ png_destroy_read_struct(&png_ptr,
(png_infopp)NULL, (png_infopp)NULL);
- return (ERROR);
+ return (ERROR);
}
png_infop end_info = png_create_info_struct(png_ptr);
+
if (!end_info)
{
- png_destroy_read_struct(&png_ptr, &info_ptr,
+ png_destroy_read_struct(&png_ptr, &info_ptr,
(png_infopp)NULL);
- return (ERROR);
+ return (ERROR);
}
If you want to use your own memory allocation routines,
-define PNG_USER_MEM_SUPPORTED and use
+use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use
png_create_read_struct_2() instead of png_create_read_struct():
png_structp png_ptr = png_create_read_struct_2
@@ -234,16 +386,20 @@ free any memory.
if (setjmp(png_jmpbuf(png_ptr)))
{
- png_destroy_read_struct(&png_ptr, &info_ptr,
+ png_destroy_read_struct(&png_ptr, &info_ptr,
&end_info);
- fclose(fp);
- return (ERROR);
+ fclose(fp);
+ return (ERROR);
}
If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
+you can compile libpng with PNG_NO_SETJMP, in which case
errors will result in a call to PNG_ABORT() which defaults to abort().
+You can #define PNG_ABORT() to a function that does something
+more useful than abort(), as long as your function does not
+return.
+
Now you need to set up the input code. The default for libpng is to
use the C function fread(). If you use this, you will need to pass a
valid FILE * in the function png_init_io(). Be sure that the file is
@@ -260,12 +416,46 @@ libpng know that there are some bytes missing from the start of the file.
png_set_sig_bytes(png_ptr, number);
+You can change the zlib compression buffer size to be used while
+reading compressed data with
+
+ png_set_compression_buffer_size(png_ptr, buffer_size);
+
+where the default size is 8192 bytes. Note that the buffer size
+is changed immediately and the buffer is reallocated immediately,
+instead of setting a flag to be acted upon later.
+
+If you want CRC errors to be handled in a different manner than
+the default, use
+
+ png_set_crc_action(png_ptr, crit_action, ancil_action);
+
+The values for png_set_crc_action() say how libpng is to handle CRC errors in
+ancillary and critical chunks, and whether to use the data contained
+therein. Note that it is impossible to "discard" data in a critical
+chunk.
+
+Choices for (int) crit_action are
+ PNG_CRC_DEFAULT 0 error/quit
+ PNG_CRC_ERROR_QUIT 1 error/quit
+ PNG_CRC_WARN_USE 3 warn/use data
+ PNG_CRC_QUIET_USE 4 quiet/use data
+ PNG_CRC_NO_CHANGE 5 use the current value
+
+Choices for (int) ancil_action are
+ PNG_CRC_DEFAULT 0 error/quit
+ PNG_CRC_ERROR_QUIT 1 error/quit
+ PNG_CRC_WARN_DISCARD 2 warn/discard data
+ PNG_CRC_WARN_USE 3 warn/use data
+ PNG_CRC_QUIET_USE 4 quiet/use data
+ PNG_CRC_NO_CHANGE 5 use the current value
+
Setting up callback code
You can set up a callback function to handle any unknown chunks in the
input stream. You must supply the function
- read_chunk_callback(png_ptr ptr,
+ read_chunk_callback(png_structp png_ptr,
png_unknown_chunkp chunk);
{
/* The unknown chunk structure contains your
@@ -311,8 +501,8 @@ called after each row has been read, which you can use to control
a progress meter or the like. It's demonstrated in pngtest.c.
You must supply a function
- void read_row_callback(png_ptr ptr, png_uint_32 row,
- int pass);
+ void read_row_callback(png_structp png_ptr,
+ png_uint_32 row, int pass);
{
/* put your code here */
}
@@ -338,14 +528,17 @@ chunk types. To change this, you can call:
1: ignore; do not keep
2: keep only if safe-to-copy
3: keep even if unsafe-to-copy
+
You can use these definitions:
PNG_HANDLE_CHUNK_AS_DEFAULT 0
PNG_HANDLE_CHUNK_NEVER 1
PNG_HANDLE_CHUNK_IF_SAFE 2
PNG_HANDLE_CHUNK_ALWAYS 3
+
chunk_list - list of chunks affected (a byte string,
five bytes per chunk, NULL or '\0' if
num_chunks is 0)
+
num_chunks - number of chunks affected; if 0, all
unknown chunks are affected. If nonzero,
only the chunks in the list are affected
@@ -381,8 +574,10 @@ callback function:
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
/* ignore all unknown chunks: */
png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0);
+
/* except for vpAg: */
png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1);
+
/* also ignore unused known chunks: */
png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks,
(int)sizeof(unused_chunks)/5);
@@ -423,6 +618,18 @@ where 0x7fffffffL means unlimited. You can retrieve this limit with
This limit also applies to the number of buffers that can be allocated
by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks.
+You can also set a limit on the amount of memory that a compressed chunk
+other than IDAT can occupy, with
+
+ png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max);
+
+and you can retrieve the limit with
+
+ chunk_malloc_max = png_get_chunk_malloc_max(png_ptr);
+
+Any chunks that would cause either of these limits to be exceeded will
+be ignored.
+
The high-level read interface
At this point there are two ways to proceed; through the high-level
@@ -454,7 +661,7 @@ you want to do are limited to the following set:
to RGB (or GA to RGBA)
(This excludes setting a background color, doing gamma transformation,
-dithering, and setting filler.) If this is the case, simply do this:
+quantizing, and setting filler.) If this is the case, simply do this:
png_read_png(png_ptr, info_ptr, png_transforms, NULL)
@@ -483,17 +690,22 @@ row_pointers prior to calling png_read_png() with
if (height > PNG_UINT_32_MAX/png_sizeof(png_byte))
png_error (png_ptr,
- "Image is too tall to process in memory");
+ "Image is too tall to process in memory");
+
if (width > PNG_UINT_32_MAX/pixel_size)
png_error (png_ptr,
- "Image is too wide to process in memory");
+ "Image is too wide to process in memory");
+
row_pointers = png_malloc(png_ptr,
- height*png_sizeof(png_bytep));
+ height*png_sizeof(png_bytep));
+
for (int i=0; i<height, i++)
row_pointers[i]=NULL; /* security precaution */
+
for (int i=0; i<height, i++)
row_pointers[i]=png_malloc(png_ptr,
- width*pixel_size);
+ width*pixel_size);
+
png_set_rows(png_ptr, info_ptr, &row_pointers);
Alternatively you could allocate your image in one big block and define
@@ -503,7 +715,7 @@ If you use png_set_rows(), the application is responsible for freeing
row_pointers (and row_pointers[i], if they were separately allocated).
If you don't allocate row_pointers ahead of time, png_read_png() will
-do it, and it'll be free'ed when you call png_destroy_*().
+do it, and it'll be free'ed by libpng when you call png_destroy_*().
The low-level read interface
@@ -527,13 +739,16 @@ in until png_read_end() has read the chunk data following the image.
width - holds the width of the image
in pixels (up to 2^31).
+
height - holds the height of the image
in pixels (up to 2^31).
+
bit_depth - holds the bit depth of one of the
image channels. (valid values are
1, 2, 4, 8, 16 and depend also on
the color_type. See also
significant bits (sBIT) below).
+
color_type - describes which color/alpha channels
are present.
PNG_COLOR_TYPE_GRAY
@@ -551,15 +766,17 @@ in until png_read_end() has read the chunk data following the image.
PNG_COLOR_MASK_COLOR
PNG_COLOR_MASK_ALPHA
+ interlace_type - (PNG_INTERLACE_NONE or
+ PNG_INTERLACE_ADAM7)
+
+ compression_type - (must be PNG_COMPRESSION_TYPE_BASE
+ for PNG 1.0)
+
filter_method - (must be PNG_FILTER_TYPE_BASE
for PNG 1.0, and can also be
PNG_INTRAPIXEL_DIFFERENCING if
the PNG datastream is embedded in
a MNG-1.0 datastream)
- compression_type - (must be PNG_COMPRESSION_TYPE_BASE
- for PNG 1.0)
- interlace_type - (PNG_INTERLACE_NONE or
- PNG_INTERLACE_ADAM7)
Any or all of interlace_type, compression_type, or
filter_method can be NULL if you are
@@ -574,28 +791,38 @@ in until png_read_end() has read the chunk data following the image.
width = png_get_image_width(png_ptr,
info_ptr);
+
height = png_get_image_height(png_ptr,
info_ptr);
+
bit_depth = png_get_bit_depth(png_ptr,
info_ptr);
+
color_type = png_get_color_type(png_ptr,
info_ptr);
- filter_method = png_get_filter_type(png_ptr,
+
+ interlace_type = png_get_interlace_type(png_ptr,
info_ptr);
+
compression_type = png_get_compression_type(png_ptr,
info_ptr);
- interlace_type = png_get_interlace_type(png_ptr,
+
+ filter_method = png_get_filter_type(png_ptr,
info_ptr);
channels = png_get_channels(png_ptr, info_ptr);
+
channels - number of channels of info for the
color type (valid values are 1 (GRAY,
PALETTE), 2 (GRAY_ALPHA), 3 (RGB),
4 (RGB_ALPHA or RGB + filler byte))
+
rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+
rowbytes - number of bytes needed to hold a row
signature = png_get_signature(png_ptr, info_ptr);
+
signature - holds the signature read from the
file (if any). The data is kept in
the same offset it would be if the
@@ -615,16 +842,24 @@ pointer into the info_ptr is returned for any complex types.
png_get_PLTE(png_ptr, info_ptr, &palette,
&num_palette);
+
palette - the palette for the file
(array of png_color)
+
num_palette - number of entries in the palette
- png_get_gAMA(png_ptr, info_ptr, &gamma);
- gamma - the gamma the file is written
- at (PNG_INFO_gAMA)
+ png_get_gAMA(png_ptr, info_ptr, &file_gamma);
+ png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma);
+
+ file_gamma - the gamma at which the file is
+ written (PNG_INFO_gAMA)
+
+ int_file_gamma - 100,000 times the gamma at which the
+ file is written
png_get_sRGB(png_ptr, info_ptr, &srgb_intent);
- srgb_intent - the rendering intent (PNG_INFO_sRGB)
+
+ file_srgb_intent - the rendering intent (PNG_INFO_sRGB)
The presence of the sRGB chunk
means that the pixel data is in the
sRGB color space. This chunk also
@@ -633,16 +868,21 @@ pointer into the info_ptr is returned for any complex types.
png_get_iCCP(png_ptr, info_ptr, &name,
&compression_type, &profile, &proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
+
+ name - The profile name.
+
+ compression_type - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+
+ proflen - length of profile data in bytes.
png_get_sBIT(png_ptr, info_ptr, &sig_bit);
+
sig_bit - the number of significant bits for
(PNG_INFO_sBIT) each of the gray,
red, green, and blue channels,
@@ -651,50 +891,66 @@ pointer into the info_ptr is returned for any complex types.
png_get_tRNS(png_ptr, info_ptr, &trans_alpha,
&num_trans, &trans_color);
+
trans_alpha - array of alpha (transparency)
entries for palette (PNG_INFO_tRNS)
+
+ num_trans - number of transparent entries
+ (PNG_INFO_tRNS)
+
trans_color - graylevel or color sample values of
the single transparent color for
non-paletted images (PNG_INFO_tRNS)
- num_trans - number of transparent entries
- (PNG_INFO_tRNS)
png_get_hIST(png_ptr, info_ptr, &hist);
(PNG_INFO_hIST)
+
hist - histogram of palette (array of
png_uint_16)
png_get_tIME(png_ptr, info_ptr, &mod_time);
+
mod_time - time image was last modified
(PNG_VALID_tIME)
png_get_bKGD(png_ptr, info_ptr, &background);
+
background - background color (PNG_VALID_bKGD)
valid 16-bit red, green and blue
values, regardless of color_type
num_comments = png_get_text(png_ptr, info_ptr,
&text_ptr, &num_text);
+
num_comments - number of comments
+
text_ptr - array of png_text holding image
comments
+
text_ptr[i].compression - type of compression used
on "text" PNG_TEXT_COMPRESSION_NONE
PNG_TEXT_COMPRESSION_zTXt
PNG_ITXT_COMPRESSION_NONE
PNG_ITXT_COMPRESSION_zTXt
+
text_ptr[i].key - keyword for comment. Must contain
1-79 characters.
+
text_ptr[i].text - text comments for current
keyword. Can be empty.
+
text_ptr[i].text_length - length of text string,
after decompression, 0 for iTXt
+
text_ptr[i].itxt_length - length of itxt string,
after decompression, 0 for tEXt/zTXt
+
text_ptr[i].lang - language of comment (empty
string for unknown).
+
text_ptr[i].lang_key - keyword in UTF-8
(empty string for unknown).
+
Note that the itxt_length, lang, and lang_key
members of the text_ptr structure only exist
when the library is built with iTXt chunk support.
@@ -702,6 +958,7 @@ pointer into the info_ptr is returned for any complex types.
num_text - number of comments (same as
num_comments; you can put NULL here
to avoid the duplication)
+
Note while png_set_text() will accept text, language,
and translated keywords that can be NULL pointers, the
structure returned by png_get_text will always contain
@@ -710,49 +967,68 @@ pointer into the info_ptr is returned for any complex types.
num_spalettes = png_get_sPLT(png_ptr, info_ptr,
&palette_ptr);
+
+ num_spalettes - number of sPLT chunks read.
+
palette_ptr - array of palette structures holding
contents of one or more sPLT chunks
read.
- num_spalettes - number of sPLT chunks read.
png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y,
&unit_type);
+
offset_x - positive offset from the left edge
of the screen
+
offset_y - positive offset from the top edge
of the screen
+
unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y,
&unit_type);
+
res_x - pixels/unit physical resolution in
x direction
+
res_y - pixels/unit physical resolution in
x direction
+
unit_type - PNG_RESOLUTION_UNKNOWN,
PNG_RESOLUTION_METER
png_get_sCAL(png_ptr, info_ptr, &unit, &width,
&height)
+
unit - physical scale units (an integer)
+
width - width of a pixel in physical scale units
+
height - height of a pixel in physical scale units
(width and height are doubles)
png_get_sCAL_s(png_ptr, info_ptr, &unit, &width,
&height)
+
unit - physical scale units (an integer)
+
width - width of a pixel in physical scale units
+
height - height of a pixel in physical scale units
(width and height are strings like "2.54")
num_unknown_chunks = png_get_unknown_chunks(png_ptr,
info_ptr, &unknowns)
+
unknowns - array of png_unknown_chunk
structures holding unknown chunks
+
unknowns[i].name - name of unknown chunk
+
unknowns[i].data - data of unknown chunk
+
unknowns[i].size - size of unknown chunk's data
+
unknowns[i].location - position of chunk in file
The value of "i" corresponds to the order in which the
@@ -764,34 +1040,55 @@ forms:
res_x = png_get_x_pixels_per_meter(png_ptr,
info_ptr)
+
res_y = png_get_y_pixels_per_meter(png_ptr,
info_ptr)
+
res_x_and_y = png_get_pixels_per_meter(png_ptr,
info_ptr)
+
res_x = png_get_x_pixels_per_inch(png_ptr,
info_ptr)
+
res_y = png_get_y_pixels_per_inch(png_ptr,
info_ptr)
+
res_x_and_y = png_get_pixels_per_inch(png_ptr,
info_ptr)
+
aspect_ratio = png_get_pixel_aspect_ratio(png_ptr,
info_ptr)
- (Each of these returns 0 [signifying "unknown"] if
+ Each of these returns 0 [signifying "unknown"] if
the data is not present or if res_x is 0;
- res_x_and_y is 0 if res_x != res_y)
+ res_x_and_y is 0 if res_x != res_y
+
+ Note that because of the way the resolutions are
+ stored internally, the inch conversions won't
+ come out to exactly even number. For example,
+ 72 dpi is stored as 0.28346 pixels/meter, and
+ when this is retrieved it is 71.9988 dpi, so
+ be sure to round the returned value appropriately
+ if you want to display a reasonable-looking result.
The data from the oFFs chunk can be retrieved in several convenient
forms:
x_offset = png_get_x_offset_microns(png_ptr, info_ptr);
+
y_offset = png_get_y_offset_microns(png_ptr, info_ptr);
+
x_offset = png_get_x_offset_inches(png_ptr, info_ptr);
+
y_offset = png_get_y_offset_inches(png_ptr, info_ptr);
- (Each of these returns 0 [signifying "unknown" if both
+ Each of these returns 0 [signifying "unknown" if both
x and y are 0] if the data is not present or if the
- chunk is present but the unit is the pixel)
+ chunk is present but the unit is the pixel. The
+ remark about inexact inch conversions applies here
+ as well, because a value in inches can't always be
+ converted to microns and back without some loss
+ of precision.
For more information, see the png_info definition in png.h and the
PNG specification for chunk contents. Be careful with trusting
@@ -878,7 +1175,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
-As of libpng version 1.4.0, not all possible expansions are supported.
+As of libpng version 1.5.1, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@@ -919,7 +1216,7 @@ PNG can have files with 16 bits per channel. If you only can handle
8 bits per channel, this will strip the pixels down to 8 bit.
if (bit_depth == 16)
- png_set_strip_16(png_ptr);
+ png_set_strip_16(png_ptr);
If, for some reason, you don't need the alpha channel on an image,
and you want to remove it rather than combining it with the background
@@ -927,7 +1224,7 @@ and you want to remove it rather than combining it with the background
it with the background, so that's what you should probably do):
if (color_type & PNG_COLOR_MASK_ALPHA)
- png_set_strip_alpha(png_ptr);
+ png_set_strip_alpha(png_ptr);
In PNG files, the alpha channel in an image
is the level of opacity. If you need the alpha channel in an image to
@@ -944,7 +1241,7 @@ files. This code expands to 1 pixel per byte without changing the
values of the pixels:
if (bit_depth < 8)
- png_set_packing(png_ptr);
+ png_set_packing(png_ptr);
PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels
stored in a PNG image have been "scaled" or "shifted" up to the next
@@ -956,20 +1253,20 @@ image. This call reduces the pixels back down to the original bit depth:
png_color_8p sig_bit;
if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
- png_set_shift(png_ptr, sig_bit);
+ png_set_shift(png_ptr, sig_bit);
PNG files store 3-color pixels in red, green, blue order. This code
changes the storage of the pixels to blue, green, red:
if (color_type == PNG_COLOR_TYPE_RGB ||
color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_bgr(png_ptr);
+ png_set_bgr(png_ptr);
PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them
into 4 or 8 bytes for windowing systems that need them in this format:
if (color_type == PNG_COLOR_TYPE_RGB)
- png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
+ png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
where "filler" is the 8 or 16-bit number to fill with, and the location is
either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
@@ -982,8 +1279,8 @@ Note that png_set_filler() does not change the color type. If you want
to do that, you can add a true alpha channel with
if (color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_GRAY)
- png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
+ color_type == PNG_COLOR_TYPE_GRAY)
+ png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
where "filler" contains the alpha value to assign to each pixel.
This function was added in libpng-1.2.7.
@@ -992,33 +1289,36 @@ If you are reading an image with an alpha channel, and you need the
data as ARGB instead of the normal PNG format RGBA:
if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_swap_alpha(png_ptr);
+ png_set_swap_alpha(png_ptr);
For some uses, you may want a grayscale image to be represented as
RGB. This code will do that conversion:
if (color_type == PNG_COLOR_TYPE_GRAY ||
color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb(png_ptr);
+ png_set_gray_to_rgb(png_ptr);
Conversely, you can convert an RGB or RGBA image to grayscale or grayscale
with alpha.
if (color_type == PNG_COLOR_TYPE_RGB ||
color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_rgb_to_gray_fixed(png_ptr, error_action,
- int red_weight, int green_weight);
+ png_set_rgb_to_gray_fixed(png_ptr, error_action,
+ int red_weight, int green_weight);
error_action = 1: silently do the conversion
+
error_action = 2: issue a warning if the original
image has any pixel where
red != green or red != blue
+
error_action = 3: issue an error and abort the
conversion if the original
image has any pixel where
red != green or red != blue
red_weight: weight of red component times 100000
+
green_weight: weight of green component times 100000
If either weight is negative, default
weights (21268, 71514) are used.
@@ -1045,16 +1345,12 @@ Copyright (c) 1998-01-04 Charles Poynton <poynton at inforamp.net>
Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
-Libpng approximates this with
-
- Y = 0.21268 * R + 0.7151 * G + 0.07217 * B
-
-which can be expressed with integers as
+Libpng approximates this with integers scaled by 32768:
- Y = (6969 * R + 23434 * G + 2365 * B)/32768
+ Y = (6968 * R + 23434 * G + 2366 * B)/32768
The calculation is done in a linear colorspace, if the image gamma
-is known.
+can be determined.
If you have a grayscale and you are using png_set_expand_depth(),
png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to
@@ -1069,11 +1365,11 @@ or as an RGB triplet that may or may not be in the palette (need_expand = 0).
png_color_16p image_background;
if (png_get_bKGD(png_ptr, info_ptr, &image_background))
- png_set_background(png_ptr, image_background,
- PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
+ png_set_background(png_ptr, image_background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
else
- png_set_background(png_ptr, &my_background,
- PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
+ png_set_background(png_ptr, &my_background,
+ PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
The png_set_background() function tells libpng to composite images
with alpha or simple transparency against the supplied background
@@ -1106,6 +1402,7 @@ a slightly smaller exponent is better.
{
screen_gamma = user_defined_screen_gamma;
}
+
/* One way that applications can share the same
screen gamma value */
else if ((gamma_str = getenv("SCREEN_GAMMA"))
@@ -1113,18 +1410,22 @@ a slightly smaller exponent is better.
{
screen_gamma = (double)atof(gamma_str);
}
+
/* If we don't have another value */
else
{
screen_gamma = 2.2; /* A good guess for a
PC monitor in a bright office or a dim room */
+
screen_gamma = 2.0; /* A good guess for a
PC monitor in a dark room */
+
screen_gamma = 1.7 or 1.0; /* A good
guess for Mac systems */
}
-The png_set_gamma() function handles gamma transformations of the data.
+The functions png_set_gamma() and its fixed point equivalent
+png_set_gamma_fixed() handle gamma transformations of the data.
Pass both the file gamma and the current screen_gamma. If the file does
not have a gamma value, you can pass one anyway if you have an idea what
it is (usually 0.45455 is a good guess for GIF images on PCs). Note
@@ -1133,11 +1434,47 @@ on gamma in the PNG specification for an excellent description of what
gamma is, and why all applications should support it. It is strongly
recommended that PNG viewers support gamma correction.
- if (png_get_gAMA(png_ptr, info_ptr, &gamma))
- png_set_gamma(png_ptr, screen_gamma, gamma);
+ if (png_get_gAMA(png_ptr, info_ptr, &file_gamma))
+ png_set_gamma(png_ptr, screen_gamma, file_gamma);
+
else
png_set_gamma(png_ptr, screen_gamma, 0.45455);
+If you need to reduce an RGB file to a paletted file, or if a paletted
+file has more entries then will fit on your screen, png_set_quantize()
+will do that. Note that this is a simple match quantization that merely
+finds the closest color available. This should work fairly well with
+optimized palettes, but fairly badly with linear color cubes. If you
+pass a palette that is larger then maximum_colors, the file will
+reduce the number of colors in the palette so it will fit into
+maximum_colors. If there is a histogram, it will use it to make
+more intelligent choices when reducing the palette. If there is no
+histogram, it may not do as good a job.
+
+ if (color_type & PNG_COLOR_MASK_COLOR)
+ {
+ if (png_get_valid(png_ptr, info_ptr,
+ PNG_INFO_PLTE))
+ {
+ png_uint_16p histogram = NULL;
+
+ png_get_hIST(png_ptr, info_ptr,
+ &histogram);
+ png_set_quantize(png_ptr, palette, num_palette,
+ max_screen_colors, histogram, 1);
+ }
+
+ else
+ {
+ png_color std_color_cube[MAX_SCREEN_COLORS] =
+ { ... colors ... };
+
+ png_set_quantize(png_ptr, std_color_cube,
+ MAX_SCREEN_COLORS, MAX_SCREEN_COLORS,
+ NULL,0);
+ }
+ }
+
PNG files describe monochrome as black being zero and white being one.
The following code will reverse this (make black be one and white be
zero):
@@ -1148,7 +1485,7 @@ zero):
This function can also be used to invert grayscale and gray-alpha images:
if (color_type == PNG_COLOR_TYPE_GRAY ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_invert_mono(png_ptr);
PNG files store 16 bit pixels in network byte order (big-endian,
@@ -1157,7 +1494,7 @@ other way (little-endian, i.e. least significant bits first, the
way PCs store them):
if (bit_depth == 16)
- png_set_swap(png_ptr);
+ png_set_swap(png_ptr);
If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
need to change the order the pixels are packed into bytes, you can use:
@@ -1170,15 +1507,28 @@ the existing ones meets your needs. This is done by setting a callback
with
png_set_read_user_transform_fn(png_ptr,
- read_transform_fn);
+ read_transform_fn);
You must supply the function
- void read_transform_fn(png_ptr ptr, row_info_ptr
- row_info, png_bytep data)
+ void read_transform_fn(png_structp png_ptr, row_info_ptr
+ row_info, png_bytep data)
See pngtest.c for a working example. Your function will be called
-after all of the other transformations have been processed.
+after all of the other transformations have been processed. Take care with
+interlaced images if you do the interlace yourself - the width of the row is the
+width in 'row_info', not the overall image width.
+
+If supported libpng provides two information routines that you can use to find
+where you are in processing the image:
+
+ png_get_current_pass_number(png_structp png_ptr);
+ png_get_current_row_number(png_structp png_ptr);
+
+Don't try using these outside a transform callback - firstly they are only
+supported if user transforms are supported, secondly they may well return
+unexpected results unless the row is actually being processed at the moment they
+are called.
You can also set up a pointer to a user structure for use by your
callback function, and you can inform libpng that your transform
@@ -1186,7 +1536,7 @@ function will change the number of channels or bit depth with the
function
png_set_user_transform_info(png_ptr, user_ptr,
- user_depth, user_channels);
+ user_depth, user_channels);
The user's application, not libpng, is responsible for allocating and
freeing any memory required for the user structure.
@@ -1195,7 +1545,7 @@ You can retrieve the pointer via the function
png_get_user_transform_ptr(). For example:
voidp read_user_transform_ptr =
- png_get_user_transform_ptr(png_ptr);
+ png_get_user_transform_ptr(png_ptr);
The last thing to handle is interlacing; this is covered in detail below,
but you must call the function here if you want libpng to handle expansion
@@ -1220,6 +1570,15 @@ are allocating one large chunk, you will need to build an
array of pointers to each row, as it will be needed for some
of the functions below.
+Remember: Before you call png_read_update_info(), the png_get_
+functions return the values corresponding to the original PNG image.
+After you call png_read_update_info the values refer to the image
+that libpng will output. Consequently you must call all the png_set_
+functions before you call png_read_update_info(). This is particularly
+important for png_set_interlace_handling() - if you are going to call
+png_read_update_info() you must call png_set_interlace_handling() before
+it unless you want to receive interlaced output.
+
Reading image data
After you've allocated memory, you can read the image data.
@@ -1229,9 +1588,10 @@ call png_read_image() and libpng will read in all the image data
and put it in the memory area supplied. You will need to pass in
an array of pointers to each row.
-This function automatically handles interlacing, so you don't need
-to call png_set_interlace_handling() or call this function multiple
-times, or any of that other stuff necessary with png_read_rows().
+This function automatically handles interlacing, so you don't
+need to call png_set_interlace_handling() (unless you call
+png_read_update_info()) or call this function multiple times, or any
+of that other stuff necessary with png_read_rows().
png_read_image(png_ptr, row_pointers);
@@ -1246,7 +1606,7 @@ use png_read_rows() instead. If there is no interlacing (check
interlace_type == PNG_INTERLACE_NONE), this is simple:
png_read_rows(png_ptr, row_pointers, NULL,
- number_of_rows);
+ number_of_rows);
where row_pointers is the same as in the png_read_image() call.
@@ -1258,13 +1618,15 @@ a single row_pointer instead of an array of row_pointers:
If the file is interlaced (interlace_type != 0 in the IHDR chunk), things
get somewhat harder. The only current (PNG Specification version 1.2)
-interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7)
-is a somewhat complicated 2D interlace scheme, known as Adam7, that
+interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7);
+a somewhat complicated 2D interlace scheme, known as Adam7, that
breaks down an image into seven smaller images of varying size, based
-on an 8x8 grid.
+on an 8x8 grid. This number is defined (from libpng 1.5) as
+PNG_INTERLACE_ADAM7_PASSES in png.h
libpng can fill out those images or it can give them to you "as is".
-If you want them filled out, there are two ways to do that. The one
+It is almost always better to have libpng handle the interlacing for you.
+If you want the images filled out, there are two ways to do that. The one
mentioned in the PNG specification is to expand each pixel to cover
those pixels that have not been read yet (the "rectangle" method).
This results in a blocky image for the first pass, which gradually
@@ -1274,37 +1636,20 @@ rest of the image remaining whatever colors they were initialized to
before the start of the read. The first method usually looks better,
but tends to be slower, as there are more pixels to put in the rows.
-If you don't want libpng to handle the interlacing details, just call
-png_read_rows() seven times to read in all seven images. Each of the
-images is a valid image by itself, or they can all be combined on an
-8x8 grid to form a single image (although if you intend to combine them
-you would be far better off using the libpng interlace handling).
-
-The first pass will return an image 1/8 as wide as the entire image
-(every 8th column starting in column 0) and 1/8 as high as the original
-(every 8th row starting in row 0), the second will be 1/8 as wide
-(starting in column 4) and 1/8 as high (also starting in row 0). The
-third pass will be 1/4 as wide (every 4th pixel starting in column 0) and
-1/8 as high (every 8th row starting in row 4), and the fourth pass will
-be 1/4 as wide and 1/4 as high (every 4th column starting in column 2,
-and every 4th row starting in row 0). The fifth pass will return an
-image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2),
-while the sixth pass will be 1/2 as wide and 1/2 as high as the original
-(starting in column 1 and row 0). The seventh and final pass will be as
-wide as the original, and 1/2 as high, containing all of the odd
-numbered scanlines. Phew!
-
-If you want libpng to expand the images, call this before calling
-png_start_read_image() or png_read_update_info():
+If, as is likely, you want libpng to expand the images, call this before
+calling png_start_read_image() or png_read_update_info():
if (interlace_type == PNG_INTERLACE_ADAM7)
- number_of_passes
+ number_of_passes
= png_set_interlace_handling(png_ptr);
-This will return the number of passes needed. Currently, this
-is seven, but may change if another interlace type is added.
-This function can be called even if the file is not interlaced,
-where it will return one pass.
+This will return the number of passes needed. Currently, this is seven,
+but may change if another interlace type is added. This function can be
+called even if the file is not interlaced, where it will return one pass.
+You then need to read the whole image 'number_of_passes' times. Each time
+will distribute the pixels from the current pass to the correct place in
+the output image, so you need to supply the same rows to png_read_rows in
+each pass.
If you are not going to display the image after each pass, but are
going to wait until the entire image is read in, use the sparkle
@@ -1321,14 +1666,104 @@ not the data. Each pass only writes the pixels appropriate for that
pass, and assumes the data from previous passes is still valid.
png_read_rows(png_ptr, row_pointers, NULL,
- number_of_rows);
+ number_of_rows);
If you only want the first effect (the rectangles), do the same as
before except pass the row buffer in the third parameter, and leave
the second parameter NULL.
png_read_rows(png_ptr, NULL, row_pointers,
- number_of_rows);
+ number_of_rows);
+
+If you don't want libpng to handle the interlacing details, just call
+png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images.
+Each of the images is a valid image by itself, however you will almost
+certainly need to distribute the pixels from each sub-image to the
+correct place. This is where everything gets very tricky.
+
+If you want to retrieve the separate images you must pass the correct
+number of rows to each successive call of png_read_rows(). The calculation
+gets pretty complicated for small images, where some sub-images may
+not even exist because either their width or height ends up zero.
+libpng provides two macros to help you in 1.5 and later versions:
+
+ png_uint_32 width = PNG_PASS_COLS(image_width, pass_number);
+ png_uint_32 height = PNG_PASS_ROWS(image_height, pass_number);
+
+Respectively these tell you the width and height of the sub-image
+corresponding to the numbered pass. 'pass' is in in the range 0 to 6 -
+this can be confusing because the specification refers to the same passes
+as 1 to 7! Be careful, you must check both the width and height before
+calling png_read_rows() and not call it for that pass if either is zero.
+
+You can, of course, read each sub-image row by row. If you want to
+produce optimal code to make a pixel-by-pixel transformation of an
+interlaced image this is the best approach; read each row of each pass,
+transform it, and write it out to a new interlaced image.
+
+If you want to de-interlace the image yourself libpng provides further
+macros to help that tell you where to place the pixels in the output image.
+Because the interlacing scheme is rectangular - sub-image pixels are always
+arranged on a rectangular grid - all you need to know for each pass is the
+starting column and row in the output image of the first pixel plus the
+spacing between each pixel. As of libpng 1.5 there are four macros to
+retrieve this information:
+
+ png_uint_32 x = PNG_PASS_START_COL(pass);
+ png_uint_32 y = PNG_PASS_START_ROW(pass);
+ png_uint_32 xStep = 1U << PNG_PASS_COL_SHIFT(pass);
+ png_uint_32 yStep = 1U << PNG_PASS_ROW_SHIFT(pass);
+
+These allow you to write the obvious loop:
+
+ png_uint_32 input_y = 0;
+ png_uint_32 output_y = PNG_PASS_START_ROW(pass);
+
+ while (output_y < output_image_height)
+ {
+ png_uint_32 input_x = 0;
+ png_uint_32 output_x = PNG_PASS_START_COL(pass);
+
+ while (output_x < output_image_width)
+ {
+ image[output_y][output_x] =
+ subimage[pass][input_y][input_x++];
+
+ output_x += xStep;
+ }
+
+ ++input_y;
+ output_y += yStep;
+ }
+
+Notice that the steps between successive output rows and columns are
+returned as shifts. This is possible because the pixels in the subimages
+are always a power of 2 apart - 1, 2, 4 or 8 pixels - in the original
+image. In practice you may need to directly calculate the output coordinate
+given an input coordinate. libpng provides two further macros for this
+purpose:
+
+ png_uint_32 output_x = PNG_COL_FROM_PASS_COL(input_x, pass);
+ png_uint_32 output_y = PNG_ROW_FROM_PASS_ROW(input_y, pass);
+
+Finally a pair of macros are provided to tell you if a particular image
+row or column appears in a given pass:
+
+ int col_in_pass = PNG_COL_IN_INTERLACE_PASS(output_x, pass);
+ int row_in_pass = PNG_ROW_IN_INTERLACE_PASS(output_y, pass);
+
+Bear in mind that you will probably also need to check the width and height
+of the pass in addition to the above to be sure the pass even exists!
+
+With any luck you are convinced by now that you don't want to do your own
+interlace handling. In reality normally the only good reason for doing this
+is if you are processing PNG files on a pixel-by-pixel basis and don't want
+to load the whole file into memory when it is interlaced.
+
+libpng includes a test program, pngvalid, that illustrates reading and
+writing of interlaced images. If you can't get interlacing to work in your
+code and don't want to leave it to libpng (the recommended approach) see
+how pngvalid.c does it.
Finishing a sequential read
@@ -1350,6 +1785,7 @@ It is also possible to individually free the info_ptr members that
point to libpng-allocated storage with the following function:
png_free_data(png_ptr, info_ptr, mask, seq)
+
mask - identifies data to be freed, a mask
containing the bitwise OR of one or
more of
@@ -1359,6 +1795,7 @@ point to libpng-allocated storage with the following function:
PNG_FREE_SCAL, PNG_FREE_SPLT,
PNG_FREE_TEXT, PNG_FREE_UNKN,
or simply PNG_FREE_ALL
+
seq - sequence number of item to be freed
(-1 for all items)
@@ -1376,13 +1813,15 @@ or so that it will free data that was allocated by the user with png_malloc()
or png_zalloc() and passed in via a png_set_*() function, with
png_data_freer(png_ptr, info_ptr, freer, mask)
- mask - which data elements are affected
- same choices as in png_free_data()
+
freer - one of
PNG_DESTROY_WILL_FREE_DATA
PNG_SET_WILL_FREE_DATA
PNG_USER_WILL_FREE_DATA
+ mask - which data elements are affected
+ same choices as in png_free_data()
+
This function only affects data that has already been allocated.
You can call this function after reading the PNG data but before calling
any png_set_*() functions, to control whether the user or the png_set_*()
@@ -1411,6 +1850,7 @@ it frees. If you need to turn the flag off for a chunk that was freed by
your application instead of by libpng, you can use
png_set_invalid(png_ptr, info_ptr, mask);
+
mask - identifies the chunks to be made invalid,
containing the bitwise OR of one or
more of
@@ -1450,21 +1890,24 @@ png_infop info_ptr;
png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
user_error_fn, user_warning_fn);
+
if (!png_ptr)
return (ERROR);
+
info_ptr = png_create_info_struct(png_ptr);
+
if (!info_ptr)
{
- png_destroy_read_struct(&png_ptr, (png_infopp)NULL,
- (png_infopp)NULL);
- return (ERROR);
+ png_destroy_read_struct(&png_ptr,
+ (png_infopp)NULL, (png_infopp)NULL);
+ return (ERROR);
}
if (setjmp(png_jmpbuf(png_ptr)))
{
- png_destroy_read_struct(&png_ptr, &info_ptr,
- (png_infopp)NULL);
- return (ERROR);
+ png_destroy_read_struct(&png_ptr, &info_ptr,
+ (png_infopp)NULL);
+ return (ERROR);
}
/* This one's new. You can provide functions
@@ -1496,9 +1939,9 @@ png_infop info_ptr;
{
if (setjmp(png_jmpbuf(png_ptr)))
{
- png_destroy_read_struct(&png_ptr, &info_ptr,
+ png_destroy_read_struct(&png_ptr, &info_ptr,
(png_infopp)NULL);
- return (ERROR);
+ return (ERROR);
}
/* This one's new also. Simply give it a chunk
@@ -1515,6 +1958,12 @@ png_infop info_ptr;
so there.
*/
png_process_data(png_ptr, info_ptr, buffer, length);
+
+ /* At this point you can call png_process_data_skip if
+ you want to handle data the library will skip yourself;
+ it simply returns the number of bytes to skip (and stops
+ libpng skipping that number of bytes on the next
+ png_process_data call).
return 0;
}
@@ -1535,6 +1984,19 @@ png_infop info_ptr;
any). You may start getting rows before
png_process_data() returns, so this is your
last chance to prepare for that.
+
+ This is where you turn on interlace handling,
+ assuming you don't want to do it yourself.
+
+ If you need to you can stop the processing of
+ your original input data at this point by calling
+ png_process_data_pause. This returns the number
+ of unprocessed bytes from the last png_process_data
+ call - it is up to you to ensure that the next call
+ sees these bytes again. If you don't want to bother
+ with this you can get libpng to cache the unread
+ bytes by setting the 'save' parameter (see png.h) but
+ then libpng will have to copy the data internally.
*/
}
@@ -1555,14 +2017,22 @@ png_infop info_ptr;
supplying them because it may make your life
easier.
- For the non-NULL rows of interlaced images,
+ If you did not turn on interlace handling then
+ the callback is called for each row of each
+ sub-image when the image is interlaced. In this
+ case 'row_num' is the row in the sub-image, not
+ the row in the output image as it is in all other
+ cases.
+
+ For the non-NULL rows of interlaced images when
+ you have switched on libpng interlace handling,
you must call png_progressive_combine_row()
passing in the row and the old row. You can
call this function for NULL rows (it will just
return) and for non-interlaced images (it just
does the memcpy for you) if it will make the
code easier. Thus, you can just do this for
- all cases:
+ all cases if you switch on interlace handling;
*/
png_progressive_combine_row(png_ptr, old_row,
@@ -1576,6 +2046,9 @@ png_infop info_ptr;
for interlaced images), you will have to pass
the current row, and the function will combine
the old row and the new row.
+
+ You can also call png_process_data_pause in this
+ callback - see above.
*/
}
@@ -1610,10 +2083,9 @@ using the standard I/O functions, you will need to replace them with
custom writing functions. See the discussion under Customizing libpng.
FILE *fp = fopen(file_name, "wb");
+
if (!fp)
- {
return (ERROR);
- }
Next, png_struct and png_info need to be allocated and initialized.
As these can be both relatively large, you may not want to store these
@@ -1626,6 +2098,7 @@ both "png_ptr"; you can call them anything you like, such as
png_structp png_ptr = png_create_write_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
user_error_fn, user_warning_fn);
+
if (!png_ptr)
return (ERROR);
@@ -1633,7 +2106,7 @@ both "png_ptr"; you can call them anything you like, such as
if (!info_ptr)
{
png_destroy_write_struct(&png_ptr,
- (png_infopp)NULL);
+ (png_infopp)NULL);
return (ERROR);
}
@@ -1659,7 +2132,7 @@ section below for more information on the libpng error handling.
if (setjmp(png_jmpbuf(png_ptr)))
{
- png_destroy_write_struct(&png_ptr, &info_ptr);
+ png_destroy_write_struct(&png_ptr, &info_ptr);
fclose(fp);
return (ERROR);
}
@@ -1667,9 +2140,13 @@ section below for more information on the libpng error handling.
return;
If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
+you can compile libpng with PNG_NO_SETJMP, in which case
errors will result in a call to PNG_ABORT() which defaults to abort().
+You can #define PNG_ABORT() to a function that does something
+more useful than abort(), as long as your function does not
+return.
+
Now you need to set up the output code. The default for libpng is to
use the C function fwrite(). If you use this, you will need to pass a
valid FILE * in the function png_init_io(). Be sure that the file is
@@ -1694,7 +2171,7 @@ called after each row has been written, which you can use to control
a progress meter or the like. It's demonstrated in pngtest.c.
You must supply a function
- void write_row_callback(png_ptr, png_uint_32 row,
+ void write_row_callback(png_structp png_ptr, png_uint_32 row,
int pass);
{
/* put your code here */
@@ -1725,7 +2202,8 @@ filter types.
/* turn on or off filtering, and/or choose
specific filters. You can use either a single
PNG_FILTER_VALUE_NAME or the bitwise OR of one
- or more PNG_FILTER_NAME masks. */
+ or more PNG_FILTER_NAME masks.
+ */
png_set_filter(png_ptr, 0,
PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB |
@@ -1734,11 +2212,10 @@ filter types.
PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
PNG_ALL_FILTERS);
-If an application
-wants to start and stop using particular filters during compression,
-it should start out with all of the filters (to ensure that the previous
-row of pixels will be stored in case it's needed later), and then add
-and remove them after the start of compression.
+If an application wants to start and stop using particular filters during
+compression, it should start out with all of the filters (to ensure that
+the previous row of pixels will be stored in case it's needed later),
+and then add and remove them after the start of compression.
If you are writing a PNG datastream that is to be embedded in a MNG
datastream, the second parameter can be either 0 or 64.
@@ -1782,16 +2259,20 @@ Some of the more important parts of the png_info are:
png_set_IHDR(png_ptr, info_ptr, width, height,
bit_depth, color_type, interlace_type,
compression_type, filter_method)
+
width - holds the width of the image
in pixels (up to 2^31).
+
height - holds the height of the image
in pixels (up to 2^31).
+
bit_depth - holds the bit depth of one of the
image channels.
(valid values are 1, 2, 4, 8, 16
and depend also on the
color_type. See also significant
bits (sBIT) below).
+
color_type - describes which color/alpha
channels are present.
PNG_COLOR_TYPE_GRAY
@@ -1811,8 +2292,10 @@ Some of the more important parts of the png_info are:
interlace_type - PNG_INTERLACE_NONE or
PNG_INTERLACE_ADAM7
+
compression_type - (must be
PNG_COMPRESSION_TYPE_DEFAULT)
+
filter_method - (must be PNG_FILTER_TYPE_DEFAULT
or, if you are writing a PNG to
be embedded in a MNG datastream,
@@ -1830,15 +2313,22 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_PLTE(png_ptr, info_ptr, palette,
num_palette);
+
palette - the palette for the file
(array of png_color)
num_palette - number of entries in the palette
- png_set_gAMA(png_ptr, info_ptr, gamma);
- gamma - the gamma the image was created
- at (PNG_INFO_gAMA)
+ png_set_gAMA(png_ptr, info_ptr, file_gamma);
+ png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
+
+ file_gamma - the gamma at which the image was
+ created (PNG_INFO_gAMA)
+
+ int_file_gamma - 100,000 times the gamma at which
+ the image was created
png_set_sRGB(png_ptr, info_ptr, srgb_intent);
+
srgb_intent - the rendering intent
(PNG_INFO_sRGB) The presence of
the sRGB chunk means that the pixel
@@ -1858,6 +2348,7 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
srgb_intent);
+
srgb_intent - the rendering intent
(PNG_INFO_sRGB) The presence of the
sRGB chunk means that the pixel
@@ -1868,17 +2359,22 @@ width, height, bit_depth, and color_type must be the same in each call.
written.
png_set_iCCP(png_ptr, info_ptr, name, compression_type,
- profile, proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
+ profile, proflen);
+
+ name - The profile name.
+
+ compression_type - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+
+ proflen - length of profile data in bytes.
png_set_sBIT(png_ptr, info_ptr, sig_bit);
+
sig_bit - the number of significant bits for
(PNG_INFO_sBIT) each of the gray, red,
green, and blue channels, whichever are
@@ -1887,30 +2383,37 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_tRNS(png_ptr, info_ptr, trans_alpha,
num_trans, trans_color);
+
trans_alpha - array of alpha (transparency)
entries for palette (PNG_INFO_tRNS)
+
trans_color - graylevel or color sample values
(in order red, green, blue) of the
single transparent color for
non-paletted images (PNG_INFO_tRNS)
+
num_trans - number of transparent entries
(PNG_INFO_tRNS)
png_set_hIST(png_ptr, info_ptr, hist);
- (PNG_INFO_hIST)
+
hist - histogram of palette (array of
- png_uint_16)
+ png_uint_16) (PNG_INFO_hIST)
png_set_tIME(png_ptr, info_ptr, mod_time);
+
mod_time - time image was last modified
(PNG_VALID_tIME)
png_set_bKGD(png_ptr, info_ptr, background);
+
background - background color (PNG_VALID_bKGD)
png_set_text(png_ptr, info_ptr, text_ptr, num_text);
+
text_ptr - array of png_text holding image
comments
+
text_ptr[i].compression - type of compression used
on "text" PNG_TEXT_COMPRESSION_NONE
PNG_TEXT_COMPRESSION_zTXt
@@ -1936,6 +2439,7 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_sPLT(png_ptr, info_ptr, &palette_ptr,
num_spalettes);
+
palette_ptr - array of png_sPLT_struct structures
to be added to the list of palettes
in the info structure.
@@ -1944,35 +2448,48 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y,
unit_type);
+
offset_x - positive offset from the left
edge of the screen
+
offset_y - positive offset from the top
edge of the screen
+
unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
png_set_pHYs(png_ptr, info_ptr, res_x, res_y,
unit_type);
+
res_x - pixels/unit physical resolution
in x direction
+
res_y - pixels/unit physical resolution
in y direction
+
unit_type - PNG_RESOLUTION_UNKNOWN,
PNG_RESOLUTION_METER
png_set_sCAL(png_ptr, info_ptr, unit, width, height)
+
unit - physical scale units (an integer)
+
width - width of a pixel in physical scale units
+
height - height of a pixel in physical scale units
(width and height are doubles)
png_set_sCAL_s(png_ptr, info_ptr, unit, width, height)
+
unit - physical scale units (an integer)
+
width - width of a pixel in physical scale units
+
height - height of a pixel in physical scale units
(width and height are strings like "2.54")
png_set_unknown_chunks(png_ptr, info_ptr, &unknowns,
num_unknowns)
+
unknowns - array of png_unknown_chunk
structures holding unknown chunks
unknowns[i].name - name of unknown chunk
@@ -2011,21 +2528,30 @@ Until text gets around 1000 bytes, it is not worth compressing it.
After the text has been written out to the file, the compression type
is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR,
so that it isn't written out again at the end (in case you are calling
-png_write_end() with the same struct.
+png_write_end() with the same struct).
The keywords that are given in the PNG Specification are:
Title Short (one line) title or
caption for image
+
Author Name of image's creator
+
Description Description of image (possibly long)
+
Copyright Copyright notice
+
Creation Time Time of original image creation
(usually RFC 1123 format, see below)
+
Software Software used to create the image
+
Disclaimer Legal disclaimer
+
Warning Warning of nature of content
+
Source Device used to create the image
+
Comment Miscellaneous comment; conversion
from other image format
@@ -2195,17 +2721,19 @@ file so that decoders can recover the original data if desired.
/* Set the true bit depth of the image data */
if (color_type & PNG_COLOR_MASK_COLOR)
{
- sig_bit.red = true_bit_depth;
- sig_bit.green = true_bit_depth;
- sig_bit.blue = true_bit_depth;
+ sig_bit.red = true_bit_depth;
+ sig_bit.green = true_bit_depth;
+ sig_bit.blue = true_bit_depth;
}
+
else
{
- sig_bit.gray = true_bit_depth;
+ sig_bit.gray = true_bit_depth;
}
+
if (color_type & PNG_COLOR_MASK_ALPHA)
{
- sig_bit.alpha = true_bit_depth;
+ sig_bit.alpha = true_bit_depth;
}
png_set_sBIT(png_ptr, info_ptr, &sig_bit);
@@ -2251,11 +2779,18 @@ with
You must supply the function
- void write_transform_fn(png_ptr ptr, row_info_ptr
- row_info, png_bytep data)
+ void write_transform_fn(png_structp png_ptr ptr,
+ row_info_ptr row_info, png_bytep data)
See pngtest.c for a working example. Your function will be called
-before any of the other transformations are processed.
+before any of the other transformations are processed. If supported
+libpng also supplies an information routine that may be called from
+your callback:
+
+ png_get_current_row_number(png_ptr);
+
+This returns the current row passed to the transform. Even with interlaced
+images the value returned is the row in the final output image.
You can also set up a pointer to a user structure for use by your
callback function.
@@ -2337,25 +2872,39 @@ for details of which pixels to write when.
If you don't want libpng to handle the interlacing details, just
use png_set_interlace_handling() and call png_write_rows() the
-correct number of times to write all seven sub-images.
+correct number of times to write all the sub-images
+(png_set_interlace_handling() returns the number of sub-images.)
If you want libpng to build the sub-images, call this before you start
writing any rows:
- number_of_passes =
- png_set_interlace_handling(png_ptr);
+ number_of_passes = png_set_interlace_handling(png_ptr);
This will return the number of passes needed. Currently, this is seven,
but may change if another interlace type is added.
Then write the complete image number_of_passes times.
- png_write_rows(png_ptr, row_pointers,
- number_of_rows);
+ png_write_rows(png_ptr, row_pointers, number_of_rows);
-As some of these rows are not used, and thus return immediately, you may
-want to read about interlacing in the PNG specification, and only update
-the rows that are actually used.
+Think carefully before you write an interlaced image. Typically code that
+reads such images reads all the image data into memory, uncompressed, before
+doing any processing. Only code that can display an image on the fly can
+take advantage of the interlacing and even then the image has to be exactly
+the correct size for the output device, because scaling an image requires
+adjacent pixels and these are not available until all the passes have been
+read.
+
+If you do write an interlaced image you will hardly ever need to handle
+the interlacing yourself. Call png_set_interlace_handling() and use the
+approach described above.
+
+The only time it is conceivable that you will really need to write an
+interlaced image pass-by-pass is when you have read one pass by pass and
+made some pixel-by-pixel transformation to it, as described in the read
+code above. In this case use the PNG_PASS_ROWS and PNG_PASS_COLS macros
+to determine the size of each sub-image in turn and simply write the rows
+you obtained from the read code.
Finishing a sequential write
@@ -2374,6 +2923,7 @@ It is also possible to individually free the info_ptr members that
point to libpng-allocated storage with the following function:
png_free_data(png_ptr, info_ptr, mask, seq)
+
mask - identifies data to be freed, a mask
containing the bitwise OR of one or
more of
@@ -2383,6 +2933,7 @@ point to libpng-allocated storage with the following function:
PNG_FREE_SCAL, PNG_FREE_SPLT,
PNG_FREE_TEXT, PNG_FREE_UNKN,
or simply PNG_FREE_ALL
+
seq - sequence number of item to be freed
(-1 for all items)
@@ -2404,19 +2955,22 @@ or so that it will free data that was allocated by the user with png_malloc()
or png_zalloc() and passed in via a png_set_*() function, with
png_data_freer(png_ptr, info_ptr, freer, mask)
- mask - which data elements are affected
- same choices as in png_free_data()
+
freer - one of
PNG_DESTROY_WILL_FREE_DATA
PNG_SET_WILL_FREE_DATA
PNG_USER_WILL_FREE_DATA
+ mask - which data elements are affected
+ same choices as in png_free_data()
+
For example, to transfer responsibility for some data from a read structure
to a write structure, you could use
png_data_freer(read_ptr, read_info_ptr,
PNG_USER_WILL_FREE_DATA,
PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
+
png_data_freer(write_ptr, write_info_ptr,
PNG_DESTROY_WILL_FREE_DATA,
PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
@@ -2463,9 +3017,11 @@ these functions, call the appropriate png_set_*_fn() function.
Memory allocation is done through the functions png_malloc(), png_calloc(),
and png_free(). These currently just call the standard C functions.
-png_calloc() calls png_malloc() and then png_memset() to clear the newly
-allocated memory to zero. If your pointers can't access more then 64K
-at a time, you will want to set MAXSEG_64K in zlib.h. Since it is
+png_calloc() calls png_malloc() and then clears the newly
+allocated memory to zero. There is limited support for certain systems
+with segmented memory architectures and the types of pointers declared by
+png.h match this; you will have to use appropriate pointers in your
+application. Since it is
unlikely that the method of handling memory allocation on a platform
will change between applications, these functions must be modified in
the library at compile time. If you prefer to use a different method
@@ -2479,7 +3035,8 @@ via
Your replacement memory functions must have prototypes as follows:
png_voidp malloc_fn(png_structp png_ptr,
- png_size_t size);
+ png_alloc_size_t size);
+
void free_fn(png_structp png_ptr, png_voidp ptr);
Your malloc_fn() must return NULL in case of failure. The png_malloc()
@@ -2512,8 +3069,10 @@ The replacement I/O functions must have prototypes as follows:
void user_read_data(png_structp png_ptr,
png_bytep data, png_size_t length);
+
void user_write_data(png_structp png_ptr,
png_bytep data, png_size_t length);
+
void user_flush_data(png_structp png_ptr);
The user_read_data() function is responsible for detecting and
@@ -2530,8 +3089,9 @@ Error handling in libpng is done through png_error() and png_warning().
Errors handled through png_error() are fatal, meaning that png_error()
should never return to its caller. Currently, this is handled via
setjmp() and longjmp() (unless you have compiled libpng with
-PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()),
-but you could change this to do things like exit() if you should wish.
+PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()),
+but you could change this to do things like exit() if you should wish,
+as long as your function does not return.
On non-fatal errors, png_warning() is called
to print a warning message, and then control returns to the calling code.
@@ -2557,6 +3117,7 @@ parameters as follows:
void user_error_fn(png_structp png_ptr,
png_const_charp error_msg);
+
void user_warning_fn(png_structp png_ptr,
png_const_charp warning_msg);
@@ -2667,8 +3228,10 @@ zlib.h for more information on what these mean.
png_set_compression_strategy(png_ptr,
strategy);
+
png_set_compression_window_bits(png_ptr,
window_bits);
+
png_set_compression_method(png_ptr, method);
png_set_compression_buffer_size(png_ptr, size);
@@ -2758,6 +3321,8 @@ before recompiling libpng and save yourself code and data space, or
you can turn off individual capabilities with defines that begin with
PNG_NO_.
+In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead.
+
You can also turn all of the transforms and ancillary chunk capabilities
off en masse with compiler directives that define
PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
@@ -2810,8 +3375,8 @@ according to printf-style formatting directives. For example,
is expanded to
- if(PNG_DEBUG > 2)
- fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
+ if (PNG_DEBUG > 2)
+ fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
can still use PNG_DEBUG to control your own debugging:
@@ -2832,11 +3397,13 @@ Libpng can support some of these extensions. To enable them, use the
png_permit_mng_features() function:
feature_set = png_permit_mng_features(png_ptr, mask)
+
mask is a png_uint_32 containing the bitwise OR of the
features you want to enable. These include
PNG_FLAG_MNG_EMPTY_PLTE
PNG_FLAG_MNG_FILTER_64
PNG_ALL_MNG_FEATURES
+
feature_set is a png_uint_32 that is the bitwise AND of
your mask with the set of MNG features that is
supported by the version of libpng that you are using.
@@ -2861,7 +3428,7 @@ still alive and well, but they have moved on to other things.
The old libpng functions png_read_init(), png_write_init(),
png_info_init(), png_read_destroy(), and png_write_destroy() have been
moved to PNG_INTERNAL in version 0.95 to discourage their use. These
-functions will be removed from libpng version 2.0.0.
+functions will be removed from libpng version 1.4.0.
The preferred method of creating and initializing the libpng structures is
via the png_create_read_struct(), png_create_write_struct(), and
@@ -3050,21 +3617,29 @@ png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(),
png_set_asm_flags(), and png_mmx_supported()
We removed the obsolete png_check_sig(), png_memcpy_check(), and
-png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(),
-and png_memset(), respectively.
+png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(),
+and memset(), respectively.
The function png_set_gray_1_2_4_to_8() was removed. It has been
deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
png_set_expand_gray_1_2_4_to_8() because the former function also
expanded palette images.
+Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32
+were added and are used by default instead of the corresponding
+functions. Unfortunately,
+from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
+function) incorrectly returned a value of type png_uint_32.
+
We changed the prototype for png_malloc() from
png_malloc(png_structp png_ptr, png_uint_32 size)
to
png_malloc(png_structp png_ptr, png_alloc_size_t size)
+This also applies to the prototype for the user replacement malloc_fn().
+
The png_calloc() function was added and is used in place of
-of "png_malloc(); png_memset();" except in the case in png_read_png()
+of "png_malloc(); memset();" except in the case in png_read_png()
where the array consists of pointers; in this case a "for" loop is used
after the png_malloc() to set the pointers to NULL, to give robust.
behavior in case the application runs out of memory part-way through
@@ -3082,9 +3657,287 @@ The png_zalloc() and png_zfree() functions are no longer exported.
The png_zalloc() function no longer zeroes out the memory that it
allocates.
+Support for dithering was disabled by default in libpng-1.4.0, because
+been well tested and doesn't actually "dither". The code was not
+removed, however, and could be enabled by building libpng with
+PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
+was reenabled, but the function was renamed png_set_quantize() to
+reflect more accurately what it actually does. At the same time,
+the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
+PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
+was renamed to PNG_READ_QUANTIZE_SUPPORTED.
+
We removed the trailing '.' from the warning and error messages.
-X. Detecting libpng
+X. Changes to Libpng from version 1.4.x to 1.5.x
+
+From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
+function) incorrectly returned a value of type png_uint_32.
+
+A. Changes that affect users of libpng
+
+There are no substantial API changes between the non-deprecated parts of
+the 1.4.5 API and the 1.5.0 API, however the ability to directly access
+the main libpng control structures, png_struct and png_info, deprecated
+in earlier versions of libpng, has been completely removed from
+libpng 1.5.
+
+We no longer include zlib.h in png.h. Applications that need access
+to information in zlib.h will need to add the '#include "zlib.h"'
+directive. It does not matter whether it is placed prior to or after
+the '"#include png.h"' directive.
+
+We moved the png_strcpy(), png_strncpy(), png_strlen(), png_memcpy(),
+png_memcmp(), png_sprintf, and png_memcpy() macros into a private
+header file (pngpriv.h) that is not accessible to applications.
+
+In png_get_iCCP, the type of "profile" was changed from png_charpp
+to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep.
+
+There are changes of form in png.h, including new and changed macros to
+declare
+parts of the API. Some API functions with arguments that are pointers to
+data not modified within the function have been corrected to declare
+these arguments with PNG_CONST.
+
+Much of the internal use of C macros to control the library build has also
+changed and some of this is visible in the exported header files, in
+particular the use of macros to control data and API elements visible
+during application compilation may require significant revision to
+application code. (It is extremely rare for an application to do this.)
+
+Any program that compiled against libpng 1.4 and did not use deprecated
+features or access internal library structures should compile and work
+against libpng 1.5.
+
+libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of
+interlaced images. The macros return the number of rows and columns in
+each pass and information that can be used to de-interlace and (if
+absolutely necessary) interlace an image.
+
+libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls
+the application provided png_longjmp_ptr on the internal, but application
+initialized, jmpbuf. It is provided as a convenience to avoid the need
+to use the png_jmpbuf macro, which had the unnecessary side effect of
+resetting the internal png_longjmp_ptr value.
+
+libpng 1.5.0 includes a complete fixed point API. By default this is
+present along with the corresponding floating point API. In general the
+fixed point API is faster and smaller than the floating point one because
+the PNG file format used fixed point, not floating point. This applies
+even if the library uses floating point in internal calculations. A new
+macro, PNG_FLOATING_ARITHMETIC_SUPPORTED, reveals whether the library
+uses floating point arithmetic (the default) or fixed point arithmetic
+internally for performance critical calculations such as gamma correction.
+In some cases, the gamma calculations may produce slightly different
+results. This has changed the results in png_rgb_to_gray and in alpha
+composition (png_set_background for example). This applies even if the
+original image was already linear (gamma == 1.0) and, therefore, it is
+not necessary to linearize the image. This is because libpng has *not*
+been changed to optimize that case correctly, yet.
+
+Fixed point support for the sCAL chunk comes with an important caveat;
+the sCAL specification uses a decimal encoding of floating point values
+and the accuracy of PNG fixed point values is insufficient for
+representation of these values. Consequently a "string" API
+(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
+arbitrary sCAL chunks in the absence of either the floating point API or
+internal floating point calculations.
+
+Applications no longer need to include the optional distribution header
+file pngusr.h or define the corresponding macros during application
+build in order to see the correct variant of the libpng API. From 1.5.0
+application code can check for the corresponding _SUPPORTED macro:
+
+#ifdef PNG_INCH_CONVERSIONS_SUPPORTED
+ /* code that uses the inch conversion APIs. */
+#endif
+
+This macro will only be defined if the inch conversion functions have been
+compiled into libpng. The full set of macros, and whether or not support
+has been compiled in, are available in the header file pnglibconf.h.
+This header file is specific to the libpng build. Notice that prior to
+1.5.0 the _SUPPORTED macros would always have the default definition unless
+reset by pngusr.h or by explicit settings on the compiler command line.
+These settings may produce compiler warnings or errors in 1.5.0 because
+of macro redefinition.
+
+From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
+function) incorrectly returned a value of type png_uint_32. libpng 1.5.0
+is consistent with the implementation in 1.4.5 and 1.2.x (where the macro
+did not exist.)
+
+Applications can now choose whether to use these macros or to call the
+corresponding function by defining PNG_USE_READ_MACROS or
+PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
+only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0
+ will lead to a link failure.
+
+B. Changes to the build and configuration of libpng
+
+Details of internal changes to the library code can be found in the CHANGES
+file. These will be of no concern to the vast majority of library users or
+builders, however the few who configure libpng to a non-default feature
+set may need to change how this is done.
+
+There should be no need for library builders to alter build scripts if
+these use the distributed build support - configure or the makefiles -
+however users of the makefiles may care to update their build scripts
+to build pnglibconf.h where the corresponding makefile does not do so.
+
+Building libpng with a non-default configuration has changed completely.
+The old method using pngusr.h should still work correctly even though the
+way pngusr.h is used in the build has been changed, however library
+builders will probably want to examine the changes to take advantage of
+new capabilities and to simplify their build system.
+
+B.1 Specific changes to library configuration capabilities
+
+The library now supports a complete fixed point implementation and can
+thus be used on systems which have no floating point support or very
+limited or slow support. Previously gamma correction, an essential part
+of complete PNG support, required reasonably fast floating point.
+
+As part of this the choice of internal implementation has been made
+independent of the choice of fixed versus floating point APIs and all the
+missing fixed point APIs have been implemented.
+
+The exact mechanism used to control attributes of API functions has
+changed. A single set of operating system independent macro definitions
+is used and operating system specific directives are defined in
+pnglibconf.h
+
+As part of this the mechanism used to choose procedure call standards on
+those systems that allow a choice has been changed. At present this only
+affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
+running on Intel processors. As before PNGAPI is defined where required
+to control the exported API functions; however, two new macros, PNGCBAPI
+and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
+(PNGCAPI) for functions that must match a C library prototype (currently
+only png_longjmp_ptr, which must match the C longjmp function.) The new
+approach is documented in pngconf.h
+
+Despite these changes libpng 1.5.0 only supports the native C function
+calling standard on those platforms tested so far (__cdecl on Microsoft
+Windows). This is because the support requirements for alternative
+calling conventions seem to no longer exist. Developers who find it
+necessary to set PNG_API_RULE to 1 should advise the mailing list
+(png-mng-implement) of this and library builders who use Openwatcom and
+therefore set PNG_API_RULE to 2 should also contact the mailing list.
+
+A new test program, pngvalid, is provided in addition to pngtest.
+pngvalid validates the arithmetic accuracy of the gamma correction
+calculations and includes a number of validations of the file format.
+A subset of the full range of tests is run when "make check" is done
+(in the 'configure' build.) pngvalid also allows total allocated memory
+usage to be evaluated and performs additional memory overwrite validation.
+
+Many changes to individual feature macros have been made. The following
+are the changes most likely to be noticed by library builders who
+configure libpng:
+
+1) All feature macros now have consistent naming:
+
+#define PNG_NO_feature turns the feature off
+#define PNG_feature_SUPPORTED turns the feature on
+
+pnglibconf.h contains one line for each feature macro which is either:
+
+#define PNG_feature_SUPPORTED
+
+if the feature is supported or:
+
+/*#undef PNG_feature_SUPPORTED*/
+
+if it is not. Library code consistently checks for the 'SUPPORTED' macro.
+It does not, and should not, check for the 'NO' macro which will not
+normally be defined even if the feature is not supported.
+
+Compatibility with the old names is provided as follows:
+
+PNG_INCH_CONVERSIONS turns on PNG_INCH_CONVERSIONS_SUPPORTED
+
+And the following definitions disable the corresponding feature:
+
+PNG_SETJMP_NOT_SUPPORTED disables SETJMP
+PNG_READ_TRANSFORMS_NOT_SUPPORTED disables READ_TRANSFORMS
+PNG_NO_READ_COMPOSITED_NODIV disables READ_COMPOSITE_NODIV
+PNG_WRITE_TRANSFORMS_NOT_SUPPORTED disables WRITE_TRANSFORMS
+PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED disables READ_ANCILLARY_CHUNKS
+PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED disables WRITE_ANCILLARY_CHUNKS
+
+Library builders should remove use of the above, inconsistent, names.
+
+2) Warning and error message formatting was previously conditional on
+the STDIO feature. The library has been changed to use the
+CONSOLE_IO feature instead. This means that if CONSOLE_IO is disabled
+the library no longer uses the printf(3) functions, even though the
+default read/write implementations use (FILE) style stdio.h functions.
+
+3) Three feature macros now control the fixed/floating point decisions:
+
+PNG_FLOATING_POINT_SUPPORTED enables the floating point APIs
+
+PNG_FIXED_POINT_SUPPORTED enables the fixed point APIs; however, in
+practice these are normally required internally anyway (because the PNG
+file format is fixed point), therefore in most cases PNG_NO_FIXED_POINT
+merely stops the function from being exported.
+
+PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating
+point implementation or the fixed point one. Typically the fixed point
+implementation is larger and slower than the floating point implementation
+on a system that supports floating point, however it may be faster on a
+system which lacks floating point hardware and therefore uses a software
+emulation.
+
+4) Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the
+functions to read and write ints to be disabled independently of
+PNG_USE_READ_MACROS, which allows libpng to be built with the functions
+even though the default is to use the macros - this allows applications
+to choose at app buildtime whether or not to use macros (previously
+impossible because the functions weren't in the default build.)
+
+B.2 Changes to the configuration mechanism
+
+Prior to libpng-1.5.0 library builders who needed to configure libpng
+had either to modify the exported pngconf.h header file to add system
+specific configuration or had to write feature selection macros into
+pngusr.h and cause this to be included into pngconf.h by defining
+PNG_USER_CONFIG. The latter mechanism had the disadvantage that an
+application built without PNG_USER_CONFIG defined would see the
+unmodified, default, libpng API and thus would probably fail to link.
+
+These mechanisms still work in the configure build and in any makefile
+build that builds pnglibconf.h although the feature selection macros
+have changed somewhat as described above. In 1.5.0, however, pngusr.h is
+processed only once, when the exported header file pnglibconf.h is built.
+pngconf.h no longer includes pngusr.h, therefore it is ignored after the
+build of pnglibconf.h and it is never included in an application build.
+
+The rarely used alternative of adding a list of feature macros to the
+CFLAGS setting in the build also still works, however the macros will be
+copied to pnglibconf.h and this may produce macro redefinition warnings
+when the individual C files are compiled.
+
+All configuration now only works if pnglibconf.h is built from
+scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan
+(the original author of awk) maintains C source code of that awk and this
+and all known later implementations (often called by subtly different
+names - nawk and gawk for example) are adequate to build pnglibconf.h.
+The Sun Microsystems (now Oracle) program 'awk' is an earlier version
+and does not work, this may also apply to other systems that have a
+functioning awk called 'nawk'.
+
+Configuration options are now documented in scripts/pnglibconf.dfa. This
+file also includes dependency information that ensures a configuration is
+consistent; that is, if a feature is switched off dependent features are
+also removed. As a recommended alternative to using feature macros in
+pngusr.h a system builder may also define equivalent options in pngusr.dfa
+(or, indeed, any file) and add that to the configuration by setting
+DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate
+how to do this, and a case where pngusr.h is still required.
+
+XI. Detecting libpng
The png_get_io_ptr() function has been present since libpng-0.88, has never
changed, and is unaffected by conditional compilation macros. It is the
@@ -3093,7 +3946,7 @@ libpng version since 0.88. In an autoconf "configure.in" you could use
AC_CHECK_LIB(png, png_get_io_ptr, ...
-XI. Source code repository
+XII. Source code repository
Since about February 2009, version 1.2.34, libpng has been under "git" source
control. The git repository was built from old libpng-x.y.z.tar.gz files
@@ -3112,7 +3965,12 @@ the libpng bug tracker at
http://libpng.sourceforge.net
-XII. Coding style
+We also accept patches built from the tar or zip distributions, and
+simple verbal discriptions of bug fixes, reported either to the
+SourceForge bug tracker or to the png-mng-implement at lists.sf.net
+mailing list.
+
+XIII. Coding style
Our coding style is similar to the "Allman" style, with curly
braces on separate lines:
@@ -3151,12 +4009,12 @@ the statement that follows the comment:
/* Single-line comment */
statement;
- /* Multiple-line
- * comment
+ /* This is a multiple-line
+ * comment.
*/
statement;
-Very short comments can be placed at the end of the statement
+Very short comments can be placed after the end of the statement
to which they pertain:
statement; /* comment */
@@ -3169,7 +4027,7 @@ Functions and their curly braces are not indented, and
exported functions are marked with PNGAPI:
/* This is a public function that is visible to
- * application programers. It does thus-and-so.
+ * application programmers. It does thus-and-so.
*/
void PNGAPI
png_exported_function(png_ptr, png_info, foo)
@@ -3197,15 +4055,16 @@ above the comment that says
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
-The names of all exported functions and variables begin
-with "png_", and all publicly visible C preprocessor
-macros begin with "PNG_".
+To avoid polluting the global namespace, the names of all exported
+functions and variables begin with "png_", and all publicly visible C
+preprocessor macros begin with "PNG_". We request that applications that
+use libpng *not* begin any of their own symbols with either of these strings.
We put a space after each comma and after each semicolon
-in "for" statments, and we put spaces before and after each
-C binary operator and after "for" or "while". We don't
-put a space between a typecast and the expression being
-cast, nor do we put one between a function name and the
+in "for" statements, and we put spaces before and after each
+C binary operator and after "for" or "while", and before
+"?". We don't put a space between a typecast and the expression
+being cast, nor do we put one between a function name and the
left parenthesis that follows it:
for (i = 2; i > 0; --i)
@@ -3220,15 +4079,15 @@ Lines do not exceed 80 characters.
Other rules can be inferred by inspecting the libpng source.
-XIII. Y2K Compliance in libpng
+XIV. Y2K Compliance in libpng
-January 3, 2010
+February 3, 2011
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.4.0 are Y2K compliant. It is my belief that earlier
+upward through 1.5.1 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
diff --git a/src/3rdparty/libpng/libpng.3 b/src/3rdparty/libpng/libpng.3
index 6b77fde..ecc4277 100644
--- a/src/3rdparty/libpng/libpng.3
+++ b/src/3rdparty/libpng/libpng.3
@@ -1,6 +1,6 @@
-.TH LIBPNG 3 "January 3, 2010"
+.TH LIBPNG 3 "February 3, 2011"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
+libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1
.SH SYNOPSIS
\fI\fB
@@ -16,6 +16,14 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_voidp png_calloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_chunk_benign_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
\fI\fB
@@ -48,7 +56,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_structp png_create_read_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+\fBpng_structp png_create_read_struct_2 (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
\fI\fB
@@ -56,7 +64,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_structp png_create_write_struct_2(png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+\fBpng_structp png_create_write_struct_2 (png_const_charp \fP\fIuser_png_ver\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fP\fIwarn_fn\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_data_freer (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIfreer\fP\fB, png_uint_32 \fImask)\fP\fB);\fP
\fI\fB
@@ -72,6 +84,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_err (png_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_error (png_structp \fP\fIpng_ptr\fP\fB, png_const_charp \fIerror\fP\fB);\fP
\fI\fB
@@ -84,7 +100,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_free_default(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP
+\fBvoid png_free_default (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fIptr\fP\fB);\fP
\fI\fB
@@ -92,75 +108,89 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_byte png_get_bit_depth (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_byte png_get_bit_depth (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP
+\fBpng_uint_32 png_get_bKGD (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_16p \fI*background\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_channels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_byte png_get_channels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP
+\fBpng_uint_32 png_get_cHRM (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fP\fI*white_x\fP\fB, double \fP\fI*white_y\fP\fB, double \fP\fI*red_x\fP\fB, double \fP\fI*red_y\fP\fB, double \fP\fI*green_x\fP\fB, double \fP\fI*green_y\fP\fB, double \fP\fI*blue_x\fP\fB, double \fI*blue_y\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP
+\fBpng_uint_32 png_get_cHRM_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*white_x\fP\fB, png_uint_32 \fP\fI*white_y\fP\fB, png_uint_32 \fP\fI*red_x\fP\fB, png_uint_32 \fP\fI*red_y\fP\fB, png_uint_32 \fP\fI*green_x\fP\fB, png_uint_32 \fP\fI*green_y\fP\fB, png_uint_32 \fP\fI*blue_x\fP\fB, png_uint_32 \fI*blue_y\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_chunk_cache_max (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_chunk_cache_max (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_color_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fI\fB
+
+\fBpng_alloc_size_t png_get_chunk_malloc_max (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_compression_buffer_size (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_color_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_compression_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_compression_buffer_size (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_copyright (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_compression_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_error_ptr (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_copyright (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_filter_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_current_row_number \fI(png_const_structp\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP
+\fBpng_byte png_get_current_pass_number \fI(png_const_structp\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP
+\fBpng_voidp png_get_error_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_header_ver (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_filter_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_header_version (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_gAMA (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, double \fI*file_gamma\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP
+\fBpng_uint_32 png_get_gAMA_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fI*int_file_gamma\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_charpp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP
+\fBpng_byte png_get_header_ver (png_const_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_byte png_get_header_version (png_const_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_hIST (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_16p \fI*hist\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_iCCP (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charpp \fP\fIname\fP\fB, int \fP\fI*compression_type\fP\fB, png_bytepp \fP\fIprofile\fP\fB, png_uint_32 \fI*proflen\fP\fB);\fP
\fI\fB
@@ -168,11 +198,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_uint_32 png_get_image_height (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_image_height (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_image_width (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_image_width (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -180,7 +210,15 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_byte png_get_interlace_type (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_byte png_get_interlace_type (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_const_bytep png_get_io_chunk_name (png_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_io_chunk_type (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -188,77 +226,105 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_byte png_get_libpng_ver (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_io_state (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_mem_ptr(png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_byte png_get_libpng_ver (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP
+\fBpng_voidp png_get_mem_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP
+\fBpng_uint_32 png_get_oFFs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*offset_x\fP\fB, png_uint_32 \fP\fI*offset_y\fP\fB, int \fI*unit_type\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP
+\fBpng_uint_32 png_get_pCAL (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fI*purpose\fP\fB, png_int_32 \fP\fI*X0\fP\fB, png_int_32 \fP\fI*X1\fP\fB, int \fP\fI*type\fP\fB, int \fP\fI*nparams\fP\fB, png_charp \fP\fI*units\fP\fB, png_charpp \fI*params\fP\fB);\fP
\fI\fB
-\fBfloat png_get_pixel_aspect_ratio (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_pHYs (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBfloat png_get_pixel_aspect_ratio (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_progressive_ptr (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_pHYs_dpi (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fP\fI*res_x\fP\fB, png_uint_32 \fP\fI*res_y\fP\fB, int \fI*unit_type\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP
+\fBpng_fixed_point png_get_pixel_aspect_ratio_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_byte png_get_rgb_to_gray_status (png_structp \fIpng_ptr)
+\fBpng_uint_32 png_get_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
-\fBpng_uint_32 png_get_rowbytes (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fI\fB
+
+\fBpng_uint_32 png_get_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_voidp png_get_progressive_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_PLTE (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_colorp \fP\fI*palette\fP\fB, int \fI*num_palette\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_byte png_get_rgb_to_gray_status (png_const_structp \fIpng_ptr)
+
+\fBpng_uint_32 png_get_rowbytes (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_bytepp png_get_rows (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_bytepp png_get_rows (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_sBIT (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_color_8p \fI*sig_bit\fP\fB);\fP
+\fBvoid png_get_sCAL (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, double* \fP\fIwidth\fP\fB, double* \fIheight\fP\fB);\fP
\fI\fB
-\fBpng_bytep png_get_signature (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBvoid png_get_sCAL_fixed (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, png_fixed_pointp \fP\fIwidth\fP\fB, png_fixed_pointp \fIheight\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP
+\fBvoid png_get_sCAL_s (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int* \fP\fIunit\fP\fB, png_charpp \fP\fIwidth\fP\fB, png_charpp \fIheight\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fI*intent\fP\fB);\fP
+\fBpng_bytep png_get_signature (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_text (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP
+\fBpng_uint_32 png_get_sPLT (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_spalette_p \fI*splt_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP
+\fBpng_uint_32 png_get_sRGB (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, int \fI*file_srgb_intent\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP
+\fBpng_uint_32 png_get_text (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fI*text_ptr\fP\fB, int \fI*num_text\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_tIME (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_timep \fI*mod_time\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_tRNS (png_const_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fI*trans_alpha\fP\fB, int \fP\fI*num_trans\fP\fB, png_color_16p \fI*trans_color\fP\fB);\fP
\fI\fB
@@ -268,7 +334,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_uint_32 png_get_uint_31 (png_bytep \fIbuf\fP\fB);\fP
+\fBpng_uint_32 png_get_uint_31 (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIbuf\fP\fB);\fP
\fI\fB
@@ -278,51 +344,75 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_uint_32 png_get_unknown_chunks (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP
+\fBpng_uint_32 png_get_unknown_chunks (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_unknown_chunkpp \fIunknowns\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_voidp png_get_user_chunk_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_user_height_max (png_const_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_voidp png_get_user_transform_ptr (png_const_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_user_width_max (png_const_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_user_chunk_ptr (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_valid (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_user_height_max( png_structp \fIpng_ptr\fP\fB);\fP
+\fBfloat png_get_x_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_get_user_transform_ptr (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_fixed_point png_get_x_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_user_width_max (png_structp \fIpng_ptr\fP\fB);\fP
+\fBpng_int_32 png_get_x_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_valid (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIflag\fP\fB);\fP
+\fBpng_int_32 png_get_x_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_int_32 png_get_x_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_x_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_int_32 png_get_x_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_uint_32 png_get_x_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_x_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBfloat png_get_y_offset_inches (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_int_32 png_get_y_offset_microns (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_fixed_point png_get_y_offset_inches_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_int_32 png_get_y_offset_pixels (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_int_32 png_get_y_offset_microns (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
-\fBpng_uint_32 png_get_y_pixels_per_meter (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
+\fBpng_int_32 png_get_y_offset_pixels (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_y_pixels_per_inch (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_get_y_pixels_per_meter (png_const_structp \fP\fIpng_ptr\fP\fB, png_const_infop \fIinfo_ptr\fP\fB);\fP
\fI\fB
@@ -330,23 +420,31 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_info_init_3 (png_infopp \fP\fIinfo_ptr\fP\fB, png_size_t \fIpng_info_struct_size\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_init_io (png_structp \fP\fIpng_ptr\fP\fB, FILE \fI*fp\fP\fB);\fP
\fI\fB
+\fBvoid png_longjmp (png_structp \fP\fIpng_ptr\fP\fB, int \fIval\fP\fB);\fP
+
+\fI\fB
+
\fBpng_voidp png_malloc (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
-\fBpng_voidp png_malloc_default(png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
+\fBpng_voidp png_malloc_default (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
-\fBvoidp png_memcpy (png_voidp \fP\fIs1\fP\fB, png_voidp \fP\fIs2\fP\fB, png_size_t \fIsize\fP\fB);\fP
+\fBpng_voidp png_malloc_warn (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIsize\fP\fB);\fP
\fI\fB
-\fBvoidp png_memset (png_voidp \fP\fIs1\fP\fB, int \fP\fIvalue\fP\fB, png_size_t \fIsize\fP\fB);\fP
+\fBpng_uint_32 png_permit_mng_features (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fImng_features_permitted\fP\fB);\fP
\fI\fB
@@ -354,6 +452,14 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBpng_size_t png_process_data_pause \fP\fI(png_structp\fP\fB, int \fIsave\fP\fB);\fP
+
+\fI\fB
+
+\fBpng_uint_32 png_process_data_skip \fI(png_structp\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_progressive_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIold_row\fP\fB, png_bytep \fInew_row\fP\fB);\fP
\fI\fB
@@ -386,7 +492,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBpng_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP
+\fBint png_reset_zstream (png_structp \fIpng_ptr\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_save_int_32 (png_bytep \fP\fIbuf\fP\fB, png_int_32 \fIi\fP\fB);\fP
\fI\fB
@@ -406,6 +516,14 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_set_background_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_color_16p \fP\fIbackground_color\fP\fB, int \fP\fIbackground_gamma_code\fP\fB, int \fP\fIneed_expand\fP\fB, png_uint_32 \fIbackground_gamma\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_benign_errors (png_structp \fP\fIpng_ptr\fP\fB, int \fIallowed\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_bgr (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -450,10 +568,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_dither (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_dither\fP\fB);\fP
-
-\fI\fB
-
\fBvoid png_set_error_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIerror_ptr\fP\fB, png_error_ptr \fP\fIerror_fn\fP\fB, png_error_ptr \fIwarning_fn\fP\fB);\fP
\fI\fB
@@ -462,7 +576,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_expand_gray_1_2_4_to_8(png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_set_expand_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -478,6 +592,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_set_filter_heuristics_fixed (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIheuristic_method\fP\fB, int \fP\fInum_weights\fP\fB, png_fixed_point_p \fP\fIfilter_weights\fP\fB, png_fixed_point_p \fIfilter_costs\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_flush (png_structp \fP\fIpng_ptr\fP\fB, int \fInrows\fP\fB);\fP
\fI\fB
@@ -486,6 +604,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_set_gamma_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIscreen_gamma\fP\fB, png_uint_32 \fIdefault_file_gamma\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP
\fI\fB
@@ -494,7 +616,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_gray_1_2_4_to_8(png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_set_gray_1_2_4_to_8 (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -506,7 +628,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP
+\fBvoid png_set_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_const_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_const_bytep \fP\fIprofile\fP\fB, png_uint_32 \fIproflen\fP\fB);\fP
\fI\fB
@@ -538,7 +660,15 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_mem_fn(png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
+\fBvoid png_set_chunk_malloc_max (png_structp \fP\fIpng_ptr\fP\fB, png_alloc_size_t \fIuser_chunk_cache_max\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_compression_buffer_size (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_mem_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fImem_ptr\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_free_ptr \fIfree_fn\fP\fB);\fP
\fI\fB
@@ -554,7 +684,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_palette_to_rgb(png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_set_palette_to_rgb (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -574,6 +704,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_set_quantize (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fP\fInum_palette\fP\fB, int \fP\fImaximum_colors\fP\fB, png_uint_16p \fP\fIhistogram\fP\fB, int \fIfull_quantize\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_read_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIio_ptr\fP\fB, png_rw_ptr \fIread_data_fn\fP\fB);\fP
\fI\fB
@@ -582,6 +716,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_read_user_transform_fn (png_structp \fP\fIpng_ptr\fP\fB, png_user_transform_ptr \fIread_user_transform_fn\fP\fB);\fP
\fI\fB
@@ -590,7 +728,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_fixed_point \fP\fIred\fP\fB, png_fixed_point \fIgreen\fP\fB);\fP
+\fBvoid png_set_rgb_to_gray_fixed (png_structp \fP\fIpng_ptr\fP\fB, int error_action png_uint_32 \fP\fIred\fP\fB, png_uint_32 \fIgreen\fP\fB);\fP
\fI\fB
@@ -602,7 +740,15 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP
+\fBvoid png_set_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_sCAL_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, png_fixed_point \fP\fIwidth\fP\fB, png_fixed_point \fIheight\fP\fB);\fP
+
+\fI\fB
+
+\fBvoid png_set_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP
\fI\fB
@@ -618,11 +764,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP
+\fBvoid png_set_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP
\fI\fB
-\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIintent\fP\fB);\fP
+\fBvoid png_set_sRGB_gAMA_and_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fIsrgb_intent\fP\fB);\fP
\fI\fB
@@ -634,6 +780,10 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
+\fBvoid png_set_strip_error_numbers (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIstrip_mode\fP\fB);\fP
+
+\fI\fB
+
\fBvoid png_set_swap (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -650,11 +800,11 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP
+\fBvoid png_set_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_bytep \fP\fItrans_alpha\fP\fB, int \fP\fInum_trans\fP\fB, png_color_16p \fItrans_color\fP\fB);\fP
\fI\fB
-\fBvoid png_set_tRNS_to_alpha(png_structp \fIpng_ptr\fP\fB);\fP
+\fBvoid png_set_tRNS_to_alpha (png_structp \fIpng_ptr\fP\fB);\fP
\fI\fB
@@ -662,11 +812,7 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_unknown_chunk_location(png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_set_read_user_chunk_fn (png_structp \fP\fIpng_ptr\fP\fB, png_voidp \fP\fIuser_chunk_ptr\fP\fB, png_user_chunk_ptr \fIread_user_chunk_fn\fP\fB);\fP
+\fBvoid png_set_unknown_chunk_location (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, int \fP\fIchunk\fP\fB, int \fIlocation\fP\fB);\fP
\fI\fB
@@ -690,10 +836,6 @@ libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
\fI\fB
-\fBvoid png_set_compression_buffer_size(png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIsize\fP\fB);\fP
-
-\fI\fB
-
\fBint png_sig_cmp (png_bytep \fP\fIsig\fP\fB, png_size_t \fP\fIstart\fP\fB, png_size_t \fInum_to_check\fP\fB);\fP
\fI\fB
@@ -773,14 +915,14 @@ library supports encoding, decoding, and various manipulations of
the Portable Network Graphics (PNG) format image files. It uses the
.IR zlib(3)
compression library.
-Following is a copy of the libpng.txt file that accompanies libpng.
+Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT
-libpng.txt - A description on how to use and modify libpng
+libpng-manual.txt - A description on how to use and modify libpng
- libpng version 1.4.0 - January 3, 2010
+ libpng version 1.5.1 - February 3, 2011
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
- Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ Copyright (c) 1998-2011 Glenn Randers-Pehrson
This document is released under the libpng license.
For conditions of distribution and use, see the disclaimer
@@ -788,9 +930,9 @@ libpng.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.4.0 - January 3, 2010
+ libpng versions 0.97, January 1998, through 1.5.1 - February 3, 2011
Updated and distributed by Glenn Randers-Pehrson
- Copyright (c) 1998-2009 Glenn Randers-Pehrson
+ Copyright (c) 1998-2011 Glenn Randers-Pehrson
libpng 1.0 beta 6 version 0.96 May 28, 1997
Updated and distributed by Andreas Dilger
@@ -876,34 +1018,181 @@ same instance of a structure.
.SH II. Structures
There are two main structures that are important to libpng, png_struct
-and png_info. The first, png_struct, is an internal structure that
-will not, for the most part, be used by a user except as the first
-variable passed to every libpng function call.
+and png_info. Both are internal structures that are no longer exposed
+in the libpng interface (as of libpng 1.5.0).
The png_info structure is designed to provide information about the
PNG file. At one time, the fields of png_info were intended to be
directly accessible to the user. However, this tended to cause problems
with applications using dynamically loaded libraries, and as a result
a set of interface functions for png_info (the png_get_*() and png_set_*()
-functions) was developed. The fields of png_info are still available for
-older applications, but it is suggested that applications use the new
-interfaces if at all possible.
-
-Applications that do make direct access to the members of png_struct (except
-for png_ptr->jmpbuf) must be recompiled whenever the library is updated,
-and applications that make direct access to the members of png_info must
-be recompiled if they were compiled or loaded with libpng version 1.0.6,
-in which the members were in a different order. In version 1.0.7, the
-members of the png_info structure reverted to the old order, as they were
-in versions 0.97c through 1.0.5. Starting with version 2.0.0, both
-structures are going to be hidden, and the contents of the structures will
-only be accessible through the png_get/png_set functions.
+functions) was developed.
+
+The png_struct structure is the object used by the library to decode a
+single image. As of 1.5.0 this structure is also not exposed.
+
+Almost all libpng APIs require a pointer to a png_struct as the first argument.
+Many (in particular the png_set and png_get APIs) also require a pointer
+to png_info as the second argument. Some application visible macros
+defined in png.h designed for basic data access (reading and writing
+integers in the PNG format) break this rule, but it's almost always safe
+to assume that a (png_struct*) has to be passed to call an API function.
The png.h header file is an invaluable reference for programming with libpng.
And while I'm on the topic, make sure you include the libpng header file:
#include <png.h>
+.SS Types
+
+The png.h header file defines a number of integral types used by the
+APIs. Most of these are fairly obvious; for example types corresponding
+to integers of particular sizes and types for passing color values.
+
+One exception is how non-integral numbers are handled. For application
+convenience most APIs that take such numbers have C (double) arguments,
+however internally PNG, and libpng, use 32 bit signed integers and encode
+the value by multiplying by 100,000. As of libpng 1.5.0 a convenience
+macro PNG_FP_1 is defined in png.h along with a type (png_fixed_point)
+which is simply (png_int_32).
+
+All APIs that take (double) arguments also have an matching API that
+takes the corresponding fixed point integer arguments. The fixed point
+API has the same name as the floating point one with _fixed appended.
+The actual range of values permitted in the APIs is frequently less than
+the full range of (png_fixed_point) (-21474 to +21474). When APIs require
+a non-negative argument the type is recorded as png_uint_32 above. Consult
+the header file and the text below for more information.
+
+Special care must be take with sCAL chunk handling because the chunk itself
+uses non-integral values encoded as strings containing decimal floating point
+numbers. See the comments in the header file.
+
+.SS Configuration
+
+The main header file function declarations are frequently protected by C
+preprocessing directives of the form:
+
+ #ifdef PNG_feature_SUPPORTED
+ declare-function
+ #endif
+
+The library can be built without support for these APIs, although a
+standard build will have all implemented APIs. Application programs
+should check the feature macros before using an API for maximum
+portability. From libpng 1.5.0 the feature macros set during the build
+of libpng are recorded in the header file "pnglibconf.h" and this file
+is always included by png.h.
+
+If you don't need to change the library configuration from the default skip to
+the next section ("Reading").
+
+Notice that some of the makefiles in the 'scripts' directory and (in 1.5.0) all
+of the build project files in the 'projects' directory simply copy
+scripts/pnglibconf.h.prebuilt to pnglibconf.h. This means that these build
+systems do not permit easy auto-configuration of the library - they only
+support the default configuration.
+
+The easiest way to make minor changes to the libpng configuration when
+auto-configuration is supported is to add definitions to the command line
+using (typically) CPPFLAGS. For example:
+
+CPPFLAGS=-DPNG_NO_FLOATING_ARITHMETIC
+
+will change the internal libpng math implementation for gamma correction and
+other arithmetic calculations to fixed point, avoiding the need for fast
+floating point support. The result can be seen in the generated pnglibconf.h -
+make sure it contains the changed feature macro setting.
+
+If you need to make more extensive configuration changes - more than one or two
+feature macro settings - you can either add -DPNG_USER_CONFIG to the build
+command line and put a list of feature macro settings in pngusr.h or you can set
+DFA_XTRA (a makefile variable) to a file containing the same information in the
+form of 'option' settings.
+
+A. Changing pnglibconf.h
+
+A variety of methods exist to build libpng. Not all of these support
+reconfiguration of pnglibconf.h. To reconfigure pnglibconf.h it must either be
+rebuilt from scripts/pnglibconf.dfa using awk or it must be edited by hand.
+
+Hand editing is achieved by copying scripts/pnglibconf.h.prebuilt and changing
+the lines defining the supported features, paying very close attention to the
+'option' information in scripts/pnglibconf.dfa that describes those features and
+their requirements. This is easy to get wrong.
+
+B. Configuration using DFA_XTRA
+
+Rebuilding from pnglibconf.dfa is easy if a functioning 'awk', or a later
+variant such as 'nawk' or 'gawk', is available. The configure build will
+automatically find an appropriate awk and build pnglibconf.h.
+scripts/pnglibconf.mak contains a set of make rules for doing the same thing if
+configure is not used, and many of the makefiles in the scripts directory use
+this approach.
+
+When rebuilding simply write new file containing changed options and set
+DFA_XTRA to the name of this file. This causes the build to append the new file
+to the end of scripts/pnglibconf.dfa. pngusr.dfa should contain lines of the
+following forms:
+
+everything = off
+
+This turns all optional features off. Include it at the start of pngusr.dfa to
+make it easier to build a minimal configuration. You will need to turn at least
+some features on afterward to enable either reading or writing code, or both.
+
+option feature on
+option feature off
+
+Enable or disable a single feature. This will automatically enable other
+features required by a feature that is turned on or disable other features that
+require a feature which is turned off. Conflicting settings will cause an error
+message to be emitted by awk.
+
+setting feature default value
+
+Changes the default value of setting 'feature' to 'value'. There are a small
+number of settings listed at the top of pnglibconf.h, they are documented in the
+source code. Most of these values have performance implications for the library
+but most of them have no visible effect on the API. Some can also be overridden
+from the API.
+
+C. Configuration using PNG_USR_CONFIG
+
+If -DPNG_USR_CONFIG is added to the CFLAGS when pnglibconf.h is built the file
+pngusr.h will automatically be included before the options in
+scripts/pnglibconf.dfa are processed. pngusr.h should contain only macro
+definitions turning features on or off or setting settings.
+
+Apart from the global setting "everything = off" all the options listed above
+can be set using macros in pngusr.h:
+
+#define PNG_feature_SUPPORTED
+
+is equivalent to:
+
+option feature on
+
+#define PNG_NO_feature
+
+is equivalent to:
+
+option feature off
+
+#define PNG_feature value
+
+is equivalent to:
+
+setting feature default value
+
+Notice that in both cases, pngusr.dfa and pngusr.h, the contents of the
+pngusr file you supply override the contents of scripts/pnglibconf.dfa
+
+If confusing or incomprehensible behavior results it is possible to
+examine the intermediate file pnglibconf.dfn to find the full set of
+dependency information for each setting and option. Simply locate the
+feature in the file and read the C comments that precede it.
+
.SH III. Reading
We'll now walk you through the possible functions to call when reading
@@ -939,13 +1228,15 @@ Customizing libpng.
FILE *fp = fopen(file_name, "rb");
if (!fp)
{
- return (ERROR);
+ return (ERROR);
}
+
fread(header, 1, number, fp);
is_png = !png_sig_cmp(header, 0, number);
+
if (!is_png)
{
- return (NOT_PNG);
+ return (NOT_PNG);
}
@@ -961,29 +1252,32 @@ The structure allocation functions quietly return NULL if they fail to
create the structure, so your application should check for that.
png_structp png_ptr = png_create_read_struct
- (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
+ (PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
user_error_fn, user_warning_fn);
+
if (!png_ptr)
- return (ERROR);
+ return (ERROR);
png_infop info_ptr = png_create_info_struct(png_ptr);
+
if (!info_ptr)
{
- png_destroy_read_struct(&png_ptr,
+ png_destroy_read_struct(&png_ptr,
(png_infopp)NULL, (png_infopp)NULL);
- return (ERROR);
+ return (ERROR);
}
png_infop end_info = png_create_info_struct(png_ptr);
+
if (!end_info)
{
- png_destroy_read_struct(&png_ptr, &info_ptr,
+ png_destroy_read_struct(&png_ptr, &info_ptr,
(png_infopp)NULL);
- return (ERROR);
+ return (ERROR);
}
If you want to use your own memory allocation routines,
-define PNG_USER_MEM_SUPPORTED and use
+use a libpng that was built with PNG_USER_MEM_SUPPORTED defined, and use
png_create_read_struct_2() instead of png_create_read_struct():
png_structp png_ptr = png_create_read_struct_2
@@ -1011,16 +1305,20 @@ free any memory.
if (setjmp(png_jmpbuf(png_ptr)))
{
- png_destroy_read_struct(&png_ptr, &info_ptr,
+ png_destroy_read_struct(&png_ptr, &info_ptr,
&end_info);
- fclose(fp);
- return (ERROR);
+ fclose(fp);
+ return (ERROR);
}
If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
+you can compile libpng with PNG_NO_SETJMP, in which case
errors will result in a call to PNG_ABORT() which defaults to abort().
+You can #define PNG_ABORT() to a function that does something
+more useful than abort(), as long as your function does not
+return.
+
Now you need to set up the input code. The default for libpng is to
use the C function fread(). If you use this, you will need to pass a
valid FILE * in the function png_init_io(). Be sure that the file is
@@ -1037,12 +1335,46 @@ libpng know that there are some bytes missing from the start of the file.
png_set_sig_bytes(png_ptr, number);
+You can change the zlib compression buffer size to be used while
+reading compressed data with
+
+ png_set_compression_buffer_size(png_ptr, buffer_size);
+
+where the default size is 8192 bytes. Note that the buffer size
+is changed immediately and the buffer is reallocated immediately,
+instead of setting a flag to be acted upon later.
+
+If you want CRC errors to be handled in a different manner than
+the default, use
+
+ png_set_crc_action(png_ptr, crit_action, ancil_action);
+
+The values for png_set_crc_action() say how libpng is to handle CRC errors in
+ancillary and critical chunks, and whether to use the data contained
+therein. Note that it is impossible to "discard" data in a critical
+chunk.
+
+Choices for (int) crit_action are
+ PNG_CRC_DEFAULT 0 error/quit
+ PNG_CRC_ERROR_QUIT 1 error/quit
+ PNG_CRC_WARN_USE 3 warn/use data
+ PNG_CRC_QUIET_USE 4 quiet/use data
+ PNG_CRC_NO_CHANGE 5 use the current value
+
+Choices for (int) ancil_action are
+ PNG_CRC_DEFAULT 0 error/quit
+ PNG_CRC_ERROR_QUIT 1 error/quit
+ PNG_CRC_WARN_DISCARD 2 warn/discard data
+ PNG_CRC_WARN_USE 3 warn/use data
+ PNG_CRC_QUIET_USE 4 quiet/use data
+ PNG_CRC_NO_CHANGE 5 use the current value
+
.SS Setting up callback code
You can set up a callback function to handle any unknown chunks in the
input stream. You must supply the function
- read_chunk_callback(png_ptr ptr,
+ read_chunk_callback(png_structp png_ptr,
png_unknown_chunkp chunk);
{
/* The unknown chunk structure contains your
@@ -1088,8 +1420,8 @@ called after each row has been read, which you can use to control
a progress meter or the like. It's demonstrated in pngtest.c.
You must supply a function
- void read_row_callback(png_ptr ptr, png_uint_32 row,
- int pass);
+ void read_row_callback(png_structp png_ptr,
+ png_uint_32 row, int pass);
{
/* put your code here */
}
@@ -1115,14 +1447,17 @@ chunk types. To change this, you can call:
1: ignore; do not keep
2: keep only if safe-to-copy
3: keep even if unsafe-to-copy
+
You can use these definitions:
PNG_HANDLE_CHUNK_AS_DEFAULT 0
PNG_HANDLE_CHUNK_NEVER 1
PNG_HANDLE_CHUNK_IF_SAFE 2
PNG_HANDLE_CHUNK_ALWAYS 3
+
chunk_list - list of chunks affected (a byte string,
five bytes per chunk, NULL or '\0' if
num_chunks is 0)
+
num_chunks - number of chunks affected; if 0, all
unknown chunks are affected. If nonzero,
only the chunks in the list are affected
@@ -1158,8 +1493,10 @@ callback function:
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
/* ignore all unknown chunks: */
png_set_keep_unknown_chunks(read_ptr, 1, NULL, 0);
+
/* except for vpAg: */
png_set_keep_unknown_chunks(read_ptr, 2, vpAg, 1);
+
/* also ignore unused known chunks: */
png_set_keep_unknown_chunks(read_ptr, 1, unused_chunks,
(int)sizeof(unused_chunks)/5);
@@ -1200,6 +1537,18 @@ where 0x7fffffffL means unlimited. You can retrieve this limit with
This limit also applies to the number of buffers that can be allocated
by png_decompress_chunk() while decompressing iTXt, zTXt, and iCCP chunks.
+You can also set a limit on the amount of memory that a compressed chunk
+other than IDAT can occupy, with
+
+ png_set_chunk_malloc_max(png_ptr, user_chunk_malloc_max);
+
+and you can retrieve the limit with
+
+ chunk_malloc_max = png_get_chunk_malloc_max(png_ptr);
+
+Any chunks that would cause either of these limits to be exceeded will
+be ignored.
+
.SS The high-level read interface
At this point there are two ways to proceed; through the high-level
@@ -1231,7 +1580,7 @@ you want to do are limited to the following set:
to RGB (or GA to RGBA)
(This excludes setting a background color, doing gamma transformation,
-dithering, and setting filler.) If this is the case, simply do this:
+quantizing, and setting filler.) If this is the case, simply do this:
png_read_png(png_ptr, info_ptr, png_transforms, NULL)
@@ -1260,17 +1609,22 @@ row_pointers prior to calling png_read_png() with
if (height > PNG_UINT_32_MAX/png_sizeof(png_byte))
png_error (png_ptr,
- "Image is too tall to process in memory");
+ "Image is too tall to process in memory");
+
if (width > PNG_UINT_32_MAX/pixel_size)
png_error (png_ptr,
- "Image is too wide to process in memory");
+ "Image is too wide to process in memory");
+
row_pointers = png_malloc(png_ptr,
- height*png_sizeof(png_bytep));
+ height*png_sizeof(png_bytep));
+
for (int i=0; i<height, i++)
row_pointers[i]=NULL; /* security precaution */
+
for (int i=0; i<height, i++)
row_pointers[i]=png_malloc(png_ptr,
- width*pixel_size);
+ width*pixel_size);
+
png_set_rows(png_ptr, info_ptr, &row_pointers);
Alternatively you could allocate your image in one big block and define
@@ -1280,7 +1634,7 @@ If you use png_set_rows(), the application is responsible for freeing
row_pointers (and row_pointers[i], if they were separately allocated).
If you don't allocate row_pointers ahead of time, png_read_png() will
-do it, and it'll be free'ed when you call png_destroy_*().
+do it, and it'll be free'ed by libpng when you call png_destroy_*().
.SS The low-level read interface
@@ -1304,13 +1658,16 @@ in until png_read_end() has read the chunk data following the image.
width - holds the width of the image
in pixels (up to 2^31).
+
height - holds the height of the image
in pixels (up to 2^31).
+
bit_depth - holds the bit depth of one of the
image channels. (valid values are
1, 2, 4, 8, 16 and depend also on
the color_type. See also
significant bits (sBIT) below).
+
color_type - describes which color/alpha channels
are present.
PNG_COLOR_TYPE_GRAY
@@ -1328,15 +1685,17 @@ in until png_read_end() has read the chunk data following the image.
PNG_COLOR_MASK_COLOR
PNG_COLOR_MASK_ALPHA
+ interlace_type - (PNG_INTERLACE_NONE or
+ PNG_INTERLACE_ADAM7)
+
+ compression_type - (must be PNG_COMPRESSION_TYPE_BASE
+ for PNG 1.0)
+
filter_method - (must be PNG_FILTER_TYPE_BASE
for PNG 1.0, and can also be
PNG_INTRAPIXEL_DIFFERENCING if
the PNG datastream is embedded in
a MNG-1.0 datastream)
- compression_type - (must be PNG_COMPRESSION_TYPE_BASE
- for PNG 1.0)
- interlace_type - (PNG_INTERLACE_NONE or
- PNG_INTERLACE_ADAM7)
Any or all of interlace_type, compression_type, or
filter_method can be NULL if you are
@@ -1351,28 +1710,38 @@ in until png_read_end() has read the chunk data following the image.
width = png_get_image_width(png_ptr,
info_ptr);
+
height = png_get_image_height(png_ptr,
info_ptr);
+
bit_depth = png_get_bit_depth(png_ptr,
info_ptr);
+
color_type = png_get_color_type(png_ptr,
info_ptr);
- filter_method = png_get_filter_type(png_ptr,
+
+ interlace_type = png_get_interlace_type(png_ptr,
info_ptr);
+
compression_type = png_get_compression_type(png_ptr,
info_ptr);
- interlace_type = png_get_interlace_type(png_ptr,
+
+ filter_method = png_get_filter_type(png_ptr,
info_ptr);
channels = png_get_channels(png_ptr, info_ptr);
+
channels - number of channels of info for the
color type (valid values are 1 (GRAY,
PALETTE), 2 (GRAY_ALPHA), 3 (RGB),
4 (RGB_ALPHA or RGB + filler byte))
+
rowbytes = png_get_rowbytes(png_ptr, info_ptr);
+
rowbytes - number of bytes needed to hold a row
signature = png_get_signature(png_ptr, info_ptr);
+
signature - holds the signature read from the
file (if any). The data is kept in
the same offset it would be if the
@@ -1392,16 +1761,24 @@ pointer into the info_ptr is returned for any complex types.
png_get_PLTE(png_ptr, info_ptr, &palette,
&num_palette);
+
palette - the palette for the file
(array of png_color)
+
num_palette - number of entries in the palette
- png_get_gAMA(png_ptr, info_ptr, &gamma);
- gamma - the gamma the file is written
- at (PNG_INFO_gAMA)
+ png_get_gAMA(png_ptr, info_ptr, &file_gamma);
+ png_get_gAMA_fixed(png_ptr, info_ptr, &int_file_gamma);
+
+ file_gamma - the gamma at which the file is
+ written (PNG_INFO_gAMA)
+
+ int_file_gamma - 100,000 times the gamma at which the
+ file is written
png_get_sRGB(png_ptr, info_ptr, &srgb_intent);
- srgb_intent - the rendering intent (PNG_INFO_sRGB)
+
+ file_srgb_intent - the rendering intent (PNG_INFO_sRGB)
The presence of the sRGB chunk
means that the pixel data is in the
sRGB color space. This chunk also
@@ -1410,16 +1787,21 @@ pointer into the info_ptr is returned for any complex types.
png_get_iCCP(png_ptr, info_ptr, &name,
&compression_type, &profile, &proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
+
+ name - The profile name.
+
+ compression_type - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+
+ proflen - length of profile data in bytes.
png_get_sBIT(png_ptr, info_ptr, &sig_bit);
+
sig_bit - the number of significant bits for
(PNG_INFO_sBIT) each of the gray,
red, green, and blue channels,
@@ -1428,50 +1810,66 @@ pointer into the info_ptr is returned for any complex types.
png_get_tRNS(png_ptr, info_ptr, &trans_alpha,
&num_trans, &trans_color);
+
trans_alpha - array of alpha (transparency)
entries for palette (PNG_INFO_tRNS)
+
+ num_trans - number of transparent entries
+ (PNG_INFO_tRNS)
+
trans_color - graylevel or color sample values of
the single transparent color for
non-paletted images (PNG_INFO_tRNS)
- num_trans - number of transparent entries
- (PNG_INFO_tRNS)
png_get_hIST(png_ptr, info_ptr, &hist);
(PNG_INFO_hIST)
+
hist - histogram of palette (array of
png_uint_16)
png_get_tIME(png_ptr, info_ptr, &mod_time);
+
mod_time - time image was last modified
(PNG_VALID_tIME)
png_get_bKGD(png_ptr, info_ptr, &background);
+
background - background color (PNG_VALID_bKGD)
valid 16-bit red, green and blue
values, regardless of color_type
num_comments = png_get_text(png_ptr, info_ptr,
&text_ptr, &num_text);
+
num_comments - number of comments
+
text_ptr - array of png_text holding image
comments
+
text_ptr[i].compression - type of compression used
on "text" PNG_TEXT_COMPRESSION_NONE
PNG_TEXT_COMPRESSION_zTXt
PNG_ITXT_COMPRESSION_NONE
PNG_ITXT_COMPRESSION_zTXt
+
text_ptr[i].key - keyword for comment. Must contain
1-79 characters.
+
text_ptr[i].text - text comments for current
keyword. Can be empty.
+
text_ptr[i].text_length - length of text string,
after decompression, 0 for iTXt
+
text_ptr[i].itxt_length - length of itxt string,
after decompression, 0 for tEXt/zTXt
+
text_ptr[i].lang - language of comment (empty
string for unknown).
+
text_ptr[i].lang_key - keyword in UTF-8
(empty string for unknown).
+
Note that the itxt_length, lang, and lang_key
members of the text_ptr structure only exist
when the library is built with iTXt chunk support.
@@ -1479,6 +1877,7 @@ pointer into the info_ptr is returned for any complex types.
num_text - number of comments (same as
num_comments; you can put NULL here
to avoid the duplication)
+
Note while png_set_text() will accept text, language,
and translated keywords that can be NULL pointers, the
structure returned by png_get_text will always contain
@@ -1487,49 +1886,68 @@ pointer into the info_ptr is returned for any complex types.
num_spalettes = png_get_sPLT(png_ptr, info_ptr,
&palette_ptr);
+
+ num_spalettes - number of sPLT chunks read.
+
palette_ptr - array of palette structures holding
contents of one or more sPLT chunks
read.
- num_spalettes - number of sPLT chunks read.
png_get_oFFs(png_ptr, info_ptr, &offset_x, &offset_y,
&unit_type);
+
offset_x - positive offset from the left edge
of the screen
+
offset_y - positive offset from the top edge
of the screen
+
unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
png_get_pHYs(png_ptr, info_ptr, &res_x, &res_y,
&unit_type);
+
res_x - pixels/unit physical resolution in
x direction
+
res_y - pixels/unit physical resolution in
x direction
+
unit_type - PNG_RESOLUTION_UNKNOWN,
PNG_RESOLUTION_METER
png_get_sCAL(png_ptr, info_ptr, &unit, &width,
&height)
+
unit - physical scale units (an integer)
+
width - width of a pixel in physical scale units
+
height - height of a pixel in physical scale units
(width and height are doubles)
png_get_sCAL_s(png_ptr, info_ptr, &unit, &width,
&height)
+
unit - physical scale units (an integer)
+
width - width of a pixel in physical scale units
+
height - height of a pixel in physical scale units
(width and height are strings like "2.54")
num_unknown_chunks = png_get_unknown_chunks(png_ptr,
info_ptr, &unknowns)
+
unknowns - array of png_unknown_chunk
structures holding unknown chunks
+
unknowns[i].name - name of unknown chunk
+
unknowns[i].data - data of unknown chunk
+
unknowns[i].size - size of unknown chunk's data
+
unknowns[i].location - position of chunk in file
The value of "i" corresponds to the order in which the
@@ -1541,34 +1959,55 @@ forms:
res_x = png_get_x_pixels_per_meter(png_ptr,
info_ptr)
+
res_y = png_get_y_pixels_per_meter(png_ptr,
info_ptr)
+
res_x_and_y = png_get_pixels_per_meter(png_ptr,
info_ptr)
+
res_x = png_get_x_pixels_per_inch(png_ptr,
info_ptr)
+
res_y = png_get_y_pixels_per_inch(png_ptr,
info_ptr)
+
res_x_and_y = png_get_pixels_per_inch(png_ptr,
info_ptr)
+
aspect_ratio = png_get_pixel_aspect_ratio(png_ptr,
info_ptr)
- (Each of these returns 0 [signifying "unknown"] if
+ Each of these returns 0 [signifying "unknown"] if
the data is not present or if res_x is 0;
- res_x_and_y is 0 if res_x != res_y)
+ res_x_and_y is 0 if res_x != res_y
+
+ Note that because of the way the resolutions are
+ stored internally, the inch conversions won't
+ come out to exactly even number. For example,
+ 72 dpi is stored as 0.28346 pixels/meter, and
+ when this is retrieved it is 71.9988 dpi, so
+ be sure to round the returned value appropriately
+ if you want to display a reasonable-looking result.
The data from the oFFs chunk can be retrieved in several convenient
forms:
x_offset = png_get_x_offset_microns(png_ptr, info_ptr);
+
y_offset = png_get_y_offset_microns(png_ptr, info_ptr);
+
x_offset = png_get_x_offset_inches(png_ptr, info_ptr);
+
y_offset = png_get_y_offset_inches(png_ptr, info_ptr);
- (Each of these returns 0 [signifying "unknown" if both
+ Each of these returns 0 [signifying "unknown" if both
x and y are 0] if the data is not present or if the
- chunk is present but the unit is the pixel)
+ chunk is present but the unit is the pixel. The
+ remark about inexact inch conversions applies here
+ as well, because a value in inches can't always be
+ converted to microns and back without some loss
+ of precision.
For more information, see the png_info definition in png.h and the
PNG specification for chunk contents. Be careful with trusting
@@ -1655,7 +2094,7 @@ things.
As of libpng version 1.2.9, png_set_expand_gray_1_2_4_to_8() was
added. It expands the sample depth without changing tRNS to alpha.
-As of libpng version 1.4.0, not all possible expansions are supported.
+As of libpng version 1.5.1, not all possible expansions are supported.
In the following table, the 01 means grayscale with depth<8, 31 means
indexed with depth<8, other numerals represent the color type, "T" means
@@ -1696,7 +2135,7 @@ PNG can have files with 16 bits per channel. If you only can handle
8 bits per channel, this will strip the pixels down to 8 bit.
if (bit_depth == 16)
- png_set_strip_16(png_ptr);
+ png_set_strip_16(png_ptr);
If, for some reason, you don't need the alpha channel on an image,
and you want to remove it rather than combining it with the background
@@ -1704,7 +2143,7 @@ and you want to remove it rather than combining it with the background
it with the background, so that's what you should probably do):
if (color_type & PNG_COLOR_MASK_ALPHA)
- png_set_strip_alpha(png_ptr);
+ png_set_strip_alpha(png_ptr);
In PNG files, the alpha channel in an image
is the level of opacity. If you need the alpha channel in an image to
@@ -1721,7 +2160,7 @@ files. This code expands to 1 pixel per byte without changing the
values of the pixels:
if (bit_depth < 8)
- png_set_packing(png_ptr);
+ png_set_packing(png_ptr);
PNG files have possible bit depths of 1, 2, 4, 8, and 16. All pixels
stored in a PNG image have been "scaled" or "shifted" up to the next
@@ -1733,20 +2172,20 @@ image. This call reduces the pixels back down to the original bit depth:
png_color_8p sig_bit;
if (png_get_sBIT(png_ptr, info_ptr, &sig_bit))
- png_set_shift(png_ptr, sig_bit);
+ png_set_shift(png_ptr, sig_bit);
PNG files store 3-color pixels in red, green, blue order. This code
changes the storage of the pixels to blue, green, red:
if (color_type == PNG_COLOR_TYPE_RGB ||
color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_bgr(png_ptr);
+ png_set_bgr(png_ptr);
PNG files store RGB pixels packed into 3 or 6 bytes. This code expands them
into 4 or 8 bytes for windowing systems that need them in this format:
if (color_type == PNG_COLOR_TYPE_RGB)
- png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
+ png_set_filler(png_ptr, filler, PNG_FILLER_BEFORE);
where "filler" is the 8 or 16-bit number to fill with, and the location is
either PNG_FILLER_BEFORE or PNG_FILLER_AFTER, depending upon whether
@@ -1759,8 +2198,8 @@ Note that png_set_filler() does not change the color type. If you want
to do that, you can add a true alpha channel with
if (color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_GRAY)
- png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
+ color_type == PNG_COLOR_TYPE_GRAY)
+ png_set_add_alpha(png_ptr, filler, PNG_FILLER_AFTER);
where "filler" contains the alpha value to assign to each pixel.
This function was added in libpng-1.2.7.
@@ -1769,33 +2208,36 @@ If you are reading an image with an alpha channel, and you need the
data as ARGB instead of the normal PNG format RGBA:
if (color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_swap_alpha(png_ptr);
+ png_set_swap_alpha(png_ptr);
For some uses, you may want a grayscale image to be represented as
RGB. This code will do that conversion:
if (color_type == PNG_COLOR_TYPE_GRAY ||
color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
- png_set_gray_to_rgb(png_ptr);
+ png_set_gray_to_rgb(png_ptr);
Conversely, you can convert an RGB or RGBA image to grayscale or grayscale
with alpha.
if (color_type == PNG_COLOR_TYPE_RGB ||
color_type == PNG_COLOR_TYPE_RGB_ALPHA)
- png_set_rgb_to_gray_fixed(png_ptr, error_action,
- int red_weight, int green_weight);
+ png_set_rgb_to_gray_fixed(png_ptr, error_action,
+ int red_weight, int green_weight);
error_action = 1: silently do the conversion
+
error_action = 2: issue a warning if the original
image has any pixel where
red != green or red != blue
+
error_action = 3: issue an error and abort the
conversion if the original
image has any pixel where
red != green or red != blue
red_weight: weight of red component times 100000
+
green_weight: weight of green component times 100000
If either weight is negative, default
weights (21268, 71514) are used.
@@ -1822,16 +2264,12 @@ Copyright (c) 1998-01-04 Charles Poynton <poynton at inforamp.net>
Y = 0.212671 * R + 0.715160 * G + 0.072169 * B
-Libpng approximates this with
-
- Y = 0.21268 * R + 0.7151 * G + 0.07217 * B
-
-which can be expressed with integers as
+Libpng approximates this with integers scaled by 32768:
- Y = (6969 * R + 23434 * G + 2365 * B)/32768
+ Y = (6968 * R + 23434 * G + 2366 * B)/32768
The calculation is done in a linear colorspace, if the image gamma
-is known.
+can be determined.
If you have a grayscale and you are using png_set_expand_depth(),
png_set_expand(), or png_set_gray_to_rgb to change to truecolor or to
@@ -1846,11 +2284,11 @@ or as an RGB triplet that may or may not be in the palette (need_expand = 0).
png_color_16p image_background;
if (png_get_bKGD(png_ptr, info_ptr, &image_background))
- png_set_background(png_ptr, image_background,
- PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
+ png_set_background(png_ptr, image_background,
+ PNG_BACKGROUND_GAMMA_FILE, 1, 1.0);
else
- png_set_background(png_ptr, &my_background,
- PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
+ png_set_background(png_ptr, &my_background,
+ PNG_BACKGROUND_GAMMA_SCREEN, 0, 1.0);
The png_set_background() function tells libpng to composite images
with alpha or simple transparency against the supplied background
@@ -1883,6 +2321,7 @@ a slightly smaller exponent is better.
{
screen_gamma = user_defined_screen_gamma;
}
+
/* One way that applications can share the same
screen gamma value */
else if ((gamma_str = getenv("SCREEN_GAMMA"))
@@ -1890,18 +2329,22 @@ a slightly smaller exponent is better.
{
screen_gamma = (double)atof(gamma_str);
}
+
/* If we don't have another value */
else
{
screen_gamma = 2.2; /* A good guess for a
PC monitor in a bright office or a dim room */
+
screen_gamma = 2.0; /* A good guess for a
PC monitor in a dark room */
+
screen_gamma = 1.7 or 1.0; /* A good
guess for Mac systems */
}
-The png_set_gamma() function handles gamma transformations of the data.
+The functions png_set_gamma() and its fixed point equivalent
+png_set_gamma_fixed() handle gamma transformations of the data.
Pass both the file gamma and the current screen_gamma. If the file does
not have a gamma value, you can pass one anyway if you have an idea what
it is (usually 0.45455 is a good guess for GIF images on PCs). Note
@@ -1910,11 +2353,47 @@ on gamma in the PNG specification for an excellent description of what
gamma is, and why all applications should support it. It is strongly
recommended that PNG viewers support gamma correction.
- if (png_get_gAMA(png_ptr, info_ptr, &gamma))
- png_set_gamma(png_ptr, screen_gamma, gamma);
+ if (png_get_gAMA(png_ptr, info_ptr, &file_gamma))
+ png_set_gamma(png_ptr, screen_gamma, file_gamma);
+
else
png_set_gamma(png_ptr, screen_gamma, 0.45455);
+If you need to reduce an RGB file to a paletted file, or if a paletted
+file has more entries then will fit on your screen, png_set_quantize()
+will do that. Note that this is a simple match quantization that merely
+finds the closest color available. This should work fairly well with
+optimized palettes, but fairly badly with linear color cubes. If you
+pass a palette that is larger then maximum_colors, the file will
+reduce the number of colors in the palette so it will fit into
+maximum_colors. If there is a histogram, it will use it to make
+more intelligent choices when reducing the palette. If there is no
+histogram, it may not do as good a job.
+
+ if (color_type & PNG_COLOR_MASK_COLOR)
+ {
+ if (png_get_valid(png_ptr, info_ptr,
+ PNG_INFO_PLTE))
+ {
+ png_uint_16p histogram = NULL;
+
+ png_get_hIST(png_ptr, info_ptr,
+ &histogram);
+ png_set_quantize(png_ptr, palette, num_palette,
+ max_screen_colors, histogram, 1);
+ }
+
+ else
+ {
+ png_color std_color_cube[MAX_SCREEN_COLORS] =
+ { ... colors ... };
+
+ png_set_quantize(png_ptr, std_color_cube,
+ MAX_SCREEN_COLORS, MAX_SCREEN_COLORS,
+ NULL,0);
+ }
+ }
+
PNG files describe monochrome as black being zero and white being one.
The following code will reverse this (make black be one and white be
zero):
@@ -1925,7 +2404,7 @@ zero):
This function can also be used to invert grayscale and gray-alpha images:
if (color_type == PNG_COLOR_TYPE_GRAY ||
- color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
png_set_invert_mono(png_ptr);
PNG files store 16 bit pixels in network byte order (big-endian,
@@ -1934,7 +2413,7 @@ other way (little-endian, i.e. least significant bits first, the
way PCs store them):
if (bit_depth == 16)
- png_set_swap(png_ptr);
+ png_set_swap(png_ptr);
If you are using packed-pixel images (1, 2, or 4 bits/pixel), and you
need to change the order the pixels are packed into bytes, you can use:
@@ -1947,15 +2426,28 @@ the existing ones meets your needs. This is done by setting a callback
with
png_set_read_user_transform_fn(png_ptr,
- read_transform_fn);
+ read_transform_fn);
You must supply the function
- void read_transform_fn(png_ptr ptr, row_info_ptr
- row_info, png_bytep data)
+ void read_transform_fn(png_structp png_ptr, row_info_ptr
+ row_info, png_bytep data)
See pngtest.c for a working example. Your function will be called
-after all of the other transformations have been processed.
+after all of the other transformations have been processed. Take care with
+interlaced images if you do the interlace yourself - the width of the row is the
+width in 'row_info', not the overall image width.
+
+If supported libpng provides two information routines that you can use to find
+where you are in processing the image:
+
+ png_get_current_pass_number(png_structp png_ptr);
+ png_get_current_row_number(png_structp png_ptr);
+
+Don't try using these outside a transform callback - firstly they are only
+supported if user transforms are supported, secondly they may well return
+unexpected results unless the row is actually being processed at the moment they
+are called.
You can also set up a pointer to a user structure for use by your
callback function, and you can inform libpng that your transform
@@ -1963,7 +2455,7 @@ function will change the number of channels or bit depth with the
function
png_set_user_transform_info(png_ptr, user_ptr,
- user_depth, user_channels);
+ user_depth, user_channels);
The user's application, not libpng, is responsible for allocating and
freeing any memory required for the user structure.
@@ -1972,7 +2464,7 @@ You can retrieve the pointer via the function
png_get_user_transform_ptr(). For example:
voidp read_user_transform_ptr =
- png_get_user_transform_ptr(png_ptr);
+ png_get_user_transform_ptr(png_ptr);
The last thing to handle is interlacing; this is covered in detail below,
but you must call the function here if you want libpng to handle expansion
@@ -1997,6 +2489,15 @@ are allocating one large chunk, you will need to build an
array of pointers to each row, as it will be needed for some
of the functions below.
+Remember: Before you call png_read_update_info(), the png_get_
+functions return the values corresponding to the original PNG image.
+After you call png_read_update_info the values refer to the image
+that libpng will output. Consequently you must call all the png_set_
+functions before you call png_read_update_info(). This is particularly
+important for png_set_interlace_handling() - if you are going to call
+png_read_update_info() you must call png_set_interlace_handling() before
+it unless you want to receive interlaced output.
+
.SS Reading image data
After you've allocated memory, you can read the image data.
@@ -2006,9 +2507,10 @@ call png_read_image() and libpng will read in all the image data
and put it in the memory area supplied. You will need to pass in
an array of pointers to each row.
-This function automatically handles interlacing, so you don't need
-to call png_set_interlace_handling() or call this function multiple
-times, or any of that other stuff necessary with png_read_rows().
+This function automatically handles interlacing, so you don't
+need to call png_set_interlace_handling() (unless you call
+png_read_update_info()) or call this function multiple times, or any
+of that other stuff necessary with png_read_rows().
png_read_image(png_ptr, row_pointers);
@@ -2023,7 +2525,7 @@ use png_read_rows() instead. If there is no interlacing (check
interlace_type == PNG_INTERLACE_NONE), this is simple:
png_read_rows(png_ptr, row_pointers, NULL,
- number_of_rows);
+ number_of_rows);
where row_pointers is the same as in the png_read_image() call.
@@ -2035,13 +2537,15 @@ a single row_pointer instead of an array of row_pointers:
If the file is interlaced (interlace_type != 0 in the IHDR chunk), things
get somewhat harder. The only current (PNG Specification version 1.2)
-interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7)
-is a somewhat complicated 2D interlace scheme, known as Adam7, that
+interlacing type for PNG is (interlace_type == PNG_INTERLACE_ADAM7);
+a somewhat complicated 2D interlace scheme, known as Adam7, that
breaks down an image into seven smaller images of varying size, based
-on an 8x8 grid.
+on an 8x8 grid. This number is defined (from libpng 1.5) as
+PNG_INTERLACE_ADAM7_PASSES in png.h
libpng can fill out those images or it can give them to you "as is".
-If you want them filled out, there are two ways to do that. The one
+It is almost always better to have libpng handle the interlacing for you.
+If you want the images filled out, there are two ways to do that. The one
mentioned in the PNG specification is to expand each pixel to cover
those pixels that have not been read yet (the "rectangle" method).
This results in a blocky image for the first pass, which gradually
@@ -2051,37 +2555,20 @@ rest of the image remaining whatever colors they were initialized to
before the start of the read. The first method usually looks better,
but tends to be slower, as there are more pixels to put in the rows.
-If you don't want libpng to handle the interlacing details, just call
-png_read_rows() seven times to read in all seven images. Each of the
-images is a valid image by itself, or they can all be combined on an
-8x8 grid to form a single image (although if you intend to combine them
-you would be far better off using the libpng interlace handling).
-
-The first pass will return an image 1/8 as wide as the entire image
-(every 8th column starting in column 0) and 1/8 as high as the original
-(every 8th row starting in row 0), the second will be 1/8 as wide
-(starting in column 4) and 1/8 as high (also starting in row 0). The
-third pass will be 1/4 as wide (every 4th pixel starting in column 0) and
-1/8 as high (every 8th row starting in row 4), and the fourth pass will
-be 1/4 as wide and 1/4 as high (every 4th column starting in column 2,
-and every 4th row starting in row 0). The fifth pass will return an
-image 1/2 as wide, and 1/4 as high (starting at column 0 and row 2),
-while the sixth pass will be 1/2 as wide and 1/2 as high as the original
-(starting in column 1 and row 0). The seventh and final pass will be as
-wide as the original, and 1/2 as high, containing all of the odd
-numbered scanlines. Phew!
-
-If you want libpng to expand the images, call this before calling
-png_start_read_image() or png_read_update_info():
+If, as is likely, you want libpng to expand the images, call this before
+calling png_start_read_image() or png_read_update_info():
if (interlace_type == PNG_INTERLACE_ADAM7)
- number_of_passes
+ number_of_passes
= png_set_interlace_handling(png_ptr);
-This will return the number of passes needed. Currently, this
-is seven, but may change if another interlace type is added.
-This function can be called even if the file is not interlaced,
-where it will return one pass.
+This will return the number of passes needed. Currently, this is seven,
+but may change if another interlace type is added. This function can be
+called even if the file is not interlaced, where it will return one pass.
+You then need to read the whole image 'number_of_passes' times. Each time
+will distribute the pixels from the current pass to the correct place in
+the output image, so you need to supply the same rows to png_read_rows in
+each pass.
If you are not going to display the image after each pass, but are
going to wait until the entire image is read in, use the sparkle
@@ -2098,14 +2585,104 @@ not the data. Each pass only writes the pixels appropriate for that
pass, and assumes the data from previous passes is still valid.
png_read_rows(png_ptr, row_pointers, NULL,
- number_of_rows);
+ number_of_rows);
If you only want the first effect (the rectangles), do the same as
before except pass the row buffer in the third parameter, and leave
the second parameter NULL.
png_read_rows(png_ptr, NULL, row_pointers,
- number_of_rows);
+ number_of_rows);
+
+If you don't want libpng to handle the interlacing details, just call
+png_read_rows() PNG_INTERLACE_ADAM7_PASSES times to read in all the images.
+Each of the images is a valid image by itself, however you will almost
+certainly need to distribute the pixels from each sub-image to the
+correct place. This is where everything gets very tricky.
+
+If you want to retrieve the separate images you must pass the correct
+number of rows to each successive call of png_read_rows(). The calculation
+gets pretty complicated for small images, where some sub-images may
+not even exist because either their width or height ends up zero.
+libpng provides two macros to help you in 1.5 and later versions:
+
+ png_uint_32 width = PNG_PASS_COLS(image_width, pass_number);
+ png_uint_32 height = PNG_PASS_ROWS(image_height, pass_number);
+
+Respectively these tell you the width and height of the sub-image
+corresponding to the numbered pass. 'pass' is in in the range 0 to 6 -
+this can be confusing because the specification refers to the same passes
+as 1 to 7! Be careful, you must check both the width and height before
+calling png_read_rows() and not call it for that pass if either is zero.
+
+You can, of course, read each sub-image row by row. If you want to
+produce optimal code to make a pixel-by-pixel transformation of an
+interlaced image this is the best approach; read each row of each pass,
+transform it, and write it out to a new interlaced image.
+
+If you want to de-interlace the image yourself libpng provides further
+macros to help that tell you where to place the pixels in the output image.
+Because the interlacing scheme is rectangular - sub-image pixels are always
+arranged on a rectangular grid - all you need to know for each pass is the
+starting column and row in the output image of the first pixel plus the
+spacing between each pixel. As of libpng 1.5 there are four macros to
+retrieve this information:
+
+ png_uint_32 x = PNG_PASS_START_COL(pass);
+ png_uint_32 y = PNG_PASS_START_ROW(pass);
+ png_uint_32 xStep = 1U << PNG_PASS_COL_SHIFT(pass);
+ png_uint_32 yStep = 1U << PNG_PASS_ROW_SHIFT(pass);
+
+These allow you to write the obvious loop:
+
+ png_uint_32 input_y = 0;
+ png_uint_32 output_y = PNG_PASS_START_ROW(pass);
+
+ while (output_y < output_image_height)
+ {
+ png_uint_32 input_x = 0;
+ png_uint_32 output_x = PNG_PASS_START_COL(pass);
+
+ while (output_x < output_image_width)
+ {
+ image[output_y][output_x] =
+ subimage[pass][input_y][input_x++];
+
+ output_x += xStep;
+ }
+
+ ++input_y;
+ output_y += yStep;
+ }
+
+Notice that the steps between successive output rows and columns are
+returned as shifts. This is possible because the pixels in the subimages
+are always a power of 2 apart - 1, 2, 4 or 8 pixels - in the original
+image. In practice you may need to directly calculate the output coordinate
+given an input coordinate. libpng provides two further macros for this
+purpose:
+
+ png_uint_32 output_x = PNG_COL_FROM_PASS_COL(input_x, pass);
+ png_uint_32 output_y = PNG_ROW_FROM_PASS_ROW(input_y, pass);
+
+Finally a pair of macros are provided to tell you if a particular image
+row or column appears in a given pass:
+
+ int col_in_pass = PNG_COL_IN_INTERLACE_PASS(output_x, pass);
+ int row_in_pass = PNG_ROW_IN_INTERLACE_PASS(output_y, pass);
+
+Bear in mind that you will probably also need to check the width and height
+of the pass in addition to the above to be sure the pass even exists!
+
+With any luck you are convinced by now that you don't want to do your own
+interlace handling. In reality normally the only good reason for doing this
+is if you are processing PNG files on a pixel-by-pixel basis and don't want
+to load the whole file into memory when it is interlaced.
+
+libpng includes a test program, pngvalid, that illustrates reading and
+writing of interlaced images. If you can't get interlacing to work in your
+code and don't want to leave it to libpng (the recommended approach) see
+how pngvalid.c does it.
.SS Finishing a sequential read
@@ -2127,6 +2704,7 @@ It is also possible to individually free the info_ptr members that
point to libpng-allocated storage with the following function:
png_free_data(png_ptr, info_ptr, mask, seq)
+
mask - identifies data to be freed, a mask
containing the bitwise OR of one or
more of
@@ -2136,6 +2714,7 @@ point to libpng-allocated storage with the following function:
PNG_FREE_SCAL, PNG_FREE_SPLT,
PNG_FREE_TEXT, PNG_FREE_UNKN,
or simply PNG_FREE_ALL
+
seq - sequence number of item to be freed
(-1 for all items)
@@ -2153,13 +2732,15 @@ or so that it will free data that was allocated by the user with png_malloc()
or png_zalloc() and passed in via a png_set_*() function, with
png_data_freer(png_ptr, info_ptr, freer, mask)
- mask - which data elements are affected
- same choices as in png_free_data()
+
freer - one of
PNG_DESTROY_WILL_FREE_DATA
PNG_SET_WILL_FREE_DATA
PNG_USER_WILL_FREE_DATA
+ mask - which data elements are affected
+ same choices as in png_free_data()
+
This function only affects data that has already been allocated.
You can call this function after reading the PNG data but before calling
any png_set_*() functions, to control whether the user or the png_set_*()
@@ -2188,6 +2769,7 @@ it frees. If you need to turn the flag off for a chunk that was freed by
your application instead of by libpng, you can use
png_set_invalid(png_ptr, info_ptr, mask);
+
mask - identifies the chunks to be made invalid,
containing the bitwise OR of one or
more of
@@ -2227,21 +2809,24 @@ png_infop info_ptr;
png_ptr = png_create_read_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
user_error_fn, user_warning_fn);
+
if (!png_ptr)
return (ERROR);
+
info_ptr = png_create_info_struct(png_ptr);
+
if (!info_ptr)
{
- png_destroy_read_struct(&png_ptr, (png_infopp)NULL,
- (png_infopp)NULL);
- return (ERROR);
+ png_destroy_read_struct(&png_ptr,
+ (png_infopp)NULL, (png_infopp)NULL);
+ return (ERROR);
}
if (setjmp(png_jmpbuf(png_ptr)))
{
- png_destroy_read_struct(&png_ptr, &info_ptr,
- (png_infopp)NULL);
- return (ERROR);
+ png_destroy_read_struct(&png_ptr, &info_ptr,
+ (png_infopp)NULL);
+ return (ERROR);
}
/* This one's new. You can provide functions
@@ -2273,9 +2858,9 @@ png_infop info_ptr;
{
if (setjmp(png_jmpbuf(png_ptr)))
{
- png_destroy_read_struct(&png_ptr, &info_ptr,
+ png_destroy_read_struct(&png_ptr, &info_ptr,
(png_infopp)NULL);
- return (ERROR);
+ return (ERROR);
}
/* This one's new also. Simply give it a chunk
@@ -2292,6 +2877,12 @@ png_infop info_ptr;
so there.
*/
png_process_data(png_ptr, info_ptr, buffer, length);
+
+ /* At this point you can call png_process_data_skip if
+ you want to handle data the library will skip yourself;
+ it simply returns the number of bytes to skip (and stops
+ libpng skipping that number of bytes on the next
+ png_process_data call).
return 0;
}
@@ -2312,6 +2903,19 @@ png_infop info_ptr;
any). You may start getting rows before
png_process_data() returns, so this is your
last chance to prepare for that.
+
+ This is where you turn on interlace handling,
+ assuming you don't want to do it yourself.
+
+ If you need to you can stop the processing of
+ your original input data at this point by calling
+ png_process_data_pause. This returns the number
+ of unprocessed bytes from the last png_process_data
+ call - it is up to you to ensure that the next call
+ sees these bytes again. If you don't want to bother
+ with this you can get libpng to cache the unread
+ bytes by setting the 'save' parameter (see png.h) but
+ then libpng will have to copy the data internally.
*/
}
@@ -2332,14 +2936,22 @@ png_infop info_ptr;
supplying them because it may make your life
easier.
- For the non-NULL rows of interlaced images,
+ If you did not turn on interlace handling then
+ the callback is called for each row of each
+ sub-image when the image is interlaced. In this
+ case 'row_num' is the row in the sub-image, not
+ the row in the output image as it is in all other
+ cases.
+
+ For the non-NULL rows of interlaced images when
+ you have switched on libpng interlace handling,
you must call png_progressive_combine_row()
passing in the row and the old row. You can
call this function for NULL rows (it will just
return) and for non-interlaced images (it just
does the memcpy for you) if it will make the
code easier. Thus, you can just do this for
- all cases:
+ all cases if you switch on interlace handling;
*/
png_progressive_combine_row(png_ptr, old_row,
@@ -2353,6 +2965,9 @@ png_infop info_ptr;
for interlaced images), you will have to pass
the current row, and the function will combine
the old row and the new row.
+
+ You can also call png_process_data_pause in this
+ callback - see above.
*/
}
@@ -2387,10 +3002,9 @@ using the standard I/O functions, you will need to replace them with
custom writing functions. See the discussion under Customizing libpng.
FILE *fp = fopen(file_name, "wb");
+
if (!fp)
- {
return (ERROR);
- }
Next, png_struct and png_info need to be allocated and initialized.
As these can be both relatively large, you may not want to store these
@@ -2403,6 +3017,7 @@ both "png_ptr"; you can call them anything you like, such as
png_structp png_ptr = png_create_write_struct
(PNG_LIBPNG_VER_STRING, (png_voidp)user_error_ptr,
user_error_fn, user_warning_fn);
+
if (!png_ptr)
return (ERROR);
@@ -2410,7 +3025,7 @@ both "png_ptr"; you can call them anything you like, such as
if (!info_ptr)
{
png_destroy_write_struct(&png_ptr,
- (png_infopp)NULL);
+ (png_infopp)NULL);
return (ERROR);
}
@@ -2436,7 +3051,7 @@ section below for more information on the libpng error handling.
if (setjmp(png_jmpbuf(png_ptr)))
{
- png_destroy_write_struct(&png_ptr, &info_ptr);
+ png_destroy_write_struct(&png_ptr, &info_ptr);
fclose(fp);
return (ERROR);
}
@@ -2444,9 +3059,13 @@ section below for more information on the libpng error handling.
return;
If you would rather avoid the complexity of setjmp/longjmp issues,
-you can compile libpng with PNG_SETJMP_NOT_SUPPORTED, in which case
+you can compile libpng with PNG_NO_SETJMP, in which case
errors will result in a call to PNG_ABORT() which defaults to abort().
+You can #define PNG_ABORT() to a function that does something
+more useful than abort(), as long as your function does not
+return.
+
Now you need to set up the output code. The default for libpng is to
use the C function fwrite(). If you use this, you will need to pass a
valid FILE * in the function png_init_io(). Be sure that the file is
@@ -2471,7 +3090,7 @@ called after each row has been written, which you can use to control
a progress meter or the like. It's demonstrated in pngtest.c.
You must supply a function
- void write_row_callback(png_ptr, png_uint_32 row,
+ void write_row_callback(png_structp png_ptr, png_uint_32 row,
int pass);
{
/* put your code here */
@@ -2502,7 +3121,8 @@ filter types.
/* turn on or off filtering, and/or choose
specific filters. You can use either a single
PNG_FILTER_VALUE_NAME or the bitwise OR of one
- or more PNG_FILTER_NAME masks. */
+ or more PNG_FILTER_NAME masks.
+ */
png_set_filter(png_ptr, 0,
PNG_FILTER_NONE | PNG_FILTER_VALUE_NONE |
PNG_FILTER_SUB | PNG_FILTER_VALUE_SUB |
@@ -2511,11 +3131,10 @@ filter types.
PNG_FILTER_PAETH | PNG_FILTER_VALUE_PAETH|
PNG_ALL_FILTERS);
-If an application
-wants to start and stop using particular filters during compression,
-it should start out with all of the filters (to ensure that the previous
-row of pixels will be stored in case it's needed later), and then add
-and remove them after the start of compression.
+If an application wants to start and stop using particular filters during
+compression, it should start out with all of the filters (to ensure that
+the previous row of pixels will be stored in case it's needed later),
+and then add and remove them after the start of compression.
If you are writing a PNG datastream that is to be embedded in a MNG
datastream, the second parameter can be either 0 or 64.
@@ -2559,16 +3178,20 @@ Some of the more important parts of the png_info are:
png_set_IHDR(png_ptr, info_ptr, width, height,
bit_depth, color_type, interlace_type,
compression_type, filter_method)
+
width - holds the width of the image
in pixels (up to 2^31).
+
height - holds the height of the image
in pixels (up to 2^31).
+
bit_depth - holds the bit depth of one of the
image channels.
(valid values are 1, 2, 4, 8, 16
and depend also on the
color_type. See also significant
bits (sBIT) below).
+
color_type - describes which color/alpha
channels are present.
PNG_COLOR_TYPE_GRAY
@@ -2588,8 +3211,10 @@ Some of the more important parts of the png_info are:
interlace_type - PNG_INTERLACE_NONE or
PNG_INTERLACE_ADAM7
+
compression_type - (must be
PNG_COMPRESSION_TYPE_DEFAULT)
+
filter_method - (must be PNG_FILTER_TYPE_DEFAULT
or, if you are writing a PNG to
be embedded in a MNG datastream,
@@ -2607,15 +3232,22 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_PLTE(png_ptr, info_ptr, palette,
num_palette);
+
palette - the palette for the file
(array of png_color)
num_palette - number of entries in the palette
- png_set_gAMA(png_ptr, info_ptr, gamma);
- gamma - the gamma the image was created
- at (PNG_INFO_gAMA)
+ png_set_gAMA(png_ptr, info_ptr, file_gamma);
+ png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
+
+ file_gamma - the gamma at which the image was
+ created (PNG_INFO_gAMA)
+
+ int_file_gamma - 100,000 times the gamma at which
+ the image was created
png_set_sRGB(png_ptr, info_ptr, srgb_intent);
+
srgb_intent - the rendering intent
(PNG_INFO_sRGB) The presence of
the sRGB chunk means that the pixel
@@ -2635,6 +3267,7 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr,
srgb_intent);
+
srgb_intent - the rendering intent
(PNG_INFO_sRGB) The presence of the
sRGB chunk means that the pixel
@@ -2645,17 +3278,22 @@ width, height, bit_depth, and color_type must be the same in each call.
written.
png_set_iCCP(png_ptr, info_ptr, name, compression_type,
- profile, proflen);
- name - The profile name.
- compression - The compression type; always
- PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
- You may give NULL to this argument to
- ignore it.
- profile - International Color Consortium color
- profile data. May contain NULs.
- proflen - length of profile data in bytes.
+ profile, proflen);
+
+ name - The profile name.
+
+ compression_type - The compression type; always
+ PNG_COMPRESSION_TYPE_BASE for PNG 1.0.
+ You may give NULL to this argument to
+ ignore it.
+
+ profile - International Color Consortium color
+ profile data. May contain NULs.
+
+ proflen - length of profile data in bytes.
png_set_sBIT(png_ptr, info_ptr, sig_bit);
+
sig_bit - the number of significant bits for
(PNG_INFO_sBIT) each of the gray, red,
green, and blue channels, whichever are
@@ -2664,30 +3302,37 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_tRNS(png_ptr, info_ptr, trans_alpha,
num_trans, trans_color);
+
trans_alpha - array of alpha (transparency)
entries for palette (PNG_INFO_tRNS)
+
trans_color - graylevel or color sample values
(in order red, green, blue) of the
single transparent color for
non-paletted images (PNG_INFO_tRNS)
+
num_trans - number of transparent entries
(PNG_INFO_tRNS)
png_set_hIST(png_ptr, info_ptr, hist);
- (PNG_INFO_hIST)
+
hist - histogram of palette (array of
- png_uint_16)
+ png_uint_16) (PNG_INFO_hIST)
png_set_tIME(png_ptr, info_ptr, mod_time);
+
mod_time - time image was last modified
(PNG_VALID_tIME)
png_set_bKGD(png_ptr, info_ptr, background);
+
background - background color (PNG_VALID_bKGD)
png_set_text(png_ptr, info_ptr, text_ptr, num_text);
+
text_ptr - array of png_text holding image
comments
+
text_ptr[i].compression - type of compression used
on "text" PNG_TEXT_COMPRESSION_NONE
PNG_TEXT_COMPRESSION_zTXt
@@ -2713,6 +3358,7 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_sPLT(png_ptr, info_ptr, &palette_ptr,
num_spalettes);
+
palette_ptr - array of png_sPLT_struct structures
to be added to the list of palettes
in the info structure.
@@ -2721,35 +3367,48 @@ width, height, bit_depth, and color_type must be the same in each call.
png_set_oFFs(png_ptr, info_ptr, offset_x, offset_y,
unit_type);
+
offset_x - positive offset from the left
edge of the screen
+
offset_y - positive offset from the top
edge of the screen
+
unit_type - PNG_OFFSET_PIXEL, PNG_OFFSET_MICROMETER
png_set_pHYs(png_ptr, info_ptr, res_x, res_y,
unit_type);
+
res_x - pixels/unit physical resolution
in x direction
+
res_y - pixels/unit physical resolution
in y direction
+
unit_type - PNG_RESOLUTION_UNKNOWN,
PNG_RESOLUTION_METER
png_set_sCAL(png_ptr, info_ptr, unit, width, height)
+
unit - physical scale units (an integer)
+
width - width of a pixel in physical scale units
+
height - height of a pixel in physical scale units
(width and height are doubles)
png_set_sCAL_s(png_ptr, info_ptr, unit, width, height)
+
unit - physical scale units (an integer)
+
width - width of a pixel in physical scale units
+
height - height of a pixel in physical scale units
(width and height are strings like "2.54")
png_set_unknown_chunks(png_ptr, info_ptr, &unknowns,
num_unknowns)
+
unknowns - array of png_unknown_chunk
structures holding unknown chunks
unknowns[i].name - name of unknown chunk
@@ -2788,21 +3447,30 @@ Until text gets around 1000 bytes, it is not worth compressing it.
After the text has been written out to the file, the compression type
is set to PNG_TEXT_COMPRESSION_NONE_WR or PNG_TEXT_COMPRESSION_zTXt_WR,
so that it isn't written out again at the end (in case you are calling
-png_write_end() with the same struct.
+png_write_end() with the same struct).
The keywords that are given in the PNG Specification are:
Title Short (one line) title or
caption for image
+
Author Name of image's creator
+
Description Description of image (possibly long)
+
Copyright Copyright notice
+
Creation Time Time of original image creation
(usually RFC 1123 format, see below)
+
Software Software used to create the image
+
Disclaimer Legal disclaimer
+
Warning Warning of nature of content
+
Source Device used to create the image
+
Comment Miscellaneous comment; conversion
from other image format
@@ -2972,17 +3640,19 @@ file so that decoders can recover the original data if desired.
/* Set the true bit depth of the image data */
if (color_type & PNG_COLOR_MASK_COLOR)
{
- sig_bit.red = true_bit_depth;
- sig_bit.green = true_bit_depth;
- sig_bit.blue = true_bit_depth;
+ sig_bit.red = true_bit_depth;
+ sig_bit.green = true_bit_depth;
+ sig_bit.blue = true_bit_depth;
}
+
else
{
- sig_bit.gray = true_bit_depth;
+ sig_bit.gray = true_bit_depth;
}
+
if (color_type & PNG_COLOR_MASK_ALPHA)
{
- sig_bit.alpha = true_bit_depth;
+ sig_bit.alpha = true_bit_depth;
}
png_set_sBIT(png_ptr, info_ptr, &sig_bit);
@@ -3028,11 +3698,18 @@ with
You must supply the function
- void write_transform_fn(png_ptr ptr, row_info_ptr
- row_info, png_bytep data)
+ void write_transform_fn(png_structp png_ptr ptr,
+ row_info_ptr row_info, png_bytep data)
See pngtest.c for a working example. Your function will be called
-before any of the other transformations are processed.
+before any of the other transformations are processed. If supported
+libpng also supplies an information routine that may be called from
+your callback:
+
+ png_get_current_row_number(png_ptr);
+
+This returns the current row passed to the transform. Even with interlaced
+images the value returned is the row in the final output image.
You can also set up a pointer to a user structure for use by your
callback function.
@@ -3114,25 +3791,39 @@ for details of which pixels to write when.
If you don't want libpng to handle the interlacing details, just
use png_set_interlace_handling() and call png_write_rows() the
-correct number of times to write all seven sub-images.
+correct number of times to write all the sub-images
+(png_set_interlace_handling() returns the number of sub-images.)
If you want libpng to build the sub-images, call this before you start
writing any rows:
- number_of_passes =
- png_set_interlace_handling(png_ptr);
+ number_of_passes = png_set_interlace_handling(png_ptr);
This will return the number of passes needed. Currently, this is seven,
but may change if another interlace type is added.
Then write the complete image number_of_passes times.
- png_write_rows(png_ptr, row_pointers,
- number_of_rows);
+ png_write_rows(png_ptr, row_pointers, number_of_rows);
+
+Think carefully before you write an interlaced image. Typically code that
+reads such images reads all the image data into memory, uncompressed, before
+doing any processing. Only code that can display an image on the fly can
+take advantage of the interlacing and even then the image has to be exactly
+the correct size for the output device, because scaling an image requires
+adjacent pixels and these are not available until all the passes have been
+read.
+
+If you do write an interlaced image you will hardly ever need to handle
+the interlacing yourself. Call png_set_interlace_handling() and use the
+approach described above.
-As some of these rows are not used, and thus return immediately, you may
-want to read about interlacing in the PNG specification, and only update
-the rows that are actually used.
+The only time it is conceivable that you will really need to write an
+interlaced image pass-by-pass is when you have read one pass by pass and
+made some pixel-by-pixel transformation to it, as described in the read
+code above. In this case use the PNG_PASS_ROWS and PNG_PASS_COLS macros
+to determine the size of each sub-image in turn and simply write the rows
+you obtained from the read code.
.SS Finishing a sequential write
@@ -3151,6 +3842,7 @@ It is also possible to individually free the info_ptr members that
point to libpng-allocated storage with the following function:
png_free_data(png_ptr, info_ptr, mask, seq)
+
mask - identifies data to be freed, a mask
containing the bitwise OR of one or
more of
@@ -3160,6 +3852,7 @@ point to libpng-allocated storage with the following function:
PNG_FREE_SCAL, PNG_FREE_SPLT,
PNG_FREE_TEXT, PNG_FREE_UNKN,
or simply PNG_FREE_ALL
+
seq - sequence number of item to be freed
(-1 for all items)
@@ -3181,19 +3874,22 @@ or so that it will free data that was allocated by the user with png_malloc()
or png_zalloc() and passed in via a png_set_*() function, with
png_data_freer(png_ptr, info_ptr, freer, mask)
- mask - which data elements are affected
- same choices as in png_free_data()
+
freer - one of
PNG_DESTROY_WILL_FREE_DATA
PNG_SET_WILL_FREE_DATA
PNG_USER_WILL_FREE_DATA
+ mask - which data elements are affected
+ same choices as in png_free_data()
+
For example, to transfer responsibility for some data from a read structure
to a write structure, you could use
png_data_freer(read_ptr, read_info_ptr,
PNG_USER_WILL_FREE_DATA,
PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
+
png_data_freer(write_ptr, write_info_ptr,
PNG_DESTROY_WILL_FREE_DATA,
PNG_FREE_PLTE|PNG_FREE_tRNS|PNG_FREE_hIST)
@@ -3240,9 +3936,11 @@ these functions, call the appropriate png_set_*_fn() function.
Memory allocation is done through the functions png_malloc(), png_calloc(),
and png_free(). These currently just call the standard C functions.
-png_calloc() calls png_malloc() and then png_memset() to clear the newly
-allocated memory to zero. If your pointers can't access more then 64K
-at a time, you will want to set MAXSEG_64K in zlib.h. Since it is
+png_calloc() calls png_malloc() and then clears the newly
+allocated memory to zero. There is limited support for certain systems
+with segmented memory architectures and the types of pointers declared by
+png.h match this; you will have to use appropriate pointers in your
+application. Since it is
unlikely that the method of handling memory allocation on a platform
will change between applications, these functions must be modified in
the library at compile time. If you prefer to use a different method
@@ -3256,7 +3954,8 @@ via
Your replacement memory functions must have prototypes as follows:
png_voidp malloc_fn(png_structp png_ptr,
- png_size_t size);
+ png_alloc_size_t size);
+
void free_fn(png_structp png_ptr, png_voidp ptr);
Your malloc_fn() must return NULL in case of failure. The png_malloc()
@@ -3289,8 +3988,10 @@ The replacement I/O functions must have prototypes as follows:
void user_read_data(png_structp png_ptr,
png_bytep data, png_size_t length);
+
void user_write_data(png_structp png_ptr,
png_bytep data, png_size_t length);
+
void user_flush_data(png_structp png_ptr);
The user_read_data() function is responsible for detecting and
@@ -3307,8 +4008,9 @@ Error handling in libpng is done through png_error() and png_warning().
Errors handled through png_error() are fatal, meaning that png_error()
should never return to its caller. Currently, this is handled via
setjmp() and longjmp() (unless you have compiled libpng with
-PNG_SETJMP_NOT_SUPPORTED, in which case it is handled via PNG_ABORT()),
-but you could change this to do things like exit() if you should wish.
+PNG_NO_SETJMP, in which case it is handled via PNG_ABORT()),
+but you could change this to do things like exit() if you should wish,
+as long as your function does not return.
On non-fatal errors, png_warning() is called
to print a warning message, and then control returns to the calling code.
@@ -3334,6 +4036,7 @@ parameters as follows:
void user_error_fn(png_structp png_ptr,
png_const_charp error_msg);
+
void user_warning_fn(png_structp png_ptr,
png_const_charp warning_msg);
@@ -3444,8 +4147,10 @@ zlib.h for more information on what these mean.
png_set_compression_strategy(png_ptr,
strategy);
+
png_set_compression_window_bits(png_ptr,
window_bits);
+
png_set_compression_method(png_ptr, method);
png_set_compression_buffer_size(png_ptr, size);
@@ -3535,6 +4240,8 @@ before recompiling libpng and save yourself code and data space, or
you can turn off individual capabilities with defines that begin with
PNG_NO_.
+In libpng-1.5.0 and later, the #define's are in pnglibconf.h instead.
+
You can also turn all of the transforms and ancillary chunk capabilities
off en masse with compiler directives that define
PNG_NO_READ[or WRITE]_TRANSFORMS, or PNG_NO_READ[or WRITE]_ANCILLARY_CHUNKS,
@@ -3587,8 +4294,8 @@ according to printf-style formatting directives. For example,
is expanded to
- if(PNG_DEBUG > 2)
- fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
+ if (PNG_DEBUG > 2)
+ fprintf(PNG_DEBUG_FILE, "foo=%d\n", foo);
When PNG_DEBUG is defined but is zero, the macros aren't defined, but you
can still use PNG_DEBUG to control your own debugging:
@@ -3609,11 +4316,13 @@ Libpng can support some of these extensions. To enable them, use the
png_permit_mng_features() function:
feature_set = png_permit_mng_features(png_ptr, mask)
+
mask is a png_uint_32 containing the bitwise OR of the
features you want to enable. These include
PNG_FLAG_MNG_EMPTY_PLTE
PNG_FLAG_MNG_FILTER_64
PNG_ALL_MNG_FEATURES
+
feature_set is a png_uint_32 that is the bitwise AND of
your mask with the set of MNG features that is
supported by the version of libpng that you are using.
@@ -3638,7 +4347,7 @@ still alive and well, but they have moved on to other things.
The old libpng functions png_read_init(), png_write_init(),
png_info_init(), png_read_destroy(), and png_write_destroy() have been
moved to PNG_INTERNAL in version 0.95 to discourage their use. These
-functions will be removed from libpng version 2.0.0.
+functions will be removed from libpng version 1.4.0.
The preferred method of creating and initializing the libpng structures is
via the png_create_read_struct(), png_create_write_struct(), and
@@ -3827,21 +4536,29 @@ png_get_mmx_bitdepth_threshold(), png_get_mmx_rowbytes_threshold(),
png_set_asm_flags(), and png_mmx_supported()
We removed the obsolete png_check_sig(), png_memcpy_check(), and
-png_memset_check() functions. Instead use !png_sig_cmp(), png_memcpy(),
-and png_memset(), respectively.
+png_memset_check() functions. Instead use !png_sig_cmp(), memcpy(),
+and memset(), respectively.
The function png_set_gray_1_2_4_to_8() was removed. It has been
deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
png_set_expand_gray_1_2_4_to_8() because the former function also
expanded palette images.
+Macros for png_get_uint_16, png_get_uint_32, and png_get_int_32
+were added and are used by default instead of the corresponding
+functions. Unfortunately,
+from libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
+function) incorrectly returned a value of type png_uint_32.
+
We changed the prototype for png_malloc() from
png_malloc(png_structp png_ptr, png_uint_32 size)
to
png_malloc(png_structp png_ptr, png_alloc_size_t size)
+This also applies to the prototype for the user replacement malloc_fn().
+
The png_calloc() function was added and is used in place of
-of "png_malloc(); png_memset();" except in the case in png_read_png()
+of "png_malloc(); memset();" except in the case in png_read_png()
where the array consists of pointers; in this case a "for" loop is used
after the png_malloc() to set the pointers to NULL, to give robust.
behavior in case the application runs out of memory part-way through
@@ -3859,9 +4576,287 @@ The png_zalloc() and png_zfree() functions are no longer exported.
The png_zalloc() function no longer zeroes out the memory that it
allocates.
+Support for dithering was disabled by default in libpng-1.4.0, because
+been well tested and doesn't actually "dither". The code was not
+removed, however, and could be enabled by building libpng with
+PNG_READ_DITHER_SUPPORTED defined. In libpng-1.4.2, this support
+was reenabled, but the function was renamed png_set_quantize() to
+reflect more accurately what it actually does. At the same time,
+the PNG_DITHER_[RED,GREEN_BLUE]_BITS macros were also renamed to
+PNG_QUANTIZE_[RED,GREEN,BLUE]_BITS, and PNG_READ_DITHER_SUPPORTED
+was renamed to PNG_READ_QUANTIZE_SUPPORTED.
+
We removed the trailing '.' from the warning and error messages.
-.SH X. Detecting libpng
+.SH X. Changes to Libpng from version 1.4.x to 1.5.x
+
+From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
+function) incorrectly returned a value of type png_uint_32.
+
+A. Changes that affect users of libpng
+
+There are no substantial API changes between the non-deprecated parts of
+the 1.4.5 API and the 1.5.0 API, however the ability to directly access
+the main libpng control structures, png_struct and png_info, deprecated
+in earlier versions of libpng, has been completely removed from
+libpng 1.5.
+
+We no longer include zlib.h in png.h. Applications that need access
+to information in zlib.h will need to add the '#include "zlib.h"'
+directive. It does not matter whether it is placed prior to or after
+the '"#include png.h"' directive.
+
+We moved the png_strcpy(), png_strncpy(), png_strlen(), png_memcpy(),
+png_memcmp(), png_sprintf, and png_memcpy() macros into a private
+header file (pngpriv.h) that is not accessible to applications.
+
+In png_get_iCCP, the type of "profile" was changed from png_charpp
+to png_bytepp, and in png_set_iCCP, from png_charp to png_const_bytep.
+
+There are changes of form in png.h, including new and changed macros to
+declare
+parts of the API. Some API functions with arguments that are pointers to
+data not modified within the function have been corrected to declare
+these arguments with PNG_CONST.
+
+Much of the internal use of C macros to control the library build has also
+changed and some of this is visible in the exported header files, in
+particular the use of macros to control data and API elements visible
+during application compilation may require significant revision to
+application code. (It is extremely rare for an application to do this.)
+
+Any program that compiled against libpng 1.4 and did not use deprecated
+features or access internal library structures should compile and work
+against libpng 1.5.
+
+libpng 1.5.0 adds PNG_ PASS macros to help in the reading and writing of
+interlaced images. The macros return the number of rows and columns in
+each pass and information that can be used to de-interlace and (if
+absolutely necessary) interlace an image.
+
+libpng 1.5.0 adds an API png_longjmp(png_ptr, value). This API calls
+the application provided png_longjmp_ptr on the internal, but application
+initialized, jmpbuf. It is provided as a convenience to avoid the need
+to use the png_jmpbuf macro, which had the unnecessary side effect of
+resetting the internal png_longjmp_ptr value.
+
+libpng 1.5.0 includes a complete fixed point API. By default this is
+present along with the corresponding floating point API. In general the
+fixed point API is faster and smaller than the floating point one because
+the PNG file format used fixed point, not floating point. This applies
+even if the library uses floating point in internal calculations. A new
+macro, PNG_FLOATING_ARITHMETIC_SUPPORTED, reveals whether the library
+uses floating point arithmetic (the default) or fixed point arithmetic
+internally for performance critical calculations such as gamma correction.
+In some cases, the gamma calculations may produce slightly different
+results. This has changed the results in png_rgb_to_gray and in alpha
+composition (png_set_background for example). This applies even if the
+original image was already linear (gamma == 1.0) and, therefore, it is
+not necessary to linearize the image. This is because libpng has *not*
+been changed to optimize that case correctly, yet.
+
+Fixed point support for the sCAL chunk comes with an important caveat;
+the sCAL specification uses a decimal encoding of floating point values
+and the accuracy of PNG fixed point values is insufficient for
+representation of these values. Consequently a "string" API
+(png_get_sCAL_s and png_set_sCAL_s) is the only reliable way of reading
+arbitrary sCAL chunks in the absence of either the floating point API or
+internal floating point calculations.
+
+Applications no longer need to include the optional distribution header
+file pngusr.h or define the corresponding macros during application
+build in order to see the correct variant of the libpng API. From 1.5.0
+application code can check for the corresponding _SUPPORTED macro:
+
+#ifdef PNG_INCH_CONVERSIONS_SUPPORTED
+ /* code that uses the inch conversion APIs. */
+#endif
+
+This macro will only be defined if the inch conversion functions have been
+compiled into libpng. The full set of macros, and whether or not support
+has been compiled in, are available in the header file pnglibconf.h.
+This header file is specific to the libpng build. Notice that prior to
+1.5.0 the _SUPPORTED macros would always have the default definition unless
+reset by pngusr.h or by explicit settings on the compiler command line.
+These settings may produce compiler warnings or errors in 1.5.0 because
+of macro redefinition.
+
+From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
+function) incorrectly returned a value of type png_uint_32. libpng 1.5.0
+is consistent with the implementation in 1.4.5 and 1.2.x (where the macro
+did not exist.)
+
+Applications can now choose whether to use these macros or to call the
+corresponding function by defining PNG_USE_READ_MACROS or
+PNG_NO_USE_READ_MACROS before including png.h. Notice that this is
+only supported from 1.5.0 -defining PNG_NO_USE_READ_MACROS prior to 1.5.0
+ will lead to a link failure.
+
+B. Changes to the build and configuration of libpng
+
+Details of internal changes to the library code can be found in the CHANGES
+file. These will be of no concern to the vast majority of library users or
+builders, however the few who configure libpng to a non-default feature
+set may need to change how this is done.
+
+There should be no need for library builders to alter build scripts if
+these use the distributed build support - configure or the makefiles -
+however users of the makefiles may care to update their build scripts
+to build pnglibconf.h where the corresponding makefile does not do so.
+
+Building libpng with a non-default configuration has changed completely.
+The old method using pngusr.h should still work correctly even though the
+way pngusr.h is used in the build has been changed, however library
+builders will probably want to examine the changes to take advantage of
+new capabilities and to simplify their build system.
+
+B.1 Specific changes to library configuration capabilities
+
+The library now supports a complete fixed point implementation and can
+thus be used on systems which have no floating point support or very
+limited or slow support. Previously gamma correction, an essential part
+of complete PNG support, required reasonably fast floating point.
+
+As part of this the choice of internal implementation has been made
+independent of the choice of fixed versus floating point APIs and all the
+missing fixed point APIs have been implemented.
+
+The exact mechanism used to control attributes of API functions has
+changed. A single set of operating system independent macro definitions
+is used and operating system specific directives are defined in
+pnglibconf.h
+
+As part of this the mechanism used to choose procedure call standards on
+those systems that allow a choice has been changed. At present this only
+affects certain Microsoft (DOS, Windows) and IBM (OS/2) operating systems
+running on Intel processors. As before PNGAPI is defined where required
+to control the exported API functions; however, two new macros, PNGCBAPI
+and PNGCAPI, are used instead for callback functions (PNGCBAPI) and
+(PNGCAPI) for functions that must match a C library prototype (currently
+only png_longjmp_ptr, which must match the C longjmp function.) The new
+approach is documented in pngconf.h
+
+Despite these changes libpng 1.5.0 only supports the native C function
+calling standard on those platforms tested so far (__cdecl on Microsoft
+Windows). This is because the support requirements for alternative
+calling conventions seem to no longer exist. Developers who find it
+necessary to set PNG_API_RULE to 1 should advise the mailing list
+(png-mng-implement) of this and library builders who use Openwatcom and
+therefore set PNG_API_RULE to 2 should also contact the mailing list.
+
+A new test program, pngvalid, is provided in addition to pngtest.
+pngvalid validates the arithmetic accuracy of the gamma correction
+calculations and includes a number of validations of the file format.
+A subset of the full range of tests is run when "make check" is done
+(in the 'configure' build.) pngvalid also allows total allocated memory
+usage to be evaluated and performs additional memory overwrite validation.
+
+Many changes to individual feature macros have been made. The following
+are the changes most likely to be noticed by library builders who
+configure libpng:
+
+1) All feature macros now have consistent naming:
+
+#define PNG_NO_feature turns the feature off
+#define PNG_feature_SUPPORTED turns the feature on
+
+pnglibconf.h contains one line for each feature macro which is either:
+
+#define PNG_feature_SUPPORTED
+
+if the feature is supported or:
+
+/*#undef PNG_feature_SUPPORTED*/
+
+if it is not. Library code consistently checks for the 'SUPPORTED' macro.
+It does not, and should not, check for the 'NO' macro which will not
+normally be defined even if the feature is not supported.
+
+Compatibility with the old names is provided as follows:
+
+PNG_INCH_CONVERSIONS turns on PNG_INCH_CONVERSIONS_SUPPORTED
+
+And the following definitions disable the corresponding feature:
+
+PNG_SETJMP_NOT_SUPPORTED disables SETJMP
+PNG_READ_TRANSFORMS_NOT_SUPPORTED disables READ_TRANSFORMS
+PNG_NO_READ_COMPOSITED_NODIV disables READ_COMPOSITE_NODIV
+PNG_WRITE_TRANSFORMS_NOT_SUPPORTED disables WRITE_TRANSFORMS
+PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED disables READ_ANCILLARY_CHUNKS
+PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED disables WRITE_ANCILLARY_CHUNKS
+
+Library builders should remove use of the above, inconsistent, names.
+
+2) Warning and error message formatting was previously conditional on
+the STDIO feature. The library has been changed to use the
+CONSOLE_IO feature instead. This means that if CONSOLE_IO is disabled
+the library no longer uses the printf(3) functions, even though the
+default read/write implementations use (FILE) style stdio.h functions.
+
+3) Three feature macros now control the fixed/floating point decisions:
+
+PNG_FLOATING_POINT_SUPPORTED enables the floating point APIs
+
+PNG_FIXED_POINT_SUPPORTED enables the fixed point APIs; however, in
+practice these are normally required internally anyway (because the PNG
+file format is fixed point), therefore in most cases PNG_NO_FIXED_POINT
+merely stops the function from being exported.
+
+PNG_FLOATING_ARITHMETIC_SUPPORTED chooses between the internal floating
+point implementation or the fixed point one. Typically the fixed point
+implementation is larger and slower than the floating point implementation
+on a system that supports floating point, however it may be faster on a
+system which lacks floating point hardware and therefore uses a software
+emulation.
+
+4) Added PNG_{READ,WRITE}_INT_FUNCTIONS_SUPPORTED. This allows the
+functions to read and write ints to be disabled independently of
+PNG_USE_READ_MACROS, which allows libpng to be built with the functions
+even though the default is to use the macros - this allows applications
+to choose at app buildtime whether or not to use macros (previously
+impossible because the functions weren't in the default build.)
+
+B.2 Changes to the configuration mechanism
+
+Prior to libpng-1.5.0 library builders who needed to configure libpng
+had either to modify the exported pngconf.h header file to add system
+specific configuration or had to write feature selection macros into
+pngusr.h and cause this to be included into pngconf.h by defining
+PNG_USER_CONFIG. The latter mechanism had the disadvantage that an
+application built without PNG_USER_CONFIG defined would see the
+unmodified, default, libpng API and thus would probably fail to link.
+
+These mechanisms still work in the configure build and in any makefile
+build that builds pnglibconf.h although the feature selection macros
+have changed somewhat as described above. In 1.5.0, however, pngusr.h is
+processed only once, when the exported header file pnglibconf.h is built.
+pngconf.h no longer includes pngusr.h, therefore it is ignored after the
+build of pnglibconf.h and it is never included in an application build.
+
+The rarely used alternative of adding a list of feature macros to the
+CFLAGS setting in the build also still works, however the macros will be
+copied to pnglibconf.h and this may produce macro redefinition warnings
+when the individual C files are compiled.
+
+All configuration now only works if pnglibconf.h is built from
+scripts/pnglibconf.dfa. This requires the program awk. Brian Kernighan
+(the original author of awk) maintains C source code of that awk and this
+and all known later implementations (often called by subtly different
+names - nawk and gawk for example) are adequate to build pnglibconf.h.
+The Sun Microsystems (now Oracle) program 'awk' is an earlier version
+and does not work, this may also apply to other systems that have a
+functioning awk called 'nawk'.
+
+Configuration options are now documented in scripts/pnglibconf.dfa. This
+file also includes dependency information that ensures a configuration is
+consistent; that is, if a feature is switched off dependent features are
+also removed. As a recommended alternative to using feature macros in
+pngusr.h a system builder may also define equivalent options in pngusr.dfa
+(or, indeed, any file) and add that to the configuration by setting
+DFA_XTRA to the file name. The makefiles in contrib/pngminim illustrate
+how to do this, and a case where pngusr.h is still required.
+
+.SH XI. Detecting libpng
The png_get_io_ptr() function has been present since libpng-0.88, has never
changed, and is unaffected by conditional compilation macros. It is the
@@ -3870,7 +4865,7 @@ libpng version since 0.88. In an autoconf "configure.in" you could use
AC_CHECK_LIB(png, png_get_io_ptr, ...
-.SH XI. Source code repository
+.SH XII. Source code repository
Since about February 2009, version 1.2.34, libpng has been under "git" source
control. The git repository was built from old libpng-x.y.z.tar.gz files
@@ -3889,7 +4884,12 @@ the libpng bug tracker at
http://libpng.sourceforge.net
-.SH XII. Coding style
+We also accept patches built from the tar or zip distributions, and
+simple verbal discriptions of bug fixes, reported either to the
+SourceForge bug tracker or to the png-mng-implement at lists.sf.net
+mailing list.
+
+.SH XIII. Coding style
Our coding style is similar to the "Allman" style, with curly
braces on separate lines:
@@ -3928,12 +4928,12 @@ the statement that follows the comment:
/* Single-line comment */
statement;
- /* Multiple-line
- * comment
+ /* This is a multiple-line
+ * comment.
*/
statement;
-Very short comments can be placed at the end of the statement
+Very short comments can be placed after the end of the statement
to which they pertain:
statement; /* comment */
@@ -3946,7 +4946,7 @@ Functions and their curly braces are not indented, and
exported functions are marked with PNGAPI:
/* This is a public function that is visible to
- * application programers. It does thus-and-so.
+ * application programmers. It does thus-and-so.
*/
void PNGAPI
png_exported_function(png_ptr, png_info, foo)
@@ -3974,15 +4974,16 @@ above the comment that says
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
-The names of all exported functions and variables begin
-with "png_", and all publicly visible C preprocessor
-macros begin with "PNG_".
+To avoid polluting the global namespace, the names of all exported
+functions and variables begin with "png_", and all publicly visible C
+preprocessor macros begin with "PNG_". We request that applications that
+use libpng *not* begin any of their own symbols with either of these strings.
We put a space after each comma and after each semicolon
-in "for" statments, and we put spaces before and after each
-C binary operator and after "for" or "while". We don't
-put a space between a typecast and the expression being
-cast, nor do we put one between a function name and the
+in "for" statements, and we put spaces before and after each
+C binary operator and after "for" or "while", and before
+"?". We don't put a space between a typecast and the expression
+being cast, nor do we put one between a function name and the
left parenthesis that follows it:
for (i = 2; i > 0; --i)
@@ -3997,15 +4998,15 @@ Lines do not exceed 80 characters.
Other rules can be inferred by inspecting the libpng source.
-.SH XIII. Y2K Compliance in libpng
+.SH XIV. Y2K Compliance in libpng
-January 3, 2010
+February 3, 2011
Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
-upward through 1.4.0 are Y2K compliant. It is my belief that earlier
+upward through 1.5.1 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant.
Libpng only has three year fields. One is a 2-byte unsigned integer that
@@ -4178,6 +5179,19 @@ the first widely used release:
1.4.0beta88-109 14 10400 14.so.14.0[.0]
1.4.0rc02-08 14 10400 14.so.14.0[.0]
1.4.0 14 10400 14.so.14.0[.0]
+ 1.4.1beta01-03 14 10401 14.so.14.1[.0]
+ 1.4.1rc01 14 10401 14.so.14.1[.0]
+ 1.4.1beta04-12 14 10401 14.so.14.1[.0]
+ 1.4.1 14 10401 14.so.14.1[.0]
+ 1.4.2 14 10402 14.so.14.2[.0]
+ 1.4.3 14 10403 14.so.14.3[.0]
+ 1.4.4 14 10404 14.so.14.4[.0]
+ 1.5.0beta01-58 15 10500 15.so.15.0[.0]
+ 1.5.0rc01-07 15 10500 15.so.15.0[.0]
+ 1.5.0 15 10500 15.so.15.0[.0]
+ 1.5.1beta01-11 15 10501 15.so.15.1[.0]
+ 1.5.1rc01-02 15 10501 15.so.15.1[.0]
+ 1.5.1 15 10501 15.so.15.1[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -4190,7 +5204,8 @@ version 1.0.6j; from then on they were given the upcoming public
release number plus "betaNN" or "rcN".
.SH "SEE ALSO"
-libpngpf(3), png(5)
+.BR "png"(5), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
+
.LP
.IR libpng :
.IP
@@ -4233,7 +5248,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.4.0 - January 3, 2010:
+Libpng version 1.5.1 - February 3, 2011:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -4256,7 +5271,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.2.6, August 15, 2004, through 1.4.0, January 3, 2010, are
+libpng versions 1.2.6, August 15, 2004, through 1.5.1, February 3, 2011, are
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors
@@ -4355,7 +5370,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-January 3, 2010
+February 3, 2011
.\" end of man page
diff --git a/src/3rdparty/libpng/libpngpf.3 b/src/3rdparty/libpng/libpngpf.3
index f323764..ff6e164 100644
--- a/src/3rdparty/libpng/libpngpf.3
+++ b/src/3rdparty/libpng/libpngpf.3
@@ -1,810 +1,30 @@
-.TH LIBPNGPF 3 "January 3, 2010"
+.TH LIBPNGPF 3 "February 3, 2011"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.4.0
+libpng \- Portable Network Graphics (PNG) Reference Library 1.5.1
(private functions)
.SH SYNOPSIS
-\fB#include <png.h>\fP
-
\fB#include \fI"pngpriv.h"
\fI\fB
-\fBvoid png_64bit_product (long \fP\fIv1\fP\fB, long \fP\fIv2\fP\fB, unsigned long \fI*hi_product,
-
-\fBunsigned long \fI*lo_product\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_build_gamma_table (png_structp \fP\fIpng_ptr\fP\fB, png_byte \fIbit_depth\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_build_grayscale_palette (int \fP\fIbit_depth\fP\fB, png_colorp \fIpalette\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_calculate_crc (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIptr\fP\fB, png_size_t \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBint png_check_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_fixed_point \fP\fIint_white_x\fP\fB, png_fixed_point \fP\fIint_white_y\fP\fB, png_fixed_point \fP\fIint_red_x\fP\fB, png_fixed_point \fP\fIint_red_y\fP\fB, png_fixed_point \fP\fIint_green_x\fP\fB, png_fixed_point \fP\fIint_green_y\fP\fB, png_fixed_point \fP\fIint_blue_x\fP\fB, png_fixed_point \fIint_blue_y\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_check_chunk_name (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIchunk_name\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBpng_size_t png_check_keyword (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charpp \fInew_key\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_check_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIinterlace_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fIfilter_type\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_combine_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fImask\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_correct_palette (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, int \fInum_palette\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBint png_crc_error (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBint png_crc_finish (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIskip\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_crc_read (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuf\fP\fB, png_size_t \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBpng_voidp png_create_struct (int \fItype\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBpng_voidp png_create_struct_2 (int \fP\fItype\fP\fB, png_malloc_ptr \fP\fImalloc_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBint png_debug(int \fP\fIlevel\fP\fB, png_const_charp \fImessage\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_debug1(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fIp1\fP\fB);\fP
-
-\fI\fB
-
-\fBint png_debug2(int \fP\fIlevel\fP\fB, png_const_charp \fP\fImessage\fP\fB, \fP\fIp1\fP\fB, \fIp2\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_decompress_chunk (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcomp_type\fP\fB, png_size_t \fP\fIchunklength\fP\fB, png_size_t \fP\fIprefix_length\fP\fB, png_size_t \fI*data_length\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_destroy_struct (png_voidp \fIstruct_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_destroy_struct_2 (png_voidp \fP\fIstruct_ptr\fP\fB, png_free_ptr \fP\fIfree_fn\fP\fB, png_voidp \fImem_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_background (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fP\fItrans_color\fP\fB, png_color_16p \fP\fIbackground\fP\fB, png_color_16p \fP\fIbackground_1\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_bytep \fP\fIgamma_from_1\fP\fB, png_bytep \fP\fIgamma_to_1\fP\fB, png_uint_16pp \fP\fIgamma_16\fP\fB, png_uint_16pp \fP\fIgamma_16_from_1\fP\fB, png_uint_16pp \fP\fIgamma_16_to_1\fP\fB, int \fIgamma_shift\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_bgr (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_chop (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_dither (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIpalette_lookup\fP\fB, png_bytep \fIdither_lookup\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_expand (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_16p \fItrans_value\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_expand_palette (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_bytep \fP\fItrans\fP\fB, int \fInum_trans\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_gamma (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIgamma_table\fP\fB, png_uint_16pp \fP\fIgamma_16_table\fP\fB, int \fIgamma_shift\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_gray_to_rgb (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_invert (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_pack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIbit_depth\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_packswap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_read_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fP\fIfiller\fP\fB, png_uint_32 \fIflags\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_read_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fP\fIpass\fP\fB, png_uint_32 \fItransformations\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_read_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_do_read_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBint png_do_rgb_to_gray (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_shift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIbit_depth\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_strip_filler (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_uint_32 \fIflags\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_swap (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_unpack (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_unshift (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_color_8p \fIsig_bits\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_write_interlace (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, int \fIpass\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_write_invert_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_write_swap_alpha (png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_do_write_transformations (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid *png_far_to_near (png_structp png_ptr,png_voidp \fP\fIptr\fP\fB, int \fIcheck\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_flush (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_bKGD (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_cHRM (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_gAMA (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_IEND (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_iTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_sRGB (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_info_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_init_mmx_flags (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_init_read_transformations (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_process_IDAT_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_process_some_data (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_check_crc (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_crc_finish (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_crc_skip (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_fill_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_handle_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_handle_unknown (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_handle_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_uint_32 \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_have_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_have_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_have_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIrow\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_process_row (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_read_chunk (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_read_end (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_read_IDAT (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_read_sig (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_read_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_read_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_restore_buffer (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIbuffer\fP\fB, png_size_t \fIbuffer_length\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_push_save_buffer (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_read_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_destroy (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_infop \fIend_info_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_read_filter_row (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fP\fIrow_info\fP\fB, png_bytep \fP\fIrow\fP\fB, png_bytep \fP\fIprev_row\fP\fB, int \fIfilter\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_read_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_read_push_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_read_start_row (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_read_transform_info (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fIinfo_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_reset_crc (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBint png_set_text_2 (png_structp \fP\fIpng_ptr\fP\fB, png_infop \fP\fIinfo_ptr\fP\fB, png_textp \fP\fItext_ptr\fP\fB, int \fInum_text\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_cHRM (png_structp \fP\fIpng_ptr\fP\fB, double \fP\fIwhite_x\fP\fB, double \fP\fIwhite_y\fP\fB, double \fP\fIred_x\fP\fB, double \fP\fIred_y\fP\fB, double \fP\fIgreen_x\fP\fB, double \fP\fIgreen_y\fP\fB, double \fP\fIblue_x\fP\fB, double \fIblue_y\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_cHRM_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwhite_x\fP\fB, png_uint_32 \fP\fIwhite_y\fP\fB, png_uint_32 \fP\fIred_x\fP\fB, png_uint_32 \fP\fIred_y\fP\fB, png_uint_32 \fP\fIgreen_x\fP\fB, png_uint_32 \fP\fIgreen_y\fP\fB, png_uint_32 \fP\fIblue_x\fP\fB, png_uint_32 \fIblue_y\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_data (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_destroy (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fBvoid png_write_filtered_row (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fIfiltered_row\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_find_filter (png_structp \fP\fIpng_ptr\fP\fB, png_row_infop \fIrow_info\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_finish_row (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_gAMA (png_structp \fP\fIpng_ptr\fP\fB, double \fIfile_gamma\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_gAMA_fixed (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fIint_file_gamma\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_hIST (png_structp \fP\fIpng_ptr\fP\fB, png_uint_16p \fP\fIhist\fP\fB, int \fInum_hist\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_iCCP (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIname\fP\fB, int \fP\fIcompression_type\fP\fB, png_charp \fP\fIprofile\fP\fB, int \fIproflen\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_IDAT (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fIdata\fP\fB, png_size_t \fIlength\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_IEND (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_IHDR (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIwidth\fP\fB, png_uint_32 \fP\fIheight\fP\fB, int \fP\fIbit_depth\fP\fB, int \fP\fIcolor_type\fP\fB, int \fP\fIcompression_type\fP\fB, int \fP\fIfilter_type\fP\fB, int \fIinterlace_type\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_iTXt (png_structp \fP\fIpng_ptr\fP\fB, int \fP\fIcompression\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fIlang\fP\fB, png_charp \fP\fItranslated_key\fP\fB, png_charp \fItext\fP\fB);\fP
-
-\fI\fB
+\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now \fIthat
-\fI\fB
+\fBthe private function prototypes are hidden in pngpriv.h and not \fIaccessible
-\fBvoid png_write_oFFs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_offset\fP\fB, png_uint_32 \fP\fIy_offset\fP\fB, int \fIunit_type\fP\fB);\fP
+\fBto applications. Look in pngpriv.h for the prototypes and a short \fIdescription
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_pCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIpurpose\fP\fB, png_int_32 \fP\fIX0\fP\fB, png_int_32 \fP\fIX1\fP\fB, int \fP\fItype\fP\fB, int \fP\fInparams\fP\fB, png_charp \fP\fIunits\fP\fB, png_charpp \fIparams\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_pHYs (png_structp \fP\fIpng_ptr\fP\fB, png_uint_32 \fP\fIx_pixels_per_unit\fP\fB, png_uint_32 \fP\fIy_pixels_per_unit\fP\fB, int \fIunit_type\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_PLTE (png_structp \fP\fIpng_ptr\fP\fB, png_colorp \fP\fIpalette\fP\fB, png_uint_32 \fInum_pal\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_sBIT (png_structp \fP\fIpng_ptr\fP\fB, png_color_8p \fP\fIsbit\fP\fB, int \fIcolor_type\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_sCAL (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, double \fP\fIwidth\fP\fB, double \fIheight\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_sCAL_s (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIunit\fP\fB, png_charp \fP\fIwidth\fP\fB, png_charp \fIheight\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_sRGB (png_structp \fP\fIpng_ptr\fP\fB, int \fIintent\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_sPLT (png_structp \fP\fIpng_ptr\fP\fB, png_spalette_p \fIpalette\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_start_row (png_structp \fIpng_ptr\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_tEXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fItext_len\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_tIME (png_structp \fP\fIpng_ptr\fP\fB, png_timep \fImod_time\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_tRNS (png_structp \fP\fIpng_ptr\fP\fB, png_bytep \fP\fItrans\fP\fB, png_color_16p \fP\fIvalues\fP\fB, int \fP\fInumber\fP\fB, int \fIcolor_type\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_write_zTXt (png_structp \fP\fIpng_ptr\fP\fB, png_charp \fP\fIkey\fP\fB, png_charp \fP\fItext\fP\fB, png_size_t \fP\fItext_len\fP\fB, int \fIcompression\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoidpf png_zalloc (voidpf \fP\fIpng_ptr\fP\fB, uInt \fP\fIitems\fP\fB, uInt \fIsize\fP\fB);\fP
-
-\fI\fB
-
-\fI\fB
-
-\fBvoid png_zfree (voidpf \fP\fIpng_ptr\fP\fB, voidpf \fIptr\fP\fB);\fP
-
-\fI\fB
+\fBof each \fIfunction.
\fI\fB
.SH DESCRIPTION
-The functions listed above are used privately by libpng
+The functions previously listed here are used privately by libpng
and are not recommended for use by applications. They are
not "exported" to applications using shared libraries. They
are listed alphabetically here as an aid to libpng maintainers.
-See png.h for more information on these functions.
+See pngpriv.h for more information on these functions.
.SH SEE ALSO
-libpng(3), png(5)
+.BR "png"(5), " libpng"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
.SH AUTHOR
Glenn Randers-Pehrson
diff --git a/src/3rdparty/libpng/ltmain.sh b/src/3rdparty/libpng/ltmain.sh
deleted file mode 100755
index a72f2fd..0000000
--- a/src/3rdparty/libpng/ltmain.sh
+++ /dev/null
@@ -1,8406 +0,0 @@
-# Generated from ltmain.m4sh.
-
-# ltmain.sh (GNU libtool) 2.2.6b
-# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
-
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 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.
-
-# GNU Libtool 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.
-#
-# As a special exception to the GNU General Public License,
-# if you distribute this file as part of a program or library that
-# is built using GNU Libtool, you may include this file under the
-# same distribution terms that you use for the rest of that program.
-#
-# GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy
-# can be downloaded from http://www.gnu.org/licenses/gpl.html,
-# or obtained by writing to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-# Usage: $progname [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
-# --mode=MODE use operation mode MODE
-# --preserve-dup-deps don't remove duplicate dependency libraries
-# --quiet, --silent don't print informational messages
-# --tag=TAG use configuration variables from tag TAG
-# -v, --verbose print informational messages (default)
-# --version print version information
-# -h, --help print short or long help message
-#
-# 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 `$progname --help --mode=MODE' for a more detailed description of MODE.
-#
-# When reporting a bug, please describe a test case to reproduce it and
-# include the following information:
-#
-# host-triplet: $host
-# shell: $SHELL
-# compiler: $LTCC
-# compiler flags: $LTCFLAGS
-# linker: $LD (gnu? $with_gnu_ld)
-# $progname: (GNU libtool) 2.2.6b
-# automake: $automake_version
-# autoconf: $autoconf_version
-#
-# Report bugs to <bug-libtool@gnu.org>.
-
-PROGRAM=ltmain.sh
-PACKAGE=libtool
-VERSION=2.2.6b
-TIMESTAMP=""
-package_revision=1.3017
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs 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
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# NLS nuisances: We save the old values to restore during execute mode.
-# 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).
-lt_user_locale=
-lt_safe_locale=
-for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
-do
- eval "if test \"\${$lt_var+set}\" = set; then
- save_$lt_var=\$$lt_var
- $lt_var=C
- export $lt_var
- lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
- lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
- fi"
-done
-
-$lt_unset CDPATH
-
-
-
-
-
-: ${CP="cp -f"}
-: ${ECHO="echo"}
-: ${EGREP="/bin/grep -E"}
-: ${FGREP="/bin/grep -F"}
-: ${GREP="/bin/grep"}
-: ${LN_S="ln -s"}
-: ${MAKE="make"}
-: ${MKDIR="mkdir"}
-: ${MV="mv -f"}
-: ${RM="rm -f"}
-: ${SED="/bin/sed"}
-: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
-: ${Xsed="$SED -e 1s/^X//"}
-
-# Global variables:
-EXIT_SUCCESS=0
-EXIT_FAILURE=1
-EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
-EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
-
-exit_status=$EXIT_SUCCESS
-
-# Make sure IFS has a sensible default
-lt_nl='
-'
-IFS=" $lt_nl"
-
-dirname="s,/[^/]*$,,"
-basename="s,^.*/,,"
-
-# func_dirname_and_basename file append nondir_replacement
-# perform func_basename and func_dirname in a single function
-# call:
-# dirname: Compute the dirname of FILE. If nonempty,
-# add APPEND to the result, otherwise set result
-# to NONDIR_REPLACEMENT.
-# value returned in "$func_dirname_result"
-# basename: Compute filename of FILE.
-# value retuned in "$func_basename_result"
-# Implementation must be kept synchronized with func_dirname
-# and func_basename. For efficiency, we do not delegate to
-# those functions but instead duplicate the functionality here.
-func_dirname_and_basename ()
-{
- # Extract subdirectory from the argument.
- func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
- if test "X$func_dirname_result" = "X${1}"; then
- func_dirname_result="${3}"
- else
- func_dirname_result="$func_dirname_result${2}"
- fi
- func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
-}
-
-# Generated shell functions inserted here.
-
-# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
-# is ksh but when the shell is invoked as "sh" and the current value of
-# the _XPG environment variable is not equal to 1 (one), the special
-# positional parameter $0, within a function call, is the name of the
-# function.
-progpath="$0"
-
-# The name of this program:
-# In the unlikely event $progname began with a '-', it would play havoc with
-# func_echo (imagine progname=-n), so we prepend ./ in that case:
-func_dirname_and_basename "$progpath"
-progname=$func_basename_result
-case $progname in
- -*) progname=./$progname ;;
-esac
-
-# Make sure we have an absolute path for reexecution:
-case $progpath in
- [\\/]*|[A-Za-z]:\\*) ;;
- *[\\/]*)
- progdir=$func_dirname_result
- progdir=`cd "$progdir" && pwd`
- progpath="$progdir/$progname"
- ;;
- *)
- save_IFS="$IFS"
- IFS=:
- for progdir in $PATH; do
- IFS="$save_IFS"
- test -x "$progdir/$progname" && break
- done
- IFS="$save_IFS"
- test -n "$progdir" || progdir=`pwd`
- progpath="$progdir/$progname"
- ;;
-esac
-
-# 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'
-
-# Same as above, but do not quote variable references.
-double_quote_subst='s/\(["`\\]\)/\\\1/g'
-
-# Re-`\' parameter expansions in output of double_quote_subst that were
-# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
-# in input to double_quote_subst, that '$' was protected from expansion.
-# Since each input `\' is now two `\'s, look for any number of runs of
-# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
-bs='\\'
-bs2='\\\\'
-bs4='\\\\\\\\'
-dollar='\$'
-sed_double_backslash="\
- s/$bs4/&\\
-/g
- s/^$bs2$dollar/$bs&/
- s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
- s/\n//g"
-
-# Standard options:
-opt_dry_run=false
-opt_help=false
-opt_quiet=false
-opt_verbose=false
-opt_warning=:
-
-# func_echo arg...
-# Echo program name prefixed message, along with the current mode
-# name if it has been set yet.
-func_echo ()
-{
- $ECHO "$progname${mode+: }$mode: $*"
-}
-
-# func_verbose arg...
-# Echo program name prefixed message in verbose mode only.
-func_verbose ()
-{
- $opt_verbose && func_echo ${1+"$@"}
-
- # A bug in bash halts the script if the last line of a function
- # fails when set -e is in force, so we need another command to
- # work around that:
- :
-}
-
-# func_error arg...
-# Echo program name prefixed message to standard error.
-func_error ()
-{
- $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
-}
-
-# func_warning arg...
-# Echo program name prefixed warning message to standard error.
-func_warning ()
-{
- $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
-
- # bash bug again:
- :
-}
-
-# func_fatal_error arg...
-# Echo program name prefixed message to standard error, and exit.
-func_fatal_error ()
-{
- func_error ${1+"$@"}
- exit $EXIT_FAILURE
-}
-
-# func_fatal_help arg...
-# Echo program name prefixed message to standard error, followed by
-# a help hint, and exit.
-func_fatal_help ()
-{
- func_error ${1+"$@"}
- func_fatal_error "$help"
-}
-help="Try \`$progname --help' for more information." ## default
-
-
-# func_grep expression filename
-# Check whether EXPRESSION matches any line of FILENAME, without output.
-func_grep ()
-{
- $GREP "$1" "$2" >/dev/null 2>&1
-}
-
-
-# func_mkdir_p directory-path
-# Make sure the entire path to DIRECTORY-PATH is available.
-func_mkdir_p ()
-{
- my_directory_path="$1"
- my_dir_list=
-
- if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
-
- # Protect directory names starting with `-'
- case $my_directory_path in
- -*) my_directory_path="./$my_directory_path" ;;
- esac
-
- # While some portion of DIR does not yet exist...
- while test ! -d "$my_directory_path"; do
- # ...make a list in topmost first order. Use a colon delimited
- # list incase some portion of path contains whitespace.
- my_dir_list="$my_directory_path:$my_dir_list"
-
- # If the last portion added has no slash in it, the list is done
- case $my_directory_path in */*) ;; *) break ;; esac
-
- # ...otherwise throw away the child directory and loop
- my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
- done
- my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
-
- save_mkdir_p_IFS="$IFS"; IFS=':'
- for my_dir in $my_dir_list; do
- IFS="$save_mkdir_p_IFS"
- # mkdir can fail with a `File exist' error if two processes
- # try to create one of the directories concurrently. Don't
- # stop in that case!
- $MKDIR "$my_dir" 2>/dev/null || :
- done
- IFS="$save_mkdir_p_IFS"
-
- # Bail out if we (or some other process) failed to create a directory.
- test -d "$my_directory_path" || \
- func_fatal_error "Failed to create \`$1'"
- fi
-}
-
-
-# func_mktempdir [string]
-# Make a temporary directory that won't clash with other running
-# libtool processes, and avoids race conditions if possible. If
-# given, STRING is the basename for that directory.
-func_mktempdir ()
-{
- my_template="${TMPDIR-/tmp}/${1-$progname}"
-
- if test "$opt_dry_run" = ":"; then
- # Return a directory name, but don't create it in dry-run mode
- my_tmpdir="${my_template}-$$"
- else
-
- # If mktemp works, use that first and foremost
- my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
-
- if test ! -d "$my_tmpdir"; then
- # Failing that, at least try and use $RANDOM to avoid a race
- my_tmpdir="${my_template}-${RANDOM-0}$$"
-
- save_mktempdir_umask=`umask`
- umask 0077
- $MKDIR "$my_tmpdir"
- umask $save_mktempdir_umask
- fi
-
- # If we're not in dry-run mode, bomb out on failure
- test -d "$my_tmpdir" || \
- func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
- fi
-
- $ECHO "X$my_tmpdir" | $Xsed
-}
-
-
-# func_quote_for_eval arg
-# Aesthetically quote ARG to be evaled later.
-# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
-# is double-quoted, suitable for a subsequent eval, whereas
-# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
-# which are still active within double quotes backslashified.
-func_quote_for_eval ()
-{
- case $1 in
- *[\\\`\"\$]*)
- func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
- *)
- func_quote_for_eval_unquoted_result="$1" ;;
- esac
-
- case $func_quote_for_eval_unquoted_result in
- # Double-quote args containing shell metacharacters to delay
- # word splitting, command substitution and and variable
- # expansion for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
- ;;
- *)
- func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
- esac
-}
-
-
-# func_quote_for_expand arg
-# Aesthetically quote ARG to be evaled later; same as above,
-# but do not quote variable references.
-func_quote_for_expand ()
-{
- case $1 in
- *[\\\`\"]*)
- my_arg=`$ECHO "X$1" | $Xsed \
- -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
- *)
- my_arg="$1" ;;
- esac
-
- case $my_arg in
- # Double-quote args containing shell metacharacters to delay
- # word splitting and command substitution for a subsequent eval.
- # Many Bourne shells cannot handle close brackets correctly
- # in scan sets, so we specify it separately.
- *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
- my_arg="\"$my_arg\""
- ;;
- esac
-
- func_quote_for_expand_result="$my_arg"
-}
-
-
-# func_show_eval cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it.
-func_show_eval ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$my_cmd"
- my_status=$?
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-# func_show_eval_locale cmd [fail_exp]
-# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
-# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
-# is given, then evaluate it. Use the saved locale for evaluation.
-func_show_eval_locale ()
-{
- my_cmd="$1"
- my_fail_exp="${2-:}"
-
- ${opt_silent-false} || {
- func_quote_for_expand "$my_cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
-
- if ${opt_dry_run-false}; then :; else
- eval "$lt_user_locale
- $my_cmd"
- my_status=$?
- eval "$lt_safe_locale"
- if test "$my_status" -eq 0; then :; else
- eval "(exit $my_status); $my_fail_exp"
- fi
- fi
-}
-
-
-
-
-
-# func_version
-# Echo version message to standard output and exit.
-func_version ()
-{
- $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
- s/^# //
- s/^# *$//
- s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_usage
-# Echo short help message to standard output and exit.
-func_usage ()
-{
- $SED -n '/^# Usage:/,/# -h/ {
- s/^# //
- s/^# *$//
- s/\$progname/'$progname'/
- p
- }' < "$progpath"
- $ECHO
- $ECHO "run \`$progname --help | more' for full usage"
- exit $?
-}
-
-# func_help
-# Echo long help message to standard output and exit.
-func_help ()
-{
- $SED -n '/^# Usage:/,/# Report bugs to/ {
- s/^# //
- s/^# *$//
- s*\$progname*'$progname'*
- s*\$host*'"$host"'*
- s*\$SHELL*'"$SHELL"'*
- s*\$LTCC*'"$LTCC"'*
- s*\$LTCFLAGS*'"$LTCFLAGS"'*
- s*\$LD*'"$LD"'*
- s/\$with_gnu_ld/'"$with_gnu_ld"'/
- s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
- s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
- p
- }' < "$progpath"
- exit $?
-}
-
-# func_missing_arg argname
-# Echo program name prefixed message to standard error and set global
-# exit_cmd.
-func_missing_arg ()
-{
- func_error "missing argument for $1"
- exit_cmd=exit
-}
-
-exit_cmd=:
-
-
-
-
-
-# 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 "$progpath" --no-reexec ${1+"$@"}
-fi
-
-if test "X$1" = X--fallback-echo; then
- # used as fallback echo
- shift
- cat <<EOF
-$*
-EOF
- exit $EXIT_SUCCESS
-fi
-
-magic="%%%MAGIC variable%%%"
-magic_exe="%%%MAGIC EXE variable%%%"
-
-# Global variables.
-# $mode is unset
-nonopt=
-execute_dlfiles=
-preserve_args=
-lo2o="s/\\.lo\$/.${objext}/"
-o2lo="s/\\.${objext}\$/.lo/"
-extracted_archives=
-extracted_serial=0
-
-opt_dry_run=false
-opt_duplicate_deps=false
-opt_silent=false
-opt_debug=:
-
-# 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=
-
-# func_fatal_configuration arg...
-# Echo program name prefixed message to standard error, followed by
-# a configuration failure hint, and exit.
-func_fatal_configuration ()
-{
- func_error ${1+"$@"}
- func_error "See the $PACKAGE documentation for more information."
- func_fatal_error "Fatal configuration error."
-}
-
-
-# func_config
-# Display the configuration for all the tags in this script.
-func_config ()
-{
- re_begincf='^# ### BEGIN LIBTOOL'
- re_endcf='^# ### END LIBTOOL'
-
- # Default configuration.
- $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
-
- # Now print the configurations for the tags.
- for tagname in $taglist; do
- $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
- done
-
- exit $?
-}
-
-# func_features
-# Display the features supported by this script.
-func_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 $?
-}
-
-# func_enable_tag tagname
-# Verify that TAGNAME is valid, and either flag an error and exit, or
-# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
-# variable here.
-func_enable_tag ()
-{
- # Global variable:
- tagname="$1"
-
- re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
- re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
- sed_extractcf="/$re_begincf/,/$re_endcf/p"
-
- # Validate tagname.
- case $tagname in
- *[!-_A-Za-z0-9,/]*)
- func_fatal_error "invalid tag name: $tagname"
- ;;
- esac
-
- # Don't test for the "default" C tag, as we know it's
- # there but not specially marked.
- case $tagname in
- CC) ;;
- *)
- if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
- taglist="$taglist $tagname"
-
- # Evaluate the configuration. Be careful to quote the path
- # and the sed script, to avoid splitting on whitespace, but
- # also don't use non-portable quotes within backquotes within
- # quotes we have to do it in 2 steps:
- extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
- eval "$extractedcf"
- else
- func_error "ignoring unknown tag $tagname"
- fi
- ;;
- esac
-}
-
-# Parse options once, thoroughly. This comes as soon as possible in
-# the script to make things like `libtool --version' happen quickly.
-{
-
- # Shorthand for --mode=foo, only valid as the first argument
- case $1 in
- clean|clea|cle|cl)
- shift; set dummy --mode clean ${1+"$@"}; shift
- ;;
- compile|compil|compi|comp|com|co|c)
- shift; set dummy --mode compile ${1+"$@"}; shift
- ;;
- execute|execut|execu|exec|exe|ex|e)
- shift; set dummy --mode execute ${1+"$@"}; shift
- ;;
- finish|finis|fini|fin|fi|f)
- shift; set dummy --mode finish ${1+"$@"}; shift
- ;;
- install|instal|insta|inst|ins|in|i)
- shift; set dummy --mode install ${1+"$@"}; shift
- ;;
- link|lin|li|l)
- shift; set dummy --mode link ${1+"$@"}; shift
- ;;
- uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
- shift; set dummy --mode uninstall ${1+"$@"}; shift
- ;;
- esac
-
- # Parse non-mode specific arguments:
- while test "$#" -gt 0; do
- opt="$1"
- shift
-
- case $opt in
- --config) func_config ;;
-
- --debug) preserve_args="$preserve_args $opt"
- func_echo "enabling shell trace mode"
- opt_debug='set -x'
- $opt_debug
- ;;
-
- -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
- execute_dlfiles="$execute_dlfiles $1"
- shift
- ;;
-
- --dry-run | -n) opt_dry_run=: ;;
- --features) func_features ;;
- --finish) mode="finish" ;;
-
- --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
- case $1 in
- # Valid mode arguments:
- clean) ;;
- compile) ;;
- execute) ;;
- finish) ;;
- install) ;;
- link) ;;
- relink) ;;
- uninstall) ;;
-
- # Catch anything else as an error
- *) func_error "invalid argument for $opt"
- exit_cmd=exit
- break
- ;;
- esac
-
- mode="$1"
- shift
- ;;
-
- --preserve-dup-deps)
- opt_duplicate_deps=: ;;
-
- --quiet|--silent) preserve_args="$preserve_args $opt"
- opt_silent=:
- ;;
-
- --verbose| -v) preserve_args="$preserve_args $opt"
- opt_silent=false
- ;;
-
- --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
- preserve_args="$preserve_args $opt $1"
- func_enable_tag "$1" # tagname is set here
- shift
- ;;
-
- # Separate optargs to long options:
- -dlopen=*|--mode=*|--tag=*)
- func_opt_split "$opt"
- set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
- shift
- ;;
-
- -\?|-h) func_usage ;;
- --help) opt_help=: ;;
- --version) func_version ;;
-
- -*) func_fatal_help "unrecognized option \`$opt'" ;;
-
- *) nonopt="$opt"
- break
- ;;
- esac
- done
-
-
- case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
- # don't eliminate duplications in $postdeps and $predeps
- opt_duplicate_compiler_generated_deps=:
- ;;
- *)
- opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
- ;;
- esac
-
- # Having warned about all mis-specified options, bail out if
- # anything was wrong.
- $exit_cmd $EXIT_FAILURE
-}
-
-# func_check_version_match
-# Ensure that we are using m4 macros, and libtool script from the same
-# release of libtool.
-func_check_version_match ()
-{
- if test "$package_revision" != "$macro_revision"; then
- if test "$VERSION" != "$macro_version"; then
- if test -z "$macro_version"; then
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from an older release.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
-$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
-$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
-$progname: and run autoconf again.
-_LT_EOF
- fi
- else
- cat >&2 <<_LT_EOF
-$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
-$progname: but the definition of this LT_INIT comes from revision $macro_revision.
-$progname: You should recreate aclocal.m4 with macros from revision $package_revision
-$progname: of $PACKAGE $VERSION and run autoconf again.
-_LT_EOF
- fi
-
- exit $EXIT_MISMATCH
- fi
-}
-
-
-## ----------- ##
-## Main. ##
-## ----------- ##
-
-$opt_help || {
- # Sanity checks first:
- func_check_version_match
-
- if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
- func_fatal_configuration "not configured to build any kind of library"
- fi
-
- test -z "$mode" && func_fatal_error "error: you must specify a MODE."
-
-
- # Darwin sucks
- eval std_shrext=\"$shrext_cmds\"
-
-
- # Only execute mode is allowed to have -dlopen flags.
- if test -n "$execute_dlfiles" && test "$mode" != execute; then
- func_error "unrecognized option \`-dlopen'"
- $ECHO "$help" 1>&2
- exit $EXIT_FAILURE
- fi
-
- # Change the help message to a mode-specific one.
- generic_help="$help"
- help="Try \`$progname --help --mode=$mode' for more information."
-}
-
-
-# func_lalib_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_lalib_p ()
-{
- test -f "$1" &&
- $SED -e 4q "$1" 2>/dev/null \
- | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
-}
-
-# func_lalib_unsafe_p file
-# True iff FILE is a libtool `.la' library or `.lo' object file.
-# This function implements the same check as func_lalib_p without
-# resorting to external programs. To this end, it redirects stdin and
-# closes it afterwards, without saving the original file descriptor.
-# As a safety measure, use it only where a negative result would be
-# fatal anyway. Works if `file' does not exist.
-func_lalib_unsafe_p ()
-{
- lalib_p=no
- if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
- for lalib_p_l in 1 2 3 4
- do
- read lalib_p_line
- case "$lalib_p_line" in
- \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
- esac
- done
- exec 0<&5 5<&-
- fi
- test "$lalib_p" = yes
-}
-
-# func_ltwrapper_script_p file
-# True iff FILE is a libtool wrapper script
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_script_p ()
-{
- func_lalib_p "$1"
-}
-
-# func_ltwrapper_executable_p file
-# True iff FILE is a libtool wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_executable_p ()
-{
- func_ltwrapper_exec_suffix=
- case $1 in
- *.exe) ;;
- *) func_ltwrapper_exec_suffix=.exe ;;
- esac
- $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
-}
-
-# func_ltwrapper_scriptname file
-# Assumes file is an ltwrapper_executable
-# uses $file to determine the appropriate filename for a
-# temporary ltwrapper_script.
-func_ltwrapper_scriptname ()
-{
- func_ltwrapper_scriptname_result=""
- if func_ltwrapper_executable_p "$1"; then
- func_dirname_and_basename "$1" "" "."
- func_stripname '' '.exe' "$func_basename_result"
- func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
- fi
-}
-
-# func_ltwrapper_p file
-# True iff FILE is a libtool wrapper script or wrapper executable
-# This function is only a basic sanity check; it will hardly flush out
-# determined imposters.
-func_ltwrapper_p ()
-{
- func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
-}
-
-
-# func_execute_cmds commands fail_cmd
-# Execute tilde-delimited COMMANDS.
-# If FAIL_CMD is given, eval that upon failure.
-# FAIL_CMD may read-access the current command in variable CMD!
-func_execute_cmds ()
-{
- $opt_debug
- save_ifs=$IFS; IFS='~'
- for cmd in $1; do
- IFS=$save_ifs
- eval cmd=\"$cmd\"
- func_show_eval "$cmd" "${2-:}"
- done
- IFS=$save_ifs
-}
-
-
-# func_source file
-# Source FILE, adding directory component if necessary.
-# Note that it is not necessary on cygwin/mingw to append a dot to
-# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
-# behavior happens only for exec(3), not for open(2)! Also, sourcing
-# `FILE.' does not work on cygwin managed mounts.
-func_source ()
-{
- $opt_debug
- case $1 in
- */* | *\\*) . "$1" ;;
- *) . "./$1" ;;
- esac
-}
-
-
-# func_infer_tag arg
-# Infer tagged configuration to use if any are available and
-# if one wasn't chosen via the "--tag" command line option.
-# Only attempt this if the compiler in the base compile
-# command doesn't match the default compiler.
-# arg is usually of the form 'gcc ...'
-func_infer_tag ()
-{
- $opt_debug
- if test -n "$available_tags" && test -z "$tagname"; then
- CC_quoted=
- for arg in $CC; do
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case $@ in
- # Blanks in the command may have been stripped by the calling shell,
- # but not from the CC environment variable when configure was run.
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
- # Blanks at the start of $base_compile will cause this to fail
- # if we don't check for them as well.
- *)
- for z in $available_tags; do
- if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
- # Evaluate the configuration.
- eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
- CC_quoted=
- for arg in $CC; do
- # Double-quote args containing other shell metacharacters.
- func_quote_for_eval "$arg"
- CC_quoted="$CC_quoted $func_quote_for_eval_result"
- done
- case "$@ " in
- " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
- # The compiler in the base compile command matches
- # the one in the tagged configuration.
- # Assume this is the tagged configuration we want.
- tagname=$z
- break
- ;;
- esac
- fi
- done
- # If $tagname still isn't set, then no tagged configuration
- # was found and let the user know that the "--tag" command
- # line option must be used.
- if test -z "$tagname"; then
- func_echo "unable to infer tagged configuration"
- func_fatal_error "specify a tag with \`--tag'"
-# else
-# func_verbose "using $tagname tagged configuration"
- fi
- ;;
- esac
- fi
-}
-
-
-
-# func_write_libtool_object output_name pic_name nonpic_name
-# Create a libtool object file (analogous to a ".la" file),
-# but don't create it if we're doing a dry run.
-func_write_libtool_object ()
-{
- write_libobj=${1}
- if test "$build_libtool_libs" = yes; then
- write_lobj=\'${2}\'
- else
- write_lobj=none
- fi
-
- if test "$build_old_libs" = yes; then
- write_oldobj=\'${3}\'
- else
- write_oldobj=none
- fi
-
- $opt_dry_run || {
- cat >${write_libobj}T <<EOF
-# $write_libobj - a libtool object file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# Please DO NOT delete this file!
-# It is necessary for linking the library.
-
-# Name of the PIC object.
-pic_object=$write_lobj
-
-# Name of the non-PIC object
-non_pic_object=$write_oldobj
-
-EOF
- $MV "${write_libobj}T" "${write_libobj}"
- }
-}
-
-# func_mode_compile arg...
-func_mode_compile ()
-{
- $opt_debug
- # Get the compilation command and the source file.
- base_compile=
- srcfile="$nonopt" # always keep a non-empty value in "srcfile"
- suppress_opt=yes
- suppress_output=
- arg_mode=normal
- libobj=
- later=
- pie_flag=
-
- for arg
- do
- case $arg_mode in
- arg )
- # do not "continue". Instead, add this to base_compile
- lastarg="$arg"
- arg_mode=normal
- ;;
-
- target )
- libobj="$arg"
- arg_mode=normal
- continue
- ;;
-
- normal )
- # Accept any command-line options.
- case $arg in
- -o)
- test -n "$libobj" && \
- func_fatal_error "you cannot specify \`-o' more than once"
- arg_mode=target
- continue
- ;;
-
- -pie | -fpie | -fPIE)
- pie_flag="$pie_flag $arg"
- continue
- ;;
-
- -shared | -static | -prefer-pic | -prefer-non-pic)
- later="$later $arg"
- continue
- ;;
-
- -no-suppress)
- suppress_opt=no
- continue
- ;;
-
- -Xcompiler)
- arg_mode=arg # the next one goes into the "base_compile" arg list
- continue # The current "srcfile" will either be retained or
- ;; # replaced later. I would guess that would be a bug.
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- lastarg=
- save_ifs="$IFS"; IFS=','
- for arg in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$arg"
- lastarg="$lastarg $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$lastarg"
- lastarg=$func_stripname_result
-
- # Add the arguments to base_compile.
- base_compile="$base_compile $lastarg"
- continue
- ;;
-
- *)
- # Accept the current argument as the source file.
- # The previous "srcfile" becomes the current argument.
- #
- lastarg="$srcfile"
- srcfile="$arg"
- ;;
- esac # case $arg
- ;;
- esac # case $arg_mode
-
- # Aesthetically quote the previous argument.
- func_quote_for_eval "$lastarg"
- base_compile="$base_compile $func_quote_for_eval_result"
- done # for arg
-
- case $arg_mode in
- arg)
- func_fatal_error "you must specify an argument for -Xcompile"
- ;;
- target)
- func_fatal_error "you must specify a target with \`-o'"
- ;;
- *)
- # Get the name of the library object.
- test -z "$libobj" && {
- func_basename "$srcfile"
- libobj="$func_basename_result"
- }
- ;;
- esac
-
- # Recognize several different file suffixes.
- # If the user specifies -o file.o, it is replaced with file.lo
- case $libobj in
- *.[cCFSifmso] | \
- *.ada | *.adb | *.ads | *.asm | \
- *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
- *.[fF][09]? | *.for | *.java | *.obj | *.sx)
- func_xform "$libobj"
- libobj=$func_xform_result
- ;;
- esac
-
- case $libobj in
- *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
- *)
- func_fatal_error "cannot determine name of library object from \`$libobj'"
- ;;
- esac
-
- func_infer_tag $base_compile
-
- for arg in $later; do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- continue
- ;;
-
- -static)
- build_libtool_libs=no
- build_old_libs=yes
- continue
- ;;
-
- -prefer-pic)
- pic_mode=yes
- continue
- ;;
-
- -prefer-non-pic)
- pic_mode=no
- continue
- ;;
- esac
- done
-
- func_quote_for_eval "$libobj"
- test "X$libobj" != "X$func_quote_for_eval_result" \
- && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
- && func_warning "libobj name \`$libobj' may not contain shell special characters."
- func_dirname_and_basename "$obj" "/" ""
- objname="$func_basename_result"
- xdir="$func_dirname_result"
- lobj=${xdir}$objdir/$objname
-
- test -z "$base_compile" && \
- func_fatal_help "you must specify a compilation command"
-
- # Delete any leftover library objects.
- if test "$build_old_libs" = yes; then
- removelist="$obj $lobj $libobj ${libobj}T"
- else
- removelist="$lobj $libobj ${libobj}T"
- fi
-
- # On Cygwin there's no "real" PIC flag so we must build both object types
- case $host_os in
- cygwin* | mingw* | pw32* | os2* | cegcc*)
- 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"
- else
- output_obj=
- 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 $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
- func_echo "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."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
- removelist="$removelist $output_obj"
- $ECHO "$srcfile" > "$lockfile"
- fi
-
- $opt_dry_run || $RM $removelist
- removelist="$removelist $lockfile"
- trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
-
- if test -n "$fix_srcfile_path"; then
- eval srcfile=\"$fix_srcfile_path\"
- fi
- func_quote_for_eval "$srcfile"
- qsrcfile=$func_quote_for_eval_result
-
- # 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
- command="$base_compile $qsrcfile $pic_flag"
- else
- # Don't build PIC code
- command="$base_compile $qsrcfile"
- fi
-
- func_mkdir_p "$xdir$objdir"
-
- if test -z "$output_obj"; then
- # Place PIC objects in $objdir
- command="$command -o $lobj"
- fi
-
- func_show_eval_locale "$command" \
- 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
-
- 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."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed, then go on to compile the next one
- if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
- func_show_eval '$MV "$output_obj" "$lobj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
-
- # Allow error messages only from the first compilation.
- if test "$suppress_opt" = yes; then
- suppress_output=' >/dev/null 2>&1'
- fi
- 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 $qsrcfile$pie_flag"
- else
- command="$base_compile $qsrcfile $pic_flag"
- fi
- if test "$compiler_c_o" = yes; then
- command="$command -o $obj"
- fi
-
- # Suppress compiler output if we already did a PIC compilation.
- command="$command$suppress_output"
- func_show_eval_locale "$command" \
- '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
-
- 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."
-
- $opt_dry_run || $RM $removelist
- exit $EXIT_FAILURE
- fi
-
- # Just move the object if needed
- if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
- func_show_eval '$MV "$output_obj" "$obj"' \
- 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
- fi
- fi
-
- $opt_dry_run || {
- func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
-
- # Unlock the critical section if it was locked
- if test "$need_locks" != no; then
- removelist=$lockfile
- $RM "$lockfile"
- fi
- }
-
- exit $EXIT_SUCCESS
-}
-
-$opt_help || {
-test "$mode" = compile && func_mode_compile ${1+"$@"}
-}
-
-func_mode_help ()
-{
- # We need to display help for each of the modes.
- case $mode in
- "")
- # Generic help is extracted from the usage comments
- # at the start of this file.
- func_help
- ;;
-
- clean)
- $ECHO \
-"Usage: $progname [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: $progname [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
- -no-suppress do not suppress compiler output for multiple passes
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -shared do not build a \`.o' file suitable for static linking
- -static only 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: $progname [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: $progname [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: $progname [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 following components of INSTALL-COMMAND are treated specially:
-
- -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
-
-The rest of the components are interpreted as arguments to that command (only
-BSD-compatible install options are recognized)."
- ;;
-
- link)
- $ECHO \
-"Usage: $progname [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
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -precious-files-regex REGEX
- don't remove output files matching REGEX
- -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
- -shared only do dynamic linking of libtool libraries
- -shrext SUFFIX override the standard shared library file extension
- -static do not do any dynamic linking of uninstalled libtool libraries
- -static-libtool-libs
- do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]
- -weak LIBNAME declare that the target provides the LIBNAME interface
-
-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: $progname [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."
- ;;
-
- *)
- func_fatal_help "invalid operation mode \`$mode'"
- ;;
- esac
-
- $ECHO
- $ECHO "Try \`$progname --help' for more information about other modes."
-
- exit $?
-}
-
- # Now that we've collected a possible --mode arg, show help if necessary
- $opt_help && func_mode_help
-
-
-# func_mode_execute arg...
-func_mode_execute ()
-{
- $opt_debug
- # The first argument is the command name.
- cmd="$nonopt"
- test -z "$cmd" && \
- func_fatal_help "you must specify a COMMAND"
-
- # Handle -dlopen flags immediately.
- for file in $execute_dlfiles; do
- test -f "$file" \
- || func_fatal_help "\`$file' is not a file"
-
- dir=
- case $file in
- *.la)
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$lib' is not a valid libtool archive"
-
- # Read the libtool library.
- dlname=
- library_names=
- func_source "$file"
-
- # Skip this library if it cannot be dlopened.
- if test -z "$dlname"; then
- # Warn if it was a shared library.
- test -n "$library_names" && \
- func_warning "\`$file' was not linked with \`-export-dynamic'"
- continue
- fi
-
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
-
- if test -f "$dir/$objdir/$dlname"; then
- dir="$dir/$objdir"
- else
- if test ! -f "$dir/$dlname"; then
- func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
- fi
- fi
- ;;
-
- *.lo)
- # Just add the directory containing the .lo file.
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- ;;
-
- *)
- func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
- 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 func_ltwrapper_script_p "$file"; then
- func_source "$file"
- # Transform arg to wrapped name.
- file="$progdir/$program"
- elif func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- func_source "$func_ltwrapper_scriptname_result"
- # Transform arg to wrapped name.
- file="$progdir/$program"
- fi
- ;;
- esac
- # Quote arguments (to preserve shell metacharacters).
- func_quote_for_eval "$file"
- args="$args $func_quote_for_eval_result"
- done
-
- if test "X$opt_dry_run" = Xfalse; then
- if test -n "$shlibpath_var"; then
- # Export the shlibpath_var.
- eval "export $shlibpath_var"
- fi
-
- # Restore saved environment variables
- for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
- do
- eval "if test \"\${save_$lt_var+set}\" = set; then
- $lt_var=\$save_$lt_var; export $lt_var
- else
- $lt_unset $lt_var
- fi"
- done
-
- # 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 $EXIT_SUCCESS
- fi
-}
-
-test "$mode" = execute && func_mode_execute ${1+"$@"}
-
-
-# func_mode_finish arg...
-func_mode_finish ()
-{
- $opt_debug
- 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.
- func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
-'"$cmd"'"'
- fi
- if test -n "$finish_eval"; then
- # Do the single finish_eval.
- eval cmds=\"$finish_eval\"
- $opt_dry_run || eval "$cmds" || admincmds="$admincmds
- $cmds"
- fi
- done
- fi
-
- # Exit here if they wanted silent mode.
- $opt_silent && exit $EXIT_SUCCESS
-
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- $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"
- case $host in
- solaris2.[6789]|solaris2.1[0-9])
- $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
- $ECHO "pages."
- ;;
- *)
- $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
- ;;
- esac
- $ECHO "X----------------------------------------------------------------------" | $Xsed
- exit $EXIT_SUCCESS
-}
-
-test "$mode" = finish && func_mode_finish ${1+"$@"}
-
-
-# func_mode_install arg...
-func_mode_install ()
-{
- $opt_debug
- # 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" | $GREP shtool >/dev/null; then
- # Aesthetically quote it.
- func_quote_for_eval "$nonopt"
- install_prog="$func_quote_for_eval_result "
- arg=$1
- shift
- else
- install_prog=
- arg=$nonopt
- fi
-
- # The real first argument should be the name of the installation program.
- # Aesthetically quote it.
- func_quote_for_eval "$arg"
- install_prog="$install_prog$func_quote_for_eval_result"
-
- # 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)
- case " $install_prog " in
- *[\\\ /]cp\ *) ;;
- *) prev=$arg ;;
- esac
- ;;
- -g | -m | -o)
- prev=$arg
- ;;
- -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.
- func_quote_for_eval "$arg"
- install_prog="$install_prog $func_quote_for_eval_result"
- done
-
- test -z "$install_prog" && \
- func_fatal_help "you must specify an install program"
-
- test -n "$prev" && \
- func_fatal_help "the \`$prev' option requires an argument"
-
- if test -z "$files"; then
- if test -z "$dest"; then
- func_fatal_help "no file or destination specified"
- else
- func_fatal_help "you must specify a destination"
- fi
- fi
-
- # Strip any trailing slash from the destination.
- func_stripname '' '/' "$dest"
- dest=$func_stripname_result
-
- # Check to see that the destination is a directory.
- test -d "$dest" && isdir=yes
- if test "$isdir" = yes; then
- destdir="$dest"
- destname=
- else
- func_dirname_and_basename "$dest" "" "."
- destdir="$func_dirname_result"
- destname="$func_basename_result"
-
- # Not a directory, so check to see that there is only one file specified.
- set dummy $files; shift
- test "$#" -gt 1 && \
- func_fatal_help "\`$dest' is not a directory"
- fi
- case $destdir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- for file in $files; do
- case $file in
- *.lo) ;;
- *)
- func_fatal_help "\`$destdir' must be an absolute directory name"
- ;;
- 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.
- func_lalib_unsafe_p "$file" \
- || func_fatal_help "\`$file' is not a valid libtool archive"
-
- library_names=
- old_library=
- relink_command=
- func_source "$file"
-
- # 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
-
- func_dirname "$file" "/" ""
- dir="$func_dirname_result"
- dir="$dir$objdir"
-
- if test -n "$relink_command"; then
- # Determine the prefix the user has applied to our future dir.
- inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
-
- # Don't allow the user to place us outside of our expected
- # location b/c this prevents finding dependent libraries that
- # are installed to the same prefix.
- # At present, this check doesn't affect windows .dll's that
- # are installed into $libdir/../bin (currently, that works fine)
- # but it's something to keep an eye on.
- test "$inst_prefix_dir" = "$destdir" && \
- func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
-
- if test -n "$inst_prefix_dir"; then
- # Stick the inst_prefix_dir data into the link command.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
- else
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
- fi
-
- func_warning "relinking \`$file'"
- func_show_eval "$relink_command" \
- 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
- fi
-
- # See the names of the shared library.
- set dummy $library_names; shift
- if test -n "$1"; then
- realname="$1"
- shift
-
- srcname="$realname"
- test -n "$relink_command" && srcname="$realname"T
-
- # Install the shared library and build the symlinks.
- func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
- 'exit $?'
- tstripme="$stripme"
- case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
- case $realname in
- *.dll.a)
- tstripme=""
- ;;
- esac
- ;;
- esac
- if test -n "$tstripme" && test -n "$striplib"; then
- func_show_eval "$striplib $destdir/$realname" 'exit $?'
- fi
-
- if test "$#" -gt 0; then
- # Delete the old symlinks, and create new ones.
- # Try `ln -sf' first, because the `ln' binary might depend on
- # the symlink we replace! Solaris /bin/ln does not understand -f,
- # so we also need to try rm && ln -s.
- for linkname
- do
- test "$linkname" != "$realname" \
- && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
- done
- fi
-
- # Do each command in the postinstall commands.
- lib="$destdir/$realname"
- func_execute_cmds "$postinstall_cmds" 'exit $?'
- fi
-
- # Install the pseudo-library for information purposes.
- func_basename "$file"
- name="$func_basename_result"
- instname="$dir/$name"i
- func_show_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
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # Deduce the name of the destination old-style object file.
- case $destfile in
- *.lo)
- func_lo2o "$destfile"
- staticdest=$func_lo2o_result
- ;;
- *.$objext)
- staticdest="$destfile"
- destfile=
- ;;
- *)
- func_fatal_help "cannot copy a libtool object to \`$destfile'"
- ;;
- esac
-
- # Install the libtool object if requested.
- test -n "$destfile" && \
- func_show_eval "$install_prog $file $destfile" 'exit $?'
-
- # Install the old object if enabled.
- if test "$build_old_libs" = yes; then
- # Deduce the name of the old-style object file.
- func_lo2o "$file"
- staticobj=$func_lo2o_result
- func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
- fi
- exit $EXIT_SUCCESS
- ;;
-
- *)
- # Figure out destination file name, if it wasn't already specified.
- if test -n "$destname"; then
- destfile="$destdir/$destname"
- else
- func_basename "$file"
- destfile="$func_basename_result"
- destfile="$destdir/$destfile"
- fi
-
- # If the file is missing, and there is a .exe on the end, strip it
- # because it is most likely a libtool script we actually want to
- # install
- stripped_ext=""
- case $file in
- *.exe)
- if test ! -f "$file"; then
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- stripped_ext=".exe"
- fi
- ;;
- esac
-
- # Do a test to see if this is really a libtool program.
- case $host in
- *cygwin* | *mingw*)
- if func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- wrapper=$func_ltwrapper_scriptname_result
- else
- func_stripname '' '.exe' "$file"
- wrapper=$func_stripname_result
- fi
- ;;
- *)
- wrapper=$file
- ;;
- esac
- if func_ltwrapper_script_p "$wrapper"; then
- notinst_deplibs=
- relink_command=
-
- func_source "$wrapper"
-
- # Check the variables that should have been set.
- test -z "$generated_by_libtool_version" && \
- func_fatal_error "invalid libtool wrapper script \`$wrapper'"
-
- finalize=yes
- for lib in $notinst_deplibs; do
- # Check to see that each library is installed.
- libdir=
- if test -f "$lib"; then
- func_source "$lib"
- fi
- libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
- if test -n "$libdir" && test ! -f "$libfile"; then
- func_warning "\`$lib' has not been installed in \`$libdir'"
- finalize=no
- fi
- done
-
- relink_command=
- func_source "$wrapper"
-
- outputname=
- if test "$fast_install" = no && test -n "$relink_command"; then
- $opt_dry_run || {
- if test "$finalize" = yes; then
- tmpdir=`func_mktempdir`
- func_basename "$file$stripped_ext"
- file="$func_basename_result"
- outputname="$tmpdir/$file"
- # Replace the output file specification.
- relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
-
- $opt_silent || {
- func_quote_for_expand "$relink_command"
- eval "func_echo $func_quote_for_expand_result"
- }
- if eval "$relink_command"; then :
- else
- func_error "error: relink \`$file' with the above command before installing it"
- $opt_dry_run || ${RM}r "$tmpdir"
- continue
- fi
- file="$outputname"
- else
- func_warning "cannot relink \`$file'"
- fi
- }
- else
- # Install the binary that we compiled earlier.
- file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
- fi
- fi
-
- # remove .exe since cygwin /usr/bin/install will append another
- # one anyway
- case $install_prog,$host in
- */usr/bin/install*,*cygwin*)
- case $file:$destfile in
- *.exe:*.exe)
- # this is ok
- ;;
- *.exe:*)
- destfile=$destfile.exe
- ;;
- *:*.exe)
- func_stripname '' '.exe' "$destfile"
- destfile=$func_stripname_result
- ;;
- esac
- ;;
- esac
- func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
- $opt_dry_run || if test -n "$outputname"; then
- ${RM}r "$tmpdir"
- fi
- ;;
- esac
- done
-
- for file in $staticlibs; do
- func_basename "$file"
- name="$func_basename_result"
-
- # Set up the ranlib parameters.
- oldlib="$destdir/$name"
-
- func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
-
- if test -n "$stripme" && test -n "$old_striplib"; then
- func_show_eval "$old_striplib $oldlib" 'exit $?'
- fi
-
- # Do each command in the postinstall commands.
- func_execute_cmds "$old_postinstall_cmds" 'exit $?'
- done
-
- test -n "$future_libdirs" && \
- func_warning "remember to run \`$progname --finish$future_libdirs'"
-
- if test -n "$current_libdirs"; then
- # Maybe just do a dry run.
- $opt_dry_run && current_libdirs=" -n$current_libdirs"
- exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
- else
- exit $EXIT_SUCCESS
- fi
-}
-
-test "$mode" = install && func_mode_install ${1+"$@"}
-
-
-# func_generate_dlsyms outputname originator pic_p
-# Extract symbols from dlprefiles and create ${outputname}S.o with
-# a dlpreopen symbol table.
-func_generate_dlsyms ()
-{
- $opt_debug
- my_outputname="$1"
- my_originator="$2"
- my_pic_p="${3-no}"
- my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
- my_dlsyms=
-
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- if test -n "$NM" && test -n "$global_symbol_pipe"; then
- my_dlsyms="${my_outputname}S.c"
- else
- func_error "not configured to extract global symbols from dlpreopened files"
- fi
- fi
-
- if test -n "$my_dlsyms"; then
- case $my_dlsyms in
- "") ;;
- *.c)
- # Discover the nlist of each of the dlfiles.
- nlist="$output_objdir/${my_outputname}.nm"
-
- func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
-
- # Parse the name list into a source file.
- func_verbose "creating $output_objdir/$my_dlsyms"
-
- $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
-/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
-/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
-
-#ifdef __cplusplus
-extern \"C\" {
-#endif
-
-/* External symbol declarations for the compiler. */\
-"
-
- if test "$dlself" = yes; then
- func_verbose "generating symbol list for \`$output'"
-
- $opt_dry_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 progfile in $progfiles; do
- func_verbose "extracting global C symbols from \`$progfile'"
- $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
- done
-
- if test -n "$exclude_expsyms"; then
- $opt_dry_run || {
- eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- if test -n "$export_symbols_regex"; then
- $opt_dry_run || {
- eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- }
- fi
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- export_symbols="$output_objdir/$outputname.exp"
- $opt_dry_run || {
- $RM $export_symbols
- eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- else
- $opt_dry_run || {
- eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
- eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
- eval '$MV "$nlist"T "$nlist"'
- case $host in
- *cygwin | *mingw* | *cegcc* )
- eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
- eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
- ;;
- esac
- }
- fi
- fi
-
- for dlprefile in $dlprefiles; do
- func_verbose "extracting global C symbols from \`$dlprefile'"
- func_basename "$dlprefile"
- name="$func_basename_result"
- $opt_dry_run || {
- eval '$ECHO ": $name " >> "$nlist"'
- eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
- }
- done
-
- $opt_dry_run || {
- # 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" |
- if sort -k 3 </dev/null >/dev/null 2>&1; then
- sort -k 3
- else
- sort +2
- fi |
- 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/$my_dlsyms"'
- else
- $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
- fi
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-
-/* The mapping between symbol names and symbols. */
-typedef struct {
- const char *name;
- void *address;
-} lt_dlsymlist;
-"
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-/* DATA imports from DLLs on WIN32 con't be const, because
- runtime relocations are performed -- see ld's documentation
- on pseudo-relocs. */"
- lt_dlsym_const= ;;
- *osf5*)
- echo >> "$output_objdir/$my_dlsyms" "\
-/* This system does not cope well with relocations in const data */"
- lt_dlsym_const= ;;
- *)
- lt_dlsym_const=const ;;
- esac
-
- $ECHO >> "$output_objdir/$my_dlsyms" "\
-extern $lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[];
-$lt_dlsym_const lt_dlsymlist
-lt_${my_prefix}_LTX_preloaded_symbols[] =
-{\
- { \"$my_originator\", (void *) 0 },"
-
- case $need_lib_prefix in
- no)
- eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
- ;;
- *)
- eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
- ;;
- esac
- $ECHO >> "$output_objdir/$my_dlsyms" "\
- {0, (void *) 0}
-};
-
-/* This works around a problem in FreeBSD linker */
-#ifdef FREEBSD_WORKAROUND
-static const void *lt_preloaded_setup() {
- return lt_${my_prefix}_LTX_preloaded_symbols;
-}
-#endif
-
-#ifdef __cplusplus
-}
-#endif\
-"
- } # !$opt_dry_run
-
- pic_flag_for_symtable=
- case "$compile_command " in
- *" -static "*) ;;
- *)
- 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*)
- pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
- *-*-hpux*)
- pic_flag_for_symtable=" $pic_flag" ;;
- *)
- if test "X$my_pic_p" != Xno; then
- pic_flag_for_symtable=" $pic_flag"
- fi
- ;;
- esac
- ;;
- esac
- symtab_cflags=
- for arg in $LTCFLAGS; do
- case $arg in
- -pie | -fpie | -fPIE) ;;
- *) symtab_cflags="$symtab_cflags $arg" ;;
- esac
- done
-
- # Now compile the dynamic symbol file.
- func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
-
- # Clean up the generated files.
- func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
-
- # Transform the symbol file into the correct name.
- symfileobj="$output_objdir/${my_outputname}S.$objext"
- case $host in
- *cygwin* | *mingw* | *cegcc* )
- if test -f "$output_objdir/$my_outputname.def"; then
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
- else
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- fi
- ;;
- *)
- compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
- ;;
- esac
- ;;
- *)
- func_fatal_error "unknown suffix for \`$my_dlsyms'"
- ;;
- 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
-}
-
-# func_win32_libid arg
-# return the library type of file 'arg'
-#
-# Need a lot of goo to handle *both* DLLs and import libs
-# Has to be a shell function in order to 'eat' the argument
-# that is supplied when $file_magic_command is called.
-func_win32_libid ()
-{
- $opt_debug
- win32_libid_type="unknown"
- win32_fileres=`file -L $1 2>/dev/null`
- case $win32_fileres in
- *ar\ archive\ import\ library*) # definitely import
- win32_libid_type="x86 archive import"
- ;;
- *ar\ archive*) # could be an import, or static
- if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
- $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
- win32_nmres=`eval $NM -f posix -A $1 |
- $SED -n -e '
- 1,100{
- / I /{
- s,.*,import,
- p
- q
- }
- }'`
- case $win32_nmres in
- import*) win32_libid_type="x86 archive import";;
- *) win32_libid_type="x86 archive static";;
- esac
- fi
- ;;
- *DLL*)
- win32_libid_type="x86 DLL"
- ;;
- *executable*) # but shell scripts are "executable" too...
- case $win32_fileres in
- *MS\ Windows\ PE\ Intel*)
- win32_libid_type="x86 DLL"
- ;;
- esac
- ;;
- esac
- $ECHO "$win32_libid_type"
-}
-
-
-
-# func_extract_an_archive dir oldlib
-func_extract_an_archive ()
-{
- $opt_debug
- f_ex_an_ar_dir="$1"; shift
- f_ex_an_ar_oldlib="$1"
- func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
- if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
- fi
-}
-
-
-# func_extract_archives gentop oldlib ...
-func_extract_archives ()
-{
- $opt_debug
- my_gentop="$1"; shift
- my_oldlibs=${1+"$@"}
- my_oldobjs=""
- my_xlib=""
- my_xabs=""
- my_xdir=""
-
- for my_xlib in $my_oldlibs; do
- # Extract the objects.
- case $my_xlib in
- [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
- *) my_xabs=`pwd`"/$my_xlib" ;;
- esac
- func_basename "$my_xlib"
- my_xlib="$func_basename_result"
- my_xlib_u=$my_xlib
- while :; do
- case " $extracted_archives " in
- *" $my_xlib_u "*)
- func_arith $extracted_serial + 1
- extracted_serial=$func_arith_result
- my_xlib_u=lt$extracted_serial-$my_xlib ;;
- *) break ;;
- esac
- done
- extracted_archives="$extracted_archives $my_xlib_u"
- my_xdir="$my_gentop/$my_xlib_u"
-
- func_mkdir_p "$my_xdir"
-
- case $host in
- *-darwin*)
- func_verbose "Extracting $my_xabs"
- # Do not bother doing anything if just a dry run
- $opt_dry_run || {
- darwin_orig_dir=`pwd`
- cd $my_xdir || exit $?
- darwin_archive=$my_xabs
- darwin_curdir=`pwd`
- darwin_base_archive=`basename "$darwin_archive"`
- darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
- if test -n "$darwin_arches"; then
- darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
- darwin_arch=
- func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
- for darwin_arch in $darwin_arches ; do
- func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
- cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
- func_extract_an_archive "`pwd`" "${darwin_base_archive}"
- cd "$darwin_curdir"
- $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
- done # $darwin_arches
- ## Okay now we've a bunch of thin objects, gotta fatten them up :)
- darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
- darwin_file=
- darwin_files=
- for darwin_file in $darwin_filelist; do
- darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
- $LIPO -create -output "$darwin_file" $darwin_files
- done # $darwin_filelist
- $RM -rf unfat-$$
- cd "$darwin_orig_dir"
- else
- cd $darwin_orig_dir
- func_extract_an_archive "$my_xdir" "$my_xabs"
- fi # $darwin_arches
- } # !$opt_dry_run
- ;;
- *)
- func_extract_an_archive "$my_xdir" "$my_xabs"
- ;;
- esac
- my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
- done
-
- func_extract_archives_result="$my_oldobjs"
-}
-
-
-
-# func_emit_wrapper_part1 [arg=no]
-#
-# Emit the first part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part1 ()
-{
- func_emit_wrapper_part1_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_part1_arg1=$1
- fi
-
- $ECHO "\
-#! $SHELL
-
-# $output - temporary wrapper script for $objdir/$outputname
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# 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'
-
-# Be Bourne compatible
-if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs 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
-BIN_SH=xpg4; export BIN_SH # for Tru64
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# The HP-UX ksh and POSIX shell print the target directory to stdout
-# if CDPATH is set.
-(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
-
-relink_command=\"$relink_command\"
-
-# This environment variable determines our operation mode.
-if test \"\$libtool_install_magic\" = \"$magic\"; then
- # install mode needs the following variables:
- generated_by_libtool_version='$macro_version'
- 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 "\
-
- # 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
-"
-}
-# end: func_emit_wrapper_part1
-
-# func_emit_wrapper_part2 [arg=no]
-#
-# Emit the second part of a libtool wrapper script on stdout.
-# For more information, see the description associated with
-# func_emit_wrapper(), below.
-func_emit_wrapper_part2 ()
-{
- func_emit_wrapper_part2_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_part2_arg1=$1
- fi
-
- $ECHO "\
-
- # Usually 'no', except on cygwin/mingw when embedded into
- # the cwrapper.
- WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
- if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
- # special case for '.'
- if test \"\$thisdir\" = \".\"; then
- thisdir=\`pwd\`
- fi
- # remove .libs from thisdir
- case \"\$thisdir\" in
- *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
- $objdir ) thisdir=. ;;
- esac
- fi
-
- # Try to get the absolute directory name.
- absdir=\`cd \"\$thisdir\" && pwd\`
- test -n \"\$absdir\" && thisdir=\"\$absdir\"
-"
-
- if test "$fast_install" = yes; then
- $ECHO "\
- 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 "\
-
- # 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 "\
- program='$outputname'
- progdir=\"\$thisdir/$objdir\"
-"
- fi
-
- $ECHO "\
-
- 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 "\
- # 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 "\
- # Add the dll search path components to the executable PATH
- PATH=$dllsearchpath:\$PATH
-"
- fi
-
- $ECHO "\
- if test \"\$libtool_execute_magic\" != \"$magic\"; then
- # Run the actual program with our arguments.
-"
- case $host in
- # Backslashes separate directories on plain windows
- *-*-mingw | *-*-os2* | *-cegcc*)
- $ECHO "\
- exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
-"
- ;;
-
- *)
- $ECHO "\
- exec \"\$progdir/\$program\" \${1+\"\$@\"}
-"
- ;;
- esac
- $ECHO "\
- \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
- 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\
-"
-}
-# end: func_emit_wrapper_part2
-
-
-# func_emit_wrapper [arg=no]
-#
-# Emit a libtool wrapper script on stdout.
-# Don't directly open a file because we may want to
-# incorporate the script contents within a cygwin/mingw
-# wrapper executable. Must ONLY be called from within
-# func_mode_link because it depends on a number of variables
-# set therein.
-#
-# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
-# variable will take. If 'yes', then the emitted script
-# will assume that the directory in which it is stored is
-# the $objdir directory. This is a cygwin/mingw-specific
-# behavior.
-func_emit_wrapper ()
-{
- func_emit_wrapper_arg1=no
- if test -n "$1" ; then
- func_emit_wrapper_arg1=$1
- fi
-
- # split this up so that func_emit_cwrapperexe_src
- # can call each part independently.
- func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
- func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
-}
-
-
-# func_to_host_path arg
-#
-# Convert paths to host format when used with build tools.
-# Intended for use with "native" mingw (where libtool itself
-# is running under the msys shell), or in the following cross-
-# build environments:
-# $build $host
-# mingw (msys) mingw [e.g. native]
-# cygwin mingw
-# *nix + wine mingw
-# where wine is equipped with the `winepath' executable.
-# In the native mingw case, the (msys) shell automatically
-# converts paths for any non-msys applications it launches,
-# but that facility isn't available from inside the cwrapper.
-# Similar accommodations are necessary for $host mingw and
-# $build cygwin. Calling this function does no harm for other
-# $host/$build combinations not listed above.
-#
-# ARG is the path (on $build) that should be converted to
-# the proper representation for $host. The result is stored
-# in $func_to_host_path_result.
-func_to_host_path ()
-{
- func_to_host_path_result="$1"
- if test -n "$1" ; then
- case $host in
- *mingw* )
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
- case $build in
- *mingw* ) # actually, msys
- # awkward: cmd appends spaces to result
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
- func_to_host_path_tmp1=`( cmd //c echo "$1" |\
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- *cygwin* )
- func_to_host_path_tmp1=`cygpath -w "$1"`
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- * )
- # Unfortunately, winepath does not exit with a non-zero
- # error code, so we are forced to check the contents of
- # stdout. On the other hand, if the command is not
- # found, the shell will set an exit code of 127 and print
- # *an error message* to stdout. So we must check for both
- # error code of zero AND non-empty stdout, which explains
- # the odd construction:
- func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
- if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
- func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
- $SED -e "$lt_sed_naive_backslashify"`
- else
- # Allow warning below.
- func_to_host_path_result=""
- fi
- ;;
- esac
- if test -z "$func_to_host_path_result" ; then
- func_error "Could not determine host path corresponding to"
- func_error " '$1'"
- func_error "Continuing, but uninstalled executables may not work."
- # Fallback:
- func_to_host_path_result="$1"
- fi
- ;;
- esac
- fi
-}
-# end: func_to_host_path
-
-# func_to_host_pathlist arg
-#
-# Convert pathlists to host format when used with build tools.
-# See func_to_host_path(), above. This function supports the
-# following $build/$host combinations (but does no harm for
-# combinations not listed here):
-# $build $host
-# mingw (msys) mingw [e.g. native]
-# cygwin mingw
-# *nix + wine mingw
-#
-# Path separators are also converted from $build format to
-# $host format. If ARG begins or ends with a path separator
-# character, it is preserved (but converted to $host format)
-# on output.
-#
-# ARG is a pathlist (on $build) that should be converted to
-# the proper representation on $host. The result is stored
-# in $func_to_host_pathlist_result.
-func_to_host_pathlist ()
-{
- func_to_host_pathlist_result="$1"
- if test -n "$1" ; then
- case $host in
- *mingw* )
- lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
- # Remove leading and trailing path separator characters from
- # ARG. msys behavior is inconsistent here, cygpath turns them
- # into '.;' and ';.', and winepath ignores them completely.
- func_to_host_pathlist_tmp2="$1"
- # Once set for this call, this variable should not be
- # reassigned. It is used in tha fallback case.
- func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e 's|^:*||' -e 's|:*$||'`
- case $build in
- *mingw* ) # Actually, msys.
- # Awkward: cmd appends spaces to result.
- lt_sed_strip_trailing_spaces="s/[ ]*\$//"
- func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
- $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- *cygwin* )
- func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
- $SED -e "$lt_sed_naive_backslashify"`
- ;;
- * )
- # unfortunately, winepath doesn't convert pathlists
- func_to_host_pathlist_result=""
- func_to_host_pathlist_oldIFS=$IFS
- IFS=:
- for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
- IFS=$func_to_host_pathlist_oldIFS
- if test -n "$func_to_host_pathlist_f" ; then
- func_to_host_path "$func_to_host_pathlist_f"
- if test -n "$func_to_host_path_result" ; then
- if test -z "$func_to_host_pathlist_result" ; then
- func_to_host_pathlist_result="$func_to_host_path_result"
- else
- func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
- fi
- fi
- fi
- IFS=:
- done
- IFS=$func_to_host_pathlist_oldIFS
- ;;
- esac
- if test -z "$func_to_host_pathlist_result" ; then
- func_error "Could not determine the host path(s) corresponding to"
- func_error " '$1'"
- func_error "Continuing, but uninstalled executables may not work."
- # Fallback. This may break if $1 contains DOS-style drive
- # specifications. The fix is not to complicate the expression
- # below, but for the user to provide a working wine installation
- # with winepath so that path translation in the cross-to-mingw
- # case works properly.
- lt_replace_pathsep_nix_to_dos="s|:|;|g"
- func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
- $SED -e "$lt_replace_pathsep_nix_to_dos"`
- fi
- # Now, add the leading and trailing path separators back
- case "$1" in
- :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
- ;;
- esac
- case "$1" in
- *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
- ;;
- esac
- ;;
- esac
- fi
-}
-# end: func_to_host_pathlist
-
-# func_emit_cwrapperexe_src
-# emit the source code for a wrapper executable on stdout
-# Must ONLY be called from within func_mode_link because
-# it depends on a number of variable set therein.
-func_emit_cwrapperexe_src ()
-{
- cat <<EOF
-
-/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
- Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-
- The $output program cannot be directly executed until all the libtool
- libraries that it depends on are installed.
-
- This wrapper executable should never be moved out of the build directory.
- If it is, it will not operate correctly.
-
- Currently, it simply execs the wrapper *script* "$SHELL $output",
- but could eventually absorb all of the scripts functionality and
- exec $objdir/$outputname directly.
-*/
-EOF
- cat <<"EOF"
-#include <stdio.h>
-#include <stdlib.h>
-#ifdef _MSC_VER
-# include <direct.h>
-# include <process.h>
-# include <io.h>
-# define setmode _setmode
-#else
-# include <unistd.h>
-# include <stdint.h>
-# ifdef __CYGWIN__
-# include <io.h>
-# define HAVE_SETENV
-# ifdef __STRICT_ANSI__
-char *realpath (const char *, char *);
-int putenv (char *);
-int setenv (const char *, const char *, int);
-# endif
-# endif
-#endif
-#include <malloc.h>
-#include <stdarg.h>
-#include <assert.h>
-#include <string.h>
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <sys/stat.h>
-
-#if defined(PATH_MAX)
-# define LT_PATHMAX PATH_MAX
-#elif defined(MAXPATHLEN)
-# define LT_PATHMAX MAXPATHLEN
-#else
-# define LT_PATHMAX 1024
-#endif
-
-#ifndef S_IXOTH
-# define S_IXOTH 0
-#endif
-#ifndef S_IXGRP
-# define S_IXGRP 0
-#endif
-
-#ifdef _MSC_VER
-# define S_IXUSR _S_IEXEC
-# define stat _stat
-# ifndef _INTPTR_T_DEFINED
-# define intptr_t int
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR
-# define DIR_SEPARATOR '/'
-# define PATH_SEPARATOR ':'
-#endif
-
-#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
- defined (__OS2__)
-# define HAVE_DOS_BASED_FILE_SYSTEM
-# define FOPEN_WB "wb"
-# ifndef DIR_SEPARATOR_2
-# define DIR_SEPARATOR_2 '\\'
-# endif
-# ifndef PATH_SEPARATOR_2
-# define PATH_SEPARATOR_2 ';'
-# endif
-#endif
-
-#ifndef DIR_SEPARATOR_2
-# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
-#else /* DIR_SEPARATOR_2 */
-# define IS_DIR_SEPARATOR(ch) \
- (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
-#endif /* DIR_SEPARATOR_2 */
-
-#ifndef PATH_SEPARATOR_2
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
-#else /* PATH_SEPARATOR_2 */
-# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
-#endif /* PATH_SEPARATOR_2 */
-
-#ifdef __CYGWIN__
-# define FOPEN_WB "wb"
-#endif
-
-#ifndef FOPEN_WB
-# define FOPEN_WB "w"
-#endif
-#ifndef _O_BINARY
-# define _O_BINARY 0
-#endif
-
-#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
-#define XFREE(stale) do { \
- if (stale) { free ((void *) stale); stale = 0; } \
-} while (0)
-
-#undef LTWRAPPER_DEBUGPRINTF
-#if defined DEBUGWRAPPER
-# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
-static void
-ltwrapper_debugprintf (const char *fmt, ...)
-{
- va_list args;
- va_start (args, fmt);
- (void) vfprintf (stderr, fmt, args);
- va_end (args);
-}
-#else
-# define LTWRAPPER_DEBUGPRINTF(args)
-#endif
-
-const char *program_name = NULL;
-
-void *xmalloc (size_t num);
-char *xstrdup (const char *string);
-const char *base_name (const char *name);
-char *find_executable (const char *wrapper);
-char *chase_symlinks (const char *pathspec);
-int make_executable (const char *path);
-int check_executable (const char *path);
-char *strendzap (char *str, const char *pat);
-void lt_fatal (const char *message, ...);
-void lt_setenv (const char *name, const char *value);
-char *lt_extend_str (const char *orig_value, const char *add, int to_end);
-void lt_opt_process_env_set (const char *arg);
-void lt_opt_process_env_prepend (const char *arg);
-void lt_opt_process_env_append (const char *arg);
-int lt_split_name_value (const char *arg, char** name, char** value);
-void lt_update_exe_path (const char *name, const char *value);
-void lt_update_lib_path (const char *name, const char *value);
-
-static const char *script_text_part1 =
-EOF
-
- func_emit_wrapper_part1 yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ "/' -e 's/$/\\n"/'
- echo ";"
- cat <<EOF
-
-static const char *script_text_part2 =
-EOF
- func_emit_wrapper_part2 yes |
- $SED -e 's/\([\\"]\)/\\\1/g' \
- -e 's/^/ "/' -e 's/$/\\n"/'
- echo ";"
-
- cat <<EOF
-const char * MAGIC_EXE = "$magic_exe";
-const char * LIB_PATH_VARNAME = "$shlibpath_var";
-EOF
-
- if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
- func_to_host_pathlist "$temp_rpath"
- cat <<EOF
-const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
-EOF
- else
- cat <<"EOF"
-const char * LIB_PATH_VALUE = "";
-EOF
- fi
-
- if test -n "$dllsearchpath"; then
- func_to_host_pathlist "$dllsearchpath:"
- cat <<EOF
-const char * EXE_PATH_VARNAME = "PATH";
-const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
-EOF
- else
- cat <<"EOF"
-const char * EXE_PATH_VARNAME = "";
-const char * EXE_PATH_VALUE = "";
-EOF
- fi
-
- if test "$fast_install" = yes; then
- cat <<EOF
-const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
-EOF
- else
- cat <<EOF
-const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
-EOF
- fi
-
-
- cat <<"EOF"
-
-#define LTWRAPPER_OPTION_PREFIX "--lt-"
-#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
-
-static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
-static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
-
-static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
-
-static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
-static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
- /* argument is putenv-style "foo=bar", value of foo is set to bar */
-
-static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
-static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
- /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
-
-static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
-static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
- /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
-
-int
-main (int argc, char *argv[])
-{
- char **newargz;
- int newargc;
- char *tmp_pathspec;
- char *actual_cwrapper_path;
- char *actual_cwrapper_name;
- char *target_name;
- char *lt_argv_zero;
- intptr_t rval = 127;
-
- int i;
-
- program_name = (char *) xstrdup (base_name (argv[0]));
- LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
- LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
-
- /* very simple arg parsing; don't want to rely on getopt */
- for (i = 1; i < argc; i++)
- {
- if (strcmp (argv[i], dumpscript_opt) == 0)
- {
-EOF
- case "$host" in
- *mingw* | *cygwin* )
- # make stdout use "unix" line endings
- echo " setmode(1,_O_BINARY);"
- ;;
- esac
-
- cat <<"EOF"
- printf ("%s", script_text_part1);
- printf ("%s", script_text_part2);
- return 0;
- }
- }
-
- newargz = XMALLOC (char *, argc + 1);
- tmp_pathspec = find_executable (argv[0]);
- if (tmp_pathspec == NULL)
- lt_fatal ("Couldn't find %s", argv[0]);
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
- tmp_pathspec));
-
- actual_cwrapper_path = chase_symlinks (tmp_pathspec);
- LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
- actual_cwrapper_path));
- XFREE (tmp_pathspec);
-
- actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
- strendzap (actual_cwrapper_path, actual_cwrapper_name);
-
- /* wrapper name transforms */
- strendzap (actual_cwrapper_name, ".exe");
- tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
- XFREE (actual_cwrapper_name);
- actual_cwrapper_name = tmp_pathspec;
- tmp_pathspec = 0;
-
- /* target_name transforms -- use actual target program name; might have lt- prefix */
- target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
- strendzap (target_name, ".exe");
- tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
- XFREE (target_name);
- target_name = tmp_pathspec;
- tmp_pathspec = 0;
-
- LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
- target_name));
-EOF
-
- cat <<EOF
- newargz[0] =
- XMALLOC (char, (strlen (actual_cwrapper_path) +
- strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
- strcpy (newargz[0], actual_cwrapper_path);
- strcat (newargz[0], "$objdir");
- strcat (newargz[0], "/");
-EOF
-
- cat <<"EOF"
- /* stop here, and copy so we don't have to do this twice */
- tmp_pathspec = xstrdup (newargz[0]);
-
- /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
- strcat (newargz[0], actual_cwrapper_name);
-
- /* DO want the lt- prefix here if it exists, so use target_name */
- lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
- XFREE (tmp_pathspec);
- tmp_pathspec = NULL;
-EOF
-
- case $host_os in
- mingw*)
- cat <<"EOF"
- {
- char* p;
- while ((p = strchr (newargz[0], '\\')) != NULL)
- {
- *p = '/';
- }
- while ((p = strchr (lt_argv_zero, '\\')) != NULL)
- {
- *p = '/';
- }
- }
-EOF
- ;;
- esac
-
- cat <<"EOF"
- XFREE (target_name);
- XFREE (actual_cwrapper_path);
- XFREE (actual_cwrapper_name);
-
- lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
- lt_setenv ("DUALCASE", "1"); /* for MSK sh */
- lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
- lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
-
- newargc=0;
- for (i = 1; i < argc; i++)
- {
- if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
- {
- if (argv[i][env_set_opt_len] == '=')
- {
- const char *p = argv[i] + env_set_opt_len + 1;
- lt_opt_process_env_set (p);
- }
- else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_set (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_set_opt);
- continue;
- }
- if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
- {
- if (argv[i][env_prepend_opt_len] == '=')
- {
- const char *p = argv[i] + env_prepend_opt_len + 1;
- lt_opt_process_env_prepend (p);
- }
- else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_prepend (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_prepend_opt);
- continue;
- }
- if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
- {
- if (argv[i][env_append_opt_len] == '=')
- {
- const char *p = argv[i] + env_append_opt_len + 1;
- lt_opt_process_env_append (p);
- }
- else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
- {
- lt_opt_process_env_append (argv[++i]); /* don't copy */
- }
- else
- lt_fatal ("%s missing required argument", env_append_opt);
- continue;
- }
- if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
- {
- /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
- namespace, but it is not one of the ones we know about and
- have already dealt with, above (inluding dump-script), then
- report an error. Otherwise, targets might begin to believe
- they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
- namespace. The first time any user complains about this, we'll
- need to make LTWRAPPER_OPTION_PREFIX a configure-time option
- or a configure.ac-settable value.
- */
- lt_fatal ("Unrecognized option in %s namespace: '%s'",
- ltwrapper_option_prefix, argv[i]);
- }
- /* otherwise ... */
- newargz[++newargc] = xstrdup (argv[i]);
- }
- newargz[++newargc] = NULL;
-
- LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
- for (i = 0; i < newargc; i++)
- {
- LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
- }
-
-EOF
-
- case $host_os in
- mingw*)
- cat <<"EOF"
- /* execv doesn't actually work on mingw as expected on unix */
- rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
- if (rval == -1)
- {
- /* failed to start process */
- LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
- return 127;
- }
- return rval;
-EOF
- ;;
- *)
- cat <<"EOF"
- execv (lt_argv_zero, newargz);
- return rval; /* =127, but avoids unused variable warning */
-EOF
- ;;
- esac
-
- cat <<"EOF"
-}
-
-void *
-xmalloc (size_t num)
-{
- void *p = (void *) malloc (num);
- if (!p)
- lt_fatal ("Memory exhausted");
-
- return p;
-}
-
-char *
-xstrdup (const char *string)
-{
- return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
- string) : NULL;
-}
-
-const char *
-base_name (const char *name)
-{
- const char *base;
-
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- /* Skip over the disk name in MSDOS pathnames. */
- if (isalpha ((unsigned char) name[0]) && name[1] == ':')
- name += 2;
-#endif
-
- for (base = name; *name; name++)
- if (IS_DIR_SEPARATOR (*name))
- base = name + 1;
- return base;
-}
-
-int
-check_executable (const char *path)
-{
- struct stat st;
-
- LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
- path ? (*path ? path : "EMPTY!") : "NULL!"));
- if ((!path) || (!*path))
- return 0;
-
- if ((stat (path, &st) >= 0)
- && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
- return 1;
- else
- return 0;
-}
-
-int
-make_executable (const char *path)
-{
- int rval = 0;
- struct stat st;
-
- LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
- path ? (*path ? path : "EMPTY!") : "NULL!"));
- if ((!path) || (!*path))
- return 0;
-
- if (stat (path, &st) >= 0)
- {
- rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
- }
- return rval;
-}
-
-/* Searches for the full path of the wrapper. Returns
- newly allocated full path name if found, NULL otherwise
- Does not chase symlinks, even on platforms that support them.
-*/
-char *
-find_executable (const char *wrapper)
-{
- int has_slash = 0;
- const char *p;
- const char *p_next;
- /* static buffer for getcwd */
- char tmp[LT_PATHMAX + 1];
- int tmp_len;
- char *concat_name;
-
- LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
- wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
-
- if ((wrapper == NULL) || (*wrapper == '\0'))
- return NULL;
-
- /* Absolute path? */
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
- {
- concat_name = xstrdup (wrapper);
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
- else
- {
-#endif
- if (IS_DIR_SEPARATOR (wrapper[0]))
- {
- concat_name = xstrdup (wrapper);
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
-#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
- }
-#endif
-
- for (p = wrapper; *p; p++)
- if (*p == '/')
- {
- has_slash = 1;
- break;
- }
- if (!has_slash)
- {
- /* no slashes; search PATH */
- const char *path = getenv ("PATH");
- if (path != NULL)
- {
- for (p = path; *p; p = p_next)
- {
- const char *q;
- size_t p_len;
- for (q = p; *q; q++)
- if (IS_PATH_SEPARATOR (*q))
- break;
- p_len = q - p;
- p_next = (*q == '\0' ? q : q + 1);
- if (p_len == 0)
- {
- /* empty path: current directory */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen (tmp);
- concat_name =
- XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
- }
- else
- {
- concat_name =
- XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, p, p_len);
- concat_name[p_len] = '/';
- strcpy (concat_name + p_len + 1, wrapper);
- }
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- }
- }
- /* not found in PATH; assume curdir */
- }
- /* Relative path | not found in path: prepend cwd */
- if (getcwd (tmp, LT_PATHMAX) == NULL)
- lt_fatal ("getcwd failed");
- tmp_len = strlen (tmp);
- concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
- memcpy (concat_name, tmp, tmp_len);
- concat_name[tmp_len] = '/';
- strcpy (concat_name + tmp_len + 1, wrapper);
-
- if (check_executable (concat_name))
- return concat_name;
- XFREE (concat_name);
- return NULL;
-}
-
-char *
-chase_symlinks (const char *pathspec)
-{
-#ifndef S_ISLNK
- return xstrdup (pathspec);
-#else
- char buf[LT_PATHMAX];
- struct stat s;
- char *tmp_pathspec = xstrdup (pathspec);
- char *p;
- int has_symlinks = 0;
- while (strlen (tmp_pathspec) && !has_symlinks)
- {
- LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
- tmp_pathspec));
- if (lstat (tmp_pathspec, &s) == 0)
- {
- if (S_ISLNK (s.st_mode) != 0)
- {
- has_symlinks = 1;
- break;
- }
-
- /* search backwards for last DIR_SEPARATOR */
- p = tmp_pathspec + strlen (tmp_pathspec) - 1;
- while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
- p--;
- if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
- {
- /* no more DIR_SEPARATORS left */
- break;
- }
- *p = '\0';
- }
- else
- {
- char *errstr = strerror (errno);
- lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
- }
- }
- XFREE (tmp_pathspec);
-
- if (!has_symlinks)
- {
- return xstrdup (pathspec);
- }
-
- tmp_pathspec = realpath (pathspec, buf);
- if (tmp_pathspec == 0)
- {
- lt_fatal ("Could not follow symlinks for %s", pathspec);
- }
- return xstrdup (tmp_pathspec);
-#endif
-}
-
-char *
-strendzap (char *str, const char *pat)
-{
- size_t len, patlen;
-
- assert (str != NULL);
- assert (pat != NULL);
-
- len = strlen (str);
- patlen = strlen (pat);
-
- if (patlen <= len)
- {
- str += len - patlen;
- if (strcmp (str, pat) == 0)
- *str = '\0';
- }
- return str;
-}
-
-static void
-lt_error_core (int exit_status, const char *mode,
- const char *message, va_list ap)
-{
- fprintf (stderr, "%s: %s: ", program_name, mode);
- vfprintf (stderr, message, ap);
- fprintf (stderr, ".\n");
-
- if (exit_status >= 0)
- exit (exit_status);
-}
-
-void
-lt_fatal (const char *message, ...)
-{
- va_list ap;
- va_start (ap, message);
- lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
- va_end (ap);
-}
-
-void
-lt_setenv (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
- {
-#ifdef HAVE_SETENV
- /* always make a copy, for consistency with !HAVE_SETENV */
- char *str = xstrdup (value);
- setenv (name, str, 1);
-#else
- int len = strlen (name) + 1 + strlen (value) + 1;
- char *str = XMALLOC (char, len);
- sprintf (str, "%s=%s", name, value);
- if (putenv (str) != EXIT_SUCCESS)
- {
- XFREE (str);
- }
-#endif
- }
-}
-
-char *
-lt_extend_str (const char *orig_value, const char *add, int to_end)
-{
- char *new_value;
- if (orig_value && *orig_value)
- {
- int orig_value_len = strlen (orig_value);
- int add_len = strlen (add);
- new_value = XMALLOC (char, add_len + orig_value_len + 1);
- if (to_end)
- {
- strcpy (new_value, orig_value);
- strcpy (new_value + orig_value_len, add);
- }
- else
- {
- strcpy (new_value, add);
- strcpy (new_value + add_len, orig_value);
- }
- }
- else
- {
- new_value = xstrdup (add);
- }
- return new_value;
-}
-
-int
-lt_split_name_value (const char *arg, char** name, char** value)
-{
- const char *p;
- int len;
- if (!arg || !*arg)
- return 1;
-
- p = strchr (arg, (int)'=');
-
- if (!p)
- return 1;
-
- *value = xstrdup (++p);
-
- len = strlen (arg) - strlen (*value);
- *name = XMALLOC (char, len);
- strncpy (*name, arg, len-1);
- (*name)[len - 1] = '\0';
-
- return 0;
-}
-
-void
-lt_opt_process_env_set (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
- }
-
- lt_setenv (name, value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_opt_process_env_prepend (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
- char *new_value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
- }
-
- new_value = lt_extend_str (getenv (name), value, 0);
- lt_setenv (name, new_value);
- XFREE (new_value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_opt_process_env_append (const char *arg)
-{
- char *name = NULL;
- char *value = NULL;
- char *new_value = NULL;
-
- if (lt_split_name_value (arg, &name, &value) != 0)
- {
- XFREE (name);
- XFREE (value);
- lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
- }
-
- new_value = lt_extend_str (getenv (name), value, 1);
- lt_setenv (name, new_value);
- XFREE (new_value);
- XFREE (name);
- XFREE (value);
-}
-
-void
-lt_update_exe_path (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
-
- if (name && *name && value && *value)
- {
- char *new_value = lt_extend_str (getenv (name), value, 0);
- /* some systems can't cope with a ':'-terminated path #' */
- int len = strlen (new_value);
- while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
- {
- new_value[len-1] = '\0';
- }
- lt_setenv (name, new_value);
- XFREE (new_value);
- }
-}
-
-void
-lt_update_lib_path (const char *name, const char *value)
-{
- LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
- (name ? name : "<NULL>"),
- (value ? value : "<NULL>")));
-
- if (name && *name && value && *value)
- {
- char *new_value = lt_extend_str (getenv (name), value, 0);
- lt_setenv (name, new_value);
- XFREE (new_value);
- }
-}
-
-
-EOF
-}
-# end: func_emit_cwrapperexe_src
-
-# func_mode_link arg...
-func_mode_link ()
-{
- $opt_debug
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
- # 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 invocation.
- # 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
- base_compile="$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`
- inst_prefix_dir=
- new_inherited_linker_flags=
-
- avoid_version=no
- dlfiles=
- dlprefiles=
- dlself=no
- export_dynamic=no
- export_symbols=
- export_symbols_regex=
- generated=
- libobjs=
- ltlibs=
- module=no
- no_install=no
- objs=
- non_pic_objects=
- precious_files_regex=
- prefer_static_libs=no
- preload=no
- prev=
- prevarg=
- release=
- rpath=
- xrpath=
- perm_rpath=
- temp_rpath=
- thread_safe=no
- vinfo=
- vinfo_number=no
- weak_libs=
- single_module="${wl}-single_module"
- func_infer_tag $base_compile
-
- # We need to know -static, to get the right output filenames.
- for arg
- do
- case $arg in
- -shared)
- test "$build_libtool_libs" != yes && \
- func_fatal_configuration "can not build a shared library"
- build_old_libs=no
- break
- ;;
- -all-static | -static | -static-libtool-libs)
- case $arg in
- -all-static)
- if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
- func_warning "complete static linking is impossible in this configuration"
- fi
- if test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- -static)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=built
- ;;
- -static-libtool-libs)
- if test -z "$pic_flag" && test -n "$link_static_flag"; then
- dlopen_self=$dlopen_self_static
- fi
- prefer_static_libs=yes
- ;;
- esac
- build_libtool_libs=no
- build_old_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
- func_quote_for_eval "$arg"
- qarg=$func_quote_for_eval_unquoted_result
- func_append libtool_args " $func_quote_for_eval_result"
-
- # If the previous option needs an argument, assign it.
- if test -n "$prev"; then
- case $prev in
- output)
- func_append compile_command " @OUTPUT@"
- func_append finalize_command " @OUTPUT@"
- ;;
- esac
-
- case $prev in
- dlfiles|dlprefiles)
- if test "$preload" = no; then
- # Add the symbol object into the linking commands.
- func_append compile_command " @SYMFILE@"
- func_append 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"
- test -f "$arg" \
- || func_fatal_error "symbol file \`$arg' does not exist"
- prev=
- continue
- ;;
- expsyms_regex)
- export_symbols_regex="$arg"
- prev=
- continue
- ;;
- framework)
- case $host in
- *-*-darwin*)
- case "$deplibs " in
- *" $qarg.ltframework "*) ;;
- *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
- ;;
- esac
- ;;
- esac
- prev=
- continue
- ;;
- inst_prefix)
- inst_prefix_dir="$arg"
- prev=
- continue
- ;;
- objectlist)
- if test -f "$arg"; then
- save_arg=$arg
- moreargs=
- for fil in `cat "$save_arg"`
- do
-# moreargs="$moreargs $fil"
- arg=$fil
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- func_append non_pic_objects " $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- func_lo2o "$arg"
- pic_object=$xdir$objdir/$func_lo2o_result
- non_pic_object=$xdir$func_lo2o_result
- func_append libobjs " $pic_object"
- func_append non_pic_objects " $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- fi
- done
- else
- func_fatal_error "link input file \`$arg' does not exist"
- fi
- arg=$save_arg
- prev=
- continue
- ;;
- precious_regex)
- precious_files_regex="$arg"
- prev=
- continue
- ;;
- release)
- release="-$arg"
- prev=
- continue
- ;;
- rpath | xrpath)
- # We need an absolute path.
- case $arg in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- 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
- ;;
- shrext)
- shrext_cmds="$arg"
- prev=
- continue
- ;;
- weak)
- weak_libs="$weak_libs $arg"
- prev=
- continue
- ;;
- xcclinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $qarg"
- prev=
- func_append compile_command " $qarg"
- func_append finalize_command " $qarg"
- continue
- ;;
- xcompiler)
- compiler_flags="$compiler_flags $qarg"
- prev=
- func_append compile_command " $qarg"
- func_append finalize_command " $qarg"
- continue
- ;;
- xlinker)
- linker_flags="$linker_flags $qarg"
- compiler_flags="$compiler_flags $wl$qarg"
- prev=
- func_append compile_command " $wl$qarg"
- func_append 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
- # See comment for -static flag below, for more details.
- func_append compile_command " $link_static_flag"
- func_append finalize_command " $link_static_flag"
- fi
- continue
- ;;
-
- -allow-undefined)
- # FIXME: remove this flag sometime in the future.
- func_fatal_error "\`-allow-undefined' must not be used because it is the default"
- ;;
-
- -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
- func_fatal_error "more than one -exported-symbols argument is not allowed"
- fi
- if test "X$arg" = "X-export-symbols"; then
- prev=expsyms
- else
- prev=expsyms_regex
- fi
- continue
- ;;
-
- -framework)
- prev=framework
- continue
- ;;
-
- -inst-prefix-dir)
- prev=inst_prefix
- 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* | /*-*-irix*)
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- ;;
- esac
- continue
- ;;
-
- -L*)
- func_stripname '-L' '' "$arg"
- dir=$func_stripname_result
- if test -z "$dir"; then
- if test "$#" -gt 0; then
- func_fatal_error "require no space between \`-L' and \`$1'"
- else
- func_fatal_error "need path for \`-L' option"
- fi
- fi
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- absdir=`cd "$dir" && pwd`
- test -z "$absdir" && \
- func_fatal_error "cannot determine absolute directory name of \`$dir'"
- 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* | *-cegcc*)
- testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$dir:"*) ;;
- ::) dllsearchpath=$dir;;
- *) dllsearchpath="$dllsearchpath:$dir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- ::) dllsearchpath=$testbindir;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- esac
- ;;
- esac
- continue
- ;;
-
- -l*)
- if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
- # These systems don't actually have a C or math library (as such)
- continue
- ;;
- *-*-os2*)
- # These systems don't actually have a C library (as such)
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C and math libraries are in the System framework
- deplibs="$deplibs System.ltframework"
- continue
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- test "X$arg" = "X-lc" && continue
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- test "X$arg" = "X-lc" && continue
- ;;
- esac
- elif test "X$arg" = "X-lc_r"; then
- case $host in
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc_r directly, use -pthread flag.
- continue
- ;;
- esac
- fi
- deplibs="$deplibs $arg"
- continue
- ;;
-
- -module)
- module=yes
- continue
- ;;
-
- # Tru64 UNIX uses -model [arg] to determine the layout of C++
- # classes, name mangling, and exception handling.
- # Darwin uses the -arch flag to determine output architecture.
- -model|-arch|-isysroot)
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- prev=xcompiler
- continue
- ;;
-
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- compiler_flags="$compiler_flags $arg"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- case "$new_inherited_linker_flags " in
- *" $arg "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
- esac
- continue
- ;;
-
- -multi_module)
- single_module="${wl}-multi_module"
- continue
- ;;
-
- -no-fast-install)
- fast_install=no
- continue
- ;;
-
- -no-install)
- case $host in
- *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
- # The PATH hackery in wrapper scripts is required on Windows
- # and Darwin in order for the loader to find any dlls it needs.
- func_warning "\`-no-install' is ignored for $host"
- func_warning "assuming \`-no-fast-install' instead"
- fast_install=no
- ;;
- *) no_install=yes ;;
- esac
- continue
- ;;
-
- -no-undefined)
- allow_undefined=no
- continue
- ;;
-
- -objectlist)
- prev=objectlist
- continue
- ;;
-
- -o) prev=output ;;
-
- -precious-files-regex)
- prev=precious_regex
- continue
- ;;
-
- -release)
- prev=release
- continue
- ;;
-
- -rpath)
- prev=rpath
- continue
- ;;
-
- -R)
- prev=xrpath
- continue
- ;;
-
- -R*)
- func_stripname '-R' '' "$arg"
- dir=$func_stripname_result
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) ;;
- *)
- func_fatal_error "only absolute run-paths are allowed"
- ;;
- esac
- case "$xrpath " in
- *" $dir "*) ;;
- *) xrpath="$xrpath $dir" ;;
- esac
- continue
- ;;
-
- -shared)
- # The effects of -shared are defined in a previous loop.
- continue
- ;;
-
- -shrext)
- prev=shrext
- continue
- ;;
-
- -static | -static-libtool-libs)
- # 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
- ;;
-
- -version-number)
- prev=vinfo
- vinfo_number=yes
- continue
- ;;
-
- -weak)
- prev=weak
- continue
- ;;
-
- -Wc,*)
- func_stripname '-Wc,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Wl,*)
- func_stripname '-Wl,' '' "$arg"
- args=$func_stripname_result
- arg=
- save_ifs="$IFS"; IFS=','
- for flag in $args; do
- IFS="$save_ifs"
- func_quote_for_eval "$flag"
- arg="$arg $wl$func_quote_for_eval_result"
- compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
- linker_flags="$linker_flags $func_quote_for_eval_result"
- done
- IFS="$save_ifs"
- func_stripname ' ' '' "$arg"
- arg=$func_stripname_result
- ;;
-
- -Xcompiler)
- prev=xcompiler
- continue
- ;;
-
- -Xlinker)
- prev=xlinker
- continue
- ;;
-
- -XCClinker)
- prev=xcclinker
- continue
- ;;
-
- # -msg_* for osf cc
- -msg_*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
- # -r[0-9][0-9]* specifies the processor on the SGI compiler
- # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
- # +DA*, +DD* enable 64-bit mode on the HP compiler
- # -q* pass through compiler args for the IBM compiler
- # -m*, -t[45]*, -txscale* pass through architecture-specific
- # compiler args for GCC
- # -F/path gives path to uninstalled frameworks, gcc on darwin
- # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
- # @file GCC response files
- -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
- -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- compiler_flags="$compiler_flags $arg"
- continue
- ;;
-
- # Some other compiler flag.
- -* | +*)
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
-
- *.$objext)
- # A standard object.
- objs="$objs $arg"
- ;;
-
- *.lo)
- # A libtool-controlled object.
-
- # Check to see that this really is a libtool object.
- if func_lalib_unsafe_p "$arg"; then
- pic_object=
- non_pic_object=
-
- # Read the .lo file
- func_source "$arg"
-
- if test -z "$pic_object" ||
- test -z "$non_pic_object" ||
- test "$pic_object" = none &&
- test "$non_pic_object" = none; then
- func_fatal_error "cannot find name of object for \`$arg'"
- fi
-
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- if test "$pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- pic_object="$xdir$pic_object"
-
- if test "$prev" = dlfiles; then
- if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
- dlfiles="$dlfiles $pic_object"
- prev=
- continue
- else
- # If libtool objects are unsupported, then we need to preload.
- prev=dlprefiles
- fi
- fi
-
- # CHECK ME: I think I busted this. -Ossama
- if test "$prev" = dlprefiles; then
- # Preload the old-style object.
- dlprefiles="$dlprefiles $pic_object"
- prev=
- fi
-
- # A PIC object.
- func_append libobjs " $pic_object"
- arg="$pic_object"
- fi
-
- # Non-PIC object.
- if test "$non_pic_object" != none; then
- # Prepend the subdirectory the object is found in.
- non_pic_object="$xdir$non_pic_object"
-
- # A standard non-PIC object
- func_append non_pic_objects " $non_pic_object"
- if test -z "$pic_object" || test "$pic_object" = none ; then
- arg="$non_pic_object"
- fi
- else
- # If the PIC object exists, use it instead.
- # $xdir was prepended to $pic_object above.
- non_pic_object="$pic_object"
- func_append non_pic_objects " $non_pic_object"
- fi
- else
- # Only an error if not doing a dry-run.
- if $opt_dry_run; then
- # Extract subdirectory from the argument.
- func_dirname "$arg" "/" ""
- xdir="$func_dirname_result"
-
- func_lo2o "$arg"
- pic_object=$xdir$objdir/$func_lo2o_result
- non_pic_object=$xdir$func_lo2o_result
- func_append libobjs " $pic_object"
- func_append non_pic_objects " $non_pic_object"
- else
- func_fatal_error "\`$arg' is not a valid libtool object"
- fi
- 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.
- func_quote_for_eval "$arg"
- arg="$func_quote_for_eval_result"
- ;;
- esac # arg
-
- # Now actually substitute the argument into the commands.
- if test -n "$arg"; then
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- fi
- done # argument parsing loop
-
- test -n "$prev" && \
- func_fatal_help "the \`$prevarg' option requires an argument"
-
- if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
- eval arg=\"$export_dynamic_flag_spec\"
- func_append compile_command " $arg"
- func_append finalize_command " $arg"
- fi
-
- oldlibs=
- # calculate the name of the file, without its directory
- func_basename "$output"
- outputname="$func_basename_result"
- 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\"
-
- func_dirname "$output" "/" ""
- output_objdir="$func_dirname_result$objdir"
- # Create the object directory.
- func_mkdir_p "$output_objdir"
-
- # Determine the type of output
- case $output in
- "")
- func_fatal_help "you must specify an output file"
- ;;
- *.$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
- if $opt_duplicate_deps ; then
- case "$libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- libs="$libs $deplib"
- done
-
- if test "$linkmode" = lib; then
- libs="$predeps $libs $compiler_lib_search_path $postdeps"
-
- # Compute libraries that are listed more than once in $predeps
- # $postdeps and mark them as special (i.e., whose duplicates are
- # not to be eliminated).
- pre_post_deps=
- if $opt_duplicate_compiler_generated_deps; then
- for pre_post_dep in $predeps $postdeps; do
- case "$pre_post_deps " in
- *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
- esac
- pre_post_deps="$pre_post_deps $pre_post_dep"
- done
- fi
- pre_post_deps=
- fi
-
- 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 dlpreopen link"
- for file in $dlfiles $dlprefiles; do
- case $file in
- *.la) ;;
- *)
- func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
- ;;
- 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
- # The preopen pass in lib mode reverses $deplibs; put it back here
- # so that -L comes before libs that need it for instance...
- if test "$linkmode,$pass" = "lib,link"; then
- ## FIXME: Find the place where the list is rebuilt in the wrong
- ## order, and fix it there properly
- tmp_deplibs=
- for deplib in $deplibs; do
- tmp_deplibs="$deplib $tmp_deplibs"
- done
- deplibs="$tmp_deplibs"
- fi
-
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan"; then
- libs="$deplibs"
- deplibs=
- fi
- if test "$linkmode" = prog; then
- case $pass in
- dlopen) libs="$dlfiles" ;;
- dlpreopen) libs="$dlprefiles" ;;
- link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
- esac
- fi
- if test "$linkmode,$pass" = "lib,dlpreopen"; then
- # Collect and forward deplibs of preopened libtool libs
- for lib in $dlprefiles; do
- # Ignore non-libtool-libs
- dependency_libs=
- case $lib in
- *.la) func_source "$lib" ;;
- esac
-
- # Collect preopened libtool deplibs, except any this library
- # has declared as weak libs
- for deplib in $dependency_libs; do
- deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
- case " $weak_libs " in
- *" $deplib_base "*) ;;
- *) deplibs="$deplibs $deplib" ;;
- esac
- done
- done
- libs="$dlprefiles"
- fi
- if test "$pass" = dlopen; then
- # Collect dlpreopened libraries
- save_deplibs="$deplibs"
- deplibs=
- fi
-
- for deplib in $libs; do
- lib=
- found=no
- case $deplib in
- -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- compiler_flags="$compiler_flags $deplib"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -l*)
- if test "$linkmode" != lib && test "$linkmode" != prog; then
- func_warning "\`-l' is ignored for archives/objects"
- continue
- fi
- func_stripname '-l' '' "$deplib"
- name=$func_stripname_result
- if test "$linkmode" = lib; then
- searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
- else
- searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
- fi
- for searchdir in $searchdirs; do
- for search_ext in .la $std_shrext .so .a; do
- # Search the libtool library
- lib="$searchdir/lib${name}${search_ext}"
- if test -f "$lib"; then
- if test "$search_ext" = ".la"; then
- found=yes
- else
- found=no
- fi
- break 2
- fi
- done
- 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
- else # deplib is a libtool library
- # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
- # We need to do some special things here, and not later.
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $deplib "*)
- if func_lalib_p "$lib"; then
- library_names=
- old_library=
- func_source "$lib"
- for l in $old_library $library_names; do
- ll="$l"
- done
- if test "X$ll" = "X$old_library" ; then # only static version available
- found=no
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
- lib=$ladir/$old_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
- fi
- ;;
- *) ;;
- esac
- fi
- fi
- ;; # -l
- *.ltframework)
- if test "$linkmode,$pass" = "prog,link"; then
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- else
- deplibs="$deplib $deplibs"
- if test "$linkmode" = lib ; then
- case "$new_inherited_linker_flags " in
- *" $deplib "*) ;;
- * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
- esac
- fi
- fi
- continue
- ;;
- -L*)
- case $linkmode in
- lib)
- deplibs="$deplib $deplibs"
- test "$pass" = conv && continue
- newdependency_libs="$deplib $newdependency_libs"
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- prog)
- if test "$pass" = conv; then
- deplibs="$deplib $deplibs"
- continue
- fi
- if test "$pass" = scan; then
- deplibs="$deplib $deplibs"
- else
- compile_deplibs="$deplib $compile_deplibs"
- finalize_deplibs="$deplib $finalize_deplibs"
- fi
- func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- *)
- func_warning "\`-L' is ignored for archives/objects"
- ;;
- esac # linkmode
- continue
- ;; # -L
- -R*)
- if test "$pass" = link; then
- func_stripname '-R' '' "$deplib"
- dir=$func_stripname_result
- # 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)
- # Linking convenience modules into shared libraries is allowed,
- # but linking other static libraries is non-portable.
- case " $dlpreconveniencelibs " in
- *" $deplib "*) ;;
- *)
- valid_a_lib=no
- case $deplibs_check_method in
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
- | $EGREP "$match_pattern_regex" > /dev/null; then
- valid_a_lib=yes
- fi
- ;;
- pass_all)
- valid_a_lib=yes
- ;;
- esac
- if test "$valid_a_lib" != yes; then
- $ECHO
- $ECHO "*** Warning: Trying to link with static lib archive $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"
- $ECHO "*** because the file extensions .$libext of this argument makes me believe"
- $ECHO "*** that it is just a static archive that I should not use here."
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the"
- $ECHO "*** static library $deplib is not portable!"
- deplibs="$deplib $deplibs"
- fi
- ;;
- esac
- 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" = conv; then
- deplibs="$deplib $deplibs"
- elif test "$linkmode" = prog; then
- 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
- fi
- continue
- ;;
- %DEPLIBS%)
- alldeplibs=yes
- continue
- ;;
- esac # case $deplib
-
- if test "$found" = yes || test -f "$lib"; then :
- else
- func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
- fi
-
- # Check to see that this really is a libtool archive.
- func_lalib_unsafe_p "$lib" \
- || func_fatal_error "\`$lib' is not a valid libtool archive"
-
- func_dirname "$lib" "" "."
- ladir="$func_dirname_result"
-
- dlname=
- dlopen=
- dlpreopen=
- libdir=
- library_names=
- old_library=
- inherited_linker_flags=
- # If the library was installed with an old release of libtool,
- # it will not redefine variables installed, or shouldnotlink
- installed=yes
- shouldnotlink=no
- avoidtemprpath=
-
-
- # Read the .la file
- func_source "$lib"
-
- # Convert "-framework foo" to "foo.ltframework"
- if test -n "$inherited_linker_flags"; then
- tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
- for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
- case " $new_inherited_linker_flags " in
- *" $tmp_inherited_linker_flag "*) ;;
- *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
- esac
- done
- fi
- dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- if test "$linkmode,$pass" = "lib,link" ||
- test "$linkmode,$pass" = "prog,scan" ||
- { test "$linkmode" != prog && test "$linkmode" != lib; }; then
- 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
- func_fatal_error "cannot find name of link library for \`$lib'"
- 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"
- elif test "$linkmode" != prog && test "$linkmode" != lib; then
- func_fatal_error "\`$lib' is not a convenience library"
- fi
- tmp_libs=
- for deplib in $dependency_libs; do
- deplibs="$deplib $deplibs"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done
- 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
- func_fatal_error "cannot find name of link library for \`$lib'"
- fi
-
- # This library was specified with -dlopen.
- if test "$pass" = dlopen; then
- if test -z "$libdir"; then
- func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
- 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. We also need to preload any
- # dependent libraries so libltdl's deplib preloader doesn't
- # bomb out in the load deplibs phase.
- dlprefiles="$dlprefiles $lib $dependency_libs"
- 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
- func_warning "cannot determine absolute directory name of \`$ladir'"
- func_warning "passing it literally to the linker, although it might fail"
- abs_ladir="$ladir"
- fi
- ;;
- esac
- func_basename "$lib"
- laname="$func_basename_result"
-
- # 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
- func_warning "library \`$lib' was moved."
- dir="$ladir"
- absdir="$abs_ladir"
- libdir="$abs_ladir"
- else
- dir="$libdir"
- absdir="$libdir"
- fi
- test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
- else
- if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
- dir="$ladir"
- absdir="$abs_ladir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- else
- dir="$ladir/$objdir"
- absdir="$abs_ladir/$objdir"
- # Remove this search path later
- notinst_path="$notinst_path $abs_ladir"
- fi
- fi # $installed = yes
- func_stripname 'lib' '.la' "$laname"
- name=$func_stripname_result
-
- # This library was specified with -dlpreopen.
- if test "$pass" = dlpreopen; then
- if test -z "$libdir" && test "$linkmode" = prog; then
- func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
- 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"
- # Keep a list of preopened convenience libraries to check
- # that they are being used correctly in the link pass.
- test -z "$libdir" && \
- dlpreconveniencelibs="$dlpreconveniencelibs $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" # used for prog,scan pass
- 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*) func_stripname '-L' '' "$deplib"
- newlib_search_path="$newlib_search_path $func_stripname_result"
- ;;
- 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
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- tmp_libs="$tmp_libs $deplib"
- done # for deplib
- continue
- fi # $linkmode = prog...
-
- if test "$linkmode,$pass" = "prog,link"; then
- if test -n "$library_names" &&
- { { test "$prefer_static_libs" = no ||
- test "$prefer_static_libs,$installed" = "built,yes"; } ||
- test -z "$old_library"; }; then
- # We need to hardcode the library path
- if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
- # Make sure the rpath contains only unique directories.
- case "$temp_rpath:" in
- *"$absdir:"*) ;;
- *) temp_rpath="$temp_rpath$absdir:" ;;
- esac
- fi
-
- # 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
- 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
- fi
-
- link_static=no # Whether the deplib will be linked statically
- use_static_libs=$prefer_static_libs
- if test "$use_static_libs" = built && test "$installed" = yes; then
- use_static_libs=no
- fi
- if test -n "$library_names" &&
- { test "$use_static_libs" = no || test -z "$old_library"; }; then
- case $host in
- *cygwin* | *mingw* | *cegcc*)
- # No point in relinking DLLs because paths are not encoded
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=no
- ;;
- *)
- if test "$installed" = no; then
- notinst_deplibs="$notinst_deplibs $lib"
- need_relink=yes
- fi
- ;;
- esac
- # This is a shared library
-
- # Warn about portability, can't link against -module's on some
- # systems (darwin). Don't bleat about dlopened modules though!
- dlopenmodule=""
- for dlpremoduletest in $dlprefiles; do
- if test "X$dlpremoduletest" = "X$lib"; then
- dlopenmodule="$dlpremoduletest"
- break
- fi
- done
- if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
- $ECHO
- if test "$linkmode" = prog; then
- $ECHO "*** Warning: Linking the executable $output against the loadable module"
- else
- $ECHO "*** Warning: Linking the shared library $output against the loadable module"
- fi
- $ECHO "*** $linklib is not portable!"
- fi
- if 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
- fi
-
- if test -n "$old_archive_from_expsyms_cmds"; then
- # figure out the soname
- set dummy $library_names
- shift
- realname="$1"
- 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* | mingw* | *cegcc*)
- func_arith $current - $age
- major=$func_arith_result
- versuffix="-$major"
- ;;
- esac
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
-
- # Make a new name for the extract_expsyms_cmds to use
- soroot="$soname"
- func_basename "$soroot"
- soname="$func_basename_result"
- func_stripname 'lib' '.dll' "$soname"
- newlib=libimp-$func_stripname_result.a
-
- # If the library has no export list, then create one now
- if test -f "$output_objdir/$soname-def"; then :
- else
- func_verbose "extracting exported symbol list from \`$soname'"
- func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
- fi
-
- # Create $newlib
- if test -f "$output_objdir/$newlib"; then :; else
- func_verbose "generating import library for \`$soname'"
- func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
- 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"
- case $host in
- *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
- *-*-sysv4*uw2*) add_dir="-L$dir" ;;
- *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
- *-*-unixware7*) add_dir="-L$dir" ;;
- *-*-darwin* )
- # if the lib is a (non-dlopened) module then we can not
- # link against it, someone is ignoring the earlier warnings
- if /usr/bin/file -L $add 2> /dev/null |
- $GREP ": [^:]* bundle" >/dev/null ; then
- if test "X$dlopenmodule" != "X$lib"; then
- $ECHO "*** Warning: lib $linklib is a module, not a shared library"
- if test -z "$old_library" ; then
- $ECHO
- $ECHO "*** And there doesn't seem to be a static archive available"
- $ECHO "*** The link will probably fail, sorry"
- else
- add="$dir/$old_library"
- fi
- elif test -n "$old_library"; then
- add="$dir/$old_library"
- fi
- fi
- esac
- 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 &&
- test "$hardcode_direct_absolute" = no; then
- add="$dir/$linklib"
- elif test "$hardcode_minus_L" = yes; then
- add_dir="-L$dir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- 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
- func_fatal_configuration "unsupported hardcode properties"
- 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 &&
- test "$hardcode_direct_absolute" = no; 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"
- elif test "$hardcode_automatic" = yes; then
- if test -n "$inst_prefix_dir" &&
- test -f "$inst_prefix_dir$libdir/$linklib" ; then
- add="$inst_prefix_dir$libdir/$linklib"
- else
- add="$libdir/$linklib"
- fi
- else
- # We cannot seem to hardcode it, guess we'll fake it.
- add_dir="-L$libdir"
- # Try looking first in the location we're being installed to.
- if test -n "$inst_prefix_dir"; then
- case $libdir in
- [\\/]*)
- add_dir="$add_dir -L$inst_prefix_dir$libdir"
- ;;
- esac
- fi
- 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
- # 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 system can not link to static lib archive $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 "*** But as you try to build a module library, libtool will still create "
- $ECHO "*** a static module, that should work as long as the dlopening application"
- $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
- 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
- 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*) func_stripname '-R' '' "$libdir"
- temp_xrpath=$func_stripname_result
- 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"
- if $opt_duplicate_deps ; then
- case "$tmp_libs " in
- *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
- esac
- fi
- 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)
- func_dirname "$deplib" "" "."
- dir="$func_dirname_result"
- # We need an absolute path.
- case $dir in
- [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
- *)
- absdir=`cd "$dir" && pwd`
- if test -z "$absdir"; then
- func_warning "cannot determine absolute directory name of \`$dir'"
- absdir="$dir"
- fi
- ;;
- esac
- if $GREP "^installed=no" $deplib > /dev/null; then
- case $host in
- *-*-darwin*)
- depdepl=
- eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
- if test -n "$deplibrary_names" ; then
- for tmp in $deplibrary_names ; do
- depdepl=$tmp
- done
- if test -f "$absdir/$objdir/$depdepl" ; then
- depdepl="$absdir/$objdir/$depdepl"
- darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
- if test -z "$darwin_install_name"; then
- darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
- fi
- compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
- linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
- path=
- fi
- fi
- ;;
- *)
- path="-L$absdir/$objdir"
- ;;
- esac
- else
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- test "$absdir" != "$libdir" && \
- func_warning "\`$deplib' seems to be moved"
-
- path="-L$absdir"
- fi
- ;;
- esac
- case " $deplibs " in
- *" $path "*) ;;
- *) deplibs="$path $deplibs" ;;
- esac
- done
- fi # link_all_deplibs != no
- fi # linkmode = lib
- done # for deplib in $libs
- if test "$pass" = link; then
- if test "$linkmode" = "prog"; then
- compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
- finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
- else
- compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- fi
- fi
- dependency_libs="$newdependency_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
- 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
- # FIXME: Pedantically, this is the right thing to do, so
- # that some nasty dependency loop isn't accidentally
- # broken:
- #new_libs="$deplib $new_libs"
- # Pragmatically, this seems to cause very few problems in
- # practice:
- case $deplib in
- -L*) new_libs="$deplib $new_libs" ;;
- -R*) ;;
- *)
- # And here is the reason: when a library appears more
- # than once as an explicit dependence of a library, or
- # is implicitly linked in more than once by the
- # compiler, it is considered special, and multiple
- # occurrences thereof are not removed. Compare this
- # with having the same library being listed as a
- # dependency of multiple other libraries: in this case,
- # we know (pedantically, we assume) the library does not
- # need to be listed more than once, so we keep only the
- # last copy. This is not always right, but it is rare
- # enough that we require users that really mean to play
- # such unportable linking tricks to link the library
- # using -Wl,-lname, so that libtool does not consider it
- # for duplicate removal.
- 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
- # Last step: remove runtime libs from dependency_libs
- # (they stay in deplibs)
- tmp_libs=
- for i in $dependency_libs ; do
- case " $predeps $postdeps $compiler_lib_search_path " in
- *" $i "*)
- i=""
- ;;
- esac
- if test -n "$i" ; then
- tmp_libs="$tmp_libs $i"
- fi
- done
- dependency_libs=$tmp_libs
- done # for pass
- if test "$linkmode" = prog; then
- dlfiles="$newdlfiles"
- fi
- if test "$linkmode" = prog || test "$linkmode" = lib; then
- dlprefiles="$newdlprefiles"
- fi
-
- case $linkmode in
- oldlib)
- if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for archives"
- fi
-
- case " $deplibs" in
- *\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for archives" ;;
- esac
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for archives"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for archives"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for archives"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for archives"
-
- test -n "$export_symbols$export_symbols_regex" && \
- func_warning "\`-export-symbols' is ignored for archives"
-
- # 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*)
- func_stripname 'lib' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- ;;
- *)
- test "$module" = no && \
- func_fatal_help "libtool library \`$output' must begin with \`lib'"
-
- if test "$need_lib_prefix" != no; then
- # Add the "lib" prefix for modules if required
- func_stripname '' '.la' "$outputname"
- name=$func_stripname_result
- eval shared_ext=\"$shrext_cmds\"
- eval libname=\"$libname_spec\"
- else
- func_stripname '' '.la' "$outputname"
- libname=$func_stripname_result
- fi
- ;;
- esac
-
- if test -n "$objs"; then
- if test "$deplibs_check_method" != pass_all; then
- func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
- else
- $ECHO
- $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
- $ECHO "*** objects $objs is not portable!"
- libobjs="$libobjs $objs"
- fi
- fi
-
- test "$dlself" != no && \
- func_warning "\`-dlopen self' is ignored for libtool libraries"
-
- set dummy $rpath
- shift
- test "$#" -gt 1 && \
- func_warning "ignoring multiple \`-rpath's for a libtool library"
-
- install_libdir="$1"
-
- oldlibs=
- if test -z "$rpath"; then
- if test "$build_libtool_libs" = yes; then
- # Building a libtool convenience library.
- # Some compilers have problems with a `.al' extension so
- # convenience libraries should have the same extension an
- # archive normally would.
- oldlibs="$output_objdir/$libname.$libext $oldlibs"
- build_libtool_libs=convenience
- build_old_libs=yes
- fi
-
- test -n "$vinfo" && \
- func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for convenience libraries"
- else
-
- # Parse the version information argument.
- save_ifs="$IFS"; IFS=':'
- set dummy $vinfo 0 0 0
- shift
- IFS="$save_ifs"
-
- test -n "$7" && \
- func_fatal_help "too many parameters to \`-version-info'"
-
- # convert absolute version numbers to libtool ages
- # this retains compatibility with .la files and attempts
- # to make the code below a bit more comprehensible
-
- case $vinfo_number in
- yes)
- number_major="$1"
- number_minor="$2"
- number_revision="$3"
- #
- # There are really only two kinds -- those that
- # use the current revision as the major version
- # and those that subtract age and use age as
- # a minor version. But, then there is irix
- # which has an extra 1 added just for fun
- #
- case $version_type in
- darwin|linux|osf|windows|none)
- func_arith $number_major + $number_minor
- current=$func_arith_result
- age="$number_minor"
- revision="$number_revision"
- ;;
- freebsd-aout|freebsd-elf|sunos)
- current="$number_major"
- revision="$number_minor"
- age="0"
- ;;
- irix|nonstopux)
- func_arith $number_major + $number_minor
- current=$func_arith_result
- age="$number_minor"
- revision="$number_minor"
- lt_irix_increment=no
- ;;
- esac
- ;;
- no)
- current="$1"
- revision="$2"
- age="$3"
- ;;
- esac
-
- # 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]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "CURRENT \`$current' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $revision in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "REVISION \`$revision' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- case $age in
- 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
- *)
- func_error "AGE \`$age' must be a nonnegative integer"
- func_fatal_error "\`$vinfo' is not valid version information"
- ;;
- esac
-
- if test "$age" -gt "$current"; then
- func_error "AGE \`$age' is greater than the current interface number \`$current'"
- func_fatal_error "\`$vinfo' is not valid version information"
- 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
- func_arith $current - $age
- major=.$func_arith_result
- versuffix="$major.$age.$revision"
- # Darwin ld doesn't like 0 for these options...
- func_arith $current + 1
- minor_current=$func_arith_result
- xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
- verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
- ;;
-
- freebsd-aout)
- major=".$current"
- versuffix=".$current.$revision";
- ;;
-
- freebsd-elf)
- major=".$current"
- versuffix=".$current"
- ;;
-
- irix | nonstopux)
- if test "X$lt_irix_increment" = "Xno"; then
- func_arith $current - $age
- else
- func_arith $current - $age + 1
- fi
- major=$func_arith_result
-
- case $version_type in
- nonstopux) verstring_prefix=nonstopux ;;
- *) verstring_prefix=sgi ;;
- esac
- verstring="$verstring_prefix$major.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$revision
- while test "$loop" -ne 0; do
- func_arith $revision - $loop
- iface=$func_arith_result
- func_arith $loop - 1
- loop=$func_arith_result
- verstring="$verstring_prefix$major.$iface:$verstring"
- done
-
- # Before this point, $major must not contain `.'.
- major=.$major
- versuffix="$major.$revision"
- ;;
-
- linux)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix="$major.$age.$revision"
- ;;
-
- osf)
- func_arith $current - $age
- major=.$func_arith_result
- versuffix=".$current.$age.$revision"
- verstring="$current.$age.$revision"
-
- # Add in all the interfaces that we are compatible with.
- loop=$age
- while test "$loop" -ne 0; do
- func_arith $current - $loop
- iface=$func_arith_result
- func_arith $loop - 1
- loop=$func_arith_result
- verstring="$verstring:${iface}.0"
- done
-
- # Make executables depend on our current version.
- verstring="$verstring:${current}.0"
- ;;
-
- qnx)
- major=".$current"
- versuffix=".$current"
- ;;
-
- sunos)
- major=".$current"
- versuffix=".$current.$revision"
- ;;
-
- windows)
- # Use '-' rather than '.', since we only want one
- # extension on DOS 8.3 filesystems.
- func_arith $current - $age
- major=$func_arith_result
- versuffix="-$major"
- ;;
-
- *)
- func_fatal_configuration "unknown library version type \`$version_type'"
- ;;
- esac
-
- # Clear the version info if we defaulted, and they specified a release.
- if test -z "$vinfo" && test -n "$release"; then
- major=
- 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
- func_warning "undefined symbols not allowed in $host shared libraries"
- build_libtool_libs=no
- build_old_libs=yes
- fi
- else
- # Don't allow undefined symbols.
- allow_undefined_flag="$no_undefined_flag"
- fi
-
- fi
-
- func_generate_dlsyms "$libname" "$libname" "yes"
- libobjs="$libobjs $symfileobj"
- test "X$libobjs" = "X " && libobjs=
-
- if test "$mode" != relink; then
- # Remove our outputs, but don't remove object files since they
- # may have been created when compiling PIC objects.
- removelist=
- tempremovelist=`$ECHO "$output_objdir/*"`
- for p in $tempremovelist; do
- case $p in
- *.$objext | *.gcno)
- ;;
- $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
- if test "X$precious_files_regex" != "X"; then
- if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
- then
- continue
- fi
- fi
- removelist="$removelist $p"
- ;;
- *) ;;
- esac
- done
- test -n "$removelist" && \
- func_show_eval "${RM}r \$removelist"
- 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 "X$lib_search_path " | $Xsed -e "s% $path % %g"`
- # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
- # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -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* | *-cegcc*)
- # these systems don't actually have a c library (as such)!
- ;;
- *-*-rhapsody* | *-*-darwin1.[012])
- # Rhapsody C library is in the System framework
- deplibs="$deplibs System.ltframework"
- ;;
- *-*-netbsd*)
- # Don't link with libc until the a.out ld.so is fixed.
- ;;
- *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
- # Do not include libc due to us having libc/libc_r.
- ;;
- *-*-sco3.2v5* | *-*-sco5v6*)
- # Causes problems with __ctype
- ;;
- *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
- # Compiler inserts libc in the correct place for threads to work
- ;;
- *)
- # 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 behavior.
- 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.
- $opt_dry_run || $RM conftest.c
- cat > conftest.c <<EOF
- int main() { return 0; }
-EOF
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
- ldd_output=`ldd conftest`
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $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 I believe you do not have"
- $ECHO "*** because a test_compile did reveal that the linker did not use it for"
- $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
- fi
- fi
- ;;
- *)
- newdeplibs="$newdeplibs $i"
- ;;
- esac
- done
- else
- # Error occurred in the first compile. Let's try to salvage
- # the situation: Compile a separate program for each library.
- for i in $deplibs; do
- case $i in
- -l*)
- func_stripname -l '' "$i"
- name=$func_stripname_result
- $opt_dry_run || $RM conftest
- if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
- ldd_output=`ldd conftest`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $i "*)
- newdeplibs="$newdeplibs $i"
- i=""
- ;;
- esac
- fi
- if test -n "$i" ; then
- libname=`eval "\\$ECHO \"$libname_spec\""`
- deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
- set dummy $deplib_matches; shift
- deplib_match=$1
- if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
- newdeplibs="$newdeplibs $i"
- else
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: dynamic linker does not accept needed library $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"
- $ECHO "*** because a test_compile did reveal that the linker did not use this one"
- $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
- fi
- 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
- ;;
- *)
- newdeplibs="$newdeplibs $i"
- ;;
- esac
- done
- fi
- ;;
- file_magic*)
- set dummy $deplibs_check_method; shift
- file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- case $a_deplib in
- -l*)
- func_stripname -l '' "$a_deplib"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; 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 -e 10q |
- $EGREP "$file_magic_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $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"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a file magic. Last file checked: $potlib"
- fi
- fi
- ;;
- *)
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- ;;
- esac
- done # Gone through all deplibs.
- ;;
- match_pattern*)
- set dummy $deplibs_check_method; shift
- match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
- for a_deplib in $deplibs; do
- case $a_deplib in
- -l*)
- func_stripname -l '' "$a_deplib"
- name=$func_stripname_result
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- case " $predeps $postdeps " in
- *" $a_deplib "*)
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- ;;
- esac
- fi
- if test -n "$a_deplib" ; 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
- potlib="$potent_lib" # see symlink-check above in file_magic test
- if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
- $EGREP "$match_pattern_regex" > /dev/null; then
- newdeplibs="$newdeplibs $a_deplib"
- a_deplib=""
- break 2
- fi
- done
- done
- fi
- if test -n "$a_deplib" ; then
- droppeddeps=yes
- $ECHO
- $ECHO "*** Warning: linker path does not have real file for library $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"
- $ECHO "*** because I did check the linker path looking for a file starting"
- if test -z "$potlib" ; then
- $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
- else
- $ECHO "*** with $libname and none of the candidates passed a file format test"
- $ECHO "*** using a regex pattern. Last file checked: $potlib"
- fi
- fi
- ;;
- *)
- # Add a -L argument.
- newdeplibs="$newdeplibs $a_deplib"
- ;;
- esac
- done # Gone through all deplibs.
- ;;
- none | unknown | *)
- newdeplibs=""
- tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
- -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
- if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
- for i in $predeps $postdeps ; do
- # can't use Xsed below, because $i might contain '/'
- tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
- done
- fi
- if $ECHO "X $tmp_deplibs" | $Xsed -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 with the System framework
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- 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
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- case $host in
- *-*-darwin*)
- newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- deplibs="$new_libs"
-
- # 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"
- if test -n "$hardcode_libdir_flag_spec_ld"; then
- eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
- else
- eval dep_rpath=\"$hardcode_libdir_flag_spec\"
- fi
- 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 shared_ext=\"$shrext_cmds\"
- eval library_names=\"$library_names_spec\"
- set dummy $library_names
- shift
- realname="$1"
- shift
-
- if test -n "$soname_spec"; then
- eval soname=\"$soname_spec\"
- else
- soname="$realname"
- fi
- if test -z "$dlname"; then
- dlname=$soname
- fi
-
- lib="$output_objdir/$realname"
- linknames=
- for link
- do
- linknames="$linknames $link"
- done
-
- # Use standard objects if they are pic
- test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
- test "X$libobjs" = "X " && libobjs=
-
- delfiles=
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
- export_symbols="$output_objdir/$libname.uexp"
- delfiles="$delfiles $export_symbols"
- fi
-
- orig_export_symbols=
- case $host_os in
- cygwin* | mingw* | cegcc*)
- if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
- # exporting using user supplied symfile
- if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
- # and it's NOT already a .def file. Must figure out
- # which of the given symbols are data symbols and tag
- # them as such. So, trigger use of export_symbols_cmds.
- # export_symbols gets reassigned inside the "prepare
- # the list of exported symbols" if statement, so the
- # include_expsyms logic still works.
- orig_export_symbols="$export_symbols"
- export_symbols=
- always_export_symbols=yes
- fi
- fi
- ;;
- esac
-
- # Prepare the list of exported symbols
- if test -z "$export_symbols"; then
- if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- cmds=$export_symbols_cmds
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- func_len " $cmd"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- func_show_eval "$cmd" 'exit $?'
- skipped_export=false
- else
- # The command line is too long to execute in one step.
- func_verbose "using reloadable object file for export list..."
- skipped_export=:
- # Break out early, otherwise skipped_export may be
- # set to false by a later but shorter cmd.
- break
- fi
- done
- IFS="$save_ifs"
- if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
- fi
-
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
-
- tmp_deplibs=
- for test_deplib in $deplibs; do
- case " $convenience " in
- *" $test_deplib "*) ;;
- *)
- tmp_deplibs="$tmp_deplibs $test_deplib"
- ;;
- esac
- done
- deplibs="$tmp_deplibs"
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec" &&
- test "$compiler_needs_object" = yes &&
- test -z "$libobjs"; then
- # extract the archives, so we have objects to list.
- # TODO: could optimize this to just extract one archive.
- whole_archive_flag_spec=
- fi
- if test -n "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- test "X$libobjs" = "X " && libobjs=
- else
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- libobjs="$libobjs $func_extract_archives_result"
- test "X$libobjs" = "X " && libobjs=
- 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
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
- fi
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- eval test_cmds=\"$module_expsym_cmds\"
- cmds=$module_expsym_cmds
- else
- eval test_cmds=\"$module_cmds\"
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- eval test_cmds=\"$archive_expsym_cmds\"
- cmds=$archive_expsym_cmds
- else
- eval test_cmds=\"$archive_cmds\"
- cmds=$archive_cmds
- fi
- fi
-
- if test "X$skipped_export" != "X:" &&
- func_len " $test_cmds" &&
- len=$func_len_result &&
- test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- :
- else
- # The command line is too long to link in one step, link piecewise
- # or, if using GNU ld and skipped_export is not :, use a linker
- # script.
-
- # Save the value of $output and $libobjs because we want to
- # use them later. If we have whole_archive_flag_spec, we
- # want to use save_libobjs as it was before
- # whole_archive_flag_spec was expanded, because we can't
- # assume the linker understands whole_archive_flag_spec.
- # This may have to be revisited, in case too many
- # convenience libraries get linked in and end up exceeding
- # the spec.
- if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
- save_libobjs=$libobjs
- fi
- save_output=$output
- output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
-
- # Clear the reloadable object creation command queue and
- # initialize k to one.
- test_cmds=
- concat_cmds=
- objlist=
- last_robj=
- k=1
-
- if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
- output=${output_objdir}/${output_la}.lnkscript
- func_verbose "creating GNU ld script: $output"
- $ECHO 'INPUT (' > $output
- for obj in $save_libobjs
- do
- $ECHO "$obj" >> $output
- done
- $ECHO ')' >> $output
- delfiles="$delfiles $output"
- elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
- output=${output_objdir}/${output_la}.lnk
- func_verbose "creating linker input file list: $output"
- : > $output
- set x $save_libobjs
- shift
- firstobj=
- if test "$compiler_needs_object" = yes; then
- firstobj="$1 "
- shift
- fi
- for obj
- do
- $ECHO "$obj" >> $output
- done
- delfiles="$delfiles $output"
- output=$firstobj\"$file_list_spec$output\"
- else
- if test -n "$save_libobjs"; then
- func_verbose "creating reloadable object files..."
- output=$output_objdir/$output_la-${k}.$objext
- eval test_cmds=\"$reload_cmds\"
- func_len " $test_cmds"
- len0=$func_len_result
- len=$len0
-
- # Loop over the list of objects to be linked.
- for obj in $save_libobjs
- do
- func_len " $obj"
- func_arith $len + $func_len_result
- len=$func_arith_result
- if test "X$objlist" = X ||
- test "$len" -lt "$max_cmd_len"; then
- func_append objlist " $obj"
- else
- # The command $test_cmds is almost too long, add a
- # command to the queue.
- if test "$k" -eq 1 ; then
- # The first file doesn't have a previous command to add.
- eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
- else
- # All subsequent reloadable object files will link in
- # the last one created.
- eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
- fi
- last_robj=$output_objdir/$output_la-${k}.$objext
- func_arith $k + 1
- k=$func_arith_result
- output=$output_objdir/$output_la-${k}.$objext
- objlist=$obj
- func_len " $last_robj"
- func_arith $len0 + $func_len_result
- len=$func_arith_result
- fi
- done
- # Handle the remaining objects by creating one last
- # reloadable object file. All subsequent reloadable object
- # files will link in the last one created.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
- if test -n "$last_robj"; then
- eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
- fi
- delfiles="$delfiles $output"
-
- else
- output=
- fi
-
- if ${skipped_export-false}; then
- func_verbose "generating symbol list for \`$libname.la'"
- export_symbols="$output_objdir/$libname.exp"
- $opt_dry_run || $RM $export_symbols
- libobjs=$output
- # Append the command to create the export file.
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
- if test -n "$last_robj"; then
- eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
- fi
- fi
-
- test -n "$save_libobjs" &&
- func_verbose "creating a temporary reloadable object file: $output"
-
- # Loop through the commands generated above and execute them.
- save_ifs="$IFS"; IFS='~'
- for cmd in $concat_cmds; do
- IFS="$save_ifs"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- if test -n "$export_symbols_regex" && ${skipped_export-false}; then
- func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
- func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
- fi
- fi
-
- if ${skipped_export-false}; then
- if test -n "$export_symbols" && test -n "$include_expsyms"; then
- tmp_export_symbols="$export_symbols"
- test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
- $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
- fi
-
- if test -n "$orig_export_symbols"; then
- # The given exports_symbols file has to be filtered, so filter it.
- func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
- # FIXME: $output_objdir/$libname.filter potentially contains lots of
- # 's' commands which not all seds can handle. GNU sed should be fine
- # though. Also, the filter scales superlinearly with the number of
- # global variables. join(1) would be nice here, but unfortunately
- # isn't a blessed tool.
- $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
- delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
- export_symbols=$output_objdir/$libname.def
- $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
- fi
- fi
-
- libobjs=$output
- # Restore the value of output.
- output=$save_output
-
- if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
- eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
- test "X$libobjs" = "X " && libobjs=
- fi
- # Expand the library linking commands again to reset the
- # value of $libobjs for piecewise linking.
-
- # Do each of the archive commands.
- if test "$module" = yes && test -n "$module_cmds" ; then
- if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
- cmds=$module_expsym_cmds
- else
- cmds=$module_cmds
- fi
- else
- if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
- cmds=$archive_expsym_cmds
- else
- cmds=$archive_cmds
- fi
- fi
- fi
-
- if test -n "$delfiles"; then
- # Append the command to remove temporary files to $cmds.
- eval cmds=\"\$cmds~\$RM $delfiles\"
- fi
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- libobjs="$libobjs $func_extract_archives_result"
- test "X$libobjs" = "X " && libobjs=
- fi
-
- save_ifs="$IFS"; IFS='~'
- for cmd in $cmds; do
- IFS="$save_ifs"
- eval cmd=\"$cmd\"
- $opt_silent || {
- func_quote_for_expand "$cmd"
- eval "func_echo $func_quote_for_expand_result"
- }
- $opt_dry_run || eval "$cmd" || {
- lt_exit=$?
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- ( cd "$output_objdir" && \
- $RM "${realname}T" && \
- $MV "${realname}U" "$realname" )
- fi
-
- exit $lt_exit
- }
- done
- IFS="$save_ifs"
-
- # Restore the uninstalled library and exit
- if test "$mode" = relink; then
- $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
-
- if test -n "$convenience"; then
- if test -z "$whole_archive_flag_spec"; then
- func_show_eval '${RM}r "$gentop"'
- fi
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- # Create links to the real library.
- for linkname in $linknames; do
- if test "$realname" != "$linkname"; then
- func_show_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 "$dlfiles$dlprefiles" || test "$dlself" != no; then
- func_warning "\`-dlopen' is ignored for objects"
- fi
-
- case " $deplibs" in
- *\ -l* | *\ -L*)
- func_warning "\`-l' and \`-L' are ignored for objects" ;;
- esac
-
- test -n "$rpath" && \
- func_warning "\`-rpath' is ignored for objects"
-
- test -n "$xrpath" && \
- func_warning "\`-R' is ignored for objects"
-
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for objects"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for objects"
-
- case $output in
- *.lo)
- test -n "$objs$old_deplibs" && \
- func_fatal_error "cannot build library object \`$output' from non-libtool objects"
-
- libobj=$output
- func_lo2o "$libobj"
- obj=$func_lo2o_result
- ;;
- *)
- libobj=
- obj="$output"
- ;;
- esac
-
- # Delete the old objects.
- $opt_dry_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 and hope we can get by with
- # turning comma into space..
- wl=
-
- if test -n "$convenience"; then
- if test -n "$whole_archive_flag_spec"; then
- eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
- reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
- else
- gentop="$output_objdir/${obj}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $convenience
- reload_conv_objs="$reload_objs $func_extract_archives_result"
- 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"
- func_execute_cmds "$reload_cmds" 'exit $?'
-
- # Exit if we aren't doing a library object file.
- if test -z "$libobj"; then
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- fi
-
- if test "$build_libtool_libs" != yes; then
- if test -n "$gentop"; then
- func_show_eval '${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"
- # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
- exit $EXIT_SUCCESS
- 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"
- func_execute_cmds "$reload_cmds" 'exit $?'
- fi
-
- if test -n "$gentop"; then
- func_show_eval '${RM}r "$gentop"'
- fi
-
- exit $EXIT_SUCCESS
- ;;
-
- prog)
- case $host in
- *cygwin*) func_stripname '' '.exe' "$output"
- output=$func_stripname_result.exe;;
- esac
- test -n "$vinfo" && \
- func_warning "\`-version-info' is ignored for programs"
-
- test -n "$release" && \
- func_warning "\`-release' is ignored for programs"
-
- test "$preload" = yes \
- && test "$dlopen_support" = unknown \
- && test "$dlopen_self" = unknown \
- && test "$dlopen_self_static" = unknown && \
- func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
-
- 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 / System.ltframework /'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
- ;;
- esac
-
- case $host in
- *-*-darwin*)
- # Don't allow lazy linking, it breaks C++ global constructors
- # But is supposedly fixed on 10.4 or later (yay!).
- if test "$tagname" = CXX ; then
- case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
- 10.[0123])
- compile_command="$compile_command ${wl}-bind_at_load"
- finalize_command="$finalize_command ${wl}-bind_at_load"
- ;;
- esac
- fi
- # Time to change all our "foo.ltframework" stuff back to "-framework foo"
- compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
- ;;
- esac
-
-
- # move library search paths that coincide with paths to not yet
- # installed libraries to the beginning of the library search list
- new_libs=
- for path in $notinst_path; do
- case " $new_libs " in
- *" -L$path/$objdir "*) ;;
- *)
- case " $compile_deplibs " in
- *" -L$path/$objdir "*)
- new_libs="$new_libs -L$path/$objdir" ;;
- esac
- ;;
- esac
- done
- for deplib in $compile_deplibs; do
- case $deplib in
- -L*)
- case " $new_libs " in
- *" $deplib "*) ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- ;;
- *) new_libs="$new_libs $deplib" ;;
- esac
- done
- compile_deplibs="$new_libs"
-
-
- 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* | *-cegcc*)
- testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
- case :$dllsearchpath: in
- *":$libdir:"*) ;;
- ::) dllsearchpath=$libdir;;
- *) dllsearchpath="$dllsearchpath:$libdir";;
- esac
- case :$dllsearchpath: in
- *":$testbindir:"*) ;;
- ::) dllsearchpath=$testbindir;;
- *) dllsearchpath="$dllsearchpath:$testbindir";;
- 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
-
- func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
-
- # template prelinking step
- if test -n "$prelink_cmds"; then
- func_execute_cmds "$prelink_cmds" 'exit $?'
- fi
-
- wrappers_required=yes
- case $host in
- *cygwin* | *mingw* )
- if test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- *cegcc)
- # Disable wrappers for cegcc, we are cross compiling anyway.
- wrappers_required=no
- ;;
- *)
- if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
- wrappers_required=no
- fi
- ;;
- esac
- if test "$wrappers_required" = no; 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.
- exit_status=0
- func_show_eval "$link_command" 'exit_status=$?'
-
- # Delete the generated files.
- if test -f "$output_objdir/${outputname}S.${objext}"; then
- func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
- fi
-
- exit $exit_status
- 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.
- $opt_dry_run || $RM $output
- # Link the executable and exit
- func_show_eval "$link_command" 'exit $?'
- exit $EXIT_SUCCESS
- 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"
-
- func_warning "this platform does not like uninstalled shared libraries"
- func_warning "\`$output' will be relinked during installation"
- 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.
- $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
-
- func_show_eval "$link_command" 'exit $?'
-
- # Now create the wrapper script.
- func_verbose "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}\" || $lt_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
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; 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 $progpath --fallback-echo"; then
- case $progpath in
- [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
- *) qecho="$SHELL `pwd`/$progpath --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 not in dry run mode.
- $opt_dry_run || {
- # win32 will think the script is a binary if it has
- # a .exe suffix, so we strip it off here.
- case $output in
- *.exe) func_stripname '' '.exe' "$output"
- output=$func_stripname_result ;;
- esac
- # test for cygwin because mv fails w/o .exe extensions
- case $host in
- *cygwin*)
- exeext=.exe
- func_stripname '' '.exe' "$outputname"
- outputname=$func_stripname_result ;;
- *) exeext= ;;
- esac
- case $host in
- *cygwin* | *mingw* )
- func_dirname_and_basename "$output" "" "."
- output_name=$func_basename_result
- output_path=$func_dirname_result
- cwrappersource="$output_path/$objdir/lt-$output_name.c"
- cwrapper="$output_path/$output_name.exe"
- $RM $cwrappersource $cwrapper
- trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
-
- func_emit_cwrapperexe_src > $cwrappersource
-
- # The wrapper executable is built using the $host compiler,
- # because it contains $host paths and files. If cross-
- # compiling, it, like the target executable, must be
- # executed on the $host or under an emulation environment.
- $opt_dry_run || {
- $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
- $STRIP $cwrapper
- }
-
- # Now, create the wrapper script for func_source use:
- func_ltwrapper_scriptname $cwrapper
- $RM $func_ltwrapper_scriptname_result
- trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
- $opt_dry_run || {
- # note: this script will not be executed, so do not chmod.
- if test "x$build" = "x$host" ; then
- $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
- else
- func_emit_wrapper no > $func_ltwrapper_scriptname_result
- fi
- }
- ;;
- * )
- $RM $output
- trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
-
- func_emit_wrapper no > $output
- chmod +x $output
- ;;
- esac
- }
- exit $EXIT_SUCCESS
- ;;
- 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 $symfileobj"
- addlibs="$convenience"
- build_libtool_libs=no
- else
- if test "$build_libtool_libs" = module; then
- oldobjs="$libobjs_save"
- build_libtool_libs=no
- else
- oldobjs="$old_deplibs $non_pic_objects"
- if test "$preload" = yes && test -f "$symfileobj"; then
- oldobjs="$oldobjs $symfileobj"
- fi
- fi
- addlibs="$old_convenience"
- fi
-
- if test -n "$addlibs"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $addlibs
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # Do each command in the archive commands.
- if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
- cmds=$old_archive_from_new_cmds
- else
-
- # Add any objects from preloaded convenience libraries
- if test -n "$dlprefiles"; then
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
-
- func_extract_archives $gentop $dlprefiles
- oldobjs="$oldobjs $func_extract_archives_result"
- fi
-
- # POSIX demands no paths to be encoded in archives. We have
- # to avoid creating archives with duplicate basenames if we
- # might have to extract them afterwards, e.g., when creating a
- # static archive out of a convenience library, or when linking
- # the entirety of a libtool archive into another (currently
- # not supported by libtool).
- if (for obj in $oldobjs
- do
- func_basename "$obj"
- $ECHO "$func_basename_result"
- done | sort | sort -uc >/dev/null 2>&1); then
- :
- else
- $ECHO "copying selected object files to avoid basename conflicts..."
- gentop="$output_objdir/${outputname}x"
- generated="$generated $gentop"
- func_mkdir_p "$gentop"
- save_oldobjs=$oldobjs
- oldobjs=
- counter=1
- for obj in $save_oldobjs
- do
- func_basename "$obj"
- objbase="$func_basename_result"
- case " $oldobjs " in
- " ") oldobjs=$obj ;;
- *[\ /]"$objbase "*)
- while :; do
- # Make sure we don't pick an alternate name that also
- # overlaps.
- newobj=lt$counter-$objbase
- func_arith $counter + 1
- counter=$func_arith_result
- case " $oldobjs " in
- *[\ /]"$newobj "*) ;;
- *) if test ! -f "$gentop/$newobj"; then break; fi ;;
- esac
- done
- func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
- oldobjs="$oldobjs $gentop/$newobj"
- ;;
- *) oldobjs="$oldobjs $obj" ;;
- esac
- done
- fi
- eval cmds=\"$old_archive_cmds\"
-
- func_len " $cmds"
- len=$func_len_result
- if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
- cmds=$old_archive_cmds
- else
- # the command line is too long to link in one step, link in parts
- func_verbose "using piecewise archive linking..."
- save_RANLIB=$RANLIB
- RANLIB=:
- objlist=
- concat_cmds=
- save_oldobjs=$oldobjs
- oldobjs=
- # Is there a better way of finding the last object in the list?
- for obj in $save_oldobjs
- do
- last_oldobj=$obj
- done
- eval test_cmds=\"$old_archive_cmds\"
- func_len " $test_cmds"
- len0=$func_len_result
- len=$len0
- for obj in $save_oldobjs
- do
- func_len " $obj"
- func_arith $len + $func_len_result
- len=$func_arith_result
- func_append objlist " $obj"
- if test "$len" -lt "$max_cmd_len"; then
- :
- else
- # the above command should be used before it gets too long
- oldobjs=$objlist
- if test "$obj" = "$last_oldobj" ; then
- RANLIB=$save_RANLIB
- fi
- test -z "$concat_cmds" || concat_cmds=$concat_cmds~
- eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
- objlist=
- len=$len0
- fi
- done
- RANLIB=$save_RANLIB
- oldobjs=$objlist
- if test "X$oldobjs" = "X" ; then
- eval cmds=\"\$concat_cmds\"
- else
- eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
- fi
- fi
- fi
- func_execute_cmds "$cmds" 'exit $?'
- done
-
- test -n "$generated" && \
- func_show_eval "${RM}r$generated"
-
- # Now create the libtool archive.
- case $output in
- *.la)
- old_library=
- test "$build_old_libs" = yes && old_library="$libname.$libext"
- func_verbose "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}\" || $lt_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
- func_quote_for_eval "$var_value"
- relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
- fi
- done
- # Quote the link command for shipping.
- relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
- relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
- if test "$hardcode_automatic" = yes ; then
- relink_command=
- fi
-
- # Only create the output if not a dry run.
- $opt_dry_run || {
- 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)
- func_basename "$deplib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
- test -z "$libdir" && \
- func_fatal_error "\`$deplib' is not a valid libtool archive"
- newdependency_libs="$newdependency_libs $libdir/$name"
- ;;
- *) newdependency_libs="$newdependency_libs $deplib" ;;
- esac
- done
- dependency_libs="$newdependency_libs"
- newdlfiles=
-
- for lib in $dlfiles; do
- case $lib in
- *.la)
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlfiles="$newdlfiles $libdir/$name"
- ;;
- *) newdlfiles="$newdlfiles $lib" ;;
- esac
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- *.la)
- # Only pass preopened files to the pseudo-archive (for
- # eventual linking with the app. that links it) if we
- # didn't already link the preopened objects directly into
- # the library:
- func_basename "$lib"
- name="$func_basename_result"
- eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
- test -z "$libdir" && \
- func_fatal_error "\`$lib' is not a valid libtool archive"
- newdlprefiles="$newdlprefiles $libdir/$name"
- ;;
- esac
- done
- dlprefiles="$newdlprefiles"
- else
- newdlfiles=
- for lib in $dlfiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlfiles="$newdlfiles $abs"
- done
- dlfiles="$newdlfiles"
- newdlprefiles=
- for lib in $dlprefiles; do
- case $lib in
- [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
- *) abs=`pwd`"/$lib" ;;
- esac
- newdlprefiles="$newdlprefiles $abs"
- 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 | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
- esac
- $ECHO > $output "\
-# $outputname - a libtool library file
-# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
-#
-# 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'
-
-# Linker flags that can not go in dependency_libs.
-inherited_linker_flags='$new_inherited_linker_flags'
-
-# Libraries that this one depends upon.
-dependency_libs='$dependency_libs'
-
-# Names of additional weak libraries provided by this library
-weak_library_names='$weak_libs'
-
-# Version information for $libname.
-current=$current
-age=$age
-revision=$revision
-
-# Is this an already installed library?
-installed=$installed
-
-# Should we warn about portability when linking against -modules?
-shouldnotlink=$module
-
-# 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
- }
-
- # Do a symbolic link so that the libtool archive can be found in
- # LD_LIBRARY_PATH before the program is installed.
- func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
- ;;
- esac
- exit $EXIT_SUCCESS
-}
-
-{ test "$mode" = link || test "$mode" = relink; } &&
- func_mode_link ${1+"$@"}
-
-
-# func_mode_uninstall arg...
-func_mode_uninstall ()
-{
- $opt_debug
- 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
-
- test -z "$RM" && \
- func_fatal_help "you must specify an RM program"
-
- rmdirs=
-
- origobjdir="$objdir"
- for file in $files; do
- func_dirname "$file" "" "."
- dir="$func_dirname_result"
- if test "X$dir" = X.; then
- objdir="$origobjdir"
- else
- objdir="$dir/$origobjdir"
- fi
- func_basename "$file"
- name="$func_basename_result"
- 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 func_lalib_p "$file"; then
- func_source $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"
-
- case "$mode" in
- clean)
- case " $library_names " in
- # " " in the beginning catches empty $dlname
- *" $dlname "*) ;;
- *) rmfiles="$rmfiles $objdir/$dlname" ;;
- esac
- test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
- ;;
- uninstall)
- if test -n "$library_names"; then
- # Do each command in the postuninstall commands.
- func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
-
- if test -n "$old_library"; then
- # Do each command in the old_postuninstall commands.
- func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
- fi
- # FIXME: should reinstall the best remaining shared library.
- ;;
- esac
- fi
- ;;
-
- *.lo)
- # Possibly a libtool object, so verify it.
- if func_lalib_p "$file"; then
-
- # Read the .lo file
- func_source $dir/$name
-
- # Add PIC object to the list of files to remove.
- if test -n "$pic_object" &&
- test "$pic_object" != none; then
- rmfiles="$rmfiles $dir/$pic_object"
- fi
-
- # Add non-PIC object to the list of files to remove.
- if test -n "$non_pic_object" &&
- test "$non_pic_object" != none; then
- rmfiles="$rmfiles $dir/$non_pic_object"
- fi
- fi
- ;;
-
- *)
- if test "$mode" = clean ; then
- noexename=$name
- case $file in
- *.exe)
- func_stripname '' '.exe' "$file"
- file=$func_stripname_result
- func_stripname '' '.exe' "$name"
- noexename=$func_stripname_result
- # $file with .exe has already been added to rmfiles,
- # add $file without .exe
- rmfiles="$rmfiles $file"
- ;;
- esac
- # Do a test to see if this is a libtool program.
- if func_ltwrapper_p "$file"; then
- if func_ltwrapper_executable_p "$file"; then
- func_ltwrapper_scriptname "$file"
- relink_command=
- func_source $func_ltwrapper_scriptname_result
- rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
- else
- relink_command=
- func_source $dir/$noexename
- fi
-
- # note $name still contains .exe if it was in $file originally
- # as does the version of $file that was added into $rmfiles
- rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
- if test "$fast_install" = yes && test -n "$relink_command"; then
- rmfiles="$rmfiles $objdir/lt-$name"
- fi
- if test "X$noexename" != "X$name" ; then
- rmfiles="$rmfiles $objdir/lt-${noexename}.c"
- fi
- fi
- fi
- ;;
- esac
- func_show_eval "$RM $rmfiles" 'exit_status=1'
- done
- objdir="$origobjdir"
-
- # Try to remove the ${objdir}s in the directories where we deleted files
- for dir in $rmdirs; do
- if test -d "$dir"; then
- func_show_eval "rmdir $dir >/dev/null 2>&1"
- fi
- done
-
- exit $exit_status
-}
-
-{ test "$mode" = uninstall || test "$mode" = clean; } &&
- func_mode_uninstall ${1+"$@"}
-
-test -z "$mode" && {
- help="$generic_help"
- func_fatal_help "you must specify a MODE"
-}
-
-test -z "$exec_cmd" && \
- func_fatal_help "invalid operation mode \`$mode'"
-
-if test -n "$exec_cmd"; then
- eval exec "$exec_cmd"
- exit $EXIT_FAILURE
-fi
-
-exit $exit_status
-
-
-# The TAGs below are defined such that we never get into a situation
-# in which we disable both kinds of libraries. Given conflicting
-# choices, we go for a static library, that is the most portable,
-# since we can't tell whether shared libraries were disabled because
-# the user asked for that or because the platform doesn't support
-# them. This is particularly important on AIX, because we don't
-# support having both static and shared libraries enabled at the same
-# time on that platform, so we default to a shared-only configuration.
-# If a disable-shared tag is given, we'll fallback to a static-only
-# configuration. But we'll never go from static-only to shared-only.
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
-build_libtool_libs=no
-build_old_libs=yes
-# ### END LIBTOOL TAG CONFIG: disable-shared
-
-# ### BEGIN LIBTOOL TAG CONFIG: disable-static
-build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
-# ### END LIBTOOL TAG CONFIG: disable-static
-
-# Local Variables:
-# mode:shell-script
-# sh-indentation:2
-# End:
-# vi:sw=2
-
diff --git a/src/3rdparty/libpng/missing b/src/3rdparty/libpng/missing
deleted file mode 100755
index 28055d2..0000000
--- a/src/3rdparty/libpng/missing
+++ /dev/null
@@ -1,376 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-
-scriptversion=2009-04-28.21; # UTC
-
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <pinard@iro.umontreal.ca>, 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, 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 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.
-
-if test $# -eq 0; then
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
-fi
-
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
- configure_ac=configure.ac
-else
- configure_ac=configure.in
-fi
-
-msg="missing on your system"
-
-case $1 in
---run)
- # Try to run requested program, and just exit if it succeeds.
- run=
- shift
- "$@" && exit 0
- # Exit code 63 means version mismatch. This often happens
- # when the user try to use an ancient version of a tool on
- # a file that requires a minimum version. In this case we
- # we should proceed has if the program had been absent, or
- # if --run hadn't been passed.
- if test $? = 63; then
- run=:
- msg="probably too old"
- fi
- ;;
-
- -h|--h|--he|--hel|--help)
- echo "\
-$0 [OPTION]... PROGRAM [ARGUMENT]...
-
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
-
-Options:
- -h, --help display this help and exit
- -v, --version output version information and exit
- --run try to run the given command, and emulate it if it fails
-
-Supported PROGRAM values:
- aclocal touch file \`aclocal.m4'
- autoconf touch file \`configure'
- autoheader touch file \`config.h.in'
- autom4te touch the output file, or create a stub one
- automake touch all \`Makefile.in' files
- bison create \`y.tab.[ch]', if possible, from existing .[ch]
- flex create \`lex.yy.c', if possible, from existing .c
- help2man touch the output file
- lex create \`lex.yy.c', if possible, from existing .c
- makeinfo touch the output file
- tar try tar, gnutar, gtar, then tar without non-portable flags
- yacc create \`y.tab.[ch]', if possible, from existing .[ch]
-
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
-
-Send bug reports to <bug-automake@gnu.org>."
- exit $?
- ;;
-
- -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
- echo "missing $scriptversion (GNU Automake)"
- exit $?
- ;;
-
- -*)
- echo 1>&2 "$0: Unknown \`$1' option"
- echo 1>&2 "Try \`$0 --help' for more information"
- exit 1
- ;;
-
-esac
-
-# normalize program name to check for.
-program=`echo "$1" | sed '
- s/^gnu-//; t
- s/^gnu//; t
- s/^g//; t'`
-
-# Now exit if we have it, but it failed. Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program). This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
- lex*|yacc*)
- # Not GNU programs, they don't have --version.
- ;;
-
- tar*)
- if test -n "$run"; then
- echo 1>&2 "ERROR: \`tar' requires --run"
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- exit 1
- fi
- ;;
-
- *)
- if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
- # We have it, but it failed.
- exit 1
- elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
- # Could not run --version or --help. This is probably someone
- # running `$TOOL --version' or `$TOOL --help' to check whether
- # $TOOL exists and not knowing $TOOL uses missing.
- exit 1
- fi
- ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
- aclocal*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acinclude.m4' or \`${configure_ac}'. You might want
- to install the \`Automake' and \`Perl' packages. Grab them from
- any GNU archive site."
- touch aclocal.m4
- ;;
-
- autoconf*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`${configure_ac}'. You might want to install the
- \`Autoconf' and \`GNU m4' packages. Grab them from any GNU
- archive site."
- touch configure
- ;;
-
- autoheader*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`acconfig.h' or \`${configure_ac}'. You might want
- to install the \`Autoconf' and \`GNU m4' packages. Grab them
- from any GNU archive site."
- files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
- test -z "$files" && files="config.h"
- touch_files=
- for f in $files; do
- case $f in
- *:*) touch_files="$touch_files "`echo "$f" |
- sed -e 's/^[^:]*://' -e 's/:.*//'`;;
- *) touch_files="$touch_files $f.in";;
- esac
- done
- touch $touch_files
- ;;
-
- automake*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
- You might want to install the \`Automake' and \`Perl' packages.
- Grab them from any GNU archive site."
- find . -type f -name Makefile.am -print |
- sed 's/\.am$/.in/' |
- while read f; do touch "$f"; done
- ;;
-
- autom4te*)
- echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
- You might have modified some files without having the
- proper tools for further handling them.
- You can get \`$1' as part of \`Autoconf' from any GNU
- archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo "#! /bin/sh"
- echo "# Created by GNU Automake missing as a replacement of"
- echo "# $ $@"
- echo "exit 0"
- chmod +x $file
- exit 1
- fi
- ;;
-
- bison*|yacc*)
- echo 1>&2 "\
-WARNING: \`$1' $msg. You should only need it if
- you modified a \`.y' file. You may need the \`Bison' package
- in order for those modifications to take effect. You can get
- \`Bison' from any GNU archive site."
- rm -f y.tab.c y.tab.h
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.y)
- SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.c
- fi
- SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" y.tab.h
- fi
- ;;
- esac
- fi
- if test ! -f y.tab.h; then
- echo >y.tab.h
- fi
- if test ! -f y.tab.c; then
- echo 'main() { return 0; }' >y.tab.c
- fi
- ;;
-
- lex*|flex*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.l' file. You may need the \`Flex' package
- in order for those modifications to take effect. You can get
- \`Flex' from any GNU archive site."
- rm -f lex.yy.c
- if test $# -ne 1; then
- eval LASTARG="\${$#}"
- case $LASTARG in
- *.l)
- SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
- if test -f "$SRCFILE"; then
- cp "$SRCFILE" lex.yy.c
- fi
- ;;
- esac
- fi
- if test ! -f lex.yy.c; then
- echo 'main() { return 0; }' >lex.yy.c
- fi
- ;;
-
- help2man*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a dependency of a manual page. You may need the
- \`Help2man' package in order for those modifications to take
- effect. You can get \`Help2man' from any GNU archive site."
-
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -f "$file"; then
- touch $file
- else
- test -z "$file" || exec >$file
- echo ".ab help2man is required to generate this page"
- exit $?
- fi
- ;;
-
- makeinfo*)
- echo 1>&2 "\
-WARNING: \`$1' is $msg. You should only need it if
- you modified a \`.texi' or \`.texinfo' file, or any other file
- indirectly affecting the aspect of the manual. The spurious
- call might also be the consequence of using a buggy \`make' (AIX,
- DU, IRIX). You might want to install the \`Texinfo' package or
- the \`GNU make' package. Grab either from any GNU archive site."
- # The file to touch is that specified with -o ...
- file=`echo "$*" | sed -n "$sed_output"`
- test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
- if test -z "$file"; then
- # ... or it is the one specified with @setfilename ...
- infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
- file=`sed -n '
- /^@setfilename/{
- s/.* \([^ ]*\) *$/\1/
- p
- q
- }' $infile`
- # ... or it is derived from the source name (dir/f.texi becomes f.info)
- test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
- fi
- # If the file does not exist, the user really needs makeinfo;
- # let's fail without touching anything.
- test -f $file || exit 1
- touch $file
- ;;
-
- tar*)
- shift
-
- # We have already tried tar in the generic part.
- # Look for gnutar/gtar before invocation to avoid ugly error
- # messages.
- if (gnutar --version > /dev/null 2>&1); then
- gnutar "$@" && exit 0
- fi
- if (gtar --version > /dev/null 2>&1); then
- gtar "$@" && exit 0
- fi
- firstarg="$1"
- if shift; then
- case $firstarg in
- *o*)
- firstarg=`echo "$firstarg" | sed s/o//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- case $firstarg in
- *h*)
- firstarg=`echo "$firstarg" | sed s/h//`
- tar "$firstarg" "$@" && exit 0
- ;;
- esac
- fi
-
- echo 1>&2 "\
-WARNING: I can't seem to be able to run \`tar' with the given arguments.
- You may want to install GNU tar or Free paxutils, or check the
- command line arguments."
- exit 1
- ;;
-
- *)
- echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
- You might have modified some files without having the
- proper tools for further handling them. Check the \`README' file,
- it often tells you about the needed prerequisites for installing
- this package. You may also peek at any GNU archive site, in case
- some other package would contain this missing \`$1' program."
- exit 1
- ;;
-esac
-
-exit 0
-
-# Local variables:
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/src/3rdparty/libpng/mkinstalldirs b/src/3rdparty/libpng/mkinstalldirs
deleted file mode 100755
index 4191a45..0000000
--- a/src/3rdparty/libpng/mkinstalldirs
+++ /dev/null
@@ -1,162 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-
-scriptversion=2009-04-28.21; # UTC
-
-# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain.
-#
-# This file is maintained in Automake, please report
-# bugs to <bug-automake@gnu.org> or send patches to
-# <automake-patches@gnu.org>.
-
-nl='
-'
-IFS=" "" $nl"
-errstatus=0
-dirmode=
-
-usage="\
-Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
-
-Create each directory DIR (with mode MODE, if specified), including all
-leading file name components.
-
-Report bugs to <bug-automake@gnu.org>."
-
-# process command line arguments
-while test $# -gt 0 ; do
- case $1 in
- -h | --help | --h*) # -h for help
- echo "$usage"
- exit $?
- ;;
- -m) # -m PERM arg
- shift
- test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
- dirmode=$1
- shift
- ;;
- --version)
- echo "$0 $scriptversion"
- exit $?
- ;;
- --) # stop option processing
- shift
- break
- ;;
- -*) # unknown option
- echo "$usage" 1>&2
- exit 1
- ;;
- *) # first non-opt arg
- break
- ;;
- esac
-done
-
-for file
-do
- if test -d "$file"; then
- shift
- else
- break
- fi
-done
-
-case $# in
- 0) exit 0 ;;
-esac
-
-# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
-# mkdir -p a/c at the same time, both will detect that a is missing,
-# one will create a, then the other will try to create a and die with
-# a "File exists" error. This is a problem when calling mkinstalldirs
-# from a parallel make. We use --version in the probe to restrict
-# ourselves to GNU mkdir, which is thread-safe.
-case $dirmode in
- '')
- if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
- echo "mkdir -p -- $*"
- exec mkdir -p -- "$@"
- else
- # On NextStep and OpenStep, the `mkdir' command does not
- # recognize any option. It will interpret all options as
- # directories to create, and then abort because `.' already
- # exists.
- test -d ./-p && rmdir ./-p
- test -d ./--version && rmdir ./--version
- fi
- ;;
- *)
- if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
- test ! -d ./--version; then
- echo "mkdir -m $dirmode -p -- $*"
- exec mkdir -m "$dirmode" -p -- "$@"
- else
- # Clean up after NextStep and OpenStep mkdir.
- for d in ./-m ./-p ./--version "./$dirmode";
- do
- test -d $d && rmdir $d
- done
- fi
- ;;
-esac
-
-for file
-do
- case $file in
- /*) pathcomp=/ ;;
- *) pathcomp= ;;
- esac
- oIFS=$IFS
- IFS=/
- set fnord $file
- shift
- IFS=$oIFS
-
- for d
- do
- test "x$d" = x && continue
-
- pathcomp=$pathcomp$d
- case $pathcomp in
- -*) pathcomp=./$pathcomp ;;
- esac
-
- if test ! -d "$pathcomp"; then
- echo "mkdir $pathcomp"
-
- mkdir "$pathcomp" || lasterr=$?
-
- if test ! -d "$pathcomp"; then
- errstatus=$lasterr
- else
- if test ! -z "$dirmode"; then
- echo "chmod $dirmode $pathcomp"
- lasterr=
- chmod "$dirmode" "$pathcomp" || lasterr=$?
-
- if test ! -z "$lasterr"; then
- errstatus=$lasterr
- fi
- fi
- fi
- fi
-
- pathcomp=$pathcomp/
- done
-done
-
-exit $errstatus
-
-# Local Variables:
-# mode: shell-script
-# sh-indentation: 2
-# eval: (add-hook 'write-file-hooks 'time-stamp)
-# time-stamp-start: "scriptversion="
-# time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
-# time-stamp-end: "; # UTC"
-# End:
diff --git a/src/3rdparty/libpng/png.5 b/src/3rdparty/libpng/png.5
index 6f904a9..9c5f8d3 100644
--- a/src/3rdparty/libpng/png.5
+++ b/src/3rdparty/libpng/png.5
@@ -1,4 +1,4 @@
-.TH PNG 5 "January 3, 2010"
+.TH PNG 5 "February 3, 2011"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
@@ -18,7 +18,7 @@ gamma and chromaticity data for improved color matching on heterogeneous
platforms.
.SH "SEE ALSO"
-.IR libpng(3), zlib(3), deflate(5), and zlib(5)
+.BR "libpng"(3), " libpngpf"(3), " zlib"(3), " deflate"(5), " " and " zlib"(5)
.LP
PNG specification (second edition), November 2003:
.IP
diff --git a/src/3rdparty/libpng/png.c b/src/3rdparty/libpng/png.c
index a845a47..764f47c 100644
--- a/src/3rdparty/libpng/png.c
+++ b/src/3rdparty/libpng/png.c
@@ -1,8 +1,8 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,17 +11,10 @@
* and license in png.h
*/
-#define PNG_NO_EXTERN
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_4_0 Your_png_h_is_not_version_1_4_0;
-
-/* Version information for C files. This had better match the version
- * string defined in png.h.
- */
+typedef png_libpng_version_1_5_1 Your_png_h_is_not_version_1_5_1;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -53,11 +46,13 @@ png_set_sig_bytes(png_structp png_ptr, int num_bytes)
* PNG signature (this is the same behaviour as strcmp, memcmp, etc).
*/
int PNGAPI
-png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
+png_sig_cmp(png_const_bytep sig, png_size_t start, png_size_t num_to_check)
{
png_byte png_signature[8] = {137, 80, 78, 71, 13, 10, 26, 10};
+
if (num_to_check > 8)
num_to_check = 8;
+
else if (num_to_check < 1)
return (-1);
@@ -73,9 +68,9 @@ png_sig_cmp(png_bytep sig, png_size_t start, png_size_t num_to_check)
#endif /* PNG_READ_SUPPORTED */
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
-/* Function to allocate memory for zlib and clear it to 0. */
-voidpf /* PRIVATE */
-png_zalloc(voidpf png_ptr, uInt items, uInt size)
+/* Function to allocate memory for zlib */
+PNG_FUNCTION(voidpf /* PRIVATE */,
+png_zalloc,(voidpf png_ptr, uInt items, uInt size),PNG_ALLOCATED)
{
png_voidp ptr;
png_structp p=(png_structp)png_ptr;
@@ -84,6 +79,7 @@ png_zalloc(voidpf png_ptr, uInt items, uInt size)
if (png_ptr == NULL)
return (NULL);
+
if (items > PNG_UINT_32_MAX/size)
{
png_warning (p, "Potential overflow in png_zalloc()");
@@ -120,7 +116,7 @@ png_reset_crc(png_structp png_ptr)
* trouble of calculating it.
*/
void /* PRIVATE */
-png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length)
+png_calculate_crc(png_structp png_ptr, png_const_bytep ptr, png_size_t length)
{
int need_crc = 1;
@@ -130,6 +126,7 @@ png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length)
(PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN))
need_crc = 0;
}
+
else /* critical */
{
if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE)
@@ -146,8 +143,8 @@ png_calculate_crc(png_structp png_ptr, png_bytep ptr, png_size_t length)
* and png_info_init() so that applications that want to use a shared
* libpng don't have to be recompiled if png_info changes size.
*/
-png_infop PNGAPI
-png_create_info_struct(png_structp png_ptr)
+PNG_FUNCTION(png_infop,PNGAPI
+png_create_info_struct,(png_structp png_ptr),PNG_ALLOCATED)
{
png_infop info_ptr;
@@ -237,8 +234,10 @@ png_data_freer(png_structp png_ptr, png_infop info_ptr,
if (freer == PNG_DESTROY_WILL_FREE_DATA)
info_ptr->free_me |= mask;
+
else if (freer == PNG_USER_WILL_FREE_DATA)
info_ptr->free_me &= ~mask;
+
else
png_warning(png_ptr,
"Unknown freer parameter in png_data_freer");
@@ -265,6 +264,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
info_ptr->text[num].key = NULL;
}
}
+
else
{
int i;
@@ -350,6 +350,7 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
info_ptr->splt_palettes[num].entries = NULL;
}
}
+
else
{
if (info_ptr->splt_palettes_num)
@@ -384,13 +385,14 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
info_ptr->unknown_chunks[num].data = NULL;
}
}
+
else
{
int i;
if (info_ptr->unknown_chunks_num)
{
- for (i = 0; i < (int)info_ptr->unknown_chunks_num; i++)
+ for (i = 0; i < info_ptr->unknown_chunks_num; i++)
png_free_data(png_ptr, info_ptr, PNG_FREE_UNKN, i);
png_free(png_ptr, info_ptr->unknown_chunks);
@@ -439,10 +441,10 @@ png_free_data(png_structp png_ptr, png_infop info_ptr, png_uint_32 mask,
}
#endif
- if (num == -1)
- info_ptr->free_me &= ~mask;
- else
- info_ptr->free_me &= ~(mask & ~PNG_FREE_MUL);
+ if (num != -1)
+ mask &= ~PNG_FREE_MUL;
+
+ info_ptr->free_me &= ~mask;
}
/* This is an internal routine to free any memory that the info struct is
@@ -478,11 +480,12 @@ png_get_io_ptr(png_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
+
return (png_ptr->io_ptr);
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
-#ifdef PNG_STDIO_SUPPORTED
+# ifdef PNG_STDIO_SUPPORTED
/* Initialize the default input/output functions for the PNG file. If you
* use your own read or write routines, you can call either png_set_read_fn()
* or png_set_write_fn() instead of png_init_io(). If you have defined
@@ -499,14 +502,14 @@ png_init_io(png_structp png_ptr, png_FILE_p fp)
png_ptr->io_ptr = (png_voidp)fp;
}
-#endif
+# endif
-#ifdef PNG_TIME_RFC1123_SUPPORTED
+# ifdef PNG_TIME_RFC1123_SUPPORTED
/* Convert the supplied time into an RFC 1123 string suitable for use in
* a "Creation Time" or other text-based time string.
*/
-png_charp PNGAPI
-png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
+png_const_charp PNGAPI
+png_convert_to_rfc1123(png_structp png_ptr, png_const_timep ptime)
{
static PNG_CONST char short_months[12][4] =
{"Jan", "Feb", "Mar", "Apr", "May", "Jun",
@@ -514,13 +517,14 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
if (png_ptr == NULL)
return (NULL);
+
if (png_ptr->time_buffer == NULL)
{
png_ptr->time_buffer = (png_charp)png_malloc(png_ptr, (png_uint_32)(29*
png_sizeof(char)));
}
-#ifdef USE_FAR_KEYWORD
+# ifdef USE_FAR_KEYWORD
{
char near_time_buf[29];
png_snprintf6(near_time_buf, 29, "%d %s %d %02d:%02d:%02d +0000",
@@ -530,38 +534,38 @@ png_convert_to_rfc1123(png_structp png_ptr, png_timep ptime)
png_memcpy(png_ptr->time_buffer, near_time_buf,
29*png_sizeof(char));
}
-#else
+# else
png_snprintf6(png_ptr->time_buffer, 29, "%d %s %d %02d:%02d:%02d +0000",
ptime->day % 32, short_months[(ptime->month - 1) % 12],
ptime->year, ptime->hour % 24, ptime->minute % 60,
ptime->second % 61);
-#endif
- return ((png_charp)png_ptr->time_buffer);
+# endif
+ return png_ptr->time_buffer;
}
-#endif /* PNG_TIME_RFC1123_SUPPORTED */
+# endif /* PNG_TIME_RFC1123_SUPPORTED */
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
-png_charp PNGAPI
-png_get_copyright(png_structp png_ptr)
+png_const_charp PNGAPI
+png_get_copyright(png_const_structp png_ptr)
{
- png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
+ PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
#ifdef PNG_STRING_COPYRIGHT
- return PNG_STRING_COPYRIGHT
+ return PNG_STRING_COPYRIGHT
#else
-#ifdef __STDC__
- return ((png_charp) PNG_STRING_NEWLINE \
- "libpng version 1.4.0 - January 3, 2010" PNG_STRING_NEWLINE \
- "Copyright (c) 1998-2010 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
+# ifdef __STDC__
+ return PNG_STRING_NEWLINE \
+ "libpng version 1.5.1 - February 3, 2011" PNG_STRING_NEWLINE \
+ "Copyright (c) 1998-2011 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
- PNG_STRING_NEWLINE);
-#else
- return ((png_charp) "libpng version 1.4.0 - January 3, 2010\
- Copyright (c) 1998-2010 Glenn Randers-Pehrson\
+ PNG_STRING_NEWLINE;
+# else
+ return "libpng version 1.5.1 - February 3, 2011\
+ Copyright (c) 1998-2011 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
- Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.");
-#endif
+ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
+# endif
#endif
}
@@ -573,78 +577,81 @@ png_get_copyright(png_structp png_ptr)
* png_get_header_ver(). Due to the version_nn_nn_nn typedef guard,
* it is guaranteed that png.c uses the correct version of png.h.
*/
-png_charp PNGAPI
-png_get_libpng_ver(png_structp png_ptr)
+png_const_charp PNGAPI
+png_get_libpng_ver(png_const_structp png_ptr)
{
/* Version of *.c files used when building libpng */
- png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
- return ((png_charp) PNG_LIBPNG_VER_STRING);
+ return png_get_header_ver(png_ptr);
}
-png_charp PNGAPI
-png_get_header_ver(png_structp png_ptr)
+png_const_charp PNGAPI
+png_get_header_ver(png_const_structp png_ptr)
{
/* Version of *.h files used when building libpng */
- png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
- return ((png_charp) PNG_LIBPNG_VER_STRING);
+ PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
+ return PNG_LIBPNG_VER_STRING;
}
-png_charp PNGAPI
-png_get_header_version(png_structp png_ptr)
+png_const_charp PNGAPI
+png_get_header_version(png_const_structp png_ptr)
{
/* Returns longer string containing both version and date */
- png_ptr = png_ptr; /* Silence compiler warning about unused png_ptr */
+ PNG_UNUSED(png_ptr) /* Silence compiler warning about unused png_ptr */
#ifdef __STDC__
- return ((png_charp) PNG_HEADER_VERSION_STRING
-#ifndef PNG_READ_SUPPORTED
+ return PNG_HEADER_VERSION_STRING
+# ifndef PNG_READ_SUPPORTED
" (NO READ SUPPORT)"
-#endif
- PNG_STRING_NEWLINE);
+# endif
+ PNG_STRING_NEWLINE;
#else
- return ((png_charp) PNG_HEADER_VERSION_STRING);
+ return PNG_HEADER_VERSION_STRING;
#endif
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+# ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
int PNGAPI
-png_handle_as_unknown(png_structp png_ptr, png_bytep chunk_name)
+png_handle_as_unknown(png_structp png_ptr, png_const_bytep chunk_name)
{
/* Check chunk_name and return "keep" value if it's on the list, else 0 */
int i;
png_bytep p;
if (png_ptr == NULL || chunk_name == NULL || png_ptr->num_chunk_list<=0)
return 0;
+
p = png_ptr->chunk_list + png_ptr->num_chunk_list*5 - 5;
for (i = png_ptr->num_chunk_list; i; i--, p -= 5)
if (!png_memcmp(chunk_name, p, 4))
return ((int)*(p + 4));
return 0;
}
-#endif
+# endif
+#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
+#ifdef PNG_READ_SUPPORTED
/* This function, added to libpng-1.0.6g, is untested. */
int PNGAPI
png_reset_zstream(png_structp png_ptr)
{
if (png_ptr == NULL)
return Z_STREAM_ERROR;
+
return (inflateReset(&png_ptr->zstream));
}
-#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
+#endif /* PNG_READ_SUPPORTED */
/* This function was added to libpng-1.0.7 */
png_uint_32 PNGAPI
png_access_version_number(void)
{
/* Version of *.c files used when building libpng */
- return((png_uint_32) PNG_LIBPNG_VER);
+ return((png_uint_32)PNG_LIBPNG_VER);
}
#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
-#ifdef PNG_SIZE_T
+# ifdef PNG_SIZE_T
/* Added at libpng version 1.2.6 */
PNG_EXTERN png_size_t PNGAPI png_convert_size PNGARG((size_t size));
png_size_t PNGAPI
@@ -652,53 +659,13 @@ png_convert_size(size_t size)
{
if (size > (png_size_t)-1)
PNG_ABORT(); /* We haven't got access to png_ptr, so no png_error() */
+
return ((png_size_t)size);
}
-#endif /* PNG_SIZE_T */
+# endif /* PNG_SIZE_T */
/* Added at libpng version 1.2.34 and 1.4.0 (moved from pngset.c) */
-#ifdef PNG_cHRM_SUPPORTED
-#ifdef PNG_CHECK_cHRM_SUPPORTED
-
-/*
- * Multiply two 32-bit numbers, V1 and V2, using 32-bit
- * arithmetic, to produce a 64 bit result in the HI/LO words.
- *
- * A B
- * x C D
- * ------
- * AD || BD
- * AC || CB || 0
- *
- * where A and B are the high and low 16-bit words of V1,
- * C and D are the 16-bit words of V2, AD is the product of
- * A and D, and X || Y is (X << 16) + Y.
-*/
-
-void /* PRIVATE */
-png_64bit_product (long v1, long v2, unsigned long *hi_product,
- unsigned long *lo_product)
-{
- int a, b, c, d;
- long lo, hi, x, y;
-
- a = (v1 >> 16) & 0xffff;
- b = v1 & 0xffff;
- c = (v2 >> 16) & 0xffff;
- d = v2 & 0xffff;
-
- lo = b * d; /* BD */
- x = a * d + c * b; /* AD + CB */
- y = ((lo >> 16) & 0xffff) + x;
-
- lo = (lo & 0xffff) | ((y & 0xffff) << 16);
- hi = (y >> 16) & 0xffff;
-
- hi += a * c; /* AC */
-
- *hi_product = (unsigned long)hi;
- *lo_product = (unsigned long)lo;
-}
+# ifdef PNG_CHECK_cHRM_SUPPORTED
int /* PRIVATE */
png_check_cHRM_fixed(png_structp png_ptr,
@@ -723,14 +690,14 @@ png_check_cHRM_fixed(png_structp png_ptr,
"Ignoring attempt to set negative chromaticity value");
ret = 0;
}
- if (white_x > (png_fixed_point) PNG_UINT_31_MAX ||
- white_y > (png_fixed_point) PNG_UINT_31_MAX ||
- red_x > (png_fixed_point) PNG_UINT_31_MAX ||
- red_y > (png_fixed_point) PNG_UINT_31_MAX ||
- green_x > (png_fixed_point) PNG_UINT_31_MAX ||
- green_y > (png_fixed_point) PNG_UINT_31_MAX ||
- blue_x > (png_fixed_point) PNG_UINT_31_MAX ||
- blue_y > (png_fixed_point) PNG_UINT_31_MAX )
+ if (white_x > (png_fixed_point)PNG_UINT_31_MAX ||
+ white_y > (png_fixed_point)PNG_UINT_31_MAX ||
+ red_x > (png_fixed_point)PNG_UINT_31_MAX ||
+ red_y > (png_fixed_point)PNG_UINT_31_MAX ||
+ green_x > (png_fixed_point)PNG_UINT_31_MAX ||
+ green_y > (png_fixed_point)PNG_UINT_31_MAX ||
+ blue_x > (png_fixed_point)PNG_UINT_31_MAX ||
+ blue_y > (png_fixed_point)PNG_UINT_31_MAX )
{
png_warning(png_ptr,
"Ignoring attempt to set chromaticity value exceeding 21474.83");
@@ -741,16 +708,19 @@ png_check_cHRM_fixed(png_structp png_ptr,
png_warning(png_ptr, "Invalid cHRM white point");
ret = 0;
}
+
if (red_x > 100000L - red_y)
{
png_warning(png_ptr, "Invalid cHRM red point");
ret = 0;
}
+
if (green_x > 100000L - green_y)
{
png_warning(png_ptr, "Invalid cHRM green point");
ret = 0;
}
+
if (blue_x > 100000L - blue_y)
{
png_warning(png_ptr, "Invalid cHRM blue point");
@@ -769,8 +739,7 @@ png_check_cHRM_fixed(png_structp png_ptr,
return ret;
}
-#endif /* PNG_CHECK_cHRM_SUPPORTED */
-#endif /* PNG_cHRM_SUPPORTED */
+# endif /* PNG_CHECK_cHRM_SUPPORTED */
void /* PRIVATE */
png_check_IHDR(png_structp png_ptr,
@@ -793,21 +762,22 @@ png_check_IHDR(png_structp png_ptr,
error = 1;
}
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+# ifdef PNG_SET_USER_LIMITS_SUPPORTED
if (width > png_ptr->user_width_max || width > PNG_USER_WIDTH_MAX)
-#else
+
+# else
if (width > PNG_USER_WIDTH_MAX)
-#endif
+# endif
{
png_warning(png_ptr, "Image width exceeds user limit in IHDR");
error = 1;
}
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+# ifdef PNG_SET_USER_LIMITS_SUPPORTED
if (height > png_ptr->user_height_max || height > PNG_USER_HEIGHT_MAX)
-#else
+# else
if (height > PNG_USER_HEIGHT_MAX)
-#endif
+# endif
{
png_warning(png_ptr, "Image height exceeds user limit in IHDR");
error = 1;
@@ -819,15 +789,15 @@ png_check_IHDR(png_structp png_ptr,
error = 1;
}
- if ( height > PNG_UINT_31_MAX)
+ if (height > PNG_UINT_31_MAX)
{
png_warning(png_ptr, "Invalid image height in IHDR");
error = 1;
}
- if ( width > (PNG_UINT_32_MAX
+ if (width > (PNG_UINT_32_MAX
>> 3) /* 8-byte RGBA pixels */
- - 64 /* bigrowbuf hack */
+ - 48 /* bigrowbuf hack */
- 1 /* filter byte */
- 7*8 /* rounding of width to multiple of 8 pixels */
- 8) /* extra max_pixel_depth pad */
@@ -869,7 +839,7 @@ png_check_IHDR(png_structp png_ptr,
error = 1;
}
-#ifdef PNG_MNG_FEATURES_SUPPORTED
+# ifdef PNG_MNG_FEATURES_SUPPORTED
/* Accept filter_method 64 (intrapixel differencing) only if
* 1. Libpng was compiled with PNG_MNG_FEATURES_SUPPORTED and
* 2. Libpng did not read a PNG signature (this filter_method is only
@@ -886,10 +856,10 @@ png_check_IHDR(png_structp png_ptr,
if (filter_type != PNG_FILTER_TYPE_BASE)
{
if (!((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
- (filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&
- ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) &&
- (color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
+ (filter_type == PNG_INTRAPIXEL_DIFFERENCING) &&
+ ((png_ptr->mode & PNG_HAVE_PNG_SIGNATURE) == 0) &&
+ (color_type == PNG_COLOR_TYPE_RGB ||
+ color_type == PNG_COLOR_TYPE_RGB_ALPHA)))
{
png_warning(png_ptr, "Unknown filter method in IHDR");
error = 1;
@@ -902,15 +872,1491 @@ png_check_IHDR(png_structp png_ptr,
}
}
-#else
+# else
if (filter_type != PNG_FILTER_TYPE_BASE)
{
png_warning(png_ptr, "Unknown filter method in IHDR");
error = 1;
}
-#endif
+# endif
if (error == 1)
png_error(png_ptr, "Invalid IHDR data");
}
+
+#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED)
+/* ASCII to fp functions */
+/* Check an ASCII formated floating point value, see the more detailed
+ * comments in pngpriv.h
+ */
+/* The following is used internally to preserve the 'valid' flag */
+#define png_fp_add(state, flags) ((state) |= (flags))
+#define png_fp_set(state, value)\
+ ((state) = (value) | ((state) & PNG_FP_WAS_VALID))
+
+/* Internal type codes: bits above the base state! */
+#define PNG_FP_SIGN 0 /* [+-] */
+#define PNG_FP_DOT 4 /* . */
+#define PNG_FP_DIGIT 8 /* [0123456789] */
+#define PNG_FP_E 12 /* [Ee] */
+
+int /* PRIVATE */
+png_check_fp_number(png_const_charp string, png_size_t size, int *statep,
+ png_size_tp whereami)
+{
+ int state = *statep;
+ png_size_t i = *whereami;
+
+ while (i < size)
+ {
+ int type;
+ /* First find the type of the next character */
+ {
+ char ch = string[i];
+
+ if (ch >= 48 && ch <= 57)
+ type = PNG_FP_DIGIT;
+
+ else switch (ch)
+ {
+ case 43: case 45: type = PNG_FP_SIGN; break;
+ case 46: type = PNG_FP_DOT; break;
+ case 69: case 101: type = PNG_FP_E; break;
+ default: goto PNG_FP_End;
+ }
+ }
+
+ /* Now deal with this type according to the current
+ * state, the type is arranged to not overlap the
+ * bits of the PNG_FP_STATE.
+ */
+ switch ((state & PNG_FP_STATE) + type)
+ {
+ case PNG_FP_INTEGER + PNG_FP_SIGN:
+ if (state & PNG_FP_SAW_ANY)
+ goto PNG_FP_End; /* not a part of the number */
+
+ png_fp_add(state, PNG_FP_SAW_SIGN);
+ break;
+
+ case PNG_FP_INTEGER + PNG_FP_DOT:
+ /* Ok as trailer, ok as lead of fraction. */
+ if (state & PNG_FP_SAW_DOT) /* two dots */
+ goto PNG_FP_End;
+
+ else if (state & PNG_FP_SAW_DIGIT) /* trailing dot? */
+ png_fp_add(state, PNG_FP_SAW_DOT);
+
+ else
+ png_fp_set(state, PNG_FP_FRACTION | PNG_FP_SAW_DOT);
+
+ break;
+
+ case PNG_FP_INTEGER + PNG_FP_DIGIT:
+ if (state & PNG_FP_SAW_DOT) /* delayed fraction */
+ png_fp_set(state, PNG_FP_FRACTION | PNG_FP_SAW_DOT);
+
+ png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID);
+
+ break;
+ case PNG_FP_INTEGER + PNG_FP_E:
+ if ((state & PNG_FP_SAW_DIGIT) == 0)
+ goto PNG_FP_End;
+
+ png_fp_set(state, PNG_FP_EXPONENT);
+
+ break;
+
+ /* case PNG_FP_FRACTION + PNG_FP_SIGN:
+ goto PNG_FP_End; ** no sign in exponent */
+
+ /* case PNG_FP_FRACTION + PNG_FP_DOT:
+ goto PNG_FP_End; ** Because SAW_DOT is always set */
+
+ case PNG_FP_FRACTION + PNG_FP_DIGIT:
+ png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID);
+ break;
+
+ case PNG_FP_FRACTION + PNG_FP_E:
+ /* This is correct because the trailing '.' on an
+ * integer is handled above - so we can only get here
+ * with the sequence ".E" (with no preceding digits).
+ */
+ if ((state & PNG_FP_SAW_DIGIT) == 0)
+ goto PNG_FP_End;
+
+ png_fp_set(state, PNG_FP_EXPONENT);
+
+ break;
+
+ case PNG_FP_EXPONENT + PNG_FP_SIGN:
+ if (state & PNG_FP_SAW_ANY)
+ goto PNG_FP_End; /* not a part of the number */
+
+ png_fp_add(state, PNG_FP_SAW_SIGN);
+
+ break;
+
+ /* case PNG_FP_EXPONENT + PNG_FP_DOT:
+ goto PNG_FP_End; */
+
+ case PNG_FP_EXPONENT + PNG_FP_DIGIT:
+ png_fp_add(state, PNG_FP_SAW_DIGIT + PNG_FP_WAS_VALID);
+
+ break;
+
+ /* case PNG_FP_EXPONEXT + PNG_FP_E:
+ goto PNG_FP_End; */
+
+ default: goto PNG_FP_End; /* I.e. break 2 */
+ }
+
+ /* The character seems ok, continue. */
+ ++i;
+ }
+
+PNG_FP_End:
+ /* Here at the end, update the state and return the correct
+ * return code.
+ */
+ *statep = state;
+ *whereami = i;
+
+ return (state & PNG_FP_SAW_DIGIT) != 0;
+}
+
+
+/* The same but for a complete string. */
+int
+png_check_fp_string(png_const_charp string, png_size_t size)
+{
+ int state=0;
+ png_size_t char_index=0;
+
+ return png_check_fp_number(string, size, &state, &char_index) &&
+ (char_index == size || string[char_index] == 0);
+}
+#endif /* pCAL or sCAL */
+
+#ifdef PNG_READ_sCAL_SUPPORTED
+# ifdef PNG_FLOATING_POINT_SUPPORTED
+/* Utility used below - a simple accurate power of ten from an integral
+ * exponent.
+ */
+static double
+png_pow10(int power)
+{
+ int recip = 0;
+ double d = 1;
+
+ /* Handle negative exponent with a reciprocal at the end because
+ * 10 is exact whereas .1 is inexact in base 2
+ */
+ if (power < 0)
+ {
+ if (power < DBL_MIN_10_EXP) return 0;
+ recip = 1, power = -power;
+ }
+
+ if (power > 0)
+ {
+ /* Decompose power bitwise. */
+ double mult = 10;
+ do
+ {
+ if (power & 1) d *= mult;
+ mult *= mult;
+ power >>= 1;
+ }
+ while (power > 0);
+
+ if (recip) d = 1/d;
+ }
+ /* else power is 0 and d is 1 */
+
+ return d;
+}
+
+/* Function to format a floating point value in ASCII with a given
+ * precision.
+ */
+void /* PRIVATE */
+png_ascii_from_fp(png_structp png_ptr, png_charp ascii, png_size_t size,
+ double fp, unsigned int precision)
+{
+ /* We use standard functions from math.h, but not printf because
+ * that would require stdio. The caller must supply a buffer of
+ * sufficient size or we will png_error. The tests on size and
+ * the space in ascii[] consumed are indicated below.
+ */
+ if (precision < 1)
+ precision = DBL_DIG;
+
+ /* Enforce the limit of the implementation precision too. */
+ if (precision > DBL_DIG+1)
+ precision = DBL_DIG+1;
+
+ /* Basic sanity checks */
+ if (size >= precision+5) /* See the requirements below. */
+ {
+ if (fp < 0)
+ {
+ fp = -fp;
+ *ascii++ = 45; /* '-' PLUS 1 TOTAL 1*/
+ --size;
+ }
+
+ if (fp >= DBL_MIN && fp <= DBL_MAX)
+ {
+ int exp_b10; /* A base 10 exponent */
+ double base; /* 10^exp_b10 */
+
+ /* First extract a base 10 exponent of the number,
+ * the calculation below rounds down when converting
+ * from base 2 to base 10 (multiply by log10(2) -
+ * 0.3010, but 77/256 is 0.3008, so exp_b10 needs to
+ * be increased. Note that the arithmetic shift
+ * performs a floor() unlike C arithmetic - using a
+ * C multiply would break the following for negative
+ * exponents.
+ */
+ (void)frexp(fp, &exp_b10); /* exponent to base 2 */
+
+ exp_b10 = (exp_b10 * 77) >> 8; /* <= exponent to base 10 */
+
+ /* Avoid underflow here. */
+ base = png_pow10(exp_b10); /* May underflow */
+
+ while (base < DBL_MIN || base < fp)
+ {
+ /* And this may overflow. */
+ double test = png_pow10(exp_b10+1);
+
+ if (test <= DBL_MAX)
+ ++exp_b10, base = test;
+
+ else
+ break;
+ }
+
+ /* Normalize fp and correct exp_b10, after this fp is in the
+ * range [.1,1) and exp_b10 is both the exponent and the digit
+ * *before* which the decimal point should be inserted
+ * (starting with 0 for the first digit). Note that this
+ * works even if 10^exp_b10 is out of range because of the
+ * test on DBL_MAX above.
+ */
+ fp /= base;
+ while (fp >= 1) fp /= 10, ++exp_b10;
+
+ /* Because of the code above fp may, at this point, be
+ * less than .1, this is ok because the code below can
+ * handle the leading zeros this generates, so no attempt
+ * is made to correct that here.
+ */
+
+ {
+ int czero, clead, cdigits;
+ char exponent[10];
+
+ /* Allow up to two leading zeros - this will not lengthen
+ * the number compared to using E-n.
+ */
+ if (exp_b10 < 0 && exp_b10 > -3) /* PLUS 3 TOTAL 4 */
+ {
+ czero = -exp_b10; /* PLUS 2 digits: TOTAL 3 */
+ exp_b10 = 0; /* Dot added below before first output. */
+ }
+ else
+ czero = 0; /* No zeros to add */
+
+ /* Generate the digit list, stripping trailing zeros and
+ * inserting a '.' before a digit if the exponent is 0.
+ */
+ clead = czero; /* Count of leading zeros */
+ cdigits = 0; /* Count of digits in list. */
+
+ do
+ {
+ double d;
+
+ fp *= 10;
+ /* Use modf here, not floor and subtract, so that
+ * the separation is done in one step. At the end
+ * of the loop don't break the number into parts so
+ * that the final digit is rounded.
+ */
+ if (cdigits+czero-clead+1 < (int)precision)
+ fp = modf(fp, &d);
+
+ else
+ {
+ d = floor(fp + .5);
+
+ if (d > 9)
+ {
+ /* Rounding up to 10, handle that here. */
+ if (czero > 0)
+ {
+ --czero, d = 1;
+ if (cdigits == 0) --clead;
+ }
+ else
+ {
+ while (cdigits > 0 && d > 9)
+ {
+ int ch = *--ascii;
+
+ if (exp_b10 != (-1))
+ ++exp_b10;
+
+ else if (ch == 46)
+ {
+ ch = *--ascii, ++size;
+ /* Advance exp_b10 to '1', so that the
+ * decimal point happens after the
+ * previous digit.
+ */
+ exp_b10 = 1;
+ }
+
+ --cdigits;
+ d = ch - 47; /* I.e. 1+(ch-48) */
+ }
+
+ /* Did we reach the beginning? If so adjust the
+ * exponent but take into account the leading
+ * decimal point.
+ */
+ if (d > 9) /* cdigits == 0 */
+ {
+ if (exp_b10 == (-1))
+ {
+ /* Leading decimal point (plus zeros?), if
+ * we lose the decimal point here it must
+ * be reentered below.
+ */
+ int ch = *--ascii;
+
+ if (ch == 46)
+ ++size, exp_b10 = 1;
+
+ /* Else lost a leading zero, so 'exp_b10' is
+ * still ok at (-1)
+ */
+ }
+ else
+ ++exp_b10;
+
+ /* In all cases we output a '1' */
+ d = 1;
+ }
+ }
+ }
+ fp = 0; /* Guarantees termination below. */
+ }
+
+ if (d == 0)
+ {
+ ++czero;
+ if (cdigits == 0) ++clead;
+ }
+ else
+ {
+ /* Included embedded zeros in the digit count. */
+ cdigits += czero - clead;
+ clead = 0;
+
+ while (czero > 0)
+ {
+ /* exp_b10 == (-1) means we just output the decimal
+ * place - after the DP don't adjust 'exp_b10' any
+ * more!
+ */
+ if (exp_b10 != (-1))
+ {
+ if (exp_b10 == 0) *ascii++ = 46, --size;
+ /* PLUS 1: TOTAL 4 */
+ --exp_b10;
+ }
+ *ascii++ = 48, --czero;
+ }
+
+ if (exp_b10 != (-1))
+ {
+ if (exp_b10 == 0) *ascii++ = 46, --size; /* counted
+ above */
+ --exp_b10;
+ }
+ *ascii++ = (char)(48 + (int)d), ++cdigits;
+ }
+ }
+ while (cdigits+czero-clead < (int)precision && fp > DBL_MIN);
+
+ /* The total output count (max) is now 4+precision */
+
+ /* Check for an exponent, if we don't need one we are
+ * done and just need to terminate the string. At
+ * this point exp_b10==(-1) is effectively if flag - it got
+ * to '-1' because of the decrement after outputing
+ * the decimal point above (the exponent required is
+ * *not* -1!)
+ */
+ if (exp_b10 >= (-1) && exp_b10 <= 2)
+ {
+ /* The following only happens if we didn't output the
+ * leading zeros above for negative exponent, so this
+ * doest add to the digit requirement. Note that the
+ * two zeros here can only be output if the two leading
+ * zeros were *not* output, so this doesn't increase
+ * the output count.
+ */
+ while (--exp_b10 >= 0) *ascii++ = 48;
+
+ *ascii = 0;
+
+ /* Total buffer requirement (including the '\0') is
+ * 5+precision - see check at the start.
+ */
+ return;
+ }
+
+ /* Here if an exponent is required, adjust size for
+ * the digits we output but did not count. The total
+ * digit output here so far is at most 1+precision - no
+ * decimal point and no leading or trailing zeros have
+ * been output.
+ */
+ size -= cdigits;
+
+ *ascii++ = 69, --size; /* 'E': PLUS 1 TOTAL 2+precision*/
+ if (exp_b10 < 0)
+ {
+ *ascii++ = 45, --size; /* '-': PLUS 1 TOTAL 3+precision */
+ exp_b10 = -exp_b10;
+ }
+
+ cdigits = 0;
+
+ while (exp_b10 > 0)
+ {
+ exponent[cdigits++] = (char)(48 + exp_b10 % 10);
+ exp_b10 /= 10;
+ }
+
+ /* Need another size check here for the exponent digits, so
+ * this need not be considered above.
+ */
+ if ((int)size > cdigits)
+ {
+ while (cdigits > 0) *ascii++ = exponent[--cdigits];
+
+ *ascii = 0;
+
+ return;
+ }
+ }
+ }
+ else if (!(fp >= DBL_MIN))
+ {
+ *ascii++ = 48; /* '0' */
+ *ascii = 0;
+ return;
+ }
+ else
+ {
+ *ascii++ = 105; /* 'i' */
+ *ascii++ = 110; /* 'n' */
+ *ascii++ = 102; /* 'f' */
+ *ascii = 0;
+ return;
+ }
+ }
+
+ /* Here on buffer too small. */
+ png_error(png_ptr, "ASCII conversion buffer too small");
+}
+
+# endif /* FLOATING_POINT */
+
+# ifdef PNG_FIXED_POINT_SUPPORTED
+/* Function to format a fixed point value in ASCII.
+ */
+void /* PRIVATE */
+png_ascii_from_fixed(png_structp png_ptr, png_charp ascii, png_size_t size,
+ png_fixed_point fp)
+{
+ /* Require space for 10 decimal digits, a decimal point, a minus sign and a
+ * trailing \0, 13 characters:
+ */
+ if (size > 12)
+ {
+ png_uint_32 num;
+
+ /* Avoid overflow here on the minimum integer. */
+ if (fp < 0)
+ *ascii++ = 45, --size, num = -fp;
+ else
+ num = fp;
+
+ if (num <= 0x80000000U) /* else overflowed */
+ {
+ unsigned int ndigits = 0, first = 16/*flag value*/;
+ char digits[10];
+
+ while (num)
+ {
+ /* Split the low digit off num: */
+ unsigned int tmp = num/10;
+ num -= tmp*10;
+ digits[ndigits++] = (char)(48 + num);
+ /* Record the first non-zero digit, note that this is a number
+ * starting at 1, it's not actually the array index.
+ */
+ if (first == 16 && num > 0)
+ first = ndigits;
+ num = tmp;
+ }
+
+ if (ndigits > 0)
+ {
+ while (ndigits > 5) *ascii++ = digits[--ndigits];
+ /* The remaining digits are fractional digits, ndigits is '5' or
+ * smaller at this point. It is certainly not zero. Check for a
+ * non-zero fractional digit:
+ */
+ if (first <= 5)
+ {
+ unsigned int i;
+ *ascii++ = 46; /* decimal point */
+ /* ndigits may be <5 for small numbers, output leading zeros
+ * then ndigits digits to first:
+ */
+ i = 5;
+ while (ndigits < i) *ascii++ = 48, --i;
+ while (ndigits >= first) *ascii++ = digits[--ndigits];
+ /* Don't output the trailing zeros! */
+ }
+ }
+ else
+ *ascii++ = 48;
+
+ /* And null terminate the string: */
+ *ascii = 0;
+ return;
+ }
+ }
+
+ /* Here on buffer too small. */
+ png_error(png_ptr, "ASCII conversion buffer too small");
+}
+# endif /* FIXED_POINT */
+#endif /* READ_SCAL */
+
+#if defined(PNG_FLOATING_POINT_SUPPORTED) && \
+ !defined(PNG_FIXED_POINT_MACRO_SUPPORTED)
+png_fixed_point
+png_fixed(png_structp png_ptr, double fp, png_const_charp text)
+{
+ double r = floor(100000 * fp + .5);
+
+ if (r > 2147483647. || r < -2147483648.)
+ png_fixed_error(png_ptr, text);
+
+ return (png_fixed_point)r;
+}
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || \
+ defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG__READ_pHYs_SUPPORTED)
+/* muldiv functions */
+/* This API takes signed arguments and rounds the result to the nearest
+ * integer (or, for a fixed point number - the standard argument - to
+ * the nearest .00001). Overflow and divide by zero are signalled in
+ * the result, a boolean - true on success, false on overflow.
+ */
+int
+png_muldiv(png_fixed_point_p res, png_fixed_point a, png_int_32 times,
+ png_int_32 divisor)
+{
+ /* Return a * times / divisor, rounded. */
+ if (divisor != 0)
+ {
+ if (a == 0 || times == 0)
+ {
+ *res = 0;
+ return 1;
+ }
+ else
+ {
+#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+ double r = a;
+ r *= times;
+ r /= divisor;
+ r = floor(r+.5);
+
+ /* A png_fixed_point is a 32 bit integer. */
+ if (r <= 2147483647. && r >= -2147483648.)
+ {
+ *res = (png_fixed_point)r;
+ return 1;
+ }
+#else
+ int negative = 0;
+ png_uint_32 A, T, D;
+ png_uint_32 s16, s32, s00;
+
+ if (a < 0)
+ negative = 1, A = -a;
+ else
+ A = a;
+
+ if (times < 0)
+ negative = !negative, T = -times;
+ else
+ T = times;
+
+ if (divisor < 0)
+ negative = !negative, D = -divisor;
+ else
+ D = divisor;
+
+ /* Following can't overflow because the arguments only
+ * have 31 bits each, however the result may be 32 bits.
+ */
+ s16 = (A >> 16) * (T & 0xffff) +
+ (A & 0xffff) * (T >> 16);
+ /* Can't overflow because the a*times bit is only 30
+ * bits at most.
+ */
+ s32 = (A >> 16) * (T >> 16) + (s16 >> 16);
+ s00 = (A & 0xffff) * (T & 0xffff);
+
+ s16 = (s16 & 0xffff) << 16;
+ s00 += s16;
+
+ if (s00 < s16)
+ ++s32; /* carry */
+
+ if (s32 < D) /* else overflow */
+ {
+ /* s32.s00 is now the 64 bit product, do a standard
+ * division, we know that s32 < D, so the maximum
+ * required shift is 31.
+ */
+ int bitshift = 32;
+ png_fixed_point result = 0; /* NOTE: signed */
+
+ while (--bitshift >= 0)
+ {
+ png_uint_32 d32, d00;
+
+ if (bitshift > 0)
+ d32 = D >> (32-bitshift), d00 = D << bitshift;
+
+ else
+ d32 = 0, d00 = D;
+
+ if (s32 > d32)
+ {
+ if (s00 < d00) --s32; /* carry */
+ s32 -= d32, s00 -= d00, result += 1<<bitshift;
+ }
+
+ else
+ if (s32 == d32 && s00 >= d00)
+ s32 = 0, s00 -= d00, result += 1<<bitshift;
+ }
+
+ /* Handle the rounding. */
+ if (s00 >= (D >> 1))
+ ++result;
+
+ if (negative)
+ result = -result;
+
+ /* Check for overflow. */
+ if ((negative && result <= 0) || (!negative && result >= 0))
+ {
+ *res = result;
+ return 1;
+ }
+ }
+#endif
+ }
+ }
+
+ return 0;
+}
+#endif /* READ_GAMMA || INCH_CONVERSIONS */
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED)
+/* The following is for when the caller doesn't much care about the
+ * result.
+ */
+png_fixed_point
+png_muldiv_warn(png_structp png_ptr, png_fixed_point a, png_int_32 times,
+ png_int_32 divisor)
+{
+ png_fixed_point result;
+
+ if (png_muldiv(&result, a, times, divisor))
+ return result;
+
+ png_warning(png_ptr, "fixed point overflow ignored");
+ return 0;
+}
+#endif
+
+#ifdef PNG_READ_GAMMA_SUPPORTED /* more fixed point functions for gammma */
+/* Calculate a reciprocal, return 0 on div-by-zero or overflow. */
+png_fixed_point
+png_reciprocal(png_fixed_point a)
+{
+#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+ double r = floor(1E10/a+.5);
+
+ if (r <= 2147483647. && r >= -2147483648.)
+ return (png_fixed_point)r;
+#else
+ png_fixed_point res;
+
+ if (png_muldiv(&res, 100000, 100000, a))
+ return res;
+#endif
+
+ return 0; /* error/overflow */
+}
+
+/* A local convenience routine. */
+static png_fixed_point
+png_product2(png_fixed_point a, png_fixed_point b)
+{
+ /* The required result is 1/a * 1/b; the following preserves accuracy. */
+#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+ double r = a * 1E-5;
+ r *= b;
+ r = floor(r+.5);
+
+ if (r <= 2147483647. && r >= -2147483648.)
+ return (png_fixed_point)r;
+#else
+ png_fixed_point res;
+
+ if (png_muldiv(&res, a, b, 100000))
+ return res;
+#endif
+
+ return 0; /* overflow */
+}
+
+/* The inverse of the above. */
+png_fixed_point
+png_reciprocal2(png_fixed_point a, png_fixed_point b)
+{
+ /* The required result is 1/a * 1/b; the following preserves accuracy. */
+#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+ double r = 1E15/a;
+ r /= b;
+ r = floor(r+.5);
+
+ if (r <= 2147483647. && r >= -2147483648.)
+ return (png_fixed_point)r;
+#else
+ /* This may overflow because the range of png_fixed_point isn't symmetric,
+ * but this API is only used for the product of file and screen gamma so it
+ * doesn't matter that the smallest number it can produce is 1/21474, not
+ * 1/100000
+ */
+ png_fixed_point res = png_product2(a, b);
+
+ if (res != 0)
+ return png_reciprocal(res);
+#endif
+
+ return 0; /* overflow */
+}
+#endif /* READ_GAMMA */
+
+#ifdef PNG_CHECK_cHRM_SUPPORTED
+/* Added at libpng version 1.2.34 (Dec 8, 2008) and 1.4.0 (Jan 2,
+ * 2010: moved from pngset.c) */
+/*
+ * Multiply two 32-bit numbers, V1 and V2, using 32-bit
+ * arithmetic, to produce a 64 bit result in the HI/LO words.
+ *
+ * A B
+ * x C D
+ * ------
+ * AD || BD
+ * AC || CB || 0
+ *
+ * where A and B are the high and low 16-bit words of V1,
+ * C and D are the 16-bit words of V2, AD is the product of
+ * A and D, and X || Y is (X << 16) + Y.
+*/
+
+void /* PRIVATE */
+png_64bit_product (long v1, long v2, unsigned long *hi_product,
+ unsigned long *lo_product)
+{
+ int a, b, c, d;
+ long lo, hi, x, y;
+
+ a = (v1 >> 16) & 0xffff;
+ b = v1 & 0xffff;
+ c = (v2 >> 16) & 0xffff;
+ d = v2 & 0xffff;
+
+ lo = b * d; /* BD */
+ x = a * d + c * b; /* AD + CB */
+ y = ((lo >> 16) & 0xffff) + x;
+
+ lo = (lo & 0xffff) | ((y & 0xffff) << 16);
+ hi = (y >> 16) & 0xffff;
+
+ hi += a * c; /* AC */
+
+ *hi_product = (unsigned long)hi;
+ *lo_product = (unsigned long)lo;
+}
+#endif /* CHECK_cHRM */
+
+#ifdef PNG_READ_GAMMA_SUPPORTED /* gamma table code */
+#ifndef PNG_FLOATING_ARITHMETIC_SUPPORTED
+/* Fixed point gamma.
+ *
+ * To calculate gamma this code implements fast log() and exp() calls using only
+ * fixed point arithmetic. This code has sufficient precision for either 8 or
+ * 16 bit sample values.
+ *
+ * The tables used here were calculated using simple 'bc' programs, but C double
+ * precision floating point arithmetic would work fine. The programs are given
+ * at the head of each table.
+ *
+ * 8 bit log table
+ * This is a table of -log(value/255)/log(2) for 'value' in the range 128 to
+ * 255, so it's the base 2 logarithm of a normalized 8 bit floating point
+ * mantissa. The numbers are 32 bit fractions.
+ */
+static png_uint_32
+png_8bit_l2[128] =
+{
+# if PNG_DO_BC
+ for (i=128;i<256;++i) { .5 - l(i/255)/l(2)*65536*65536; }
+# endif
+ 4270715492U, 4222494797U, 4174646467U, 4127164793U, 4080044201U, 4033279239U,
+ 3986864580U, 3940795015U, 3895065449U, 3849670902U, 3804606499U, 3759867474U,
+ 3715449162U, 3671346997U, 3627556511U, 3584073329U, 3540893168U, 3498011834U,
+ 3455425220U, 3413129301U, 3371120137U, 3329393864U, 3287946700U, 3246774933U,
+ 3205874930U, 3165243125U, 3124876025U, 3084770202U, 3044922296U, 3005329011U,
+ 2965987113U, 2926893432U, 2888044853U, 2849438323U, 2811070844U, 2772939474U,
+ 2735041326U, 2697373562U, 2659933400U, 2622718104U, 2585724991U, 2548951424U,
+ 2512394810U, 2476052606U, 2439922311U, 2404001468U, 2368287663U, 2332778523U,
+ 2297471715U, 2262364947U, 2227455964U, 2192742551U, 2158222529U, 2123893754U,
+ 2089754119U, 2055801552U, 2022034013U, 1988449497U, 1955046031U, 1921821672U,
+ 1888774511U, 1855902668U, 1823204291U, 1790677560U, 1758320682U, 1726131893U,
+ 1694109454U, 1662251657U, 1630556815U, 1599023271U, 1567649391U, 1536433567U,
+ 1505374214U, 1474469770U, 1443718700U, 1413119487U, 1382670639U, 1352370686U,
+ 1322218179U, 1292211689U, 1262349810U, 1232631153U, 1203054352U, 1173618059U,
+ 1144320946U, 1115161701U, 1086139034U, 1057251672U, 1028498358U, 999877854U,
+ 971388940U, 943030410U, 914801076U, 886699767U, 858725327U, 830876614U,
+ 803152505U, 775551890U, 748073672U, 720716771U, 693480120U, 666362667U,
+ 639363374U, 612481215U, 585715177U, 559064263U, 532527486U, 506103872U,
+ 479792461U, 453592303U, 427502463U, 401522014U, 375650043U, 349885648U,
+ 324227938U, 298676034U, 273229066U, 247886176U, 222646516U, 197509248U,
+ 172473545U, 147538590U, 122703574U, 97967701U, 73330182U, 48790236U,
+ 24347096U, 0U
+#if 0
+ /* The following are the values for 16 bit tables - these work fine for the 8
+ * bit conversions but produce very slightly larger errors in the 16 bit log
+ * (about 1.2 as opposed to 0.7 absolute error in the final value). To use
+ * these all the shifts below must be adjusted appropriately.
+ */
+ 65166, 64430, 63700, 62976, 62257, 61543, 60835, 60132, 59434, 58741, 58054,
+ 57371, 56693, 56020, 55352, 54689, 54030, 53375, 52726, 52080, 51439, 50803,
+ 50170, 49542, 48918, 48298, 47682, 47070, 46462, 45858, 45257, 44661, 44068,
+ 43479, 42894, 42312, 41733, 41159, 40587, 40020, 39455, 38894, 38336, 37782,
+ 37230, 36682, 36137, 35595, 35057, 34521, 33988, 33459, 32932, 32408, 31887,
+ 31369, 30854, 30341, 29832, 29325, 28820, 28319, 27820, 27324, 26830, 26339,
+ 25850, 25364, 24880, 24399, 23920, 23444, 22970, 22499, 22029, 21562, 21098,
+ 20636, 20175, 19718, 19262, 18808, 18357, 17908, 17461, 17016, 16573, 16132,
+ 15694, 15257, 14822, 14390, 13959, 13530, 13103, 12678, 12255, 11834, 11415,
+ 10997, 10582, 10168, 9756, 9346, 8937, 8531, 8126, 7723, 7321, 6921, 6523,
+ 6127, 5732, 5339, 4947, 4557, 4169, 3782, 3397, 3014, 2632, 2251, 1872, 1495,
+ 1119, 744, 372
+#endif
+};
+
+static png_int_32
+png_log8bit(unsigned int x)
+{
+ unsigned int lg2 = 0;
+ /* Each time 'x' is multiplied by 2, 1 must be subtracted off the final log,
+ * because the log is actually negate that means adding 1. The final
+ * returned value thus has the range 0 (for 255 input) to 7.994 (for 1
+ * input), return 7.99998 for the overflow (log 0) case - so the result is
+ * always at most 19 bits.
+ */
+ if ((x &= 0xff) == 0)
+ return 0xffffffff;
+
+ if ((x & 0xf0) == 0)
+ lg2 = 4, x <<= 4;
+
+ if ((x & 0xc0) == 0)
+ lg2 += 2, x <<= 2;
+
+ if ((x & 0x80) == 0)
+ lg2 += 1, x <<= 1;
+
+ /* result is at most 19 bits, so this cast is safe: */
+ return (png_int_32)((lg2 << 16) + ((png_8bit_l2[x-128]+32768)>>16));
+}
+
+/* The above gives exact (to 16 binary places) log2 values for 8 bit images,
+ * for 16 bit images we use the most significant 8 bits of the 16 bit value to
+ * get an approximation then multiply the approximation by a correction factor
+ * determined by the remaining up to 8 bits. This requires an additional step
+ * in the 16 bit case.
+ *
+ * We want log2(value/65535), we have log2(v'/255), where:
+ *
+ * value = v' * 256 + v''
+ * = v' * f
+ *
+ * So f is value/v', which is equal to (256+v''/v') since v' is in the range 128
+ * to 255 and v'' is in the range 0 to 255 f will be in the range 256 to less
+ * than 258. The final factor also needs to correct for the fact that our 8 bit
+ * value is scaled by 255, whereas the 16 bit values must be scaled by 65535.
+ *
+ * This gives a final formula using a calculated value 'x' which is value/v' and
+ * scaling by 65536 to match the above table:
+ *
+ * log2(x/257) * 65536
+ *
+ * Since these numbers are so close to '1' we can use simple linear
+ * interpolation between the two end values 256/257 (result -368.61) and 258/257
+ * (result 367.179). The values used below are scaled by a further 64 to give
+ * 16 bit precision in the interpolation:
+ *
+ * Start (256): -23591
+ * Zero (257): 0
+ * End (258): 23499
+ */
+static png_int_32
+png_log16bit(png_uint_32 x)
+{
+ unsigned int lg2 = 0;
+
+ /* As above, but now the input has 16 bits. */
+ if ((x &= 0xffff) == 0)
+ return 0xffffffff;
+
+ if ((x & 0xff00) == 0)
+ lg2 = 8, x <<= 8;
+
+ if ((x & 0xf000) == 0)
+ lg2 += 4, x <<= 4;
+
+ if ((x & 0xc000) == 0)
+ lg2 += 2, x <<= 2;
+
+ if ((x & 0x8000) == 0)
+ lg2 += 1, x <<= 1;
+
+ /* Calculate the base logarithm from the top 8 bits as a 28 bit fractional
+ * value.
+ */
+ lg2 <<= 28;
+ lg2 += (png_8bit_l2[(x>>8)-128]+8) >> 4;
+
+ /* Now we need to interpolate the factor, this requires a division by the top
+ * 8 bits. Do this with maximum precision.
+ */
+ x = ((x << 16) + (x >> 9)) / (x >> 8);
+
+ /* Since we divided by the top 8 bits of 'x' there will be a '1' at 1<<24,
+ * the value at 1<<16 (ignoring this) will be 0 or 1; this gives us exactly
+ * 16 bits to interpolate to get the low bits of the result. Round the
+ * answer. Note that the end point values are scaled by 64 to retain overall
+ * precision and that 'lg2' is current scaled by an extra 12 bits, so adjust
+ * the overall scaling by 6-12. Round at every step.
+ */
+ x -= 1U << 24;
+
+ if (x <= 65536U) /* <= '257' */
+ lg2 += ((23591U * (65536U-x)) + (1U << (16+6-12-1))) >> (16+6-12);
+
+ else
+ lg2 -= ((23499U * (x-65536U)) + (1U << (16+6-12-1))) >> (16+6-12);
+
+ /* Safe, because the result can't have more than 20 bits: */
+ return (png_int_32)((lg2 + 2048) >> 12);
+}
+
+/* The 'exp()' case must invert the above, taking a 20 bit fixed point
+ * logarithmic value and returning a 16 or 8 bit number as appropriate. In
+ * each case only the low 16 bits are relevant - the fraction - since the
+ * integer bits (the top 4) simply determine a shift.
+ *
+ * The worst case is the 16 bit distinction between 65535 and 65534, this
+ * requires perhaps spurious accuracty in the decoding of the logarithm to
+ * distinguish log2(65535/65534.5) - 10^-5 or 17 bits. There is little chance
+ * of getting this accuracy in practice.
+ *
+ * To deal with this the following exp() function works out the exponent of the
+ * frational part of the logarithm by using an accurate 32 bit value from the
+ * top four fractional bits then multiplying in the remaining bits.
+ */
+static png_uint_32
+png_32bit_exp[16] =
+{
+# if PNG_DO_BC
+ for (i=0;i<16;++i) { .5 + e(-i/16*l(2))*2^32; }
+# endif
+ /* NOTE: the first entry is deliberately set to the maximum 32 bit value. */
+ 4294967295U, 4112874773U, 3938502376U, 3771522796U, 3611622603U, 3458501653U,
+ 3311872529U, 3171459999U, 3037000500U, 2908241642U, 2784941738U, 2666869345U,
+ 2553802834U, 2445529972U, 2341847524U, 2242560872U
+};
+
+/* Adjustment table; provided to explain the numbers in the code below. */
+#if PNG_DO_BC
+for (i=11;i>=0;--i){ print i, " ", (1 - e(-(2^i)/65536*l(2))) * 2^(32-i), "\n"}
+ 11 44937.64284865548751208448
+ 10 45180.98734845585101160448
+ 9 45303.31936980687359311872
+ 8 45364.65110595323018870784
+ 7 45395.35850361789624614912
+ 6 45410.72259715102037508096
+ 5 45418.40724413220722311168
+ 4 45422.25021786898173001728
+ 3 45424.17186732298419044352
+ 2 45425.13273269940811464704
+ 1 45425.61317555035558641664
+ 0 45425.85339951654943850496
+#endif
+
+static png_uint_32
+png_exp(png_fixed_point x)
+{
+ if (x > 0 && x <= 0xfffff) /* Else overflow or zero (underflow) */
+ {
+ /* Obtain a 4 bit approximation */
+ png_uint_32 e = png_32bit_exp[(x >> 12) & 0xf];
+
+ /* Incorporate the low 12 bits - these decrease the returned value by
+ * multiplying by a number less than 1 if the bit is set. The multiplier
+ * is determined by the above table and the shift. Notice that the values
+ * converge on 45426 and this is used to allow linear interpolation of the
+ * low bits.
+ */
+ if (x & 0x800)
+ e -= (((e >> 16) * 44938U) + 16U) >> 5;
+
+ if (x & 0x400)
+ e -= (((e >> 16) * 45181U) + 32U) >> 6;
+
+ if (x & 0x200)
+ e -= (((e >> 16) * 45303U) + 64U) >> 7;
+
+ if (x & 0x100)
+ e -= (((e >> 16) * 45365U) + 128U) >> 8;
+
+ if (x & 0x080)
+ e -= (((e >> 16) * 45395U) + 256U) >> 9;
+
+ if (x & 0x040)
+ e -= (((e >> 16) * 45410U) + 512U) >> 10;
+
+ /* And handle the low 6 bits in a single block. */
+ e -= (((e >> 16) * 355U * (x & 0x3fU)) + 256U) >> 9;
+
+ /* Handle the upper bits of x. */
+ e >>= x >> 16;
+ return e;
+ }
+
+ /* Check for overflow */
+ if (x <= 0)
+ return png_32bit_exp[0];
+
+ /* Else underflow */
+ return 0;
+}
+
+static png_byte
+png_exp8bit(png_fixed_point lg2)
+{
+ /* Get a 32 bit value: */
+ png_uint_32 x = png_exp(lg2);
+
+ /* Convert the 32 bit value to 0..255 by multiplying by 256-1, note that the
+ * second, rounding, step can't overflow because of the first, subtraction,
+ * step.
+ */
+ x -= x >> 8;
+ return (png_byte)((x + 0x7fffffU) >> 24);
+}
+
+static png_uint_16
+png_exp16bit(png_fixed_point lg2)
+{
+ /* Get a 32 bit value: */
+ png_uint_32 x = png_exp(lg2);
+
+ /* Convert the 32 bit value to 0..65535 by multiplying by 65536-1: */
+ x -= x >> 16;
+ return (png_uint_16)((x + 32767U) >> 16);
+}
+#endif /* FLOATING_ARITHMETIC */
+
+png_byte
+png_gamma_8bit_correct(unsigned int value, png_fixed_point gamma_val)
+{
+ if (value > 0 && value < 255)
+ {
+# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+ double r = floor(255*pow(value/255.,gamma_val*.00001)+.5);
+ return (png_byte)r;
+# else
+ png_int_32 lg2 = png_log8bit(value);
+ png_fixed_point res;
+
+ if (png_muldiv(&res, gamma_val, lg2, PNG_FP_1))
+ return png_exp8bit(res);
+
+ /* Overflow. */
+ value = 0;
+# endif
+ }
+
+ return (png_byte)value;
+}
+
+png_uint_16
+png_gamma_16bit_correct(unsigned int value, png_fixed_point gamma_val)
+{
+ if (value > 0 && value < 65535)
+ {
+# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+ double r = floor(65535*pow(value/65535.,gamma_val*.00001)+.5);
+ return (png_uint_16)r;
+# else
+ png_int_32 lg2 = png_log16bit(value);
+ png_fixed_point res;
+
+ if (png_muldiv(&res, gamma_val, lg2, PNG_FP_1))
+ return png_exp16bit(res);
+
+ /* Overflow. */
+ value = 0;
+# endif
+ }
+
+ return (png_uint_16)value;
+}
+
+/* This does the right thing based on the bit_depth field of the
+ * png_struct, interpreting values as 8 or 16 bit. While the result
+ * is nominally a 16 bit value if bit depth is 8 then the result is
+ * 8 bit (as are the arguments.)
+ */
+png_uint_16 /* PRIVATE */
+png_gamma_correct(png_structp png_ptr, unsigned int value,
+ png_fixed_point gamma_val)
+{
+ if (png_ptr->bit_depth == 8)
+ return png_gamma_8bit_correct(value, gamma_val);
+
+ else
+ return png_gamma_16bit_correct(value, gamma_val);
+}
+
+/* This is the shared test on whether a gamma value is 'significant' - whether
+ * it is worth doing gamma correction.
+ */
+int /* PRIVATE */
+png_gamma_significant(png_fixed_point gamma_val)
+{
+ return gamma_val < PNG_FP_1 - PNG_GAMMA_THRESHOLD_FIXED ||
+ gamma_val > PNG_FP_1 + PNG_GAMMA_THRESHOLD_FIXED;
+}
+
+/* Internal function to build a single 16 bit table - the table consists of
+ * 'num' 256 entry subtables, where 'num' is determined by 'shift' - the amount
+ * to shift the input values right (or 16-number_of_signifiant_bits).
+ *
+ * The caller is responsible for ensuring that the table gets cleaned up on
+ * png_error (i.e. if one of the mallocs below fails) - i.e. the *table argument
+ * should be somewhere that will be cleaned.
+ */
+static void
+png_build_16bit_table(png_structp png_ptr, png_uint_16pp *ptable,
+ PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val)
+{
+ /* Various values derived from 'shift': */
+ PNG_CONST unsigned int num = 1U << (8U - shift);
+ PNG_CONST unsigned int max = (1U << (16U - shift))-1U;
+ PNG_CONST unsigned int max_by_2 = 1U << (15U-shift);
+ unsigned int i;
+
+ png_uint_16pp table = *ptable =
+ (png_uint_16pp)png_calloc(png_ptr, num * png_sizeof(png_uint_16p));
+
+ for (i = 0; i < num; i++)
+ {
+ png_uint_16p sub_table = table[i] =
+ (png_uint_16p)png_malloc(png_ptr, 256 * png_sizeof(png_uint_16));
+
+ /* The 'threshold' test is repeated here because it can arise for one of
+ * the 16 bit tables even if the others don't hit it.
+ */
+ if (png_gamma_significant(gamma_val))
+ {
+ /* The old code would overflow at the end and this would cause the
+ * 'pow' function to return a result >1, resulting in an
+ * arithmetic error. This code follows the spec exactly; ig is
+ * the recovered input sample, it always has 8-16 bits.
+ *
+ * We want input * 65535/max, rounded, the arithmetic fits in 32
+ * bits (unsigned) so long as max <= 32767.
+ */
+ unsigned int j;
+ for (j = 0; j < 256; j++)
+ {
+ png_uint_32 ig = (j << (8-shift)) + i;
+# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+ /* Inline the 'max' scaling operation: */
+ double d = floor(65535*pow(ig/(double)max, gamma_val*.00001)+.5);
+ sub_table[j] = (png_uint_16)d;
+# else
+ if (shift)
+ ig = (ig * 65535U + max_by_2)/max;
+
+ sub_table[j] = png_gamma_16bit_correct(ig, gamma_val);
+# endif
+ }
+ }
+ else
+ {
+ /* We must still build a table, but do it the fast way. */
+ unsigned int j;
+
+ for (j = 0; j < 256; j++)
+ {
+ png_uint_32 ig = (j << (8-shift)) + i;
+
+ if (shift)
+ ig = (ig * 65535U + max_by_2)/max;
+
+ sub_table[j] = (png_uint_16)ig;
+ }
+ }
+ }
+}
+
+/* NOTE: this function expects the *inverse* of the overall gamma transformation
+ * required.
+ */
+static void
+png_build_16to8_table(png_structp png_ptr, png_uint_16pp *ptable,
+ PNG_CONST unsigned int shift, PNG_CONST png_fixed_point gamma_val)
+{
+ PNG_CONST unsigned int num = 1U << (8U - shift);
+ PNG_CONST unsigned int max = (1U << (16U - shift))-1U;
+ unsigned int i;
+ png_uint_32 last;
+
+ png_uint_16pp table = *ptable =
+ (png_uint_16pp)png_calloc(png_ptr, num * png_sizeof(png_uint_16p));
+
+ /* 'num' is the number of tables and also the number of low bits of low
+ * bits of the input 16 bit value used to select a table. Each table is
+ * itself index by the high 8 bits of the value.
+ */
+ for (i = 0; i < num; i++)
+ table[i] = (png_uint_16p)png_malloc(png_ptr,
+ 256 * png_sizeof(png_uint_16));
+
+ /* 'gamma_val' is set to the reciprocal of the value calculated above, so
+ * pow(out,g) is an *input* value. 'last' is the last input value set.
+ *
+ * In the loop 'i' is used to find output values. Since the output is 8
+ * bit there are only 256 possible values. The tables are set up to
+ * select the closest possible output value for each input by finding
+ * the input value at the boundary between each pair of output values
+ * and filling the table up to that boundary with the lower output
+ * value.
+ *
+ * The boundary values are 0.5,1.5..253.5,254.5. Since these are 9 bit
+ * values the code below uses a 16 bit value in i; the values start at
+ * 128.5 (for 0.5) and step by 257, for a total of 254 values (the last
+ * entries are filled with 255). Start i at 128 and fill all 'last'
+ * table entries <= 'max'
+ */
+ last = 0;
+ for (i = 0; i < 255; ++i) /* 8 bit output value */
+ {
+ /* Find the corresponding maximum input value */
+ png_uint_16 out = (png_uint_16)(i * 257U); /* 16 bit output value */
+
+ /* Find the boundary value in 16 bits: */
+ png_uint_32 bound = png_gamma_16bit_correct(out+128U, gamma_val);
+
+ /* Adjust (round) to (16-shift) bits: */
+ bound = (bound * max + 32768U)/65535U + 1U;
+
+ while (last < bound)
+ {
+ table[last & (0xffU >> shift)][last >> (8U - shift)] = out;
+ last++;
+ }
+ }
+
+ /* And fill in the final entries. */
+ while (last < (num << 8))
+ {
+ table[last & (0xff >> shift)][last >> (8U - shift)] = 65535U;
+ last++;
+ }
+}
+
+/* Build a single 8 bit table: same as the 16 bit case but much simpler (and
+ * typically much faster). Note that libpng currently does no sBIT processing
+ * (apparently contrary to the spec) so a 256 entry table is always generated.
+ */
+static void
+png_build_8bit_table(png_structp png_ptr, png_bytepp ptable,
+ PNG_CONST png_fixed_point gamma_val)
+{
+ unsigned int i;
+ png_bytep table = *ptable = (png_bytep)png_malloc(png_ptr, 256);
+
+ if (png_gamma_significant(gamma_val)) for (i=0; i<256; i++)
+ table[i] = png_gamma_8bit_correct(i, gamma_val);
+
+ else for (i=0; i<256; ++i)
+ table[i] = (png_byte)i;
+}
+
+/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit
+ * tables, we don't make a full table if we are reducing to 8-bit in
+ * the future. Note also how the gamma_16 tables are segmented so that
+ * we don't need to allocate > 64K chunks for a full 16-bit table.
+ */
+void /* PRIVATE */
+png_build_gamma_table(png_structp png_ptr, int bit_depth)
+{
+ png_debug(1, "in png_build_gamma_table");
+
+ if (bit_depth <= 8)
+ {
+ png_build_8bit_table(png_ptr, &png_ptr->gamma_table,
+ png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->gamma,
+ png_ptr->screen_gamma) : PNG_FP_1);
+
+#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
+ defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
+ if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY))
+ {
+ png_build_8bit_table(png_ptr, &png_ptr->gamma_to_1,
+ png_reciprocal(png_ptr->gamma));
+
+ png_build_8bit_table(png_ptr, &png_ptr->gamma_from_1,
+ png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) :
+ png_ptr->gamma/* Probably doing rgb_to_gray */);
+ }
+#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
+ }
+ else
+ {
+ png_byte shift, sig_bit;
+
+ if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
+ {
+ sig_bit = png_ptr->sig_bit.red;
+
+ if (png_ptr->sig_bit.green > sig_bit)
+ sig_bit = png_ptr->sig_bit.green;
+
+ if (png_ptr->sig_bit.blue > sig_bit)
+ sig_bit = png_ptr->sig_bit.blue;
+ }
+ else
+ sig_bit = png_ptr->sig_bit.gray;
+
+ /* 16 bit gamma code uses this equation:
+ *
+ * ov = table[(iv & 0xff) >> gamma_shift][iv >> 8]
+ *
+ * Where 'iv' is the input color value and 'ov' is the output value -
+ * pow(iv, gamma).
+ *
+ * Thus the gamma table consists of up to 256 256 entry tables. The table
+ * is selected by the (8-gamma_shift) most significant of the low 8 bits of
+ * the color value then indexed by the upper 8 bits:
+ *
+ * table[low bits][high 8 bits]
+ *
+ * So the table 'n' corresponds to all those 'iv' of:
+ *
+ * <all high 8 bit values><n << gamma_shift>..<(n+1 << gamma_shift)-1>
+ *
+ */
+ if (sig_bit > 0 && sig_bit < 16U)
+ shift = (png_byte)(16U - sig_bit); /* shift == insignificant bits */
+
+ else
+ shift = 0; /* keep all 16 bits */
+
+ if (png_ptr->transformations & PNG_16_TO_8)
+ {
+ /* PNG_MAX_GAMMA_8 is the number of bits to keep - effectively
+ * the significant bits in the *input* when the output will
+ * eventually be 8 bits. By default it is 11.
+ */
+ if (shift < (16U - PNG_MAX_GAMMA_8))
+ shift = (16U - PNG_MAX_GAMMA_8);
+ }
+
+ if (shift > 8U)
+ shift = 8U; /* Guarantees at least one table! */
+
+ png_ptr->gamma_shift = shift;
+
+#ifdef PNG_16BIT_SUPPORTED
+ if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))
+#endif
+ png_build_16to8_table(png_ptr, &png_ptr->gamma_16_table, shift,
+ png_ptr->screen_gamma > 0 ? png_product2(png_ptr->gamma,
+ png_ptr->screen_gamma) : PNG_FP_1);
+
+#ifdef PNG_16BIT_SUPPORTED
+ else
+ png_build_16bit_table(png_ptr, &png_ptr->gamma_16_table, shift,
+ png_ptr->screen_gamma > 0 ? png_reciprocal2(png_ptr->gamma,
+ png_ptr->screen_gamma) : PNG_FP_1);
+#endif
+
+#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
+ defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
+ if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))
+ {
+ png_build_16bit_table(png_ptr, &png_ptr->gamma_16_to_1, shift,
+ png_reciprocal(png_ptr->gamma));
+
+ /* Notice that the '16 from 1' table should be full precision, however
+ * the lookup on this table still uses gamma_shift, so it can't be.
+ * TODO: fix this.
+ */
+ png_build_16bit_table(png_ptr, &png_ptr->gamma_16_from_1, shift,
+ png_ptr->screen_gamma > 0 ? png_reciprocal(png_ptr->screen_gamma) :
+ png_ptr->gamma/* Probably doing rgb_to_gray */);
+ }
+#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
+ }
+}
+#endif /* READ_GAMMA */
#endif /* defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED) */
diff --git a/src/3rdparty/libpng/png.h b/src/3rdparty/libpng/png.h
index 5ea2b0d..100f56d 100644
--- a/src/3rdparty/libpng/png.h
+++ b/src/3rdparty/libpng/png.h
@@ -1,26 +1,26 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.4.0 - January 3, 2010
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * libpng version 1.5.1 - February 3, 2011
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
* This code is released under the libpng license (See LICENSE, below)
*
* Authors and maintainers:
- * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
- * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
- * libpng versions 0.97, January 1998, through 1.4.0 - January 3, 2010: Glenn
- * See also "Contributing Authors", below.
+ * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
+ * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
+ * libpng versions 0.97, January 1998, through 1.5.1 - February 3, 2011: Glenn
+ * See also "Contributing Authors", below.
*
* Note about libpng version numbers:
*
- * Due to various miscommunications, unforeseen code incompatibilities
- * and occasional factors outside the authors' control, version numbering
- * on the library has not always been consistent and straightforward.
- * The following table summarizes matters since version 0.89c, which was
- * the first widely used release:
+ * Due to various miscommunications, unforeseen code incompatibilities
+ * and occasional factors outside the authors' control, version numbering
+ * on the library has not always been consistent and straightforward.
+ * The following table summarizes matters since version 0.89c, which was
+ * the first widely used release:
*
* source png.h png.h shared-lib
* version string int version
@@ -134,27 +134,40 @@
* 1.4.0beta88-109 14 10400 14.so.14.0[.0]
* 1.4.0rc02-08 14 10400 14.so.14.0[.0]
* 1.4.0 14 10400 14.so.14.0[.0]
+ * 1.4.1beta01-03 14 10401 14.so.14.1[.0]
+ * 1.4.1rc01 14 10401 14.so.14.1[.0]
+ * 1.4.1beta04-12 14 10401 14.so.14.1[.0]
+ * 1.4.1 14 10401 14.so.14.1[.0]
+ * 1.4.2 14 10402 14.so.14.2[.0]
+ * 1.4.3 14 10403 14.so.14.3[.0]
+ * 1.4.4 14 10404 14.so.14.4[.0]
+ * 1.5.0beta01-58 15 10500 15.so.15.0[.0]
+ * 1.5.0rc01-07 15 10500 15.so.15.0[.0]
+ * 1.5.0 15 10500 15.so.15.0[.0]
+ * 1.5.1beta01-11 15 10501 15.so.15.1[.0]
+ * 1.5.1rc01-02 15 10501 15.so.15.1[.0]
+ * 1.5.1 15 10501 15.so.15.1[.0]
*
- * Henceforth the source version will match the shared-library major
- * and minor numbers; the shared-library major version number will be
- * used for changes in backward compatibility, as it is intended. The
- * PNG_LIBPNG_VER macro, which is not used within libpng but is available
- * for applications, is an unsigned integer of the form xyyzz corresponding
- * to the source version x.y.z (leading zeros in y and z). Beta versions
- * were given the previous public release number plus a letter, until
- * version 1.0.6j; from then on they were given the upcoming public
- * release number plus "betaNN" or "rcN".
+ * Henceforth the source version will match the shared-library major
+ * and minor numbers; the shared-library major version number will be
+ * used for changes in backward compatibility, as it is intended. The
+ * PNG_LIBPNG_VER macro, which is not used within libpng but is available
+ * for applications, is an unsigned integer of the form xyyzz corresponding
+ * to the source version x.y.z (leading zeros in y and z). Beta versions
+ * were given the previous public release number plus a letter, until
+ * version 1.0.6j; from then on they were given the upcoming public
+ * release number plus "betaNN" or "rcN".
*
- * Binary incompatibility exists only when applications make direct access
- * to the info_ptr or png_ptr members through png.h, and the compiled
- * application is loaded with a different version of the library.
+ * Binary incompatibility exists only when applications make direct access
+ * to the info_ptr or png_ptr members through png.h, and the compiled
+ * application is loaded with a different version of the library.
*
- * DLLNUM will change each time there are forward or backward changes
- * in binary compatibility (e.g., when a new feature is added).
+ * DLLNUM will change each time there are forward or backward changes
+ * in binary compatibility (e.g., when a new feature is added).
*
- * See libpng.txt or libpng.3 for more information. The PNG specification
- * is available as a W3C Recommendation and as an ISO Specification,
- * <http://www.w3.org/TR/2003/REC-PNG-20031110/
+ * See libpng-manual.txt or libpng.3 for more information. The PNG
+ * specification is available as a W3C Recommendation and as an ISO
+ * Specification, <http://www.w3.org/TR/2003/REC-PNG-20031110/
*/
/*
@@ -165,8 +178,8 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.2.6, August 15, 2004, through 1.4.0, January 3, 2010, are
- * Copyright (c) 2004, 2006-2010 Glenn Randers-Pehrson, and are
+ * libpng versions 1.2.6, August 15, 2004, through 1.5.1, February 3, 2011, are
+ * Copyright (c) 2004, 2006-2011 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors:
*
@@ -192,7 +205,7 @@
*
* libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are
* Copyright (c) 1998, 1999, 2000 Glenn Randers-Pehrson, and are
- * distributed according to the same disclaimer and license as libpng-0.96,
+ * distributed according to the same disclaimer and license as libpng-0.96,
* with the following individuals added to the list of Contributing Authors:
*
* Tom Lane
@@ -201,7 +214,7 @@
*
* libpng versions 0.89, June 1996, through 0.96, May 1997, are
* Copyright (c) 1996, 1997 Andreas Dilger
- * Distributed according to the same disclaimer and license as libpng-0.88,
+ * Distributed according to the same disclaimer and license as libpng-0.88,
* with the following individuals added to the list of Contributing Authors:
*
* John Bowler
@@ -224,10 +237,10 @@
* Tim Wegner
*
* The PNG Reference Library is supplied "AS IS". The Contributing Authors
- * and Group 42, Inc. disclaim all warranties, expressed or implied,
+ * and Group 42, Inc. disclaim all warranties, expressed or implied,
* including, without limitation, the warranties of merchantability and of
* fitness for any purpose. The Contributing Authors and Group 42, Inc.
- * assume no liability for direct, indirect, incidental, special, exemplary,
+ * assume no liability for direct, indirect, incidental, special, exemplary,
* or consequential damages, which may result from the use of the PNG
* Reference Library, even if advised of the possibility of such damage.
*
@@ -235,13 +248,13 @@
* source code, or portions hereof, for any purpose, without fee, subject
* to the following restrictions:
*
- * 1. The origin of this source code must not be misrepresented.
+ * 1. The origin of this source code must not be misrepresented.
*
- * 2. Altered versions must be plainly marked as such and
- * must not be misrepresented as being the original source.
+ * 2. Altered versions must be plainly marked as such and must not
+ * be misrepresented as being the original source.
*
- * 3. This Copyright notice may not be removed or altered from
- * any source or altered source distribution.
+ * 3. This Copyright notice may not be removed or altered from
+ * any source or altered source distribution.
*
* The Contributing Authors and Group 42, Inc. specifically permit, without
* fee, and encourage the use of this source code as a component to
@@ -254,7 +267,7 @@
* A "png_get_copyright" function is available, for convenient use in "about"
* boxes and the like:
*
- * printf("%s",png_get_copyright(NULL));
+ * printf("%s", png_get_copyright(NULL));
*
* Also, the PNG logo (in PNG format, of course) is supplied in the
* files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
@@ -277,14 +290,14 @@
* Y2K compliance in libpng:
* =========================
*
- * January 3, 2010
+ * February 3, 2011
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
- * upward through 1.4.0 are Y2K compliant. It is my belief that earlier
- * versions were also Y2K compliant.
+ * upward through 1.5.1 are Y2K compliant. It is my belief that
+ * earlier versions were also Y2K compliant.
*
* Libpng only has three year fields. One is a 2-byte unsigned integer
* that will hold years up to 65535. The other two hold the date in text
@@ -313,7 +326,7 @@
* the full 4-digit year. There is a possibility that applications using
* libpng are not passing 4-digit years into the png_convert_to_rfc_1123()
* function, or that they are incorrectly passing only a 2-digit year
- * instead of "year - 1900" into the png_convert_from_struct_tm() function,
+ * instead of "year - 1900" into the png_convert_from_struct_tm() function,
* but this is not under our control. The libpng documentation has always
* stated that it works with 4-digit years, and the APIs have been
* documented as such.
@@ -332,24 +345,24 @@
#ifndef PNG_H
#define PNG_H
-/* This is not the place to learn how to use libpng. The file libpng.txt
+/* This is not the place to learn how to use libpng. The file libpng-manual.txt
* describes how to use libpng, and the file example.c summarizes it
* with some code on which to build. This file is useful for looking
* at the actual function definitions and structure components.
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.4.0"
+#define PNG_LIBPNG_VER_STRING "1.5.1"
#define PNG_HEADER_VERSION_STRING \
- " libpng version 1.4.0 - January 3, 2010\n"
+ " libpng version 1.5.1 - February 3, 2011\n"
-#define PNG_LIBPNG_VER_SONUM 14
-#define PNG_LIBPNG_VER_DLLNUM 14
+#define PNG_LIBPNG_VER_SONUM 15
+#define PNG_LIBPNG_VER_DLLNUM 15
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
-#define PNG_LIBPNG_VER_MINOR 4
-#define PNG_LIBPNG_VER_RELEASE 0
+#define PNG_LIBPNG_VER_MINOR 5
+#define PNG_LIBPNG_VER_RELEASE 1
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
@@ -379,19 +392,35 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
-#define PNG_LIBPNG_VER 10400 /* 1.4.0 */
+#define PNG_LIBPNG_VER 10501 /* 1.5.1 */
-#ifndef PNG_VERSION_INFO_ONLY
-/* Include the compression library's header */
-#include "zlib.h"
+/* Library configuration: these options cannot be changed after
+ * the library has been built.
+ */
+#ifndef PNGLCONF_H
+ /* If pnglibconf.h is missing, you can
+ * copy scripts/pnglibconf.h.prebuilt to pnglibconf.h
+ */
+# include "pnglibconf.h"
#endif
-#ifdef _AIX
-#define jmpbuf __jmpbuf
+#ifndef PNG_VERSION_INFO_ONLY
+/* Standard header files (not needed for the version info) */
+# ifdef PNG_SETJMP_SUPPORTED
+# include <setjmp.h>
+# endif
+
+/* Need the time information for converting tIME chunks, it
+ * defines struct tm:
+ */
+#ifdef PNG_CONVERT_tIME_SUPPORTED
+ /* "time.h" functions are not supported on all operating systems */
+# include <time.h>
#endif
-/* Include all user configurable info, including optional assembler routines */
-#include "pngconf.h"
+/* Machine specific configuration. */
+# include "pngconf.h"
+#endif
/*
* Added at libpng-1.2.8
@@ -407,13 +436,13 @@
* StringFileInfo block must contain a SpecialBuild string.
*/
-#ifdef PNG_USER_PRIVATEBUILD
+#ifdef PNG_USER_PRIVATEBUILD /* From pnglibconf.h */
# define PNG_LIBPNG_BUILD_TYPE \
- (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
+ (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_PRIVATE)
#else
# ifdef PNG_LIBPNG_SPECIALBUILD
# define PNG_LIBPNG_BUILD_TYPE \
- (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
+ (PNG_LIBPNG_BUILD_BASE_TYPE | PNG_LIBPNG_BUILD_SPECIAL)
# else
# define PNG_LIBPNG_BUILD_TYPE (PNG_LIBPNG_BUILD_BASE_TYPE)
# endif
@@ -426,20 +455,61 @@
extern "C" {
#endif /* __cplusplus */
-/* This file is arranged in several sections. The first section contains
- * structure and type definitions. The second section contains the external
- * library functions, while the third has the internal library functions,
- * which applications aren't expected to use directly.
- */
-
-/* Variables declared in png.c - only it needs to define PNG_NO_EXTERN */
-#if !defined(PNG_NO_EXTERN) || defined(PNG_ALWAYS_EXTERN)
/* Version information for C files, stored in png.c. This had better match
* the version above.
*/
#define png_libpng_ver png_get_header_ver(NULL)
-#endif /* PNG_NO_EXTERN */
+/* This file is arranged in several sections:
+ *
+ * 1. Any configuration options that can be specified by for the application
+ * code when it is built. (Build time configuration is in pnglibconf.h)
+ * 2. Type definitions (base types are defined in pngconf.h), structure
+ * definitions.
+ * 3. Exported library functions.
+ *
+ * The library source code has additional files (principally pngpriv.h) that
+ * allow configuration of the library.
+ */
+/* Section 1: run time configuration
+ * See pnglibconf.h for build time configuration
+ *
+ * Run time configuration allows the application to choose between
+ * implementations of certain arithmetic APIs. The default is set
+ * at build time and recorded in pnglibconf.h, but it is safe to
+ * override these (and only these) settings. Note that this won't
+ * change what the library does, only application code, and the
+ * settings can (and probably should) be made on a per-file basis
+ * by setting the #defines before including png.h
+ *
+ * Use macros to read integers from PNG data or use the exported
+ * functions?
+ * PNG_USE_READ_MACROS: use the macros (see below) Note that
+ * the macros evaluate their argument multiple times.
+ * PNG_NO_USE_READ_MACROS: call the relevant library function.
+ *
+ * Use the alternative algorithm for compositing alpha samples that
+ * does not use division?
+ * PNG_READ_COMPOSITE_NODIV_SUPPORTED: use the 'no division'
+ * algorithm.
+ * PNG_NO_READ_COMPOSITE_NODIV: use the 'division' algorithm.
+ *
+ * How to handle benign errors if PNG_ALLOW_BENIGN_ERRORS is
+ * false?
+ * PNG_ALLOW_BENIGN_ERRORS: map calls to the benign error
+ * APIs to png_warning.
+ * Otherwise the calls are mapped to png_error.
+ */
+
+/* Section 2: type definitions, including structures and compile time
+ * constants.
+ * See pngconf.h for base types that vary by machine/system
+ */
+
+/* This triggers a compiler error in png.c, if png.c and png.h
+ * do not agree upon the version number.
+ */
+typedef char* png_libpng_version_1_5_1;
/* Three color definitions. The order of the red, green, and blue, (and the
* exact size) is not important, although the size of the fields need to
@@ -452,6 +522,7 @@ typedef struct png_color_struct
png_byte blue;
} png_color;
typedef png_color FAR * png_colorp;
+typedef PNG_CONST png_color FAR * png_const_colorp;
typedef png_color FAR * FAR * png_colorpp;
typedef struct png_color_16_struct
@@ -463,6 +534,7 @@ typedef struct png_color_16_struct
png_uint_16 gray; /* for use in grayscale files */
} png_color_16;
typedef png_color_16 FAR * png_color_16p;
+typedef PNG_CONST png_color_16 FAR * png_const_color_16p;
typedef png_color_16 FAR * FAR * png_color_16pp;
typedef struct png_color_8_struct
@@ -474,6 +546,7 @@ typedef struct png_color_8_struct
png_byte alpha; /* for alpha channel files */
} png_color_8;
typedef png_color_8 FAR * png_color_8p;
+typedef PNG_CONST png_color_8 FAR * png_const_color_8p;
typedef png_color_8 FAR * FAR * png_color_8pp;
/*
@@ -489,6 +562,7 @@ typedef struct png_sPLT_entry_struct
png_uint_16 frequency;
} png_sPLT_entry;
typedef png_sPLT_entry FAR * png_sPLT_entryp;
+typedef PNG_CONST png_sPLT_entry FAR * png_const_sPLT_entryp;
typedef png_sPLT_entry FAR * FAR * png_sPLT_entrypp;
/* When the depth of the sPLT palette is 8 bits, the color and alpha samples
@@ -504,15 +578,16 @@ typedef struct png_sPLT_struct
png_int_32 nentries; /* number of palette entries */
} png_sPLT_t;
typedef png_sPLT_t FAR * png_sPLT_tp;
+typedef PNG_CONST png_sPLT_t FAR * png_const_sPLT_tp;
typedef png_sPLT_t FAR * FAR * png_sPLT_tpp;
#ifdef PNG_TEXT_SUPPORTED
-/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
+/* png_text holds the contents of a text/ztxt/itxt chunk in a PNG file,
* and whether that contents is compressed or not. The "key" field
* points to a regular zero-terminated C string. The "text", "lang", and
* "lang_key" fields can be regular C strings, empty strings, or NULL pointers.
* However, the * structure returned by png_get_text() will always contain
- * regular zero-terminated C strings (possibly empty), never NULL pointers,
+ * regular zero-terminated C strings (possibly empty), never NULL pointers,
* so they can be safely used in printf() and other string-handling functions.
*/
typedef struct png_text_struct
@@ -526,15 +601,14 @@ typedef struct png_text_struct
png_charp text; /* comment, may be an empty string (ie "")
or a NULL pointer */
png_size_t text_length; /* length of the text string */
-#ifdef PNG_iTXt_SUPPORTED
png_size_t itxt_length; /* length of the itxt string */
png_charp lang; /* language code, 0-79 characters
or a NULL pointer */
png_charp lang_key; /* keyword translated UTF-8 string, 0 or more
chars or a NULL pointer */
-#endif
} png_text;
typedef png_text FAR * png_textp;
+typedef PNG_CONST png_text FAR * png_const_textp;
typedef png_text FAR * FAR * png_textpp;
#endif
@@ -564,10 +638,11 @@ typedef struct png_time_struct
png_byte second; /* second of minute, 0 - 60 (for leap seconds) */
} png_time;
typedef png_time FAR * png_timep;
+typedef PNG_CONST png_time FAR * png_const_timep;
typedef png_time FAR * FAR * png_timepp;
#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
- defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
+ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
/* png_unknown_chunk is a structure to hold queued chunks for which there is
* no specific support. The idea is that we can use this to queue
* up private chunks for output even though the library doesn't actually
@@ -584,286 +659,13 @@ typedef struct png_unknown_chunk_t
}
png_unknown_chunk;
typedef png_unknown_chunk FAR * png_unknown_chunkp;
+typedef PNG_CONST png_unknown_chunk FAR * png_const_unknown_chunkp;
typedef png_unknown_chunk FAR * FAR * png_unknown_chunkpp;
#endif
-/* png_info is a structure that holds the information in a PNG file so
- * that the application can find out the characteristics of the image.
- * If you are reading the file, this structure will tell you what is
- * in the PNG file. If you are writing the file, fill in the information
- * you want to put into the PNG file, then call png_write_info().
- * The names chosen should be very close to the PNG specification, so
- * consult that document for information about the meaning of each field.
- *
- * With libpng < 0.95, it was only possible to directly set and read the
- * the values in the png_info_struct, which meant that the contents and
- * order of the values had to remain fixed. With libpng 0.95 and later,
- * however, there are now functions that abstract the contents of
- * png_info_struct from the application, so this makes it easier to use
- * libpng with dynamic libraries, and even makes it possible to use
- * libraries that don't have all of the libpng ancillary chunk-handing
- * functionality.
- *
- * In any case, the order of the parameters in png_info_struct should NOT
- * be changed for as long as possible to keep compatibility with applications
- * that use the old direct-access method with png_info_struct.
- *
- * The following members may have allocated storage attached that should be
- * cleaned up before the structure is discarded: palette, trans, text,
- * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
- * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these
- * are automatically freed when the info structure is deallocated, if they were
- * allocated internally by libpng. This behavior can be changed by means
- * of the png_data_freer() function.
- *
- * More allocation details: all the chunk-reading functions that
- * change these members go through the corresponding png_set_*
- * functions. A function to clear these members is available: see
- * png_free_data(). The png_set_* functions do not depend on being
- * able to point info structure members to any of the storage they are
- * passed (they make their own copies), EXCEPT that the png_set_text
- * functions use the same storage passed to them in the text_ptr or
- * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
- * functions do not make their own copies.
- */
-typedef struct png_info_struct
-{
- /* the following are necessary for every PNG file */
- png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels (from IHDR) */
- png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels (from IHDR) */
- png_uint_32 valid PNG_DEPSTRUCT; /* valid chunk data (see PNG_INFO_ below) */
- png_size_t rowbytes PNG_DEPSTRUCT; /* bytes needed to hold an untransformed row */
- png_colorp palette PNG_DEPSTRUCT; /* array of color values (valid & PNG_INFO_PLTE) */
- png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in "palette" (PLTE) */
- png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparent palette color (tRNS) */
- png_byte bit_depth PNG_DEPSTRUCT; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
- png_byte color_type PNG_DEPSTRUCT; /* see PNG_COLOR_TYPE_ below (from IHDR) */
- /* The following three should have been named *_method not *_type */
- png_byte compression_type PNG_DEPSTRUCT; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
- png_byte filter_type PNG_DEPSTRUCT; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
- png_byte interlace_type PNG_DEPSTRUCT; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
-
- /* The following is informational only on read, and not used on writes. */
- png_byte channels PNG_DEPSTRUCT; /* number of data channels per pixel (1, 2, 3, 4) */
- png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */
- png_byte spare_byte PNG_DEPSTRUCT; /* to align the data, and for future use */
- png_byte signature[8] PNG_DEPSTRUCT; /* magic bytes read by libpng from start of file */
-
- /* The rest of the data is optional. If you are reading, check the
- * valid field to see if the information in these are valid. If you
- * are writing, set the valid field to those chunks you want written,
- * and initialize the appropriate fields below.
- */
-
-#if defined(PNG_gAMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
- /* The gAMA chunk describes the gamma characteristics of the system
- * on which the image was created, normally in the range [1.0, 2.5].
- * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
- */
- float gamma PNG_DEPSTRUCT; /* gamma value of image, if (valid & PNG_INFO_gAMA) */
-#endif
-
-#ifdef PNG_sRGB_SUPPORTED
- /* GR-P, 0.96a */
- /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
- png_byte srgb_intent PNG_DEPSTRUCT; /* sRGB rendering intent [0, 1, 2, or 3] */
-#endif
-
-#ifdef PNG_TEXT_SUPPORTED
- /* The tEXt, and zTXt chunks contain human-readable textual data in
- * uncompressed, compressed, and optionally compressed forms, respectively.
- * The data in "text" is an array of pointers to uncompressed,
- * null-terminated C strings. Each chunk has a keyword that describes the
- * textual data contained in that chunk. Keywords are not required to be
- * unique, and the text string may be empty. Any number of text chunks may
- * be in an image.
- */
- int num_text PNG_DEPSTRUCT; /* number of comments read/to write */
- int max_text PNG_DEPSTRUCT; /* current size of text array */
- png_textp text PNG_DEPSTRUCT; /* array of comments read/to write */
-#endif /* PNG_TEXT_SUPPORTED */
-
-#ifdef PNG_tIME_SUPPORTED
- /* The tIME chunk holds the last time the displayed image data was
- * modified. See the png_time struct for the contents of this struct.
- */
- png_time mod_time PNG_DEPSTRUCT;
-#endif
-
-#ifdef PNG_sBIT_SUPPORTED
- /* The sBIT chunk specifies the number of significant high-order bits
- * in the pixel data. Values are in the range [1, bit_depth], and are
- * only specified for the channels in the pixel data. The contents of
- * the low-order bits is not specified. Data is valid if
- * (valid & PNG_INFO_sBIT) is non-zero.
- */
- png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in color channels */
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
-defined(PNG_READ_BACKGROUND_SUPPORTED)
- /* The tRNS chunk supplies transparency data for paletted images and
- * other image types that don't need a full alpha channel. There are
- * "num_trans" transparency values for a paletted image, stored in the
- * same order as the palette colors, starting from index 0. Values
- * for the data are in the range [0, 255], ranging from fully transparent
- * to fully opaque, respectively. For non-paletted images, there is a
- * single color specified that should be treated as fully transparent.
- * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
- */
- png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted image */
- png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-palette image */
-#endif
-
-#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- /* The bKGD chunk gives the suggested image background color if the
- * display program does not have its own background color and the image
- * is needs to composited onto a background before display. The colors
- * in "background" are normally in the same color space/depth as the
- * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
- */
- png_color_16 background PNG_DEPSTRUCT;
-#endif
-
-#ifdef PNG_oFFs_SUPPORTED
- /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
- * and downwards from the top-left corner of the display, page, or other
- * application-specific co-ordinate space. See the PNG_OFFSET_ defines
- * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero.
- */
- png_int_32 x_offset PNG_DEPSTRUCT; /* x offset on page */
- png_int_32 y_offset PNG_DEPSTRUCT; /* y offset on page */
- png_byte offset_unit_type PNG_DEPSTRUCT; /* offset units type */
-#endif
-
-#ifdef PNG_pHYs_SUPPORTED
- /* The pHYs chunk gives the physical pixel density of the image for
- * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
- * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
- */
- png_uint_32 x_pixels_per_unit PNG_DEPSTRUCT; /* horizontal pixel density */
- png_uint_32 y_pixels_per_unit PNG_DEPSTRUCT; /* vertical pixel density */
- png_byte phys_unit_type PNG_DEPSTRUCT; /* resolution type (see PNG_RESOLUTION_ below) */
-#endif
-
-#ifdef PNG_hIST_SUPPORTED
- /* The hIST chunk contains the relative frequency or importance of the
- * various palette entries, so that a viewer can intelligently select a
- * reduced-color palette, if required. Data is an array of "num_palette"
- * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
- * is non-zero.
- */
- png_uint_16p hist PNG_DEPSTRUCT;
-#endif
-
-#ifdef PNG_cHRM_SUPPORTED
- /* The cHRM chunk describes the CIE color characteristics of the monitor
- * on which the PNG was created. This data allows the viewer to do gamut
- * mapping of the input image to ensure that the viewer sees the same
- * colors in the image as the creator. Values are in the range
- * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero.
- */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- float x_white PNG_DEPSTRUCT;
- float y_white PNG_DEPSTRUCT;
- float x_red PNG_DEPSTRUCT;
- float y_red PNG_DEPSTRUCT;
- float x_green PNG_DEPSTRUCT;
- float y_green PNG_DEPSTRUCT;
- float x_blue PNG_DEPSTRUCT;
- float y_blue PNG_DEPSTRUCT;
-#endif
-#endif
-
-#ifdef PNG_pCAL_SUPPORTED
- /* The pCAL chunk describes a transformation between the stored pixel
- * values and original physical data values used to create the image.
- * The integer range [0, 2^bit_depth - 1] maps to the floating-point
- * range given by [pcal_X0, pcal_X1], and are further transformed by a
- * (possibly non-linear) transformation function given by "pcal_type"
- * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_
- * defines below, and the PNG-Group's PNG extensions document for a
- * complete description of the transformations and how they should be
- * implemented, and for a description of the ASCII parameter strings.
- * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
- */
- png_charp pcal_purpose PNG_DEPSTRUCT; /* pCAL chunk description string */
- png_int_32 pcal_X0 PNG_DEPSTRUCT; /* minimum value */
- png_int_32 pcal_X1 PNG_DEPSTRUCT; /* maximum value */
- png_charp pcal_units PNG_DEPSTRUCT; /* Latin-1 string giving physical units */
- png_charpp pcal_params PNG_DEPSTRUCT; /* ASCII strings containing parameter values */
- png_byte pcal_type PNG_DEPSTRUCT; /* equation type (see PNG_EQUATION_ below) */
- png_byte pcal_nparams PNG_DEPSTRUCT; /* number of parameters given in pcal_params */
-#endif
-
-/* New members added in libpng-1.0.6 */
- png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */
-
-#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
- defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
- /* Storage for unknown chunks that the library doesn't recognize. */
- png_unknown_chunkp unknown_chunks PNG_DEPSTRUCT;
- png_size_t unknown_chunks_num PNG_DEPSTRUCT;
-#endif
-
-#ifdef PNG_iCCP_SUPPORTED
- /* iCCP chunk data. */
- png_charp iccp_name PNG_DEPSTRUCT; /* profile name */
- png_charp iccp_profile PNG_DEPSTRUCT; /* International Color Consortium profile data */
- /* Note to maintainer: should be png_bytep */
- png_uint_32 iccp_proflen PNG_DEPSTRUCT; /* ICC profile data length */
- png_byte iccp_compression PNG_DEPSTRUCT; /* Always zero */
-#endif
-
-#ifdef PNG_sPLT_SUPPORTED
- /* Data on sPLT chunks (there may be more than one). */
- png_sPLT_tp splt_palettes PNG_DEPSTRUCT;
- png_uint_32 splt_palettes_num PNG_DEPSTRUCT;
-#endif
-
-#ifdef PNG_sCAL_SUPPORTED
- /* The sCAL chunk describes the actual physical dimensions of the
- * subject matter of the graphic. The chunk contains a unit specification
- * a byte value, and two ASCII strings representing floating-point
- * values. The values are width and height corresponsing to one pixel
- * in the image. This external representation is converted to double
- * here. Data values are valid if (valid & PNG_INFO_sCAL) is non-zero.
- */
- png_byte scal_unit PNG_DEPSTRUCT; /* unit of physical scale */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- double scal_pixel_width PNG_DEPSTRUCT; /* width of one pixel */
- double scal_pixel_height PNG_DEPSTRUCT; /* height of one pixel */
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
- png_charp scal_s_width PNG_DEPSTRUCT; /* string containing height */
- png_charp scal_s_height PNG_DEPSTRUCT; /* string containing width */
-#endif
-#endif
-
-#ifdef PNG_INFO_IMAGE_SUPPORTED
- /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS) non-zero */
- /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
- png_bytepp row_pointers PNG_DEPSTRUCT; /* the image bits */
-#endif
-
-#if defined(PNG_FIXED_POINT_SUPPORTED) && defined(PNG_gAMA_SUPPORTED)
- png_fixed_point int_gamma PNG_DEPSTRUCT; /* gamma of image, if (valid & PNG_INFO_gAMA) */
-#endif
-
-#if defined(PNG_cHRM_SUPPORTED) && defined(PNG_FIXED_POINT_SUPPORTED)
- png_fixed_point int_x_white PNG_DEPSTRUCT;
- png_fixed_point int_y_white PNG_DEPSTRUCT;
- png_fixed_point int_x_red PNG_DEPSTRUCT;
- png_fixed_point int_y_red PNG_DEPSTRUCT;
- png_fixed_point int_x_green PNG_DEPSTRUCT;
- png_fixed_point int_y_green PNG_DEPSTRUCT;
- png_fixed_point int_x_blue PNG_DEPSTRUCT;
- png_fixed_point int_y_blue PNG_DEPSTRUCT;
-#endif
-
-} png_info;
-
+typedef struct png_info_def png_info;
typedef png_info FAR * png_infop;
+typedef PNG_CONST png_info FAR * png_const_infop;
typedef png_info FAR * FAR * png_infopp;
/* Maximum positive integer used in PNG is (2^31)-1 */
@@ -871,6 +673,12 @@ typedef png_info FAR * FAR * png_infopp;
#define PNG_UINT_32_MAX ((png_uint_32)(-1))
#define PNG_SIZE_MAX ((png_size_t)(-1))
+/* These are constants for fixed point values encoded in the
+ * PNG specification manner (x100000)
+ */
+#define PNG_FP_1 100000
+#define PNG_FP_HALF 50000
+
/* These describe the color_type field in png_info. */
/* color type masks */
#define PNG_COLOR_MASK_PALETTE 1
@@ -965,11 +773,11 @@ typedef png_info FAR * FAR * png_infopp;
*/
typedef struct png_row_info_struct
{
- png_uint_32 width; /* width of row */
- png_size_t rowbytes; /* number of bytes in row */
- png_byte color_type; /* color type of row */
- png_byte bit_depth; /* bit depth of row */
- png_byte channels; /* number of channels (1, 2, 3, or 4) */
+ png_uint_32 width; /* width of row */
+ png_size_t rowbytes; /* number of bytes in row */
+ png_byte color_type; /* color type of row */
+ png_byte bit_depth; /* bit depth of row */
+ png_byte channels; /* number of channels (1, 2, 3, or 4) */
png_byte pixel_depth; /* bits per pixel (depth * channels) */
} png_row_info;
@@ -980,44 +788,65 @@ typedef png_row_info FAR * FAR * png_row_infopp;
* that allow the user to override the default I/O functions with his or her
* own. The png_error_ptr type should match that of user-supplied warning
* and error functions, while the png_rw_ptr type should match that of the
- * user read/write data functions.
+ * user read/write data functions. Note that the 'write' function must not
+ * modify the buffer it is passed. The 'read' function, on the other hand, is
+ * expected to return the read data in the buffer.
*/
typedef struct png_struct_def png_struct;
+typedef PNG_CONST png_struct FAR * png_const_structp;
typedef png_struct FAR * png_structp;
-typedef void (PNGAPI *png_error_ptr) PNGARG((png_structp, png_const_charp));
-typedef void (PNGAPI *png_rw_ptr) PNGARG((png_structp, png_bytep, png_size_t));
-typedef void (PNGAPI *png_flush_ptr) PNGARG((png_structp));
-typedef void (PNGAPI *png_read_status_ptr) PNGARG((png_structp, png_uint_32,
- int));
-typedef void (PNGAPI *png_write_status_ptr) PNGARG((png_structp, png_uint_32,
- int));
+typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp), );
+typedef PNG_CALLBACK(void, *png_rw_ptr, (png_structp, png_bytep, png_size_t), );
+typedef PNG_CALLBACK(void, *png_flush_ptr, (png_structp), );
+typedef PNG_CALLBACK(void, *png_read_status_ptr, (png_structp, png_uint_32,
+ int), );
+typedef PNG_CALLBACK(void, *png_write_status_ptr, (png_structp, png_uint_32,
+ int), );
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-typedef void (PNGAPI *png_progressive_info_ptr) PNGARG((png_structp, png_infop));
-typedef void (PNGAPI *png_progressive_end_ptr) PNGARG((png_structp, png_infop));
-typedef void (PNGAPI *png_progressive_row_ptr) PNGARG((png_structp, png_bytep,
- png_uint_32, int));
+typedef PNG_CALLBACK(void, *png_progressive_info_ptr,
+ (png_structp, png_infop), );
+typedef PNG_CALLBACK(void, *png_progressive_end_ptr,
+ (png_structp, png_infop), );
+typedef PNG_CALLBACK(void, *png_progressive_row_ptr,
+ (png_structp, png_bytep, png_uint_32, int), );
#endif
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-typedef void (PNGAPI *png_user_transform_ptr) PNGARG((png_structp,
- png_row_infop, png_bytep));
+typedef PNG_CALLBACK(void, *png_user_transform_ptr,
+ (png_structp, png_row_infop, png_bytep), );
#endif
#ifdef PNG_USER_CHUNKS_SUPPORTED
-typedef int (PNGAPI *png_user_chunk_ptr) PNGARG((png_structp, png_unknown_chunkp));
+typedef PNG_CALLBACK(int, *png_user_chunk_ptr, (png_structp,
+ png_unknown_chunkp), );
#endif
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
-typedef void (PNGAPI *png_unknown_chunk_ptr) PNGARG((png_structp));
+typedef PNG_CALLBACK(void, *png_unknown_chunk_ptr, (png_structp), );
#endif
+
#ifdef PNG_SETJMP_SUPPORTED
/* This must match the function definition in <setjmp.h>, and the
* application must include this before png.h to obtain the definition
- * of jmp_buf.
+ * of jmp_buf. The function is required to be PNG_NORETURN. (Note that
+ * PNG_PTR_NORETURN is used here because current versions of the Microsoft
+ * C compiler do not support the PNG_NORETURN attribute on a pointer.)
+ *
+ * If you get a type warning from the compiler when linking against this line
+ * then your compiler has 'longjmp' that does not match the requirements of the
+ * compiler that built libpng. You will have to write a wrapper function for
+ * your compiler's longjmp and call png_set_longjmp_fn directly (not via the
+ * png_jmpbuf macro.)
+ *
+ * If you get a warning here while building the library you will need to make
+ * changes to ensure that pnglibconf.h records the calling convention used by
+ * your compiler. This may be very difficult - try using a different compiler
+ * to build the library!
*/
-typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int));
+typedef PNG_FUNCTION(void, (PNGCAPI *png_longjmp_ptr), PNGARG((jmp_buf, int)),
+ PNG_PTR_NORETURN);
#endif
/* Transform masks for the high-level interface */
@@ -1045,350 +874,85 @@ typedef void (PNGAPI *png_longjmp_ptr) PNGARG((jmp_buf, int));
#define PNG_FLAG_MNG_FILTER_64 0x04
#define PNG_ALL_MNG_FEATURES 0x05
-typedef png_voidp (*png_malloc_ptr) PNGARG((png_structp, png_alloc_size_t));
-typedef void (*png_free_ptr) PNGARG((png_structp, png_voidp));
-
-/* The structure that holds the information to read and write PNG files.
- * The only people who need to care about what is inside of this are the
- * people who will be modifying the library for their own special needs.
- * It should NOT be accessed directly by an application, except to store
- * the jmp_buf.
- */
-
-struct png_struct_def
-{
-#ifdef PNG_SETJMP_SUPPORTED
- jmp_buf jmpbuf PNG_DEPSTRUCT; /* used in png_error */
- png_longjmp_ptr longjmp_fn PNG_DEPSTRUCT;/* setjmp non-local goto function. */
-#endif
- png_error_ptr error_fn PNG_DEPSTRUCT; /* function for printing errors and aborting */
- png_error_ptr warning_fn PNG_DEPSTRUCT; /* function for printing warnings */
- png_voidp error_ptr PNG_DEPSTRUCT; /* user supplied struct for error functions */
- png_rw_ptr write_data_fn PNG_DEPSTRUCT; /* function for writing output data */
- png_rw_ptr read_data_fn PNG_DEPSTRUCT; /* function for reading input data */
- png_voidp io_ptr PNG_DEPSTRUCT; /* ptr to application struct for I/O functions */
-
-#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
- png_user_transform_ptr read_user_transform_fn PNG_DEPSTRUCT; /* user read transform */
-#endif
-
-#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
- png_user_transform_ptr write_user_transform_fn PNG_DEPSTRUCT; /* user write transform */
-#endif
-
-/* These were added in libpng-1.0.2 */
-#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
- png_voidp user_transform_ptr PNG_DEPSTRUCT; /* user supplied struct for user transform */
- png_byte user_transform_depth PNG_DEPSTRUCT; /* bit depth of user transformed pixels */
- png_byte user_transform_channels PNG_DEPSTRUCT; /* channels in user transformed pixels */
-#endif
-#endif
-
- png_uint_32 mode PNG_DEPSTRUCT; /* tells us where we are in the PNG file */
- png_uint_32 flags PNG_DEPSTRUCT; /* flags indicating various things to libpng */
- png_uint_32 transformations PNG_DEPSTRUCT; /* which transformations to perform */
-
- z_stream zstream PNG_DEPSTRUCT; /* pointer to decompression structure (below) */
- png_bytep zbuf PNG_DEPSTRUCT; /* buffer for zlib */
- png_size_t zbuf_size PNG_DEPSTRUCT; /* size of zbuf */
- int zlib_level PNG_DEPSTRUCT; /* holds zlib compression level */
- int zlib_method PNG_DEPSTRUCT; /* holds zlib compression method */
- int zlib_window_bits PNG_DEPSTRUCT; /* holds zlib compression window bits */
- int zlib_mem_level PNG_DEPSTRUCT; /* holds zlib compression memory level */
- int zlib_strategy PNG_DEPSTRUCT; /* holds zlib compression strategy */
-
- png_uint_32 width PNG_DEPSTRUCT; /* width of image in pixels */
- png_uint_32 height PNG_DEPSTRUCT; /* height of image in pixels */
- png_uint_32 num_rows PNG_DEPSTRUCT; /* number of rows in current pass */
- png_uint_32 usr_width PNG_DEPSTRUCT; /* width of row at start of write */
- png_size_t rowbytes PNG_DEPSTRUCT; /* size of row in bytes */
- png_size_t irowbytes PNG_DEPSTRUCT; /* size of current interlaced row in bytes */
- png_uint_32 iwidth PNG_DEPSTRUCT; /* width of current interlaced row in pixels */
- png_uint_32 row_number PNG_DEPSTRUCT; /* current row in interlace pass */
- png_bytep prev_row PNG_DEPSTRUCT; /* buffer to save previous (unfiltered) row */
- png_bytep row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */
- png_bytep sub_row PNG_DEPSTRUCT; /* buffer to save "sub" row when filtering */
- png_bytep up_row PNG_DEPSTRUCT; /* buffer to save "up" row when filtering */
- png_bytep avg_row PNG_DEPSTRUCT; /* buffer to save "avg" row when filtering */
- png_bytep paeth_row PNG_DEPSTRUCT; /* buffer to save "Paeth" row when filtering */
- png_row_info row_info PNG_DEPSTRUCT; /* used for transformation routines */
-
- png_uint_32 idat_size PNG_DEPSTRUCT; /* current IDAT size for read */
- png_uint_32 crc PNG_DEPSTRUCT; /* current chunk CRC value */
- png_colorp palette PNG_DEPSTRUCT; /* palette from the input file */
- png_uint_16 num_palette PNG_DEPSTRUCT; /* number of color entries in palette */
- png_uint_16 num_trans PNG_DEPSTRUCT; /* number of transparency values */
- png_byte chunk_name[5] PNG_DEPSTRUCT; /* null-terminated name of current chunk */
- png_byte compression PNG_DEPSTRUCT; /* file compression type (always 0) */
- png_byte filter PNG_DEPSTRUCT; /* file filter type (always 0) */
- png_byte interlaced PNG_DEPSTRUCT; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
- png_byte pass PNG_DEPSTRUCT; /* current interlace pass (0 - 6) */
- png_byte do_filter PNG_DEPSTRUCT; /* row filter flags (see PNG_FILTER_ below ) */
- png_byte color_type PNG_DEPSTRUCT; /* color type of file */
- png_byte bit_depth PNG_DEPSTRUCT; /* bit depth of file */
- png_byte usr_bit_depth PNG_DEPSTRUCT; /* bit depth of users row */
- png_byte pixel_depth PNG_DEPSTRUCT; /* number of bits per pixel */
- png_byte channels PNG_DEPSTRUCT; /* number of channels in file */
- png_byte usr_channels PNG_DEPSTRUCT; /* channels at start of write */
- png_byte sig_bytes PNG_DEPSTRUCT; /* magic bytes read/written from start of file */
-
-#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
- png_uint_16 filler PNG_DEPSTRUCT; /* filler bytes for pixel expansion */
-#endif
-
-#ifdef PNG_bKGD_SUPPORTED
- png_byte background_gamma_type PNG_DEPSTRUCT;
-# ifdef PNG_FLOATING_POINT_SUPPORTED
- float background_gamma PNG_DEPSTRUCT;
-# endif
- png_color_16 background PNG_DEPSTRUCT; /* background color in screen gamma space */
-#ifdef PNG_READ_GAMMA_SUPPORTED
- png_color_16 background_1 PNG_DEPSTRUCT; /* background normalized to gamma 1.0 */
-#endif
-#endif /* PNG_bKGD_SUPPORTED */
-
-#ifdef PNG_WRITE_FLUSH_SUPPORTED
- png_flush_ptr output_flush_fn PNG_DEPSTRUCT; /* Function for flushing output */
- png_uint_32 flush_dist PNG_DEPSTRUCT; /* how many rows apart to flush, 0 - no flush */
- png_uint_32 flush_rows PNG_DEPSTRUCT; /* number of rows written since last flush */
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- int gamma_shift PNG_DEPSTRUCT; /* number of "insignificant" bits 16-bit gamma */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- float gamma PNG_DEPSTRUCT; /* file gamma value */
- float screen_gamma PNG_DEPSTRUCT; /* screen gamma value (display_exponent) */
-#endif
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- png_bytep gamma_table PNG_DEPSTRUCT; /* gamma table for 8-bit depth files */
- png_bytep gamma_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */
- png_bytep gamma_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */
- png_uint_16pp gamma_16_table PNG_DEPSTRUCT; /* gamma table for 16-bit depth files */
- png_uint_16pp gamma_16_from_1 PNG_DEPSTRUCT; /* converts from 1.0 to screen */
- png_uint_16pp gamma_16_to_1 PNG_DEPSTRUCT; /* converts from file to 1.0 */
-#endif
-
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
- png_color_8 sig_bit PNG_DEPSTRUCT; /* significant bits in each available channel */
-#endif
-
-#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
- png_color_8 shift PNG_DEPSTRUCT; /* shift for significant bit tranformation */
-#endif
-
-#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
- || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- png_bytep trans_alpha PNG_DEPSTRUCT; /* alpha values for paletted files */
- png_color_16 trans_color PNG_DEPSTRUCT; /* transparent color for non-paletted files */
-#endif
-
- png_read_status_ptr read_row_fn PNG_DEPSTRUCT; /* called after each row is decoded */
- png_write_status_ptr write_row_fn PNG_DEPSTRUCT; /* called after each row is encoded */
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
- png_progressive_info_ptr info_fn PNG_DEPSTRUCT; /* called after header data fully read */
- png_progressive_row_ptr row_fn PNG_DEPSTRUCT; /* called after each prog. row is decoded */
- png_progressive_end_ptr end_fn PNG_DEPSTRUCT; /* called after image is complete */
- png_bytep save_buffer_ptr PNG_DEPSTRUCT; /* current location in save_buffer */
- png_bytep save_buffer PNG_DEPSTRUCT; /* buffer for previously read data */
- png_bytep current_buffer_ptr PNG_DEPSTRUCT; /* current location in current_buffer */
- png_bytep current_buffer PNG_DEPSTRUCT; /* buffer for recently used data */
- png_uint_32 push_length PNG_DEPSTRUCT; /* size of current input chunk */
- png_uint_32 skip_length PNG_DEPSTRUCT; /* bytes to skip in input data */
- png_size_t save_buffer_size PNG_DEPSTRUCT; /* amount of data now in save_buffer */
- png_size_t save_buffer_max PNG_DEPSTRUCT; /* total size of save_buffer */
- png_size_t buffer_size PNG_DEPSTRUCT; /* total amount of available input data */
- png_size_t current_buffer_size PNG_DEPSTRUCT; /* amount of data now in current_buffer */
- int process_mode PNG_DEPSTRUCT; /* what push library is currently doing */
- int cur_palette PNG_DEPSTRUCT; /* current push library palette index */
-
-# ifdef PNG_TEXT_SUPPORTED
- png_size_t current_text_size PNG_DEPSTRUCT; /* current size of text input data */
- png_size_t current_text_left PNG_DEPSTRUCT; /* how much text left to read in input */
- png_charp current_text PNG_DEPSTRUCT; /* current text chunk buffer */
- png_charp current_text_ptr PNG_DEPSTRUCT; /* current location in current_text */
-# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
-
-#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-
-#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
-/* For the Borland special 64K segment handler */
- png_bytepp offset_table_ptr PNG_DEPSTRUCT;
- png_bytep offset_table PNG_DEPSTRUCT;
- png_uint_16 offset_table_number PNG_DEPSTRUCT;
- png_uint_16 offset_table_count PNG_DEPSTRUCT;
- png_uint_16 offset_table_count_free PNG_DEPSTRUCT;
-#endif
-
-#ifdef PNG_READ_DITHER_SUPPORTED
- png_bytep palette_lookup PNG_DEPSTRUCT; /* lookup table for dithering */
- png_bytep dither_index PNG_DEPSTRUCT; /* index translation for palette files */
-#endif
-
-#if defined(PNG_READ_DITHER_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
- png_uint_16p hist PNG_DEPSTRUCT; /* histogram */
-#endif
-
-#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
- png_byte heuristic_method PNG_DEPSTRUCT; /* heuristic for row filter selection */
- png_byte num_prev_filters PNG_DEPSTRUCT; /* number of weights for previous rows */
- png_bytep prev_filters PNG_DEPSTRUCT; /* filter type(s) of previous row(s) */
- png_uint_16p filter_weights PNG_DEPSTRUCT; /* weight(s) for previous line(s) */
- png_uint_16p inv_filter_weights PNG_DEPSTRUCT; /* 1/weight(s) for previous line(s) */
- png_uint_16p filter_costs PNG_DEPSTRUCT; /* relative filter calculation cost */
- png_uint_16p inv_filter_costs PNG_DEPSTRUCT; /* 1/relative filter calculation cost */
-#endif
-
-#ifdef PNG_TIME_RFC1123_SUPPORTED
- png_charp time_buffer PNG_DEPSTRUCT; /* String to hold RFC 1123 time text */
-#endif
-
-/* New members added in libpng-1.0.6 */
-
- png_uint_32 free_me PNG_DEPSTRUCT; /* flags items libpng is responsible for freeing */
-
-#ifdef PNG_USER_CHUNKS_SUPPORTED
- png_voidp user_chunk_ptr PNG_DEPSTRUCT;
- png_user_chunk_ptr read_user_chunk_fn PNG_DEPSTRUCT; /* user read chunk handler */
-#endif
-
-#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
- int num_chunk_list PNG_DEPSTRUCT;
- png_bytep chunk_list PNG_DEPSTRUCT;
-#endif
-
-/* New members added in libpng-1.0.3 */
-#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
- png_byte rgb_to_gray_status PNG_DEPSTRUCT;
- /* These were changed from png_byte in libpng-1.0.6 */
- png_uint_16 rgb_to_gray_red_coeff PNG_DEPSTRUCT;
- png_uint_16 rgb_to_gray_green_coeff PNG_DEPSTRUCT;
- png_uint_16 rgb_to_gray_blue_coeff PNG_DEPSTRUCT;
-#endif
-
-/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
-#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
- defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
- defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
-/* Changed from png_byte to png_uint_32 at version 1.2.0 */
- png_uint_32 mng_features_permitted PNG_DEPSTRUCT;
-#endif
-
-/* New member added in libpng-1.0.7 */
-#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
- png_fixed_point int_gamma PNG_DEPSTRUCT;
-#endif
-
-/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
-#ifdef PNG_MNG_FEATURES_SUPPORTED
- png_byte filter_type PNG_DEPSTRUCT;
-#endif
-
-/* New members added in libpng-1.2.0 */
-
-/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
-#ifdef PNG_USER_MEM_SUPPORTED
- png_voidp mem_ptr PNG_DEPSTRUCT; /* user supplied struct for mem functions */
- png_malloc_ptr malloc_fn PNG_DEPSTRUCT; /* function for allocating memory */
- png_free_ptr free_fn PNG_DEPSTRUCT; /* function for freeing memory */
-#endif
-
-/* New member added in libpng-1.0.13 and 1.2.0 */
- png_bytep big_row_buf PNG_DEPSTRUCT; /* buffer to save current (unfiltered) row */
-
-#ifdef PNG_READ_DITHER_SUPPORTED
-/* The following three members were added at version 1.0.14 and 1.2.4 */
- png_bytep dither_sort PNG_DEPSTRUCT; /* working sort array */
- png_bytep index_to_palette PNG_DEPSTRUCT; /* where the original index currently is */
- /* in the palette */
- png_bytep palette_to_index PNG_DEPSTRUCT; /* which original index points to this */
- /* palette color */
-#endif
-
-/* New members added in libpng-1.0.16 and 1.2.6 */
- png_byte compression_type PNG_DEPSTRUCT;
-
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- png_uint_32 user_width_max PNG_DEPSTRUCT;
- png_uint_32 user_height_max PNG_DEPSTRUCT;
- /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown
- * chunks that can be stored (0x7fffffff means unlimited).
- */
- png_uint_32 user_chunk_cache_max PNG_DEPSTRUCT;
-#endif
-
-/* New member added in libpng-1.0.25 and 1.2.17 */
-#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
- /* Storage for unknown chunk that the library doesn't recognize. */
- png_unknown_chunk unknown_chunk PNG_DEPSTRUCT;
-#endif
-
-/* New members added in libpng-1.2.26 */
- png_uint_32 old_big_row_buf_size PNG_DEPSTRUCT;
- png_uint_32 old_prev_row_size PNG_DEPSTRUCT;
-
-/* New member added in libpng-1.2.30 */
- png_charp chunkdata PNG_DEPSTRUCT; /* buffer for reading chunk data */
-
-/* New member added in libpng-1.4.0 */
-#ifdef PNG_IO_STATE_SUPPORTED
- png_uint_32 io_state PNG_DEPSTRUCT;
-#endif
-};
-
-
-/* This triggers a compiler error in png.c, if png.c and png.h
- * do not agree upon the version number.
+/* NOTE: prior to 1.5 these functions had no 'API' style declaration,
+ * this allowed the zlib default functions to be used on Windows
+ * platforms. In 1.5 the zlib default malloc (which just calls malloc and
+ * ignores the first argument) should be completely compatible with the
+ * following.
*/
-typedef png_structp version_1_4_0;
+typedef PNG_CALLBACK(png_voidp, *png_malloc_ptr, (png_structp,
+ png_alloc_size_t), );
+typedef PNG_CALLBACK(void, *png_free_ptr, (png_structp, png_voidp), );
typedef png_struct FAR * FAR * png_structpp;
-/* Here are the function definitions most commonly used. This is not
- * the place to find out how to use libpng. See libpng.txt for the
+/* Section 3: exported functions
+ * Here are the function definitions most commonly used. This is not
+ * the place to find out how to use libpng. See libpng-manual.txt for the
* full explanation, see example.c for the summary. This just provides
* a simple one line description of the use of each function.
+ *
+ * The PNG_EXPORT() and PNG_EXPORTA() macros used below are defined in
+ * pngconf.h and in the *.dfn files in the scripts directory.
+ *
+ * PNG_EXPORT(ordinal, type, name, (args));
+ *
+ * ordinal: ordinal that is used while building
+ * *.def files. The ordinal value is only
+ * relevant when preprocessing png.h with
+ * the *.dfn files for building symbol table
+ * entries, and are removed by pngconf.h.
+ * type: return type of the function
+ * name: function name
+ * args: function arguments, with types
+ *
+ * When we wish to append attributes to a function prototype we use
+ * the PNG_EXPORTA() macro instead.
+ *
+ * PNG_EXPORTA(ordinal, type, name, (args), attributes);
+ *
+ * ordinal, type, name, and args: same as in PNG_EXPORT().
+ * attributes: function attributes
*/
/* Returns the version number of the library */
-extern PNG_EXPORT(png_uint_32,png_access_version_number) PNGARG((void));
+PNG_EXPORT(1, png_uint_32, png_access_version_number, (void));
/* Tell lib we have already handled the first <num_bytes> magic bytes.
* Handling more than 8 bytes from the beginning of the file is an error.
*/
-extern PNG_EXPORT(void,png_set_sig_bytes) PNGARG((png_structp png_ptr,
- int num_bytes));
+PNG_EXPORT(2, void, png_set_sig_bytes, (png_structp png_ptr, int num_bytes));
/* Check sig[start] through sig[start + num_to_check - 1] to see if it's a
* PNG file. Returns zero if the supplied bytes match the 8-byte PNG
* signature, and non-zero otherwise. Having num_to_check == 0 or
* start > 7 will always fail (ie return non-zero).
*/
-extern PNG_EXPORT(int,png_sig_cmp) PNGARG((png_bytep sig, png_size_t start,
- png_size_t num_to_check));
+PNG_EXPORT(3, int, png_sig_cmp, (png_const_bytep sig, png_size_t start,
+ png_size_t num_to_check));
+
+/* Simple signature checking function. This is the same as calling
+ * png_check_sig(sig, n) := !png_sig_cmp(sig, 0, n).
+ */
+#define png_check_sig(sig, n) !png_sig_cmp((sig), 0, (n))
/* Allocate and initialize png_ptr struct for reading, and any other memory. */
-extern PNG_EXPORT(png_structp,png_create_read_struct)
- PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
+PNG_EXPORTA(4, png_structp, png_create_read_struct,
+ (png_const_charp user_png_ver, png_voidp error_ptr,
+ png_error_ptr error_fn, png_error_ptr warn_fn),
+ PNG_ALLOCATED);
/* Allocate and initialize png_ptr struct for writing, and any other memory */
-extern PNG_EXPORT(png_structp,png_create_write_struct)
- PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn)) PNG_ALLOCATED;
+PNG_EXPORTA(5, png_structp, png_create_write_struct,
+ (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
+ png_error_ptr warn_fn),
+ PNG_ALLOCATED);
-#ifdef PNG_WRITE_SUPPORTED
-extern PNG_EXPORT(png_size_t,png_get_compression_buffer_size)
- PNGARG((png_structp png_ptr));
-#endif
+PNG_EXPORT(6, png_size_t, png_get_compression_buffer_size,
+ (png_const_structp png_ptr));
-#ifdef PNG_WRITE_SUPPORTED
-extern PNG_EXPORT(void,png_set_compression_buffer_size)
- PNGARG((png_structp png_ptr, png_size_t size));
-#endif
+PNG_EXPORT(7, void, png_set_compression_buffer_size, (png_structp png_ptr,
+ png_size_t size));
/* Moved from pngconf.h in 1.4.0 and modified to ensure setjmp/longjmp
* match up.
@@ -1401,283 +965,312 @@ extern PNG_EXPORT(void,png_set_compression_buffer_size)
* allocated by the library - the call will return NULL on a mismatch
* indicating an ABI mismatch.
*/
-extern PNG_EXPORT(jmp_buf*, png_set_longjmp_fn)
- PNGARG((png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
+PNG_EXPORT(8, jmp_buf*, png_set_longjmp_fn, (png_structp png_ptr,
+ png_longjmp_ptr longjmp_fn, size_t jmp_buf_size));
# define png_jmpbuf(png_ptr) \
- (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
+ (*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf)))
#else
# define png_jmpbuf(png_ptr) \
- (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
+ (LIBPNG_WAS_COMPILED_WITH__PNG_NO_SETJMP)
#endif
+/* This function should be used by libpng applications in place of
+ * longjmp(png_ptr->jmpbuf, val). If longjmp_fn() has been set, it
+ * will use it; otherwise it will call PNG_ABORT(). This function was
+ * added in libpng-1.5.0.
+ */
+PNG_EXPORTA(9, void, png_longjmp, (png_structp png_ptr, int val),
+ PNG_NORETURN);
+#ifdef PNG_READ_SUPPORTED
/* Reset the compression stream */
-extern PNG_EXPORT(int,png_reset_zstream) PNGARG((png_structp png_ptr));
+PNG_EXPORT(10, int, png_reset_zstream, (png_structp png_ptr));
+#endif
/* New functions added in libpng-1.0.2 (not enabled by default until 1.2.0) */
#ifdef PNG_USER_MEM_SUPPORTED
-extern PNG_EXPORT(png_structp,png_create_read_struct_2)
- PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
- png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
-extern PNG_EXPORT(png_structp,png_create_write_struct_2)
- PNGARG((png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
- png_malloc_ptr malloc_fn, png_free_ptr free_fn)) PNG_ALLOCATED;
+PNG_EXPORTA(11, png_structp, png_create_read_struct_2,
+ (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
+ png_error_ptr warn_fn,
+ png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
+ PNG_ALLOCATED);
+PNG_EXPORTA(12, png_structp, png_create_write_struct_2,
+ (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn,
+ png_error_ptr warn_fn,
+ png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn),
+ PNG_ALLOCATED);
#endif
/* Write the PNG file signature. */
-extern PNG_EXPORT(void,png_write_sig) PNGARG((png_structp png_ptr));
+PNG_EXPORT(13, void, png_write_sig, (png_structp png_ptr));
/* Write a PNG chunk - size, type, (optional) data, CRC. */
-extern PNG_EXPORT(void,png_write_chunk) PNGARG((png_structp png_ptr,
- png_bytep chunk_name, png_bytep data, png_size_t length));
+PNG_EXPORT(14, void, png_write_chunk, (png_structp png_ptr, png_const_bytep
+ chunk_name, png_const_bytep data, png_size_t length));
/* Write the start of a PNG chunk - length and chunk name. */
-extern PNG_EXPORT(void,png_write_chunk_start) PNGARG((png_structp png_ptr,
- png_bytep chunk_name, png_uint_32 length));
+PNG_EXPORT(15, void, png_write_chunk_start, (png_structp png_ptr,
+ png_const_bytep chunk_name, png_uint_32 length));
/* Write the data of a PNG chunk started with png_write_chunk_start(). */
-extern PNG_EXPORT(void,png_write_chunk_data) PNGARG((png_structp png_ptr,
- png_bytep data, png_size_t length));
+PNG_EXPORT(16, void, png_write_chunk_data, (png_structp png_ptr,
+ png_const_bytep data, png_size_t length));
/* Finish a chunk started with png_write_chunk_start() (includes CRC). */
-extern PNG_EXPORT(void,png_write_chunk_end) PNGARG((png_structp png_ptr));
+PNG_EXPORT(17, void, png_write_chunk_end, (png_structp png_ptr));
/* Allocate and initialize the info structure */
-extern PNG_EXPORT(png_infop,png_create_info_struct)
- PNGARG((png_structp png_ptr)) PNG_ALLOCATED;
+PNG_EXPORTA(18, png_infop, png_create_info_struct, (png_structp png_ptr),
+ PNG_ALLOCATED);
-extern PNG_EXPORT(void,png_info_init_3) PNGARG((png_infopp info_ptr,
+PNG_EXPORT(19, void, png_info_init_3, (png_infopp info_ptr,
png_size_t png_info_struct_size));
/* Writes all the PNG information before the image. */
-extern PNG_EXPORT(void,png_write_info_before_PLTE) PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-extern PNG_EXPORT(void,png_write_info) PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+PNG_EXPORT(20, void, png_write_info_before_PLTE,
+ (png_structp png_ptr, png_infop info_ptr));
+PNG_EXPORT(21, void, png_write_info,
+ (png_structp png_ptr, png_infop info_ptr));
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the information before the actual image data. */
-extern PNG_EXPORT(void,png_read_info) PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+PNG_EXPORT(22, void, png_read_info,
+ (png_structp png_ptr, png_infop info_ptr));
#endif
#ifdef PNG_TIME_RFC1123_SUPPORTED
-extern PNG_EXPORT(png_charp,png_convert_to_rfc1123)
- PNGARG((png_structp png_ptr, png_timep ptime));
+PNG_EXPORT(23, png_const_charp, png_convert_to_rfc1123,
+ (png_structp png_ptr,
+ png_const_timep ptime));
#endif
#ifdef PNG_CONVERT_tIME_SUPPORTED
/* Convert from a struct tm to png_time */
-extern PNG_EXPORT(void,png_convert_from_struct_tm) PNGARG((png_timep ptime,
- struct tm FAR * ttime));
+PNG_EXPORT(24, void, png_convert_from_struct_tm, (png_timep ptime,
+ PNG_CONST struct tm FAR * ttime));
/* Convert from time_t to png_time. Uses gmtime() */
-extern PNG_EXPORT(void,png_convert_from_time_t) PNGARG((png_timep ptime,
- time_t ttime));
+PNG_EXPORT(25, void, png_convert_from_time_t,
+ (png_timep ptime, time_t ttime));
#endif /* PNG_CONVERT_tIME_SUPPORTED */
#ifdef PNG_READ_EXPAND_SUPPORTED
/* Expand data to 24-bit RGB, or 8-bit grayscale, with alpha if available. */
-extern PNG_EXPORT(void,png_set_expand) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(void,png_set_expand_gray_1_2_4_to_8) PNGARG((png_structp
- png_ptr));
-extern PNG_EXPORT(void,png_set_palette_to_rgb) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(void,png_set_tRNS_to_alpha) PNGARG((png_structp png_ptr));
+PNG_EXPORT(26, void, png_set_expand, (png_structp png_ptr));
+PNG_EXPORT(27, void, png_set_expand_gray_1_2_4_to_8, (png_structp png_ptr));
+PNG_EXPORT(28, void, png_set_palette_to_rgb, (png_structp png_ptr));
+PNG_EXPORT(29, void, png_set_tRNS_to_alpha, (png_structp png_ptr));
#endif
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* Use blue, green, red order for pixels. */
-extern PNG_EXPORT(void,png_set_bgr) PNGARG((png_structp png_ptr));
+PNG_EXPORT(30, void, png_set_bgr, (png_structp png_ptr));
#endif
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
/* Expand the grayscale to 24-bit RGB if necessary. */
-extern PNG_EXPORT(void,png_set_gray_to_rgb) PNGARG((png_structp png_ptr));
+PNG_EXPORT(31, void, png_set_gray_to_rgb, (png_structp png_ptr));
#endif
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
/* Reduce RGB to grayscale. */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_rgb_to_gray) PNGARG((png_structp png_ptr,
- int error_action, double red, double green ));
-#endif
-extern PNG_EXPORT(void,png_set_rgb_to_gray_fixed) PNGARG((png_structp png_ptr,
- int error_action, png_fixed_point red, png_fixed_point green ));
-extern PNG_EXPORT(png_byte,png_get_rgb_to_gray_status) PNGARG((png_structp
- png_ptr));
+PNG_FP_EXPORT(32, void, png_set_rgb_to_gray, (png_structp png_ptr,
+ int error_action, double red, double green));
+PNG_FIXED_EXPORT(33, void, png_set_rgb_to_gray_fixed, (png_structp png_ptr,
+ int error_action, png_fixed_point red, png_fixed_point green));
+
+PNG_EXPORT(34, png_byte, png_get_rgb_to_gray_status, (png_const_structp
+ png_ptr));
#endif
-extern PNG_EXPORT(void,png_build_grayscale_palette) PNGARG((int bit_depth,
- png_colorp palette));
+PNG_EXPORT(35, void, png_build_grayscale_palette, (int bit_depth,
+ png_colorp palette));
#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
-extern PNG_EXPORT(void,png_set_strip_alpha) PNGARG((png_structp png_ptr));
+PNG_EXPORT(36, void, png_set_strip_alpha, (png_structp png_ptr));
#endif
#if defined(PNG_READ_SWAP_ALPHA_SUPPORTED) || \
defined(PNG_WRITE_SWAP_ALPHA_SUPPORTED)
-extern PNG_EXPORT(void,png_set_swap_alpha) PNGARG((png_structp png_ptr));
+PNG_EXPORT(37, void, png_set_swap_alpha, (png_structp png_ptr));
#endif
#if defined(PNG_READ_INVERT_ALPHA_SUPPORTED) || \
defined(PNG_WRITE_INVERT_ALPHA_SUPPORTED)
-extern PNG_EXPORT(void,png_set_invert_alpha) PNGARG((png_structp png_ptr));
+PNG_EXPORT(38, void, png_set_invert_alpha, (png_structp png_ptr));
#endif
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
/* Add a filler byte to 8-bit Gray or 24-bit RGB images. */
-extern PNG_EXPORT(void,png_set_filler) PNGARG((png_structp png_ptr,
- png_uint_32 filler, int flags));
+PNG_EXPORT(39, void, png_set_filler, (png_structp png_ptr, png_uint_32 filler,
+ int flags));
/* The values of the PNG_FILLER_ defines should NOT be changed */
-#define PNG_FILLER_BEFORE 0
-#define PNG_FILLER_AFTER 1
+# define PNG_FILLER_BEFORE 0
+# define PNG_FILLER_AFTER 1
/* Add an alpha byte to 8-bit Gray or 24-bit RGB images. */
-extern PNG_EXPORT(void,png_set_add_alpha) PNGARG((png_structp png_ptr,
- png_uint_32 filler, int flags));
+PNG_EXPORT(40, void, png_set_add_alpha,
+ (png_structp png_ptr, png_uint_32 filler,
+ int flags));
#endif /* PNG_READ_FILLER_SUPPORTED || PNG_WRITE_FILLER_SUPPORTED */
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* Swap bytes in 16-bit depth files. */
-extern PNG_EXPORT(void,png_set_swap) PNGARG((png_structp png_ptr));
+PNG_EXPORT(41, void, png_set_swap, (png_structp png_ptr));
#endif
#if defined(PNG_READ_PACK_SUPPORTED) || defined(PNG_WRITE_PACK_SUPPORTED)
/* Use 1 byte per pixel in 1, 2, or 4-bit depth files. */
-extern PNG_EXPORT(void,png_set_packing) PNGARG((png_structp png_ptr));
+PNG_EXPORT(42, void, png_set_packing, (png_structp png_ptr));
#endif
-#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
+#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
+ defined(PNG_WRITE_PACKSWAP_SUPPORTED)
/* Swap packing order of pixels in bytes. */
-extern PNG_EXPORT(void,png_set_packswap) PNGARG((png_structp png_ptr));
+PNG_EXPORT(43, void, png_set_packswap, (png_structp png_ptr));
#endif
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
/* Converts files to legal bit depths. */
-extern PNG_EXPORT(void,png_set_shift) PNGARG((png_structp png_ptr,
- png_color_8p true_bits));
+PNG_EXPORT(44, void, png_set_shift, (png_structp png_ptr, png_const_color_8p
+ true_bits));
#endif
#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
defined(PNG_WRITE_INTERLACING_SUPPORTED)
-/* Have the code handle the interlacing. Returns the number of passes. */
-extern PNG_EXPORT(int,png_set_interlace_handling) PNGARG((png_structp png_ptr));
+/* Have the code handle the interlacing. Returns the number of passes.
+ * MUST be called before png_read_update_info or png_start_read_image,
+ * otherwise it will not have the desired effect. Note that it is still
+ * necessary to call png_read_row or png_read_rows png_get_image_height
+ * times for each pass.
+*/
+PNG_EXPORT(45, int, png_set_interlace_handling, (png_structp png_ptr));
#endif
#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
/* Invert monochrome files */
-extern PNG_EXPORT(void,png_set_invert_mono) PNGARG((png_structp png_ptr));
+PNG_EXPORT(46, void, png_set_invert_mono, (png_structp png_ptr));
#endif
#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* Handle alpha and tRNS by replacing with a background color. */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_background) PNGARG((png_structp png_ptr,
- png_color_16p background_color, int background_gamma_code,
- int need_expand, double background_gamma));
+PNG_FP_EXPORT(47, void, png_set_background, (png_structp png_ptr,
+ png_const_color_16p background_color, int background_gamma_code,
+ int need_expand, double background_gamma));
+PNG_FIXED_EXPORT(215, void, png_set_background_fixed, (png_structp png_ptr,
+ png_const_color_16p background_color, int background_gamma_code,
+ int need_expand, png_fixed_point background_gamma));
#endif
-#define PNG_BACKGROUND_GAMMA_UNKNOWN 0
-#define PNG_BACKGROUND_GAMMA_SCREEN 1
-#define PNG_BACKGROUND_GAMMA_FILE 2
-#define PNG_BACKGROUND_GAMMA_UNIQUE 3
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
+# define PNG_BACKGROUND_GAMMA_UNKNOWN 0
+# define PNG_BACKGROUND_GAMMA_SCREEN 1
+# define PNG_BACKGROUND_GAMMA_FILE 2
+# define PNG_BACKGROUND_GAMMA_UNIQUE 3
#endif
#ifdef PNG_READ_16_TO_8_SUPPORTED
/* Strip the second byte of information from a 16-bit depth file. */
-extern PNG_EXPORT(void,png_set_strip_16) PNGARG((png_structp png_ptr));
+PNG_EXPORT(48, void, png_set_strip_16, (png_structp png_ptr));
#endif
-#ifdef PNG_READ_DITHER_SUPPORTED
-/* Turn on dithering, and reduce the palette to the number of colors available. */
-extern PNG_EXPORT(void,png_set_dither) PNGARG((png_structp png_ptr,
- png_colorp palette, int num_palette, int maximum_colors,
- png_uint_16p histogram, int full_dither));
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+/* Turn on quantizing, and reduce the palette to the number of colors
+ * available.
+ */
+PNG_EXPORT(49, void, png_set_quantize,
+ (png_structp png_ptr, png_colorp palette,
+ int num_palette, int maximum_colors, png_const_uint_16p histogram,
+ int full_quantize));
#endif
#ifdef PNG_READ_GAMMA_SUPPORTED
+/* The threshold on gamma processing is configurable but hard-wired into the
+ * library. The following is the floating point variant.
+ */
+#define PNG_GAMMA_THRESHOLD (PNG_GAMMA_THRESHOLD_FIXED*.00001)
+
/* Handle gamma correction. Screen_gamma=(display_exponent) */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_gamma) PNGARG((png_structp png_ptr,
- double screen_gamma, double default_file_gamma));
-#endif
+PNG_FP_EXPORT(50, void, png_set_gamma,
+ (png_structp png_ptr, double screen_gamma,
+ double default_file_gamma));
+PNG_FIXED_EXPORT(208, void, png_set_gamma_fixed, (png_structp png_ptr,
+ png_fixed_point screen_gamma, png_fixed_point default_file_gamma));
#endif
-
#ifdef PNG_WRITE_FLUSH_SUPPORTED
/* Set how many lines between output flushes - 0 for no flushing */
-extern PNG_EXPORT(void,png_set_flush) PNGARG((png_structp png_ptr, int nrows));
+PNG_EXPORT(51, void, png_set_flush, (png_structp png_ptr, int nrows));
/* Flush the current PNG output buffer */
-extern PNG_EXPORT(void,png_write_flush) PNGARG((png_structp png_ptr));
+PNG_EXPORT(52, void, png_write_flush, (png_structp png_ptr));
#endif
/* Optional update palette with requested transformations */
-extern PNG_EXPORT(void,png_start_read_image) PNGARG((png_structp png_ptr));
+PNG_EXPORT(53, void, png_start_read_image, (png_structp png_ptr));
/* Optional call to update the users info structure */
-extern PNG_EXPORT(void,png_read_update_info) PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+PNG_EXPORT(54, void, png_read_update_info,
+ (png_structp png_ptr, png_infop info_ptr));
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read one or more rows of image data. */
-extern PNG_EXPORT(void,png_read_rows) PNGARG((png_structp png_ptr,
- png_bytepp row, png_bytepp display_row, png_uint_32 num_rows));
+PNG_EXPORT(55, void, png_read_rows, (png_structp png_ptr, png_bytepp row,
+ png_bytepp display_row, png_uint_32 num_rows));
#endif
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read a row of data. */
-extern PNG_EXPORT(void,png_read_row) PNGARG((png_structp png_ptr,
- png_bytep row,
- png_bytep display_row));
+PNG_EXPORT(56, void, png_read_row, (png_structp png_ptr, png_bytep row,
+ png_bytep display_row));
#endif
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the whole image into memory at once. */
-extern PNG_EXPORT(void,png_read_image) PNGARG((png_structp png_ptr,
- png_bytepp image));
+PNG_EXPORT(57, void, png_read_image, (png_structp png_ptr, png_bytepp image));
#endif
/* Write a row of image data */
-extern PNG_EXPORT(void,png_write_row) PNGARG((png_structp png_ptr,
- png_bytep row));
+PNG_EXPORT(58, void, png_write_row,
+ (png_structp png_ptr, png_const_bytep row));
-/* Write a few rows of image data */
-extern PNG_EXPORT(void,png_write_rows) PNGARG((png_structp png_ptr,
- png_bytepp row, png_uint_32 num_rows));
+/* Write a few rows of image data: (*row) is not written; however, the type
+ * is declared as writeable to maintain compatibility with previous versions
+ * of libpng and to allow the 'display_row' array from read_rows to be passed
+ * unchanged to write_rows.
+ */
+PNG_EXPORT(59, void, png_write_rows, (png_structp png_ptr, png_bytepp row,
+ png_uint_32 num_rows));
/* Write the image data */
-extern PNG_EXPORT(void,png_write_image) PNGARG((png_structp png_ptr,
- png_bytepp image));
+PNG_EXPORT(60, void, png_write_image,
+ (png_structp png_ptr, png_bytepp image));
/* Write the end of the PNG file. */
-extern PNG_EXPORT(void,png_write_end) PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+PNG_EXPORT(61, void, png_write_end,
+ (png_structp png_ptr, png_infop info_ptr));
#ifdef PNG_SEQUENTIAL_READ_SUPPORTED
/* Read the end of the PNG file. */
-extern PNG_EXPORT(void,png_read_end) PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+PNG_EXPORT(62, void, png_read_end, (png_structp png_ptr, png_infop info_ptr));
#endif
/* Free any memory associated with the png_info_struct */
-extern PNG_EXPORT(void,png_destroy_info_struct) PNGARG((png_structp png_ptr,
- png_infopp info_ptr_ptr));
+PNG_EXPORT(63, void, png_destroy_info_struct, (png_structp png_ptr,
+ png_infopp info_ptr_ptr));
/* Free any memory associated with the png_struct and the png_info_structs */
-extern PNG_EXPORT(void,png_destroy_read_struct) PNGARG((png_structpp
- png_ptr_ptr, png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
+PNG_EXPORT(64, void, png_destroy_read_struct, (png_structpp png_ptr_ptr,
+ png_infopp info_ptr_ptr, png_infopp end_info_ptr_ptr));
/* Free any memory associated with the png_struct and the png_info_structs */
-extern PNG_EXPORT(void,png_destroy_write_struct)
- PNGARG((png_structpp png_ptr_ptr, png_infopp info_ptr_ptr));
+PNG_EXPORT(65, void, png_destroy_write_struct, (png_structpp png_ptr_ptr,
+ png_infopp info_ptr_ptr));
/* Set the libpng method of handling chunk CRC errors */
-extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
- int crit_action, int ancil_action));
+PNG_EXPORT(66, void, png_set_crc_action,
+ (png_structp png_ptr, int crit_action, int ancil_action));
-/* Values for png_set_crc_action() to say how to handle CRC errors in
+/* Values for png_set_crc_action() say how to handle CRC errors in
* ancillary and critical chunks, and whether to use the data contained
* therein. Note that it is impossible to "discard" data in a critical
- * chunk. For versions prior to 0.90, the action was always error/quit,
+ * chunk. For versions prior to 0.90, the action was always error/quit,
* whereas in version 0.90 and later, the action for CRC errors in ancillary
* chunks is warn/discard. These values should NOT be changed.
*
@@ -1701,8 +1294,8 @@ extern PNG_EXPORT(void,png_set_crc_action) PNGARG((png_structp png_ptr,
/* Set the filtering method(s) used by libpng. Currently, the only valid
* value for "method" is 0.
*/
-extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
- int filters));
+PNG_EXPORT(67, void, png_set_filter,
+ (png_structp png_ptr, int method, int filters));
/* Flags for png_set_filter() to say which filters to use. The flags
* are chosen so that they don't conflict with real filter types
@@ -1757,11 +1350,13 @@ extern PNG_EXPORT(void,png_set_filter) PNGARG((png_structp png_ptr, int method,
* the weights and costs are set to 1.0, this degenerates the WEIGHTED method
* to the UNWEIGHTED method, but with added encoding time/computation.
*/
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
- int heuristic_method, int num_weights, png_doublep filter_weights,
- png_doublep filter_costs));
-#endif
+PNG_FP_EXPORT(68, void, png_set_filter_heuristics, (png_structp png_ptr,
+ int heuristic_method, int num_weights, png_const_doublep filter_weights,
+ png_const_doublep filter_costs));
+PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed,
+ (png_structp png_ptr,
+ int heuristic_method, int num_weights, png_const_fixed_point_p
+ filter_weights, png_const_fixed_point_p filter_costs));
#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
/* Heuristic used for row filter selection. These defines should NOT be
@@ -1776,36 +1371,36 @@ extern PNG_EXPORT(void,png_set_filter_heuristics) PNGARG((png_structp png_ptr,
* 0 - 9, corresponding directly to the zlib compression levels 0 - 9
* (0 - no compression, 9 - "maximal" compression). Note that tests have
* shown that zlib compression levels 3-6 usually perform as well as level 9
- * for PNG images, and do considerably fewer caclulations. In the future,
+ * for PNG images, and do considerably fewer caclulations. In the future,
* these values may not correspond directly to the zlib compression levels.
*/
-extern PNG_EXPORT(void,png_set_compression_level) PNGARG((png_structp png_ptr,
- int level));
+PNG_EXPORT(69, void, png_set_compression_level,
+ (png_structp png_ptr, int level));
-extern PNG_EXPORT(void,png_set_compression_mem_level)
- PNGARG((png_structp png_ptr, int mem_level));
+PNG_EXPORT(70, void, png_set_compression_mem_level, (png_structp png_ptr,
+ int mem_level));
-extern PNG_EXPORT(void,png_set_compression_strategy)
- PNGARG((png_structp png_ptr, int strategy));
+PNG_EXPORT(71, void, png_set_compression_strategy, (png_structp png_ptr,
+ int strategy));
-extern PNG_EXPORT(void,png_set_compression_window_bits)
- PNGARG((png_structp png_ptr, int window_bits));
+PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structp png_ptr,
+ int window_bits));
-extern PNG_EXPORT(void,png_set_compression_method) PNGARG((png_structp png_ptr,
- int method));
+PNG_EXPORT(73, void, png_set_compression_method, (png_structp png_ptr,
+ int method));
/* These next functions are called for input/output, memory, and error
- * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c,
+ * handling. They are in the file pngrio.c, pngwio.c, and pngerror.c,
* and call standard C I/O routines such as fread(), fwrite(), and
* fprintf(). These functions can be made to use other I/O routines
* at run time for those applications that need to handle I/O in a
- * different manner by calling png_set_???_fn(). See libpng.txt for
+ * different manner by calling png_set_???_fn(). See libpng-manual.txt for
* more information.
*/
#ifdef PNG_STDIO_SUPPORTED
/* Initialize the input/output for the PNG file to the default functions. */
-extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp));
+PNG_EXPORT(74, void, png_init_io, (png_structp png_ptr, png_FILE_p fp));
#endif
/* Replace the (error and abort), and warning functions with user
@@ -1816,11 +1411,12 @@ extern PNG_EXPORT(void,png_init_io) PNGARG((png_structp png_ptr, png_FILE_p fp))
* default function will be used.
*/
-extern PNG_EXPORT(void,png_set_error_fn) PNGARG((png_structp png_ptr,
- png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warning_fn));
+PNG_EXPORT(75, void, png_set_error_fn,
+ (png_structp png_ptr, png_voidp error_ptr,
+ png_error_ptr error_fn, png_error_ptr warning_fn));
/* Return the user pointer associated with the error functions */
-extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
+PNG_EXPORT(76, png_voidp, png_get_error_ptr, (png_const_structp png_ptr));
/* Replace the default data output functions with a user supplied one(s).
* If buffered output is not used, then output_flush_fn can be set to NULL.
@@ -1832,101 +1428,133 @@ extern PNG_EXPORT(png_voidp,png_get_error_ptr) PNGARG((png_structp png_ptr));
* default flush function, which uses the standard *FILE structure, will
* be used.
*/
-extern PNG_EXPORT(void,png_set_write_fn) PNGARG((png_structp png_ptr,
- png_voidp io_ptr, png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
+PNG_EXPORT(77, void, png_set_write_fn, (png_structp png_ptr, png_voidp io_ptr,
+ png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn));
/* Replace the default data input function with a user supplied one. */
-extern PNG_EXPORT(void,png_set_read_fn) PNGARG((png_structp png_ptr,
- png_voidp io_ptr, png_rw_ptr read_data_fn));
+PNG_EXPORT(78, void, png_set_read_fn, (png_structp png_ptr, png_voidp io_ptr,
+ png_rw_ptr read_data_fn));
/* Return the user pointer associated with the I/O functions */
-extern PNG_EXPORT(png_voidp,png_get_io_ptr) PNGARG((png_structp png_ptr));
+PNG_EXPORT(79, png_voidp, png_get_io_ptr, (png_structp png_ptr));
-extern PNG_EXPORT(void,png_set_read_status_fn) PNGARG((png_structp png_ptr,
- png_read_status_ptr read_row_fn));
+PNG_EXPORT(80, void, png_set_read_status_fn, (png_structp png_ptr,
+ png_read_status_ptr read_row_fn));
-extern PNG_EXPORT(void,png_set_write_status_fn) PNGARG((png_structp png_ptr,
- png_write_status_ptr write_row_fn));
+PNG_EXPORT(81, void, png_set_write_status_fn, (png_structp png_ptr,
+ png_write_status_ptr write_row_fn));
#ifdef PNG_USER_MEM_SUPPORTED
/* Replace the default memory allocation functions with user supplied one(s). */
-extern PNG_EXPORT(void,png_set_mem_fn) PNGARG((png_structp png_ptr,
- png_voidp mem_ptr, png_malloc_ptr malloc_fn, png_free_ptr free_fn));
+PNG_EXPORT(82, void, png_set_mem_fn, (png_structp png_ptr, png_voidp mem_ptr,
+ png_malloc_ptr malloc_fn, png_free_ptr free_fn));
/* Return the user pointer associated with the memory functions */
-extern PNG_EXPORT(png_voidp,png_get_mem_ptr) PNGARG((png_structp png_ptr));
+PNG_EXPORT(83, png_voidp, png_get_mem_ptr, (png_const_structp png_ptr));
#endif
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
-extern PNG_EXPORT(void,png_set_read_user_transform_fn) PNGARG((png_structp
- png_ptr, png_user_transform_ptr read_user_transform_fn));
+PNG_EXPORT(84, void, png_set_read_user_transform_fn, (png_structp png_ptr,
+ png_user_transform_ptr read_user_transform_fn));
#endif
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
-extern PNG_EXPORT(void,png_set_write_user_transform_fn) PNGARG((png_structp
- png_ptr, png_user_transform_ptr write_user_transform_fn));
+PNG_EXPORT(85, void, png_set_write_user_transform_fn, (png_structp png_ptr,
+ png_user_transform_ptr write_user_transform_fn));
#endif
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-extern PNG_EXPORT(void,png_set_user_transform_info) PNGARG((png_structp
- png_ptr, png_voidp user_transform_ptr, int user_transform_depth,
- int user_transform_channels));
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
+PNG_EXPORT(86, void, png_set_user_transform_info, (png_structp png_ptr,
+ png_voidp user_transform_ptr, int user_transform_depth,
+ int user_transform_channels));
/* Return the user pointer associated with the user transform functions */
-extern PNG_EXPORT(png_voidp,png_get_user_transform_ptr)
- PNGARG((png_structp png_ptr));
+PNG_EXPORT(87, png_voidp, png_get_user_transform_ptr,
+ (png_const_structp png_ptr));
+#endif
+
+#ifdef PNG_USER_TRANSFORM_INFO_SUPPORTED
+/* Return information about the row currently being processed. Note that these
+ * APIs do not fail but will return unexpected results if called outside a user
+ * transform callback. Also note that when transforming an interlaced image the
+ * row number is still the row in the final, de-interlaced, image but the row
+ * only contains the data of the current pass - consult png_row_info for the
+ * actual width of the row!
+ */
+PNG_EXPORT(217, png_uint_32, png_get_current_row_number, (png_const_structp));
+PNG_EXPORT(218, png_byte, png_get_current_pass_number, (png_const_structp));
#endif
#ifdef PNG_USER_CHUNKS_SUPPORTED
-extern PNG_EXPORT(void,png_set_read_user_chunk_fn) PNGARG((png_structp png_ptr,
- png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
-extern PNG_EXPORT(png_voidp,png_get_user_chunk_ptr) PNGARG((png_structp
- png_ptr));
+PNG_EXPORT(88, void, png_set_read_user_chunk_fn, (png_structp png_ptr,
+ png_voidp user_chunk_ptr, png_user_chunk_ptr read_user_chunk_fn));
+PNG_EXPORT(89, png_voidp, png_get_user_chunk_ptr, (png_const_structp png_ptr));
#endif
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
/* Sets the function callbacks for the push reader, and a pointer to a
* user-defined structure available to the callback functions.
*/
-extern PNG_EXPORT(void,png_set_progressive_read_fn) PNGARG((png_structp png_ptr,
- png_voidp progressive_ptr,
- png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
- png_progressive_end_ptr end_fn));
+PNG_EXPORT(90, void, png_set_progressive_read_fn, (png_structp png_ptr,
+ png_voidp progressive_ptr, png_progressive_info_ptr info_fn,
+ png_progressive_row_ptr row_fn, png_progressive_end_ptr end_fn));
/* Returns the user pointer associated with the push read functions */
-extern PNG_EXPORT(png_voidp,png_get_progressive_ptr)
- PNGARG((png_structp png_ptr));
+PNG_EXPORT(91, png_voidp, png_get_progressive_ptr, (png_const_structp png_ptr));
/* Function to be called when data becomes available */
-extern PNG_EXPORT(void,png_process_data) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_bytep buffer, png_size_t buffer_size));
+PNG_EXPORT(92, void, png_process_data,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_bytep buffer, png_size_t buffer_size));
+
+/* A function which may be called *only* within png_process_data to stop the
+ * processing of any more data. The function returns the number of bytes
+ * remaining, excluding any that libpng has cached internally. A subsequent
+ * call to png_process_data must supply these bytes again. If the argument
+ * 'save' is set to true the routine will first save all the pending data and
+ * will always return 0.
+ */
+PNG_EXPORT(219, png_size_t, png_process_data_pause, (png_structp, int save));
+
+/* A function which may be called *only* outside (after) a call to
+ * png_process_data. It returns the number of bytes of data to skip in the
+ * input. Normally it will return 0, but if it returns a non-zero value the
+ * application must skip than number of bytes of input data and pass the
+ * following data to the next call to png_process_data.
+ */
+PNG_EXPORT(220, png_uint_32, png_process_data_skip, (png_structp));
-/* Function that combines rows. Not very much different than the
- * png_combine_row() call. Is this even used?????
+/* Function that combines rows. 'new_row' is a flag that should come from
+ * the callback and be non-NULL if anything needs to be done; the library
+ * stores its own version of the new data internally and ignores the passed
+ * in value.
*/
-extern PNG_EXPORT(void,png_progressive_combine_row) PNGARG((png_structp png_ptr,
- png_bytep old_row, png_bytep new_row));
+PNG_EXPORT(93, void, png_progressive_combine_row, (png_structp png_ptr,
+ png_bytep old_row, png_const_bytep new_row));
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
-extern PNG_EXPORT(png_voidp,png_malloc) PNGARG((png_structp png_ptr,
- png_alloc_size_t size)) PNG_ALLOCATED;
+PNG_EXPORTA(94, png_voidp, png_malloc,
+ (png_structp png_ptr, png_alloc_size_t size),
+ PNG_ALLOCATED);
/* Added at libpng version 1.4.0 */
-extern PNG_EXPORT(png_voidp,png_calloc) PNGARG((png_structp png_ptr,
- png_alloc_size_t size)) PNG_ALLOCATED;
+PNG_EXPORTA(95, png_voidp, png_calloc,
+ (png_structp png_ptr, png_alloc_size_t size),
+ PNG_ALLOCATED);
/* Added at libpng version 1.2.4 */
-extern PNG_EXPORT(png_voidp,png_malloc_warn) PNGARG((png_structp png_ptr,
- png_alloc_size_t size)) PNG_ALLOCATED;
+PNG_EXPORTA(96, png_voidp, png_malloc_warn, (png_structp png_ptr,
+ png_alloc_size_t size), PNG_ALLOCATED);
/* Frees a pointer allocated by png_malloc() */
-extern PNG_EXPORT(void,png_free) PNGARG((png_structp png_ptr, png_voidp ptr));
+PNG_EXPORT(97, void, png_free, (png_structp png_ptr, png_voidp ptr));
/* Free data that was allocated internally */
-extern PNG_EXPORT(void,png_free_data) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 free_me, int num));
+PNG_EXPORT(98, void, png_free_data,
+ (png_structp png_ptr, png_infop info_ptr, png_uint_32 free_me, int num));
+
/* Reassign responsibility for freeing existing data, whether allocated
* by libpng or by the application */
-extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int freer, png_uint_32 mask));
+PNG_EXPORT(99, void, png_data_freer,
+ (png_structp png_ptr, png_infop info_ptr, int freer, png_uint_32 mask));
+
/* Assignments for png_data_freer */
#define PNG_DESTROY_WILL_FREE_DATA 1
#define PNG_SET_WILL_FREE_DATA 1
@@ -1947,46 +1575,56 @@ extern PNG_EXPORT(void,png_data_freer) PNGARG((png_structp png_ptr,
#define PNG_FREE_MUL 0x4220 /* PNG_FREE_SPLT|PNG_FREE_TEXT|PNG_FREE_UNKN */
#ifdef PNG_USER_MEM_SUPPORTED
-extern PNG_EXPORT(png_voidp,png_malloc_default) PNGARG((png_structp png_ptr,
- png_alloc_size_t size)) PNG_ALLOCATED;
-extern PNG_EXPORT(void,png_free_default) PNGARG((png_structp png_ptr,
- png_voidp ptr));
+PNG_EXPORTA(100, png_voidp, png_malloc_default, (png_structp png_ptr,
+ png_alloc_size_t size), PNG_ALLOCATED);
+PNG_EXPORT(101, void, png_free_default, (png_structp png_ptr, png_voidp ptr));
#endif
-#ifndef PNG_NO_ERROR_TEXT
+#ifdef PNG_ERROR_TEXT_SUPPORTED
/* Fatal error in PNG image of libpng - can't continue */
-extern PNG_EXPORT(void,png_error) PNGARG((png_structp png_ptr,
- png_const_charp error_message)) PNG_NORETURN;
+PNG_EXPORTA(102, void, png_error,
+ (png_structp png_ptr, png_const_charp error_message),
+ PNG_NORETURN);
/* The same, but the chunk name is prepended to the error string. */
-extern PNG_EXPORT(void,png_chunk_error) PNGARG((png_structp png_ptr,
- png_const_charp error_message)) PNG_NORETURN;
+PNG_EXPORTA(103, void, png_chunk_error, (png_structp png_ptr,
+ png_const_charp error_message), PNG_NORETURN);
#else
/* Fatal error in PNG image of libpng - can't continue */
-extern PNG_EXPORT(void,png_err) PNGARG((png_structp png_ptr)) PNG_NORETURN;
+PNG_EXPORTA(104, void, png_err, (png_structp png_ptr), PNG_NORETURN);
#endif
/* Non-fatal error in libpng. Can continue, but may have a problem. */
-extern PNG_EXPORT(void,png_warning) PNGARG((png_structp png_ptr,
- png_const_charp warning_message));
+PNG_EXPORT(105, void, png_warning, (png_structp png_ptr,
+ png_const_charp warning_message));
/* Non-fatal error in libpng, chunk name is prepended to message. */
-extern PNG_EXPORT(void,png_chunk_warning) PNGARG((png_structp png_ptr,
- png_const_charp warning_message));
+PNG_EXPORT(106, void, png_chunk_warning, (png_structp png_ptr,
+ png_const_charp warning_message));
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
/* Benign error in libpng. Can continue, but may have a problem.
* User can choose whether to handle as a fatal error or as a warning. */
-extern PNG_EXPORT(void,png_benign_error) PNGARG((png_structp png_ptr,
- png_const_charp warning_message));
+# undef png_benign_error
+PNG_EXPORT(107, void, png_benign_error, (png_structp png_ptr,
+ png_const_charp warning_message));
/* Same, chunk name is prepended to message. */
-extern PNG_EXPORT(void,png_chunk_benign_error) PNGARG((png_structp png_ptr,
- png_const_charp warning_message));
+# undef png_chunk_benign_error
+PNG_EXPORT(108, void, png_chunk_benign_error, (png_structp png_ptr,
+ png_const_charp warning_message));
-extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp
- png_ptr, int allowed));
+PNG_EXPORT(109, void, png_set_benign_errors,
+ (png_structp png_ptr, int allowed));
+#else
+# ifdef PNG_ALLOW_BENIGN_ERRORS
+# define png_benign_error png_warning
+# define png_chunk_benign_error png_chunk_warning
+# else
+# define png_benign_error png_error
+# define png_chunk_benign_error png_chunk_error
+# endif
#endif
/* The png_set_<chunk> functions are for storing values in the png_info_struct.
@@ -2002,261 +1640,271 @@ extern PNG_EXPORT(void,png_set_benign_errors) PNGARG((png_structp
* png_info_struct.
*/
/* Returns "flag" if chunk data is valid in info_ptr. */
-extern PNG_EXPORT(png_uint_32,png_get_valid) PNGARG((png_structp png_ptr,
-png_infop info_ptr, png_uint_32 flag));
+PNG_EXPORT(110, png_uint_32, png_get_valid,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_32 flag));
/* Returns number of bytes needed to hold a transformed row. */
-extern PNG_EXPORT(png_size_t,png_get_rowbytes) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(111, png_size_t, png_get_rowbytes, (png_const_structp png_ptr,
+ png_const_infop info_ptr));
#ifdef PNG_INFO_IMAGE_SUPPORTED
/* Returns row_pointers, which is an array of pointers to scanlines that was
* returned from png_read_png().
*/
-extern PNG_EXPORT(png_bytepp,png_get_rows) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(112, png_bytepp, png_get_rows,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
/* Set row_pointers, which is an array of pointers to scanlines for use
* by png_write_png().
*/
-extern PNG_EXPORT(void,png_set_rows) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_bytepp row_pointers));
+PNG_EXPORT(113, void, png_set_rows, (png_structp png_ptr,
+ png_infop info_ptr, png_bytepp row_pointers));
#endif
/* Returns number of color channels in image. */
-extern PNG_EXPORT(png_byte,png_get_channels) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(114, png_byte, png_get_channels,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
#ifdef PNG_EASY_ACCESS_SUPPORTED
/* Returns image width in pixels. */
-extern PNG_EXPORT(png_uint_32, png_get_image_width) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(115, png_uint_32, png_get_image_width, (png_const_structp png_ptr,
+ png_const_infop info_ptr));
/* Returns image height in pixels. */
-extern PNG_EXPORT(png_uint_32, png_get_image_height) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(116, png_uint_32, png_get_image_height, (png_const_structp png_ptr,
+ png_const_infop info_ptr));
/* Returns image bit_depth. */
-extern PNG_EXPORT(png_byte, png_get_bit_depth) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(117, png_byte, png_get_bit_depth,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
/* Returns image color_type. */
-extern PNG_EXPORT(png_byte, png_get_color_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(118, png_byte, png_get_color_type, (png_const_structp png_ptr,
+ png_const_infop info_ptr));
/* Returns image filter_type. */
-extern PNG_EXPORT(png_byte, png_get_filter_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(119, png_byte, png_get_filter_type, (png_const_structp png_ptr,
+ png_const_infop info_ptr));
/* Returns image interlace_type. */
-extern PNG_EXPORT(png_byte, png_get_interlace_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(120, png_byte, png_get_interlace_type, (png_const_structp png_ptr,
+ png_const_infop info_ptr));
/* Returns image compression_type. */
-extern PNG_EXPORT(png_byte, png_get_compression_type) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(121, png_byte, png_get_compression_type, (png_const_structp png_ptr,
+ png_const_infop info_ptr));
/* Returns image resolution in pixels per meter, from pHYs chunk data. */
-extern PNG_EXPORT(png_uint_32, png_get_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_uint_32, png_get_x_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_uint_32, png_get_y_pixels_per_meter) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(122, png_uint_32, png_get_pixels_per_meter,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(123, png_uint_32, png_get_x_pixels_per_meter,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(124, png_uint_32, png_get_y_pixels_per_meter,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
/* Returns pixel aspect ratio, computed from pHYs chunk data. */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(float, png_get_pixel_aspect_ratio) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-#endif
+PNG_FP_EXPORT(125, float, png_get_pixel_aspect_ratio,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_FIXED_EXPORT(210, png_fixed_point, png_get_pixel_aspect_ratio_fixed,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
/* Returns image x, y offset in pixels or microns, from oFFs chunk data. */
-extern PNG_EXPORT(png_int_32, png_get_x_offset_pixels) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_y_offset_pixels) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_x_offset_microns) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
-extern PNG_EXPORT(png_int_32, png_get_y_offset_microns) PNGARG((png_structp
-png_ptr, png_infop info_ptr));
+PNG_EXPORT(126, png_int_32, png_get_x_offset_pixels,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(127, png_int_32, png_get_y_offset_pixels,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(128, png_int_32, png_get_x_offset_microns,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
+PNG_EXPORT(129, png_int_32, png_get_y_offset_microns,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
#endif /* PNG_EASY_ACCESS_SUPPORTED */
/* Returns pointer to signature string read from PNG header */
-extern PNG_EXPORT(png_bytep,png_get_signature) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(130, png_const_bytep, png_get_signature,
+ (png_const_structp png_ptr, png_infop info_ptr));
#ifdef PNG_bKGD_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_bKGD) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_color_16p *background));
+PNG_EXPORT(131, png_uint_32, png_get_bKGD,
+ (png_const_structp png_ptr, png_infop info_ptr,
+ png_color_16p *background));
#endif
#ifdef PNG_bKGD_SUPPORTED
-extern PNG_EXPORT(void,png_set_bKGD) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_color_16p background));
+PNG_EXPORT(132, void, png_set_bKGD, (png_structp png_ptr, png_infop info_ptr,
+ png_const_color_16p background));
#endif
#ifdef PNG_cHRM_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_cHRM) PNGARG((png_structp png_ptr,
- png_infop info_ptr, double *white_x, double *white_y, double *red_x,
- double *red_y, double *green_x, double *green_y, double *blue_x,
- double *blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_cHRM_fixed) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_fixed_point *int_white_x, png_fixed_point
- *int_white_y, png_fixed_point *int_red_x, png_fixed_point *int_red_y,
- png_fixed_point *int_green_x, png_fixed_point *int_green_y, png_fixed_point
- *int_blue_x, png_fixed_point *int_blue_y));
+PNG_FP_EXPORT(133, png_uint_32, png_get_cHRM, (png_const_structp png_ptr,
+ png_const_infop info_ptr, double *white_x, double *white_y, double *red_x,
+ double *red_y, double *green_x, double *green_y, double *blue_x,
+ double *blue_y));
+#ifdef PNG_FIXED_POINT_SUPPORTED /* Otherwise not implemented */
+PNG_FIXED_EXPORT(134, png_uint_32, png_get_cHRM_fixed,
+ (png_const_structp png_ptr,
+ png_const_infop info_ptr, png_fixed_point *int_white_x,
+ png_fixed_point *int_white_y, png_fixed_point *int_red_x,
+ png_fixed_point *int_red_y, png_fixed_point *int_green_x,
+ png_fixed_point *int_green_y, png_fixed_point *int_blue_x,
+ png_fixed_point *int_blue_y));
#endif
#endif
#ifdef PNG_cHRM_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_cHRM) PNGARG((png_structp png_ptr,
- png_infop info_ptr, double white_x, double white_y, double red_x,
- double red_y, double green_x, double green_y, double blue_x, double blue_y));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_cHRM_fixed) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_fixed_point int_white_x, png_fixed_point int_white_y,
- png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
- int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
- png_fixed_point int_blue_y));
-#endif
+PNG_FP_EXPORT(135, void, png_set_cHRM,
+ (png_structp png_ptr, png_infop info_ptr,
+ double white_x, double white_y, double red_x, double red_y, double green_x,
+ double green_y, double blue_x, double blue_y));
+PNG_FIXED_EXPORT(136, void, png_set_cHRM_fixed, (png_structp png_ptr,
+ png_infop info_ptr, png_fixed_point int_white_x,
+ png_fixed_point int_white_y, png_fixed_point int_red_x,
+ png_fixed_point int_red_y, png_fixed_point int_green_x,
+ png_fixed_point int_green_y, png_fixed_point int_blue_x,
+ png_fixed_point int_blue_y));
#endif
#ifdef PNG_gAMA_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_gAMA) PNGARG((png_structp png_ptr,
- png_infop info_ptr, double *file_gamma));
-#endif
-extern PNG_EXPORT(png_uint_32,png_get_gAMA_fixed) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_fixed_point *int_file_gamma));
+PNG_FP_EXPORT(137, png_uint_32, png_get_gAMA,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ double *file_gamma));
+PNG_FIXED_EXPORT(138, png_uint_32, png_get_gAMA_fixed,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_fixed_point *int_file_gamma));
#endif
#ifdef PNG_gAMA_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_gAMA) PNGARG((png_structp png_ptr,
- png_infop info_ptr, double file_gamma));
-#endif
-extern PNG_EXPORT(void,png_set_gAMA_fixed) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_fixed_point int_file_gamma));
+PNG_FP_EXPORT(139, void, png_set_gAMA, (png_structp png_ptr,
+ png_infop info_ptr, double file_gamma));
+PNG_FIXED_EXPORT(140, void, png_set_gAMA_fixed, (png_structp png_ptr,
+ png_infop info_ptr, png_fixed_point int_file_gamma));
#endif
#ifdef PNG_hIST_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_hIST) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_16p *hist));
+PNG_EXPORT(141, png_uint_32, png_get_hIST,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_16p *hist));
#endif
#ifdef PNG_hIST_SUPPORTED
-extern PNG_EXPORT(void,png_set_hIST) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_16p hist));
+PNG_EXPORT(142, void, png_set_hIST, (png_structp png_ptr,
+ png_infop info_ptr, png_const_uint_16p hist));
#endif
-extern PNG_EXPORT(png_uint_32,png_get_IHDR) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 *width, png_uint_32 *height,
- int *bit_depth, int *color_type, int *interlace_method,
- int *compression_method, int *filter_method));
+PNG_EXPORT(143, png_uint_32, png_get_IHDR,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 *width, png_uint_32 *height, int *bit_depth, int *color_type,
+ int *interlace_method, int *compression_method, int *filter_method));
-extern PNG_EXPORT(void,png_set_IHDR) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 width, png_uint_32 height, int bit_depth,
- int color_type, int interlace_method, int compression_method,
- int filter_method));
+PNG_EXPORT(144, void, png_set_IHDR,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 width, png_uint_32 height, int bit_depth, int color_type,
+ int interlace_method, int compression_method, int filter_method));
#ifdef PNG_oFFs_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_oFFs) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_int_32 *offset_x, png_int_32 *offset_y,
- int *unit_type));
+PNG_EXPORT(145, png_uint_32, png_get_oFFs,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type));
#endif
#ifdef PNG_oFFs_SUPPORTED
-extern PNG_EXPORT(void,png_set_oFFs) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_int_32 offset_x, png_int_32 offset_y,
- int unit_type));
+PNG_EXPORT(146, void, png_set_oFFs,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_int_32 offset_x, png_int_32 offset_y, int unit_type));
#endif
#ifdef PNG_pCAL_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_pCAL) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_charp *purpose, png_int_32 *X0, png_int_32 *X1,
- int *type, int *nparams, png_charp *units, png_charpp *params));
+PNG_EXPORT(147, png_uint_32, png_get_pCAL,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type,
+ int *nparams,
+ png_charp *units, png_charpp *params));
#endif
#ifdef PNG_pCAL_SUPPORTED
-extern PNG_EXPORT(void,png_set_pCAL) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_charp purpose, png_int_32 X0, png_int_32 X1,
- int type, int nparams, png_charp units, png_charpp params));
+PNG_EXPORT(148, void, png_set_pCAL, (png_structp png_ptr,
+ png_infop info_ptr,
+ png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type,
+ int nparams, png_const_charp units, png_charpp params));
#endif
#ifdef PNG_pHYs_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_pHYs) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
+PNG_EXPORT(149, png_uint_32, png_get_pHYs,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
#endif
#ifdef PNG_pHYs_SUPPORTED
-extern PNG_EXPORT(void,png_set_pHYs) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 res_x, png_uint_32 res_y, int unit_type));
+PNG_EXPORT(150, void, png_set_pHYs,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 res_x, png_uint_32 res_y, int unit_type));
#endif
-extern PNG_EXPORT(png_uint_32,png_get_PLTE) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_colorp *palette, int *num_palette));
+PNG_EXPORT(151, png_uint_32, png_get_PLTE,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_colorp *palette, int *num_palette));
-extern PNG_EXPORT(void,png_set_PLTE) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_colorp palette, int num_palette));
+PNG_EXPORT(152, void, png_set_PLTE,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_const_colorp palette, int num_palette));
#ifdef PNG_sBIT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sBIT) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_color_8p *sig_bit));
+PNG_EXPORT(153, png_uint_32, png_get_sBIT,
+ (png_const_structp png_ptr, png_infop info_ptr,
+ png_color_8p *sig_bit));
#endif
#ifdef PNG_sBIT_SUPPORTED
-extern PNG_EXPORT(void,png_set_sBIT) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_color_8p sig_bit));
+PNG_EXPORT(154, void, png_set_sBIT,
+ (png_structp png_ptr, png_infop info_ptr, png_const_color_8p sig_bit));
#endif
#ifdef PNG_sRGB_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sRGB) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int *intent));
+PNG_EXPORT(155, png_uint_32, png_get_sRGB, (png_const_structp png_ptr,
+ png_const_infop info_ptr, int *file_srgb_intent));
#endif
#ifdef PNG_sRGB_SUPPORTED
-extern PNG_EXPORT(void,png_set_sRGB) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int intent));
-extern PNG_EXPORT(void,png_set_sRGB_gAMA_and_cHRM) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int intent));
+PNG_EXPORT(156, void, png_set_sRGB,
+ (png_structp png_ptr, png_infop info_ptr, int srgb_intent));
+PNG_EXPORT(157, void, png_set_sRGB_gAMA_and_cHRM, (png_structp png_ptr,
+ png_infop info_ptr, int srgb_intent));
#endif
#ifdef PNG_iCCP_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_iCCP) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_charpp name, int *compression_type,
- png_charpp profile, png_uint_32 *proflen));
- /* Note to maintainer: profile should be png_bytepp */
+PNG_EXPORT(158, png_uint_32, png_get_iCCP,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_charpp name, int *compression_type, png_bytepp profile,
+ png_uint_32 *proflen));
#endif
#ifdef PNG_iCCP_SUPPORTED
-extern PNG_EXPORT(void,png_set_iCCP) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_charp name, int compression_type,
- png_charp profile, png_uint_32 proflen));
- /* Note to maintainer: profile should be png_bytep */
+PNG_EXPORT(159, void, png_set_iCCP,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_const_charp name, int compression_type, png_const_bytep profile,
+ png_uint_32 proflen));
#endif
#ifdef PNG_sPLT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sPLT) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_sPLT_tpp entries));
+PNG_EXPORT(160, png_uint_32, png_get_sPLT,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_sPLT_tpp entries));
#endif
#ifdef PNG_sPLT_SUPPORTED
-extern PNG_EXPORT(void,png_set_sPLT) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_sPLT_tp entries, int nentries));
+PNG_EXPORT(161, void, png_set_sPLT,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_const_sPLT_tp entries, int nentries));
#endif
#ifdef PNG_TEXT_SUPPORTED
/* png_get_text also returns the number of text chunks in *num_text */
-extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_textp *text_ptr, int *num_text));
+PNG_EXPORT(162, png_uint_32, png_get_text,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ png_textp *text_ptr, int *num_text));
#endif
-/* Note while png_set_text() will accept a structure whose text,
+/* Note while png_set_text() will accept a structure whose text,
* language, and translated keywords are NULL pointers, the structure
* returned by png_get_text will always contain regular
* zero-terminated C strings. They might be empty strings but
@@ -2264,59 +1912,64 @@ extern PNG_EXPORT(png_uint_32,png_get_text) PNGARG((png_structp png_ptr,
*/
#ifdef PNG_TEXT_SUPPORTED
-extern PNG_EXPORT(void,png_set_text) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_textp text_ptr, int num_text));
+PNG_EXPORT(163, void, png_set_text,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_const_textp text_ptr, int num_text));
#endif
#ifdef PNG_tIME_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_tIME) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_timep *mod_time));
+PNG_EXPORT(164, png_uint_32, png_get_tIME,
+ (png_const_structp png_ptr, png_infop info_ptr, png_timep *mod_time));
#endif
#ifdef PNG_tIME_SUPPORTED
-extern PNG_EXPORT(void,png_set_tIME) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_timep mod_time));
-#endif
-
-#ifdef PNG_tRNS_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_tRNS) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_bytep *trans_alpha, int *num_trans,
- png_color_16p *trans_color));
+PNG_EXPORT(165, void, png_set_tIME,
+ (png_structp png_ptr, png_infop info_ptr, png_const_timep mod_time));
#endif
#ifdef PNG_tRNS_SUPPORTED
-extern PNG_EXPORT(void,png_set_tRNS) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_bytep trans_alpha, int num_trans,
- png_color_16p trans_color));
+PNG_EXPORT(166, png_uint_32, png_get_tRNS,
+ (png_const_structp png_ptr, png_infop info_ptr,
+ png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color));
#endif
#ifdef PNG_tRNS_SUPPORTED
+PNG_EXPORT(167, void, png_set_tRNS,
+ (png_structp png_ptr, png_infop info_ptr,
+ png_const_bytep trans_alpha, int num_trans,
+ png_const_color_16p trans_color));
#endif
#ifdef PNG_sCAL_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sCAL) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int *unit, double *width, double *height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_sCAL_s) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int *unit, png_charpp swidth, png_charpp sheight));
-#endif
-#endif
+PNG_FP_EXPORT(168, png_uint_32, png_get_sCAL,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ int *unit, double *width, double *height));
+#ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+/* NOTE: this API is currently implemented using floating point arithmetic,
+ * consequently it can only be used on systems with floating point support.
+ * In any case the range of values supported by png_fixed_point is small and it
+ * is highly recommended that png_get_sCAL_s be used instead.
+ */
+PNG_FIXED_EXPORT(214, png_uint_32, png_get_sCAL_fixed,
+ (png_structp png_ptr, png_const_infop info_ptr, int *unit,
+ png_fixed_point *width,
+ png_fixed_point *height));
+#endif
+PNG_EXPORT(169, png_uint_32, png_get_sCAL_s,
+ (png_const_structp png_ptr, png_const_infop info_ptr,
+ int *unit, png_charpp swidth, png_charpp sheight));
+
+PNG_FP_EXPORT(170, void, png_set_sCAL,
+ (png_structp png_ptr, png_infop info_ptr,
+ int unit, double width, double height));
+PNG_FIXED_EXPORT(213, void, png_set_sCAL_fixed, (png_structp png_ptr,
+ png_infop info_ptr, int unit, png_fixed_point width,
+ png_fixed_point height));
+PNG_EXPORT(171, void, png_set_sCAL_s,
+ (png_structp png_ptr, png_infop info_ptr,
+ int unit, png_const_charp swidth, png_const_charp sheight));
#endif /* PNG_sCAL_SUPPORTED */
-#ifdef PNG_sCAL_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_sCAL) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int unit, double width, double height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int unit, png_charp swidth, png_charp sheight));
-#endif
-#endif
-#endif /* PNG_sCAL_SUPPORTED || PNG_WRITE_sCAL_SUPPORTED */
-
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
/* Provide a list of chunks and how they are to be handled, if the built-in
handling or default unknown chunk handling is not desired. Any chunks not
@@ -2327,47 +1980,49 @@ extern PNG_EXPORT(void,png_set_sCAL_s) PNGARG((png_structp png_ptr,
= 2: keep only if safe-to-copy
= 3: keep even if unsafe-to-copy
*/
-extern PNG_EXPORT(void, png_set_keep_unknown_chunks) PNGARG((png_structp
- png_ptr, int keep, png_bytep chunk_list, int num_chunks));
-PNG_EXPORT(int,png_handle_as_unknown) PNGARG((png_structp png_ptr, png_bytep
- chunk_name));
+PNG_EXPORT(172, void, png_set_keep_unknown_chunks,
+ (png_structp png_ptr, int keep,
+ png_const_bytep chunk_list, int num_chunks));
+PNG_EXPORT(173, int, png_handle_as_unknown, (png_structp png_ptr,
+ png_const_bytep chunk_name));
#endif
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
-extern PNG_EXPORT(void, png_set_unknown_chunks) PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns));
-extern PNG_EXPORT(void, png_set_unknown_chunk_location)
- PNGARG((png_structp png_ptr, png_infop info_ptr, int chunk, int location));
-extern PNG_EXPORT(png_uint_32,png_get_unknown_chunks) PNGARG((png_structp
- png_ptr, png_infop info_ptr, png_unknown_chunkpp entries));
+PNG_EXPORT(174, void, png_set_unknown_chunks, (png_structp png_ptr,
+ png_infop info_ptr, png_const_unknown_chunkp unknowns,
+ int num_unknowns));
+PNG_EXPORT(175, void, png_set_unknown_chunk_location,
+ (png_structp png_ptr, png_infop info_ptr, int chunk, int location));
+PNG_EXPORT(176, int, png_get_unknown_chunks, (png_const_structp png_ptr,
+ png_const_infop info_ptr, png_unknown_chunkpp entries));
#endif
/* Png_free_data() will turn off the "valid" flag for anything it frees.
- * If you need to turn it off for a chunk that your application has freed,
+ * If you need to turn it off for a chunk that your application has freed,
* you can use png_set_invalid(png_ptr, info_ptr, PNG_INFO_CHNK);
*/
-extern PNG_EXPORT(void, png_set_invalid) PNGARG((png_structp png_ptr,
- png_infop info_ptr, int mask));
+PNG_EXPORT(177, void, png_set_invalid,
+ (png_structp png_ptr, png_infop info_ptr, int mask));
#ifdef PNG_INFO_IMAGE_SUPPORTED
/* The "params" pointer is currently not used and is for future expansion. */
-extern PNG_EXPORT(void, png_read_png) PNGARG((png_structp png_ptr,
- png_infop info_ptr,
- int transforms,
- png_voidp params));
-extern PNG_EXPORT(void, png_write_png) PNGARG((png_structp png_ptr,
- png_infop info_ptr,
- int transforms,
- png_voidp params));
+PNG_EXPORT(178, void, png_read_png, (png_structp png_ptr, png_infop info_ptr,
+ int transforms, png_voidp params));
+PNG_EXPORT(179, void, png_write_png, (png_structp png_ptr, png_infop info_ptr,
+ int transforms, png_voidp params));
#endif
-extern PNG_EXPORT(png_charp,png_get_copyright) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_header_ver) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_header_version) PNGARG((png_structp png_ptr));
-extern PNG_EXPORT(png_charp,png_get_libpng_ver) PNGARG((png_structp png_ptr));
+PNG_EXPORT(180, png_const_charp, png_get_copyright,
+ (png_const_structp png_ptr));
+PNG_EXPORT(181, png_const_charp, png_get_header_ver,
+ (png_const_structp png_ptr));
+PNG_EXPORT(182, png_const_charp, png_get_header_version,
+ (png_const_structp png_ptr));
+PNG_EXPORT(183, png_const_charp, png_get_libpng_ver,
+ (png_const_structp png_ptr));
#ifdef PNG_MNG_FEATURES_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
- png_ptr, png_uint_32 mng_features_permitted));
+PNG_EXPORT(184, png_uint_32, png_permit_mng_features, (png_structp png_ptr,
+ png_uint_32 mng_features_permitted));
#endif
/* For use in png_set_keep_unknown, added to version 1.2.6 */
@@ -2380,69 +2035,135 @@ extern PNG_EXPORT(png_uint_32,png_permit_mng_features) PNGARG((png_structp
* messages before passing them to the error or warning handler.
*/
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
-extern PNG_EXPORT(void,png_set_strip_error_numbers) PNGARG((png_structp
- png_ptr, png_uint_32 strip_mode));
+PNG_EXPORT(185, void, png_set_strip_error_numbers,
+ (png_structp png_ptr,
+ png_uint_32 strip_mode));
#endif
/* Added in libpng-1.2.6 */
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-extern PNG_EXPORT(void,png_set_user_limits) PNGARG((png_structp
- png_ptr, png_uint_32 user_width_max, png_uint_32 user_height_max));
-extern PNG_EXPORT(png_uint_32,png_get_user_width_max) PNGARG((png_structp
- png_ptr));
-extern PNG_EXPORT(png_uint_32,png_get_user_height_max) PNGARG((png_structp
- png_ptr));
+PNG_EXPORT(186, void, png_set_user_limits, (png_structp png_ptr,
+ png_uint_32 user_width_max, png_uint_32 user_height_max));
+PNG_EXPORT(187, png_uint_32, png_get_user_width_max,
+ (png_const_structp png_ptr));
+PNG_EXPORT(188, png_uint_32, png_get_user_height_max,
+ (png_const_structp png_ptr));
/* Added in libpng-1.4.0 */
-extern PNG_EXPORT(void,png_set_chunk_cache_max) PNGARG((png_structp
- png_ptr, png_uint_32 user_chunk_cache_max));
-extern PNG_EXPORT(png_uint_32,png_get_chunk_cache_max)
- PNGARG((png_structp png_ptr));
+PNG_EXPORT(189, void, png_set_chunk_cache_max, (png_structp png_ptr,
+ png_uint_32 user_chunk_cache_max));
+PNG_EXPORT(190, png_uint_32, png_get_chunk_cache_max,
+ (png_const_structp png_ptr));
+/* Added in libpng-1.4.1 */
+PNG_EXPORT(191, void, png_set_chunk_malloc_max, (png_structp png_ptr,
+ png_alloc_size_t user_chunk_cache_max));
+PNG_EXPORT(192, png_alloc_size_t, png_get_chunk_malloc_max,
+ (png_const_structp png_ptr));
#endif
-#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
-PNG_EXPORT(png_uint_32,png_get_pixels_per_inch) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+#if defined(PNG_INCH_CONVERSIONS_SUPPORTED)
+PNG_EXPORT(193, png_uint_32, png_get_pixels_per_inch,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
-PNG_EXPORT(png_uint_32,png_get_x_pixels_per_inch) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(194, png_uint_32, png_get_x_pixels_per_inch,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
-PNG_EXPORT(png_uint_32,png_get_y_pixels_per_inch) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_EXPORT(195, png_uint_32, png_get_y_pixels_per_inch,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
-PNG_EXPORT(float,png_get_x_offset_inches) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_FP_EXPORT(196, float, png_get_x_offset_inches,
+ (png_const_structp png_ptr, png_const_infop info_ptr));
+#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
+PNG_FIXED_EXPORT(211, png_fixed_point, png_get_x_offset_inches_fixed,
+ (png_structp png_ptr, png_const_infop info_ptr));
+#endif
-PNG_EXPORT(float,png_get_y_offset_inches) PNGARG((png_structp png_ptr,
-png_infop info_ptr));
+PNG_FP_EXPORT(197, float, png_get_y_offset_inches, (png_const_structp png_ptr,
+ png_const_infop info_ptr));
+#ifdef PNG_FIXED_POINT_SUPPORTED /* otherwise not implemented. */
+PNG_FIXED_EXPORT(212, png_fixed_point, png_get_y_offset_inches_fixed,
+ (png_structp png_ptr, png_const_infop info_ptr));
+#endif
-#ifdef PNG_pHYs_SUPPORTED
-PNG_EXPORT(png_uint_32,png_get_pHYs_dpi) PNGARG((png_structp png_ptr,
-png_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type));
-#endif /* PNG_pHYs_SUPPORTED */
-#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
+# ifdef PNG_pHYs_SUPPORTED
+PNG_EXPORT(198, png_uint_32, png_get_pHYs_dpi, (png_const_structp png_ptr,
+ png_const_infop info_ptr, png_uint_32 *res_x, png_uint_32 *res_y,
+ int *unit_type));
+# endif /* PNG_pHYs_SUPPORTED */
+#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */
/* Added in libpng-1.4.0 */
#ifdef PNG_IO_STATE_SUPPORTED
-extern PNG_EXPORT(png_uint_32,png_get_io_state) PNGARG((png_structp png_ptr));
+PNG_EXPORT(199, png_uint_32, png_get_io_state, (png_structp png_ptr));
-extern PNG_EXPORT(png_bytep,png_get_io_chunk_name)
- PNGARG((png_structp png_ptr));
+PNG_EXPORTA(200, png_const_bytep, png_get_io_chunk_name,
+ (png_structp png_ptr), PNG_DEPRECATED);
+PNG_EXPORT(216, png_uint_32, png_get_io_chunk_type,
+ (png_const_structp png_ptr));
/* The flags returned by png_get_io_state() are the following: */
-#define PNG_IO_NONE 0x0000 /* no I/O at this moment */
-#define PNG_IO_READING 0x0001 /* currently reading */
-#define PNG_IO_WRITING 0x0002 /* currently writing */
-#define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */
-#define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */
-#define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */
-#define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */
-#define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */
-#define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */
+# define PNG_IO_NONE 0x0000 /* no I/O at this moment */
+# define PNG_IO_READING 0x0001 /* currently reading */
+# define PNG_IO_WRITING 0x0002 /* currently writing */
+# define PNG_IO_SIGNATURE 0x0010 /* currently at the file signature */
+# define PNG_IO_CHUNK_HDR 0x0020 /* currently at the chunk header */
+# define PNG_IO_CHUNK_DATA 0x0040 /* currently at the chunk data */
+# define PNG_IO_CHUNK_CRC 0x0080 /* currently at the chunk crc */
+# define PNG_IO_MASK_OP 0x000f /* current operation: reading/writing */
+# define PNG_IO_MASK_LOC 0x00f0 /* current location: sig/hdr/data/crc */
#endif /* ?PNG_IO_STATE_SUPPORTED */
-/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
- * defs
+/* Interlace support. The following macros are always defined so that if
+ * libpng interlace handling is turned off the macros may be used to handle
+ * interlaced images within the application.
+ */
+#define PNG_INTERLACE_ADAM7_PASSES 7
+
+/* Two macros to return the first row and first column of the original,
+ * full, image which appears in a given pass. 'pass' is in the range 0
+ * to 6 and the result is in the range 0 to 7.
+ */
+#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7)
+#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7)
+
+/* Two macros to help evaluate the number of rows or columns in each
+ * pass. This is expressed as a shift - effectively log2 of the number or
+ * rows or columns in each 8x8 tile of the original image.
*/
+#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3)
+#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3)
+
+/* Hence two macros to determine the number of rows or columns in a given
+ * pass of an image given its height or width. In fact these macros may
+ * return non-zero even though the sub-image is empty, because the other
+ * dimension may be empty for a small image.
+ */
+#define PNG_PASS_ROWS(height, pass) (((height)+(((1<<PNG_PASS_ROW_SHIFT(pass))\
+ -1)-PNG_PASS_START_ROW(pass)))>>PNG_PASS_ROW_SHIFT(pass))
+#define PNG_PASS_COLS(width, pass) (((width)+(((1<<PNG_PASS_COL_SHIFT(pass))\
+ -1)-PNG_PASS_START_COL(pass)))>>PNG_PASS_COL_SHIFT(pass))
+
+/* For the progressive reader it is necessary to find the row in the output
+ * image given a row in an interlaced image, so two more macros:
+ */
+#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \
+ (((yIn)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass))
+#define PNG_COL_FROM_PASS_COL(xIn, pass) \
+ (((xIn)<<PNG_PASS_COL_SHIFT(pass))+PNG_PASS_START_COL(pass))
+
+/* Two macros which return a boolean (0 or 1) saying whether the given row
+ * or column is in a particular pass. These use a common utility macro that
+ * returns a mask for a given pass - the offset 'off' selects the row or
+ * column version. The mask has the appropriate bit set for each column in
+ * the tile.
+ */
+#define PNG_PASS_MASK(pass,off) ( \
+ ((0x110145AFU>>(((7-(off))-(pass))<<2)) & 0xFU) | \
+ ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U))
+
+#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \
+ ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1)
+#define PNG_COL_IN_INTERLACE_PASS(x, pass) \
+ ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1)
#ifdef PNG_READ_COMPOSITE_NODIV_SUPPORTED
/* With these routines we avoid an integer divide, which will be slower on
@@ -2457,91 +2178,98 @@ extern PNG_EXPORT(png_bytep,png_get_io_chunk_name)
* [Optimized code by Greg Roelofs and Mark Adler...blame us for bugs. :-) ]
*/
- /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
+ /* fg and bg should be in `gamma 1.0' space; alpha is the opacity */
-# define png_composite(composite, fg, alpha, bg) \
- { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) * (png_uint_16)(alpha) \
- + (png_uint_16)(bg)*(png_uint_16)(255 - \
- (png_uint_16)(alpha)) + (png_uint_16)128); \
+# define png_composite(composite, fg, alpha, bg) \
+ { png_uint_16 temp = (png_uint_16)((png_uint_16)(fg) \
+ * (png_uint_16)(alpha) \
+ + (png_uint_16)(bg)*(png_uint_16)(255 \
+ - (png_uint_16)(alpha)) + (png_uint_16)128); \
(composite) = (png_byte)((temp + (temp >> 8)) >> 8); }
-# define png_composite_16(composite, fg, alpha, bg) \
- { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) * (png_uint_32)(alpha) \
- + (png_uint_32)(bg)*(png_uint_32)(65535L - \
- (png_uint_32)(alpha)) + (png_uint_32)32768L); \
+# define png_composite_16(composite, fg, alpha, bg) \
+ { png_uint_32 temp = (png_uint_32)((png_uint_32)(fg) \
+ * (png_uint_32)(alpha) \
+ + (png_uint_32)(bg)*(png_uint_32)(65535L \
+ - (png_uint_32)(alpha)) + (png_uint_32)32768L); \
(composite) = (png_uint_16)((temp + (temp >> 16)) >> 16); }
#else /* Standard method using integer division */
-# define png_composite(composite, fg, alpha, bg) \
- (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \
- (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
- (png_uint_16)127) / 255)
+# define png_composite(composite, fg, alpha, bg) \
+ (composite) = (png_byte)(((png_uint_16)(fg) * (png_uint_16)(alpha) + \
+ (png_uint_16)(bg) * (png_uint_16)(255 - (png_uint_16)(alpha)) + \
+ (png_uint_16)127) / 255)
# define png_composite_16(composite, fg, alpha, bg) \
(composite) = (png_uint_16)(((png_uint_32)(fg) * (png_uint_32)(alpha) + \
- (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \
- (png_uint_32)32767) / (png_uint_32)65535L)
+ (png_uint_32)(bg)*(png_uint_32)(65535L - (png_uint_32)(alpha)) + \
+ (png_uint_32)32767) / (png_uint_32)65535L)
#endif /* PNG_READ_COMPOSITE_NODIV_SUPPORTED */
+#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
+PNG_EXPORT(201, png_uint_32, png_get_uint_32, (png_const_bytep buf));
+PNG_EXPORT(202, png_uint_16, png_get_uint_16, (png_const_bytep buf));
+PNG_EXPORT(203, png_int_32, png_get_int_32, (png_const_bytep buf));
+#endif
+
+PNG_EXPORT(204, png_uint_32, png_get_uint_31, (png_structp png_ptr,
+ png_const_bytep buf));
+/* No png_get_int_16 -- may be added if there's a real need for it. */
+
+/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */
+#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
+PNG_EXPORT(205, void, png_save_uint_32, (png_bytep buf, png_uint_32 i));
+#endif
+#ifdef PNG_SAVE_INT_32_SUPPORTED
+PNG_EXPORT(206, void, png_save_int_32, (png_bytep buf, png_int_32 i));
+#endif
+
+/* Place a 16-bit number into a buffer in PNG byte order.
+ * The parameter is declared unsigned int, not png_uint_16,
+ * just to avoid potential problems on pre-ANSI C compilers.
+ */
+#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
+PNG_EXPORT(207, void, png_save_uint_16, (png_bytep buf, unsigned int i));
+/* No png_save_int_16 -- may be added if there's a real need for it. */
+#endif
+
#ifdef PNG_USE_READ_MACROS
/* Inline macros to do direct reads of bytes from the input buffer.
* The png_get_int_32() routine assumes we are using two's complement
* format for negative values, which is almost certainly true.
*/
-/* We could make special-case BIG_ENDIAN macros that do direct reads here */
# define png_get_uint_32(buf) \
(((png_uint_32)(*(buf)) << 24) + \
((png_uint_32)(*((buf) + 1)) << 16) + \
((png_uint_32)(*((buf) + 2)) << 8) + \
((png_uint_32)(*((buf) + 3))))
+
+ /* From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
+ * function) incorrectly returned a value of type png_uint_32.
+ */
# define png_get_uint_16(buf) \
- (((png_uint_32)(*(buf)) << 8) + \
- ((png_uint_32)(*((buf) + 1))))
-#ifdef PNG_GET_INT_32_SUPPORTED
+ ((png_uint_16) \
+ (((unsigned int)(*(buf)) << 8) + \
+ ((unsigned int)(*((buf) + 1)))))
+
# define png_get_int_32(buf) \
- (((png_int_32)(*(buf)) << 24) + \
- ((png_int_32)(*((buf) + 1)) << 16) + \
- ((png_int_32)(*((buf) + 2)) << 8) + \
- ((png_int_32)(*((buf) + 3))))
+ ((png_int_32)((*(buf) & 0x80) \
+ ? -((png_int_32)((png_get_uint_32(buf) ^ 0xffffffffL) + 1)) \
+ : (png_int_32)png_get_uint_32(buf)))
#endif
-#else
-extern PNG_EXPORT(png_uint_32,png_get_uint_32) PNGARG((png_bytep buf));
-extern PNG_EXPORT(png_uint_16,png_get_uint_16) PNGARG((png_bytep buf));
-#ifdef PNG_GET_INT_32_SUPPORTED
-extern PNG_EXPORT(png_int_32,png_get_int_32) PNGARG((png_bytep buf));
-#endif
-#endif
-extern PNG_EXPORT(png_uint_32,png_get_uint_31)
- PNGARG((png_structp png_ptr, png_bytep buf));
-/* No png_get_int_16 -- may be added if there's a real need for it. */
-/* Place a 32-bit number into a buffer in PNG byte order (big-endian). */
-extern PNG_EXPORT(void,png_save_uint_32)
- PNGARG((png_bytep buf, png_uint_32 i));
-extern PNG_EXPORT(void,png_save_int_32)
- PNGARG((png_bytep buf, png_int_32 i));
-
-/* Place a 16-bit number into a buffer in PNG byte order.
- * The parameter is declared unsigned int, not png_uint_16,
- * just to avoid potential problems on pre-ANSI C compilers.
+/* Maintainer: Put new public prototypes here ^, in libpng.3, and project
+ * defs
*/
-extern PNG_EXPORT(void,png_save_uint_16)
- PNGARG((png_bytep buf, unsigned int i));
-/* No png_save_int_16 -- may be added if there's a real need for it. */
-/* ************************************************************************* */
-
-/* Various modes of operation. Note that after an init, mode is set to
- * zero automatically when the structure is created.
+/* The last ordinal number (this is the *last* one already used; the next
+ * one to use is one more than this.) Maintainer, remember to add an entry to
+ * scripts/symbols.def as well.
*/
-#define PNG_HAVE_IHDR 0x01
-#define PNG_HAVE_PLTE 0x02
-#define PNG_HAVE_IDAT 0x04
-#define PNG_AFTER_IDAT 0x08 /* Have complete zlib datastream */
-#define PNG_HAVE_IEND 0x10
-#define PNG_HAVE_gAMA 0x20
-#define PNG_HAVE_cHRM 0x40
+#ifdef PNG_EXPORT_LAST_ORDINAL
+ PNG_EXPORT_LAST_ORDINAL(220);
+#endif
#ifdef __cplusplus
}
diff --git a/src/3rdparty/libpng/pngbar.jpg b/src/3rdparty/libpng/pngbar.jpg
deleted file mode 100644
index 70ba8d8..0000000
--- a/src/3rdparty/libpng/pngbar.jpg
+++ /dev/null
Binary files differ
diff --git a/src/3rdparty/libpng/pngbar.png b/src/3rdparty/libpng/pngbar.png
deleted file mode 100644
index 49798c8..0000000
--- a/src/3rdparty/libpng/pngbar.png
+++ /dev/null
Binary files differ
diff --git a/src/3rdparty/libpng/pngconf.h b/src/3rdparty/libpng/pngconf.h
index 1f8bef8..d0b3454 100644
--- a/src/3rdparty/libpng/pngconf.h
+++ b/src/3rdparty/libpng/pngconf.h
@@ -1,9 +1,9 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.4.0 - January 3, 2010
- * For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * libpng version 1.5.1 - February 3, 2011
+ *
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -22,280 +22,55 @@
#ifndef PNGCONF_H
#define PNGCONF_H
+/* PNG_NO_LIMITS_H may be used to turn off the use of the standard C
+ * definition file for machine specific limits, this may impact the
+ * correctness of the definitons below (see uses of INT_MAX).
+ */
#ifndef PNG_NO_LIMITS_H
# include <limits.h>
#endif
-/* Added at libpng-1.2.9 */
-
-/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure" script. */
-#ifdef PNG_CONFIGURE_LIBPNG
-# ifdef HAVE_CONFIG_H
-# include "config.h"
-# endif
-#endif
-
-/*
- * Added at libpng-1.2.8
- *
- * PNG_USER_CONFIG has to be defined on the compiler command line. This
- * includes the resource compiler for Windows DLL configurations.
+/* For the memory copy APIs (i.e. the standard definitions of these),
+ * because this file defines png_memcpy and so on the base APIs must
+ * be defined here.
*/
-#ifdef PNG_USER_CONFIG
-# ifndef PNG_USER_PRIVATEBUILD
-# define PNG_USER_PRIVATEBUILD
-# endif
-# include "pngusr.h"
-#endif
-
-/*
- * If you create a private DLL you need to define in "pngusr.h" the followings:
- * #define PNG_USER_PRIVATEBUILD <Describes by whom and why this version of
- * the DLL was built>
- * e.g. #define PNG_USER_PRIVATEBUILD "Build by MyCompany for xyz reasons."
- * #define PNG_USER_DLLFNAME_POSTFIX <two-letter postfix that serve to
- * distinguish your DLL from those of the official release. These
- * correspond to the trailing letters that come after the version
- * number and must match your private DLL name>
- * e.g. // private DLL "libpng13gx.dll"
- * #define PNG_USER_DLLFNAME_POSTFIX "gx"
- *
- * The following macros are also at your disposal if you want to complete the
- * DLL VERSIONINFO structure.
- * - PNG_USER_VERSIONINFO_COMMENTS
- * - PNG_USER_VERSIONINFO_COMPANYNAME
- * - PNG_USER_VERSIONINFO_LEGALTRADEMARKS
- */
-
-#ifdef __STDC__
-# ifdef SPECIALBUILD
-# pragma message("PNG_LIBPNG_SPECIALBUILD (and deprecated SPECIALBUILD)\
- are now LIBPNG reserved macros. Use PNG_USER_PRIVATEBUILD instead.")
-# endif
-
-# ifdef PRIVATEBUILD
-# pragma message("PRIVATEBUILD is deprecated.\
- Use PNG_USER_PRIVATEBUILD instead.")
-# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
-# endif
-#endif /* __STDC__ */
-
-/* End of material added to libpng-1.2.8 */
-
-#ifndef PNG_VERSION_INFO_ONLY
-
-/* This is the size of the compression buffer, and thus the size of
- * an IDAT chunk. Make this whatever size you feel is best for your
- * machine. One of these will be allocated per png_struct. When this
- * is full, it writes the data to the disk, and does some other
- * calculations. Making this an extremely small size will slow
- * the library down, but you may want to experiment to determine
- * where it becomes significant, if you are concerned with memory
- * usage. Note that zlib allocates at least 32Kb also. For readers,
- * this describes the size of the buffer available to read the data in.
- * Unless this gets smaller than the size of a row (compressed),
- * it should not make much difference how big this is.
- */
-
-#ifndef PNG_ZBUF_SIZE
-# define PNG_ZBUF_SIZE 8192
-#endif
-
-/* Enable if you want a write-only libpng */
-
-#ifndef PNG_NO_READ_SUPPORTED
-# define PNG_READ_SUPPORTED
-#endif
-
-/* Enable if you want a read-only libpng */
-
-#ifndef PNG_NO_WRITE_SUPPORTED
-# define PNG_WRITE_SUPPORTED
-#endif
-
-/* Enabled in 1.4.0. */
-#ifdef PNG_ALLOW_BENIGN_ERRORS
-# define png_benign_error png_warning
-# define png_chunk_benign_error png_chunk_warning
+#if defined(BSD) && !defined(VXWORKS)
+# include <strings.h>
#else
-# ifndef PNG_BENIGN_ERRORS_SUPPORTED
-# define png_benign_error png_error
-# define png_chunk_benign_error png_chunk_error
-# endif
-#endif
-
-/* Added at libpng version 1.4.0 */
-#if !defined(PNG_NO_WARNINGS) && !defined(PNG_WARNINGS_SUPPORTED)
-# define PNG_WARNINGS_SUPPORTED
-#endif
-
-/* Added at libpng version 1.4.0 */
-#if !defined(PNG_NO_ERROR_TEXT) && !defined(PNG_ERROR_TEXT_SUPPORTED)
-# define PNG_ERROR_TEXT_SUPPORTED
-#endif
-
-/* Added at libpng version 1.4.0 */
-#if !defined(PNG_NO_CHECK_cHRM) && !defined(PNG_CHECK_cHRM_SUPPORTED)
-# define PNG_CHECK_cHRM_SUPPORTED
-#endif
-
-/* Added at libpng version 1.4.0 */
-#if !defined(PNG_NO_ALIGNED_MEMORY) && !defined(PNG_ALIGNED_MEMORY_SUPPORTED)
-# define PNG_ALIGNED_MEMORY_SUPPORTED
-#endif
-
-/* Enabled by default in 1.2.0. You can disable this if you don't need to
- support PNGs that are embedded in MNG datastreams */
-#ifndef PNG_NO_MNG_FEATURES
-# ifndef PNG_MNG_FEATURES_SUPPORTED
-# define PNG_MNG_FEATURES_SUPPORTED
-# endif
-#endif
-
-/* Added at libpng version 1.4.0 */
-#ifndef PNG_NO_FLOATING_POINT_SUPPORTED
-# ifndef PNG_FLOATING_POINT_SUPPORTED
-# define PNG_FLOATING_POINT_SUPPORTED
-# endif
+# include <string.h>
#endif
-/* Added at libpng-1.4.0beta49 for testing (this test is no longer used
- in libpng and png_calloc() is always present)
- */
-#define PNG_CALLOC_SUPPORTED
-
-/* If you are running on a machine where you cannot allocate more
- * than 64K of memory at once, uncomment this. While libpng will not
- * normally need that much memory in a chunk (unless you load up a very
- * large file), zlib needs to know how big of a chunk it can use, and
- * libpng thus makes sure to check any memory allocation to verify it
- * will fit into memory.
-#define PNG_MAX_MALLOC_64K
+/* For png_FILE_p - this provides the standard definition of a
+ * FILE
*/
-#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
-# define PNG_MAX_MALLOC_64K
+#ifdef PNG_STDIO_SUPPORTED
+# include <stdio.h>
#endif
-/* Special munging to support doing things the 'cygwin' way:
- * 'Normal' png-on-win32 defines/defaults:
- * PNG_BUILD_DLL -- building dll
- * PNG_USE_DLL -- building an application, linking to dll
- * (no define) -- building static library, or building an
- * application and linking to the static lib
- * 'Cygwin' defines/defaults:
- * PNG_BUILD_DLL -- (ignored) building the dll
- * (no define) -- (ignored) building an application, linking to the dll
- * PNG_STATIC -- (ignored) building the static lib, or building an
- * application that links to the static lib.
- * ALL_STATIC -- (ignored) building various static libs, or building an
- * application that links to the static libs.
- * Thus,
- * a cygwin user should define either PNG_BUILD_DLL or PNG_STATIC, and
- * this bit of #ifdefs will define the 'correct' config variables based on
- * that. If a cygwin user *wants* to define 'PNG_USE_DLL' that's okay, but
- * unnecessary.
- *
- * Also, the precedence order is:
- * ALL_STATIC (since we can't #undef something outside our namespace)
- * PNG_BUILD_DLL
- * PNG_STATIC
- * (nothing) == PNG_USE_DLL
- *
- * CYGWIN (2002-01-20): The preceding is now obsolete. With the advent
- * of auto-import in binutils, we no longer need to worry about
- * __declspec(dllexport) / __declspec(dllimport) and friends. Therefore,
- * we don't need to worry about PNG_STATIC or ALL_STATIC when it comes
- * to __declspec() stuff. However, we DO need to worry about
- * PNG_BUILD_DLL and PNG_STATIC because those change some defaults
- * such as CONSOLE_IO.
+/* This controls optimization of the reading of 16 and 32 bit values
+ * from PNG files. It can be set on a per-app-file basis - it
+ * just changes whether a macro is used to the function is called.
+ * The library builder sets the default, if read functions are not
+ * built into the library the macro implementation is forced on.
*/
-#ifdef __CYGWIN__
-# ifdef ALL_STATIC
-# ifdef PNG_BUILD_DLL
-# undef PNG_BUILD_DLL
-# endif
-# ifdef PNG_USE_DLL
-# undef PNG_USE_DLL
-# endif
-# ifdef PNG_DLL
-# undef PNG_DLL
-# endif
-# ifndef PNG_STATIC
-# define PNG_STATIC
-# endif
-# else
-# ifdef PNG_BUILD_DLL
-# ifdef PNG_STATIC
-# undef PNG_STATIC
-# endif
-# ifdef PNG_USE_DLL
-# undef PNG_USE_DLL
-# endif
-# ifndef PNG_DLL
-# define PNG_DLL
-# endif
-# else
-# ifdef PNG_STATIC
-# ifdef PNG_USE_DLL
-# undef PNG_USE_DLL
-# endif
-# ifdef PNG_DLL
-# undef PNG_DLL
-# endif
-# else
-# ifndef PNG_USE_DLL
-# define PNG_USE_DLL
-# endif
-# ifndef PNG_DLL
-# define PNG_DLL
-# endif
-# endif
-# endif
+#ifndef PNG_READ_INT_FUNCTIONS_SUPPORTED
+# define PNG_USE_READ_MACROS
+#endif
+#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS)
+# if PNG_DEFAULT_READ_MACROS
+# define PNG_USE_READ_MACROS
# endif
#endif
-/* This protects us against compilers that run on a windowing system
- * and thus don't have or would rather us not use the stdio types:
- * stdin, stdout, and stderr. The only one currently used is stderr
- * in png_error() and png_warning(). #defining PNG_NO_CONSOLE_IO will
- * prevent these from being compiled and used. #defining PNG_NO_STDIO
- * will also prevent these, plus will prevent the entire set of stdio
- * macros and functions (FILE *, printf, etc.) from being compiled and used,
- * unless (PNG_DEBUG > 0) has been #defined.
+/* COMPILER SPECIFIC OPTIONS.
*
- * #define PNG_NO_CONSOLE_IO
- * #define PNG_NO_STDIO
+ * These options are provided so that a variety of difficult compilers
+ * can be used. Some are fixed at build time (e.g. PNG_API_RULE
+ * below) but still have compiler specific implementations, others
+ * may be changed on a per-file basis when compiling against libpng.
*/
-#if !defined(PNG_NO_STDIO) && !defined(PNG_STDIO_SUPPORTED)
-# define PNG_STDIO_SUPPORTED
-#endif
-
-
-#ifdef PNG_BUILD_DLL
-# if !defined(PNG_CONSOLE_IO_SUPPORTED) && !defined(PNG_NO_CONSOLE_IO)
-# define PNG_NO_CONSOLE_IO
-# endif
-#endif
-
-# ifdef PNG_NO_STDIO
-# ifndef PNG_NO_CONSOLE_IO
-# define PNG_NO_CONSOLE_IO
-# endif
-# ifdef PNG_DEBUG
-# if (PNG_DEBUG > 0)
-# include <stdio.h>
-# endif
-# endif
-# else
-# include <stdio.h>
-# endif
-
-#if !(defined PNG_NO_CONSOLE_IO) && !defined(PNG_CONSOLE_IO_SUPPORTED)
-# define PNG_CONSOLE_IO_SUPPORTED
-#endif
-
-/* This macro protects us against machines that don't have function
+/* The PNGARG macro protects us against machines that don't have function
* prototypes (ie K&R style headers). If your compiler does not handle
* function prototypes, define this macro and use the included ansi2knr.
* I've always been able to use _NO_PROTO as the indicator, but you may
@@ -304,747 +79,397 @@
*/
#ifndef PNGARG
-#ifdef OF /* zlib prototype munger */
-# define PNGARG(arglist) OF(arglist)
-#else
+# ifdef OF /* zlib prototype munger */
+# define PNGARG(arglist) OF(arglist)
+# else
-#ifdef _NO_PROTO
-# define PNGARG(arglist) ()
-#else
-# define PNGARG(arglist) arglist
-#endif /* _NO_PROTO */
+# ifdef _NO_PROTO
+# define PNGARG(arglist) ()
+# else
+# define PNGARG(arglist) arglist
+# endif /* _NO_PROTO */
-#endif /* OF */
+# endif /* OF */
#endif /* PNGARG */
-/* Try to determine if we are compiling on a Mac. Note that testing for
- * just __MWERKS__ is not good enough, because the Codewarrior is now used
- * on non-Mac platforms.
- */
-#ifndef MACOS
-# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
- defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
-# define MACOS
-# endif
-#endif
-
-/* Enough people need this for various reasons to include it here */
-#if !defined(MACOS) && !defined(RISCOS) && !defined(_WIN32_WCE)
-# include <sys/types.h>
-#endif
-
-/* PNG_SETJMP_NOT_SUPPORTED and PNG_NO_SETJMP_SUPPORTED are deprecated. */
-#if !defined(PNG_NO_SETJMP) && \
- !defined(PNG_SETJMP_NOT_SUPPORTED) && !defined(PNG_NO_SETJMP_SUPPORTED)
-# define PNG_SETJMP_SUPPORTED
-#endif
-
-#ifdef PNG_SETJMP_SUPPORTED
-/* This is an attempt to force a single setjmp behaviour on Linux. If
- * the X config stuff didn't define _BSD_SOURCE we wouldn't need this.
+/* Function calling conventions.
+ * =============================
+ * Normally it is not necessary to specify to the compiler how to call
+ * a function - it just does it - however on x86 systems derived from
+ * Microsoft and Borland C compilers ('IBM PC', 'DOS', 'Windows' systems
+ * and some others) there are multiple ways to call a function and the
+ * default can be changed on the compiler command line. For this reason
+ * libpng specifies the calling convention of every exported function and
+ * every function called via a user supplied function pointer. This is
+ * done in this file by defining the following macros:
*
- * You can bypass this test if you know that your application uses exactly
- * the same setjmp.h that was included when libpng was built. Only define
- * PNG_SKIP_SETJMP_CHECK while building your application, prior to the
- * application's '#include "png.h"'. Don't define PNG_SKIP_SETJMP_CHECK
- * while building a separate libpng library for general use.
- */
-
-# ifndef PNG_SKIP_SETJMP_CHECK
-# ifdef __linux__
-# ifdef _BSD_SOURCE
-# define PNG_SAVE_BSD_SOURCE
-# undef _BSD_SOURCE
-# endif
-# ifdef _SETJMP_H
- /* If you encounter a compiler error here, see the explanation
- * near the end of INSTALL.
- */
- __pngconf.h__ in libpng already includes setjmp.h;
- __dont__ include it again.;
-# endif
-# endif /* __linux__ */
-# endif /* PNG_SKIP_SETJMP_CHECK */
-
- /* Include setjmp.h for error handling */
-# include <setjmp.h>
+ * PNGAPI Calling convention for exported functions.
+ * PNGCBAPI Calling convention for user provided (callback) functions.
+ * PNGCAPI Calling convention used by the ANSI-C library (required
+ * for longjmp callbacks and sometimes used internally to
+ * specify the calling convention for zlib).
+ *
+ * These macros should never be overridden. If it is necessary to
+ * change calling convention in a private build this can be done
+ * by setting PNG_API_RULE (which defaults to 0) to one of the values
+ * below to select the correct 'API' variants.
+ *
+ * PNG_API_RULE=0 Use PNGCAPI - the 'C' calling convention - throughout.
+ * This is correct in every known environment.
+ * PNG_API_RULE=1 Use the operating system convention for PNGAPI and
+ * the 'C' calling convention (from PNGCAPI) for
+ * callbacks (PNGCBAPI). This is no longer required
+ * in any known environment - if it has to be used
+ * please post an explanation of the problem to the
+ * libpng mailing list.
+ *
+ * These cases only differ if the operating system does not use the C
+ * calling convention, at present this just means the above cases
+ * (x86 DOS/Windows sytems) and, even then, this does not apply to
+ * Cygwin running on those systems.
+ *
+ * Note that the value must be defined in pnglibconf.h so that what
+ * the application uses to call the library matches the conventions
+ * set when building the library.
+ */
+
+/* Symbol export
+ * =============
+ * When building a shared library it is almost always necessary to tell
+ * the compiler which symbols to export. The png.h macro 'PNG_EXPORT'
+ * is used to mark the symbols. On some systems these symbols can be
+ * extracted at link time and need no special processing by the compiler,
+ * on other systems the symbols are flagged by the compiler and just
+ * the declaration requires a special tag applied (unfortunately) in a
+ * compiler dependent way. Some systems can do either.
+ *
+ * A small number of older systems also require a symbol from a DLL to
+ * be flagged to the program that calls it. This is a problem because
+ * we do not know in the header file included by application code that
+ * the symbol will come from a shared library, as opposed to a statically
+ * linked one. For this reason the application must tell us by setting
+ * the magic flag PNG_USE_DLL to turn on the special processing before
+ * it includes png.h.
+ *
+ * Four additional macros are used to make this happen:
+ *
+ * PNG_IMPEXP The magic (if any) to cause a symbol to be exported from
+ * the build or imported if PNG_USE_DLL is set - compiler
+ * and system specific.
+ *
+ * PNG_EXPORT_TYPE(type) A macro that pre or appends PNG_IMPEXP to
+ * 'type', compiler specific.
+ *
+ * PNG_DLL_EXPORT Set to the magic to use during a libpng build to
+ * make a symbol exported from the DLL.
+ *
+ * PNG_DLL_IMPORT Set to the magic to force the libpng symbols to come
+ * from a DLL - used to define PNG_IMPEXP when
+ * PNG_USE_DLL is set.
+ */
+
+/* System specific discovery.
+ * ==========================
+ * This code is used at build time to find PNG_IMPEXP, the API settings
+ * and PNG_EXPORT_TYPE(), it may also set a macro to indicate the DLL
+ * import processing is possible. On Windows/x86 systems it also sets
+ * compiler-specific macros to the values required to change the calling
+ * conventions of the various functions.
+ */
+#if ( defined(_Windows) || defined(_WINDOWS) || defined(WIN32) ||\
+ defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) ) &&\
+ ( defined(_X86_) || defined(_X64_) || defined(_M_IX86) ||\
+ defined(_M_X64) || defined(_M_IA64) )
+ /* Windows system (DOS doesn't support DLLs) running on x86/x64. Includes
+ * builds under Cygwin or MinGW. Also includes Watcom builds but these need
+ * special treatment because they are not compatible with GCC or Visual C
+ * because of different calling conventions.
+ */
+# if PNG_API_RULE == 2
+ /* If this line results in an error, either because __watcall is not
+ * understood or because of a redefine just below you cannot use *this*
+ * build of the library with the compiler you are using. *This* build was
+ * build using Watcom and applications must also be built using Watcom!
+ */
+# define PNGCAPI __watcall
+# endif
-# ifdef __linux__
-# ifdef PNG_SAVE_BSD_SOURCE
-# ifdef _BSD_SOURCE
-# undef _BSD_SOURCE
-# endif
-# define _BSD_SOURCE
-# undef PNG_SAVE_BSD_SOURCE
+# if defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) || defined(__WINSCW__)
+# define PNGCAPI __cdecl
+# if PNG_API_RULE == 1
+# define PNGAPI __stdcall
# endif
-# endif /* __linux__ */
-#endif /* PNG_SETJMP_SUPPORTED */
-
-#if defined(BSD) && !defined(VXWORKS)
-# include <strings.h>
-#else
-# include <string.h>
-#endif
-
-/* Other defines for things like memory and the like can go here. */
-
-/* This controls how fine the dithering gets. As this allocates
- * a largish chunk of memory (32K), those who are not as concerned
- * with dithering quality can decrease some or all of these.
- */
-#ifndef PNG_DITHER_RED_BITS
-# define PNG_DITHER_RED_BITS 5
-#endif
-#ifndef PNG_DITHER_GREEN_BITS
-# define PNG_DITHER_GREEN_BITS 5
-#endif
-#ifndef PNG_DITHER_BLUE_BITS
-# define PNG_DITHER_BLUE_BITS 5
-#endif
-
-/* This controls how fine the gamma correction becomes when you
- * are only interested in 8 bits anyway. Increasing this value
- * results in more memory being used, and more pow() functions
- * being called to fill in the gamma tables. Don't set this value
- * less then 8, and even that may not work (I haven't tested it).
- */
-
-#ifndef PNG_MAX_GAMMA_8
-# define PNG_MAX_GAMMA_8 11
-#endif
-
-/* This controls how much a difference in gamma we can tolerate before
- * we actually start doing gamma conversion.
- */
-#ifndef PNG_GAMMA_THRESHOLD
-# define PNG_GAMMA_THRESHOLD 0.05
-#endif
-
-/* The following uses const char * instead of char * for error
- * and warning message functions, so some compilers won't complain.
- * If you do not want to use const, define PNG_NO_CONST here.
- */
-
-#ifndef PNG_CONST
-# ifndef PNG_NO_CONST
-# define PNG_CONST const
# else
-# define PNG_CONST
-# endif
-#endif
-
-/* The following defines give you the ability to remove code from the
- * library that you will not be using. I wish I could figure out how to
- * automate this, but I can't do that without making it seriously hard
- * on the users. So if you are not using an ability, change the #define
- * to and #undef, and that part of the library will not be compiled. If
- * your linker can't find a function, you may want to make sure the
- * ability is defined here. Some of these depend upon some others being
- * defined. I haven't figured out all the interactions here, so you may
- * have to experiment awhile to get everything to compile. If you are
- * creating or using a shared library, you probably shouldn't touch this,
- * as it will affect the size of the structures, and this will cause bad
- * things to happen if the library and/or application ever change.
- */
-
-/* Any features you will not be using can be undef'ed here */
-
-/* GR-P, 0.96a: Set "*TRANSFORMS_SUPPORTED as default but allow user
- * to turn it off with PNG_NO_READ|WRITE_TRANSFORMS on the compile line,
- * then pick and choose which ones to define without having to edit this
- * file. It is safe to use the PNG_NO_READ|WRITE_TRANSFORMS
- * if you only want to have a png-compliant reader/writer but don't need
- * any of the extra transformations. This saves about 80 kbytes in a
- * typical installation of the library. (PNG_NO_* form added in version
- * 1.0.1c, for consistency; PNG_*_TRANSFORMS_NOT_SUPPORTED deprecated in
- * 1.4.0)
- */
-
-/* Ignore attempt to turn off both floating and fixed point support */
-#if !defined(PNG_FLOATING_POINT_SUPPORTED) || \
- !defined(PNG_NO_FIXED_POINT_SUPPORTED)
-# define PNG_FIXED_POINT_SUPPORTED
-#endif
-
-#ifdef PNG_READ_SUPPORTED
-
-/* PNG_READ_TRANSFORMS_NOT_SUPPORTED is deprecated. */
-#if !defined(PNG_READ_TRANSFORMS_NOT_SUPPORTED) && \
- !defined(PNG_NO_READ_TRANSFORMS)
-# define PNG_READ_TRANSFORMS_SUPPORTED
-#endif
-
-#ifdef PNG_READ_TRANSFORMS_SUPPORTED
-# ifndef PNG_NO_READ_EXPAND
-# define PNG_READ_EXPAND_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_SHIFT
-# define PNG_READ_SHIFT_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_PACK
-# define PNG_READ_PACK_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_BGR
-# define PNG_READ_BGR_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_SWAP
-# define PNG_READ_SWAP_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_PACKSWAP
-# define PNG_READ_PACKSWAP_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_INVERT
-# define PNG_READ_INVERT_SUPPORTED
-# endif
-#if 0 /* removed from libpng-1.4.0 */
-# ifndef PNG_NO_READ_DITHER
-# define PNG_READ_DITHER_SUPPORTED
-# endif
-#endif /* 0 */
-# ifndef PNG_NO_READ_BACKGROUND
-# define PNG_READ_BACKGROUND_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_16_TO_8
-# define PNG_READ_16_TO_8_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_FILLER
-# define PNG_READ_FILLER_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_GAMMA
-# define PNG_READ_GAMMA_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_GRAY_TO_RGB
-# define PNG_READ_GRAY_TO_RGB_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_SWAP_ALPHA
-# define PNG_READ_SWAP_ALPHA_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_INVERT_ALPHA
-# define PNG_READ_INVERT_ALPHA_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_STRIP_ALPHA
-# define PNG_READ_STRIP_ALPHA_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_USER_TRANSFORM
-# define PNG_READ_USER_TRANSFORM_SUPPORTED
-# endif
-# ifndef PNG_NO_READ_RGB_TO_GRAY
-# define PNG_READ_RGB_TO_GRAY_SUPPORTED
-# endif
-#endif /* PNG_READ_TRANSFORMS_SUPPORTED */
-
-/* PNG_PROGRESSIVE_READ_NOT_SUPPORTED is deprecated. */
-#if !defined(PNG_NO_PROGRESSIVE_READ) && \
- !defined(PNG_PROGRESSIVE_READ_NOT_SUPPORTED) /* if you don't do progressive */
-# define PNG_PROGRESSIVE_READ_SUPPORTED /* reading. This is not talking */
-#endif /* about interlacing capability! You'll */
- /* still have interlacing unless you change the following define: */
-
-#define PNG_READ_INTERLACING_SUPPORTED /* required for PNG-compliant decoders */
-
-/* PNG_NO_SEQUENTIAL_READ_SUPPORTED is deprecated. */
-#if !defined(PNG_NO_SEQUENTIAL_READ) && \
- !defined(PNG_SEQUENTIAL_READ_SUPPORTED) && \
- !defined(PNG_NO_SEQUENTIAL_READ_SUPPORTED)
-# define PNG_SEQUENTIAL_READ_SUPPORTED
-#endif
-
-#ifndef PNG_NO_READ_COMPOSITE_NODIV
-# ifndef PNG_NO_READ_COMPOSITED_NODIV /* libpng-1.0.x misspelling */
-# define PNG_READ_COMPOSITE_NODIV_SUPPORTED /* well tested on Intel, SGI */
-# endif
-#endif
+ /* An older compiler, or one not detected (erroneously) above,
+ * if necessary override on the command line to get the correct
+ * variants for the compiler.
+ */
+# ifndef PNGCAPI
+# define PNGCAPI _cdecl
+# endif
+# if PNG_API_RULE == 1 && !defined(PNGAPI)
+# define PNGAPI _stdcall
+# endif
+# endif /* compiler/api */
+ /* NOTE: PNGCBAPI always defaults to PNGCAPI. */
-#if !defined(PNG_NO_GET_INT_32) || defined(PNG_READ_oFFS_SUPPORTED) || \
- defined(PNG_READ_pCAL_SUPPORTED)
-# ifndef PNG_GET_INT_32_SUPPORTED
-# define PNG_GET_INT_32_SUPPORTED
+# if defined(PNGAPI) && !defined(PNG_USER_PRIVATEBUILD)
+ ERROR: PNG_USER_PRIVATEBUILD must be defined if PNGAPI is changed
# endif
-#endif
-
-#endif /* PNG_READ_SUPPORTED */
-
-#ifdef PNG_WRITE_SUPPORTED
-
-/* PNG_WRITE_TRANSFORMS_NOT_SUPPORTED is deprecated. */
-#if !defined(PNG_WRITE_TRANSFORMS_NOT_SUPPORTED) && \
- !defined(PNG_NO_WRITE_TRANSFORMS)
-# define PNG_WRITE_TRANSFORMS_SUPPORTED
-#endif
-#ifdef PNG_WRITE_TRANSFORMS_SUPPORTED
-# ifndef PNG_NO_WRITE_SHIFT
-# define PNG_WRITE_SHIFT_SUPPORTED
-# endif
-# ifndef PNG_NO_WRITE_PACK
-# define PNG_WRITE_PACK_SUPPORTED
-# endif
-# ifndef PNG_NO_WRITE_BGR
-# define PNG_WRITE_BGR_SUPPORTED
-# endif
-# ifndef PNG_NO_WRITE_SWAP
-# define PNG_WRITE_SWAP_SUPPORTED
-# endif
-# ifndef PNG_NO_WRITE_PACKSWAP
-# define PNG_WRITE_PACKSWAP_SUPPORTED
-# endif
-# ifndef PNG_NO_WRITE_INVERT
-# define PNG_WRITE_INVERT_SUPPORTED
-# endif
-# ifndef PNG_NO_WRITE_FILLER
-# define PNG_WRITE_FILLER_SUPPORTED /* same as WRITE_STRIP_ALPHA */
-# endif
-# ifndef PNG_NO_WRITE_SWAP_ALPHA
-# define PNG_WRITE_SWAP_ALPHA_SUPPORTED
-# endif
-# ifndef PNG_NO_WRITE_INVERT_ALPHA
-# define PNG_WRITE_INVERT_ALPHA_SUPPORTED
-# endif
-# ifndef PNG_NO_WRITE_USER_TRANSFORM
-# define PNG_WRITE_USER_TRANSFORM_SUPPORTED
-# endif
-#endif /* PNG_WRITE_TRANSFORMS_SUPPORTED */
+# if (defined(_MSC_VER) && _MSC_VER < 800) ||\
+ (defined(__BORLANDC__) && __BORLANDC__ < 0x500)
+ /* older Borland and MSC
+ * compilers used '__export' and required this to be after
+ * the type.
+ */
+# ifndef PNG_EXPORT_TYPE
+# define PNG_EXPORT_TYPE(type) type PNG_IMPEXP
+# endif
+# define PNG_DLL_EXPORT __export
+# else /* newer compiler */
+# define PNG_DLL_EXPORT __declspec(dllexport)
+# ifndef PNG_DLL_IMPORT
+# define PNG_DLL_IMPORT __declspec(dllimport)
+# endif
+# endif /* compiler */
+
+#else /* !Windows/x86 */
+# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
+# define PNGAPI _System
+# else /* !Windows/x86 && !OS/2 */
+ /* Use the defaults, or define PNG*API on the command line (but
+ * this will have to be done for every compile!)
+ */
+# endif /* other system, !OS/2 */
+#endif /* !Windows/x86 */
-#if !defined(PNG_NO_WRITE_INTERLACING_SUPPORTED) && \
- !defined(PNG_WRITE_INTERLACING_SUPPORTED)
- /* This is not required for PNG-compliant encoders, but can cause
- * trouble if left undefined
- */
-# define PNG_WRITE_INTERLACING_SUPPORTED
+/* Now do all the defaulting . */
+#ifndef PNGCAPI
+# define PNGCAPI
#endif
-
-#if !defined(PNG_NO_WRITE_WEIGHTED_FILTER) && \
- !defined(PNG_WRITE_WEIGHTED_FILTER) && \
- defined(PNG_FLOATING_POINT_SUPPORTED)
-# define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
+#ifndef PNGCBAPI
+# define PNGCBAPI PNGCAPI
#endif
-
-#ifndef PNG_NO_WRITE_FLUSH
-# define PNG_WRITE_FLUSH_SUPPORTED
+#ifndef PNGAPI
+# define PNGAPI PNGCAPI
#endif
-#if !defined(PNG_NO_SAVE_INT_32) || defined(PNG_WRITE_oFFS_SUPPORTED) || \
- defined(PNG_WRITE_pCAL_SUPPORTED)
-# ifndef PNG_SAVE_INT_32_SUPPORTED
-# define PNG_SAVE_INT_32_SUPPORTED
+/* The default for PNG_IMPEXP depends on whether the library is
+ * being built or used.
+ */
+#ifndef PNG_IMPEXP
+# ifdef PNGLIB_BUILD
+ /* Building the library */
+# if (defined(DLL_EXPORT)/*from libtool*/ ||\
+ defined(_WINDLL) || defined(_DLL) || defined(__DLL__) ||\
+ defined(_USRDLL) ||\
+ defined(PNG_BUILD_DLL)) && defined(PNG_DLL_EXPORT)
+ /* Building a DLL. */
+# define PNG_IMPEXP PNG_DLL_EXPORT
+# endif /* DLL */
+# else
+ /* Using the library */
+# if defined(PNG_USE_DLL) && defined(PNG_DLL_IMPORT)
+ /* This forces use of a DLL, disallowing static linking */
+# define PNG_IMPEXP PNG_DLL_IMPORT
+# endif
# endif
-#endif
-#endif /* PNG_WRITE_SUPPORTED */
-
-#define PNG_NO_ERROR_NUMBERS
+# if !defined(PNG_IMPEXP)
+# include <qconfig.h>
+# if defined(QT_VISIBILITY_AVAILABLE)
+# define PNG_IMPEXP __attribute__((visibility("default")))
+# endif
+# endif
-#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
- defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
-# ifndef PNG_NO_USER_TRANSFORM_PTR
-# define PNG_USER_TRANSFORM_PTR_SUPPORTED
+# ifndef PNG_IMPEXP
+# define PNG_IMPEXP
# endif
#endif
-#if defined(PNG_STDIO_SUPPORTED) && !defined(PNG_TIME_RFC1123_SUPPORTED)
-# define PNG_TIME_RFC1123_SUPPORTED
-#endif
-
-/* This adds extra functions in pngget.c for accessing data from the
- * info pointer (added in version 0.99)
- * png_get_image_width()
- * png_get_image_height()
- * png_get_bit_depth()
- * png_get_color_type()
- * png_get_compression_type()
- * png_get_filter_type()
- * png_get_interlace_type()
- * png_get_pixel_aspect_ratio()
- * png_get_pixels_per_meter()
- * png_get_x_offset_pixels()
- * png_get_y_offset_pixels()
- * png_get_x_offset_microns()
- * png_get_y_offset_microns()
+/* THe following complexity is concerned with getting the 'attributes' of the
+ * declared function in the correct place. This potentially requires a separate
+ * PNG_EXPORT function for every compiler.
*/
-#if !defined(PNG_NO_EASY_ACCESS) && !defined(PNG_EASY_ACCESS_SUPPORTED)
-# define PNG_EASY_ACCESS_SUPPORTED
-#endif
-
-/* Added at libpng-1.2.0 */
-#if !defined(PNG_NO_USER_MEM) && !defined(PNG_USER_MEM_SUPPORTED)
-# define PNG_USER_MEM_SUPPORTED
-#endif
-
-/* Added at libpng-1.2.6 */
-#ifndef PNG_SET_USER_LIMITS_SUPPORTED
-# ifndef PNG_NO_SET_USER_LIMITS
-# define PNG_SET_USER_LIMITS_SUPPORTED
+#ifndef PNG_FUNCTION
+# ifdef __GNUC__
+# define PNG_FUNCTION(type, name, args, attributes)\
+ attributes type name args
+# else /* !GNUC */
+# ifdef _MSC_VER
+# define PNG_FUNCTION(type, name, args, attributes)\
+ attributes type name args
+# else /* !MSC */
+# define PNG_FUNCTION(type, name, args, attributes)\
+ type name args
+# endif
# endif
#endif
-/* Added at libpng-1.0.16 and 1.2.6. To accept all valid PNGs no matter
- * how large, set these limits to 0x7fffffffL
- */
-#ifndef PNG_USER_WIDTH_MAX
-# define PNG_USER_WIDTH_MAX 1000000L
-#endif
-#ifndef PNG_USER_HEIGHT_MAX
-# define PNG_USER_HEIGHT_MAX 1000000L
+#ifndef PNG_EXPORT_TYPE
+# define PNG_EXPORT_TYPE(type) PNG_IMPEXP type
#endif
-/* Added at libpng-1.4.0 */
-#ifndef PNG_USER_CHUNK_CACHE_MAX
-# define PNG_USER_CHUNK_CACHE_MAX 0x7fffffffL
-#endif
-
-/* Added at libpng-1.4.0 */
-#if !defined(PNG_NO_IO_STATE) && !defined(PNG_IO_STATE_SUPPORTED)
-# define PNG_IO_STATE_SUPPORTED
-#endif
-
-#ifndef PNG_LITERAL_SHARP
-# define PNG_LITERAL_SHARP 0x23
-#endif
-#ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET
-# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b
-#endif
-#ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET
-# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d
-#endif
-#ifndef PNG_STRING_NEWLINE
-#define PNG_STRING_NEWLINE "\n"
-#endif
-
-/* These are currently experimental features, define them if you want */
-
-/* Very little testing */
-/*
-#ifdef PNG_READ_SUPPORTED
-# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
-# define PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
-# endif
+ /* The ordinal value is only relevant when preprocessing png.h for symbol
+ * table entries, so we discard it here. See the .dfn files in the
+ * scripts directory.
+ */
+#ifndef PNG_EXPORTA
+# define PNG_EXPORTA(ordinal, type, name, args, attributes)\
+ extern PNG_FUNCTION(PNG_EXPORT_TYPE(type),(PNGAPI name),PNGARG(args),\
+ attributes)
#endif
-*/
-/* This is only for PowerPC big-endian and 680x0 systems */
-/* some testing */
-/*
-#ifndef PNG_READ_BIG_ENDIAN_SUPPORTED
-# define PNG_READ_BIG_ENDIAN_SUPPORTED
-#endif
-*/
+#define PNG_EXPORT(ordinal, type, name, args)\
+ PNG_EXPORTA(ordinal, type, name, args, )
-#if !defined(PNG_NO_USE_READ_MACROS) && !defined(PNG_USE_READ_MACROS)
-# define PNG_USE_READ_MACROS
+/* Use PNG_REMOVED to comment out a removed interface. */
+#ifndef PNG_REMOVED
+# define PNG_REMOVED(ordinal, type, name, args, attributes)
#endif
-/* Buggy compilers (e.g., gcc 2.7.2.2) need PNG_NO_POINTER_INDEXING */
-
-#if !defined(PNG_NO_POINTER_INDEXING) && \
- !defined(PNG_POINTER_INDEXING_SUPPORTED)
-# define PNG_POINTER_INDEXING_SUPPORTED
+#ifndef PNG_CALLBACK
+# define PNG_CALLBACK(type, name, args, attributes)\
+ type (PNGCBAPI name) PNGARG(args) attributes
#endif
-
-/* Any chunks you are not interested in, you can undef here. The
- * ones that allocate memory may be expecially important (hIST,
- * tEXt, zTXt, tRNS, pCAL). Others will just save time and make png_info
- * a bit smaller.
- */
-
-/* The size of the png_text structure changed in libpng-1.0.6 when
- * iTXt support was added. iTXt support was turned off by default through
- * libpng-1.2.x, to support old apps that malloc the png_text structure
- * instead of calling png_set_text() and letting libpng malloc it. It
- * was turned on by default in libpng-1.4.0.
+/* Support for compiler specific function attributes. These are used
+ * so that where compiler support is available incorrect use of API
+ * functions in png.h will generate compiler warnings.
+ *
+ * Added at libpng-1.2.41.
*/
-/* PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */
-#if defined(PNG_READ_SUPPORTED) && \
- !defined(PNG_READ_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
- !defined(PNG_NO_READ_ANCILLARY_CHUNKS)
-# define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
-#endif
-
-/* PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED is deprecated. */
-#if defined(PNG_WRITE_SUPPORTED) && \
- !defined(PNG_WRITE_ANCILLARY_CHUNKS_NOT_SUPPORTED) && \
- !defined(PNG_NO_WRITE_ANCILLARY_CHUNKS)
-# define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
-#endif
-
-#ifdef PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
-
-#ifdef PNG_NO_READ_TEXT
-# define PNG_NO_READ_iTXt
-# define PNG_NO_READ_tEXt
-# define PNG_NO_READ_zTXt
-#endif
-
-#ifndef PNG_NO_READ_bKGD
-# define PNG_READ_bKGD_SUPPORTED
-# define PNG_bKGD_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_cHRM
-# define PNG_READ_cHRM_SUPPORTED
-# define PNG_cHRM_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_gAMA
-# define PNG_READ_gAMA_SUPPORTED
-# define PNG_gAMA_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_hIST
-# define PNG_READ_hIST_SUPPORTED
-# define PNG_hIST_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_iCCP
-# define PNG_READ_iCCP_SUPPORTED
-# define PNG_iCCP_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_iTXt
-# ifndef PNG_READ_iTXt_SUPPORTED
-# define PNG_READ_iTXt_SUPPORTED
-# endif
-# ifndef PNG_iTXt_SUPPORTED
-# define PNG_iTXt_SUPPORTED
+#ifndef PNG_NO_PEDANTIC_WARNINGS
+# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
+# define PNG_PEDANTIC_WARNINGS_SUPPORTED
# endif
#endif
-#ifndef PNG_NO_READ_oFFs
-# define PNG_READ_oFFs_SUPPORTED
-# define PNG_oFFs_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_pCAL
-# define PNG_READ_pCAL_SUPPORTED
-# define PNG_pCAL_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sCAL
-# define PNG_READ_sCAL_SUPPORTED
-# define PNG_sCAL_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_pHYs
-# define PNG_READ_pHYs_SUPPORTED
-# define PNG_pHYs_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sBIT
-# define PNG_READ_sBIT_SUPPORTED
-# define PNG_sBIT_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sPLT
-# define PNG_READ_sPLT_SUPPORTED
-# define PNG_sPLT_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_sRGB
-# define PNG_READ_sRGB_SUPPORTED
-# define PNG_sRGB_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tEXt
-# define PNG_READ_tEXt_SUPPORTED
-# define PNG_tEXt_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tIME
-# define PNG_READ_tIME_SUPPORTED
-# define PNG_tIME_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_tRNS
-# define PNG_READ_tRNS_SUPPORTED
-# define PNG_tRNS_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_zTXt
-# define PNG_READ_zTXt_SUPPORTED
-# define PNG_zTXt_SUPPORTED
-#endif
-#ifndef PNG_NO_READ_OPT_PLTE
-# define PNG_READ_OPT_PLTE_SUPPORTED /* only affects support of the */
-#endif /* optional PLTE chunk in RGB and RGBA images */
-#if defined(PNG_READ_iTXt_SUPPORTED) || defined(PNG_READ_tEXt_SUPPORTED) || \
- defined(PNG_READ_zTXt_SUPPORTED)
-# define PNG_READ_TEXT_SUPPORTED
-# define PNG_TEXT_SUPPORTED
-#endif
-#endif /* PNG_READ_ANCILLARY_CHUNKS_SUPPORTED */
+#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
+ /* Support for compiler specific function attributes. These are used
+ * so that where compiler support is available incorrect use of API
+ * functions in png.h will generate compiler warnings. Added at libpng
+ * version 1.2.41.
+ */
+# ifdef __GNUC__
+# ifndef PNG_USE_RESULT
+# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
+# endif
+# ifndef PNG_NORETURN
+# define PNG_NORETURN __attribute__((__noreturn__))
+# endif
+# ifndef PNG_PTR_NORETURN
+# define PNG_PTR_NORETURN __attribute__((__noreturn__))
+# endif
+# ifndef PNG_ALLOCATED
+# define PNG_ALLOCATED __attribute__((__malloc__))
+# endif
-#ifndef PNG_NO_READ_UNKNOWN_CHUNKS
-# define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
-# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
-# define PNG_UNKNOWN_CHUNKS_SUPPORTED
-# endif
-#endif
-#if !defined(PNG_NO_READ_USER_CHUNKS) && \
- defined(PNG_READ_UNKNOWN_CHUNKS_SUPPORTED)
-# define PNG_READ_USER_CHUNKS_SUPPORTED
-# define PNG_USER_CHUNKS_SUPPORTED
-# ifdef PNG_NO_READ_UNKNOWN_CHUNKS
-# undef PNG_NO_READ_UNKNOWN_CHUNKS
-# endif
-# ifdef PNG_NO_HANDLE_AS_UNKNOWN
-# undef PNG_NO_HANDLE_AS_UNKNOWN
-# endif
-#endif
-#ifndef PNG_NO_HANDLE_AS_UNKNOWN
-# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-# endif
-#endif
+ /* This specifically protects structure members that should only be
+ * accessed from within the library, therefore should be empty during
+ * a library build.
+ */
+# ifndef PNGLIB_BUILD
+# ifndef PNG_DEPRECATED
+# define PNG_DEPRECATED __attribute__((__deprecated__))
+# endif
+# ifndef PNG_DEPSTRUCT
+# define PNG_DEPSTRUCT __attribute__((__deprecated__))
+# endif
+# ifndef PNG_PRIVATE
+# if 0 /* Doesn't work so we use deprecated instead*/
+# define PNG_PRIVATE \
+ __attribute__((warning("This function is not exported by libpng.")))
+# else
+# define PNG_PRIVATE \
+ __attribute__((__deprecated__))
+# endif
+# endif /* PNG_PRIVATE */
+# endif /* PNGLIB_BUILD */
+# endif /* __GNUC__ */
+# ifdef _MSC_VER /* may need to check value */
+# ifndef PNG_USE_RESULT
+# define PNG_USE_RESULT /*not supported*/
+# endif
+# ifndef PNG_NORETURN
+# define PNG_NORETURN __declspec(noreturn)
+# endif
+# ifndef PNG_PTR_NORETURN
+# define PNG_PTR_NORETURN /*not supported*/
+# endif
+# ifndef PNG_ALLOCATED
+# define PNG_ALLOCATED __declspec(restrict)
+# endif
-#ifdef PNG_WRITE_SUPPORTED
-#ifdef PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
+ /* This specifically protects structure members that should only be
+ * accessed from within the library, therefore should be empty during
+ * a library build.
+ */
+# ifndef PNGLIB_BUILD
+# ifndef PNG_DEPRECATED
+# define PNG_DEPRECATED __declspec(deprecated)
+# endif
+# ifndef PNG_DEPSTRUCT
+# define PNG_DEPSTRUCT __declspec(deprecated)
+# endif
+# ifndef PNG_PRIVATE
+# define PNG_PRIVATE __declspec(deprecated)
+# endif /* PNG_PRIVATE */
+# endif /* PNGLIB_BUILD */
+# endif /* __GNUC__ */
+#endif /* PNG_PEDANTIC_WARNINGS */
-#ifdef PNG_NO_WRITE_TEXT
-# define PNG_NO_WRITE_iTXt
-# define PNG_NO_WRITE_tEXt
-# define PNG_NO_WRITE_zTXt
-#endif
-#ifndef PNG_NO_WRITE_bKGD
-# define PNG_WRITE_bKGD_SUPPORTED
-# ifndef PNG_bKGD_SUPPORTED
-# define PNG_bKGD_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_cHRM
-# define PNG_WRITE_cHRM_SUPPORTED
-# ifndef PNG_cHRM_SUPPORTED
-# define PNG_cHRM_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_gAMA
-# define PNG_WRITE_gAMA_SUPPORTED
-# ifndef PNG_gAMA_SUPPORTED
-# define PNG_gAMA_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_hIST
-# define PNG_WRITE_hIST_SUPPORTED
-# ifndef PNG_hIST_SUPPORTED
-# define PNG_hIST_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_iCCP
-# define PNG_WRITE_iCCP_SUPPORTED
-# ifndef PNG_iCCP_SUPPORTED
-# define PNG_iCCP_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_iTXt
-# ifndef PNG_WRITE_iTXt_SUPPORTED
-# define PNG_WRITE_iTXt_SUPPORTED
-# endif
-# ifndef PNG_iTXt_SUPPORTED
-# define PNG_iTXt_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_oFFs
-# define PNG_WRITE_oFFs_SUPPORTED
-# ifndef PNG_oFFs_SUPPORTED
-# define PNG_oFFs_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_pCAL
-# define PNG_WRITE_pCAL_SUPPORTED
-# ifndef PNG_pCAL_SUPPORTED
-# define PNG_pCAL_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_sCAL
-# define PNG_WRITE_sCAL_SUPPORTED
-# ifndef PNG_sCAL_SUPPORTED
-# define PNG_sCAL_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_pHYs
-# define PNG_WRITE_pHYs_SUPPORTED
-# ifndef PNG_pHYs_SUPPORTED
-# define PNG_pHYs_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_sBIT
-# define PNG_WRITE_sBIT_SUPPORTED
-# ifndef PNG_sBIT_SUPPORTED
-# define PNG_sBIT_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_sPLT
-# define PNG_WRITE_sPLT_SUPPORTED
-# ifndef PNG_sPLT_SUPPORTED
-# define PNG_sPLT_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_sRGB
-# define PNG_WRITE_sRGB_SUPPORTED
-# ifndef PNG_sRGB_SUPPORTED
-# define PNG_sRGB_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_tEXt
-# define PNG_WRITE_tEXt_SUPPORTED
-# ifndef PNG_tEXt_SUPPORTED
-# define PNG_tEXt_SUPPORTED
-# endif
-#endif
-#ifndef PNG_NO_WRITE_tIME
-# define PNG_WRITE_tIME_SUPPORTED
-# ifndef PNG_tIME_SUPPORTED
-# define PNG_tIME_SUPPORTED
-# endif
+#ifndef PNG_DEPRECATED
+# define PNG_DEPRECATED /* Use of this function is deprecated */
#endif
-#ifndef PNG_NO_WRITE_tRNS
-# define PNG_WRITE_tRNS_SUPPORTED
-# ifndef PNG_tRNS_SUPPORTED
-# define PNG_tRNS_SUPPORTED
-# endif
+#ifndef PNG_USE_RESULT
+# define PNG_USE_RESULT /* The result of this function must be checked */
#endif
-#ifndef PNG_NO_WRITE_zTXt
-# define PNG_WRITE_zTXt_SUPPORTED
-# ifndef PNG_zTXt_SUPPORTED
-# define PNG_zTXt_SUPPORTED
-# endif
+#ifndef PNG_NORETURN
+# define PNG_NORETURN /* This function does not return */
#endif
-#if defined(PNG_WRITE_iTXt_SUPPORTED) || defined(PNG_WRITE_tEXt_SUPPORTED) || \
- defined(PNG_WRITE_zTXt_SUPPORTED)
-# define PNG_WRITE_TEXT_SUPPORTED
-# ifndef PNG_TEXT_SUPPORTED
-# define PNG_TEXT_SUPPORTED
-# endif
+#ifndef PNG_ALLOCATED
+# define PNG_ALLOCATED /* The result of the function is new memory */
#endif
-
-#ifdef PNG_WRITE_tIME_SUPPORTED
-# ifndef PNG_NO_CONVERT_tIME
-# ifndef _WIN32_WCE
-/* The "tm" structure is not supported on WindowsCE */
-# ifndef PNG_CONVERT_tIME_SUPPORTED
-# define PNG_CONVERT_tIME_SUPPORTED
-# endif
-# endif
-# endif
+#ifndef PNG_DEPSTRUCT
+# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */
#endif
-
-#endif /* PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED */
-
-#if !defined(PNG_NO_WRITE_FILTER) && !defined(PNG_WRITE_FILTER_SUPPORTED)
-# define PNG_WRITE_FILTER_SUPPORTED
+#ifndef PNG_PRIVATE
+# define PNG_PRIVATE /* This is a private libpng function */
#endif
-
-#ifndef PNG_NO_WRITE_UNKNOWN_CHUNKS
-# define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
-# ifndef PNG_UNKNOWN_CHUNKS_SUPPORTED
-# define PNG_UNKNOWN_CHUNKS_SUPPORTED
+#ifndef PNG_FP_EXPORT /* A floating point API. */
+# ifdef PNG_FLOATING_POINT_SUPPORTED
+# define PNG_FP_EXPORT(ordinal, type, name, args)\
+ PNG_EXPORT(ordinal, type, name, args)
+# else /* No floating point APIs */
+# define PNG_FP_EXPORT(ordinal, type, name, args)
# endif
#endif
-#ifndef PNG_NO_HANDLE_AS_UNKNOWN
-# ifndef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
-# define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+#ifndef PNG_FIXED_EXPORT /* A fixed point API. */
+# ifdef PNG_FIXED_POINT_SUPPORTED
+# define PNG_FIXED_EXPORT(ordinal, type, name, args)\
+ PNG_EXPORT(ordinal, type, name, args)
+# else /* No fixed point APIs */
+# define PNG_FIXED_EXPORT(ordinal, type, name, args)
# endif
#endif
-#endif /* PNG_WRITE_SUPPORTED */
-/* Turn this off to disable png_read_png() and
- * png_write_png() and leave the row_pointers member
- * out of the info structure.
+/* The following uses const char * instead of char * for error
+ * and warning message functions, so some compilers won't complain.
+ * If you do not want to use const, define PNG_NO_CONST here.
+ *
+ * This should not change how the APIs are called, so it can be done
+ * on a per-file basis in the application.
*/
-#ifndef PNG_NO_INFO_IMAGE
-# define PNG_INFO_IMAGE_SUPPORTED
-#endif
-
-/* Need the time information for converting tIME chunks */
-#ifdef PNG_CONVERT_tIME_SUPPORTED
- /* "time.h" functions are not supported on WindowsCE */
-# include <time.h>
+#ifndef PNG_CONST
+# ifndef PNG_NO_CONST
+# define PNG_CONST const
+# else
+# define PNG_CONST
+# endif
#endif
/* Some typedefs to get us started. These should be safe on most of the
@@ -1067,11 +492,11 @@ typedef short png_int_16;
typedef unsigned char png_byte;
#ifdef PNG_NO_SIZE_T
- typedef unsigned int png_size_t;
+typedef unsigned int png_size_t;
#else
- typedef size_t png_size_t;
+typedef size_t png_size_t;
#endif
-#define png_sizeof(x) sizeof(x)
+#define png_sizeof(x) (sizeof (x))
/* The following is needed for medium model support. It cannot be in the
* pngpriv.h header. Needs modification for other compilers besides
@@ -1091,20 +516,20 @@ typedef unsigned char png_byte;
# else
# define LDATA 0
# endif
- /* GRR: why is Cygwin in here? Cygwin is not Borland C... */
+ /* GRR: why is Cygwin in here? Cygwin is not Borland C... */
# if !defined(__WIN32__) && !defined(__FLAT__) && !defined(__CYGWIN__)
-# define PNG_MAX_MALLOC_64K
+# define PNG_MAX_MALLOC_64K /* only used in build */
# if (LDATA != 1)
# ifndef FAR
# define FAR __far
# endif
# define USE_FAR_KEYWORD
# endif /* LDATA != 1 */
- /* Possibly useful for moving data out of default segment.
- * Uncomment it if you want. Could also define FARDATA as
- * const if your compiler supports it. (SJT)
-# define FARDATA FAR
- */
+ /* Possibly useful for moving data out of default segment.
+ * Uncomment it if you want. Could also define FARDATA as
+ * const if your compiler supports it. (SJT)
+# define FARDATA FAR
+ */
# endif /* __WIN32__, __FLAT__, __CYGWIN__ */
#endif /* __BORLANDC__ */
@@ -1134,26 +559,37 @@ typedef unsigned char png_byte;
#endif
/* Typedef for floating-point numbers that are converted
- to fixed-point with a multiple of 100,000, e.g., int_gamma */
+ * to fixed-point with a multiple of 100,000, e.g., gamma
+ */
typedef png_int_32 png_fixed_point;
/* Add typedefs for pointers */
-typedef void FAR * png_voidp;
-typedef png_byte FAR * png_bytep;
-typedef png_uint_32 FAR * png_uint_32p;
-typedef png_int_32 FAR * png_int_32p;
-typedef png_uint_16 FAR * png_uint_16p;
-typedef png_int_16 FAR * png_int_16p;
-typedef PNG_CONST char FAR * png_const_charp;
-typedef char FAR * png_charp;
-typedef png_fixed_point FAR * png_fixed_point_p;
-
-#ifndef PNG_NO_STDIO
-typedef FILE * png_FILE_p;
+typedef void FAR * png_voidp;
+typedef PNG_CONST void FAR * png_const_voidp;
+typedef png_byte FAR * png_bytep;
+typedef PNG_CONST png_byte FAR * png_const_bytep;
+typedef png_uint_32 FAR * png_uint_32p;
+typedef PNG_CONST png_uint_32 FAR * png_const_uint_32p;
+typedef png_int_32 FAR * png_int_32p;
+typedef PNG_CONST png_int_32 FAR * png_const_int_32p;
+typedef png_uint_16 FAR * png_uint_16p;
+typedef PNG_CONST png_uint_16 FAR * png_const_uint_16p;
+typedef png_int_16 FAR * png_int_16p;
+typedef PNG_CONST png_int_16 FAR * png_const_int_16p;
+typedef char FAR * png_charp;
+typedef PNG_CONST char FAR * png_const_charp;
+typedef png_fixed_point FAR * png_fixed_point_p;
+typedef PNG_CONST png_fixed_point FAR * png_const_fixed_point_p;
+typedef png_size_t FAR * png_size_tp;
+typedef PNG_CONST png_size_t FAR * png_const_size_tp;
+
+#ifdef PNG_STDIO_SUPPORTED
+typedef FILE * png_FILE_p;
#endif
#ifdef PNG_FLOATING_POINT_SUPPORTED
-typedef double FAR * png_doublep;
+typedef double FAR * png_doublep;
+typedef PNG_CONST double FAR * png_const_doublep;
#endif
/* Pointers to pointers; i.e. arrays */
@@ -1172,279 +608,6 @@ typedef double FAR * FAR * png_doublepp;
/* Pointers to pointers to pointers; i.e., pointer to array */
typedef char FAR * FAR * FAR * png_charppp;
-/* Define PNG_BUILD_DLL if the module being built is a Windows
- * LIBPNG DLL.
- *
- * Define PNG_USE_DLL if you want to *link* to the Windows LIBPNG DLL.
- * It is equivalent to Microsoft predefined macro _DLL that is
- * automatically defined when you compile using the share
- * version of the CRT (C Run-Time library)
- *
- * The cygwin mods make this behavior a little different:
- * Define PNG_BUILD_DLL if you are building a dll for use with cygwin
- * Define PNG_STATIC if you are building a static library for use with cygwin,
- * -or- if you are building an application that you want to link to the
- * static library.
- * PNG_USE_DLL is defined by default (no user action needed) unless one of
- * the other flags is defined.
- */
-
-#if !defined(PNG_DLL) && (defined(PNG_BUILD_DLL) || defined(PNG_USE_DLL))
-# define PNG_DLL
-#endif
-
-#ifdef __CYGWIN__
-# undef PNGAPI
-# define PNGAPI __cdecl
-# undef PNG_IMPEXP
-# define PNG_IMPEXP
-#endif
-
-#define PNG_USE_LOCAL_ARRAYS /* Not used in libpng, defined for legacy apps */
-
-/* If you define PNGAPI, e.g., with compiler option "-DPNGAPI=__stdcall",
- * you may get warnings regarding the linkage of png_zalloc and png_zfree.
- * Don't ignore those warnings; you must also reset the default calling
- * convention in your compiler to match your PNGAPI, and you must build
- * zlib and your applications the same way you build libpng.
- */
-
-#if defined(__MINGW32__) && !defined(PNG_MODULEDEF)
-# ifndef PNG_NO_MODULEDEF
-# define PNG_NO_MODULEDEF
-# endif
-#endif
-
-#if !defined(PNG_IMPEXP) && defined(PNG_BUILD_DLL) && !defined(PNG_NO_MODULEDEF)
-# define PNG_IMPEXP
-#endif
-
-#if defined(PNG_DLL) || defined(_DLL) || defined(__DLL__ ) || \
- (( defined(_Windows) || defined(_WINDOWS) || \
- defined(WIN32) || defined(_WIN32) || defined(__WIN32__) ))
-
-# ifndef PNGAPI
-# if (defined(__GNUC__) && defined(__arm__)) || defined (__ARMCC__)
-# define PNGAPI
-# elif defined(__GNUC__) || (defined (_MSC_VER) && (_MSC_VER >= 800)) || defined(__WINSCW__)
-# define PNGAPI __cdecl
-# else
-# define PNGAPI _cdecl
-# endif
-# endif
-
-# if !defined(PNG_IMPEXP) && (!defined(PNG_DLL) || \
- 0 /* WINCOMPILER_WITH_NO_SUPPORT_FOR_DECLIMPEXP */)
-# define PNG_IMPEXP
-# endif
-
-# ifndef PNG_IMPEXP
-
-# define PNG_EXPORT_TYPE1(type,symbol) PNG_IMPEXP type PNGAPI symbol
-# define PNG_EXPORT_TYPE2(type,symbol) type PNG_IMPEXP PNGAPI symbol
-
- /* Borland/Microsoft */
-# if defined(_MSC_VER) || defined(__BORLANDC__)
-# if (_MSC_VER >= 800) || (__BORLANDC__ >= 0x500)
-# define PNG_EXPORT PNG_EXPORT_TYPE1
-# else
-# define PNG_EXPORT PNG_EXPORT_TYPE2
-# ifdef PNG_BUILD_DLL
-# define PNG_IMPEXP __export
-# else
-# define PNG_IMPEXP /*__import */ /* doesn't exist AFAIK in VC++ */
-# endif /* Exists in Borland C++ for
- C++ classes (== huge) */
-# endif
-# endif
-
-# ifndef PNG_IMPEXP
-# ifdef PNG_BUILD_DLL
-# define PNG_IMPEXP __declspec(dllexport)
-# else
-# define PNG_IMPEXP __declspec(dllimport)
-# endif
-# endif
-# endif /* PNG_IMPEXP */
-#else /* !(DLL || non-cygwin WINDOWS) */
-# if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
-# ifndef PNGAPI
-# define PNGAPI _System
-# endif
-# else
-# if 0 /* ... other platforms, with other meanings */
-# endif
-# endif
-
-# if !defined(PNG_IMPEXP)
-# include <qconfig.h>
-# if defined(QT_VISIBILITY_AVAILABLE)
-# define PNG_IMPEXP __attribute__((visibility("default")))
-# endif
-# endif
-
-#endif
-
-#ifndef PNGAPI
-# define PNGAPI
-#endif
-#ifndef PNG_IMPEXP
-# define PNG_IMPEXP
-#endif
-
-#ifdef PNG_BUILDSYMS
-# ifndef PNG_EXPORT
-# define PNG_EXPORT(type,symbol) PNG_FUNCTION_EXPORT symbol END
-# endif
-#endif
-
-#ifndef PNG_EXPORT
-# define PNG_EXPORT(type,symbol) PNG_IMPEXP type PNGAPI symbol
-#endif
-
-/* Support for compiler specific function attributes. These are used
- * so that where compiler support is available incorrect use of API
- * functions in png.h will generate compiler warnings.
- *
- * Added at libpng-1.2.41.
- */
-
-#ifndef PNG_NO_PEDANTIC_WARNINGS
-# ifndef PNG_PEDANTIC_WARNINGS_SUPPORTED
-# define PNG_PEDANTIC_WARNINGS_SUPPORTED
-# endif
-#endif
-
-#ifdef PNG_PEDANTIC_WARNINGS_SUPPORTED
-/* Support for compiler specific function attributes. These are used
- * so that where compiler support is available incorrect use of API
- * functions in png.h will generate compiler warnings. Added at libpng
- * version 1.2.41.
- */
-# ifdef __GNUC__
-# ifndef PNG_USE_RESULT
-# define PNG_USE_RESULT __attribute__((__warn_unused_result__))
-# endif
-# ifndef PNG_NORETURN
-# define PNG_NORETURN __attribute__((__noreturn__))
-# endif
-# ifndef PNG_ALLOCATED
-# define PNG_ALLOCATED __attribute__((__malloc__))
-# endif
-
- /* This specifically protects structure members that should only be
- * accessed from within the library, therefore should be empty during
- * a library build.
- */
-# ifndef PNG_DEPRECATED
-# define PNG_DEPRECATED __attribute__((__deprecated__))
-# endif
-# ifndef PNG_DEPSTRUCT
-# define PNG_DEPSTRUCT __attribute__((__deprecated__))
-# endif
-# ifndef PNG_PRIVATE
-# if 0 /* Doesn't work so we use deprecated instead*/
-# define PNG_PRIVATE \
- __attribute__((warning("This function is not exported by libpng.")))
-# else
-# define PNG_PRIVATE \
- __attribute__((__deprecated__))
-# endif
-# endif /* PNG_PRIVATE */
-# endif /* __GNUC__ */
-#endif /* PNG_PEDANTIC_WARNINGS */
-
-#ifndef PNG_DEPRECATED
-# define PNG_DEPRECATED /* Use of this function is deprecated */
-#endif
-#ifndef PNG_USE_RESULT
-# define PNG_USE_RESULT /* The result of this function must be checked */
-#endif
-#ifndef PNG_NORETURN
-# define PNG_NORETURN /* This function does not return */
-#endif
-#ifndef PNG_ALLOCATED
-# define PNG_ALLOCATED /* The result of the function is new memory */
-#endif
-#ifndef PNG_DEPSTRUCT
-# define PNG_DEPSTRUCT /* Access to this struct member is deprecated */
-#endif
-#ifndef PNG_PRIVATE
-# define PNG_PRIVATE /* This is a private libpng function */
-#endif
-
-/* Users may want to use these so they are not private. Any library
- * functions that are passed far data must be model-independent.
- */
-
-/* memory model/platform independent fns */
-#ifndef PNG_ABORT
-# if defined(_WINDOWS_) || defined(_WIN32_WCE)
-# define PNG_ABORT() ExitProcess(0)
-# else
-# define PNG_ABORT() abort()
-# endif
-#endif
-
-#ifdef USE_FAR_KEYWORD
-/* Use this to make far-to-near assignments */
-# define CHECK 1
-# define NOCHECK 0
-# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
-# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
-# define png_strcpy _fstrcpy
-# define png_strncpy _fstrncpy /* Added to v 1.2.6 */
-# define png_strlen _fstrlen
-# define png_memcmp _fmemcmp /* SJT: added */
-# define png_memcpy _fmemcpy
-# define png_memset _fmemset
-# define png_sprintf sprintf
-#else
-# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */
-# define CVT_PTR(ptr) (ptr)
-# define CVT_PTR_NOCHECK(ptr) (ptr)
-# define png_strcpy lstrcpyA
-# define png_strncpy lstrcpynA
-# define png_strlen lstrlenA
-# define png_memcmp memcmp
-# define png_memcpy CopyMemory
-# define png_memset memset
-# define png_sprintf wsprintfA
-# else
-# define CVT_PTR(ptr) (ptr)
-# define CVT_PTR_NOCHECK(ptr) (ptr)
-# define png_strcpy strcpy
-# define png_strncpy strncpy /* Added to v 1.2.6 */
-# define png_strlen strlen
-# define png_memcmp memcmp /* SJT: added */
-# define png_memcpy memcpy
-# define png_memset memset
-# define png_sprintf sprintf
-# ifndef PNG_NO_SNPRINTF
-# ifdef _MSC_VER
-# define png_snprintf _snprintf /* Added to v 1.2.19 */
-# define png_snprintf2 _snprintf
-# define png_snprintf6 _snprintf
-# else
-# define png_snprintf snprintf /* Added to v 1.2.19 */
-# define png_snprintf2 snprintf
-# define png_snprintf6 snprintf
-# endif
-# else
- /* You don't have or don't want to use snprintf(). Caution: Using
- * sprintf instead of snprintf exposes your application to accidental
- * or malevolent buffer overflows. If you don't have snprintf()
- * as a general rule you should provide one (you can get one from
- * Portable OpenSSH).
- */
-# define png_snprintf(s1,n,fmt,x1) sprintf(s1,fmt,x1)
-# define png_snprintf2(s1,n,fmt,x1,x2) sprintf(s1,fmt,x1,x2)
-# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
- sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
-# endif
-# endif
-#endif
-
/* png_alloc_size_t is guaranteed to be no smaller than png_size_t,
* and no smaller than png_uint_32. Casts from png_size_t or png_uint_32
* to png_alloc_size_t are not necessary; in fact, it is recommended
@@ -1455,38 +618,22 @@ typedef char FAR * FAR * FAR * png_charppp;
* to encounter practical situations that require such conversions.
*/
#if defined(__TURBOC__) && !defined(__FLAT__)
-# define png_mem_alloc farmalloc
-# define png_mem_free farfree
typedef unsigned long png_alloc_size_t;
#else
# if defined(_MSC_VER) && defined(MAXSEG_64K)
-# define png_mem_alloc(s) halloc(s, 1)
-# define png_mem_free hfree
typedef unsigned long png_alloc_size_t;
# else
-# if defined(_WINDOWS_) && (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
-# define png_mem_alloc(s) HeapAlloc(GetProcessHeap(), 0, s)
-# define png_mem_free(p) HeapFree(GetProcessHeap(), 0, p)
- typedef DWORD png_alloc_size_t;
+ /* This is an attempt to detect an old Windows system where (int) is
+ * actually 16 bits, in that case png_malloc must have an argument with a
+ * bigger size to accomodate the requirements of the library.
+ */
+# if (defined(_Windows) || defined(_WINDOWS) || defined(_WINDOWS_)) && \
+ (!defined(INT_MAX) || INT_MAX <= 0x7ffffffeL)
+ typedef DWORD png_alloc_size_t;
# else
-# define png_mem_alloc malloc
-# define png_mem_free free
typedef png_size_t png_alloc_size_t;
# endif
# endif
#endif
-/* End of memory model/platform independent support */
-
-/* Just a little check that someone hasn't tried to define something
- * contradictory.
- */
-#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
-# undef PNG_ZBUF_SIZE
-# define PNG_ZBUF_SIZE 65536L
-#endif
-
-
-/* Added at libpng-1.2.8 */
-#endif /* PNG_VERSION_INFO_ONLY */
#endif /* PNGCONF_H */
diff --git a/src/3rdparty/libpng/pngdebug.h b/src/3rdparty/libpng/pngdebug.h
new file mode 100644
index 0000000..16f81fd
--- /dev/null
+++ b/src/3rdparty/libpng/pngdebug.h
@@ -0,0 +1,157 @@
+
+/* pngdebug.h - Debugging macros for libpng, also used in pngtest.c
+ *
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+/* Define PNG_DEBUG at compile time for debugging information. Higher
+ * numbers for PNG_DEBUG mean more debugging information. This has
+ * only been added since version 0.95 so it is not implemented throughout
+ * libpng yet, but more support will be added as needed.
+ *
+ * png_debug[1-2]?(level, message ,arg{0-2})
+ * Expands to a statement (either a simple expression or a compound
+ * do..while(0) statement) that outputs a message with parameter
+ * substitution if PNG_DEBUG is defined to 2 or more. If PNG_DEBUG
+ * is undefined, 0 or 1 every png_debug expands to a simple expression
+ * (actually ((void)0)).
+ *
+ * level: level of detail of message, starting at 0. A level 'n'
+ * message is preceded by 'n' tab characters (not implemented
+ * on Microsoft compilers unless PNG_DEBUG_FILE is also
+ * defined, to allow debug DLL compilation with no standard IO).
+ * message: a printf(3) style text string. A trailing '\n' is added
+ * to the message.
+ * arg: 0 to 2 arguments for printf(3) style substitution in message.
+ */
+#ifndef PNGDEBUG_H
+#define PNGDEBUG_H
+/* These settings control the formatting of messages in png.c and pngerror.c */
+/* Moved to pngdebug.h at 1.5.0 */
+# ifndef PNG_LITERAL_SHARP
+# define PNG_LITERAL_SHARP 0x23
+# endif
+# ifndef PNG_LITERAL_LEFT_SQUARE_BRACKET
+# define PNG_LITERAL_LEFT_SQUARE_BRACKET 0x5b
+# endif
+# ifndef PNG_LITERAL_RIGHT_SQUARE_BRACKET
+# define PNG_LITERAL_RIGHT_SQUARE_BRACKET 0x5d
+# endif
+# ifndef PNG_STRING_NEWLINE
+# define PNG_STRING_NEWLINE "\n"
+# endif
+
+#ifdef PNG_DEBUG
+# if (PNG_DEBUG > 0)
+# if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
+# include <crtdbg.h>
+# if (PNG_DEBUG > 1)
+# ifndef _DEBUG
+# define _DEBUG
+# endif
+# ifndef png_debug
+# define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)
+# endif
+# ifndef png_debug1
+# define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)
+# endif
+# ifndef png_debug2
+# define png_debug2(l,m,p1,p2) \
+ _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)
+# endif
+# endif
+# else /* PNG_DEBUG_FILE || !_MSC_VER */
+# ifndef PNG_STDIO_SUPPORTED
+# include <stdio.h> /* not included yet */
+# endif
+# ifndef PNG_DEBUG_FILE
+# define PNG_DEBUG_FILE stderr
+# endif /* PNG_DEBUG_FILE */
+
+# if (PNG_DEBUG > 1)
+/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on
+ * non-ISO compilers
+ */
+# ifdef __STDC__
+# ifndef png_debug
+# define png_debug(l,m) \
+ do { \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
+ } while (0)
+# endif
+# ifndef png_debug1
+# define png_debug1(l,m,p1) \
+ do { \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
+ } while (0)
+# endif
+# ifndef png_debug2
+# define png_debug2(l,m,p1,p2) \
+ do { \
+ int num_tabs=l; \
+ fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
+ } while (0)
+# endif
+# else /* __STDC __ */
+# ifndef png_debug
+# define png_debug(l,m) \
+ do { \
+ int num_tabs=l; \
+ char format[256]; \
+ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+ m,PNG_STRING_NEWLINE); \
+ fprintf(PNG_DEBUG_FILE,format); \
+ } while (0)
+# endif
+# ifndef png_debug1
+# define png_debug1(l,m,p1) \
+ do { \
+ int num_tabs=l; \
+ char format[256]; \
+ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+ m,PNG_STRING_NEWLINE); \
+ fprintf(PNG_DEBUG_FILE,format,p1); \
+ } while (0)
+# endif
+# ifndef png_debug2
+# define png_debug2(l,m,p1,p2) \
+ do { \
+ int num_tabs=l; \
+ char format[256]; \
+ snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
+ (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
+ m,PNG_STRING_NEWLINE); \
+ fprintf(PNG_DEBUG_FILE,format,p1,p2); \
+ } while (0)
+# endif
+# endif /* __STDC __ */
+# endif /* (PNG_DEBUG > 1) */
+
+# endif /* _MSC_VER */
+# endif /* (PNG_DEBUG > 0) */
+#endif /* PNG_DEBUG */
+#ifndef png_debug
+# define png_debug(l, m) ((void)0)
+#endif
+#ifndef png_debug1
+# define png_debug1(l, m, p1) ((void)0)
+#endif
+#ifndef png_debug2
+# define png_debug2(l, m, p1, p2) ((void)0)
+#endif
+#endif /* PNGDEBUG_H */
diff --git a/src/3rdparty/libpng/pngerror.c b/src/3rdparty/libpng/pngerror.c
index 633eae2..8290bb4 100644
--- a/src/3rdparty/libpng/pngerror.c
+++ b/src/3rdparty/libpng/pngerror.c
@@ -1,8 +1,8 @@
/* pngerror.c - stub functions for i/o and memory allocation
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -16,18 +16,17 @@
* at each function.
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
-static void /* PRIVATE */
-png_default_error PNGARG((png_structp png_ptr,
- png_const_charp error_message)) PNG_NORETURN;
+#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+
+static PNG_FUNCTION(void, png_default_error,PNGARG((png_structp png_ptr,
+ png_const_charp error_message)),PNG_NORETURN);
+
#ifdef PNG_WARNINGS_SUPPORTED
static void /* PRIVATE */
png_default_warning PNGARG((png_structp png_ptr,
- png_const_charp warning_message));
+ png_const_charp warning_message));
#endif /* PNG_WARNINGS_SUPPORTED */
/* This function is called whenever there is a fatal error. This function
@@ -36,42 +35,45 @@ png_default_warning PNGARG((png_structp png_ptr,
* to replace the error function at run-time.
*/
#ifdef PNG_ERROR_TEXT_SUPPORTED
-void PNGAPI
-png_error(png_structp png_ptr, png_const_charp error_message)
+PNG_FUNCTION(void,PNGAPI
+png_error,(png_structp png_ptr, png_const_charp error_message),PNG_NORETURN)
{
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
char msg[16];
if (png_ptr != NULL)
{
- if (png_ptr->flags&
- (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
- {
- if (*error_message == PNG_LITERAL_SHARP)
- {
- /* Strip "#nnnn " from beginning of error message. */
- int offset;
- for (offset = 1; offset<15; offset++)
- if (error_message[offset] == ' ')
+ if (png_ptr->flags&
+ (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
+ {
+ if (*error_message == PNG_LITERAL_SHARP)
+ {
+ /* Strip "#nnnn " from beginning of error message. */
+ int offset;
+ for (offset = 1; offset<15; offset++)
+ if (error_message[offset] == ' ')
break;
- if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
- {
- int i;
- for (i = 0; i < offset - 1; i++)
- msg[i] = error_message[i + 1];
- msg[i - 1] = '\0';
- error_message = msg;
- }
- else
- error_message += offset;
- }
- else
- {
- if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
- {
- msg[0] = '0';
- msg[1] = '\0';
- error_message = msg;
- }
+
+ if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
+ {
+ int i;
+ for (i = 0; i < offset - 1; i++)
+ msg[i] = error_message[i + 1];
+ msg[i - 1] = '\0';
+ error_message = msg;
+ }
+
+ else
+ error_message += offset;
+ }
+
+ else
+ {
+ if (png_ptr->flags&PNG_FLAG_STRIP_ERROR_TEXT)
+ {
+ msg[0] = '0';
+ msg[1] = '\0';
+ error_message = msg;
+ }
}
}
}
@@ -84,8 +86,8 @@ png_error(png_structp png_ptr, png_const_charp error_message)
png_default_error(png_ptr, error_message);
}
#else
-void PNGAPI
-png_err(png_structp png_ptr)
+PNG_FUNCTION(void,PNGAPI
+png_err,(png_structp png_ptr),PNG_NORETURN)
{
if (png_ptr != NULL && png_ptr->error_fn != NULL)
(*(png_ptr->error_fn))(png_ptr, '\0');
@@ -110,16 +112,16 @@ png_warning(png_structp png_ptr, png_const_charp warning_message)
{
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (png_ptr->flags&
- (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
+ (PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))
#endif
- {
- if (*warning_message == PNG_LITERAL_SHARP)
- {
- for (offset = 1; offset < 15; offset++)
- if (warning_message[offset] == ' ')
+ {
+ if (*warning_message == PNG_LITERAL_SHARP)
+ {
+ for (offset = 1; offset < 15; offset++)
+ if (warning_message[offset] == ' ')
break;
- }
- }
+ }
+ }
}
if (png_ptr != NULL && png_ptr->warning_fn != NULL)
(*(png_ptr->warning_fn))(png_ptr, warning_message + offset);
@@ -133,9 +135,9 @@ void PNGAPI
png_benign_error(png_structp png_ptr, png_const_charp error_message)
{
if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
- png_warning(png_ptr, error_message);
+ png_warning(png_ptr, error_message);
else
- png_error(png_ptr, error_message);
+ png_error(png_ptr, error_message);
}
#endif
@@ -155,7 +157,7 @@ static PNG_CONST char png_digit[16] = {
#if defined(PNG_WARNINGS_SUPPORTED) || defined(PNG_ERROR_TEXT_SUPPORTED)
static void /* PRIVATE */
png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
- error_message)
+ error_message)
{
int iout = 0, iin = 0;
@@ -169,6 +171,7 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
buffer[iout++] = png_digit[c & 0x0f];
buffer[iout++] = PNG_LITERAL_RIGHT_SQUARE_BRACKET;
}
+
else
{
buffer[iout++] = (png_byte)c;
@@ -177,6 +180,7 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
if (error_message == NULL)
buffer[iout] = '\0';
+
else
{
buffer[iout++] = ':';
@@ -185,22 +189,24 @@ png_format_buffer(png_structp png_ptr, png_charp buffer, png_const_charp
buffer[iout + PNG_MAX_ERROR_TEXT - 1] = '\0';
}
}
+#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */
-#ifdef PNG_READ_SUPPORTED
-void PNGAPI
-png_chunk_error(png_structp png_ptr, png_const_charp error_message)
+#if defined(PNG_READ_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)
+PNG_FUNCTION(void,PNGAPI
+png_chunk_error,(png_structp png_ptr, png_const_charp error_message),
+ PNG_NORETURN)
{
char msg[18+PNG_MAX_ERROR_TEXT];
if (png_ptr == NULL)
- png_error(png_ptr, error_message);
+ png_error(png_ptr, error_message);
+
else
{
- png_format_buffer(png_ptr, msg, error_message);
- png_error(png_ptr, msg);
+ png_format_buffer(png_ptr, msg, error_message);
+ png_error(png_ptr, msg);
}
}
-#endif /* PNG_READ_SUPPORTED */
-#endif /* PNG_WARNINGS_SUPPORTED || PNG_ERROR_TEXT_SUPPORTED */
+#endif /* PNG_READ_SUPPORTED && PNG_ERROR_TEXT_SUPPORTED */
#ifdef PNG_WARNINGS_SUPPORTED
void PNGAPI
@@ -208,11 +214,12 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
{
char msg[18+PNG_MAX_ERROR_TEXT];
if (png_ptr == NULL)
- png_warning(png_ptr, warning_message);
+ png_warning(png_ptr, warning_message);
+
else
{
- png_format_buffer(png_ptr, msg, warning_message);
- png_warning(png_ptr, msg);
+ png_format_buffer(png_ptr, msg, warning_message);
+ png_warning(png_ptr, msg);
}
}
#endif /* PNG_WARNINGS_SUPPORTED */
@@ -222,14 +229,37 @@ png_chunk_warning(png_structp png_ptr, png_const_charp warning_message)
void PNGAPI
png_chunk_benign_error(png_structp png_ptr, png_const_charp error_message)
{
- if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
- png_chunk_warning(png_ptr, error_message);
- else
- png_chunk_error(png_ptr, error_message);
+ if (png_ptr->flags & PNG_FLAG_BENIGN_ERRORS_WARN)
+ png_chunk_warning(png_ptr, error_message);
+
+ else
+ png_chunk_error(png_ptr, error_message);
}
#endif
#endif /* PNG_READ_SUPPORTED */
+#ifdef PNG_ERROR_TEXT_SUPPORTED
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+PNG_FUNCTION(void,
+png_fixed_error,(png_structp png_ptr, png_const_charp name),PNG_NORETURN)
+{
+# define fixed_message "fixed point overflow in "
+# define fixed_message_ln ((sizeof fixed_message)-1)
+ int iin;
+ char msg[fixed_message_ln+PNG_MAX_ERROR_TEXT];
+ png_memcpy(msg, fixed_message, fixed_message_ln);
+ iin = 0;
+ if (name != NULL) while (iin < (PNG_MAX_ERROR_TEXT-1) && name[iin] != 0)
+ {
+ msg[fixed_message_ln + iin] = name[iin];
+ ++iin;
+ }
+ msg[fixed_message_ln + iin] = 0;
+ png_error(png_ptr, msg);
+}
+#endif
+#endif
+
#ifdef PNG_SETJMP_SUPPORTED
/* This API only exists if ANSI-C style error handling is used,
* otherwise it is necessary for png_default_error to be overridden.
@@ -242,7 +272,7 @@ png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn,
return NULL;
png_ptr->longjmp_fn = longjmp_fn;
- return &png_ptr->jmpbuf;
+ return &png_ptr->png_jmpbuf;
}
#endif
@@ -251,35 +281,38 @@ png_set_longjmp_fn(png_structp png_ptr, png_longjmp_ptr longjmp_fn,
* function is used by default, or if the program supplies NULL for the
* error function pointer in png_set_error_fn().
*/
-static void /* PRIVATE */
-png_default_error(png_structp png_ptr, png_const_charp error_message)
+static PNG_FUNCTION(void /* PRIVATE */,
+png_default_error,(png_structp png_ptr, png_const_charp error_message),
+ PNG_NORETURN)
{
#ifdef PNG_CONSOLE_IO_SUPPORTED
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (*error_message == PNG_LITERAL_SHARP)
{
- /* Strip "#nnnn " from beginning of error message. */
- int offset;
- char error_number[16];
- for (offset = 0; offset<15; offset++)
- {
+ /* Strip "#nnnn " from beginning of error message. */
+ int offset;
+ char error_number[16];
+ for (offset = 0; offset<15; offset++)
+ {
error_number[offset] = error_message[offset + 1];
if (error_message[offset] == ' ')
- break;
- }
- if ((offset > 1) && (offset < 15))
- {
- error_number[offset - 1] = '\0';
- fprintf(stderr, "libpng error no. %s: %s",
- error_number, error_message + offset + 1);
- fprintf(stderr, PNG_STRING_NEWLINE);
- }
- else
- {
- fprintf(stderr, "libpng error: %s, offset=%d",
- error_message, offset);
- fprintf(stderr, PNG_STRING_NEWLINE);
- }
+ break;
+ }
+
+ if ((offset > 1) && (offset < 15))
+ {
+ error_number[offset - 1] = '\0';
+ fprintf(stderr, "libpng error no. %s: %s",
+ error_number, error_message + offset + 1);
+ fprintf(stderr, PNG_STRING_NEWLINE);
+ }
+
+ else
+ {
+ fprintf(stderr, "libpng error: %s, offset=%d",
+ error_message, offset);
+ fprintf(stderr, PNG_STRING_NEWLINE);
+ }
}
else
#endif
@@ -288,26 +321,32 @@ png_default_error(png_structp png_ptr, png_const_charp error_message)
fprintf(stderr, PNG_STRING_NEWLINE);
}
#endif
+#ifndef PNG_CONSOLE_IO_SUPPORTED
+ PNG_UNUSED(error_message) /* Make compiler happy */
+#endif
+ png_longjmp(png_ptr, 1);
+}
+PNG_FUNCTION(void,PNGAPI
+png_longjmp,(png_structp png_ptr, int val),PNG_NORETURN)
+{
#ifdef PNG_SETJMP_SUPPORTED
if (png_ptr && png_ptr->longjmp_fn)
{
# ifdef USE_FAR_KEYWORD
- {
- jmp_buf jmpbuf;
- png_memcpy(jmpbuf, png_ptr->jmpbuf, png_sizeof(jmp_buf));
- png_ptr->longjmp_fn(jmpbuf, 1);
- }
+ {
+ jmp_buf png_jmpbuf;
+ png_memcpy(png_jmpbuf, png_ptr->png_jmpbuf, png_sizeof(jmp_buf));
+ png_ptr->longjmp_fn(png_jmpbuf, val);
+ }
+
# else
- png_ptr->longjmp_fn(png_ptr->jmpbuf, 1);
+ png_ptr->longjmp_fn(png_ptr->png_jmpbuf, val);
# endif
}
#endif
/* Here if not setjmp support or if png_ptr is null. */
PNG_ABORT();
-#ifndef PNG_CONSOLE_IO_SUPPORTED
- error_message = error_message; /* Make compiler happy */
-#endif
}
#ifdef PNG_WARNINGS_SUPPORTED
@@ -323,52 +362,56 @@ png_default_warning(png_structp png_ptr, png_const_charp warning_message)
# ifdef PNG_ERROR_NUMBERS_SUPPORTED
if (*warning_message == PNG_LITERAL_SHARP)
{
- int offset;
- char warning_number[16];
- for (offset = 0; offset < 15; offset++)
- {
- warning_number[offset] = warning_message[offset + 1];
- if (warning_message[offset] == ' ')
+ int offset;
+ char warning_number[16];
+ for (offset = 0; offset < 15; offset++)
+ {
+ warning_number[offset] = warning_message[offset + 1];
+ if (warning_message[offset] == ' ')
break;
- }
- if ((offset > 1) && (offset < 15))
- {
- warning_number[offset + 1] = '\0';
- fprintf(stderr, "libpng warning no. %s: %s",
- warning_number, warning_message + offset);
- fprintf(stderr, PNG_STRING_NEWLINE);
- }
- else
- {
- fprintf(stderr, "libpng warning: %s",
- warning_message);
- fprintf(stderr, PNG_STRING_NEWLINE);
- }
+ }
+
+ if ((offset > 1) && (offset < 15))
+ {
+ warning_number[offset + 1] = '\0';
+ fprintf(stderr, "libpng warning no. %s: %s",
+ warning_number, warning_message + offset);
+ fprintf(stderr, PNG_STRING_NEWLINE);
+ }
+
+ else
+ {
+ fprintf(stderr, "libpng warning: %s",
+ warning_message);
+ fprintf(stderr, PNG_STRING_NEWLINE);
+ }
}
else
# endif
+
{
- fprintf(stderr, "libpng warning: %s", warning_message);
- fprintf(stderr, PNG_STRING_NEWLINE);
+ fprintf(stderr, "libpng warning: %s", warning_message);
+ fprintf(stderr, PNG_STRING_NEWLINE);
}
#else
- warning_message = warning_message; /* Make compiler happy */
+ PNG_UNUSED(warning_message) /* Make compiler happy */
#endif
- png_ptr = png_ptr; /* Make compiler happy */
+ PNG_UNUSED(png_ptr) /* Make compiler happy */
}
#endif /* PNG_WARNINGS_SUPPORTED */
/* This function is called when the application wants to use another method
* of handling errors and warnings. Note that the error function MUST NOT
* return to the calling routine or serious problems will occur. The return
- * method used in the default routine calls longjmp(png_ptr->jmpbuf, 1)
+ * method used in the default routine calls longjmp(png_ptr->png_jmpbuf, 1)
*/
void PNGAPI
png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warning_fn)
+ png_error_ptr error_fn, png_error_ptr warning_fn)
{
if (png_ptr == NULL)
return;
+
png_ptr->error_ptr = error_ptr;
png_ptr->error_fn = error_fn;
png_ptr->warning_fn = warning_fn;
@@ -380,10 +423,11 @@ png_set_error_fn(png_structp png_ptr, png_voidp error_ptr,
* pointer before png_write_destroy and png_read_destroy are called.
*/
png_voidp PNGAPI
-png_get_error_ptr(png_structp png_ptr)
+png_get_error_ptr(png_const_structp png_ptr)
{
if (png_ptr == NULL)
return NULL;
+
return ((png_voidp)png_ptr->error_ptr);
}
@@ -394,8 +438,9 @@ png_set_strip_error_numbers(png_structp png_ptr, png_uint_32 strip_mode)
{
if (png_ptr != NULL)
{
- png_ptr->flags &=
- ((~(PNG_FLAG_STRIP_ERROR_NUMBERS|PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode);
+ png_ptr->flags &=
+ ((~(PNG_FLAG_STRIP_ERROR_NUMBERS |
+ PNG_FLAG_STRIP_ERROR_TEXT))&strip_mode);
}
}
#endif
diff --git a/src/3rdparty/libpng/pngget.c b/src/3rdparty/libpng/pngget.c
index 8611b85..b5e5798 100644
--- a/src/3rdparty/libpng/pngget.c
+++ b/src/3rdparty/libpng/pngget.c
@@ -1,8 +1,8 @@
/* pngget.c - retrieval of values from info struct
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -12,47 +12,44 @@
*
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
+#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+
png_uint_32 PNGAPI
-png_get_valid(png_structp png_ptr, png_infop info_ptr, png_uint_32 flag)
+png_get_valid(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_32 flag)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->valid & flag);
- else
- return(0);
+ return(0);
}
png_size_t PNGAPI
-png_get_rowbytes(png_structp png_ptr, png_infop info_ptr)
+png_get_rowbytes(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->rowbytes);
- else
- return(0);
+ return(0);
}
#ifdef PNG_INFO_IMAGE_SUPPORTED
png_bytepp PNGAPI
-png_get_rows(png_structp png_ptr, png_infop info_ptr)
+png_get_rows(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->row_pointers);
- else
- return(0);
+ return(0);
}
#endif
#ifdef PNG_EASY_ACCESS_SUPPORTED
/* Easy access to info, added in libpng-0.99 */
png_uint_32 PNGAPI
-png_get_image_width(png_structp png_ptr, png_infop info_ptr)
+png_get_image_width(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->width;
@@ -61,7 +58,7 @@ png_get_image_width(png_structp png_ptr, png_infop info_ptr)
}
png_uint_32 PNGAPI
-png_get_image_height(png_structp png_ptr, png_infop info_ptr)
+png_get_image_height(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->height;
@@ -70,7 +67,7 @@ png_get_image_height(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_bit_depth(png_structp png_ptr, png_infop info_ptr)
+png_get_bit_depth(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->bit_depth;
@@ -79,7 +76,7 @@ png_get_bit_depth(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_color_type(png_structp png_ptr, png_infop info_ptr)
+png_get_color_type(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->color_type;
@@ -88,7 +85,7 @@ png_get_color_type(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_filter_type(png_structp png_ptr, png_infop info_ptr)
+png_get_filter_type(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->filter_type;
@@ -97,7 +94,7 @@ png_get_filter_type(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_interlace_type(png_structp png_ptr, png_infop info_ptr)
+png_get_interlace_type(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->interlace_type;
@@ -106,7 +103,7 @@ png_get_interlace_type(png_structp png_ptr, png_infop info_ptr)
}
png_byte PNGAPI
-png_get_compression_type(png_structp png_ptr, png_infop info_ptr)
+png_get_compression_type(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return info_ptr->compression_type;
@@ -115,222 +112,275 @@ png_get_compression_type(png_structp png_ptr, png_infop info_ptr)
}
png_uint_32 PNGAPI
-png_get_x_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
+png_get_x_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
{
- if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_pHYs_SUPPORTED
- if (info_ptr->valid & PNG_INFO_pHYs)
- {
- png_debug1(1, "in %s retrieval function", "png_get_x_pixels_per_meter");
-
- if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
- return (0);
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
+ {
+ png_debug1(1, "in %s retrieval function",
+ "png_get_x_pixels_per_meter");
- else
- return (info_ptr->x_pixels_per_unit);
- }
-#else
- return (0);
+ if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
+ return (info_ptr->x_pixels_per_unit);
+ }
#endif
+
return (0);
}
png_uint_32 PNGAPI
-png_get_y_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
+png_get_y_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
{
- if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_pHYs_SUPPORTED
- if (info_ptr->valid & PNG_INFO_pHYs)
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
{
- png_debug1(1, "in %s retrieval function", "png_get_y_pixels_per_meter");
-
- if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER)
- return (0);
+ png_debug1(1, "in %s retrieval function",
+ "png_get_y_pixels_per_meter");
- else
- return (info_ptr->y_pixels_per_unit);
+ if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER)
+ return (info_ptr->y_pixels_per_unit);
}
-#else
- return (0);
#endif
+
return (0);
}
png_uint_32 PNGAPI
-png_get_pixels_per_meter(png_structp png_ptr, png_infop info_ptr)
+png_get_pixels_per_meter(png_const_structp png_ptr, png_const_infop info_ptr)
{
- if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_pHYs_SUPPORTED
- if (info_ptr->valid & PNG_INFO_pHYs)
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
{
png_debug1(1, "in %s retrieval function", "png_get_pixels_per_meter");
- if (info_ptr->phys_unit_type != PNG_RESOLUTION_METER ||
- info_ptr->x_pixels_per_unit != info_ptr->y_pixels_per_unit)
- return (0);
-
- else
- return (info_ptr->x_pixels_per_unit);
+ if (info_ptr->phys_unit_type == PNG_RESOLUTION_METER &&
+ info_ptr->x_pixels_per_unit == info_ptr->y_pixels_per_unit)
+ return (info_ptr->x_pixels_per_unit);
}
-#else
- return (0);
#endif
+
return (0);
}
#ifdef PNG_FLOATING_POINT_SUPPORTED
float PNGAPI
-png_get_pixel_aspect_ratio(png_structp png_ptr, png_infop info_ptr)
- {
- if (png_ptr != NULL && info_ptr != NULL)
-#ifdef PNG_pHYs_SUPPORTED
-
- if (info_ptr->valid & PNG_INFO_pHYs)
+png_get_pixel_aspect_ratio(png_const_structp png_ptr, png_const_infop info_ptr)
+{
+#ifdef PNG_READ_pHYs_SUPPORTED
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
{
png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio");
- if (info_ptr->x_pixels_per_unit == 0)
- return ((float)0.0);
-
- else
+ if (info_ptr->x_pixels_per_unit != 0)
return ((float)((float)info_ptr->y_pixels_per_unit
- /(float)info_ptr->x_pixels_per_unit));
+ /(float)info_ptr->x_pixels_per_unit));
}
-#else
- return (0.0);
#endif
+
return ((float)0.0);
}
#endif
+#ifdef PNG_FIXED_POINT_SUPPORTED
+png_fixed_point PNGAPI
+png_get_pixel_aspect_ratio_fixed(png_const_structp png_ptr,
+ png_const_infop info_ptr)
+{
+#ifdef PNG_READ_pHYs_SUPPORTED
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs)
+ && info_ptr->x_pixels_per_unit > 0 && info_ptr->y_pixels_per_unit > 0
+ && info_ptr->x_pixels_per_unit <= PNG_UINT_31_MAX
+ && info_ptr->y_pixels_per_unit <= PNG_UINT_31_MAX)
+ {
+ png_fixed_point res;
+
+ png_debug1(1, "in %s retrieval function", "png_get_aspect_ratio_fixed");
+
+ /* The following casts work because a PNG 4 byte integer only has a valid
+ * range of 0..2^31-1; otherwise the cast might overflow.
+ */
+ if (png_muldiv(&res, (png_int_32)info_ptr->y_pixels_per_unit, PNG_FP_1,
+ (png_int_32)info_ptr->x_pixels_per_unit))
+ return res;
+ }
+#endif
+
+ return 0;
+}
+#endif
+
png_int_32 PNGAPI
-png_get_x_offset_microns(png_structp png_ptr, png_infop info_ptr)
+png_get_x_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr)
{
- if (png_ptr != NULL && info_ptr != NULL)
#ifdef PNG_oFFs_SUPPORTED
-
- if (info_ptr->valid & PNG_INFO_oFFs)
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs))
{
png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
- if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
- return (0);
-
- else
- return (info_ptr->x_offset);
+ if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
+ return (info_ptr->x_offset);
}
-#else
- return (0);
#endif
+
return (0);
}
png_int_32 PNGAPI
-png_get_y_offset_microns(png_structp png_ptr, png_infop info_ptr)
+png_get_y_offset_microns(png_const_structp png_ptr, png_const_infop info_ptr)
{
- if (png_ptr != NULL && info_ptr != NULL)
-
#ifdef PNG_oFFs_SUPPORTED
- if (info_ptr->valid & PNG_INFO_oFFs)
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs))
{
png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
- if (info_ptr->offset_unit_type != PNG_OFFSET_MICROMETER)
- return (0);
-
- else
- return (info_ptr->y_offset);
+ if (info_ptr->offset_unit_type == PNG_OFFSET_MICROMETER)
+ return (info_ptr->y_offset);
}
-#else
- return (0);
#endif
+
return (0);
}
png_int_32 PNGAPI
-png_get_x_offset_pixels(png_structp png_ptr, png_infop info_ptr)
+png_get_x_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr)
{
- if (png_ptr != NULL && info_ptr != NULL)
-
#ifdef PNG_oFFs_SUPPORTED
- if (info_ptr->valid & PNG_INFO_oFFs)
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs))
{
- png_debug1(1, "in %s retrieval function", "png_get_x_offset_microns");
-
- if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
- return (0);
+ png_debug1(1, "in %s retrieval function", "png_get_x_offset_pixels");
- else
- return (info_ptr->x_offset);
+ if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
+ return (info_ptr->x_offset);
}
-#else
- return (0);
#endif
+
return (0);
}
png_int_32 PNGAPI
-png_get_y_offset_pixels(png_structp png_ptr, png_infop info_ptr)
+png_get_y_offset_pixels(png_const_structp png_ptr, png_const_infop info_ptr)
{
- if (png_ptr != NULL && info_ptr != NULL)
-
#ifdef PNG_oFFs_SUPPORTED
- if (info_ptr->valid & PNG_INFO_oFFs)
+ if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs))
{
- png_debug1(1, "in %s retrieval function", "png_get_y_offset_microns");
+ png_debug1(1, "in %s retrieval function", "png_get_y_offset_pixels");
- if (info_ptr->offset_unit_type != PNG_OFFSET_PIXEL)
- return (0);
-
- else
- return (info_ptr->y_offset);
+ if (info_ptr->offset_unit_type == PNG_OFFSET_PIXEL)
+ return (info_ptr->y_offset);
}
-#else
- return (0);
#endif
+
return (0);
}
-#if defined(PNG_INCH_CONVERSIONS) && defined(PNG_FLOATING_POINT_SUPPORTED)
+#ifdef PNG_INCH_CONVERSIONS_SUPPORTED
+static png_uint_32
+ppi_from_ppm(png_uint_32 ppm)
+{
+#if 0
+ /* The conversion is *(2.54/100), in binary (32 digits):
+ * .00000110100000001001110101001001
+ */
+ png_uint_32 t1001, t1101;
+ ppm >>= 1; /* .1 */
+ t1001 = ppm + (ppm >> 3); /* .1001 */
+ t1101 = t1001 + (ppm >> 1); /* .1101 */
+ ppm >>= 20; /* .000000000000000000001 */
+ t1101 += t1101 >> 15; /* .1101000000000001101 */
+ t1001 >>= 11; /* .000000000001001 */
+ t1001 += t1001 >> 12; /* .000000000001001000000001001 */
+ ppm += t1001; /* .000000000001001000001001001 */
+ ppm += t1101; /* .110100000001001110101001001 */
+ return (ppm + 16) >> 5;/* .00000110100000001001110101001001 */
+#else
+ /* The argument is a PNG unsigned integer, so it is not permitted
+ * to be bigger than 2^31.
+ */
+ png_fixed_point result;
+ if (ppm <= PNG_UINT_31_MAX && png_muldiv(&result, (png_int_32)ppm, 127,
+ 5000))
+ return result;
+
+ /* Overflow. */
+ return 0;
+#endif
+}
+
png_uint_32 PNGAPI
-png_get_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
+png_get_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr)
{
- return ((png_uint_32)((float)png_get_pixels_per_meter(png_ptr, info_ptr)
- *.0254 +.5));
+ return ppi_from_ppm(png_get_pixels_per_meter(png_ptr, info_ptr));
}
png_uint_32 PNGAPI
-png_get_x_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
+png_get_x_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr)
{
- return ((png_uint_32)((float)png_get_x_pixels_per_meter(png_ptr, info_ptr)
- *.0254 +.5));
+ return ppi_from_ppm(png_get_x_pixels_per_meter(png_ptr, info_ptr));
}
png_uint_32 PNGAPI
-png_get_y_pixels_per_inch(png_structp png_ptr, png_infop info_ptr)
+png_get_y_pixels_per_inch(png_const_structp png_ptr, png_const_infop info_ptr)
+{
+ return ppi_from_ppm(png_get_y_pixels_per_meter(png_ptr, info_ptr));
+}
+
+#ifdef PNG_FIXED_POINT_SUPPORTED
+static png_fixed_point
+png_fixed_inches_from_microns(png_structp png_ptr, png_int_32 microns)
+{
+ /* Convert from metres * 1,000,000 to inches * 100,000, meters to
+ * inches is simply *(100/2.54), so we want *(10/2.54) == 500/127.
+ * Notice that this can overflow - a warning is output and 0 is
+ * returned.
+ */
+ return png_muldiv_warn(png_ptr, microns, 500, 127);
+}
+
+png_fixed_point PNGAPI
+png_get_x_offset_inches_fixed(png_structp png_ptr,
+ png_const_infop info_ptr)
+{
+ return png_fixed_inches_from_microns(png_ptr,
+ png_get_x_offset_microns(png_ptr, info_ptr));
+}
+#endif
+
+#ifdef PNG_FIXED_POINT_SUPPORTED
+png_fixed_point PNGAPI
+png_get_y_offset_inches_fixed(png_structp png_ptr,
+ png_const_infop info_ptr)
{
- return ((png_uint_32)((float)png_get_y_pixels_per_meter(png_ptr, info_ptr)
- *.0254 +.5));
+ return png_fixed_inches_from_microns(png_ptr,
+ png_get_y_offset_microns(png_ptr, info_ptr));
}
+#endif
+#ifdef PNG_FLOATING_POINT_SUPPORTED
float PNGAPI
-png_get_x_offset_inches(png_structp png_ptr, png_infop info_ptr)
+png_get_x_offset_inches(png_const_structp png_ptr, png_const_infop info_ptr)
{
- return ((float)png_get_x_offset_microns(png_ptr, info_ptr)
- *.00003937);
+ /* To avoid the overflow do the conversion directly in floating
+ * point.
+ */
+ return (float)(png_get_x_offset_microns(png_ptr, info_ptr) * .00003937);
}
+#endif
+#ifdef PNG_FLOATING_POINT_SUPPORTED
float PNGAPI
-png_get_y_offset_inches(png_structp png_ptr, png_infop info_ptr)
+png_get_y_offset_inches(png_const_structp png_ptr, png_const_infop info_ptr)
{
- return ((float)png_get_y_offset_microns(png_ptr, info_ptr)
- *.00003937);
+ /* To avoid the overflow do the conversion directly in floating
+ * point.
+ */
+ return (float)(png_get_y_offset_microns(png_ptr, info_ptr) * .00003937);
}
+#endif
#ifdef PNG_pHYs_SUPPORTED
png_uint_32 PNGAPI
-png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
- png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
+png_get_pHYs_dpi(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
@@ -343,15 +393,18 @@ png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
*res_x = info_ptr->x_pixels_per_unit;
retval |= PNG_INFO_pHYs;
}
+
if (res_y != NULL)
{
*res_y = info_ptr->y_pixels_per_unit;
retval |= PNG_INFO_pHYs;
}
+
if (unit_type != NULL)
{
*unit_type = (int)info_ptr->phys_unit_type;
retval |= PNG_INFO_pHYs;
+
if (*unit_type == 1)
{
if (res_x != NULL) *res_x = (png_uint_32)(*res_x * .0254 + .50);
@@ -359,176 +412,182 @@ png_get_pHYs_dpi(png_structp png_ptr, png_infop info_ptr,
}
}
}
+
return (retval);
}
#endif /* PNG_pHYs_SUPPORTED */
-#endif /* PNG_INCH_CONVERSIONS && PNG_FLOATING_POINT_SUPPORTED */
+#endif /* PNG_INCH_CONVERSIONS_SUPPORTED */
/* png_get_channels really belongs in here, too, but it's been around longer */
#endif /* PNG_EASY_ACCESS_SUPPORTED */
png_byte PNGAPI
-png_get_channels(png_structp png_ptr, png_infop info_ptr)
+png_get_channels(png_const_structp png_ptr, png_const_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->channels);
- else
- return (0);
+
+ return (0);
}
-png_bytep PNGAPI
-png_get_signature(png_structp png_ptr, png_infop info_ptr)
+png_const_bytep PNGAPI
+png_get_signature(png_const_structp png_ptr, png_infop info_ptr)
{
if (png_ptr != NULL && info_ptr != NULL)
return(info_ptr->signature);
- else
- return (NULL);
+
+ return (NULL);
}
#ifdef PNG_bKGD_SUPPORTED
png_uint_32 PNGAPI
-png_get_bKGD(png_structp png_ptr, png_infop info_ptr,
+png_get_bKGD(png_const_structp png_ptr, png_infop info_ptr,
png_color_16p *background)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD)
- && background != NULL)
+ && background != NULL)
{
png_debug1(1, "in %s retrieval function", "bKGD");
*background = &(info_ptr->background);
return (PNG_INFO_bKGD);
}
+
return (0);
}
#endif
#ifdef PNG_cHRM_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
+# ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_cHRM(png_structp png_ptr, png_infop info_ptr,
- double *white_x, double *white_y, double *red_x, double *red_y,
- double *green_x, double *green_y, double *blue_x, double *blue_y)
+png_get_cHRM(png_const_structp png_ptr, png_const_infop info_ptr,
+ double *white_x, double *white_y, double *red_x, double *red_y,
+ double *green_x, double *green_y, double *blue_x, double *blue_y)
{
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
{
png_debug1(1, "in %s retrieval function", "cHRM");
if (white_x != NULL)
- *white_x = (double)info_ptr->x_white;
+ *white_x = png_float(png_ptr, info_ptr->x_white, "cHRM white X");
if (white_y != NULL)
- *white_y = (double)info_ptr->y_white;
+ *white_y = png_float(png_ptr, info_ptr->y_white, "cHRM white Y");
if (red_x != NULL)
- *red_x = (double)info_ptr->x_red;
+ *red_x = png_float(png_ptr, info_ptr->x_red, "cHRM red X");
if (red_y != NULL)
- *red_y = (double)info_ptr->y_red;
+ *red_y = png_float(png_ptr, info_ptr->y_red, "cHRM red Y");
if (green_x != NULL)
- *green_x = (double)info_ptr->x_green;
+ *green_x = png_float(png_ptr, info_ptr->x_green, "cHRM green X");
if (green_y != NULL)
- *green_y = (double)info_ptr->y_green;
+ *green_y = png_float(png_ptr, info_ptr->y_green, "cHRM green Y");
if (blue_x != NULL)
- *blue_x = (double)info_ptr->x_blue;
+ *blue_x = png_float(png_ptr, info_ptr->x_blue, "cHRM blue X");
if (blue_y != NULL)
- *blue_y = (double)info_ptr->y_blue;
+ *blue_y = png_float(png_ptr, info_ptr->y_blue, "cHRM blue Y");
return (PNG_INFO_cHRM);
}
+
return (0);
}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
+# endif
+
+# ifdef PNG_FIXED_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
- png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x,
- png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,
- png_fixed_point *blue_x, png_fixed_point *blue_y)
+png_get_cHRM_fixed(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_fixed_point *white_x, png_fixed_point *white_y, png_fixed_point *red_x,
+ png_fixed_point *red_y, png_fixed_point *green_x, png_fixed_point *green_y,
+ png_fixed_point *blue_x, png_fixed_point *blue_y)
{
png_debug1(1, "in %s retrieval function", "cHRM");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
{
if (white_x != NULL)
- *white_x = info_ptr->int_x_white;
+ *white_x = info_ptr->x_white;
if (white_y != NULL)
- *white_y = info_ptr->int_y_white;
+ *white_y = info_ptr->y_white;
if (red_x != NULL)
- *red_x = info_ptr->int_x_red;
+ *red_x = info_ptr->x_red;
if (red_y != NULL)
- *red_y = info_ptr->int_y_red;
+ *red_y = info_ptr->y_red;
if (green_x != NULL)
- *green_x = info_ptr->int_x_green;
+ *green_x = info_ptr->x_green;
if (green_y != NULL)
- *green_y = info_ptr->int_y_green;
+ *green_y = info_ptr->y_green;
if (blue_x != NULL)
- *blue_x = info_ptr->int_x_blue;
+ *blue_x = info_ptr->x_blue;
if (blue_y != NULL)
- *blue_y = info_ptr->int_y_blue;
+ *blue_y = info_ptr->y_blue;
return (PNG_INFO_cHRM);
}
+
return (0);
}
-#endif
+# endif
#endif
#ifdef PNG_gAMA_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-png_uint_32 PNGAPI
-png_get_gAMA(png_structp png_ptr, png_infop info_ptr, double *file_gamma)
+png_uint_32 PNGFAPI
+png_get_gAMA_fixed(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_fixed_point *file_gamma)
{
png_debug1(1, "in %s retrieval function", "gAMA");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
- && file_gamma != NULL)
+ && file_gamma != NULL)
{
- *file_gamma = (double)info_ptr->gamma;
+ *file_gamma = info_ptr->gamma;
return (PNG_INFO_gAMA);
}
+
return (0);
}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
+# ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_gAMA_fixed(png_structp png_ptr, png_infop info_ptr,
- png_fixed_point *int_file_gamma)
+png_get_gAMA(png_const_structp png_ptr, png_const_infop info_ptr,
+ double *file_gamma)
{
- png_debug1(1, "in %s retrieval function", "gAMA");
+ png_fixed_point igamma;
+ png_uint_32 ok = png_get_gAMA_fixed(png_ptr, info_ptr, &igamma);
- if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
- && int_file_gamma != NULL)
- {
- *int_file_gamma = info_ptr->int_gamma;
- return (PNG_INFO_gAMA);
- }
- return (0);
+ if (ok)
+ *file_gamma = png_float(png_ptr, igamma, "png_get_gAMA");
+
+ return ok;
}
-#endif
+
+# endif
#endif
#ifdef PNG_sRGB_SUPPORTED
png_uint_32 PNGAPI
-png_get_sRGB(png_structp png_ptr, png_infop info_ptr, int *file_srgb_intent)
+png_get_sRGB(png_const_structp png_ptr, png_const_infop info_ptr,
+ int *file_srgb_intent)
{
png_debug1(1, "in %s retrieval function", "sRGB");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB)
- && file_srgb_intent != NULL)
+ && file_srgb_intent != NULL)
{
*file_srgb_intent = (int)info_ptr->srgb_intent;
return (PNG_INFO_sRGB);
}
+
return (0);
}
#endif
#ifdef PNG_iCCP_SUPPORTED
png_uint_32 PNGAPI
-png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
- png_charpp name, int *compression_type,
- png_charpp profile, png_uint_32 *proflen)
+png_get_iCCP(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_charpp name, int *compression_type,
+ png_bytepp profile, png_uint_32 *proflen)
{
png_debug1(1, "in %s retrieval function", "iCCP");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_iCCP)
- && name != NULL && profile != NULL && proflen != NULL)
+ && name != NULL && profile != NULL && proflen != NULL)
{
*name = info_ptr->iccp_name;
*profile = info_ptr->iccp_profile;
@@ -539,45 +598,49 @@ png_get_iCCP(png_structp png_ptr, png_infop info_ptr,
*compression_type = (int)info_ptr->iccp_compression;
return (PNG_INFO_iCCP);
}
+
return (0);
}
#endif
#ifdef PNG_sPLT_SUPPORTED
png_uint_32 PNGAPI
-png_get_sPLT(png_structp png_ptr, png_infop info_ptr,
- png_sPLT_tpp spalettes)
+png_get_sPLT(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_sPLT_tpp spalettes)
{
if (png_ptr != NULL && info_ptr != NULL && spalettes != NULL)
{
- *spalettes = info_ptr->splt_palettes;
- return ((png_uint_32)info_ptr->splt_palettes_num);
+ *spalettes = info_ptr->splt_palettes;
+ return ((png_uint_32)info_ptr->splt_palettes_num);
}
+
return (0);
}
#endif
#ifdef PNG_hIST_SUPPORTED
png_uint_32 PNGAPI
-png_get_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p *hist)
+png_get_hIST(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_16p *hist)
{
png_debug1(1, "in %s retrieval function", "hIST");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST)
- && hist != NULL)
+ && hist != NULL)
{
*hist = info_ptr->hist;
return (PNG_INFO_hIST);
}
+
return (0);
}
#endif
png_uint_32 PNGAPI
png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
- png_uint_32 *width, png_uint_32 *height, int *bit_depth,
- int *color_type, int *interlace_type, int *compression_type,
- int *filter_type)
+ png_uint_32 *width, png_uint_32 *height, int *bit_depth,
+ int *color_type, int *interlace_type, int *compression_type,
+ int *filter_type)
{
png_debug1(1, "in %s retrieval function", "IHDR");
@@ -614,28 +677,29 @@ png_get_IHDR(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_oFFs_SUPPORTED
png_uint_32 PNGAPI
-png_get_oFFs(png_structp png_ptr, png_infop info_ptr,
- png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
+png_get_oFFs(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_int_32 *offset_x, png_int_32 *offset_y, int *unit_type)
{
png_debug1(1, "in %s retrieval function", "oFFs");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs)
- && offset_x != NULL && offset_y != NULL && unit_type != NULL)
+ && offset_x != NULL && offset_y != NULL && unit_type != NULL)
{
*offset_x = info_ptr->x_offset;
*offset_y = info_ptr->y_offset;
*unit_type = (int)info_ptr->offset_unit_type;
return (PNG_INFO_oFFs);
}
+
return (0);
}
#endif
#ifdef PNG_pCAL_SUPPORTED
png_uint_32 PNGAPI
-png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
- png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,
- png_charp *units, png_charpp *params)
+png_get_pCAL(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_charp *purpose, png_int_32 *X0, png_int_32 *X1, int *type, int *nparams,
+ png_charp *units, png_charpp *params)
{
png_debug1(1, "in %s retrieval function", "pCAL");
@@ -652,57 +716,78 @@ png_get_pCAL(png_structp png_ptr, png_infop info_ptr,
*params = info_ptr->pcal_params;
return (PNG_INFO_pCAL);
}
+
return (0);
}
#endif
#ifdef PNG_sCAL_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
+# ifdef PNG_FIXED_POINT_SUPPORTED
+# ifdef PNG_FLOATING_ARITHMETIC_SUPPORTED
+png_uint_32 PNGAPI
+png_get_sCAL_fixed(png_structp png_ptr, png_const_infop info_ptr,
+ int *unit, png_fixed_point *width, png_fixed_point *height)
+{
+ if (png_ptr != NULL && info_ptr != NULL &&
+ (info_ptr->valid & PNG_INFO_sCAL))
+ {
+ *unit = info_ptr->scal_unit;
+ /*TODO: make this work without FP support */
+ *width = png_fixed(png_ptr, atof(info_ptr->scal_s_width), "sCAL width");
+ *height = png_fixed(png_ptr, atof(info_ptr->scal_s_height),
+ "sCAL height");
+ return (PNG_INFO_sCAL);
+ }
+
+ return(0);
+}
+# endif /* FLOATING_ARITHMETIC */
+# endif /* FIXED_POINT */
+# ifdef PNG_FLOATING_POINT_SUPPORTED
png_uint_32 PNGAPI
-png_get_sCAL(png_structp png_ptr, png_infop info_ptr,
- int *unit, double *width, double *height)
+png_get_sCAL(png_const_structp png_ptr, png_const_infop info_ptr,
+ int *unit, double *width, double *height)
{
- if (png_ptr != NULL && info_ptr != NULL &&
- (info_ptr->valid & PNG_INFO_sCAL))
- {
- *unit = info_ptr->scal_unit;
- *width = info_ptr->scal_pixel_width;
- *height = info_ptr->scal_pixel_height;
- return (PNG_INFO_sCAL);
- }
- return(0);
+ if (png_ptr != NULL && info_ptr != NULL &&
+ (info_ptr->valid & PNG_INFO_sCAL))
+ {
+ *unit = info_ptr->scal_unit;
+ *width = atof(info_ptr->scal_s_width);
+ *height = atof(info_ptr->scal_s_height);
+ return (PNG_INFO_sCAL);
+ }
+
+ return(0);
}
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
+# endif /* FLOATING POINT */
png_uint_32 PNGAPI
-png_get_sCAL_s(png_structp png_ptr, png_infop info_ptr,
- int *unit, png_charpp width, png_charpp height)
+png_get_sCAL_s(png_const_structp png_ptr, png_const_infop info_ptr,
+ int *unit, png_charpp width, png_charpp height)
{
- if (png_ptr != NULL && info_ptr != NULL &&
- (info_ptr->valid & PNG_INFO_sCAL))
- {
- *unit = info_ptr->scal_unit;
- *width = info_ptr->scal_s_width;
- *height = info_ptr->scal_s_height;
- return (PNG_INFO_sCAL);
- }
- return(0);
+ if (png_ptr != NULL && info_ptr != NULL &&
+ (info_ptr->valid & PNG_INFO_sCAL))
+ {
+ *unit = info_ptr->scal_unit;
+ *width = info_ptr->scal_s_width;
+ *height = info_ptr->scal_s_height;
+ return (PNG_INFO_sCAL);
+ }
+
+ return(0);
}
-#endif
-#endif
-#endif
+#endif /* sCAL */
#ifdef PNG_pHYs_SUPPORTED
png_uint_32 PNGAPI
-png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
- png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
+png_get_pHYs(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_uint_32 *res_x, png_uint_32 *res_y, int *unit_type)
{
png_uint_32 retval = 0;
png_debug1(1, "in %s retrieval function", "pHYs");
if (png_ptr != NULL && info_ptr != NULL &&
- (info_ptr->valid & PNG_INFO_pHYs))
+ (info_ptr->valid & PNG_INFO_pHYs))
{
if (res_x != NULL)
{
@@ -722,13 +807,14 @@ png_get_pHYs(png_structp png_ptr, png_infop info_ptr,
retval |= PNG_INFO_pHYs;
}
}
+
return (retval);
}
-#endif
+#endif /* pHYs */
png_uint_32 PNGAPI
-png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
- int *num_palette)
+png_get_PLTE(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_colorp *palette, int *num_palette)
{
png_debug1(1, "in %s retrieval function", "PLTE");
@@ -740,35 +826,38 @@ png_get_PLTE(png_structp png_ptr, png_infop info_ptr, png_colorp *palette,
png_debug1(3, "num_palette = %d", *num_palette);
return (PNG_INFO_PLTE);
}
+
return (0);
}
#ifdef PNG_sBIT_SUPPORTED
png_uint_32 PNGAPI
-png_get_sBIT(png_structp png_ptr, png_infop info_ptr, png_color_8p *sig_bit)
+png_get_sBIT(png_const_structp png_ptr, png_infop info_ptr,
+ png_color_8p *sig_bit)
{
png_debug1(1, "in %s retrieval function", "sBIT");
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT)
- && sig_bit != NULL)
+ && sig_bit != NULL)
{
*sig_bit = &(info_ptr->sig_bit);
return (PNG_INFO_sBIT);
}
+
return (0);
}
#endif
#ifdef PNG_TEXT_SUPPORTED
png_uint_32 PNGAPI
-png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
- int *num_text)
+png_get_text(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_textp *text_ptr, int *num_text)
{
if (png_ptr != NULL && info_ptr != NULL && info_ptr->num_text > 0)
{
png_debug1(1, "in %s retrieval function",
- (png_ptr->chunk_name[0] == '\0' ? "text"
- : (png_const_charp)png_ptr->chunk_name));
+ (png_ptr->chunk_name[0] == '\0' ? "text" :
+ (png_const_charp)png_ptr->chunk_name));
if (text_ptr != NULL)
*text_ptr = info_ptr->text;
@@ -778,15 +867,17 @@ png_get_text(png_structp png_ptr, png_infop info_ptr, png_textp *text_ptr,
return ((png_uint_32)info_ptr->num_text);
}
+
if (num_text != NULL)
- *num_text = 0;
+ *num_text = 0;
+
return(0);
}
#endif
#ifdef PNG_tIME_SUPPORTED
png_uint_32 PNGAPI
-png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
+png_get_tIME(png_const_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
{
png_debug1(1, "in %s retrieval function", "tIME");
@@ -796,14 +887,15 @@ png_get_tIME(png_structp png_ptr, png_infop info_ptr, png_timep *mod_time)
*mod_time = &(info_ptr->mod_time);
return (PNG_INFO_tIME);
}
+
return (0);
}
#endif
#ifdef PNG_tRNS_SUPPORTED
png_uint_32 PNGAPI
-png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
- png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)
+png_get_tRNS(png_const_structp png_ptr, png_infop info_ptr,
+ png_bytep *trans_alpha, int *num_trans, png_color_16p *trans_color)
{
png_uint_32 retval = 0;
if (png_ptr != NULL && info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
@@ -812,104 +904,125 @@ png_get_tRNS(png_structp png_ptr, png_infop info_ptr,
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
- if (trans_alpha != NULL)
- {
- *trans_alpha = info_ptr->trans_alpha;
- retval |= PNG_INFO_tRNS;
- }
-
- if (trans_color != NULL)
- *trans_color = &(info_ptr->trans_color);
+ if (trans_alpha != NULL)
+ {
+ *trans_alpha = info_ptr->trans_alpha;
+ retval |= PNG_INFO_tRNS;
+ }
+
+ if (trans_color != NULL)
+ *trans_color = &(info_ptr->trans_color);
}
+
else /* if (info_ptr->color_type != PNG_COLOR_TYPE_PALETTE) */
{
- if (trans_color != NULL)
- {
- *trans_color = &(info_ptr->trans_color);
- retval |= PNG_INFO_tRNS;
- }
-
- if (trans_alpha != NULL)
- *trans_alpha = NULL;
+ if (trans_color != NULL)
+ {
+ *trans_color = &(info_ptr->trans_color);
+ retval |= PNG_INFO_tRNS;
+ }
+
+ if (trans_alpha != NULL)
+ *trans_alpha = NULL;
}
+
if (num_trans != NULL)
{
*num_trans = info_ptr->num_trans;
retval |= PNG_INFO_tRNS;
}
}
+
return (retval);
}
#endif
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
-png_uint_32 PNGAPI
-png_get_unknown_chunks(png_structp png_ptr, png_infop info_ptr,
- png_unknown_chunkpp unknowns)
+int PNGAPI
+png_get_unknown_chunks(png_const_structp png_ptr, png_const_infop info_ptr,
+ png_unknown_chunkpp unknowns)
{
if (png_ptr != NULL && info_ptr != NULL && unknowns != NULL)
{
- *unknowns = info_ptr->unknown_chunks;
- return ((png_uint_32)info_ptr->unknown_chunks_num);
+ *unknowns = info_ptr->unknown_chunks;
+ return info_ptr->unknown_chunks_num;
}
+
return (0);
}
#endif
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
png_byte PNGAPI
-png_get_rgb_to_gray_status (png_structp png_ptr)
+png_get_rgb_to_gray_status (png_const_structp png_ptr)
{
- return (png_byte)(png_ptr? png_ptr->rgb_to_gray_status : 0);
+ return (png_byte)(png_ptr ? png_ptr->rgb_to_gray_status : 0);
}
#endif
#ifdef PNG_USER_CHUNKS_SUPPORTED
png_voidp PNGAPI
-png_get_user_chunk_ptr(png_structp png_ptr)
+png_get_user_chunk_ptr(png_const_structp png_ptr)
{
- return (png_ptr? png_ptr->user_chunk_ptr : NULL);
+ return (png_ptr ? png_ptr->user_chunk_ptr : NULL);
}
#endif
-#ifdef PNG_WRITE_SUPPORTED
png_size_t PNGAPI
-png_get_compression_buffer_size(png_structp png_ptr)
+png_get_compression_buffer_size(png_const_structp png_ptr)
{
return (png_ptr ? png_ptr->zbuf_size : 0L);
}
-#endif
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
-/* These functions were added to libpng 1.2.6 */
+/* These functions were added to libpng 1.2.6 and were enabled
+ * by default in libpng-1.4.0 */
png_uint_32 PNGAPI
-png_get_user_width_max (png_structp png_ptr)
+png_get_user_width_max (png_const_structp png_ptr)
{
- return (png_ptr? png_ptr->user_width_max : 0);
+ return (png_ptr ? png_ptr->user_width_max : 0);
}
+
png_uint_32 PNGAPI
-png_get_user_height_max (png_structp png_ptr)
+png_get_user_height_max (png_const_structp png_ptr)
{
- return (png_ptr? png_ptr->user_height_max : 0);
+ return (png_ptr ? png_ptr->user_height_max : 0);
}
+
/* This function was added to libpng 1.4.0 */
png_uint_32 PNGAPI
-png_get_chunk_cache_max (png_structp png_ptr)
+png_get_chunk_cache_max (png_const_structp png_ptr)
+{
+ return (png_ptr ? png_ptr->user_chunk_cache_max : 0);
+}
+
+/* This function was added to libpng 1.4.1 */
+png_alloc_size_t PNGAPI
+png_get_chunk_malloc_max (png_const_structp png_ptr)
{
- return (png_ptr? png_ptr->user_chunk_cache_max? 0x7fffffffL :
- png_ptr->user_chunk_cache_max - 1 : 0);
+ return (png_ptr ? png_ptr->user_chunk_malloc_max : 0);
}
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
+/* These functions were added to libpng 1.4.0 */
#ifdef PNG_IO_STATE_SUPPORTED
png_uint_32 PNGAPI
png_get_io_state (png_structp png_ptr)
{
- return png_ptr->io_state;
+ return png_ptr->io_state;
+}
+
+png_uint_32 PNGAPI
+png_get_io_chunk_type (png_const_structp png_ptr)
+{
+ return ((png_ptr->chunk_name[0] << 24) +
+ (png_ptr->chunk_name[1] << 16) +
+ (png_ptr->chunk_name[2] << 8) +
+ (png_ptr->chunk_name[3]));
}
-png_bytep PNGAPI
+png_const_bytep PNGAPI
png_get_io_chunk_name (png_structp png_ptr)
{
return png_ptr->chunk_name;
diff --git a/src/3rdparty/libpng/pnginfo.h b/src/3rdparty/libpng/pnginfo.h
new file mode 100644
index 0000000..fa19f85
--- /dev/null
+++ b/src/3rdparty/libpng/pnginfo.h
@@ -0,0 +1,270 @@
+
+/* pnginfo.h - header file for PNG reference library
+ *
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+ /* png_info is a structure that holds the information in a PNG file so
+ * that the application can find out the characteristics of the image.
+ * If you are reading the file, this structure will tell you what is
+ * in the PNG file. If you are writing the file, fill in the information
+ * you want to put into the PNG file, using png_set_*() functions, then
+ * call png_write_info().
+ *
+ * The names chosen should be very close to the PNG specification, so
+ * consult that document for information about the meaning of each field.
+ *
+ * With libpng < 0.95, it was only possible to directly set and read the
+ * the values in the png_info_struct, which meant that the contents and
+ * order of the values had to remain fixed. With libpng 0.95 and later,
+ * however, there are now functions that abstract the contents of
+ * png_info_struct from the application, so this makes it easier to use
+ * libpng with dynamic libraries, and even makes it possible to use
+ * libraries that don't have all of the libpng ancillary chunk-handing
+ * functionality. In libpng-1.5.0 this was moved into a separate private
+ * file that is not visible to applications.
+ *
+ * The following members may have allocated storage attached that should be
+ * cleaned up before the structure is discarded: palette, trans, text,
+ * pcal_purpose, pcal_units, pcal_params, hist, iccp_name, iccp_profile,
+ * splt_palettes, scal_unit, row_pointers, and unknowns. By default, these
+ * are automatically freed when the info structure is deallocated, if they were
+ * allocated internally by libpng. This behavior can be changed by means
+ * of the png_data_freer() function.
+ *
+ * More allocation details: all the chunk-reading functions that
+ * change these members go through the corresponding png_set_*
+ * functions. A function to clear these members is available: see
+ * png_free_data(). The png_set_* functions do not depend on being
+ * able to point info structure members to any of the storage they are
+ * passed (they make their own copies), EXCEPT that the png_set_text
+ * functions use the same storage passed to them in the text_ptr or
+ * itxt_ptr structure argument, and the png_set_rows and png_set_unknowns
+ * functions do not make their own copies.
+ */
+#ifndef PNGINFO_H
+#define PNGINFO_H
+
+struct png_info_def
+{
+ /* the following are necessary for every PNG file */
+ png_uint_32 width; /* width of image in pixels (from IHDR) */
+ png_uint_32 height; /* height of image in pixels (from IHDR) */
+ png_uint_32 valid; /* valid chunk data (see PNG_INFO_ below) */
+ png_size_t rowbytes; /* bytes needed to hold an untransformed row */
+ png_colorp palette; /* array of color values (valid & PNG_INFO_PLTE) */
+ png_uint_16 num_palette; /* number of color entries in "palette" (PLTE) */
+ png_uint_16 num_trans; /* number of transparent palette color (tRNS) */
+ png_byte bit_depth; /* 1, 2, 4, 8, or 16 bits/channel (from IHDR) */
+ png_byte color_type; /* see PNG_COLOR_TYPE_ below (from IHDR) */
+ /* The following three should have been named *_method not *_type */
+ png_byte compression_type; /* must be PNG_COMPRESSION_TYPE_BASE (IHDR) */
+ png_byte filter_type; /* must be PNG_FILTER_TYPE_BASE (from IHDR) */
+ png_byte interlace_type; /* One of PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
+
+ /* The following is informational only on read, and not used on writes. */
+ png_byte channels; /* number of data channels per pixel (1, 2, 3, 4) */
+ png_byte pixel_depth; /* number of bits per pixel */
+ png_byte spare_byte; /* to align the data, and for future use */
+ png_byte signature[8]; /* magic bytes read by libpng from start of file */
+
+ /* The rest of the data is optional. If you are reading, check the
+ * valid field to see if the information in these are valid. If you
+ * are writing, set the valid field to those chunks you want written,
+ * and initialize the appropriate fields below.
+ */
+
+#if defined(PNG_gAMA_SUPPORTED)
+ /* The gAMA chunk describes the gamma characteristics of the system
+ * on which the image was created, normally in the range [1.0, 2.5].
+ * Data is valid if (valid & PNG_INFO_gAMA) is non-zero.
+ */
+ png_fixed_point gamma;
+#endif
+
+#ifdef PNG_sRGB_SUPPORTED
+ /* GR-P, 0.96a */
+ /* Data valid if (valid & PNG_INFO_sRGB) non-zero. */
+ png_byte srgb_intent; /* sRGB rendering intent [0, 1, 2, or 3] */
+#endif
+
+#ifdef PNG_TEXT_SUPPORTED
+ /* The tEXt, and zTXt chunks contain human-readable textual data in
+ * uncompressed, compressed, and optionally compressed forms, respectively.
+ * The data in "text" is an array of pointers to uncompressed,
+ * null-terminated C strings. Each chunk has a keyword that describes the
+ * textual data contained in that chunk. Keywords are not required to be
+ * unique, and the text string may be empty. Any number of text chunks may
+ * be in an image.
+ */
+ int num_text; /* number of comments read or comments to write */
+ int max_text; /* current size of text array */
+ png_textp text; /* array of comments read or comments to write */
+#endif /* PNG_TEXT_SUPPORTED */
+
+#ifdef PNG_tIME_SUPPORTED
+ /* The tIME chunk holds the last time the displayed image data was
+ * modified. See the png_time struct for the contents of this struct.
+ */
+ png_time mod_time;
+#endif
+
+#ifdef PNG_sBIT_SUPPORTED
+ /* The sBIT chunk specifies the number of significant high-order bits
+ * in the pixel data. Values are in the range [1, bit_depth], and are
+ * only specified for the channels in the pixel data. The contents of
+ * the low-order bits is not specified. Data is valid if
+ * (valid & PNG_INFO_sBIT) is non-zero.
+ */
+ png_color_8 sig_bit; /* significant bits in color channels */
+#endif
+
+#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_EXPAND_SUPPORTED) || \
+defined(PNG_READ_BACKGROUND_SUPPORTED)
+ /* The tRNS chunk supplies transparency data for paletted images and
+ * other image types that don't need a full alpha channel. There are
+ * "num_trans" transparency values for a paletted image, stored in the
+ * same order as the palette colors, starting from index 0. Values
+ * for the data are in the range [0, 255], ranging from fully transparent
+ * to fully opaque, respectively. For non-paletted images, there is a
+ * single color specified that should be treated as fully transparent.
+ * Data is valid if (valid & PNG_INFO_tRNS) is non-zero.
+ */
+ png_bytep trans; /* alpha values for paletted image */
+ png_bytep trans_alpha; /* alpha values for paletted image */
+ png_color_16 trans_color; /* transparent color for non-palette image */
+#endif
+
+#if defined(PNG_bKGD_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
+ /* The bKGD chunk gives the suggested image background color if the
+ * display program does not have its own background color and the image
+ * is needs to composited onto a background before display. The colors
+ * in "background" are normally in the same color space/depth as the
+ * pixel data. Data is valid if (valid & PNG_INFO_bKGD) is non-zero.
+ */
+ png_color_16 background;
+#endif
+
+#ifdef PNG_oFFs_SUPPORTED
+ /* The oFFs chunk gives the offset in "offset_unit_type" units rightwards
+ * and downwards from the top-left corner of the display, page, or other
+ * application-specific co-ordinate space. See the PNG_OFFSET_ defines
+ * below for the unit types. Valid if (valid & PNG_INFO_oFFs) non-zero.
+ */
+ png_int_32 x_offset; /* x offset on page */
+ png_int_32 y_offset; /* y offset on page */
+ png_byte offset_unit_type; /* offset units type */
+#endif
+
+#ifdef PNG_pHYs_SUPPORTED
+ /* The pHYs chunk gives the physical pixel density of the image for
+ * display or printing in "phys_unit_type" units (see PNG_RESOLUTION_
+ * defines below). Data is valid if (valid & PNG_INFO_pHYs) is non-zero.
+ */
+ png_uint_32 x_pixels_per_unit; /* horizontal pixel density */
+ png_uint_32 y_pixels_per_unit; /* vertical pixel density */
+ png_byte phys_unit_type; /* resolution type (see PNG_RESOLUTION_ below) */
+#endif
+
+#ifdef PNG_hIST_SUPPORTED
+ /* The hIST chunk contains the relative frequency or importance of the
+ * various palette entries, so that a viewer can intelligently select a
+ * reduced-color palette, if required. Data is an array of "num_palette"
+ * values in the range [0,65535]. Data valid if (valid & PNG_INFO_hIST)
+ * is non-zero.
+ */
+ png_uint_16p hist;
+#endif
+
+#ifdef PNG_cHRM_SUPPORTED
+ /* The cHRM chunk describes the CIE color characteristics of the monitor
+ * on which the PNG was created. This data allows the viewer to do gamut
+ * mapping of the input image to ensure that the viewer sees the same
+ * colors in the image as the creator. Values are in the range
+ * [0.0, 0.8]. Data valid if (valid & PNG_INFO_cHRM) non-zero.
+ */
+ png_fixed_point x_white;
+ png_fixed_point y_white;
+ png_fixed_point x_red;
+ png_fixed_point y_red;
+ png_fixed_point x_green;
+ png_fixed_point y_green;
+ png_fixed_point x_blue;
+ png_fixed_point y_blue;
+#endif
+
+#ifdef PNG_pCAL_SUPPORTED
+ /* The pCAL chunk describes a transformation between the stored pixel
+ * values and original physical data values used to create the image.
+ * The integer range [0, 2^bit_depth - 1] maps to the floating-point
+ * range given by [pcal_X0, pcal_X1], and are further transformed by a
+ * (possibly non-linear) transformation function given by "pcal_type"
+ * and "pcal_params" into "pcal_units". Please see the PNG_EQUATION_
+ * defines below, and the PNG-Group's PNG extensions document for a
+ * complete description of the transformations and how they should be
+ * implemented, and for a description of the ASCII parameter strings.
+ * Data values are valid if (valid & PNG_INFO_pCAL) non-zero.
+ */
+ png_charp pcal_purpose; /* pCAL chunk description string */
+ png_int_32 pcal_X0; /* minimum value */
+ png_int_32 pcal_X1; /* maximum value */
+ png_charp pcal_units; /* Latin-1 string giving physical units */
+ png_charpp pcal_params; /* ASCII strings containing parameter values */
+ png_byte pcal_type; /* equation type (see PNG_EQUATION_ below) */
+ png_byte pcal_nparams; /* number of parameters given in pcal_params */
+#endif
+
+/* New members added in libpng-1.0.6 */
+ png_uint_32 free_me; /* flags items libpng is responsible for freeing */
+
+#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) || \
+ defined(PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
+ /* Storage for unknown chunks that the library doesn't recognize. */
+ png_unknown_chunkp unknown_chunks;
+ int unknown_chunks_num;
+#endif
+
+#ifdef PNG_iCCP_SUPPORTED
+ /* iCCP chunk data. */
+ png_charp iccp_name; /* profile name */
+ png_bytep iccp_profile; /* International Color Consortium profile data */
+ png_uint_32 iccp_proflen; /* ICC profile data length */
+ png_byte iccp_compression; /* Always zero */
+#endif
+
+#ifdef PNG_sPLT_SUPPORTED
+ /* Data on sPLT chunks (there may be more than one). */
+ png_sPLT_tp splt_palettes;
+ png_uint_32 splt_palettes_num;
+#endif
+
+#ifdef PNG_sCAL_SUPPORTED
+ /* The sCAL chunk describes the actual physical dimensions of the
+ * subject matter of the graphic. The chunk contains a unit specification
+ * a byte value, and two ASCII strings representing floating-point
+ * values. The values are width and height corresponsing to one pixel
+ * in the image. Data values are valid if (valid & PNG_INFO_sCAL) is
+ * non-zero.
+ */
+ png_byte scal_unit; /* unit of physical scale */
+ png_charp scal_s_width; /* string containing height */
+ png_charp scal_s_height; /* string containing width */
+#endif
+
+#ifdef PNG_INFO_IMAGE_SUPPORTED
+ /* Memory has been allocated if (valid & PNG_ALLOCATED_INFO_ROWS)
+ non-zero */
+ /* Data valid if (valid & PNG_INFO_IDAT) non-zero */
+ png_bytepp row_pointers; /* the image bits */
+#endif
+
+};
+#endif /* PNGINFO_H */
diff --git a/src/3rdparty/libpng/pnglibconf.h b/src/3rdparty/libpng/pnglibconf.h
new file mode 100644
index 0000000..b1d2169
--- /dev/null
+++ b/src/3rdparty/libpng/pnglibconf.h
@@ -0,0 +1,176 @@
+
+/* libpng STANDARD API DEFINITION */
+
+/* pnglibconf.h - library build configuration */
+
+/* libpng version 1.5.0 - last changed on January 6, 2011 */
+
+/* Copyright (c) 1998-2011 Glenn Randers-Pehrson */
+
+/* This code is released under the libpng license. */
+/* For conditions of distribution and use, see the disclaimer */
+/* and license in png.h */
+
+/* pnglibconf.h */
+/* Machine generated file: DO NOT EDIT */
+/* Derived from: scripts/pnglibconf.dfa */
+#ifndef PNGLCONF_H
+#define PNGLCONF_H
+/* settings */
+#define PNG_MAX_GAMMA_8 11
+#define PNG_CALLOC_SUPPORTED
+#define PNG_QUANTIZE_RED_BITS 5
+#define PNG_USER_WIDTH_MAX 1000000L
+#define PNG_QUANTIZE_GREEN_BITS 5
+#define PNG_API_RULE 0
+#define PNG_QUANTIZE_BLUE_BITS 5
+#define PNG_USER_CHUNK_CACHE_MAX 0
+#define PNG_USER_HEIGHT_MAX 1000000L
+#define PNG_sCAL_PRECISION 5
+#define PNG_COST_SHIFT 3
+#define PNG_WEIGHT_SHIFT 8
+#define PNG_USER_CHUNK_MALLOC_MAX 0
+#define PNG_DEFAULT_READ_MACROS 1
+#define PNG_ZBUF_SIZE 8192
+#define PNG_GAMMA_THRESHOLD_FIXED 5000
+/* end of settings */
+/* options */
+#define PNG_INFO_IMAGE_SUPPORTED
+#define PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+#define PNG_POINTER_INDEXING_SUPPORTED
+#define PNG_WARNINGS_SUPPORTED
+#define PNG_FLOATING_ARITHMETIC_SUPPORTED
+#define PNG_WRITE_SUPPORTED
+#define PNG_WRITE_INTERLACING_SUPPORTED
+#define PNG_WRITE_16BIT_SUPPORTED
+#define PNG_EASY_ACCESS_SUPPORTED
+#define PNG_ALIGN_MEMORY_SUPPORTED
+#define PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
+#define PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
+#define PNG_USER_LIMITS_SUPPORTED
+#define PNG_FIXED_POINT_SUPPORTED
+/*#undef PNG_ERROR_NUMBERS_SUPPORTED*/
+#define PNG_ERROR_TEXT_SUPPORTED
+#define PNG_READ_SUPPORTED
+/*#undef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED*/
+#define PNG_BENIGN_ERRORS_SUPPORTED
+#define PNG_SETJMP_SUPPORTED
+#define PNG_WRITE_FLUSH_SUPPORTED
+#define PNG_MNG_FEATURES_SUPPORTED
+#define PNG_FLOATING_POINT_SUPPORTED
+#define PNG_INCH_CONVERSIONS_SUPPORTED
+#define PNG_STDIO_SUPPORTED
+#define PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
+#define PNG_USER_MEM_SUPPORTED
+#define PNG_IO_STATE_SUPPORTED
+#define PNG_SET_USER_LIMITS_SUPPORTED
+#define PNG_READ_ANCILLARY_CHUNKS_SUPPORTED
+#define PNG_WRITE_INT_FUNCTIONS_SUPPORTED
+#define PNG_WRITE_ANCILLARY_CHUNKS_SUPPORTED
+#define PNG_WRITE_FILTER_SUPPORTED
+#define PNG_SET_CHUNK_CACHE_LIMIT_SUPPORTED
+#define PNG_WRITE_iCCP_SUPPORTED
+#define PNG_READ_TRANSFORMS_SUPPORTED
+#define PNG_READ_GAMMA_SUPPORTED
+#define PNG_READ_bKGD_SUPPORTED
+#define PNG_UNKNOWN_CHUNKS_SUPPORTED
+#define PNG_READ_sCAL_SUPPORTED
+#define PNG_WRITE_hIST_SUPPORTED
+#define PNG_READ_OPT_PLTE_SUPPORTED
+#define PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
+#define PNG_WRITE_gAMA_SUPPORTED
+#define PNG_READ_GRAY_TO_RGB_SUPPORTED
+#define PNG_WRITE_pCAL_SUPPORTED
+#define PNG_READ_INVERT_ALPHA_SUPPORTED
+#define PNG_WRITE_TRANSFORMS_SUPPORTED
+#define PNG_READ_sBIT_SUPPORTED
+#define PNG_READ_PACK_SUPPORTED
+#define PNG_WRITE_SWAP_SUPPORTED
+#define PNG_READ_cHRM_SUPPORTED
+#define PNG_WRITE_tIME_SUPPORTED
+#define PNG_READ_INTERLACING_SUPPORTED
+#define PNG_READ_tRNS_SUPPORTED
+#define PNG_WRITE_pHYs_SUPPORTED
+#define PNG_WRITE_INVERT_SUPPORTED
+#define PNG_READ_RGB_TO_GRAY_SUPPORTED
+#define PNG_WRITE_sRGB_SUPPORTED
+#define PNG_READ_oFFs_SUPPORTED
+#define PNG_WRITE_FILLER_SUPPORTED
+#define PNG_WRITE_TEXT_SUPPORTED
+#define PNG_WRITE_SHIFT_SUPPORTED
+#define PNG_PROGRESSIVE_READ_SUPPORTED
+#define PNG_READ_SHIFT_SUPPORTED
+#define PNG_CONVERT_tIME_SUPPORTED
+#define PNG_READ_USER_TRANSFORM_SUPPORTED
+#define PNG_READ_INT_FUNCTIONS_SUPPORTED
+#define PNG_READ_USER_CHUNKS_SUPPORTED
+#define PNG_READ_hIST_SUPPORTED
+#define PNG_READ_16BIT_SUPPORTED
+#define PNG_READ_SWAP_ALPHA_SUPPORTED
+#define PNG_READ_COMPOSITE_NODIV_SUPPORTED
+#define PNG_SEQUENTIAL_READ_SUPPORTED
+#define PNG_READ_BACKGROUND_SUPPORTED
+#define PNG_READ_QUANTIZE_SUPPORTED
+#define PNG_READ_iCCP_SUPPORTED
+#define PNG_READ_STRIP_ALPHA_SUPPORTED
+#define PNG_READ_PACKSWAP_SUPPORTED
+#define PNG_READ_sRGB_SUPPORTED
+#define PNG_WRITE_tEXt_SUPPORTED
+#define PNG_READ_gAMA_SUPPORTED
+#define PNG_READ_pCAL_SUPPORTED
+#define PNG_READ_EXPAND_SUPPORTED
+#define PNG_WRITE_sPLT_SUPPORTED
+#define PNG_READ_SWAP_SUPPORTED
+#define PNG_READ_tIME_SUPPORTED
+#define PNG_READ_pHYs_SUPPORTED
+#define PNG_WRITE_SWAP_ALPHA_SUPPORTED
+#define PNG_TIME_RFC1123_SUPPORTED
+#define PNG_READ_TEXT_SUPPORTED
+#define PNG_WRITE_BGR_SUPPORTED
+#define PNG_USER_CHUNKS_SUPPORTED
+#define PNG_CONSOLE_IO_SUPPORTED
+#define PNG_WRITE_PACK_SUPPORTED
+#define PNG_READ_FILLER_SUPPORTED
+#define PNG_WRITE_bKGD_SUPPORTED
+#define PNG_WRITE_tRNS_SUPPORTED
+#define PNG_READ_sPLT_SUPPORTED
+#define PNG_WRITE_sCAL_SUPPORTED
+#define PNG_WRITE_oFFs_SUPPORTED
+#define PNG_READ_tEXt_SUPPORTED
+#define PNG_WRITE_sBIT_SUPPORTED
+#define PNG_READ_INVERT_SUPPORTED
+#define PNG_READ_16_TO_8_SUPPORTED
+#define PNG_WRITE_cHRM_SUPPORTED
+#define PNG_16BIT_SUPPORTED
+#define PNG_WRITE_USER_TRANSFORM_SUPPORTED
+#define PNG_READ_BGR_SUPPORTED
+#define PNG_WRITE_PACKSWAP_SUPPORTED
+#define PNG_WRITE_INVERT_ALPHA_SUPPORTED
+#define PNG_sCAL_SUPPORTED
+#define PNG_WRITE_zTXt_SUPPORTED
+#define PNG_sBIT_SUPPORTED
+#define PNG_cHRM_SUPPORTED
+#define PNG_bKGD_SUPPORTED
+#define PNG_tRNS_SUPPORTED
+#define PNG_WRITE_iTXt_SUPPORTED
+#define PNG_oFFs_SUPPORTED
+#define PNG_USER_TRANSFORM_PTR_SUPPORTED
+#define PNG_USER_TRANSFORM_INFO_SUPPORTED
+#define PNG_hIST_SUPPORTED
+#define PNG_iCCP_SUPPORTED
+#define PNG_sRGB_SUPPORTED
+#define PNG_READ_zTXt_SUPPORTED
+#define PNG_gAMA_SUPPORTED
+#define PNG_pCAL_SUPPORTED
+#define PNG_CHECK_cHRM_SUPPORTED
+#define PNG_tIME_SUPPORTED
+#define PNG_pHYs_SUPPORTED
+#define PNG_READ_iTXt_SUPPORTED
+#define PNG_TEXT_SUPPORTED
+#define PNG_SAVE_INT_32_SUPPORTED
+#define PNG_sPLT_SUPPORTED
+#define PNG_tEXt_SUPPORTED
+#define PNG_zTXt_SUPPORTED
+#define PNG_iTXt_SUPPORTED
+/* end of options */
+#endif /* PNGLCONF_H */
diff --git a/src/3rdparty/libpng/pngmem.c b/src/3rdparty/libpng/pngmem.c
index dee2966..a15d8b0 100644
--- a/src/3rdparty/libpng/pngmem.c
+++ b/src/3rdparty/libpng/pngmem.c
@@ -1,8 +1,8 @@
/* pngmem.c - stub functions for memory allocation
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -17,40 +17,42 @@
* identify the replacement functions.
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
+#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+
/* Borland DOS special memory handler */
#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
/* If you change this, be sure to change the one in png.h also */
/* Allocate memory for a png_struct. The malloc and memset can be replaced
by a single call to calloc() if this is thought to improve performance. */
-png_voidp /* PRIVATE */
-png_create_struct(int type)
+PNG_FUNCTION(png_voidp /* PRIVATE */,
+png_create_struct,(int type),PNG_ALLOCATED)
{
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
return (png_create_struct_2(type, NULL, NULL));
}
/* Alternate version of png_create_struct, for use with user-defined malloc. */
-png_voidp /* PRIVATE */
-png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
+PNG_FUNCTION(png_voidp /* PRIVATE */,
+png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr),
+ PNG_ALLOCATED)
{
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
png_size_t size;
png_voidp struct_ptr;
if (type == PNG_STRUCT_INFO)
size = png_sizeof(png_info);
+
else if (type == PNG_STRUCT_PNG)
size = png_sizeof(png_struct);
+
else
return (png_get_copyright(NULL));
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
if (malloc_fn != NULL)
{
png_struct dummy_struct;
@@ -58,11 +60,13 @@ png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
png_ptr->mem_ptr=mem_ptr;
struct_ptr = (*(malloc_fn))(png_ptr, (png_uint_32)size);
}
+
else
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
struct_ptr = (png_voidp)farmalloc(size);
if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size);
+
return (struct_ptr);
}
@@ -70,7 +74,7 @@ png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2(struct_ptr, NULL, NULL);
}
@@ -79,10 +83,10 @@ void /* PRIVATE */
png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
png_voidp mem_ptr)
{
-#endif
+# endif
if (struct_ptr != NULL)
{
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
if (free_fn != NULL)
{
png_struct dummy_struct;
@@ -91,7 +95,8 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
(*(free_fn))(png_ptr, struct_ptr);
return;
}
-#endif /* PNG_USER_MEM_SUPPORTED */
+
+# endif /* PNG_USER_MEM_SUPPORTED */
farfree (struct_ptr);
}
}
@@ -115,55 +120,62 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
* result, we would be truncating potentially larger memory requests
* (which should cause a fatal error) and introducing major problems.
*/
-png_voidp PNGAPI
-png_calloc(png_structp png_ptr, png_alloc_size_t size)
+PNG_FUNCTION(png_voidp,PNGAPI
+png_calloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ret;
ret = (png_malloc(png_ptr, size));
+
if (ret != NULL)
png_memset(ret,0,(png_size_t)size);
+
return (ret);
}
-png_voidp PNGAPI
-png_malloc(png_structp png_ptr, png_alloc_size_t size)
+PNG_FUNCTION(png_voidp,PNGAPI
+png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ret;
if (png_ptr == NULL || size == 0)
return (NULL);
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->malloc_fn != NULL)
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
+
else
ret = (png_malloc_default(png_ptr, size));
+
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory");
+
return (ret);
}
-png_voidp PNGAPI
-png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
+PNG_FUNCTION(png_voidp,PNGAPI
+png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ret;
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || size == 0)
return (NULL);
-#ifdef PNG_MAX_MALLOC_64K
+# ifdef PNG_MAX_MALLOC_64K
if (size > (png_uint_32)65536L)
{
png_warning(png_ptr, "Cannot Allocate > 64K");
ret = NULL;
}
+
else
-#endif
+# endif
if (size != (size_t)size)
ret = NULL;
+
else if (size == (png_uint_32)65536L)
{
if (png_ptr->offset_table == NULL)
@@ -186,10 +198,13 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
if (png_ptr->zlib_window_bits > 14)
num_blocks = (int)(1 << (png_ptr->zlib_window_bits - 14));
+
else
num_blocks = 1;
+
if (png_ptr->zlib_mem_level >= 7)
num_blocks += (int)(1 << (png_ptr->zlib_mem_level - 7));
+
else
num_blocks++;
@@ -199,25 +214,27 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
if (table == NULL)
{
-#ifndef PNG_USER_MEM_SUPPORTED
+# ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out Of Memory"); /* Note "O" and "M" */
+ png_error(png_ptr, "Out Of Memory"); /* Note "O", "M" */
+
else
png_warning(png_ptr, "Out Of Memory");
-#endif
+# endif
return (NULL);
}
if ((png_size_t)table & 0xfff0)
{
-#ifndef PNG_USER_MEM_SUPPORTED
+# ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr,
"Farmalloc didn't return normalized pointer");
+
else
png_warning(png_ptr,
"Farmalloc didn't return normalized pointer");
-#endif
+# endif
return (NULL);
}
@@ -227,12 +244,13 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
if (png_ptr->offset_table_ptr == NULL)
{
-#ifndef PNG_USER_MEM_SUPPORTED
+# ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
- png_error(png_ptr, "Out Of memory"); /* Note "O" and "M" */
+ png_error(png_ptr, "Out Of memory"); /* Note "O", "m" */
+
else
png_warning(png_ptr, "Out Of memory");
-#endif
+# endif
return (NULL);
}
@@ -242,6 +260,7 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
hptr = (png_byte huge *)((long)(hptr) & 0xfffffff0L);
hptr = hptr + 16L; /* "hptr += 16L" fails on Turbo C++ 3.0 */
}
+
for (i = 0; i < num_blocks; i++)
{
png_ptr->offset_table_ptr[i] = (png_bytep)hptr;
@@ -256,29 +275,32 @@ png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
if (png_ptr->offset_table_count >= png_ptr->offset_table_number)
{
-#ifndef PNG_USER_MEM_SUPPORTED
+# ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory"); /* Note "o" and "M" */
+
else
png_warning(png_ptr, "Out of Memory");
-#endif
+# endif
return (NULL);
}
ret = png_ptr->offset_table_ptr[png_ptr->offset_table_count++];
}
+
else
ret = farmalloc(size);
-#ifndef PNG_USER_MEM_SUPPORTED
+# ifndef PNG_USER_MEM_SUPPORTED
if (ret == NULL)
{
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of memory"); /* Note "o" and "m" */
+
else
png_warning(png_ptr, "Out of memory"); /* Note "o" and "m" */
}
-#endif
+# endif
return (ret);
}
@@ -293,12 +315,13 @@ png_free(png_structp png_ptr, png_voidp ptr)
if (png_ptr == NULL || ptr == NULL)
return;
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->free_fn != NULL)
{
(*(png_ptr->free_fn))(png_ptr, ptr);
return;
}
+
else
png_free_default(png_ptr, ptr);
}
@@ -306,7 +329,7 @@ png_free(png_structp png_ptr, png_voidp ptr)
void PNGAPI
png_free_default(png_structp png_ptr, png_voidp ptr)
{
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || ptr == NULL)
return;
@@ -334,9 +357,7 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
}
if (ptr != NULL)
- {
farfree(ptr);
- }
}
#else /* Not the Borland DOS special memory handler */
@@ -344,52 +365,58 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
/* Allocate memory for a png_struct or a png_info. The malloc and
memset can be replaced by a single call to calloc() if this is thought
to improve performance noticably. */
-png_voidp /* PRIVATE */
-png_create_struct(int type)
+PNG_FUNCTION(png_voidp /* PRIVATE */,
+png_create_struct,(int type),PNG_ALLOCATED)
{
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
return (png_create_struct_2(type, NULL, NULL));
}
/* Allocate memory for a png_struct or a png_info. The malloc and
memset can be replaced by a single call to calloc() if this is thought
to improve performance noticably. */
-png_voidp /* PRIVATE */
-png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
+PNG_FUNCTION(png_voidp /* PRIVATE */,
+png_create_struct_2,(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr),
+ PNG_ALLOCATED)
{
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
png_size_t size;
png_voidp struct_ptr;
if (type == PNG_STRUCT_INFO)
size = png_sizeof(png_info);
+
else if (type == PNG_STRUCT_PNG)
size = png_sizeof(png_struct);
+
else
return (NULL);
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
if (malloc_fn != NULL)
{
png_struct dummy_struct;
png_structp png_ptr = &dummy_struct;
png_ptr->mem_ptr=mem_ptr;
struct_ptr = (*(malloc_fn))(png_ptr, size);
+
if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size);
+
return (struct_ptr);
}
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
-#if defined(__TURBOC__) && !defined(__FLAT__)
+# if defined(__TURBOC__) && !defined(__FLAT__)
struct_ptr = (png_voidp)farmalloc(size);
-#else
-# if defined(_MSC_VER) && defined(MAXSEG_64K)
+# else
+# if defined(_MSC_VER) && defined(MAXSEG_64K)
struct_ptr = (png_voidp)halloc(size, 1);
-# else
+# else
struct_ptr = (png_voidp)malloc(size);
-# endif
-#endif
+# endif
+# endif
+
if (struct_ptr != NULL)
png_memset(struct_ptr, 0, size);
@@ -401,7 +428,7 @@ png_create_struct_2(int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)
void /* PRIVATE */
png_destroy_struct(png_voidp struct_ptr)
{
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2(struct_ptr, NULL, NULL);
}
@@ -410,10 +437,10 @@ void /* PRIVATE */
png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
png_voidp mem_ptr)
{
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
if (struct_ptr != NULL)
{
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
if (free_fn != NULL)
{
png_struct dummy_struct;
@@ -422,16 +449,19 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
(*(free_fn))(png_ptr, struct_ptr);
return;
}
-#endif /* PNG_USER_MEM_SUPPORTED */
-#if defined(__TURBOC__) && !defined(__FLAT__)
+# endif /* PNG_USER_MEM_SUPPORTED */
+# if defined(__TURBOC__) && !defined(__FLAT__)
farfree(struct_ptr);
-#else
-# if defined(_MSC_VER) && defined(MAXSEG_64K)
+
+# else
+# if defined(_MSC_VER) && defined(MAXSEG_64K)
hfree(struct_ptr);
-# else
+
+# else
free(struct_ptr);
-# endif
-#endif
+
+# endif
+# endif
}
}
@@ -442,80 +472,92 @@ png_destroy_struct_2(png_voidp struct_ptr, png_free_ptr free_fn,
* have the ability to do that.
*/
-png_voidp PNGAPI
-png_calloc(png_structp png_ptr, png_alloc_size_t size)
+PNG_FUNCTION(png_voidp,PNGAPI
+png_calloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ret;
ret = (png_malloc(png_ptr, size));
+
if (ret != NULL)
png_memset(ret,0,(png_size_t)size);
+
return (ret);
}
-png_voidp PNGAPI
-png_malloc(png_structp png_ptr, png_alloc_size_t size)
+PNG_FUNCTION(png_voidp,PNGAPI
+png_malloc,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ret;
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr == NULL || size == 0)
return (NULL);
if (png_ptr->malloc_fn != NULL)
ret = ((png_voidp)(*(png_ptr->malloc_fn))(png_ptr, (png_size_t)size));
+
else
ret = (png_malloc_default(png_ptr, size));
+
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory");
+
return (ret);
}
-png_voidp PNGAPI
-png_malloc_default(png_structp png_ptr, png_alloc_size_t size)
+PNG_FUNCTION(png_voidp,PNGAPI
+png_malloc_default,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ret;
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
if (png_ptr == NULL || size == 0)
return (NULL);
-#ifdef PNG_MAX_MALLOC_64K
+# ifdef PNG_MAX_MALLOC_64K
if (size > (png_uint_32)65536L)
{
-#ifndef PNG_USER_MEM_SUPPORTED
+# ifndef PNG_USER_MEM_SUPPORTED
if ((png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Cannot Allocate > 64K");
+
else
-#endif
+# endif
return NULL;
}
-#endif
+# endif
/* Check for overflow */
-#if defined(__TURBOC__) && !defined(__FLAT__)
+# if defined(__TURBOC__) && !defined(__FLAT__)
+
if (size != (unsigned long)size)
ret = NULL;
+
else
ret = farmalloc(size);
-#else
-# if defined(_MSC_VER) && defined(MAXSEG_64K)
+
+# else
+# if defined(_MSC_VER) && defined(MAXSEG_64K)
if (size != (unsigned long)size)
ret = NULL;
+
else
ret = halloc(size, 1);
-# else
+
+# else
if (size != (size_t)size)
ret = NULL;
+
else
ret = malloc((size_t)size);
-# endif
-#endif
+# endif
+# endif
-#ifndef PNG_USER_MEM_SUPPORTED
+# ifndef PNG_USER_MEM_SUPPORTED
if (ret == NULL && (png_ptr->flags&PNG_FLAG_MALLOC_NULL_MEM_OK) == 0)
png_error(png_ptr, "Out of Memory");
-#endif
+# endif
return (ret);
}
@@ -529,34 +571,38 @@ png_free(png_structp png_ptr, png_voidp ptr)
if (png_ptr == NULL || ptr == NULL)
return;
-#ifdef PNG_USER_MEM_SUPPORTED
+# ifdef PNG_USER_MEM_SUPPORTED
if (png_ptr->free_fn != NULL)
{
(*(png_ptr->free_fn))(png_ptr, ptr);
return;
}
+
else
png_free_default(png_ptr, ptr);
}
+
void PNGAPI
png_free_default(png_structp png_ptr, png_voidp ptr)
{
if (png_ptr == NULL || ptr == NULL)
return;
-#endif /* PNG_USER_MEM_SUPPORTED */
+# endif /* PNG_USER_MEM_SUPPORTED */
-#if defined(__TURBOC__) && !defined(__FLAT__)
+# if defined(__TURBOC__) && !defined(__FLAT__)
farfree(ptr);
-#else
-# if defined(_MSC_VER) && defined(MAXSEG_64K)
+
+# else
+# if defined(_MSC_VER) && defined(MAXSEG_64K)
hfree(ptr);
-# else
+
+# else
free(ptr);
-# endif
-#endif
-}
+# endif
+# endif
+}
#endif /* Not Borland DOS special memory handler */
/* This function was added at libpng version 1.2.3. The png_malloc_warn()
@@ -564,8 +610,8 @@ png_free_default(png_structp png_ptr, png_voidp ptr)
* instead of issuing a png_error, if it fails to allocate the requested
* memory.
*/
-png_voidp PNGAPI
-png_malloc_warn(png_structp png_ptr, png_alloc_size_t size)
+PNG_FUNCTION(png_voidp,PNGAPI
+png_malloc_warn,(png_structp png_ptr, png_alloc_size_t size),PNG_ALLOCATED)
{
png_voidp ptr;
png_uint_32 save_flags;
@@ -601,10 +647,11 @@ png_set_mem_fn(png_structp png_ptr, png_voidp mem_ptr, png_malloc_ptr
* pointer before png_write_destroy and png_read_destroy are called.
*/
png_voidp PNGAPI
-png_get_mem_ptr(png_structp png_ptr)
+png_get_mem_ptr(png_const_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
+
return ((png_voidp)png_ptr->mem_ptr);
}
#endif /* PNG_USER_MEM_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngnow.png b/src/3rdparty/libpng/pngnow.png
deleted file mode 100644
index 82793eb..0000000
--- a/src/3rdparty/libpng/pngnow.png
+++ /dev/null
Binary files differ
diff --git a/src/3rdparty/libpng/pngpread.c b/src/3rdparty/libpng/pngpread.c
index e3d3111..7b1149b 100644
--- a/src/3rdparty/libpng/pngpread.c
+++ b/src/3rdparty/libpng/pngpread.c
@@ -1,8 +1,8 @@
/* pngpread.c - read a png file in push mode
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,11 +11,10 @@
* and license in png.h
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
#include "pngpriv.h"
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+
/* Push model modes */
#define PNG_READ_SIG_MODE 0
#define PNG_READ_CHUNK_MODE 1
@@ -29,7 +28,7 @@
void PNGAPI
png_process_data(png_structp png_ptr, png_infop info_ptr,
- png_bytep buffer, png_size_t buffer_size)
+ png_bytep buffer, png_size_t buffer_size)
{
if (png_ptr == NULL || info_ptr == NULL)
return;
@@ -42,6 +41,64 @@ png_process_data(png_structp png_ptr, png_infop info_ptr,
}
}
+png_size_t PNGAPI
+png_process_data_pause(png_structp png_ptr, int save)
+{
+ if (png_ptr != NULL)
+ {
+ /* It's easiest for the caller if we do the save, then the caller doesn't
+ * have to supply the same data again:
+ */
+ if (save)
+ png_push_save_buffer(png_ptr);
+ else
+ {
+ /* This includes any pending saved bytes: */
+ png_size_t remaining = png_ptr->buffer_size;
+ png_ptr->buffer_size = 0;
+
+ /* So subtract the saved buffer size, unless all the data
+ * is actually 'saved', in which case we just return 0
+ */
+ if (png_ptr->save_buffer_size < remaining)
+ return remaining - png_ptr->save_buffer_size;
+ }
+ }
+
+ return 0;
+}
+
+png_uint_32 PNGAPI
+png_process_data_skip(png_structp png_ptr)
+{
+ png_uint_32 remaining = 0;
+
+ if (png_ptr != NULL && png_ptr->process_mode == PNG_SKIP_MODE &&
+ png_ptr->skip_length > 0)
+ {
+ /* At the end of png_process_data the buffer size must be 0 (see the loop
+ * above) so we can detect a broken call here:
+ */
+ if (png_ptr->buffer_size != 0)
+ png_error(png_ptr,
+ "png_process_data_skip called inside png_process_data");
+
+ /* If is impossible for there to be a saved buffer at this point -
+ * otherwise we could not be in SKIP mode. This will also happen if
+ * png_process_skip is called inside png_process_data (but only very
+ * rarely.)
+ */
+ if (png_ptr->save_buffer_size != 0)
+ png_error(png_ptr, "png_process_data_skip called with saved data");
+
+ remaining = png_ptr->skip_length;
+ png_ptr->skip_length = 0;
+ png_ptr->process_mode = PNG_READ_CHUNK_MODE;
+ }
+
+ return remaining;
+}
+
/* What we do with the incoming data depends on what we were previously
* doing before we ran out of data...
*/
@@ -127,7 +184,7 @@ png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
}
png_push_fill_buffer(png_ptr, &(info_ptr->signature[num_checked]),
- num_to_check);
+ num_to_check);
png_ptr->sig_bytes = (png_byte)(png_ptr->sig_bytes + num_to_check);
if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
@@ -135,6 +192,7 @@ png_push_read_sig(png_structp png_ptr, png_infop info_ptr)
if (num_checked < 4 &&
png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
png_error(png_ptr, "Not a PNG file");
+
else
png_error(png_ptr, "PNG file corrupted by ASCII conversion");
}
@@ -231,8 +289,8 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
}
if (!png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
- if (png_ptr->mode & PNG_AFTER_IDAT)
- png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
+ if (png_ptr->mode & PNG_AFTER_IDAT)
+ png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
if (!png_memcmp(png_ptr->chunk_name, png_IHDR, 4))
{
@@ -285,7 +343,7 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
png_error(png_ptr, "Missing IHDR before IDAT");
else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
- !(png_ptr->mode & PNG_HAVE_PLTE))
+ !(png_ptr->mode & PNG_HAVE_PLTE))
png_error(png_ptr, "Missing PLTE before IDAT");
}
}
@@ -329,7 +387,9 @@ png_push_read_chunk(png_structp png_ptr, png_infop info_ptr)
png_ptr->mode |= PNG_HAVE_IDAT;
png_ptr->process_mode = PNG_READ_IDAT_MODE;
png_push_have_info(png_ptr, info_ptr);
- png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
+ png_ptr->zstream.avail_out =
+ (uInt) PNG_ROWBYTES(png_ptr->pixel_depth,
+ png_ptr->iwidth) + 1;
png_ptr->zstream.next_out = png_ptr->row_buf;
return;
}
@@ -580,32 +640,45 @@ png_push_crc_finish(png_structp png_ptr)
{
if (png_ptr->skip_length && png_ptr->save_buffer_size)
{
- png_size_t save_size;
+ png_size_t save_size = png_ptr->save_buffer_size;
+ png_uint_32 skip_length = png_ptr->skip_length;
+
+ /* We want the smaller of 'skip_length' and 'save_buffer_size', but
+ * they are of different types and we don't know which variable has the
+ * fewest bits. Carefully select the smaller and cast it to the type of
+ * the larger - this cannot overflow. Do not cast in the following test
+ * - it will break on either 16 or 64 bit platforms.
+ */
+ if (skip_length < save_size)
+ save_size = (png_size_t)skip_length;
- if (png_ptr->skip_length < (png_uint_32)png_ptr->save_buffer_size)
- save_size = (png_size_t)png_ptr->skip_length;
else
- save_size = png_ptr->save_buffer_size;
+ skip_length = (png_uint_32)save_size;
png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size);
- png_ptr->skip_length -= save_size;
+ png_ptr->skip_length -= skip_length;
png_ptr->buffer_size -= save_size;
png_ptr->save_buffer_size -= save_size;
png_ptr->save_buffer_ptr += save_size;
}
if (png_ptr->skip_length && png_ptr->current_buffer_size)
{
- png_size_t save_size;
+ png_size_t save_size = png_ptr->current_buffer_size;
+ png_uint_32 skip_length = png_ptr->skip_length;
+
+ /* We want the smaller of 'skip_length' and 'current_buffer_size', here,
+ * the same problem exists as above and the same solution.
+ */
+ if (skip_length < save_size)
+ save_size = (png_size_t)skip_length;
- if (png_ptr->skip_length < (png_uint_32)png_ptr->current_buffer_size)
- save_size = (png_size_t)png_ptr->skip_length;
else
- save_size = png_ptr->current_buffer_size;
+ skip_length = (png_uint_32)save_size;
png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size);
- png_ptr->skip_length -= save_size;
+ png_ptr->skip_length -= skip_length;
png_ptr->buffer_size -= save_size;
png_ptr->current_buffer_size -= save_size;
png_ptr->current_buffer_ptr += save_size;
@@ -623,7 +696,7 @@ png_push_crc_finish(png_structp png_ptr)
}
}
-void PNGAPI
+void PNGCBAPI
png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
{
png_bytep ptr;
@@ -638,6 +711,7 @@ png_push_fill_buffer(png_structp png_ptr, png_bytep buffer, png_size_t length)
if (length < png_ptr->save_buffer_size)
save_size = length;
+
else
save_size = png_ptr->save_buffer_size;
@@ -678,28 +752,35 @@ png_push_save_buffer(png_structp png_ptr)
istop = png_ptr->save_buffer_size;
for (i = 0, sp = png_ptr->save_buffer_ptr, dp = png_ptr->save_buffer;
- i < istop; i++, sp++, dp++)
+ i < istop; i++, sp++, dp++)
{
*dp = *sp;
}
}
}
if (png_ptr->save_buffer_size + png_ptr->current_buffer_size >
- png_ptr->save_buffer_max)
+ png_ptr->save_buffer_max)
{
png_size_t new_max;
png_bytep old_buffer;
if (png_ptr->save_buffer_size > PNG_SIZE_MAX -
- (png_ptr->current_buffer_size + 256))
+ (png_ptr->current_buffer_size + 256))
{
- png_error(png_ptr, "Potential overflow of save_buffer");
+ png_error(png_ptr, "Potential overflow of save_buffer");
}
new_max = png_ptr->save_buffer_size + png_ptr->current_buffer_size + 256;
old_buffer = png_ptr->save_buffer;
- png_ptr->save_buffer = (png_bytep)png_malloc(png_ptr,
- (png_size_t)new_max);
+ png_ptr->save_buffer = (png_bytep)png_malloc_warn(png_ptr,
+ (png_size_t)new_max);
+
+ if (png_ptr->save_buffer == NULL)
+ {
+ png_free(png_ptr, old_buffer);
+ png_error(png_ptr, "Insufficient memory for save_buffer");
+ }
+
png_memcpy(png_ptr->save_buffer, old_buffer, png_ptr->save_buffer_size);
png_free(png_ptr, old_buffer);
png_ptr->save_buffer_max = new_max;
@@ -748,8 +829,10 @@ png_push_read_IDAT(png_structp png_ptr)
if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
{
png_ptr->process_mode = PNG_READ_CHUNK_MODE;
+
if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
png_error(png_ptr, "Not enough compressed data");
+
return;
}
@@ -757,49 +840,52 @@ png_push_read_IDAT(png_structp png_ptr)
}
if (png_ptr->idat_size && png_ptr->save_buffer_size)
{
- png_size_t save_size;
-
- if (png_ptr->idat_size < (png_uint_32)png_ptr->save_buffer_size)
- {
- save_size = (png_size_t)png_ptr->idat_size;
+ png_size_t save_size = png_ptr->save_buffer_size;
+ png_uint_32 idat_size = png_ptr->idat_size;
+
+ /* We want the smaller of 'idat_size' and 'current_buffer_size', but they
+ * are of different types and we don't know which variable has the fewest
+ * bits. Carefully select the smaller and cast it to the type of the
+ * larger - this cannot overflow. Do not cast in the following test - it
+ * will break on either 16 or 64 bit platforms.
+ */
+ if (idat_size < save_size)
+ save_size = (png_size_t)idat_size;
- /* Check for overflow */
- if ((png_uint_32)save_size != png_ptr->idat_size)
- png_error(png_ptr, "save_size overflowed in pngpread");
- }
else
- save_size = png_ptr->save_buffer_size;
+ idat_size = (png_uint_32)save_size;
png_calculate_crc(png_ptr, png_ptr->save_buffer_ptr, save_size);
- if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
- png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size);
+ png_process_IDAT_data(png_ptr, png_ptr->save_buffer_ptr, save_size);
- png_ptr->idat_size -= save_size;
+ png_ptr->idat_size -= idat_size;
png_ptr->buffer_size -= save_size;
png_ptr->save_buffer_size -= save_size;
png_ptr->save_buffer_ptr += save_size;
}
+
if (png_ptr->idat_size && png_ptr->current_buffer_size)
{
- png_size_t save_size;
+ png_size_t save_size = png_ptr->current_buffer_size;
+ png_uint_32 idat_size = png_ptr->idat_size;
- if (png_ptr->idat_size < (png_uint_32)png_ptr->current_buffer_size)
- {
- save_size = (png_size_t)png_ptr->idat_size;
+ /* We want the smaller of 'idat_size' and 'current_buffer_size', but they
+ * are of different types and we don't know which variable has the fewest
+ * bits. Carefully select the smaller and cast it to the type of the
+ * larger - this cannot overflow.
+ */
+ if (idat_size < save_size)
+ save_size = (png_size_t)idat_size;
- /* Check for overflow */
- if ((png_uint_32)save_size != png_ptr->idat_size)
- png_error(png_ptr, "save_size overflowed in pngpread");
- }
else
- save_size = png_ptr->current_buffer_size;
+ idat_size = (png_uint_32)save_size;
png_calculate_crc(png_ptr, png_ptr->current_buffer_ptr, save_size);
- if (!(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
- png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size);
- png_ptr->idat_size -= save_size;
+ png_process_IDAT_data(png_ptr, png_ptr->current_buffer_ptr, save_size);
+
+ png_ptr->idat_size -= idat_size;
png_ptr->buffer_size -= save_size;
png_ptr->current_buffer_size -= save_size;
png_ptr->current_buffer_ptr += save_size;
@@ -822,60 +908,104 @@ void /* PRIVATE */
png_process_IDAT_data(png_structp png_ptr, png_bytep buffer,
png_size_t buffer_length)
{
- int ret;
-
- if ((png_ptr->flags & PNG_FLAG_ZLIB_FINISHED) && buffer_length)
- png_benign_error(png_ptr, "Extra compression data");
+ /* The caller checks for a non-zero buffer length. */
+ if (!(buffer_length > 0) || buffer == NULL)
+ png_error(png_ptr, "No IDAT data (internal error)");
+ /* This routine must process all the data it has been given
+ * before returning, calling the row callback as required to
+ * handle the uncompressed results.
+ */
png_ptr->zstream.next_in = buffer;
png_ptr->zstream.avail_in = (uInt)buffer_length;
- for (;;)
+
+ /* Keep going until the decompressed data is all processed
+ * or the stream marked as finished.
+ */
+ while (png_ptr->zstream.avail_in > 0 &&
+ !(png_ptr->flags & PNG_FLAG_ZLIB_FINISHED))
{
- ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
- if (ret != Z_OK)
+ int ret;
+
+ /* We have data for zlib, but we must check that zlib
+ * has someplace to put the results. It doesn't matter
+ * if we don't expect any results -- it may be the input
+ * data is just the LZ end code.
+ */
+ if (!(png_ptr->zstream.avail_out > 0))
{
- if (ret == Z_STREAM_END)
- {
- if (png_ptr->zstream.avail_in)
- png_benign_error(png_ptr, "Extra compressed data");
+ png_ptr->zstream.avail_out =
+ (uInt) PNG_ROWBYTES(png_ptr->pixel_depth,
+ png_ptr->iwidth) + 1;
- if (!(png_ptr->zstream.avail_out))
- {
- png_push_process_row(png_ptr);
- }
+ png_ptr->zstream.next_out = png_ptr->row_buf;
+ }
- png_ptr->mode |= PNG_AFTER_IDAT;
- png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
- break;
- }
- else if (ret == Z_BUF_ERROR)
- break;
+ /* Using Z_SYNC_FLUSH here means that an unterminated
+ * LZ stream (a stream with a missing end code) can still
+ * be handled, otherwise (Z_NO_FLUSH) a future zlib
+ * implementation might defer output and therefore
+ * change the current behavior (see comments in inflate.c
+ * for why this doesn't happen at present with zlib 1.2.5).
+ */
+ ret = inflate(&png_ptr->zstream, Z_SYNC_FLUSH);
+
+ /* Check for any failure before proceeding. */
+ if (ret != Z_OK && ret != Z_STREAM_END)
+ {
+ /* Terminate the decompression. */
+ png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
+
+ /* This may be a truncated stream (missing or
+ * damaged end code). Treat that as a warning.
+ */
+ if (png_ptr->row_number >= png_ptr->num_rows ||
+ png_ptr->pass > 6)
+ png_warning(png_ptr, "Truncated compressed data in IDAT");
else
- png_error(png_ptr, "Decompression Error");
+ png_error(png_ptr, "Decompression error in IDAT");
+
+ /* Skip the check on unprocessed input */
+ return;
}
- if (!(png_ptr->zstream.avail_out))
+
+ /* Did inflate output any data? */
+ if (png_ptr->zstream.next_out != png_ptr->row_buf)
{
- if ((
-#ifdef PNG_READ_INTERLACING_SUPPORTED
- png_ptr->interlaced && png_ptr->pass > 6) ||
- (!png_ptr->interlaced &&
-#endif
- png_ptr->row_number == png_ptr->num_rows))
+ /* Is this unexpected data after the last row?
+ * If it is, artificially terminate the LZ output
+ * here.
+ */
+ if (png_ptr->row_number >= png_ptr->num_rows ||
+ png_ptr->pass > 6)
{
- if (png_ptr->zstream.avail_in)
- png_warning(png_ptr, "Too much data in IDAT chunks");
- png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
- break;
+ /* Extra data. */
+ png_warning(png_ptr, "Extra compressed data in IDAT");
+ png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
+
+ /* Do no more processing; skip the unprocessed
+ * input check below.
+ */
+ return;
}
- png_push_process_row(png_ptr);
- png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
- png_ptr->zstream.next_out = png_ptr->row_buf;
+
+ /* Do we have a complete row? */
+ if (png_ptr->zstream.avail_out == 0)
+ png_push_process_row(png_ptr);
}
- else
- break;
+ /* And check for the end of the stream. */
+ if (ret == Z_STREAM_END)
+ png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
}
+
+ /* All the data should have been processed, if anything
+ * is left at this point we have bytes of IDAT data
+ * after the zlib end code.
+ */
+ if (png_ptr->zstream.avail_in > 0)
+ png_warning(png_ptr, "Extra compression data in IDAT");
}
void /* PRIVATE */
@@ -891,8 +1021,8 @@ png_push_process_row(png_structp png_ptr)
png_ptr->row_info.width);
png_read_filter_row(png_ptr, &(png_ptr->row_info),
- png_ptr->row_buf + 1, png_ptr->prev_row + 1,
- (int)(png_ptr->row_buf[0]));
+ png_ptr->row_buf + 1, png_ptr->prev_row + 1,
+ (int)(png_ptr->row_buf[0]));
png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1);
@@ -906,7 +1036,7 @@ png_push_process_row(png_structp png_ptr)
if (png_ptr->pass < 6)
/* old interface (pre-1.0.9):
png_do_read_interlace(&(png_ptr->row_info),
- png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations);
+ png_ptr->row_buf + 1, png_ptr->pass, png_ptr->transformations);
*/
png_do_read_interlace(png_ptr);
@@ -1062,6 +1192,8 @@ png_push_process_row(png_structp png_ptr)
break;
}
+
+ default:
case 6:
{
png_push_have_row(png_ptr, png_ptr->row_buf + 1);
@@ -1113,15 +1245,15 @@ png_read_push_finish_row(png_structp png_ptr)
if (png_ptr->interlaced)
{
png_ptr->row_number = 0;
- png_memset(png_ptr->prev_row, 0,
- png_ptr->rowbytes + 1);
+ png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
+
do
{
png_ptr->pass++;
if ((png_ptr->pass == 1 && png_ptr->width < 5) ||
(png_ptr->pass == 3 && png_ptr->width < 3) ||
(png_ptr->pass == 5 && png_ptr->width < 2))
- png_ptr->pass++;
+ png_ptr->pass++;
if (png_ptr->pass > 7)
png_ptr->pass--;
@@ -1130,20 +1262,17 @@ png_read_push_finish_row(png_structp png_ptr)
break;
png_ptr->iwidth = (png_ptr->width +
- png_pass_inc[png_ptr->pass] - 1 -
- png_pass_start[png_ptr->pass]) /
- png_pass_inc[png_ptr->pass];
-
- png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,
- png_ptr->iwidth) + 1;
+ png_pass_inc[png_ptr->pass] - 1 -
+ png_pass_start[png_ptr->pass]) /
+ png_pass_inc[png_ptr->pass];
if (png_ptr->transformations & PNG_INTERLACE)
break;
png_ptr->num_rows = (png_ptr->height +
- png_pass_yinc[png_ptr->pass] - 1 -
- png_pass_ystart[png_ptr->pass]) /
- png_pass_yinc[png_ptr->pass];
+ png_pass_yinc[png_ptr->pass] - 1 -
+ png_pass_ystart[png_ptr->pass]) /
+ png_pass_yinc[png_ptr->pass];
} while (png_ptr->iwidth == 0 || png_ptr->num_rows == 0);
}
@@ -1153,12 +1282,13 @@ png_read_push_finish_row(png_structp png_ptr)
#ifdef PNG_READ_tEXt_SUPPORTED
void /* PRIVATE */
png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
- length)
+ length)
{
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
{
+ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
png_error(png_ptr, "Out of place tEXt");
- info_ptr = info_ptr; /* To quiet some compiler warnings */
+ /*NOT REACHED*/
}
#ifdef PNG_MAX_MALLOC_64K
@@ -1173,7 +1303,7 @@ png_push_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
#endif
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_size_t)(length + 1));
+ (png_size_t)(length + 1));
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1226,14 +1356,12 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
if (text < key + png_ptr->current_text_size)
text++;
- text_ptr = (png_textp)png_malloc(png_ptr,
- png_sizeof(png_text));
+ text_ptr = (png_textp)png_malloc(png_ptr, png_sizeof(png_text));
text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr->key = key;
-#ifdef PNG_iTXt_SUPPORTED
+ text_ptr->itxt_length = 0;
text_ptr->lang = NULL;
text_ptr->lang_key = NULL;
-#endif
text_ptr->text = text;
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
@@ -1243,7 +1371,7 @@ png_push_read_tEXt(png_structp png_ptr, png_infop info_ptr)
png_ptr->current_text = NULL;
if (ret)
- png_warning(png_ptr, "Insufficient memory to store text chunk");
+ png_warning(png_ptr, "Insufficient memory to store text chunk");
}
}
#endif
@@ -1254,10 +1382,11 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
length)
{
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
- {
- png_error(png_ptr, "Out of place zTXt");
- info_ptr = info_ptr; /* To quiet some compiler warnings */
- }
+ {
+ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
+ png_error(png_ptr, "Out of place zTXt");
+ /*NOT REACHED*/
+ }
#ifdef PNG_MAX_MALLOC_64K
/* We can't handle zTXt chunks > 64K, since we don't have enough space
@@ -1273,7 +1402,7 @@ png_push_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
#endif
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_size_t)(length + 1));
+ (png_size_t)(length + 1));
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1338,9 +1467,9 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
text++;
- png_ptr->zstream.next_in = (png_bytep )text;
+ png_ptr->zstream.next_in = (png_bytep)text;
png_ptr->zstream.avail_in = (uInt)(png_ptr->current_text_size -
- (text - key));
+ (text - key));
png_ptr->zstream.next_out = png_ptr->zbuf;
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
@@ -1361,42 +1490,45 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
png_free(png_ptr, text);
return;
}
+
if (!(png_ptr->zstream.avail_out) || ret == Z_STREAM_END)
{
if (text == NULL)
{
text = (png_charp)png_malloc(png_ptr,
- (png_ptr->zbuf_size
- - png_ptr->zstream.avail_out + key_size + 1));
+ (png_ptr->zbuf_size
+ - png_ptr->zstream.avail_out + key_size + 1));
png_memcpy(text + key_size, png_ptr->zbuf,
- png_ptr->zbuf_size - png_ptr->zstream.avail_out);
+ png_ptr->zbuf_size - png_ptr->zstream.avail_out);
png_memcpy(text, key, key_size);
text_size = key_size + png_ptr->zbuf_size -
- png_ptr->zstream.avail_out;
+ png_ptr->zstream.avail_out;
*(text + text_size) = '\0';
}
+
else
{
png_charp tmp;
tmp = text;
text = (png_charp)png_malloc(png_ptr, text_size +
- (png_ptr->zbuf_size
- - png_ptr->zstream.avail_out + 1));
+ (png_ptr->zbuf_size
+ - png_ptr->zstream.avail_out + 1));
png_memcpy(text, tmp, text_size);
png_free(png_ptr, tmp);
png_memcpy(text + text_size, png_ptr->zbuf,
- png_ptr->zbuf_size - png_ptr->zstream.avail_out);
+ png_ptr->zbuf_size - png_ptr->zstream.avail_out);
text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;
*(text + text_size) = '\0';
}
+
if (ret != Z_STREAM_END)
{
png_ptr->zstream.next_out = png_ptr->zbuf;
@@ -1432,10 +1564,9 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
png_sizeof(png_text));
text_ptr->compression = PNG_TEXT_COMPRESSION_zTXt;
text_ptr->key = key;
-#ifdef PNG_iTXt_SUPPORTED
+ text_ptr->itxt_length = 0;
text_ptr->lang = NULL;
text_ptr->lang_key = NULL;
-#endif
text_ptr->text = text;
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, 1);
@@ -1444,7 +1575,7 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
png_free(png_ptr, text_ptr);
if (ret)
- png_warning(png_ptr, "Insufficient memory to store text chunk");
+ png_warning(png_ptr, "Insufficient memory to store text chunk");
}
}
#endif
@@ -1452,13 +1583,14 @@ png_push_read_zTXt(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_READ_iTXt_SUPPORTED
void /* PRIVATE */
png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
- length)
+ length)
{
if (!(png_ptr->mode & PNG_HAVE_IHDR) || (png_ptr->mode & PNG_HAVE_IEND))
- {
- png_error(png_ptr, "Out of place iTXt");
- info_ptr = info_ptr; /* To quiet some compiler warnings */
- }
+ {
+ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
+ png_error(png_ptr, "Out of place iTXt");
+ /*NOT REACHED*/
+ }
#ifdef PNG_MAX_MALLOC_64K
png_ptr->skip_length = 0; /* This may not be necessary */
@@ -1472,7 +1604,7 @@ png_push_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32
#endif
png_ptr->current_text = (png_charp)png_malloc(png_ptr,
- (png_size_t)(length + 1));
+ (png_size_t)(length + 1));
png_ptr->current_text[length] = '\0';
png_ptr->current_text_ptr = png_ptr->current_text;
png_ptr->current_text_size = (png_size_t)length;
@@ -1498,6 +1630,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
png_ptr->current_text_left -= text_size;
png_ptr->current_text_ptr += text_size;
}
+
if (!(png_ptr->current_text_left))
{
png_textp text_ptr;
@@ -1541,15 +1674,15 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
if (lang_key < key + png_ptr->current_text_size - 1)
{
- for (; *text; text++)
- /* Empty loop */ ;
+ for (; *text; text++)
+ /* Empty loop */ ;
}
if (text < key + png_ptr->current_text_size)
text++;
text_ptr = (png_textp)png_malloc(png_ptr,
- png_sizeof(png_text));
+ png_sizeof(png_text));
text_ptr->compression = comp_flag + 2;
text_ptr->key = key;
@@ -1576,7 +1709,7 @@ png_push_read_iTXt(png_structp png_ptr, png_infop info_ptr)
*/
void /* PRIVATE */
png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
- length)
+ length)
{
png_uint_32 skip = 0;
@@ -1584,15 +1717,15 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
{
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
- PNG_HANDLE_CHUNK_ALWAYS
+ PNG_HANDLE_CHUNK_ALWAYS
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
- && png_ptr->read_user_chunk_fn == NULL
+ && png_ptr->read_user_chunk_fn == NULL
#endif
- )
+ )
#endif
png_chunk_error(png_ptr, "unknown critical chunk");
- info_ptr = info_ptr; /* To quiet some compiler warnings */
+ PNG_UNUSED(info_ptr) /* To quiet some compiler warnings */
}
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
@@ -1601,16 +1734,16 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
#ifdef PNG_MAX_MALLOC_64K
if (length > (png_uint_32)65535L)
{
- png_warning(png_ptr, "unknown chunk too large to fit in memory");
- skip = length - (png_uint_32)65535L;
- length = (png_uint_32)65535L;
+ png_warning(png_ptr, "unknown chunk too large to fit in memory");
+ skip = length - (png_uint_32)65535L;
+ length = (png_uint_32)65535L;
}
#endif
png_memcpy((png_charp)png_ptr->unknown_chunk.name,
- (png_charp)png_ptr->chunk_name,
- png_sizeof(png_ptr->unknown_chunk.name));
+ (png_charp)png_ptr->chunk_name,
+ png_sizeof(png_ptr->unknown_chunk.name));
png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name) - 1]
- = '\0';
+ = '\0';
png_ptr->unknown_chunk.size = (png_size_t)length;
@@ -1620,7 +1753,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
else
{
png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr,
- (png_size_t)length);
+ (png_size_t)length);
png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
}
@@ -1630,7 +1763,7 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
/* Callback to user unknown chunk handler */
int ret;
ret = (*(png_ptr->read_user_chunk_fn))
- (png_ptr, &png_ptr->unknown_chunk);
+ (png_ptr, &png_ptr->unknown_chunk);
if (ret < 0)
png_chunk_error(png_ptr, "error in user chunk");
@@ -1639,16 +1772,16 @@ png_push_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32
{
if (!(png_ptr->chunk_name[0] & 0x20))
if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
- PNG_HANDLE_CHUNK_ALWAYS)
+ PNG_HANDLE_CHUNK_ALWAYS)
png_chunk_error(png_ptr, "unknown critical chunk");
png_set_unknown_chunks(png_ptr, info_ptr,
- &png_ptr->unknown_chunk, 1);
+ &png_ptr->unknown_chunk, 1);
}
}
else
#endif
- png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
+ png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
png_free(png_ptr, png_ptr->unknown_chunk.data);
png_ptr->unknown_chunk.data = NULL;
}
@@ -1682,8 +1815,8 @@ png_push_have_row(png_structp png_ptr, png_bytep row)
}
void PNGAPI
-png_progressive_combine_row (png_structp png_ptr,
- png_bytep old_row, png_bytep new_row)
+png_progressive_combine_row (png_structp png_ptr, png_bytep old_row,
+ png_const_bytep new_row)
{
PNG_CONST int FARDATA png_pass_dsp_mask[7] =
{0xff, 0x0f, 0xff, 0x33, 0xff, 0x55, 0xff};
@@ -1697,8 +1830,8 @@ png_progressive_combine_row (png_structp png_ptr,
void PNGAPI
png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,
- png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
- png_progressive_end_ptr end_fn)
+ png_progressive_info_ptr info_fn, png_progressive_row_ptr row_fn,
+ png_progressive_end_ptr end_fn)
{
if (png_ptr == NULL)
return;
@@ -1711,7 +1844,7 @@ png_set_progressive_read_fn(png_structp png_ptr, png_voidp progressive_ptr,
}
png_voidp PNGAPI
-png_get_progressive_ptr(png_structp png_ptr)
+png_get_progressive_ptr(png_const_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
diff --git a/src/3rdparty/libpng/pngpriv.h b/src/3rdparty/libpng/pngpriv.h
index 87a4ba6..9b90f26 100644
--- a/src/3rdparty/libpng/pngpriv.h
+++ b/src/3rdparty/libpng/pngpriv.h
@@ -1,12 +1,13 @@
/* pngpriv.h - private declarations for use inside libpng
*
- * libpng version 1.4.0 - January 3, 2010
* For conditions of distribution and use, see copyright notice in png.h
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ *
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
* and license in png.h
@@ -24,25 +25,134 @@
#ifndef PNGPRIV_H
#define PNGPRIV_H
-#ifndef PNG_VERSION_INFO_ONLY
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE
+#endif
+/* This is required for the definition of abort(), used as a last ditch
+ * error handler when all else fails.
+ */
#include <stdlib.h>
+#define PNGLIB_BUILD
+#ifdef PNG_USER_CONFIG
+# include "pngusr.h"
+ /* These should have been defined in pngusr.h */
+# ifndef PNG_USER_PRIVATEBUILD
+# define PNG_USER_PRIVATEBUILD "Custom libpng build"
+# endif
+# ifndef PNG_USER_DLLFNAME_POSTFIX
+# define PNG_USER_DLLFNAME_POSTFIX "Cb"
+# endif
+#endif
+#include "png.h"
+#include "pnginfo.h"
+#include "pngstruct.h"
+
+/* This is used for 16 bit gamma tables - only the top level pointers are const,
+ * this could be changed:
+ */
+typedef PNG_CONST png_uint_16p FAR * png_const_uint_16pp;
+
+/* Added at libpng-1.2.9 */
+/* Moved to pngpriv.h at libpng-1.5.0 */
+
+/* config.h is created by and PNG_CONFIGURE_LIBPNG is set by the "configure"
+ * script. We may need it here to get the correct configuration on things
+ * like limits.
+ */
+#ifdef PNG_CONFIGURE_LIBPNG
+# ifdef HAVE_CONFIG_H
+# include "config.h"
+# endif
+#endif
+
+/* Moved to pngpriv.h at libpng-1.5.0 */
+/* NOTE: some of these may have been used in external applications as
+ * these definitions were exposed in pngconf.h prior to 1.5.
+ */
+
+/* If you are running on a machine where you cannot allocate more
+ * than 64K of memory at once, uncomment this. While libpng will not
+ * normally need that much memory in a chunk (unless you load up a very
+ * large file), zlib needs to know how big of a chunk it can use, and
+ * libpng thus makes sure to check any memory allocation to verify it
+ * will fit into memory.
+ *
+ * zlib provides 'MAXSEG_64K' which, if defined, indicates the
+ * same limit and pngconf.h (already included) sets the limit
+ * if certain operating systems are detected.
+ */
+#if defined(MAXSEG_64K) && !defined(PNG_MAX_MALLOC_64K)
+# define PNG_MAX_MALLOC_64K
+#endif
+
+/* Unused formal parameter warnings are silenced using the following macro
+ * which is expected to have no bad effects on performance (optimizing
+ * compilers will probably remove it entirely). Note that if you replace
+ * it with something other than whitespace, you must include the terminating
+ * semicolon.
+ */
+#define PNG_UNUSED(param) (void)param;
+
+/* Just a little check that someone hasn't tried to define something
+ * contradictory.
+ */
+#if (PNG_ZBUF_SIZE > 65536L) && defined(PNG_MAX_MALLOC_64K)
+# undef PNG_ZBUF_SIZE
+# define PNG_ZBUF_SIZE 65536L
+#endif
+
+/* If warnings or errors are turned off the code is disabled
+ * or redirected here.
+ */
+#ifndef PNG_WARNINGS_SUPPORTED
+# define png_warning(s1,s2) ((void)0)
+# define png_chunk_warning(s1,s2) ((void)0)
+#endif
+#ifndef PNG_ERROR_TEXT_SUPPORTED
+# define png_error(s1,s2) png_err(s1)
+# define png_chunk_error(s1,s2) png_err(s1)
+# define png_fixed_error(s1,s2) png_err(s1)
+#endif
+
+#ifndef PNG_EXTERN
/* The functions exported by PNG_EXTERN are internal functions, which
* aren't usually used outside the library (as far as I know), so it is
* debatable if they should be exported at all. In the future, when it
* is possible to have run-time registry of chunk-handling functions,
- * some of these will be made available again.
-#define PNG_EXTERN extern
+ * some of these might be made available again.
+# define PNG_EXTERN extern
+ */
+# define PNG_EXTERN
+#endif
+
+/* Some fixed point APIs are still required even if not exported because
+ * they get used by the corresponding floating point APIs. This magic
+ * deals with this:
*/
-#define PNG_EXTERN
+#ifdef PNG_FIXED_POINT_SUPPORTED
+# define PNGFAPI PNGAPI
+#else
+# define PNGFAPI /* PRIVATE */
+#endif
/* Other defines specific to compilers can go here. Try to keep
* them inside an appropriate ifdef/endif pair for portability.
*/
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-# ifdef MACOS
+#if defined(PNG_FLOATING_POINT_SUPPORTED) ||\
+ defined(PNG_FLOATING_ARITHMETIC_SUPPORTED)
+ /* png.c requires the following ANSI-C constants if the conversion of
+ * floating point to ASCII is implemented therein:
+ *
+ * DBL_DIG Maximum number of decimal digits (can be set to any constant)
+ * DBL_MIN Smallest normalized fp number (can be set to an arbitrary value)
+ * DBL_MAX Maximum floating point number (can be set to an arbitrary value)
+ */
+# include <float.h>
+
+# if (defined(__MWERKS__) && defined(macintosh)) || defined(applec) || \
+ defined(THINK_C) || defined(__SC__) || defined(TARGET_OS_MAC)
/* We need to check that <math.h> hasn't already been included earlier
* as it seems it doesn't agree with <fp.h>, yet we should really use
* <fp.h> if possible.
@@ -61,11 +171,6 @@
# endif
#endif
-/* Codewarrior on NT has linking problems without this. */
-#if (defined(__MWERKS__) && defined(WIN32)) || defined(__STDC__)
-# define PNG_ALWAYS_EXTERN
-#endif
-
/* This provides the non-ANSI (far) memory allocation routines. */
#if defined(__TURBOC__) && defined(__MSDOS__)
# include <mem.h>
@@ -77,12 +182,88 @@
# if !defined(__SYMBIAN32__)
# include <windows.h> /* defines _WINDOWS_ macro */
# endif
-/* I have no idea why is this necessary... */
-# ifdef _MSC_VER
-# include <malloc.h>
+#endif
+
+/* Moved here around 1.5.0beta36 from pngconf.h */
+/* Users may want to use these so they are not private. Any library
+ * functions that are passed far data must be model-independent.
+ */
+
+/* Memory model/platform independent fns */
+#ifndef PNG_ABORT
+# if defined(_WINDOWS_) || defined(_WIN32_WCE)
+# define PNG_ABORT() ExitProcess(0)
+# else
+# define PNG_ABORT() abort()
# endif
#endif
+#ifdef USE_FAR_KEYWORD
+/* Use this to make far-to-near assignments */
+# define CHECK 1
+# define NOCHECK 0
+# define CVT_PTR(ptr) (png_far_to_near(png_ptr,ptr,CHECK))
+# define CVT_PTR_NOCHECK(ptr) (png_far_to_near(png_ptr,ptr,NOCHECK))
+# define png_strcpy _fstrcpy
+# define png_strncpy _fstrncpy /* Added to v 1.2.6 */
+# define png_strlen _fstrlen
+# define png_memcmp _fmemcmp /* SJT: added */
+# define png_memcpy _fmemcpy
+# define png_memset _fmemset
+# define png_sprintf sprintf
+#else
+# ifdef _WINDOWS_ /* Favor Windows over C runtime fns */
+# define CVT_PTR(ptr) (ptr)
+# define CVT_PTR_NOCHECK(ptr) (ptr)
+# define png_strcpy lstrcpyA
+# define png_strncpy lstrcpynA
+# define png_strlen lstrlenA
+# define png_memcmp memcmp
+# define png_memcpy CopyMemory
+# define png_memset memset
+# define png_sprintf wsprintfA
+# else
+# define CVT_PTR(ptr) (ptr)
+# define CVT_PTR_NOCHECK(ptr) (ptr)
+# define png_strcpy strcpy
+# define png_strncpy strncpy /* Added to v 1.2.6 */
+# define png_strlen strlen
+# define png_memcmp memcmp /* SJT: added */
+# define png_memcpy memcpy
+# define png_memset memset
+# define png_sprintf sprintf
+# endif
+#endif
+/* End of memory model/platform independent support */
+
+#ifndef PNG_NO_SNPRINTF
+# ifdef _MSC_VER
+# define png_snprintf _snprintf /* Added to v 1.2.19 */
+# define png_snprintf2 _snprintf
+# define png_snprintf6 _snprintf
+# else
+# define png_snprintf snprintf /* Added to v 1.2.19 */
+# define png_snprintf2 snprintf
+# define png_snprintf6 snprintf
+# endif
+#else
+ /* You don't have or don't want to use snprintf(). Caution: Using
+ * sprintf instead of snprintf exposes your application to accidental
+ * or malevolent buffer overflows. If you don't have snprintf()
+ * as a general rule you should provide one (you can get one from
+ * Portable OpenSSH).
+ */
+# define png_snprintf(s1,n,fmt,x1) png_sprintf(s1,fmt,x1)
+# define png_snprintf2(s1,n,fmt,x1,x2) png_sprintf(s1,fmt,x1,x2)
+# define png_snprintf6(s1,n,fmt,x1,x2,x3,x4,x5,x6) \
+ png_sprintf(s1,fmt,x1,x2,x3,x4,x5,x6)
+#endif
+/* End of 1.5.0beta36 move from pngconf.h */
+
+/* CONSTANTS and UTILITY MACROS
+ * These are used internally by libpng and not exposed in the API
+ */
+
/* Various modes of operation. Note that after an init, mode is set to
* zero automatically when the structure is created.
*/
@@ -108,7 +289,7 @@
#define PNG_SHIFT 0x0008
#define PNG_SWAP_BYTES 0x0010
#define PNG_INVERT_MONO 0x0020
-#define PNG_DITHER 0x0040
+#define PNG_QUANTIZE 0x0040
#define PNG_BACKGROUND 0x0080
#define PNG_BACKGROUND_EXPAND 0x0100
/* 0x0200 unused */
@@ -140,9 +321,7 @@
#define PNG_STRUCT_INFO 0x0002
/* Scaling factor for filter heuristic weighting calculations */
-#define PNG_WEIGHT_SHIFT 8
#define PNG_WEIGHT_FACTOR (1<<(PNG_WEIGHT_SHIFT))
-#define PNG_COST_SHIFT 3
#define PNG_COST_FACTOR (1<<(PNG_COST_SHIFT))
/* Flags for the png_ptr->flags rather than declaring a byte for each one */
@@ -187,6 +366,18 @@
#define PNG_FLAG_CRC_MASK (PNG_FLAG_CRC_ANCILLARY_MASK | \
PNG_FLAG_CRC_CRITICAL_MASK)
+/* zlib.h declares a magic type 'uInt' that limits the amount of data that zlib
+ * can handle at once. This type need be no larger than 16 bits (so maximum of
+ * 65535), this define allows us to discover how big it is, but limited by the
+ * maximuum for png_size_t. The value can be overriden in a library build
+ * (pngusr.h, or set it in CPPFLAGS) and it works to set it to a considerably
+ * lower value (e.g. 255 works). A lower value may help memory usage (slightly)
+ * and may even improve performance on some systems (and degrade it on others.)
+ */
+#ifndef ZLIB_IO_MAX
+# define ZLIB_IO_MAX ((uInt)-1)
+#endif
+
/* Save typing and make code easier to understand */
#define PNG_COLOR_DIST(c1, c2) (abs((int)((c1).red) - (int)((c2).red)) + \
@@ -205,7 +396,46 @@
* integers, "value" a variable. Added to libpng-1.2.6 JB
*/
#define PNG_OUT_OF_RANGE(value, ideal, delta) \
- ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
+ ( (value) < (ideal)-(delta) || (value) > (ideal)+(delta) )
+
+/* Conversions between fixed and floating point, only defined if
+ * required (to make sure the code doesn't accidentally use float
+ * when it is supposedly disabled.)
+ */
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+/* The floating point conversion can't overflow, though it can and
+ * does lose accuracy relative to the original fixed point value.
+ * In practice this doesn't matter because png_fixed_point only
+ * stores numbers with very low precision. The png_ptr and s
+ * arguments are unused by default but are there in case error
+ * checking becomes a requirement.
+ */
+#define png_float(png_ptr, fixed, s) (.00001 * (fixed))
+
+/* The fixed point conversion performs range checking and evaluates
+ * its argument multiple times, so must be used with care. The
+ * range checking uses the PNG specification values for a signed
+ * 32 bit fixed point value except that the values are deliberately
+ * rounded-to-zero to an integral value - 21474 (21474.83 is roughly
+ * (2^31-1) * 100000). 's' is a string that describes the value being
+ * converted.
+ *
+ * NOTE: this macro will raise a png_error if the range check fails,
+ * therefore it is normally only appropriate to use this on values
+ * that come from API calls or other sources where an out of range
+ * error indicates a programming error, not a data error!
+ *
+ * NOTE: by default this is off - the macro is not used - because the
+ * function call saves a lot of code.
+ */
+#ifdef PNG_FIXED_POINT_MACRO_SUPPORTED
+#define png_fixed(png_ptr, fp, s) ((fp) <= 21474 && (fp) >= -21474 ?\
+ ((png_fixed_point)(100000 * (fp))) : (png_fixed_error(png_ptr, s),0))
+#else
+PNG_EXTERN png_fixed_point png_fixed PNGARG((png_structp png_ptr, double fp,
+ png_const_charp text));
+#endif
+#endif
/* Constant strings for known chunk types. If you need to add a chunk,
* define the name here, and add an invocation of the macro wherever it's
@@ -247,70 +477,78 @@ extern "C" {
*/
/* Allocate memory for an internal libpng struct */
-PNG_EXTERN png_voidp png_create_struct PNGARG((int type));
+PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct,PNGARG((int type)),
+ PNG_ALLOCATED);
/* Free memory from internal libpng struct */
PNG_EXTERN void png_destroy_struct PNGARG((png_voidp struct_ptr));
-PNG_EXTERN png_voidp png_create_struct_2 PNGARG((int type, png_malloc_ptr
- malloc_fn, png_voidp mem_ptr));
+PNG_EXTERN PNG_FUNCTION(png_voidp,png_create_struct_2,
+ PNGARG((int type, png_malloc_ptr malloc_fn, png_voidp mem_ptr)),
+ PNG_ALLOCATED);
PNG_EXTERN void png_destroy_struct_2 PNGARG((png_voidp struct_ptr,
- png_free_ptr free_fn, png_voidp mem_ptr));
+ png_free_ptr free_fn, png_voidp mem_ptr));
/* Free any memory that info_ptr points to and reset struct. */
PNG_EXTERN void png_info_destroy PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+ png_infop info_ptr));
/* Function to allocate memory for zlib. PNGAPI is disallowed. */
-PNG_EXTERN voidpf png_zalloc PNGARG((voidpf png_ptr, uInt items, uInt size));
+PNG_EXTERN PNG_FUNCTION(voidpf,png_zalloc,PNGARG((voidpf png_ptr, uInt items,
+ uInt size)),PNG_ALLOCATED);
/* Function to free memory for zlib. PNGAPI is disallowed. */
PNG_EXTERN void png_zfree PNGARG((voidpf png_ptr, voidpf ptr));
-/* Next four functions are used internally as callbacks. PNGAPI is required
- * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3. */
+/* Next four functions are used internally as callbacks. PNGCBAPI is required
+ * but not PNG_EXPORT. PNGAPI added at libpng version 1.2.3, changed to
+ * PNGCBAPI at 1.5.0
+ */
-PNG_EXTERN void PNGAPI png_default_read_data PNGARG((png_structp png_ptr,
- png_bytep data, png_size_t length));
+PNG_EXTERN void PNGCBAPI png_default_read_data PNGARG((png_structp png_ptr,
+ png_bytep data, png_size_t length));
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
-PNG_EXTERN void PNGAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
- png_bytep buffer, png_size_t length));
+PNG_EXTERN void PNGCBAPI png_push_fill_buffer PNGARG((png_structp png_ptr,
+ png_bytep buffer, png_size_t length));
#endif
-PNG_EXTERN void PNGAPI png_default_write_data PNGARG((png_structp png_ptr,
- png_bytep data, png_size_t length));
+PNG_EXTERN void PNGCBAPI png_default_write_data PNGARG((png_structp png_ptr,
+ png_bytep data, png_size_t length));
#ifdef PNG_WRITE_FLUSH_SUPPORTED
-#ifdef PNG_STDIO_SUPPORTED
-PNG_EXTERN void PNGAPI png_default_flush PNGARG((png_structp png_ptr));
-#endif
+# ifdef PNG_STDIO_SUPPORTED
+PNG_EXTERN void PNGCBAPI png_default_flush PNGARG((png_structp png_ptr));
+# endif
#endif
/* Reset the CRC variable */
PNG_EXTERN void png_reset_crc PNGARG((png_structp png_ptr));
/* Write the "data" buffer to whatever output you are using */
-PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr, png_bytep data,
- png_size_t length));
+PNG_EXTERN void png_write_data PNGARG((png_structp png_ptr,
+ png_const_bytep data, png_size_t length));
+
+/* Read and check the PNG file signature */
+PNG_EXTERN void png_read_sig PNGARG((png_structp png_ptr, png_infop info_ptr));
/* Read the chunk header (length + type name) */
PNG_EXTERN png_uint_32 png_read_chunk_header PNGARG((png_structp png_ptr));
/* Read data from whatever input you are using into the "data" buffer */
PNG_EXTERN void png_read_data PNGARG((png_structp png_ptr, png_bytep data,
- png_size_t length));
+ png_size_t length));
/* Read bytes into buf, and update png_ptr->crc */
PNG_EXTERN void png_crc_read PNGARG((png_structp png_ptr, png_bytep buf,
- png_size_t length));
+ png_size_t length));
/* Decompress data in a chunk that uses compression */
#if defined(PNG_zTXt_SUPPORTED) || defined(PNG_iTXt_SUPPORTED) || \
defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED)
PNG_EXTERN void png_decompress_chunk PNGARG((png_structp png_ptr,
- int comp_type, png_size_t chunklength, png_size_t prefix_length,
- png_size_t *data_length));
+ int comp_type, png_size_t chunklength, png_size_t prefix_length,
+ png_size_t *data_length));
#endif
/* Read "skip" bytes, read the file crc, and (optionally) verify png_ptr->crc */
@@ -323,8 +561,8 @@ PNG_EXTERN int png_crc_error PNGARG((png_structp png_ptr));
* passing a maximum of 64K on systems that have this as a memory limit,
* since this is the maximum buffer size we can specify.
*/
-PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr, png_bytep ptr,
- png_size_t length));
+PNG_EXTERN void png_calculate_crc PNGARG((png_structp png_ptr,
+ png_const_bytep ptr, png_size_t length));
#ifdef PNG_WRITE_FLUSH_SUPPORTED
PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
@@ -336,138 +574,132 @@ PNG_EXTERN void png_flush PNGARG((png_structp png_ptr));
* information.
*/
PNG_EXTERN void png_write_IHDR PNGARG((png_structp png_ptr, png_uint_32 width,
- png_uint_32 height,
- int bit_depth, int color_type, int compression_method, int filter_method,
- int interlace_method));
+ png_uint_32 height,
+ int bit_depth, int color_type, int compression_method, int filter_method,
+ int interlace_method));
-PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr, png_colorp palette,
- png_uint_32 num_pal));
+PNG_EXTERN void png_write_PLTE PNGARG((png_structp png_ptr,
+ png_const_colorp palette, png_uint_32 num_pal));
PNG_EXTERN void png_write_IDAT PNGARG((png_structp png_ptr, png_bytep data,
- png_size_t length));
+ png_size_t length));
PNG_EXTERN void png_write_IEND PNGARG((png_structp png_ptr));
#ifdef PNG_WRITE_gAMA_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
+# ifdef PNG_FLOATING_POINT_SUPPORTED
PNG_EXTERN void png_write_gAMA PNGARG((png_structp png_ptr, double file_gamma));
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
-PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr, png_fixed_point
- file_gamma));
-#endif
+# endif
+# ifdef PNG_FIXED_POINT_SUPPORTED
+PNG_EXTERN void png_write_gAMA_fixed PNGARG((png_structp png_ptr,
+ png_fixed_point file_gamma));
+# endif
#endif
#ifdef PNG_WRITE_sBIT_SUPPORTED
-PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr, png_color_8p sbit,
- int color_type));
+PNG_EXTERN void png_write_sBIT PNGARG((png_structp png_ptr,
+ png_const_color_8p sbit, int color_type));
#endif
#ifdef PNG_WRITE_cHRM_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
+# ifdef PNG_FLOATING_POINT_SUPPORTED
PNG_EXTERN void png_write_cHRM PNGARG((png_structp png_ptr,
- double white_x, double white_y,
- double red_x, double red_y, double green_x, double green_y,
- double blue_x, double blue_y));
-#endif
+ double white_x, double white_y,
+ double red_x, double red_y, double green_x, double green_y,
+ double blue_x, double blue_y));
+# endif
PNG_EXTERN void png_write_cHRM_fixed PNGARG((png_structp png_ptr,
- png_fixed_point int_white_x, png_fixed_point int_white_y,
- png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
- int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
- png_fixed_point int_blue_y));
+ png_fixed_point int_white_x, png_fixed_point int_white_y,
+ png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
+ int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
+ png_fixed_point int_blue_y));
#endif
#ifdef PNG_WRITE_sRGB_SUPPORTED
PNG_EXTERN void png_write_sRGB PNGARG((png_structp png_ptr,
- int intent));
+ int intent));
#endif
#ifdef PNG_WRITE_iCCP_SUPPORTED
PNG_EXTERN void png_write_iCCP PNGARG((png_structp png_ptr,
- png_charp name, int compression_type,
- png_charp profile, int proflen));
+ png_const_charp name, int compression_type,
+ png_const_charp profile, int proflen));
/* Note to maintainer: profile should be png_bytep */
#endif
#ifdef PNG_WRITE_sPLT_SUPPORTED
PNG_EXTERN void png_write_sPLT PNGARG((png_structp png_ptr,
- png_sPLT_tp palette));
+ png_const_sPLT_tp palette));
#endif
#ifdef PNG_WRITE_tRNS_SUPPORTED
-PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr, png_bytep trans,
- png_color_16p values, int number, int color_type));
+PNG_EXTERN void png_write_tRNS PNGARG((png_structp png_ptr,
+ png_const_bytep trans, png_const_color_16p values, int number,
+ int color_type));
#endif
#ifdef PNG_WRITE_bKGD_SUPPORTED
PNG_EXTERN void png_write_bKGD PNGARG((png_structp png_ptr,
- png_color_16p values, int color_type));
+ png_const_color_16p values, int color_type));
#endif
#ifdef PNG_WRITE_hIST_SUPPORTED
-PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr, png_uint_16p hist,
- int num_hist));
+PNG_EXTERN void png_write_hIST PNGARG((png_structp png_ptr,
+ png_const_uint_16p hist, int num_hist));
#endif
#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \
defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED)
PNG_EXTERN png_size_t png_check_keyword PNGARG((png_structp png_ptr,
- png_charp key, png_charpp new_key));
+ png_const_charp key, png_charpp new_key));
#endif
#ifdef PNG_WRITE_tEXt_SUPPORTED
-PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_charp key,
- png_charp text, png_size_t text_len));
+PNG_EXTERN void png_write_tEXt PNGARG((png_structp png_ptr, png_const_charp key,
+ png_const_charp text, png_size_t text_len));
#endif
#ifdef PNG_WRITE_zTXt_SUPPORTED
-PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_charp key,
- png_charp text, png_size_t text_len, int compression));
+PNG_EXTERN void png_write_zTXt PNGARG((png_structp png_ptr, png_const_charp key,
+ png_const_charp text, png_size_t text_len, int compression));
#endif
#ifdef PNG_WRITE_iTXt_SUPPORTED
PNG_EXTERN void png_write_iTXt PNGARG((png_structp png_ptr,
- int compression, png_charp key, png_charp lang, png_charp lang_key,
- png_charp text));
+ int compression, png_const_charp key, png_const_charp lang,
+ png_const_charp lang_key, png_const_charp text));
#endif
#ifdef PNG_TEXT_SUPPORTED /* Added at version 1.0.14 and 1.2.4 */
PNG_EXTERN int png_set_text_2 PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_textp text_ptr, int num_text));
+ png_infop info_ptr, png_const_textp text_ptr, int num_text));
#endif
#ifdef PNG_WRITE_oFFs_SUPPORTED
PNG_EXTERN void png_write_oFFs PNGARG((png_structp png_ptr,
- png_int_32 x_offset, png_int_32 y_offset, int unit_type));
+ png_int_32 x_offset, png_int_32 y_offset, int unit_type));
#endif
#ifdef PNG_WRITE_pCAL_SUPPORTED
PNG_EXTERN void png_write_pCAL PNGARG((png_structp png_ptr, png_charp purpose,
- png_int_32 X0, png_int_32 X1, int type, int nparams,
- png_charp units, png_charpp params));
+ png_int_32 X0, png_int_32 X1, int type, int nparams,
+ png_const_charp units, png_charpp params));
#endif
#ifdef PNG_WRITE_pHYs_SUPPORTED
PNG_EXTERN void png_write_pHYs PNGARG((png_structp png_ptr,
- png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
- int unit_type));
+ png_uint_32 x_pixels_per_unit, png_uint_32 y_pixels_per_unit,
+ int unit_type));
#endif
#ifdef PNG_WRITE_tIME_SUPPORTED
PNG_EXTERN void png_write_tIME PNGARG((png_structp png_ptr,
- png_timep mod_time));
+ png_const_timep mod_time));
#endif
#ifdef PNG_WRITE_sCAL_SUPPORTED
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
-PNG_EXTERN void png_write_sCAL PNGARG((png_structp png_ptr,
- int unit, double width, double height));
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
PNG_EXTERN void png_write_sCAL_s PNGARG((png_structp png_ptr,
- int unit, png_charp width, png_charp height));
-#endif
-#endif
+ int unit, png_const_charp width, png_const_charp height));
#endif
/* Called when finished processing a row of data */
@@ -476,20 +708,15 @@ PNG_EXTERN void png_write_finish_row PNGARG((png_structp png_ptr));
/* Internal use only. Called before first row of data */
PNG_EXTERN void png_write_start_row PNGARG((png_structp png_ptr));
-#ifdef PNG_READ_GAMMA_SUPPORTED
-PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
- png_byte bit_depth));
-#endif
-
/* Combine a row of data, dealing with alpha, etc. if requested */
PNG_EXTERN void png_combine_row PNGARG((png_structp png_ptr, png_bytep row,
- int mask));
+ int mask));
#ifdef PNG_READ_INTERLACING_SUPPORTED
/* Expand an interlaced row */
/* OLD pre-1.0.9 interface:
PNG_EXTERN void png_do_read_interlace PNGARG((png_row_infop row_info,
- png_bytep row, int pass, png_uint_32 transformations));
+ png_bytep row, int pass, png_uint_32 transformations));
*/
PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
#endif
@@ -499,20 +726,21 @@ PNG_EXTERN void png_do_read_interlace PNGARG((png_structp png_ptr));
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Grab pixels out of a row for an interlaced pass */
PNG_EXTERN void png_do_write_interlace PNGARG((png_row_infop row_info,
- png_bytep row, int pass));
+ png_bytep row, int pass));
#endif
/* Unfilter a row */
PNG_EXTERN void png_read_filter_row PNGARG((png_structp png_ptr,
- png_row_infop row_info, png_bytep row, png_bytep prev_row, int filter));
+ png_row_infop row_info, png_bytep row, png_const_bytep prev_row,
+ int filter));
/* Choose the best filter to use and filter the row data */
PNG_EXTERN void png_write_find_filter PNGARG((png_structp png_ptr,
- png_row_infop row_info));
+ png_row_infop row_info));
/* Write out the filtered row. */
PNG_EXTERN void png_write_filtered_row PNGARG((png_structp png_ptr,
- png_bytep filtered_row));
+ png_bytep filtered_row));
/* Finish a row while reading, dealing with interlacing passes, etc. */
PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
@@ -520,87 +748,97 @@ PNG_EXTERN void png_read_finish_row PNGARG((png_structp png_ptr));
PNG_EXTERN void png_read_start_row PNGARG((png_structp png_ptr));
/* Optional call to update the users info structure */
PNG_EXTERN void png_read_transform_info PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+ png_infop info_ptr));
/* These are the functions that do the transformations */
#ifdef PNG_READ_FILLER_SUPPORTED
PNG_EXTERN void png_do_read_filler PNGARG((png_row_infop row_info,
- png_bytep row, png_uint_32 filler, png_uint_32 flags));
+ png_bytep row, png_uint_32 filler, png_uint_32 flags));
#endif
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
PNG_EXTERN void png_do_read_swap_alpha PNGARG((png_row_infop row_info,
- png_bytep row));
+ png_bytep row));
#endif
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
PNG_EXTERN void png_do_write_swap_alpha PNGARG((png_row_infop row_info,
- png_bytep row));
+ png_bytep row));
#endif
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
PNG_EXTERN void png_do_read_invert_alpha PNGARG((png_row_infop row_info,
- png_bytep row));
+ png_bytep row));
#endif
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
PNG_EXTERN void png_do_write_invert_alpha PNGARG((png_row_infop row_info,
- png_bytep row));
+ png_bytep row));
#endif
#if defined(PNG_WRITE_FILLER_SUPPORTED) || \
defined(PNG_READ_STRIP_ALPHA_SUPPORTED)
PNG_EXTERN void png_do_strip_filler PNGARG((png_row_infop row_info,
- png_bytep row, png_uint_32 flags));
+ png_bytep row, png_uint_32 flags));
#endif
+#ifdef PNG_16BIT_SUPPORTED
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
-PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info, png_bytep row));
+PNG_EXTERN void png_do_swap PNGARG((png_row_infop row_info,
+ png_bytep row));
+#endif
#endif
-#if defined(PNG_READ_PACKSWAP_SUPPORTED) || defined(PNG_WRITE_PACKSWAP_SUPPORTED)
-PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info, png_bytep row));
+#if defined(PNG_READ_PACKSWAP_SUPPORTED) || \
+ defined(PNG_WRITE_PACKSWAP_SUPPORTED)
+PNG_EXTERN void png_do_packswap PNGARG((png_row_infop row_info,
+ png_bytep row));
#endif
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
-PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr, png_row_infop
- row_info, png_bytep row));
+PNG_EXTERN int png_do_rgb_to_gray PNGARG((png_structp png_ptr,
+ png_row_infop row_info, png_bytep row));
#endif
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
PNG_EXTERN void png_do_gray_to_rgb PNGARG((png_row_infop row_info,
- png_bytep row));
+ png_bytep row));
#endif
#ifdef PNG_READ_PACK_SUPPORTED
-PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info, png_bytep row));
+PNG_EXTERN void png_do_unpack PNGARG((png_row_infop row_info,
+ png_bytep row));
#endif
#ifdef PNG_READ_SHIFT_SUPPORTED
-PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info, png_bytep row,
- png_color_8p sig_bits));
+PNG_EXTERN void png_do_unshift PNGARG((png_row_infop row_info,
+ png_bytep row, png_const_color_8p sig_bits));
#endif
#if defined(PNG_READ_INVERT_SUPPORTED) || defined(PNG_WRITE_INVERT_SUPPORTED)
-PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info, png_bytep row));
+PNG_EXTERN void png_do_invert PNGARG((png_row_infop row_info,
+ png_bytep row));
#endif
#ifdef PNG_READ_16_TO_8_SUPPORTED
-PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info, png_bytep row));
+PNG_EXTERN void png_do_chop PNGARG((png_row_infop row_info,
+ png_bytep row));
#endif
-#ifdef PNG_READ_DITHER_SUPPORTED
-PNG_EXTERN void png_do_dither PNGARG((png_row_infop row_info,
- png_bytep row, png_bytep palette_lookup, png_bytep dither_lookup));
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+PNG_EXTERN void png_do_quantize PNGARG((png_row_infop row_info,
+ png_bytep row, png_const_bytep palette_lookup,
+ png_const_bytep quantize_lookup));
# ifdef PNG_CORRECT_PALETTE_SUPPORTED
PNG_EXTERN void png_correct_palette PNGARG((png_structp png_ptr,
- png_colorp palette, int num_palette));
+ png_colorp palette, int num_palette));
# endif
#endif
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
-PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info, png_bytep row));
+PNG_EXTERN void png_do_bgr PNGARG((png_row_infop row_info,
+ png_bytep row));
#endif
#ifdef PNG_WRITE_PACK_SUPPORTED
@@ -609,35 +847,38 @@ PNG_EXTERN void png_do_pack PNGARG((png_row_infop row_info,
#endif
#ifdef PNG_WRITE_SHIFT_SUPPORTED
-PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info, png_bytep row,
- png_color_8p bit_depth));
+PNG_EXTERN void png_do_shift PNGARG((png_row_infop row_info,
+ png_bytep row, png_const_color_8p bit_depth));
#endif
#ifdef PNG_READ_BACKGROUND_SUPPORTED
-#ifdef PNG_READ_GAMMA_SUPPORTED
-PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
- png_color_16p trans_color, png_color_16p background,
- png_color_16p background_1,
- png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
- png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
- png_uint_16pp gamma_16_to_1, int gamma_shift));
-#else
-PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info, png_bytep row,
- png_color_16p trans_color, png_color_16p background));
-#endif
+# ifdef PNG_READ_GAMMA_SUPPORTED
+PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info,
+ png_bytep row, png_const_color_16p trans_color,
+ png_const_color_16p background, png_const_color_16p background_1,
+ png_const_bytep gamma_table, png_const_bytep gamma_from_1,
+ png_const_bytep gamma_to_1, png_const_uint_16pp gamma_16,
+ png_const_uint_16pp gamma_16_from_1, png_const_uint_16pp gamma_16_to_1,
+ int gamma_shift));
+# else
+PNG_EXTERN void png_do_background PNGARG((png_row_infop row_info,
+ png_bytep row, png_const_color_16p trans_color,
+ png_const_color_16p background));
+# endif
#endif
#ifdef PNG_READ_GAMMA_SUPPORTED
-PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info, png_bytep row,
- png_bytep gamma_table, png_uint_16pp gamma_16_table,
- int gamma_shift));
+PNG_EXTERN void png_do_gamma PNGARG((png_row_infop row_info,
+ png_bytep row, png_const_bytep gamma_table,
+ png_const_uint_16pp gamma_16_table, int gamma_shift));
#endif
#ifdef PNG_READ_EXPAND_SUPPORTED
PNG_EXTERN void png_do_expand_palette PNGARG((png_row_infop row_info,
- png_bytep row, png_colorp palette, png_bytep trans, int num_trans));
+ png_bytep row, png_const_colorp palette, png_const_bytep trans,
+ int num_trans));
PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
- png_bytep row, png_color_16p trans_value));
+ png_bytep row, png_const_color_16p trans_color));
#endif
/* The following decodes the appropriate chunks, and does error correction,
@@ -646,102 +887,102 @@ PNG_EXTERN void png_do_expand PNGARG((png_row_infop row_info,
/* Decode the IHDR chunk */
PNG_EXTERN void png_handle_IHDR PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
PNG_EXTERN void png_handle_PLTE PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
PNG_EXTERN void png_handle_IEND PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#ifdef PNG_READ_bKGD_SUPPORTED
PNG_EXTERN void png_handle_bKGD PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_cHRM_SUPPORTED
PNG_EXTERN void png_handle_cHRM PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_gAMA_SUPPORTED
PNG_EXTERN void png_handle_gAMA PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_hIST_SUPPORTED
PNG_EXTERN void png_handle_hIST PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_iCCP_SUPPORTED
-extern void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+PNG_EXTERN void png_handle_iCCP PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
#endif /* PNG_READ_iCCP_SUPPORTED */
#ifdef PNG_READ_iTXt_SUPPORTED
PNG_EXTERN void png_handle_iTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_oFFs_SUPPORTED
PNG_EXTERN void png_handle_oFFs PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_pCAL_SUPPORTED
PNG_EXTERN void png_handle_pCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_pHYs_SUPPORTED
PNG_EXTERN void png_handle_pHYs PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_sBIT_SUPPORTED
PNG_EXTERN void png_handle_sBIT PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_sCAL_SUPPORTED
PNG_EXTERN void png_handle_sCAL PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_sPLT_SUPPORTED
-extern void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+PNG_EXTERN void png_handle_sPLT PNGARG((png_structp png_ptr, png_infop info_ptr,
+ png_uint_32 length));
#endif /* PNG_READ_sPLT_SUPPORTED */
#ifdef PNG_READ_sRGB_SUPPORTED
PNG_EXTERN void png_handle_sRGB PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_tEXt_SUPPORTED
PNG_EXTERN void png_handle_tEXt PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_tIME_SUPPORTED
PNG_EXTERN void png_handle_tIME PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_tRNS_SUPPORTED
PNG_EXTERN void png_handle_tRNS PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
#ifdef PNG_READ_zTXt_SUPPORTED
PNG_EXTERN void png_handle_zTXt PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_uint_32 length));
+ png_uint_32 length));
#endif
PNG_EXTERN void png_handle_unknown PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
+ png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_check_chunk_name PNGARG((png_structp png_ptr,
- png_bytep chunk_name));
+ png_const_bytep chunk_name));
/* Handle the transformations for reading and writing */
PNG_EXTERN void png_do_read_transformations PNGARG((png_structp png_ptr));
@@ -751,19 +992,19 @@ PNG_EXTERN void png_init_read_transformations PNGARG((png_structp png_ptr));
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
PNG_EXTERN void png_push_read_chunk PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+ png_infop info_ptr));
PNG_EXTERN void png_push_read_sig PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+ png_infop info_ptr));
PNG_EXTERN void png_push_check_crc PNGARG((png_structp png_ptr));
PNG_EXTERN void png_push_crc_skip PNGARG((png_structp png_ptr,
- png_uint_32 length));
+ png_uint_32 length));
PNG_EXTERN void png_push_crc_finish PNGARG((png_structp png_ptr));
PNG_EXTERN void png_push_save_buffer PNGARG((png_structp png_ptr));
PNG_EXTERN void png_push_restore_buffer PNGARG((png_structp png_ptr,
- png_bytep buffer, png_size_t buffer_length));
+ png_bytep buffer, png_size_t buffer_length));
PNG_EXTERN void png_push_read_IDAT PNGARG((png_structp png_ptr));
PNG_EXTERN void png_process_IDAT_data PNGARG((png_structp png_ptr,
- png_bytep buffer, png_size_t buffer_length));
+ png_bytep buffer, png_size_t buffer_length));
PNG_EXTERN void png_push_process_row PNGARG((png_structp png_ptr));
PNG_EXTERN void png_push_handle_unknown PNGARG((png_structp png_ptr,
png_infop info_ptr, png_uint_32 length));
@@ -773,185 +1014,232 @@ PNG_EXTERN void png_push_have_end PNGARG((png_structp png_ptr,
png_infop info_ptr));
PNG_EXTERN void png_push_have_row PNGARG((png_structp png_ptr, png_bytep row));
PNG_EXTERN void png_push_read_end PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+ png_infop info_ptr));
PNG_EXTERN void png_process_some_data PNGARG((png_structp png_ptr,
- png_infop info_ptr));
+ png_infop info_ptr));
PNG_EXTERN void png_read_push_finish_row PNGARG((png_structp png_ptr));
-#ifdef PNG_READ_tEXt_SUPPORTED
+# ifdef PNG_READ_tEXt_SUPPORTED
PNG_EXTERN void png_push_handle_tEXt PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
+ png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_tEXt PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-#endif
-#ifdef PNG_READ_zTXt_SUPPORTED
+ png_infop info_ptr));
+# endif
+# ifdef PNG_READ_zTXt_SUPPORTED
PNG_EXTERN void png_push_handle_zTXt PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
+ png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_zTXt PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-#endif
-#ifdef PNG_READ_iTXt_SUPPORTED
+ png_infop info_ptr));
+# endif
+# ifdef PNG_READ_iTXt_SUPPORTED
PNG_EXTERN void png_push_handle_iTXt PNGARG((png_structp png_ptr,
- png_infop info_ptr, png_uint_32 length));
+ png_infop info_ptr, png_uint_32 length));
PNG_EXTERN void png_push_read_iTXt PNGARG((png_structp png_ptr,
- png_infop info_ptr));
-#endif
+ png_infop info_ptr));
+# endif
#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
#ifdef PNG_MNG_FEATURES_SUPPORTED
PNG_EXTERN void png_do_read_intrapixel PNGARG((png_row_infop row_info,
- png_bytep row));
+ png_bytep row));
PNG_EXTERN void png_do_write_intrapixel PNGARG((png_row_infop row_info,
- png_bytep row));
+ png_bytep row));
#endif
/* Added at libpng version 1.4.0 */
-#ifdef PNG_cHRM_SUPPORTED
+#ifdef PNG_CHECK_cHRM_SUPPORTED
PNG_EXTERN int png_check_cHRM_fixed PNGARG((png_structp png_ptr,
- png_fixed_point int_white_x, png_fixed_point int_white_y,
- png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
- int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
- png_fixed_point int_blue_y));
+ png_fixed_point int_white_x, png_fixed_point int_white_y,
+ png_fixed_point int_red_x, png_fixed_point int_red_y, png_fixed_point
+ int_green_x, png_fixed_point int_green_y, png_fixed_point int_blue_x,
+ png_fixed_point int_blue_y));
#endif
-#ifdef PNG_cHRM_SUPPORTED
#ifdef PNG_CHECK_cHRM_SUPPORTED
/* Added at libpng version 1.2.34 and 1.4.0 */
+/* Currently only used by png_check_cHRM_fixed */
PNG_EXTERN void png_64bit_product PNGARG((long v1, long v2,
- unsigned long *hi_product, unsigned long *lo_product));
-#endif
+ unsigned long *hi_product, unsigned long *lo_product));
#endif
/* Added at libpng version 1.4.0 */
PNG_EXTERN void png_check_IHDR PNGARG((png_structp png_ptr,
- png_uint_32 width, png_uint_32 height, int bit_depth,
- int color_type, int interlace_type, int compression_type,
- int filter_type));
+ png_uint_32 width, png_uint_32 height, int bit_depth,
+ int color_type, int interlace_type, int compression_type,
+ int filter_type));
/* Free all memory used by the read (old method - NOT DLL EXPORTED) */
-extern void png_read_destroy PNGARG((png_structp png_ptr, png_infop info_ptr,
- png_infop end_info_ptr));
+PNG_EXTERN void png_read_destroy PNGARG((png_structp png_ptr,
+ png_infop info_ptr, png_infop end_info_ptr));
/* Free any memory used in png_ptr struct (old method - NOT DLL EXPORTED) */
-extern void png_write_destroy PNGARG((png_structp png_ptr));
+PNG_EXTERN void png_write_destroy PNGARG((png_structp png_ptr));
#ifdef USE_FAR_KEYWORD /* memory model conversion function */
-extern void *png_far_to_near PNGARG((png_structp png_ptr,png_voidp ptr,
- int check));
+PNG_EXTERN void *png_far_to_near PNGARG((png_structp png_ptr, png_voidp ptr,
+ int check));
#endif /* USE_FAR_KEYWORD */
-/* Define PNG_DEBUG at compile time for debugging information. Higher
- * numbers for PNG_DEBUG mean more debugging information. This has
- * only been added since version 0.95 so it is not implemented throughout
- * libpng yet, but more support will be added as needed.
- */
-#ifdef PNG_DEBUG
-#if (PNG_DEBUG > 0)
-#if !defined(PNG_DEBUG_FILE) && defined(_MSC_VER)
-#include <crtdbg.h>
-#if (PNG_DEBUG > 1)
-#ifndef _DEBUG
-# define _DEBUG
-#endif
-#ifndef png_debug
-#define png_debug(l,m) _RPT0(_CRT_WARN,m PNG_STRING_NEWLINE)
-#endif
-#ifndef png_debug1
-#define png_debug1(l,m,p1) _RPT1(_CRT_WARN,m PNG_STRING_NEWLINE,p1)
-#endif
-#ifndef png_debug2
-#define png_debug2(l,m,p1,p2) _RPT2(_CRT_WARN,m PNG_STRING_NEWLINE,p1,p2)
-#endif
-#endif
-#else /* PNG_DEBUG_FILE || !_MSC_VER */
-#ifndef PNG_DEBUG_FILE
-#define PNG_DEBUG_FILE stderr
-#endif /* PNG_DEBUG_FILE */
-
-#if (PNG_DEBUG > 1)
-/* Note: ["%s"m PNG_STRING_NEWLINE] probably does not work on
- * non-ISO compilers
- */
-# ifdef __STDC__
-# ifndef png_debug
-# define png_debug(l,m) \
- { \
- int num_tabs=l; \
- fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":"")))); \
- }
-# endif
-# ifndef png_debug1
-# define png_debug1(l,m,p1) \
- { \
- int num_tabs=l; \
- fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1); \
- }
-# endif
-# ifndef png_debug2
-# define png_debug2(l,m,p1,p2) \
- { \
- int num_tabs=l; \
- fprintf(PNG_DEBUG_FILE,"%s"m PNG_STRING_NEWLINE,(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))),p1,p2); \
- }
-# endif
-# else /* __STDC __ */
-# ifndef png_debug
-# define png_debug(l,m) \
- { \
- int num_tabs=l; \
- char format[256]; \
- snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
- m,PNG_STRING_NEWLINE); \
- fprintf(PNG_DEBUG_FILE,format); \
- }
-# endif
-# ifndef png_debug1
-# define png_debug1(l,m,p1) \
- { \
- int num_tabs=l; \
- char format[256]; \
- snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
- m,PNG_STRING_NEWLINE); \
- fprintf(PNG_DEBUG_FILE,format,p1); \
- }
-# endif
-# ifndef png_debug2
-# define png_debug2(l,m,p1,p2) \
- { \
- int num_tabs=l; \
- char format[256]; \
- snprintf(format,256,"%s%s%s",(num_tabs==1 ? "\t" : \
- (num_tabs==2 ? "\t\t":(num_tabs>2 ? "\t\t\t":""))), \
- m,PNG_STRING_NEWLINE); \
- fprintf(PNG_DEBUG_FILE,format,p1,p2); \
- }
-# endif
-# endif /* __STDC __ */
-#endif /* (PNG_DEBUG > 1) */
+#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_ERROR_TEXT_SUPPORTED)
+PNG_EXTERN PNG_FUNCTION(void, png_fixed_error, (png_structp png_ptr,
+ png_const_charp name),PNG_NORETURN);
+#endif
+
+/* ASCII to FP interfaces, currently only implemented if sCAL
+ * support is required.
+ */
+#if defined(PNG_READ_sCAL_SUPPORTED)
+/* MAX_DIGITS is actually the maximum number of characters in an sCAL
+ * width or height, derived from the precision (number of significant
+ * digits - a build time settable option) and assumpitions about the
+ * maximum ridiculous exponent.
+ */
+#define PNG_sCAL_MAX_DIGITS (PNG_sCAL_PRECISION+1/*.*/+1/*E*/+10/*exponent*/)
+
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+PNG_EXTERN void png_ascii_from_fp PNGARG((png_structp png_ptr, png_charp ascii,
+ png_size_t size, double fp, unsigned int precision));
+#endif /* FLOATING_POINT */
+
+#ifdef PNG_FIXED_POINT_SUPPORTED
+PNG_EXTERN void png_ascii_from_fixed PNGARG((png_structp png_ptr,
+ png_charp ascii, png_size_t size, png_fixed_point fp));
+#endif /* FIXED_POINT */
+#endif /* READ_sCAL */
+
+#if defined(PNG_sCAL_SUPPORTED) || defined(PNG_pCAL_SUPPORTED)
+/* An internal API to validate the format of a floating point number.
+ * The result is the index of the next character. If the number is
+ * not valid it will be the index of a character in the supposed number.
+ *
+ * The format of a number is defined in the PNG extensions specification
+ * and this API is strictly conformant to that spec, not anyone elses!
+ *
+ * The format as a regular expression is:
+ *
+ * [+-]?[0-9]+.?([Ee][+-]?[0-9]+)?
+ *
+ * or:
+ *
+ * [+-]?.[0-9]+(.[0-9]+)?([Ee][+-]?[0-9]+)?
+ *
+ * The complexity is that either integer or fraction must be present and the
+ * fraction is permitted to have no digits only if the integer is present.
+ *
+ * NOTE: The dangling E problem.
+ * There is a PNG valid floating point number in the following:
+ *
+ * PNG floating point numb1.ers are not greedy.
+ *
+ * Working this out requires *TWO* character lookahead (because of the
+ * sign), the parser does not do this - it will fail at the 'r' - this
+ * doesn't matter for PNG sCAL chunk values, but it requires more care
+ * if the value were ever to be embedded in something more complex. Use
+ * ANSI-C strtod if you need the lookahead.
+ */
+/* State table for the parser. */
+#define PNG_FP_INTEGER 0 /* before or in integer */
+#define PNG_FP_FRACTION 1 /* before or in fraction */
+#define PNG_FP_EXPONENT 2 /* before or in exponent */
+#define PNG_FP_STATE 3 /* mask for the above */
+#define PNG_FP_SAW_SIGN 4 /* Saw +/- in current state */
+#define PNG_FP_SAW_DIGIT 8 /* Saw a digit in current state */
+#define PNG_FP_SAW_DOT 16 /* Saw a dot in current state */
+#define PNG_FP_SAW_E 32 /* Saw an E (or e) in current state */
+#define PNG_FP_SAW_ANY 60 /* Saw any of the above 4 */
+#define PNG_FP_WAS_VALID 64 /* Preceding substring is a valid fp number */
+#define PNG_FP_INVALID 128 /* Available for callers as a distinct value */
+
+/* Result codes for the parser (boolean - true meants ok, false means
+ * not ok yet.)
+ */
+#define PNG_FP_MAYBE 0 /* The number may be valid in the future */
+#define PNG_FP_OK 1 /* The number is valid */
+
+/* The actual parser. This can be called repeatedly, it updates
+ * the index into the string and the state variable (which must
+ * be initialzed to 0). It returns a result code, as above. There
+ * is no point calling the parser any more if it fails to advance to
+ * the end of the string - it is stuck on an invalid character (or
+ * terminated by '\0').
+ *
+ * Note that the pointer will consume an E or even an E+ then leave
+ * a 'maybe' state even though a preceding integer.fraction is valid.
+ * The PNG_FP_WAS_VALID flag indicates that a preceding substring was
+ * a valid number. It's possible to recover from this by calling
+ * the parser again (from the start, with state 0) but with a string
+ * that omits the last character (i.e. set the size to the index of
+ * the problem character.) This has not been tested within libpng.
+ */
+PNG_EXTERN int png_check_fp_number PNGARG((png_const_charp string,
+ png_size_t size, int *statep, png_size_tp whereami));
+
+/* This is the same but it checks a complete string and returns true
+ * only if it just contains a floating point number.
+ */
+PNG_EXTERN int png_check_fp_string PNGARG((png_const_charp string,
+ png_size_t size));
+#endif /* pCAL || sCAL */
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) ||\
+ defined(PNG_INCH_CONVERSIONS_SUPPORTED) || defined(PNG_READ_pHYs_SUPPORTED)
+/* Added at libpng version 1.5.0 */
+/* This is a utility to provide a*times/div (rounded) and indicate
+ * if there is an overflow. The result is a boolean - false (0)
+ * for overflow, true (1) if no overflow, in which case *res
+ * holds the result.
+ */
+PNG_EXTERN int png_muldiv PNGARG((png_fixed_point_p res, png_fixed_point a,
+ png_int_32 times, png_int_32 div));
+#endif
-#endif /* _MSC_VER */
-#endif /* (PNG_DEBUG > 0) */
-#endif /* PNG_DEBUG */
-#ifndef png_debug
-#define png_debug(l, m)
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_INCH_CONVERSIONS_SUPPORTED)
+/* Same deal, but issue a warning on overflow and return 0. */
+PNG_EXTERN png_fixed_point png_muldiv_warn PNGARG((png_structp png_ptr,
+ png_fixed_point a, png_int_32 times, png_int_32 div));
#endif
-#ifndef png_debug1
-#define png_debug1(l, m, p1)
+
+#ifdef PNG_READ_GAMMA_SUPPORTED
+/* Calculate a reciprocal - used for gamma values. This returns
+ * 0 if the argument is 0 in order to maintain an undefined value,
+ * there are no warnings.
+ */
+PNG_EXTERN png_fixed_point png_reciprocal PNGARG((png_fixed_point a));
+
+/* The same but gives a reciprocal of the product of two fixed point
+ * values. Accuracy is suitable for gamma calculations but this is
+ * not exact - use png_muldiv for that.
+ */
+PNG_EXTERN png_fixed_point png_reciprocal2 PNGARG((png_fixed_point a,
+ png_fixed_point b));
#endif
-#ifndef png_debug2
-#define png_debug2(l, m, p1, p2)
+
+#ifdef PNG_READ_GAMMA_SUPPORTED
+/* Internal fixed point gamma correction. These APIs are called as
+ * required to convert single values - they don't need to be fast,
+ * they are not used when processing image pixel values.
+ *
+ * While the input is an 'unsigned' value it must actually be the
+ * correct bit value - 0..255 or 0..65535 as required.
+ */
+PNG_EXTERN png_uint_16 png_gamma_correct PNGARG((png_structp png_ptr,
+ unsigned int value, png_fixed_point gamma));
+PNG_EXTERN int png_gamma_significant PNGARG((png_fixed_point gamma));
+PNG_EXTERN png_uint_16 png_gamma_16bit_correct PNGARG((unsigned int value,
+ png_fixed_point gamma));
+PNG_EXTERN png_byte png_gamma_8bit_correct PNGARG((unsigned int value,
+ png_fixed_point gamma));
+PNG_EXTERN void png_build_gamma_table PNGARG((png_structp png_ptr,
+ int bit_depth));
#endif
/* Maintainer: Put new private prototypes here ^ and in libpngpf.3 */
+
+#include "pngdebug.h"
+
#ifdef __cplusplus
}
#endif
-#endif /* PNG_VERSION_INFO_ONLY */
#endif /* PNGPRIV_H */
diff --git a/src/3rdparty/libpng/pngread.c b/src/3rdparty/libpng/pngread.c
index 1b3a3f5..2c8f2cd 100644
--- a/src/3rdparty/libpng/pngread.c
+++ b/src/3rdparty/libpng/pngread.c
@@ -1,8 +1,8 @@
/* pngread.c - read a PNG file
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [$RDATE%]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -14,28 +14,28 @@
* read a PNG file or stream.
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
+#ifdef PNG_READ_SUPPORTED
/* Create a PNG structure for reading, and allocate any memory needed. */
-png_structp PNGAPI
-png_create_read_struct(png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn)
+PNG_FUNCTION(png_structp,PNGAPI
+png_create_read_struct,(png_const_charp user_png_ver, png_voidp error_ptr,
+ png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED)
{
#ifdef PNG_USER_MEM_SUPPORTED
return (png_create_read_struct_2(user_png_ver, error_ptr, error_fn,
- warn_fn, NULL, NULL, NULL));
+ warn_fn, NULL, NULL, NULL));
}
-/* Alternate create PNG structure for reading, and allocate any memory needed. */
-png_structp PNGAPI
-png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
- png_malloc_ptr malloc_fn, png_free_ptr free_fn)
+/* Alternate create PNG structure for reading, and allocate any memory
+ * needed.
+ */
+PNG_FUNCTION(png_structp,PNGAPI
+png_create_read_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
+ png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
+ png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED)
{
#endif /* PNG_USER_MEM_SUPPORTED */
@@ -47,7 +47,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
- jmp_buf jmpbuf;
+ jmp_buf png_jmpbuf;
#endif
#endif
@@ -57,7 +57,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#ifdef PNG_USER_MEM_SUPPORTED
png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
- malloc_fn, mem_ptr);
+ malloc_fn, mem_ptr);
#else
png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
#endif
@@ -65,11 +65,19 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
return (NULL);
/* Added at libpng-1.2.6 */
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+#ifdef PNG_USER_LIMITS_SUPPORTED
png_ptr->user_width_max = PNG_USER_WIDTH_MAX;
png_ptr->user_height_max = PNG_USER_HEIGHT_MAX;
- /* Added at libpng-1.4.0 */
+
+# ifdef PNG_USER_CHUNK_CACHE_MAX
+ /* Added at libpng-1.2.43 and 1.4.0 */
png_ptr->user_chunk_cache_max = PNG_USER_CHUNK_CACHE_MAX;
+# endif
+
+# ifdef PNG_SET_USER_CHUNK_MALLOC_MAX
+ /* Added at libpng-1.2.43 and 1.4.1 */
+ png_ptr->user_chunk_malloc_max = PNG_USER_CHUNK_MALLOC_MAX;
+# endif
#endif
#ifdef PNG_SETJMP_SUPPORTED
@@ -77,13 +85,13 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
encounter a png_error() will longjmp here. Since the jmpbuf is
then meaningless we abort instead of returning. */
#ifdef USE_FAR_KEYWORD
- if (setjmp(jmpbuf))
+ if (setjmp(png_jmpbuf))
#else
if (setjmp(png_jmpbuf(png_ptr))) /* Sets longjmp to match setjmp */
#endif
PNG_ABORT();
#ifdef USE_FAR_KEYWORD
- png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf));
+ png_memcpy(png_jmpbuf(png_ptr), png_jmpbuf, png_sizeof(jmp_buf));
#endif
#endif /* PNG_SETJMP_SUPPORTED */
@@ -96,46 +104,47 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
if (user_png_ver)
{
i = 0;
+
do
{
if (user_png_ver[i] != png_libpng_ver[i])
png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
} while (png_libpng_ver[i++]);
- }
- else
- png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
+ }
+ else
+ png_ptr->flags |= PNG_FLAG_LIBRARY_MISMATCH;
- if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
- {
- /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so
- * we must recompile any applications that use any older library version.
- * For versions after libpng 1.0, we will be compatible, so we need
- * only check the first digit.
- */
+
+ if (png_ptr->flags & PNG_FLAG_LIBRARY_MISMATCH)
+ {
+ /* Libpng 0.90 and later are binary incompatible with libpng 0.89, so
+ * we must recompile any applications that use any older library version.
+ * For versions after libpng 1.0, we will be compatible, so we need
+ * only check the first digit.
+ */
if (user_png_ver == NULL || user_png_ver[0] != png_libpng_ver[0] ||
(user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
(user_png_ver[0] == '0' && user_png_ver[2] < '9'))
{
-#ifdef PNG_STDIO_SUPPORTED
+#ifdef PNG_CONSOLE_IO_SUPPORTED
char msg[80];
if (user_png_ver)
{
- png_snprintf(msg, 80,
- "Application was compiled with png.h from libpng-%.20s",
- user_png_ver);
- png_warning(png_ptr, msg);
+ png_snprintf2(msg, 80,
+ "Application built with libpng-%.20s"
+ " but running with %.20s",
+ user_png_ver,
+ png_libpng_ver);
+ png_warning(png_ptr, msg);
}
- png_snprintf(msg, 80,
- "Application is running with png.c from libpng-%.20s",
- png_libpng_ver);
- png_warning(png_ptr, msg);
+#else
+ png_warning(png_ptr,
+ "Incompatible libpng version in application and library");
#endif
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
png_ptr->flags = 0;
#endif
- png_warning(png_ptr,
- "Incompatible libpng version in application and library");
png_cleanup_needed = 1;
}
@@ -145,11 +154,12 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
{
/* Initialize zbuf - compression buffer */
png_ptr->zbuf_size = PNG_ZBUF_SIZE;
- png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr,
- png_ptr->zbuf_size);
+ png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr, png_ptr->zbuf_size);
+
if (png_ptr->zbuf == NULL)
- png_cleanup_needed = 1;
+ png_cleanup_needed = 1;
}
+
png_ptr->zstream.zalloc = png_zalloc;
png_ptr->zstream.zfree = png_zfree;
png_ptr->zstream.opaque = (voidpf)png_ptr;
@@ -158,12 +168,24 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
{
switch (inflateInit(&png_ptr->zstream))
{
- case Z_OK: /* Do nothing */ break;
+ case Z_OK:
+ break; /* Do nothing */
+
case Z_MEM_ERROR:
- case Z_STREAM_ERROR: png_warning(png_ptr, "zlib memory error");
- png_cleanup_needed = 1; break;
- case Z_VERSION_ERROR: png_warning(png_ptr, "zlib version error");
- png_cleanup_needed = 1; break;
+ png_warning(png_ptr, "zlib memory error");
+ png_cleanup_needed = 1;
+ break;
+
+ case Z_STREAM_ERROR:
+ png_warning(png_ptr, "zlib stream error");
+ png_cleanup_needed = 1;
+ break;
+
+ case Z_VERSION_ERROR:
+ png_warning(png_ptr, "zlib version error");
+ png_cleanup_needed = 1;
+ break;
+
default: png_warning(png_ptr, "Unknown zlib error");
png_cleanup_needed = 1;
}
@@ -176,7 +198,7 @@ png_create_read_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_ptr->zbuf = NULL;
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2((png_voidp)png_ptr,
- (png_free_ptr)free_fn, (png_voidp)mem_ptr);
+ (png_free_ptr)free_fn, (png_voidp)mem_ptr);
#else
png_destroy_struct((png_voidp)png_ptr);
#endif
@@ -206,34 +228,12 @@ void PNGAPI
png_read_info(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_read_info");
-
+
if (png_ptr == NULL || info_ptr == NULL)
return;
-
- /* If we haven't checked all of the PNG signature bytes, do so now. */
- if (png_ptr->sig_bytes < 8)
- {
- png_size_t num_checked = png_ptr->sig_bytes,
- num_to_check = 8 - num_checked;
-
-#ifdef PNG_IO_STATE_SUPPORTED
- png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE;
-#endif
- png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check);
- png_ptr->sig_bytes = 8;
-
- if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
- {
- if (num_checked < 4 &&
- png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
- png_error(png_ptr, "Not a PNG file");
- else
- png_error(png_ptr, "PNG file corrupted by ASCII conversion");
- }
- if (num_checked < 3)
- png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
- }
+ /* Read and check the PNG file signature. */
+ png_read_sig(png_ptr, info_ptr);
for (;;)
{
@@ -299,114 +299,141 @@ png_read_info(png_structp png_ptr, png_infop info_ptr)
* matching the chunk name rather than a linear search.
*/
if (!png_memcmp(chunk_name, png_IDAT, 4))
- if (png_ptr->mode & PNG_AFTER_IDAT)
- png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
+ if (png_ptr->mode & PNG_AFTER_IDAT)
+ png_ptr->mode |= PNG_HAVE_CHUNK_AFTER_IDAT;
if (!png_memcmp(chunk_name, png_IHDR, 4))
png_handle_IHDR(png_ptr, info_ptr, length);
+
else if (!png_memcmp(chunk_name, png_IEND, 4))
png_handle_IEND(png_ptr, info_ptr, length);
+
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
else if (png_handle_as_unknown(png_ptr, chunk_name))
{
if (!png_memcmp(chunk_name, png_IDAT, 4))
png_ptr->mode |= PNG_HAVE_IDAT;
+
png_handle_unknown(png_ptr, info_ptr, length);
+
if (!png_memcmp(chunk_name, png_PLTE, 4))
png_ptr->mode |= PNG_HAVE_PLTE;
+
else if (!png_memcmp(chunk_name, png_IDAT, 4))
{
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before IDAT");
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
- !(png_ptr->mode & PNG_HAVE_PLTE))
+ !(png_ptr->mode & PNG_HAVE_PLTE))
png_error(png_ptr, "Missing PLTE before IDAT");
+
break;
}
}
#endif
else if (!png_memcmp(chunk_name, png_PLTE, 4))
png_handle_PLTE(png_ptr, info_ptr, length);
+
else if (!png_memcmp(chunk_name, png_IDAT, 4))
{
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before IDAT");
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
- !(png_ptr->mode & PNG_HAVE_PLTE))
+ !(png_ptr->mode & PNG_HAVE_PLTE))
png_error(png_ptr, "Missing PLTE before IDAT");
png_ptr->idat_size = length;
png_ptr->mode |= PNG_HAVE_IDAT;
break;
}
+
#ifdef PNG_READ_bKGD_SUPPORTED
else if (!png_memcmp(chunk_name, png_bKGD, 4))
png_handle_bKGD(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_cHRM_SUPPORTED
else if (!png_memcmp(chunk_name, png_cHRM, 4))
png_handle_cHRM(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_gAMA_SUPPORTED
else if (!png_memcmp(chunk_name, png_gAMA, 4))
png_handle_gAMA(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_hIST_SUPPORTED
else if (!png_memcmp(chunk_name, png_hIST, 4))
png_handle_hIST(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_oFFs_SUPPORTED
else if (!png_memcmp(chunk_name, png_oFFs, 4))
png_handle_oFFs(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_pCAL_SUPPORTED
else if (!png_memcmp(chunk_name, png_pCAL, 4))
png_handle_pCAL(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_sCAL_SUPPORTED
else if (!png_memcmp(chunk_name, png_sCAL, 4))
png_handle_sCAL(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_pHYs_SUPPORTED
else if (!png_memcmp(chunk_name, png_pHYs, 4))
png_handle_pHYs(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_sBIT_SUPPORTED
else if (!png_memcmp(chunk_name, png_sBIT, 4))
png_handle_sBIT(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_sRGB_SUPPORTED
else if (!png_memcmp(chunk_name, png_sRGB, 4))
png_handle_sRGB(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_iCCP_SUPPORTED
else if (!png_memcmp(chunk_name, png_iCCP, 4))
png_handle_iCCP(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_sPLT_SUPPORTED
else if (!png_memcmp(chunk_name, png_sPLT, 4))
png_handle_sPLT(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_tEXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_tEXt, 4))
png_handle_tEXt(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_tIME_SUPPORTED
else if (!png_memcmp(chunk_name, png_tIME, 4))
png_handle_tIME(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_tRNS_SUPPORTED
else if (!png_memcmp(chunk_name, png_tRNS, 4))
png_handle_tRNS(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_zTXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_zTXt, 4))
png_handle_zTXt(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_iTXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_iTXt, 4))
png_handle_iTXt(png_ptr, info_ptr, length);
#endif
+
else
png_handle_unknown(png_ptr, info_ptr, length);
}
@@ -418,14 +445,17 @@ void PNGAPI
png_read_update_info(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_read_update_info");
-
+
if (png_ptr == NULL)
return;
+
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
+
else
png_warning(png_ptr,
- "Ignoring extra png_read_update_info() call; row buffer not reallocated");
+ "Ignoring extra png_read_update_info() call;"
+ " row buffer not reallocated");
png_read_transform_info(png_ptr, info_ptr);
}
@@ -440,11 +470,16 @@ void PNGAPI
png_start_read_image(png_structp png_ptr)
{
png_debug(1, "in png_start_read_image");
-
+
if (png_ptr == NULL)
return;
+
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
+ else
+ png_warning(png_ptr,
+ "Ignoring extra png_start_read_image() call;"
+ " row buffer not reallocated");
}
#endif /* PNG_SEQUENTIAL_READ_SUPPORTED */
@@ -454,18 +489,19 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
{
PNG_IDAT;
PNG_CONST int png_pass_dsp_mask[7] = {0xff, 0x0f, 0xff, 0x33, 0xff, 0x55,
- 0xff};
+ 0xff};
PNG_CONST int png_pass_mask[7] = {0x80, 0x08, 0x88, 0x22, 0xaa, 0x55, 0xff};
int ret;
-
+
if (png_ptr == NULL)
return;
-
+
png_debug2(1, "in png_read_row (row %lu, pass %d)",
- (unsigned long) png_ptr->row_number, png_ptr->pass);
+ (unsigned long)png_ptr->row_number, png_ptr->pass);
if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
png_read_start_row(png_ptr);
+
if (png_ptr->row_number == 0 && png_ptr->pass == 0)
{
/* Check for transforms that have been set but were defined out */
@@ -473,26 +509,33 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
if (png_ptr->transformations & PNG_INVERT_MONO)
png_warning(png_ptr, "PNG_READ_INVERT_SUPPORTED is not defined");
#endif
+
#if defined(PNG_WRITE_FILLER_SUPPORTED) && !defined(PNG_READ_FILLER_SUPPORTED)
if (png_ptr->transformations & PNG_FILLER)
png_warning(png_ptr, "PNG_READ_FILLER_SUPPORTED is not defined");
#endif
-#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && !defined(PNG_READ_PACKSWAP_SUPPORTED)
+
+#if defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
+ !defined(PNG_READ_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
png_warning(png_ptr, "PNG_READ_PACKSWAP_SUPPORTED is not defined");
#endif
+
#if defined(PNG_WRITE_PACK_SUPPORTED) && !defined(PNG_READ_PACK_SUPPORTED)
if (png_ptr->transformations & PNG_PACK)
png_warning(png_ptr, "PNG_READ_PACK_SUPPORTED is not defined");
#endif
+
#if defined(PNG_WRITE_SHIFT_SUPPORTED) && !defined(PNG_READ_SHIFT_SUPPORTED)
if (png_ptr->transformations & PNG_SHIFT)
png_warning(png_ptr, "PNG_READ_SHIFT_SUPPORTED is not defined");
#endif
+
#if defined(PNG_WRITE_BGR_SUPPORTED) && !defined(PNG_READ_BGR_SUPPORTED)
if (png_ptr->transformations & PNG_BGR)
png_warning(png_ptr, "PNG_READ_BGR_SUPPORTED is not defined");
#endif
+
#if defined(PNG_WRITE_SWAP_SUPPORTED) && !defined(PNG_READ_SWAP_SUPPORTED)
if (png_ptr->transformations & PNG_SWAP_BYTES)
png_warning(png_ptr, "PNG_READ_SWAP_SUPPORTED is not defined");
@@ -515,42 +558,50 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
return;
}
break;
+
case 1:
if ((png_ptr->row_number & 0x07) || png_ptr->width < 5)
{
if (dsp_row != NULL)
png_combine_row(png_ptr, dsp_row,
- png_pass_dsp_mask[png_ptr->pass]);
+ png_pass_dsp_mask[png_ptr->pass]);
+
png_read_finish_row(png_ptr);
return;
}
break;
+
case 2:
if ((png_ptr->row_number & 0x07) != 4)
{
if (dsp_row != NULL && (png_ptr->row_number & 4))
png_combine_row(png_ptr, dsp_row,
- png_pass_dsp_mask[png_ptr->pass]);
+ png_pass_dsp_mask[png_ptr->pass]);
+
png_read_finish_row(png_ptr);
return;
}
break;
+
case 3:
if ((png_ptr->row_number & 3) || png_ptr->width < 3)
{
if (dsp_row != NULL)
png_combine_row(png_ptr, dsp_row,
- png_pass_dsp_mask[png_ptr->pass]);
+ png_pass_dsp_mask[png_ptr->pass]);
+
png_read_finish_row(png_ptr);
return;
}
break;
+
case 4:
if ((png_ptr->row_number & 3) != 2)
{
if (dsp_row != NULL && (png_ptr->row_number & 2))
png_combine_row(png_ptr, dsp_row,
- png_pass_dsp_mask[png_ptr->pass]);
+ png_pass_dsp_mask[png_ptr->pass]);
+
png_read_finish_row(png_ptr);
return;
}
@@ -560,11 +611,14 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
{
if (dsp_row != NULL)
png_combine_row(png_ptr, dsp_row,
- png_pass_dsp_mask[png_ptr->pass]);
+ png_pass_dsp_mask[png_ptr->pass]);
+
png_read_finish_row(png_ptr);
return;
}
break;
+
+ default:
case 6:
if (!(png_ptr->row_number & 1))
{
@@ -580,7 +634,10 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
png_error(png_ptr, "Invalid attempt to read row data");
png_ptr->zstream.next_out = png_ptr->row_buf;
- png_ptr->zstream.avail_out = (uInt)png_ptr->irowbytes;
+ png_ptr->zstream.avail_out =
+ (uInt)(PNG_ROWBYTES(png_ptr->pixel_depth,
+ png_ptr->iwidth) + 1);
+
do
{
if (!(png_ptr->zstream.avail_in))
@@ -598,10 +655,12 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
if (png_ptr->zbuf_size > png_ptr->idat_size)
png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size;
png_crc_read(png_ptr, png_ptr->zbuf,
- (png_size_t)png_ptr->zstream.avail_in);
+ (png_size_t)png_ptr->zstream.avail_in);
png_ptr->idat_size -= png_ptr->zstream.avail_in;
}
+
ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
+
if (ret == Z_STREAM_END)
{
if (png_ptr->zstream.avail_out || png_ptr->zstream.avail_in ||
@@ -611,9 +670,10 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
break;
}
+
if (ret != Z_OK)
png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :
- "Decompression error");
+ "Decompression error");
} while (png_ptr->zstream.avail_out);
@@ -627,14 +687,14 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
if (png_ptr->row_buf[0])
png_read_filter_row(png_ptr, &(png_ptr->row_info),
- png_ptr->row_buf + 1, png_ptr->prev_row + 1,
- (int)(png_ptr->row_buf[0]));
+ png_ptr->row_buf + 1, png_ptr->prev_row + 1,
+ (int)(png_ptr->row_buf[0]));
png_memcpy(png_ptr->prev_row, png_ptr->row_buf, png_ptr->rowbytes + 1);
#ifdef PNG_MNG_FEATURES_SUPPORTED
if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
- (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
+ (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
{
/* Intrapixel differencing */
png_do_read_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1);
@@ -658,17 +718,18 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
png_do_read_interlace(png_ptr);
if (dsp_row != NULL)
- png_combine_row(png_ptr, dsp_row,
- png_pass_dsp_mask[png_ptr->pass]);
+ png_combine_row(png_ptr, dsp_row, png_pass_dsp_mask[png_ptr->pass]);
+
if (row != NULL)
- png_combine_row(png_ptr, row,
- png_pass_mask[png_ptr->pass]);
+ png_combine_row(png_ptr, row, png_pass_mask[png_ptr->pass]);
}
+
else
#endif
{
if (row != NULL)
png_combine_row(png_ptr, row, 0xff);
+
if (dsp_row != NULL)
png_combine_row(png_ptr, dsp_row, 0xff);
}
@@ -706,16 +767,17 @@ png_read_row(png_structp png_ptr, png_bytep row, png_bytep dsp_row)
void PNGAPI
png_read_rows(png_structp png_ptr, png_bytepp row,
- png_bytepp display_row, png_uint_32 num_rows)
+ png_bytepp display_row, png_uint_32 num_rows)
{
png_uint_32 i;
png_bytepp rp;
png_bytepp dp;
png_debug(1, "in png_read_rows");
-
+
if (png_ptr == NULL)
return;
+
rp = row;
dp = display_row;
if (rp != NULL && dp != NULL)
@@ -726,6 +788,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
png_read_row(png_ptr, rptr, dptr);
}
+
else if (rp != NULL)
for (i = 0; i < num_rows; i++)
{
@@ -733,6 +796,7 @@ png_read_rows(png_structp png_ptr, png_bytepp row,
png_read_row(png_ptr, rptr, NULL);
rp++;
}
+
else if (dp != NULL)
for (i = 0; i < num_rows; i++)
{
@@ -764,22 +828,45 @@ png_read_image(png_structp png_ptr, png_bytepp image)
png_bytepp rp;
png_debug(1, "in png_read_image");
-
+
if (png_ptr == NULL)
return;
#ifdef PNG_READ_INTERLACING_SUPPORTED
- pass = png_set_interlace_handling(png_ptr);
+ if (!(png_ptr->flags & PNG_FLAG_ROW_INIT))
+ {
+ pass = png_set_interlace_handling(png_ptr);
+ /* And make sure transforms are initialized. */
+ png_start_read_image(png_ptr);
+ }
+ else
+ {
+ if (png_ptr->interlaced && !(png_ptr->transformations & PNG_INTERLACE))
+ {
+ /* Caller called png_start_read_image or png_read_update_info without
+ * first turning on the PNG_INTERLACE transform. We can fix this here,
+ * but the caller should do it!
+ */
+ png_warning(png_ptr, "Interlace handling should be turned on when "
+ "using png_read_image");
+ /* Make sure this is set correctly */
+ png_ptr->num_rows = png_ptr->height;
+ }
+
+ /* Obtain the pass number, which also turns on the PNG_INTERLACE flag in
+ * the above error case.
+ */
+ pass = png_set_interlace_handling(png_ptr);
+ }
#else
if (png_ptr->interlaced)
png_error(png_ptr,
- "Cannot read interlaced image -- interlace handler disabled");
+ "Cannot read interlaced image -- interlace handler disabled");
+
pass = 1;
#endif
-
image_height=png_ptr->height;
- png_ptr->num_rows = image_height; /* Make sure this is set correctly */
for (j = 0; j < pass; j++)
{
@@ -802,9 +889,10 @@ void PNGAPI
png_read_end(png_structp png_ptr, png_infop info_ptr)
{
png_debug(1, "in png_read_end");
-
+
if (png_ptr == NULL)
return;
+
png_crc_finish(png_ptr, 0); /* Finish off CRC from last IDAT chunk */
do
@@ -869,8 +957,10 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
if (!png_memcmp(chunk_name, png_IHDR, 4))
png_handle_IHDR(png_ptr, info_ptr, length);
+
else if (!png_memcmp(chunk_name, png_IEND, 4))
png_handle_IEND(png_ptr, info_ptr, length);
+
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
else if (png_handle_as_unknown(png_ptr, chunk_name))
{
@@ -884,6 +974,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
png_ptr->mode |= PNG_HAVE_PLTE;
}
#endif
+
else if (!png_memcmp(chunk_name, png_IDAT, 4))
{
/* Zero length IDATs are legal after the last IDAT has been
@@ -891,78 +982,97 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
*/
if ((length > 0) || (png_ptr->mode & PNG_HAVE_CHUNK_AFTER_IDAT))
png_benign_error(png_ptr, "Too many IDATs found");
+
png_crc_finish(png_ptr, length);
}
else if (!png_memcmp(chunk_name, png_PLTE, 4))
png_handle_PLTE(png_ptr, info_ptr, length);
+
#ifdef PNG_READ_bKGD_SUPPORTED
else if (!png_memcmp(chunk_name, png_bKGD, 4))
png_handle_bKGD(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_cHRM_SUPPORTED
else if (!png_memcmp(chunk_name, png_cHRM, 4))
png_handle_cHRM(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_gAMA_SUPPORTED
else if (!png_memcmp(chunk_name, png_gAMA, 4))
png_handle_gAMA(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_hIST_SUPPORTED
else if (!png_memcmp(chunk_name, png_hIST, 4))
png_handle_hIST(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_oFFs_SUPPORTED
else if (!png_memcmp(chunk_name, png_oFFs, 4))
png_handle_oFFs(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_pCAL_SUPPORTED
else if (!png_memcmp(chunk_name, png_pCAL, 4))
png_handle_pCAL(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_sCAL_SUPPORTED
else if (!png_memcmp(chunk_name, png_sCAL, 4))
png_handle_sCAL(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_pHYs_SUPPORTED
else if (!png_memcmp(chunk_name, png_pHYs, 4))
png_handle_pHYs(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_sBIT_SUPPORTED
else if (!png_memcmp(chunk_name, png_sBIT, 4))
png_handle_sBIT(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_sRGB_SUPPORTED
else if (!png_memcmp(chunk_name, png_sRGB, 4))
png_handle_sRGB(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_iCCP_SUPPORTED
else if (!png_memcmp(chunk_name, png_iCCP, 4))
png_handle_iCCP(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_sPLT_SUPPORTED
else if (!png_memcmp(chunk_name, png_sPLT, 4))
png_handle_sPLT(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_tEXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_tEXt, 4))
png_handle_tEXt(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_tIME_SUPPORTED
else if (!png_memcmp(chunk_name, png_tIME, 4))
png_handle_tIME(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_tRNS_SUPPORTED
else if (!png_memcmp(chunk_name, png_tRNS, 4))
png_handle_tRNS(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_zTXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_zTXt, 4))
png_handle_zTXt(png_ptr, info_ptr, length);
#endif
+
#ifdef PNG_READ_iTXt_SUPPORTED
else if (!png_memcmp(chunk_name, png_iTXt, 4))
png_handle_iTXt(png_ptr, info_ptr, length);
#endif
+
else
png_handle_unknown(png_ptr, info_ptr, length);
} while (!(png_ptr->mode & PNG_HAVE_IEND));
@@ -972,7 +1082,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
/* Free all memory used by the read */
void PNGAPI
png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
- png_infopp end_info_ptr_ptr)
+ png_infopp end_info_ptr_ptr)
{
png_structp png_ptr = NULL;
png_infop info_ptr = NULL, end_info_ptr = NULL;
@@ -982,7 +1092,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
#endif
png_debug(1, "in png_destroy_read_struct");
-
+
if (png_ptr_ptr != NULL)
png_ptr = *png_ptr_ptr;
if (png_ptr == NULL)
@@ -1023,7 +1133,7 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
#endif
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2((png_voidp)end_info_ptr, (png_free_ptr)free_fn,
- (png_voidp)mem_ptr);
+ (png_voidp)mem_ptr);
#else
png_destroy_struct((png_voidp)end_info_ptr);
#endif
@@ -1044,7 +1154,8 @@ png_destroy_read_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr,
/* Free all memory used by the read (old method) */
void /* PRIVATE */
-png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr)
+png_read_destroy(png_structp png_ptr, png_infop info_ptr,
+ png_infop end_info_ptr)
{
#ifdef PNG_SETJMP_SUPPORTED
jmp_buf tmp_jmp;
@@ -1057,7 +1168,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
#endif
png_debug(1, "in png_read_destroy");
-
+
if (info_ptr != NULL)
png_info_destroy(png_ptr, info_ptr);
@@ -1068,31 +1179,38 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
png_free(png_ptr, png_ptr->big_row_buf);
png_free(png_ptr, png_ptr->prev_row);
png_free(png_ptr, png_ptr->chunkdata);
-#ifdef PNG_READ_DITHER_SUPPORTED
+
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
png_free(png_ptr, png_ptr->palette_lookup);
- png_free(png_ptr, png_ptr->dither_index);
+ png_free(png_ptr, png_ptr->quantize_index);
#endif
+
#ifdef PNG_READ_GAMMA_SUPPORTED
png_free(png_ptr, png_ptr->gamma_table);
#endif
+
#ifdef PNG_READ_BACKGROUND_SUPPORTED
png_free(png_ptr, png_ptr->gamma_from_1);
png_free(png_ptr, png_ptr->gamma_to_1);
#endif
+
if (png_ptr->free_me & PNG_FREE_PLTE)
png_zfree(png_ptr, png_ptr->palette);
png_ptr->free_me &= ~PNG_FREE_PLTE;
+
#if defined(PNG_tRNS_SUPPORTED) || \
defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
if (png_ptr->free_me & PNG_FREE_TRNS)
png_free(png_ptr, png_ptr->trans_alpha);
png_ptr->free_me &= ~PNG_FREE_TRNS;
#endif
+
#ifdef PNG_READ_hIST_SUPPORTED
if (png_ptr->free_me & PNG_FREE_HIST)
png_free(png_ptr, png_ptr->hist);
png_ptr->free_me &= ~PNG_FREE_HIST;
#endif
+
#ifdef PNG_READ_GAMMA_SUPPORTED
if (png_ptr->gamma_16_table != NULL)
{
@@ -1104,6 +1222,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
}
png_free(png_ptr, png_ptr->gamma_16_table);
}
+
#ifdef PNG_READ_BACKGROUND_SUPPORTED
if (png_ptr->gamma_16_from_1 != NULL)
{
@@ -1127,11 +1246,13 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
}
#endif
#endif
+
#ifdef PNG_TIME_RFC1123_SUPPORTED
png_free(png_ptr, png_ptr->time_buffer);
#endif
inflateEnd(&png_ptr->zstream);
+
#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
png_free(png_ptr, png_ptr->save_buffer);
#endif
@@ -1146,7 +1267,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
* being used again.
*/
#ifdef PNG_SETJMP_SUPPORTED
- png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf));
+ png_memcpy(tmp_jmp, png_ptr->png_jmpbuf, png_sizeof(jmp_buf));
#endif
error_fn = png_ptr->error_fn;
@@ -1166,7 +1287,7 @@ png_read_destroy(png_structp png_ptr, png_infop info_ptr, png_infop end_info_ptr
#endif
#ifdef PNG_SETJMP_SUPPORTED
- png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf));
+ png_memcpy(png_ptr->png_jmpbuf, tmp_jmp, png_sizeof(jmp_buf));
#endif
}
@@ -1176,6 +1297,7 @@ png_set_read_status_fn(png_structp png_ptr, png_read_status_ptr read_row_fn)
{
if (png_ptr == NULL)
return;
+
png_ptr->read_row_fn = read_row_fn;
}
@@ -1245,7 +1367,7 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
png_set_expand(png_ptr);
#endif
- /* We don't handle background color or gamma transformation or dithering.
+ /* We don't handle background color or gamma transformation or quantizing.
*/
#ifdef PNG_READ_INVERT_SUPPORTED
@@ -1271,40 +1393,35 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
#endif
#ifdef PNG_READ_BGR_SUPPORTED
- /* Flip the RGB pixels to BGR (or RGBA to BGRA)
- */
+ /* Flip the RGB pixels to BGR (or RGBA to BGRA) */
if (transforms & PNG_TRANSFORM_BGR)
png_set_bgr(png_ptr);
#endif
#ifdef PNG_READ_SWAP_ALPHA_SUPPORTED
- /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR)
- */
+ /* Swap the RGBA or GA data to ARGB or AG (or BGRA to ABGR) */
if (transforms & PNG_TRANSFORM_SWAP_ALPHA)
- png_set_swap_alpha(png_ptr);
+ png_set_swap_alpha(png_ptr);
#endif
#ifdef PNG_READ_SWAP_SUPPORTED
- /* Swap bytes of 16 bit files to least significant byte first
- */
+ /* Swap bytes of 16 bit files to least significant byte first */
if (transforms & PNG_TRANSFORM_SWAP_ENDIAN)
png_set_swap(png_ptr);
#endif
/* Added at libpng-1.2.41 */
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
- /* Invert the alpha channel from opacity to transparency
- */
+ /* Invert the alpha channel from opacity to transparency */
if (transforms & PNG_TRANSFORM_INVERT_ALPHA)
- png_set_invert_alpha(png_ptr);
+ png_set_invert_alpha(png_ptr);
#endif
/* Added at libpng-1.2.41 */
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
- /* Expand grayscale image to RGB
- */
+ /* Expand grayscale image to RGB */
if (transforms & PNG_TRANSFORM_GRAY_TO_RGB)
- png_set_gray_to_rgb(png_ptr);
+ png_set_gray_to_rgb(png_ptr);
#endif
/* We don't handle adding filler bytes */
@@ -1320,10 +1437,10 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
if (info_ptr->row_pointers == NULL)
{
- png_uint_32 iptr;
+ png_uint_32 iptr;
info_ptr->row_pointers = (png_bytepp)png_malloc(png_ptr,
- info_ptr->height * png_sizeof(png_bytep));
+ info_ptr->height * png_sizeof(png_bytep));
for (iptr=0; iptr<info_ptr->height; iptr++)
info_ptr->row_pointers[iptr] = NULL;
@@ -1340,8 +1457,8 @@ png_read_png(png_structp png_ptr, png_infop info_ptr,
/* Read rest of file, and get additional chunks in info_ptr - REQUIRED */
png_read_end(png_ptr, info_ptr);
- transforms = transforms; /* Quiet compiler warnings */
- params = params;
+ PNG_UNUSED(transforms) /* Quiet compiler warnings */
+ PNG_UNUSED(params)
}
#endif /* PNG_INFO_IMAGE_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngrio.c b/src/3rdparty/libpng/pngrio.c
index 53f2a45..e9c381c 100644
--- a/src/3rdparty/libpng/pngrio.c
+++ b/src/3rdparty/libpng/pngrio.c
@@ -1,8 +1,8 @@
/* pngrio.c - functions for data input
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -18,11 +18,10 @@
* libpng use it at run time with png_set_read_fn(...).
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
+#ifdef PNG_READ_SUPPORTED
+
/* Read the data from whatever input you are using. The default routine
* reads from a file pointer. Note that this routine sometimes gets called
* with very small lengths, so you should implement some kind of simple
@@ -33,9 +32,10 @@ void /* PRIVATE */
png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_debug1(4, "reading %d bytes", (int)length);
-
+
if (png_ptr->read_data_fn != NULL)
(*(png_ptr->read_data_fn))(png_ptr, data, length);
+
else
png_error(png_ptr, "Call to NULL read function");
}
@@ -46,14 +46,15 @@ png_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
* read_data function and use it at run time with png_set_read_fn(), rather
* than changing the library.
*/
-#ifndef USE_FAR_KEYWORD
-void PNGAPI
+# ifndef USE_FAR_KEYWORD
+void PNGCBAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check;
if (png_ptr == NULL)
return;
+
/* fread() returns 0 on error, so it is OK to store this in a png_size_t
* instead of an int, which is what fread() actually returns.
*/
@@ -62,7 +63,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
if (check != length)
png_error(png_ptr, "Read Error");
}
-#else
+# else
/* This is the model-independent version. Since the standard I/O library
can't handle far buffers in the medium and small models, we have to copy
the data.
@@ -71,7 +72,7 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
-static void PNGAPI
+static void PNGCBAPI
png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check;
@@ -80,46 +81,57 @@ png_default_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
if (png_ptr == NULL)
return;
+
/* Check if data really is near. If so, use usual code. */
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
+
if ((png_bytep)n_data == data)
{
check = fread(n_data, 1, length, io_ptr);
}
+
else
{
png_byte buf[NEAR_BUF_SIZE];
png_size_t read, remaining, err;
check = 0;
remaining = length;
+
do
{
read = MIN(NEAR_BUF_SIZE, remaining);
err = fread(buf, 1, read, io_ptr);
png_memcpy(data, buf, read); /* copy far buffer to near buffer */
+
if (err != read)
break;
+
else
check += err;
+
data += read;
remaining -= read;
}
while (remaining != 0);
}
+
if ((png_uint_32)check != (png_uint_32)length)
png_error(png_ptr, "read Error");
}
-#endif
+# endif
#endif
/* This function allows the application to supply a new input function
* for libpng if standard C streams aren't being used.
*
* This function takes as its arguments:
+ *
* png_ptr - pointer to a png input data structure
+ *
* io_ptr - pointer to user supplied structure containing info about
* the input functions. May be NULL.
+ *
* read_data_fn - pointer to a new input function that takes as its
* arguments a pointer to a png_struct, a pointer to
* a location where input data can be stored, and a 32-bit
@@ -135,11 +147,13 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
{
if (png_ptr == NULL)
return;
+
png_ptr->io_ptr = io_ptr;
#ifdef PNG_STDIO_SUPPORTED
if (read_data_fn != NULL)
png_ptr->read_data_fn = read_data_fn;
+
else
png_ptr->read_data_fn = png_default_read_data;
#else
@@ -151,9 +165,8 @@ png_set_read_fn(png_structp png_ptr, png_voidp io_ptr,
{
png_ptr->write_data_fn = NULL;
png_warning(png_ptr,
- "It's an error to set both read_data_fn and write_data_fn in the ");
- png_warning(png_ptr,
- "same structure. Resetting write_data_fn to NULL");
+ "Can't set both read_data_fn and write_data_fn in the"
+ " same structure");
}
#ifdef PNG_WRITE_FLUSH_SUPPORTED
diff --git a/src/3rdparty/libpng/pngrtran.c b/src/3rdparty/libpng/pngrtran.c
index 30aa5dc..e6e0c46 100644
--- a/src/3rdparty/libpng/pngrtran.c
+++ b/src/3rdparty/libpng/pngrtran.c
@@ -1,8 +1,8 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -16,17 +16,16 @@
* in pngtrans.c.
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
+#ifdef PNG_READ_SUPPORTED
+
/* Set the action on getting a CRC error for an ancillary or critical chunk. */
void PNGAPI
png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
{
png_debug(1, "in png_set_crc_action");
-
+
if (png_ptr == NULL)
return;
@@ -89,18 +88,18 @@ png_set_crc_action(png_structp png_ptr, int crit_action, int ancil_action)
}
}
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) && \
- defined(PNG_FLOATING_POINT_SUPPORTED)
+#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* Handle alpha and tRNS via a background color */
-void PNGAPI
-png_set_background(png_structp png_ptr,
- png_color_16p background_color, int background_gamma_code,
- int need_expand, double background_gamma)
+void PNGFAPI
+png_set_background_fixed(png_structp png_ptr,
+ png_const_color_16p background_color, int background_gamma_code,
+ int need_expand, png_fixed_point background_gamma)
{
- png_debug(1, "in png_set_background");
-
+ png_debug(1, "in png_set_background_fixed");
+
if (png_ptr == NULL)
return;
+
if (background_gamma_code == PNG_BACKGROUND_GAMMA_UNKNOWN)
{
png_warning(png_ptr, "Application must supply a known background gamma");
@@ -110,11 +109,22 @@ png_set_background(png_structp png_ptr,
png_ptr->transformations |= PNG_BACKGROUND;
png_memcpy(&(png_ptr->background), background_color,
png_sizeof(png_color_16));
- png_ptr->background_gamma = (float)background_gamma;
+ png_ptr->background_gamma = background_gamma;
png_ptr->background_gamma_type = (png_byte)(background_gamma_code);
png_ptr->transformations |= (need_expand ? PNG_BACKGROUND_EXPAND : 0);
}
-#endif
+
+# ifdef PNG_FLOATING_POINT_SUPPORTED
+void PNGAPI
+png_set_background(png_structp png_ptr,
+ png_const_color_16p background_color, int background_gamma_code,
+ int need_expand, double background_gamma)
+{
+ png_set_background_fixed(png_ptr, background_color, background_gamma_code,
+ need_expand, png_fixed(png_ptr, background_gamma, "png_set_background"));
+}
+# endif /* FLOATING_POINT */
+#endif /* READ_BACKGROUND */
#ifdef PNG_READ_16_TO_8_SUPPORTED
/* Strip 16 bit depth files to 8 bit depth */
@@ -125,6 +135,7 @@ png_set_strip_16(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_16_TO_8;
}
#endif
@@ -137,17 +148,18 @@ png_set_strip_alpha(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
}
#endif
-#ifdef PNG_READ_DITHER_SUPPORTED
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
/* Dither file to 8 bit. Supply a palette, the current number
* of elements in the palette, the maximum number of elements
* allowed, and a histogram if possible. If the current number
* of colors is greater then the maximum number, the palette will be
- * modified to fit in the maximum number. "full_dither" indicates
- * whether we need a dithering cube set up for RGB images, or if we
+ * modified to fit in the maximum number. "full_quantize" indicates
+ * whether we need a quantizing cube set up for RGB images, or if we
* simply are reducing the number of colors in a paletted image.
*/
@@ -161,24 +173,25 @@ typedef png_dsort FAR * png_dsortp;
typedef png_dsort FAR * FAR * png_dsortpp;
void PNGAPI
-png_set_dither(png_structp png_ptr, png_colorp palette,
- int num_palette, int maximum_colors, png_uint_16p histogram,
- int full_dither)
+png_set_quantize(png_structp png_ptr, png_colorp palette,
+ int num_palette, int maximum_colors, png_const_uint_16p histogram,
+ int full_quantize)
{
- png_debug(1, "in png_set_dither");
+ png_debug(1, "in png_set_quantize");
if (png_ptr == NULL)
return;
- png_ptr->transformations |= PNG_DITHER;
- if (!full_dither)
+ png_ptr->transformations |= PNG_QUANTIZE;
+
+ if (!full_quantize)
{
int i;
- png_ptr->dither_index = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(num_palette * png_sizeof(png_byte)));
+ png_ptr->quantize_index = (png_bytep)png_malloc(png_ptr,
+ (png_uint_32)(num_palette * png_sizeof(png_byte)));
for (i = 0; i < num_palette; i++)
- png_ptr->dither_index[i] = (png_byte)i;
+ png_ptr->quantize_index[i] = (png_byte)i;
}
if (num_palette > maximum_colors)
@@ -192,12 +205,12 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
int i;
/* Initialize an array to sort colors */
- png_ptr->dither_sort = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(num_palette * png_sizeof(png_byte)));
+ png_ptr->quantize_sort = (png_bytep)png_malloc(png_ptr,
+ (png_uint_32)(num_palette * png_sizeof(png_byte)));
- /* Initialize the dither_sort array */
+ /* Initialize the quantize_sort array */
for (i = 0; i < num_palette; i++)
- png_ptr->dither_sort[i] = (png_byte)i;
+ png_ptr->quantize_sort[i] = (png_byte)i;
/* Find the least used palette entries by starting a
* bubble sort, and running it until we have sorted
@@ -214,23 +227,24 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
done = 1;
for (j = 0; j < i; j++)
{
- if (histogram[png_ptr->dither_sort[j]]
- < histogram[png_ptr->dither_sort[j + 1]])
+ if (histogram[png_ptr->quantize_sort[j]]
+ < histogram[png_ptr->quantize_sort[j + 1]])
{
png_byte t;
- t = png_ptr->dither_sort[j];
- png_ptr->dither_sort[j] = png_ptr->dither_sort[j + 1];
- png_ptr->dither_sort[j + 1] = t;
+ t = png_ptr->quantize_sort[j];
+ png_ptr->quantize_sort[j] = png_ptr->quantize_sort[j + 1];
+ png_ptr->quantize_sort[j + 1] = t;
done = 0;
}
}
+
if (done)
break;
}
/* Swap the palette around, and set up a table, if necessary */
- if (full_dither)
+ if (full_quantize)
{
int j = num_palette;
@@ -239,11 +253,12 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
*/
for (i = 0; i < maximum_colors; i++)
{
- if ((int)png_ptr->dither_sort[i] >= maximum_colors)
+ if ((int)png_ptr->quantize_sort[i] >= maximum_colors)
{
do
j--;
- while ((int)png_ptr->dither_sort[j] >= maximum_colors);
+ while ((int)png_ptr->quantize_sort[j] >= maximum_colors);
+
palette[i] = palette[j];
}
}
@@ -258,32 +273,32 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
for (i = 0; i < maximum_colors; i++)
{
/* Only move the colors we need to */
- if ((int)png_ptr->dither_sort[i] >= maximum_colors)
+ if ((int)png_ptr->quantize_sort[i] >= maximum_colors)
{
png_color tmp_color;
do
j--;
- while ((int)png_ptr->dither_sort[j] >= maximum_colors);
+ while ((int)png_ptr->quantize_sort[j] >= maximum_colors);
tmp_color = palette[j];
palette[j] = palette[i];
palette[i] = tmp_color;
/* Indicate where the color went */
- png_ptr->dither_index[j] = (png_byte)i;
- png_ptr->dither_index[i] = (png_byte)j;
+ png_ptr->quantize_index[j] = (png_byte)i;
+ png_ptr->quantize_index[i] = (png_byte)j;
}
}
/* Find closest color for those colors we are not using */
for (i = 0; i < num_palette; i++)
{
- if ((int)png_ptr->dither_index[i] >= maximum_colors)
+ if ((int)png_ptr->quantize_index[i] >= maximum_colors)
{
int min_d, k, min_k, d_index;
/* Find the closest color to one we threw out */
- d_index = png_ptr->dither_index[i];
+ d_index = png_ptr->quantize_index[i];
min_d = PNG_COLOR_DIST(palette[d_index], palette[0]);
for (k = 1, min_k = 0; k < maximum_colors; k++)
{
@@ -298,12 +313,12 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
}
}
/* Point to closest color */
- png_ptr->dither_index[i] = (png_byte)min_k;
+ png_ptr->quantize_index[i] = (png_byte)min_k;
}
}
}
- png_free(png_ptr, png_ptr->dither_sort);
- png_ptr->dither_sort = NULL;
+ png_free(png_ptr, png_ptr->quantize_sort);
+ png_ptr->quantize_sort = NULL;
}
else
{
@@ -325,9 +340,9 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
/* Initialize palette index arrays */
png_ptr->index_to_palette = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(num_palette * png_sizeof(png_byte)));
+ (png_uint_32)(num_palette * png_sizeof(png_byte)));
png_ptr->palette_to_index = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(num_palette * png_sizeof(png_byte)));
+ (png_uint_32)(num_palette * png_sizeof(png_byte)));
/* Initialize the sort array */
for (i = 0; i < num_palette; i++)
@@ -337,7 +352,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
}
hash = (png_dsortpp)png_calloc(png_ptr, (png_uint_32)(769 *
- png_sizeof(png_dsortp)));
+ png_sizeof(png_dsortp)));
num_new_palette = num_palette;
@@ -368,8 +383,10 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
t = (png_dsortp)png_malloc_warn(png_ptr,
(png_uint_32)(png_sizeof(png_dsort)));
+
if (t == NULL)
break;
+
t->next = hash[d];
t->left = (png_byte)i;
t->right = (png_byte)j;
@@ -390,9 +407,9 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
for (p = hash[i]; p; p = p->next)
{
if ((int)png_ptr->index_to_palette[p->left]
- < num_new_palette &&
- (int)png_ptr->index_to_palette[p->right]
- < num_new_palette)
+ < num_new_palette &&
+ (int)png_ptr->index_to_palette[p->right]
+ < num_new_palette)
{
int j, next_j;
@@ -409,31 +426,36 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
num_new_palette--;
palette[png_ptr->index_to_palette[j]]
- = palette[num_new_palette];
- if (!full_dither)
+ = palette[num_new_palette];
+ if (!full_quantize)
{
int k;
for (k = 0; k < num_palette; k++)
{
- if (png_ptr->dither_index[k] ==
- png_ptr->index_to_palette[j])
- png_ptr->dither_index[k] =
- png_ptr->index_to_palette[next_j];
- if ((int)png_ptr->dither_index[k] ==
- num_new_palette)
- png_ptr->dither_index[k] =
- png_ptr->index_to_palette[j];
+ if (png_ptr->quantize_index[k] ==
+ png_ptr->index_to_palette[j])
+ png_ptr->quantize_index[k] =
+ png_ptr->index_to_palette[next_j];
+
+ if ((int)png_ptr->quantize_index[k] ==
+ num_new_palette)
+ png_ptr->quantize_index[k] =
+ png_ptr->index_to_palette[j];
}
}
png_ptr->index_to_palette[png_ptr->palette_to_index
- [num_new_palette]] = png_ptr->index_to_palette[j];
+ [num_new_palette]] = png_ptr->index_to_palette[j];
+
png_ptr->palette_to_index[png_ptr->index_to_palette[j]]
- = png_ptr->palette_to_index[num_new_palette];
+ = png_ptr->palette_to_index[num_new_palette];
+
+ png_ptr->index_to_palette[j] =
+ (png_byte)num_new_palette;
- png_ptr->index_to_palette[j] = (png_byte)num_new_palette;
- png_ptr->palette_to_index[num_new_palette] = (png_byte)j;
+ png_ptr->palette_to_index[num_new_palette] =
+ (png_byte)j;
}
if (num_new_palette <= maximum_colors)
break;
@@ -473,36 +495,38 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
}
png_ptr->num_palette = (png_uint_16)num_palette;
- if (full_dither)
+ if (full_quantize)
{
int i;
png_bytep distance;
- int total_bits = PNG_DITHER_RED_BITS + PNG_DITHER_GREEN_BITS +
- PNG_DITHER_BLUE_BITS;
- int num_red = (1 << PNG_DITHER_RED_BITS);
- int num_green = (1 << PNG_DITHER_GREEN_BITS);
- int num_blue = (1 << PNG_DITHER_BLUE_BITS);
+ int total_bits = PNG_QUANTIZE_RED_BITS + PNG_QUANTIZE_GREEN_BITS +
+ PNG_QUANTIZE_BLUE_BITS;
+ int num_red = (1 << PNG_QUANTIZE_RED_BITS);
+ int num_green = (1 << PNG_QUANTIZE_GREEN_BITS);
+ int num_blue = (1 << PNG_QUANTIZE_BLUE_BITS);
png_size_t num_entries = ((png_size_t)1 << total_bits);
- png_ptr->palette_lookup = (png_bytep )png_calloc(png_ptr,
- (png_uint_32)(num_entries * png_sizeof(png_byte)));
+ png_ptr->palette_lookup = (png_bytep)png_calloc(png_ptr,
+ (png_uint_32)(num_entries * png_sizeof(png_byte)));
distance = (png_bytep)png_malloc(png_ptr, (png_uint_32)(num_entries *
- png_sizeof(png_byte)));
+ png_sizeof(png_byte)));
+
png_memset(distance, 0xff, num_entries * png_sizeof(png_byte));
for (i = 0; i < num_palette; i++)
{
int ir, ig, ib;
- int r = (palette[i].red >> (8 - PNG_DITHER_RED_BITS));
- int g = (palette[i].green >> (8 - PNG_DITHER_GREEN_BITS));
- int b = (palette[i].blue >> (8 - PNG_DITHER_BLUE_BITS));
+ int r = (palette[i].red >> (8 - PNG_QUANTIZE_RED_BITS));
+ int g = (palette[i].green >> (8 - PNG_QUANTIZE_GREEN_BITS));
+ int b = (palette[i].blue >> (8 - PNG_QUANTIZE_BLUE_BITS));
for (ir = 0; ir < num_red; ir++)
{
/* int dr = abs(ir - r); */
int dr = ((ir > r) ? ir - r : r - ir);
- int index_r = (ir << (PNG_DITHER_BLUE_BITS + PNG_DITHER_GREEN_BITS));
+ int index_r = (ir << (PNG_QUANTIZE_BLUE_BITS +
+ PNG_QUANTIZE_GREEN_BITS));
for (ig = 0; ig < num_green; ig++)
{
@@ -510,7 +534,7 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
int dg = ((ig > g) ? ig - g : g - ig);
int dt = dr + dg;
int dm = ((dr > dg) ? dr : dg);
- int index_g = index_r | (ig << PNG_DITHER_BLUE_BITS);
+ int index_g = index_r | (ig << PNG_QUANTIZE_BLUE_BITS);
for (ib = 0; ib < num_blue; ib++)
{
@@ -533,9 +557,9 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
png_free(png_ptr, distance);
}
}
-#endif
+#endif /* PNG_READ_QUANTIZE_SUPPORTED */
-#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
/* Transform the image from the file_gamma to the screen_gamma. We
* only do transformations on images where the file_gamma and screen_gamma
* are not close reciprocals, otherwise it slows things down slightly, and
@@ -545,22 +569,48 @@ png_set_dither(png_structp png_ptr, png_colorp palette,
* are present in the tRNS array for palette images. We can't do it here
* because we don't necessarily have the tRNS chunk yet.
*/
-void PNGAPI
-png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
+static int /* PRIVATE */
+png_gamma_threshold(png_fixed_point scrn_gamma, png_fixed_point file_gamma)
{
- png_debug(1, "in png_set_gamma");
+ /* PNG_GAMMA_THRESHOLD is the threshold for performing gamma
+ * correction as a difference of the overall transform from 1.0
+ *
+ * We want to compare the threshold with s*f - 1, if we get
+ * overflow here it is because of wacky gamma values so we
+ * turn on processing anyway.
+ */
+ png_fixed_point gtest;
+ return !png_muldiv(&gtest, scrn_gamma, file_gamma, PNG_FP_1) ||
+ png_gamma_significant(gtest);
+}
+
+void PNGFAPI
+png_set_gamma_fixed(png_structp png_ptr, png_fixed_point scrn_gamma,
+ png_fixed_point file_gamma)
+{
+ png_debug(1, "in png_set_gamma_fixed");
if (png_ptr == NULL)
return;
- if ((fabs(scrn_gamma * file_gamma - 1.0) > PNG_GAMMA_THRESHOLD) ||
- (png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||
- (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE))
- png_ptr->transformations |= PNG_GAMMA;
- png_ptr->gamma = (float)file_gamma;
- png_ptr->screen_gamma = (float)scrn_gamma;
+ if ((png_ptr->color_type & PNG_COLOR_MASK_ALPHA) ||
+ (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE) ||
+ png_gamma_threshold(scrn_gamma, file_gamma))
+ png_ptr->transformations |= PNG_GAMMA;
+ png_ptr->gamma = file_gamma;
+ png_ptr->screen_gamma = scrn_gamma;
}
-#endif
+
+# ifdef PNG_FLOATING_POINT_SUPPORTED
+void PNGAPI
+png_set_gamma(png_structp png_ptr, double scrn_gamma, double file_gamma)
+{
+ png_set_gamma_fixed(png_ptr,
+ png_fixed(png_ptr, scrn_gamma, "png_set_gamma screen gamma"),
+ png_fixed(png_ptr, file_gamma, "png_set_gamma file gamma"));
+}
+# endif /* FLOATING_POINT_SUPPORTED */
+#endif /* READ_GAMMA */
#ifdef PNG_READ_EXPAND_SUPPORTED
/* Expand paletted images to RGB, expand grayscale images of
@@ -642,32 +692,20 @@ png_set_gray_to_rgb(png_structp png_ptr)
{
png_debug(1, "in png_set_gray_to_rgb");
- png_ptr->transformations |= PNG_GRAY_TO_RGB;
- png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
+ if (png_ptr != NULL)
+ {
+ /* Because rgb must be 8 bits or more: */
+ png_set_expand_gray_1_2_4_to_8(png_ptr);
+ png_ptr->transformations |= PNG_GRAY_TO_RGB;
+ png_ptr->flags &= ~PNG_FLAG_ROW_INIT;
+ }
}
#endif
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-/* Convert a RGB image to a grayscale of the same width. This allows us,
- * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image.
- */
-
-void PNGAPI
-png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red,
- double green)
-{
- int red_fixed = (int)((float)red*100000.0 + 0.5);
- int green_fixed = (int)((float)green*100000.0 + 0.5);
- if (png_ptr == NULL)
- return;
- png_set_rgb_to_gray_fixed(png_ptr, error_action, red_fixed, green_fixed);
-}
-#endif
-
-void PNGAPI
+void PNGFAPI
png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
- png_fixed_point red, png_fixed_point green)
+ png_fixed_point red, png_fixed_point green)
{
png_debug(1, "in png_set_rgb_to_gray");
@@ -676,13 +714,21 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
switch(error_action)
{
- case 1: png_ptr->transformations |= PNG_RGB_TO_GRAY;
- break;
+ case 1:
+ png_ptr->transformations |= PNG_RGB_TO_GRAY;
+ break;
- case 2: png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN;
- break;
+ case 2:
+ png_ptr->transformations |= PNG_RGB_TO_GRAY_WARN;
+ break;
- case 3: png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR;
+ case 3:
+ png_ptr->transformations |= PNG_RGB_TO_GRAY_ERR;
+ break;
+
+ default:
+ png_error(png_ptr, "invalid error action to rgb_to_gray");
+ break;
}
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
#ifdef PNG_READ_EXPAND_SUPPORTED
@@ -691,6 +737,7 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
{
png_warning(png_ptr,
"Cannot do RGB_TO_GRAY without EXPAND_SUPPORTED");
+
png_ptr->transformations &= ~PNG_RGB_TO_GRAY;
}
#endif
@@ -701,30 +748,52 @@ png_set_rgb_to_gray_fixed(png_structp png_ptr, int error_action,
red_int = 6968; /* .212671 * 32768 + .5 */
green_int = 23434; /* .715160 * 32768 + .5 */
}
+
else if (red + green < 100000L)
{
red_int = (png_uint_16)(((png_uint_32)red*32768L)/100000L);
green_int = (png_uint_16)(((png_uint_32)green*32768L)/100000L);
}
+
else
{
png_warning(png_ptr, "ignoring out of range rgb_to_gray coefficients");
red_int = 6968;
green_int = 23434;
}
+
png_ptr->rgb_to_gray_red_coeff = red_int;
png_ptr->rgb_to_gray_green_coeff = green_int;
png_ptr->rgb_to_gray_blue_coeff =
- (png_uint_16)(32768 - red_int - green_int);
+ (png_uint_16)(32768 - red_int - green_int);
}
}
+
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+/* Convert a RGB image to a grayscale of the same width. This allows us,
+ * for example, to convert a 24 bpp RGB image into an 8 bpp grayscale image.
+ */
+
+void PNGAPI
+png_set_rgb_to_gray(png_structp png_ptr, int error_action, double red,
+ double green)
+{
+ if (png_ptr == NULL)
+ return;
+
+ png_set_rgb_to_gray_fixed(png_ptr, error_action,
+ png_fixed(png_ptr, red, "rgb to gray red coefficient"),
+ png_fixed(png_ptr, green, "rgb to gray green coefficient"));
+}
+#endif /* FLOATING POINT */
+
#endif
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
void PNGAPI
png_set_read_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
- read_user_transform_fn)
+ read_user_transform_fn)
{
png_debug(1, "in png_set_read_user_transform_fn");
@@ -747,8 +816,9 @@ png_init_read_transformations(png_structp png_ptr)
png_debug(1, "in png_init_read_transformations");
{
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) || defined(PNG_READ_SHIFT_SUPPORTED) \
- || defined(PNG_READ_GAMMA_SUPPORTED)
+#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
+ defined(PNG_READ_SHIFT_SUPPORTED) || \
+ defined(PNG_READ_GAMMA_SUPPORTED)
int color_type = png_ptr->color_type;
#endif
@@ -768,15 +838,17 @@ png_init_read_transformations(png_structp png_ptr)
if ((png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&
!(color_type & PNG_COLOR_MASK_COLOR))
{
- png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;
- } else if ((png_ptr->transformations & PNG_BACKGROUND) &&
- !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&
- (png_ptr->transformations & PNG_GRAY_TO_RGB) &&
- png_ptr->background.red == png_ptr->background.green &&
- png_ptr->background.red == png_ptr->background.blue)
+ png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;
+ }
+
+ else if ((png_ptr->transformations & PNG_BACKGROUND) &&
+ !(png_ptr->transformations & PNG_BACKGROUND_EXPAND) &&
+ (png_ptr->transformations & PNG_GRAY_TO_RGB) &&
+ png_ptr->background.red == png_ptr->background.green &&
+ png_ptr->background.red == png_ptr->background.blue)
{
- png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;
- png_ptr->background.gray = png_ptr->background.red;
+ png_ptr->mode |= PNG_BACKGROUND_IS_GRAY;
+ png_ptr->background.gray = png_ptr->background.red;
}
#endif
@@ -791,55 +863,57 @@ png_init_read_transformations(png_structp png_ptr)
case 1:
png_ptr->background.gray *= (png_uint_16)0xff;
png_ptr->background.red = png_ptr->background.green
- = png_ptr->background.blue = png_ptr->background.gray;
+ = png_ptr->background.blue = png_ptr->background.gray;
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
{
png_ptr->trans_color.gray *= (png_uint_16)0xff;
png_ptr->trans_color.red = png_ptr->trans_color.green
- = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
+ = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
}
break;
case 2:
png_ptr->background.gray *= (png_uint_16)0x55;
png_ptr->background.red = png_ptr->background.green
- = png_ptr->background.blue = png_ptr->background.gray;
+ = png_ptr->background.blue = png_ptr->background.gray;
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
{
- png_ptr->trans_color.gray *= (png_uint_16)0x55;
- png_ptr->trans_color.red = png_ptr->trans_color.green
- = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
+ png_ptr->trans_color.gray *= (png_uint_16)0x55;
+ png_ptr->trans_color.red = png_ptr->trans_color.green
+ = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
}
break;
case 4:
png_ptr->background.gray *= (png_uint_16)0x11;
png_ptr->background.red = png_ptr->background.green
- = png_ptr->background.blue = png_ptr->background.gray;
+ = png_ptr->background.blue = png_ptr->background.gray;
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
{
- png_ptr->trans_color.gray *= (png_uint_16)0x11;
- png_ptr->trans_color.red = png_ptr->trans_color.green
- = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
+ png_ptr->trans_color.gray *= (png_uint_16)0x11;
+ png_ptr->trans_color.red = png_ptr->trans_color.green
+ = png_ptr->trans_color.blue = png_ptr->trans_color.gray;
}
break;
+ default:
+
case 8:
case 16:
png_ptr->background.red = png_ptr->background.green
- = png_ptr->background.blue = png_ptr->background.gray;
+ = png_ptr->background.blue = png_ptr->background.gray;
break;
}
}
else if (color_type == PNG_COLOR_TYPE_PALETTE)
{
png_ptr->background.red =
- png_ptr->palette[png_ptr->background.index].red;
+ png_ptr->palette[png_ptr->background.index].red;
png_ptr->background.green =
- png_ptr->palette[png_ptr->background.index].green;
+ png_ptr->palette[png_ptr->background.index].green;
png_ptr->background.blue =
- png_ptr->palette[png_ptr->background.index].blue;
+ png_ptr->palette[png_ptr->background.index].blue;
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_ALPHA)
@@ -848,13 +922,14 @@ png_init_read_transformations(png_structp png_ptr)
if (!(png_ptr->transformations & PNG_EXPAND_tRNS))
#endif
{
- /* Invert the alpha channel (in tRNS) unless the pixels are
- * going to be expanded, in which case leave it for later
- */
+ /* Invert the alpha channel (in tRNS) unless the pixels are
+ * going to be expanded, in which case leave it for later
+ */
int i, istop;
istop=(int)png_ptr->num_trans;
for (i=0; i<istop; i++)
- png_ptr->trans_alpha[i] = (png_byte)(255 - png_ptr->trans_alpha[i]);
+ png_ptr->trans_alpha[i] = (png_byte)(255 -
+ png_ptr->trans_alpha[i]);
}
}
#endif
@@ -866,25 +941,24 @@ png_init_read_transformations(png_structp png_ptr)
#if defined(PNG_READ_BACKGROUND_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)
png_ptr->background_1 = png_ptr->background;
#endif
-#if defined(PNG_READ_GAMMA_SUPPORTED) && defined(PNG_FLOATING_POINT_SUPPORTED)
+#ifdef PNG_READ_GAMMA_SUPPORTED
if ((color_type == PNG_COLOR_TYPE_PALETTE && png_ptr->num_trans != 0)
- && (fabs(png_ptr->screen_gamma * png_ptr->gamma - 1.0)
- < PNG_GAMMA_THRESHOLD))
+ && png_gamma_threshold(png_ptr->screen_gamma, png_ptr->gamma))
{
- int i, k;
- k=0;
- for (i=0; i<png_ptr->num_trans; i++)
- {
- if (png_ptr->trans_alpha[i] != 0 && png_ptr->trans_alpha[i] != 0xff)
- k=1; /* Partial transparency is present */
- }
- if (k == 0)
- png_ptr->transformations &= ~PNG_GAMMA;
+ int i, k;
+ k=0;
+ for (i=0; i<png_ptr->num_trans; i++)
+ {
+ if (png_ptr->trans_alpha[i] != 0 && png_ptr->trans_alpha[i] != 0xff)
+ k=1; /* Partial transparency is present */
+ }
+ if (k == 0)
+ png_ptr->transformations &= ~PNG_GAMMA;
}
if ((png_ptr->transformations & (PNG_GAMMA | PNG_RGB_TO_GRAY)) &&
- png_ptr->gamma != 0.0)
+ png_ptr->gamma != 0)
{
png_build_gamma_table(png_ptr, png_ptr->bit_depth);
@@ -893,13 +967,14 @@ png_init_read_transformations(png_structp png_ptr)
{
if (color_type == PNG_COLOR_TYPE_PALETTE)
{
- /* Could skip if no transparency */
+ /* Could skip if no transparency */
png_color back, back_1;
png_colorp palette = png_ptr->palette;
int num_palette = png_ptr->num_palette;
int i;
if (png_ptr->background_gamma_type == PNG_BACKGROUND_GAMMA_FILE)
{
+
back.red = png_ptr->gamma_table[png_ptr->background.red];
back.green = png_ptr->gamma_table[png_ptr->background.green];
back.blue = png_ptr->gamma_table[png_ptr->background.blue];
@@ -910,56 +985,58 @@ png_init_read_transformations(png_structp png_ptr)
}
else
{
- double g, gs;
+ png_fixed_point g, gs;
switch (png_ptr->background_gamma_type)
{
case PNG_BACKGROUND_GAMMA_SCREEN:
g = (png_ptr->screen_gamma);
- gs = 1.0;
+ gs = PNG_FP_1;
break;
case PNG_BACKGROUND_GAMMA_FILE:
- g = 1.0 / (png_ptr->gamma);
- gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
+ g = png_reciprocal(png_ptr->gamma);
+ gs = png_reciprocal2(png_ptr->gamma,
+ png_ptr->screen_gamma);
break;
case PNG_BACKGROUND_GAMMA_UNIQUE:
- g = 1.0 / (png_ptr->background_gamma);
- gs = 1.0 / (png_ptr->background_gamma *
- png_ptr->screen_gamma);
+ g = png_reciprocal(png_ptr->background_gamma);
+ gs = png_reciprocal2(png_ptr->background_gamma,
+ png_ptr->screen_gamma);
break;
default:
- g = 1.0; /* back_1 */
- gs = 1.0; /* back */
+ g = PNG_FP_1; /* back_1 */
+ gs = PNG_FP_1; /* back */
+ break;
}
- if ( fabs(gs - 1.0) < PNG_GAMMA_THRESHOLD)
+ if (png_gamma_significant(gs))
{
back.red = (png_byte)png_ptr->background.red;
back.green = (png_byte)png_ptr->background.green;
back.blue = (png_byte)png_ptr->background.blue;
}
+
else
{
- back.red = (png_byte)(pow(
- (double)png_ptr->background.red/255.0, gs) * 255.0 + .5);
- back.green = (png_byte)(pow(
- (double)png_ptr->background.green/255.0, gs) * 255.0 + .5);
- back.blue = (png_byte)(pow(
- (double)png_ptr->background.blue/255.0, gs) * 255.0 + .5);
+ back.red = png_gamma_8bit_correct(png_ptr->background.red,
+ gs);
+ back.green = png_gamma_8bit_correct(png_ptr->background.green,
+ gs);
+ back.blue = png_gamma_8bit_correct(png_ptr->background.blue,
+ gs);
}
-
- back_1.red = (png_byte)(pow(
- (double)png_ptr->background.red/255.0, g) * 255.0 + .5);
- back_1.green = (png_byte)(pow(
- (double)png_ptr->background.green/255.0, g) * 255.0 + .5);
- back_1.blue = (png_byte)(pow(
- (double)png_ptr->background.blue/255.0, g) * 255.0 + .5);
+ back_1.red = png_gamma_8bit_correct(png_ptr->background.red, g);
+ back_1.green = png_gamma_8bit_correct(png_ptr->background.green,
+ g);
+ back_1.blue = png_gamma_8bit_correct(png_ptr->background.blue,
+ g);
}
for (i = 0; i < num_palette; i++)
{
- if (i < (int)png_ptr->num_trans && png_ptr->trans_alpha[i] != 0xff)
+ if (i < (int)png_ptr->num_trans &&
+ png_ptr->trans_alpha[i] != 0xff)
{
if (png_ptr->trans_alpha[i] == 0)
{
@@ -996,65 +1073,76 @@ png_init_read_transformations(png_structp png_ptr)
*/
png_ptr->transformations &= ~PNG_BACKGROUND;
png_ptr->transformations &= ~PNG_GAMMA;
- png_ptr->transformations |= PNG_STRIP_ALPHA;
+ png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
}
+
/* if (png_ptr->background_gamma_type!=PNG_BACKGROUND_GAMMA_UNKNOWN) */
else
/* color_type != PNG_COLOR_TYPE_PALETTE */
{
- double m = (double)(((png_uint_32)1 << png_ptr->bit_depth) - 1);
- double g = 1.0;
- double gs = 1.0;
+ png_fixed_point g = PNG_FP_1;
+ png_fixed_point gs = PNG_FP_1;
switch (png_ptr->background_gamma_type)
{
case PNG_BACKGROUND_GAMMA_SCREEN:
- g = (png_ptr->screen_gamma);
- gs = 1.0;
+ g = png_ptr->screen_gamma;
+ /* gs = PNG_FP_1; */
break;
case PNG_BACKGROUND_GAMMA_FILE:
- g = 1.0 / (png_ptr->gamma);
- gs = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
+ g = png_reciprocal(png_ptr->gamma);
+ gs = png_reciprocal2(png_ptr->gamma, png_ptr->screen_gamma);
break;
case PNG_BACKGROUND_GAMMA_UNIQUE:
- g = 1.0 / (png_ptr->background_gamma);
- gs = 1.0 / (png_ptr->background_gamma *
- png_ptr->screen_gamma);
+ g = png_reciprocal(png_ptr->background_gamma);
+ gs = png_reciprocal2(png_ptr->background_gamma,
+ png_ptr->screen_gamma);
break;
+
+ default:
+ png_error(png_ptr, "invalid background gamma type");
}
- png_ptr->background_1.gray = (png_uint_16)(pow(
- (double)png_ptr->background.gray / m, g) * m + .5);
- png_ptr->background.gray = (png_uint_16)(pow(
- (double)png_ptr->background.gray / m, gs) * m + .5);
+ png_ptr->background_1.gray = png_gamma_correct(png_ptr,
+ png_ptr->background.gray, g);
+
+ png_ptr->background.gray = png_gamma_correct(png_ptr,
+ png_ptr->background.gray, gs);
if ((png_ptr->background.red != png_ptr->background.green) ||
(png_ptr->background.red != png_ptr->background.blue) ||
(png_ptr->background.red != png_ptr->background.gray))
{
/* RGB or RGBA with color background */
- png_ptr->background_1.red = (png_uint_16)(pow(
- (double)png_ptr->background.red / m, g) * m + .5);
- png_ptr->background_1.green = (png_uint_16)(pow(
- (double)png_ptr->background.green / m, g) * m + .5);
- png_ptr->background_1.blue = (png_uint_16)(pow(
- (double)png_ptr->background.blue / m, g) * m + .5);
- png_ptr->background.red = (png_uint_16)(pow(
- (double)png_ptr->background.red / m, gs) * m + .5);
- png_ptr->background.green = (png_uint_16)(pow(
- (double)png_ptr->background.green / m, gs) * m + .5);
- png_ptr->background.blue = (png_uint_16)(pow(
- (double)png_ptr->background.blue / m, gs) * m + .5);
+ png_ptr->background_1.red = png_gamma_correct(png_ptr,
+ png_ptr->background.red, g);
+
+ png_ptr->background_1.green = png_gamma_correct(png_ptr,
+ png_ptr->background.green, g);
+
+ png_ptr->background_1.blue = png_gamma_correct(png_ptr,
+ png_ptr->background.blue, g);
+
+ png_ptr->background.red = png_gamma_correct(png_ptr,
+ png_ptr->background.red, gs);
+
+ png_ptr->background.green = png_gamma_correct(png_ptr,
+ png_ptr->background.green, gs);
+
+ png_ptr->background.blue = png_gamma_correct(png_ptr,
+ png_ptr->background.blue, gs);
}
+
else
{
/* GRAY, GRAY ALPHA, RGB, or RGBA with gray background */
png_ptr->background_1.red = png_ptr->background_1.green
- = png_ptr->background_1.blue = png_ptr->background_1.gray;
+ = png_ptr->background_1.blue = png_ptr->background_1.gray;
+
png_ptr->background.red = png_ptr->background.green
- = png_ptr->background.blue = png_ptr->background.gray;
+ = png_ptr->background.blue = png_ptr->background.gray;
}
}
}
@@ -1081,7 +1169,7 @@ png_init_read_transformations(png_structp png_ptr)
#ifdef PNG_READ_BACKGROUND_SUPPORTED
else
#endif
-#endif /* PNG_READ_GAMMA_SUPPORTED && PNG_FLOATING_POINT_SUPPORTED */
+#endif /* PNG_READ_GAMMA_SUPPORTED */
#ifdef PNG_READ_BACKGROUND_SUPPORTED
/* No GAMMA transformation */
if ((png_ptr->transformations & PNG_BACKGROUND) &&
@@ -1102,27 +1190,30 @@ png_init_read_transformations(png_structp png_ptr)
{
palette[i] = back;
}
+
else if (png_ptr->trans_alpha[i] != 0xff)
{
/* The png_composite() macro is defined in png.h */
png_composite(palette[i].red, palette[i].red,
- png_ptr->trans_alpha[i], back.red);
+ png_ptr->trans_alpha[i], back.red);
+
png_composite(palette[i].green, palette[i].green,
- png_ptr->trans_alpha[i], back.green);
+ png_ptr->trans_alpha[i], back.green);
+
png_composite(palette[i].blue, palette[i].blue,
- png_ptr->trans_alpha[i], back.blue);
+ png_ptr->trans_alpha[i], back.blue);
}
}
/* Handled alpha, still need to strip the channel. */
png_ptr->transformations &= ~PNG_BACKGROUND;
- png_ptr->transformations |= PNG_STRIP_ALPHA;
+ png_ptr->flags |= PNG_FLAG_STRIP_ALPHA;
}
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
#ifdef PNG_READ_SHIFT_SUPPORTED
if ((png_ptr->transformations & PNG_SHIFT) &&
- (color_type == PNG_COLOR_TYPE_PALETTE))
+ (color_type == PNG_COLOR_TYPE_PALETTE))
{
png_uint_16 i;
png_uint_16 istop = png_ptr->num_palette;
@@ -1132,10 +1223,13 @@ png_init_read_transformations(png_structp png_ptr)
if (sr < 0 || sr > 8)
sr = 0;
+
if (sg < 0 || sg > 8)
sg = 0;
+
if (sb < 0 || sb > 8)
sb = 0;
+
for (i = 0; i < istop; i++)
{
png_ptr->palette[i].red >>= sr;
@@ -1167,10 +1261,12 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
if (png_ptr->num_trans &&
- (png_ptr->transformations & PNG_EXPAND_tRNS))
+ (png_ptr->transformations & PNG_EXPAND_tRNS))
info_ptr->color_type = PNG_COLOR_TYPE_RGB_ALPHA;
+
else
info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+
info_ptr->bit_depth = 8;
info_ptr->num_trans = 0;
}
@@ -1179,10 +1275,11 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
if (png_ptr->num_trans)
{
if (png_ptr->transformations & PNG_EXPAND_tRNS)
- info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
+ info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
}
if (info_ptr->bit_depth < 8)
info_ptr->bit_depth = 8;
+
info_ptr->num_trans = 0;
}
}
@@ -1191,7 +1288,8 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_READ_BACKGROUND_SUPPORTED
if (png_ptr->transformations & PNG_BACKGROUND)
{
- info_ptr->color_type &= ~PNG_COLOR_MASK_ALPHA;
+ info_ptr->color_type = (png_byte)(info_ptr->color_type &
+ ~PNG_COLOR_MASK_ALPHA);
info_ptr->num_trans = 0;
info_ptr->background = png_ptr->background;
}
@@ -1200,18 +1298,22 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_READ_GAMMA_SUPPORTED
if (png_ptr->transformations & PNG_GAMMA)
{
-#ifdef PNG_FLOATING_POINT_SUPPORTED
info_ptr->gamma = png_ptr->gamma;
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
- info_ptr->int_gamma = png_ptr->int_gamma;
-#endif
}
#endif
#ifdef PNG_READ_16_TO_8_SUPPORTED
+#ifdef PNG_READ_16BIT_SUPPORTED
if ((png_ptr->transformations & PNG_16_TO_8) && (info_ptr->bit_depth == 16))
info_ptr->bit_depth = 8;
+#else
+ /* Force chopping 16-bit input down to 8 */
+ if (info_ptr->bit_depth == 16)
+ {
+ png_ptr->transformations |=PNG_16_TO_8;
+ info_ptr->bit_depth = 8;
+ }
+#endif
#endif
#ifdef PNG_READ_GRAY_TO_RGB_SUPPORTED
@@ -1224,8 +1326,8 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
info_ptr->color_type &= ~PNG_COLOR_MASK_COLOR;
#endif
-#ifdef PNG_READ_DITHER_SUPPORTED
- if (png_ptr->transformations & PNG_DITHER)
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+ if (png_ptr->transformations & PNG_QUANTIZE)
{
if (((info_ptr->color_type == PNG_COLOR_TYPE_RGB) ||
(info_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)) &&
@@ -1243,8 +1345,10 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
info_ptr->channels = 1;
+
else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
info_ptr->channels = 3;
+
else
info_ptr->channels = 1;
@@ -1265,23 +1369,24 @@ png_read_transform_info(png_structp png_ptr, png_infop info_ptr)
info_ptr->channels++;
/* If adding a true alpha channel not just filler */
if (png_ptr->transformations & PNG_ADD_ALPHA)
- info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
+ info_ptr->color_type |= PNG_COLOR_MASK_ALPHA;
}
#endif
#if defined(PNG_USER_TRANSFORM_PTR_SUPPORTED) && \
defined(PNG_READ_USER_TRANSFORM_SUPPORTED)
if (png_ptr->transformations & PNG_USER_TRANSFORM)
- {
- if (info_ptr->bit_depth < png_ptr->user_transform_depth)
+ {
+ if (info_ptr->bit_depth < png_ptr->user_transform_depth)
info_ptr->bit_depth = png_ptr->user_transform_depth;
- if (info_ptr->channels < png_ptr->user_transform_channels)
+
+ if (info_ptr->channels < png_ptr->user_transform_channels)
info_ptr->channels = png_ptr->user_transform_channels;
- }
+ }
#endif
info_ptr->pixel_depth = (png_byte)(info_ptr->channels *
- info_ptr->bit_depth);
+ info_ptr->bit_depth);
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, info_ptr->width);
@@ -1302,12 +1407,12 @@ png_do_read_transformations(png_structp png_ptr)
if (png_ptr->row_buf == NULL)
{
-#ifdef PNG_STDIO_SUPPORTED
+#ifdef PNG_CONSOLE_IO_SUPPORTED
char msg[50];
png_snprintf2(msg, 50,
- "NULL row buffer for row %ld, pass %d", (long)png_ptr->row_number,
- png_ptr->pass);
+ "NULL row buffer for row %ld, pass %d", (long)png_ptr->row_number,
+ png_ptr->pass);
png_error(png_ptr, msg);
#else
png_error(png_ptr, "NULL row buffer");
@@ -1332,17 +1437,18 @@ png_do_read_transformations(png_structp png_ptr)
if (png_ptr->row_info.color_type == PNG_COLOR_TYPE_PALETTE)
{
png_do_expand_palette(&(png_ptr->row_info), png_ptr->row_buf + 1,
- png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
+ png_ptr->palette, png_ptr->trans_alpha, png_ptr->num_trans);
}
else
{
if (png_ptr->num_trans &&
(png_ptr->transformations & PNG_EXPAND_tRNS))
png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
- &(png_ptr->trans_color));
+ &(png_ptr->trans_color));
else
+
png_do_expand(&(png_ptr->row_info), png_ptr->row_buf + 1,
- NULL);
+ NULL);
}
}
#endif
@@ -1350,20 +1456,23 @@ png_do_read_transformations(png_structp png_ptr)
#ifdef PNG_READ_STRIP_ALPHA_SUPPORTED
if (png_ptr->flags & PNG_FLAG_STRIP_ALPHA)
png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
- PNG_FLAG_FILLER_AFTER | (png_ptr->flags & PNG_FLAG_STRIP_ALPHA));
+ PNG_FLAG_FILLER_AFTER | (png_ptr->flags & PNG_FLAG_STRIP_ALPHA));
#endif
#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
if (png_ptr->transformations & PNG_RGB_TO_GRAY)
{
int rgb_error =
- png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info), png_ptr->row_buf + 1);
+ png_do_rgb_to_gray(png_ptr, &(png_ptr->row_info),
+ png_ptr->row_buf + 1);
+
if (rgb_error)
{
png_ptr->rgb_to_gray_status=1;
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
PNG_RGB_TO_GRAY_WARN)
png_warning(png_ptr, "png_do_rgb_to_gray found nongray pixel");
+
if ((png_ptr->transformations & PNG_RGB_TO_GRAY) ==
PNG_RGB_TO_GRAY_ERR)
png_error(png_ptr, "png_do_rgb_to_gray found nongray pixel");
@@ -1413,18 +1522,18 @@ png_do_read_transformations(png_structp png_ptr)
#ifdef PNG_READ_BACKGROUND_SUPPORTED
if ((png_ptr->transformations & PNG_BACKGROUND) &&
- ((png_ptr->num_trans != 0 ) ||
- (png_ptr->color_type & PNG_COLOR_MASK_ALPHA)))
+ ((png_ptr->num_trans != 0) ||
+ (png_ptr->color_type & PNG_COLOR_MASK_ALPHA)))
png_do_background(&(png_ptr->row_info), png_ptr->row_buf + 1,
- &(png_ptr->trans_color), &(png_ptr->background)
+ &(png_ptr->trans_color), &(png_ptr->background)
#ifdef PNG_READ_GAMMA_SUPPORTED
- , &(png_ptr->background_1),
- png_ptr->gamma_table, png_ptr->gamma_from_1,
- png_ptr->gamma_to_1, png_ptr->gamma_16_table,
- png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1,
- png_ptr->gamma_shift
+ , &(png_ptr->background_1),
+ png_ptr->gamma_table, png_ptr->gamma_from_1,
+ png_ptr->gamma_to_1, png_ptr->gamma_16_table,
+ png_ptr->gamma_16_from_1, png_ptr->gamma_16_to_1,
+ png_ptr->gamma_shift
#endif
-);
+ );
#endif
#ifdef PNG_READ_GAMMA_SUPPORTED
@@ -1445,15 +1554,16 @@ png_do_read_transformations(png_structp png_ptr)
png_do_chop(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
-#ifdef PNG_READ_DITHER_SUPPORTED
- if (png_ptr->transformations & PNG_DITHER)
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+ if (png_ptr->transformations & PNG_QUANTIZE)
{
- png_do_dither((png_row_infop)&(png_ptr->row_info), png_ptr->row_buf + 1,
- png_ptr->palette_lookup, png_ptr->dither_index);
- if (png_ptr->row_info.rowbytes == (png_uint_32)0)
- png_error(png_ptr, "png_do_dither returned rowbytes=0");
+ png_do_quantize(&(png_ptr->row_info), png_ptr->row_buf + 1,
+ png_ptr->palette_lookup, png_ptr->quantize_index);
+
+ if (png_ptr->row_info.rowbytes == 0)
+ png_error(png_ptr, "png_do_quantize returned rowbytes=0");
}
-#endif
+#endif /* PNG_READ_QUANTIZE_SUPPORTED */
#ifdef PNG_READ_INVERT_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_MONO)
@@ -1463,7 +1573,7 @@ png_do_read_transformations(png_structp png_ptr)
#ifdef PNG_READ_SHIFT_SUPPORTED
if (png_ptr->transformations & PNG_SHIFT)
png_do_unshift(&(png_ptr->row_info), png_ptr->row_buf + 1,
- &(png_ptr->shift));
+ &(png_ptr->shift));
#endif
#ifdef PNG_READ_PACK_SUPPORTED
@@ -1491,7 +1601,7 @@ png_do_read_transformations(png_structp png_ptr)
#ifdef PNG_READ_FILLER_SUPPORTED
if (png_ptr->transformations & PNG_FILLER)
png_do_read_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
- (png_uint_32)png_ptr->filler, png_ptr->flags);
+ (png_uint_32)png_ptr->filler, png_ptr->flags);
#endif
#ifdef PNG_READ_INVERT_ALPHA_SUPPORTED
@@ -1504,35 +1614,39 @@ png_do_read_transformations(png_structp png_ptr)
png_do_read_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
+#ifdef PNG_READ_16BIT_SUPPORTED
#ifdef PNG_READ_SWAP_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_BYTES)
png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
+#endif
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
if (png_ptr->transformations & PNG_USER_TRANSFORM)
{
if (png_ptr->read_user_transform_fn != NULL)
(*(png_ptr->read_user_transform_fn)) /* User read transform function */
- (png_ptr, /* png_ptr */
- &(png_ptr->row_info), /* row_info: */
- /* png_uint_32 width; width of row */
- /* png_uint_32 rowbytes; number of bytes in row */
- /* png_byte color_type; color type of pixels */
- /* png_byte bit_depth; bit depth of samples */
- /* png_byte channels; number of channels (1-4) */
- /* png_byte pixel_depth; bits per pixel (depth*channels) */
- png_ptr->row_buf + 1); /* start of pixel data for row */
+ (png_ptr, /* png_ptr */
+ &(png_ptr->row_info), /* row_info: */
+ /* png_uint_32 width; width of row */
+ /* png_size_t rowbytes; number of bytes in row */
+ /* png_byte color_type; color type of pixels */
+ /* png_byte bit_depth; bit depth of samples */
+ /* png_byte channels; number of channels (1-4) */
+ /* png_byte pixel_depth; bits per pixel (depth*channels) */
+ png_ptr->row_buf + 1); /* start of pixel data for row */
#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
if (png_ptr->user_transform_depth)
png_ptr->row_info.bit_depth = png_ptr->user_transform_depth;
+
if (png_ptr->user_transform_channels)
png_ptr->row_info.channels = png_ptr->user_transform_channels;
#endif
png_ptr->row_info.pixel_depth = (png_byte)(png_ptr->row_info.bit_depth *
- png_ptr->row_info.channels);
+ png_ptr->row_info.channels);
+
png_ptr->row_info.rowbytes = PNG_ROWBYTES(png_ptr->row_info.pixel_depth,
- png_ptr->row_info.width);
+ png_ptr->row_info.width);
}
#endif
@@ -1565,11 +1679,13 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
for (i = 0; i < row_width; i++)
{
*dp = (png_byte)((*sp >> shift) & 0x01);
+
if (shift == 7)
{
shift = 0;
sp--;
}
+
else
shift++;
@@ -1587,11 +1703,13 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
for (i = 0; i < row_width; i++)
{
*dp = (png_byte)((*sp >> shift) & 0x03);
+
if (shift == 6)
{
shift = 0;
sp--;
}
+
else
shift += 2;
@@ -1608,11 +1726,13 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
for (i = 0; i < row_width; i++)
{
*dp = (png_byte)((*sp >> shift) & 0x0f);
+
if (shift == 4)
{
shift = 0;
sp--;
}
+
else
shift = 4;
@@ -1620,6 +1740,9 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
}
break;
}
+
+ default:
+ break;
}
row_info->bit_depth = 8;
row_info->pixel_depth = (png_byte)(8 * row_info->channels);
@@ -1635,7 +1758,8 @@ png_do_unpack(png_row_infop row_info, png_bytep row)
* the values back to 0 through 31.
*/
void /* PRIVATE */
-png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
+png_do_unshift(png_row_infop row_info, png_bytep row,
+ png_const_color_8p sig_bits)
{
png_debug(1, "in png_do_unshift");
@@ -1654,10 +1778,12 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
shift[channels++] = row_info->bit_depth - sig_bits->green;
shift[channels++] = row_info->bit_depth - sig_bits->blue;
}
+
else
{
shift[channels++] = row_info->bit_depth - sig_bits->gray;
}
+
if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
{
shift[channels++] = row_info->bit_depth - sig_bits->alpha;
@@ -1667,6 +1793,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
{
if (shift[c] <= 0)
shift[c] = 0;
+
else
value = 1;
}
@@ -1676,11 +1803,14 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
switch (row_info->bit_depth)
{
+ default:
+ break;
+
case 2:
{
png_bytep bp;
- png_uint_32 i;
- png_uint_32 istop = row_info->rowbytes;
+ png_size_t i;
+ png_size_t istop = row_info->rowbytes;
for (bp = row, i = 0; i < istop; i++)
{
@@ -1693,10 +1823,10 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
case 4:
{
png_bytep bp = row;
- png_uint_32 i;
- png_uint_32 istop = row_info->rowbytes;
+ png_size_t i;
+ png_size_t istop = row_info->rowbytes;
png_byte mask = (png_byte)((((int)0xf0 >> shift[0]) & (int)0xf0) |
- (png_byte)((int)0xf >> shift[0]));
+ (png_byte)((int)0xf >> shift[0]));
for (i = 0; i < istop; i++)
{
@@ -1719,6 +1849,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
break;
}
+#ifdef PNG_READ_16BIT_SUPPORTED
case 16:
{
png_bytep bp = row;
@@ -1734,6 +1865,7 @@ png_do_unshift(png_row_infop row_info, png_bytep row, png_color_8p sig_bits)
}
break;
}
+#endif
}
}
}
@@ -1821,6 +1953,8 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
*(--dp) = save;
}
}
+
+#ifdef PNG_READ_16BIT_SUPPORTED
/* This converts from RRGGBBAA to AARRGGBB */
else
{
@@ -1843,7 +1977,9 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
*(--dp) = save[1];
}
}
+#endif
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{
/* This converts from GA to AG */
@@ -1861,6 +1997,8 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
*(--dp) = save;
}
}
+
+#ifdef PNG_READ_16BIT_SUPPORTED
/* This converts from GGAA to AAGG */
else
{
@@ -1879,6 +2017,7 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
*(--dp) = save[1];
}
}
+#endif
}
}
}
@@ -1888,94 +2027,99 @@ png_do_read_swap_alpha(png_row_infop row_info, png_bytep row)
void /* PRIVATE */
png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
{
+ png_uint_32 row_width;
png_debug(1, "in png_do_read_invert_alpha");
+ row_width = row_info->width;
+ if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
- png_uint_32 row_width = row_info->width;
- if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ if (row_info->bit_depth == 8)
{
/* This inverts the alpha channel in RGBA */
- if (row_info->bit_depth == 8)
- {
- png_bytep sp = row + row_info->rowbytes;
- png_bytep dp = sp;
- png_uint_32 i;
+ png_bytep sp = row + row_info->rowbytes;
+ png_bytep dp = sp;
+ png_uint_32 i;
- for (i = 0; i < row_width; i++)
- {
- *(--dp) = (png_byte)(255 - *(--sp));
+ for (i = 0; i < row_width; i++)
+ {
+ *(--dp) = (png_byte)(255 - *(--sp));
-/* This does nothing:
- *(--dp) = *(--sp);
- *(--dp) = *(--sp);
- *(--dp) = *(--sp);
- We can replace it with:
+/* This does nothing:
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ We can replace it with:
*/
- sp-=3;
- dp=sp;
- }
+ sp-=3;
+ dp=sp;
}
- /* This inverts the alpha channel in RRGGBBAA */
- else
- {
- png_bytep sp = row + row_info->rowbytes;
- png_bytep dp = sp;
- png_uint_32 i;
+ }
- for (i = 0; i < row_width; i++)
- {
- *(--dp) = (png_byte)(255 - *(--sp));
- *(--dp) = (png_byte)(255 - *(--sp));
+#ifdef PNG_READ_16BIT_SUPPORTED
+ /* This inverts the alpha channel in RRGGBBAA */
+ else
+ {
+ png_bytep sp = row + row_info->rowbytes;
+ png_bytep dp = sp;
+ png_uint_32 i;
-/* This does nothing:
- *(--dp) = *(--sp);
- *(--dp) = *(--sp);
- *(--dp) = *(--sp);
- *(--dp) = *(--sp);
- *(--dp) = *(--sp);
- *(--dp) = *(--sp);
- We can replace it with:
+ for (i = 0; i < row_width; i++)
+ {
+ *(--dp) = (png_byte)(255 - *(--sp));
+ *(--dp) = (png_byte)(255 - *(--sp));
+
+/* This does nothing:
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ We can replace it with:
*/
- sp-=6;
- dp=sp;
- }
+ sp-=6;
+ dp=sp;
}
}
- else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+#endif
+ }
+ else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ {
+ if (row_info->bit_depth == 8)
{
/* This inverts the alpha channel in GA */
- if (row_info->bit_depth == 8)
- {
- png_bytep sp = row + row_info->rowbytes;
- png_bytep dp = sp;
- png_uint_32 i;
+ png_bytep sp = row + row_info->rowbytes;
+ png_bytep dp = sp;
+ png_uint_32 i;
- for (i = 0; i < row_width; i++)
- {
- *(--dp) = (png_byte)(255 - *(--sp));
- *(--dp) = *(--sp);
- }
+ for (i = 0; i < row_width; i++)
+ {
+ *(--dp) = (png_byte)(255 - *(--sp));
+ *(--dp) = *(--sp);
}
+ }
+
+#ifdef PNG_READ_16BIT_SUPPORTED
+ else
+ {
/* This inverts the alpha channel in GGAA */
- else
- {
- png_bytep sp = row + row_info->rowbytes;
- png_bytep dp = sp;
- png_uint_32 i;
+ png_bytep sp = row + row_info->rowbytes;
+ png_bytep dp = sp;
+ png_uint_32 i;
- for (i = 0; i < row_width; i++)
- {
- *(--dp) = (png_byte)(255 - *(--sp));
- *(--dp) = (png_byte)(255 - *(--sp));
+ for (i = 0; i < row_width; i++)
+ {
+ *(--dp) = (png_byte)(255 - *(--sp));
+ *(--dp) = (png_byte)(255 - *(--sp));
/*
- *(--dp) = *(--sp);
- *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
*/
- sp-=2;
- dp=sp;
- }
+ sp-=2;
+ dp=sp;
}
}
+#endif
}
}
#endif
@@ -1984,12 +2128,14 @@ png_do_read_invert_alpha(png_row_infop row_info, png_bytep row)
/* Add filler channel if we have RGB color */
void /* PRIVATE */
png_do_read_filler(png_row_infop row_info, png_bytep row,
- png_uint_32 filler, png_uint_32 flags)
+ png_uint_32 filler, png_uint_32 flags)
{
png_uint_32 i;
png_uint_32 row_width = row_info->width;
+#ifdef PNG_READ_16BIT_SUPPORTED
png_byte hi_filler = (png_byte)((filler>>8) & 0xff);
+#endif
png_byte lo_filler = (png_byte)(filler & 0xff);
png_debug(1, "in png_do_read_filler");
@@ -1999,9 +2145,9 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
{
if (row_info->bit_depth == 8)
{
- /* This changes the data from G to GX */
if (flags & PNG_FLAG_FILLER_AFTER)
{
+ /* This changes the data from G to GX */
png_bytep sp = row + (png_size_t)row_width;
png_bytep dp = sp + (png_size_t)row_width;
for (i = 1; i < row_width; i++)
@@ -2014,9 +2160,10 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
row_info->pixel_depth = 16;
row_info->rowbytes = row_width * 2;
}
- /* This changes the data from G to XG */
+
else
{
+ /* This changes the data from G to XG */
png_bytep sp = row + (png_size_t)row_width;
png_bytep dp = sp + (png_size_t)row_width;
for (i = 0; i < row_width; i++)
@@ -2029,11 +2176,13 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
row_info->rowbytes = row_width * 2;
}
}
+
+#ifdef PNG_READ_16BIT_SUPPORTED
else if (row_info->bit_depth == 16)
{
- /* This changes the data from GG to GGXX */
if (flags & PNG_FLAG_FILLER_AFTER)
{
+ /* This changes the data from GG to GGXX */
png_bytep sp = row + (png_size_t)row_width * 2;
png_bytep dp = sp + (png_size_t)row_width * 2;
for (i = 1; i < row_width; i++)
@@ -2049,9 +2198,10 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
row_info->pixel_depth = 32;
row_info->rowbytes = row_width * 4;
}
- /* This changes the data from GG to XXGG */
+
else
{
+ /* This changes the data from GG to XXGG */
png_bytep sp = row + (png_size_t)row_width * 2;
png_bytep dp = sp + (png_size_t)row_width * 2;
for (i = 0; i < row_width; i++)
@@ -2066,14 +2216,15 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
row_info->rowbytes = row_width * 4;
}
}
+#endif
} /* COLOR_TYPE == GRAY */
else if (row_info->color_type == PNG_COLOR_TYPE_RGB)
{
if (row_info->bit_depth == 8)
{
- /* This changes the data from RGB to RGBX */
if (flags & PNG_FLAG_FILLER_AFTER)
{
+ /* This changes the data from RGB to RGBX */
png_bytep sp = row + (png_size_t)row_width * 3;
png_bytep dp = sp + (png_size_t)row_width;
for (i = 1; i < row_width; i++)
@@ -2088,9 +2239,10 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
row_info->pixel_depth = 32;
row_info->rowbytes = row_width * 4;
}
- /* This changes the data from RGB to XRGB */
+
else
{
+ /* This changes the data from RGB to XRGB */
png_bytep sp = row + (png_size_t)row_width * 3;
png_bytep dp = sp + (png_size_t)row_width;
for (i = 0; i < row_width; i++)
@@ -2105,11 +2257,13 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
row_info->rowbytes = row_width * 4;
}
}
+
+#ifdef PNG_READ_16BIT_SUPPORTED
else if (row_info->bit_depth == 16)
{
- /* This changes the data from RRGGBB to RRGGBBXX */
if (flags & PNG_FLAG_FILLER_AFTER)
{
+ /* This changes the data from RRGGBB to RRGGBBXX */
png_bytep sp = row + (png_size_t)row_width * 6;
png_bytep dp = sp + (png_size_t)row_width * 2;
for (i = 1; i < row_width; i++)
@@ -2129,9 +2283,10 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
row_info->pixel_depth = 64;
row_info->rowbytes = row_width * 8;
}
- /* This changes the data from RRGGBB to XXRRGGBB */
+
else
{
+ /* This changes the data from RRGGBB to XXRRGGBB */
png_bytep sp = row + (png_size_t)row_width * 6;
png_bytep dp = sp + (png_size_t)row_width * 2;
for (i = 0; i < row_width; i++)
@@ -2145,11 +2300,13 @@ png_do_read_filler(png_row_infop row_info, png_bytep row,
*(--dp) = hi_filler;
*(--dp) = lo_filler;
}
+
row_info->channels = 4;
row_info->pixel_depth = 64;
row_info->rowbytes = row_width * 8;
}
}
+#endif
} /* COLOR_TYPE == RGB */
}
#endif
@@ -2165,12 +2322,13 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
png_debug(1, "in png_do_gray_to_rgb");
if (row_info->bit_depth >= 8 &&
- !(row_info->color_type & PNG_COLOR_MASK_COLOR))
+ !(row_info->color_type & PNG_COLOR_MASK_COLOR))
{
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{
if (row_info->bit_depth == 8)
{
+ /* This changes G to RGB */
png_bytep sp = row + (png_size_t)row_width - 1;
png_bytep dp = sp + (png_size_t)row_width * 2;
for (i = 0; i < row_width; i++)
@@ -2180,8 +2338,10 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
*(dp--) = *(sp--);
}
}
+
else
{
+ /* This changes GG to RRGGBB */
png_bytep sp = row + (png_size_t)row_width * 2 - 1;
png_bytep dp = sp + (png_size_t)row_width * 4;
for (i = 0; i < row_width; i++)
@@ -2195,10 +2355,12 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
}
}
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{
if (row_info->bit_depth == 8)
{
+ /* This changes GA to RGBA */
png_bytep sp = row + (png_size_t)row_width * 2 - 1;
png_bytep dp = sp + (png_size_t)row_width * 2;
for (i = 0; i < row_width; i++)
@@ -2209,8 +2371,10 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
*(dp--) = *(sp--);
}
}
+
else
{
+ /* This changes GGAA to RRGGBBAA */
png_bytep sp = row + (png_size_t)row_width * 4 - 1;
png_bytep dp = sp + (png_size_t)row_width * 4;
for (i = 0; i < row_width; i++)
@@ -2229,7 +2393,7 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
row_info->channels += (png_byte)2;
row_info->color_type |= PNG_COLOR_MASK_COLOR;
row_info->pixel_depth = (png_byte)(row_info->channels *
- row_info->bit_depth);
+ row_info->bit_depth);
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
}
}
@@ -2268,8 +2432,8 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
png_debug(1, "in png_do_rgb_to_gray");
- if (
- (row_info->color_type & PNG_COLOR_MASK_COLOR))
+ if (!(row_info->color_type & PNG_COLOR_MASK_PALETTE) &&
+ (row_info->color_type & PNG_COLOR_MASK_COLOR))
{
png_uint_32 rc = png_ptr->rgb_to_gray_red_coeff;
png_uint_32 gc = png_ptr->rgb_to_gray_green_coeff;
@@ -2290,12 +2454,14 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
png_byte red = png_ptr->gamma_to_1[*(sp++)];
png_byte green = png_ptr->gamma_to_1[*(sp++)];
png_byte blue = png_ptr->gamma_to_1[*(sp++)];
+
if (red != green || red != blue)
{
rgb_error |= 1;
*(dp++) = png_ptr->gamma_from_1[
- (rc*red + gc*green + bc*blue)>>15];
+ (rc*red + gc*green + bc*blue)>>15];
}
+
else
*(dp++) = *(sp - 1);
}
@@ -2310,11 +2476,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
png_byte red = *(sp++);
png_byte green = *(sp++);
png_byte blue = *(sp++);
+
if (red != green || red != blue)
{
rgb_error |= 1;
*(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15);
}
+
else
*(dp++) = *(sp - 1);
}
@@ -2333,22 +2501,24 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
{
png_uint_16 red, green, blue, w;
- red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
- green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
- blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
+ red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
+ green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
+ blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
if (red == green && red == blue)
w = red;
+
else
{
- png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >>
- png_ptr->gamma_shift][red>>8];
- png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >>
- png_ptr->gamma_shift][green>>8];
- png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >>
- png_ptr->gamma_shift][blue>>8];
+ png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff)
+ >> png_ptr->gamma_shift][red>>8];
+ png_uint_16 green_1 =
+ png_ptr->gamma_16_to_1[(green&0xff) >>
+ png_ptr->gamma_shift][green>>8];
+ png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff)
+ >> png_ptr->gamma_shift][blue>>8];
png_uint_16 gray16 = (png_uint_16)((rc*red_1 + gc*green_1
- + bc*blue_1)>>15);
+ + bc*blue_1)>>15);
w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
png_ptr->gamma_shift][gray16 >> 8];
rgb_error |= 1;
@@ -2367,12 +2537,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
{
png_uint_16 red, green, blue, gray16;
- red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
- green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
- blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
+ red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
+ green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
+ blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
if (red != green || red != blue)
rgb_error |= 1;
+
gray16 = (png_uint_16)((rc*red + gc*green + bc*blue)>>15);
*(dp++) = (png_byte)((gray16>>8) & 0xff);
*(dp++) = (png_byte)(gray16 & 0xff);
@@ -2394,10 +2565,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
png_byte red = png_ptr->gamma_to_1[*(sp++)];
png_byte green = png_ptr->gamma_to_1[*(sp++)];
png_byte blue = png_ptr->gamma_to_1[*(sp++)];
+
if (red != green || red != blue)
rgb_error |= 1;
+
*(dp++) = png_ptr->gamma_from_1
- [(rc*red + gc*green + bc*blue)>>15];
+ [(rc*red + gc*green + bc*blue)>>15];
+
*(dp++) = *(sp++); /* alpha */
}
}
@@ -2413,6 +2587,7 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
png_byte blue = *(sp++);
if (red != green || red != blue)
rgb_error |= 1;
+
*(dp++) = (png_byte)((rc*red + gc*green + bc*blue)>>15);
*(dp++) = *(sp++); /* alpha */
}
@@ -2430,24 +2605,31 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
{
png_uint_16 red, green, blue, w;
- red = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
- green = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
- blue = (png_uint_16)(((*(sp))<<8) | *(sp+1)); sp+=2;
+ red = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
+ green = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
+ blue = (png_uint_16)(((*(sp))<<8) | *(sp + 1)); sp += 2;
if (red == green && red == blue)
w = red;
+
else
{
png_uint_16 red_1 = png_ptr->gamma_16_to_1[(red&0xff) >>
- png_ptr->gamma_shift][red>>8];
- png_uint_16 green_1 = png_ptr->gamma_16_to_1[(green&0xff) >>
- png_ptr->gamma_shift][green>>8];
+ png_ptr->gamma_shift][red>>8];
+
+ png_uint_16 green_1 =
+ png_ptr->gamma_16_to_1[(green&0xff) >>
+ png_ptr->gamma_shift][green>>8];
+
png_uint_16 blue_1 = png_ptr->gamma_16_to_1[(blue&0xff) >>
- png_ptr->gamma_shift][blue>>8];
+ png_ptr->gamma_shift][blue>>8];
+
png_uint_16 gray16 = (png_uint_16)((rc * red_1
- + gc * green_1 + bc * blue_1)>>15);
+ + gc * green_1 + bc * blue_1)>>15);
+
w = png_ptr->gamma_16_from_1[(gray16&0xff) >>
png_ptr->gamma_shift][gray16 >> 8];
+
rgb_error |= 1;
}
@@ -2465,11 +2647,13 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
for (i = 0; i < row_width; i++)
{
png_uint_16 red, green, blue, gray16;
- red = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
- green = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
- blue = (png_uint_16)((*(sp)<<8) | *(sp+1)); sp+=2;
+ red = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2;
+ green = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2;
+ blue = (png_uint_16)((*(sp)<<8) | *(sp + 1)); sp += 2;
+
if (red != green || red != blue)
rgb_error |= 1;
+
gray16 = (png_uint_16)((rc*red + gc*green + bc*blue)>>15);
*(dp++) = (png_byte)((gray16>>8) & 0xff);
*(dp++) = (png_byte)(gray16 & 0xff);
@@ -2479,10 +2663,11 @@ png_do_rgb_to_gray(png_structp png_ptr, png_row_infop row_info, png_bytep row)
}
}
}
- row_info->channels -= (png_byte)2;
- row_info->color_type &= ~PNG_COLOR_MASK_COLOR;
+ row_info->channels -= 2;
+ row_info->color_type = (png_byte)(row_info->color_type &
+ ~PNG_COLOR_MASK_COLOR);
row_info->pixel_depth = (png_byte)(row_info->channels *
- row_info->bit_depth);
+ row_info->bit_depth);
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
}
return rgb_error;
@@ -2551,18 +2736,18 @@ png_build_grayscale_palette(int bit_depth, png_colorp palette)
*/
void /* PRIVATE */
png_do_background(png_row_infop row_info, png_bytep row,
- png_color_16p trans_color, png_color_16p background
+ png_const_color_16p trans_color, png_const_color_16p background
#ifdef PNG_READ_GAMMA_SUPPORTED
- , png_color_16p background_1,
- png_bytep gamma_table, png_bytep gamma_from_1, png_bytep gamma_to_1,
- png_uint_16pp gamma_16, png_uint_16pp gamma_16_from_1,
- png_uint_16pp gamma_16_to_1, int gamma_shift
+ , png_const_color_16p background_1, png_const_bytep gamma_table,
+ png_const_bytep gamma_from_1, png_const_bytep gamma_to_1,
+ png_const_uint_16pp gamma_16, png_const_uint_16pp gamma_16_from_1,
+ png_const_uint_16pp gamma_16_to_1, int gamma_shift
#endif
- )
+ )
{
png_bytep sp, dp;
png_uint_32 i;
- png_uint_32 row_width=row_info->width;
+ png_uint_32 row_width = row_info->width;
int shift;
png_debug(1, "in png_do_background");
@@ -2589,11 +2774,13 @@ png_do_background(png_row_infop row_info, png_bytep row,
*sp &= (png_byte)((0x7f7f >> (7 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
}
+
if (!shift)
{
shift = 7;
sp++;
}
+
else
shift--;
}
@@ -2615,6 +2802,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
}
+
else
{
png_byte p = (png_byte)((*sp >> shift) & 0x03);
@@ -2623,15 +2811,18 @@ png_do_background(png_row_infop row_info, png_bytep row,
*sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
*sp |= (png_byte)(g << shift);
}
+
if (!shift)
{
shift = 6;
sp++;
}
+
else
shift -= 2;
}
}
+
else
#endif
{
@@ -2645,11 +2836,13 @@ png_do_background(png_row_infop row_info, png_bytep row,
*sp &= (png_byte)((0x3f3f >> (6 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
}
+
if (!shift)
{
shift = 6;
sp++;
}
+
else
shift -= 2;
}
@@ -2672,23 +2865,27 @@ png_do_background(png_row_infop row_info, png_bytep row,
*sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
}
+
else
{
png_byte p = (png_byte)((*sp >> shift) & 0x0f);
png_byte g = (png_byte)((gamma_table[p |
- (p << 4)] >> 4) & 0x0f);
+ (p << 4)] >> 4) & 0x0f);
*sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
*sp |= (png_byte)(g << shift);
}
+
if (!shift)
{
shift = 4;
sp++;
}
+
else
shift -= 4;
}
}
+
else
#endif
{
@@ -2702,11 +2899,13 @@ png_do_background(png_row_infop row_info, png_bytep row,
*sp &= (png_byte)((0xf0f >> (4 - shift)) & 0xff);
*sp |= (png_byte)(background->gray << shift);
}
+
if (!shift)
{
shift = 4;
sp++;
}
+
else
shift -= 4;
}
@@ -2723,13 +2922,10 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp++)
{
if (*sp == trans_color->gray)
- {
*sp = (png_byte)background->gray;
- }
+
else
- {
*sp = gamma_table[*sp];
- }
}
}
else
@@ -2739,9 +2935,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp++)
{
if (*sp == trans_color->gray)
- {
*sp = (png_byte)background->gray;
- }
}
}
break;
@@ -2758,12 +2952,14 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 v;
v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
+
if (v == trans_color->gray)
{
/* Background is already in screen gamma */
*sp = (png_byte)((background->gray >> 8) & 0xff);
*(sp + 1) = (png_byte)(background->gray & 0xff);
}
+
else
{
v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
@@ -2781,6 +2977,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 v;
v = (png_uint_16)(((*sp) << 8) + *(sp + 1));
+
if (v == trans_color->gray)
{
*sp = (png_byte)((background->gray >> 8) & 0xff);
@@ -2790,6 +2987,9 @@ png_do_background(png_row_infop row_info, png_bytep row,
}
break;
}
+
+ default:
+ break;
}
break;
}
@@ -2805,13 +3005,14 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp += 3)
{
if (*sp == trans_color->red &&
- *(sp + 1) == trans_color->green &&
- *(sp + 2) == trans_color->blue)
+ *(sp + 1) == trans_color->green &&
+ *(sp + 2) == trans_color->blue)
{
*sp = (png_byte)background->red;
*(sp + 1) = (png_byte)background->green;
*(sp + 2) = (png_byte)background->blue;
}
+
else
{
*sp = gamma_table[*sp];
@@ -2827,8 +3028,8 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp += 3)
{
if (*sp == trans_color->red &&
- *(sp + 1) == trans_color->green &&
- *(sp + 2) == trans_color->blue)
+ *(sp + 1) == trans_color->green &&
+ *(sp + 2) == trans_color->blue)
{
*sp = (png_byte)background->red;
*(sp + 1) = (png_byte)background->green;
@@ -2846,10 +3047,15 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp += 6)
{
png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
- png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
- png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
+
+ png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8)
+ + *(sp + 3));
+
+ png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8)
+ + *(sp + 5));
+
if (r == trans_color->red && g == trans_color->green &&
- b == trans_color->blue)
+ b == trans_color->blue)
{
/* Background is already in screen gamma */
*sp = (png_byte)((background->red >> 8) & 0xff);
@@ -2859,32 +3065,40 @@ png_do_background(png_row_infop row_info, png_bytep row,
*(sp + 4) = (png_byte)((background->blue >> 8) & 0xff);
*(sp + 5) = (png_byte)(background->blue & 0xff);
}
+
else
{
png_uint_16 v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
+
v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)];
*(sp + 2) = (png_byte)((v >> 8) & 0xff);
*(sp + 3) = (png_byte)(v & 0xff);
+
v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)];
*(sp + 4) = (png_byte)((v >> 8) & 0xff);
*(sp + 5) = (png_byte)(v & 0xff);
}
}
}
+
else
#endif
{
sp = row;
for (i = 0; i < row_width; i++, sp += 6)
{
- png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp+1));
- png_uint_16 g = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
- png_uint_16 b = (png_uint_16)(((*(sp+4)) << 8) + *(sp+5));
+ png_uint_16 r = (png_uint_16)(((*sp) << 8) + *(sp + 1));
+
+ png_uint_16 g = (png_uint_16)(((*(sp + 2)) << 8)
+ + *(sp + 3));
+
+ png_uint_16 b = (png_uint_16)(((*(sp + 4)) << 8)
+ + *(sp + 5));
if (r == trans_color->red && g == trans_color->green &&
- b == trans_color->blue)
+ b == trans_color->blue)
{
*sp = (png_byte)((background->red >> 8) & 0xff);
*(sp + 1) = (png_byte)(background->red & 0xff);
@@ -2914,14 +3128,14 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_uint_16 a = *(sp + 1);
if (a == 0xff)
- {
*dp = gamma_table[*sp];
- }
+
else if (a == 0)
{
/* Background is already in screen gamma */
*dp = (png_byte)background->gray;
}
+
else
{
png_byte v, w;
@@ -2942,18 +3156,15 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_byte a = *(sp + 1);
if (a == 0xff)
- {
*dp = *sp;
- }
+
#ifdef PNG_READ_GAMMA_SUPPORTED
else if (a == 0)
- {
*dp = (png_byte)background->gray;
- }
+
else
- {
png_composite(*dp, *sp, a, background_1->gray);
- }
+
#else
*dp = (png_byte)background->gray;
#endif
@@ -2970,7 +3181,8 @@ png_do_background(png_row_infop row_info, png_bytep row,
dp = row;
for (i = 0; i < row_width; i++, sp += 4, dp += 2)
{
- png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
+ png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8)
+ + *(sp + 3));
if (a == (png_uint_16)0xffff)
{
@@ -2980,6 +3192,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*dp = (png_byte)((v >> 8) & 0xff);
*(dp + 1) = (png_byte)(v & 0xff);
}
+
#ifdef PNG_READ_GAMMA_SUPPORTED
else if (a == 0)
#else
@@ -2990,6 +3203,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*dp = (png_byte)((background->gray >> 8) & 0xff);
*(dp + 1) = (png_byte)(background->gray & 0xff);
}
+
#ifdef PNG_READ_GAMMA_SUPPORTED
else
{
@@ -3011,11 +3225,12 @@ png_do_background(png_row_infop row_info, png_bytep row,
dp = row;
for (i = 0; i < row_width; i++, sp += 4, dp += 2)
{
- png_uint_16 a = (png_uint_16)(((*(sp+2)) << 8) + *(sp+3));
+ png_uint_16 a = (png_uint_16)(((*(sp + 2)) << 8)
+ + *(sp + 3));
+
if (a == (png_uint_16)0xffff)
- {
png_memcpy(dp, sp, 2);
- }
+
#ifdef PNG_READ_GAMMA_SUPPORTED
else if (a == 0)
#else
@@ -3025,6 +3240,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*dp = (png_byte)((background->gray >> 8) & 0xff);
*(dp + 1) = (png_byte)(background->gray & 0xff);
}
+
#ifdef PNG_READ_GAMMA_SUPPORTED
else
{
@@ -3062,6 +3278,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*(dp + 1) = gamma_table[*(sp + 1)];
*(dp + 2) = gamma_table[*(sp + 2)];
}
+
else if (a == 0)
{
/* Background is already in screen gamma */
@@ -3069,6 +3286,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*(dp + 1) = (png_byte)background->green;
*(dp + 2) = (png_byte)background->blue;
}
+
else
{
png_byte v, w;
@@ -3076,9 +3294,11 @@ png_do_background(png_row_infop row_info, png_bytep row,
v = gamma_to_1[*sp];
png_composite(w, v, a, background_1->red);
*dp = gamma_from_1[w];
+
v = gamma_to_1[*(sp + 1)];
png_composite(w, v, a, background_1->green);
*(dp + 1) = gamma_from_1[w];
+
v = gamma_to_1[*(sp + 2)];
png_composite(w, v, a, background_1->blue);
*(dp + 2) = gamma_from_1[w];
@@ -3100,19 +3320,23 @@ png_do_background(png_row_infop row_info, png_bytep row,
*(dp + 1) = *(sp + 1);
*(dp + 2) = *(sp + 2);
}
+
else if (a == 0)
{
*dp = (png_byte)background->red;
*(dp + 1) = (png_byte)background->green;
*(dp + 2) = (png_byte)background->blue;
}
+
else
{
png_composite(*dp, *sp, a, background->red);
+
png_composite(*(dp + 1), *(sp + 1), a,
- background->green);
+ background->green);
+
png_composite(*(dp + 2), *(sp + 2), a,
- background->blue);
+ background->blue);
}
}
}
@@ -3129,6 +3353,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
{
png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6))
<< 8) + (png_uint_16)(*(sp + 7)));
+
if (a == (png_uint_16)0xffff)
{
png_uint_16 v;
@@ -3136,13 +3361,16 @@ png_do_background(png_row_infop row_info, png_bytep row,
v = gamma_16[*(sp + 1) >> gamma_shift][*sp];
*dp = (png_byte)((v >> 8) & 0xff);
*(dp + 1) = (png_byte)(v & 0xff);
+
v = gamma_16[*(sp + 3) >> gamma_shift][*(sp + 2)];
*(dp + 2) = (png_byte)((v >> 8) & 0xff);
*(dp + 3) = (png_byte)(v & 0xff);
+
v = gamma_16[*(sp + 5) >> gamma_shift][*(sp + 4)];
*(dp + 4) = (png_byte)((v >> 8) & 0xff);
*(dp + 5) = (png_byte)(v & 0xff);
}
+
else if (a == 0)
{
/* Background is already in screen gamma */
@@ -3153,28 +3381,35 @@ png_do_background(png_row_infop row_info, png_bytep row,
*(dp + 4) = (png_byte)((background->blue >> 8) & 0xff);
*(dp + 5) = (png_byte)(background->blue & 0xff);
}
+
else
{
png_uint_16 v, w, x;
v = gamma_16_to_1[*(sp + 1) >> gamma_shift][*sp];
png_composite_16(w, v, a, background_1->red);
+
x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];
*dp = (png_byte)((x >> 8) & 0xff);
*(dp + 1) = (png_byte)(x & 0xff);
+
v = gamma_16_to_1[*(sp + 3) >> gamma_shift][*(sp + 2)];
png_composite_16(w, v, a, background_1->green);
+
x = gamma_16_from_1[((w&0xff) >> gamma_shift)][w >> 8];
*(dp + 2) = (png_byte)((x >> 8) & 0xff);
*(dp + 3) = (png_byte)(x & 0xff);
+
v = gamma_16_to_1[*(sp + 5) >> gamma_shift][*(sp + 4)];
png_composite_16(w, v, a, background_1->blue);
+
x = gamma_16_from_1[(w & 0xff) >> gamma_shift][w >> 8];
*(dp + 4) = (png_byte)((x >> 8) & 0xff);
*(dp + 5) = (png_byte)(x & 0xff);
}
}
}
+
else
#endif
{
@@ -3183,11 +3418,13 @@ png_do_background(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++, sp += 8, dp += 6)
{
png_uint_16 a = (png_uint_16)(((png_uint_16)(*(sp + 6))
- << 8) + (png_uint_16)(*(sp + 7)));
+ << 8) + (png_uint_16)(*(sp + 7)));
+
if (a == (png_uint_16)0xffff)
{
png_memcpy(dp, sp, 6);
}
+
else if (a == 0)
{
*dp = (png_byte)((background->red >> 8) & 0xff);
@@ -3197,6 +3434,7 @@ png_do_background(png_row_infop row_info, png_bytep row,
*(dp + 4) = (png_byte)((background->blue >> 8) & 0xff);
*(dp + 5) = (png_byte)(background->blue & 0xff);
}
+
else
{
png_uint_16 v;
@@ -3210,9 +3448,11 @@ png_do_background(png_row_infop row_info, png_bytep row,
png_composite_16(v, r, a, background->red);
*dp = (png_byte)((v >> 8) & 0xff);
*(dp + 1) = (png_byte)(v & 0xff);
+
png_composite_16(v, g, a, background->green);
*(dp + 2) = (png_byte)((v >> 8) & 0xff);
*(dp + 3) = (png_byte)(v & 0xff);
+
png_composite_16(v, b, a, background->blue);
*(dp + 4) = (png_byte)((v >> 8) & 0xff);
*(dp + 5) = (png_byte)(v & 0xff);
@@ -3222,14 +3462,18 @@ png_do_background(png_row_infop row_info, png_bytep row,
}
break;
}
+
+ default:
+ break;
}
if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
{
- row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
+ row_info->color_type = (png_byte)(row_info->color_type &
+ ~PNG_COLOR_MASK_ALPHA);
row_info->channels--;
row_info->pixel_depth = (png_byte)(row_info->channels *
- row_info->bit_depth);
+ row_info->bit_depth);
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
}
}
@@ -3245,8 +3489,8 @@ png_do_background(png_row_infop row_info, png_bytep row,
*/
void /* PRIVATE */
png_do_gamma(png_row_infop row_info, png_bytep row,
- png_bytep gamma_table, png_uint_16pp gamma_16_table,
- int gamma_shift)
+ png_const_bytep gamma_table, png_const_uint_16pp gamma_16_table,
+ int gamma_shift)
{
png_bytep sp;
png_uint_32 i;
@@ -3254,9 +3498,8 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
png_debug(1, "in png_do_gamma");
- if (
- ((row_info->bit_depth <= 8 && gamma_table != NULL) ||
- (row_info->bit_depth == 16 && gamma_16_table != NULL)))
+ if (((row_info->bit_depth <= 8 && gamma_table != NULL) ||
+ (row_info->bit_depth == 16 && gamma_16_table != NULL)))
{
switch (row_info->color_type)
{
@@ -3275,6 +3518,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
sp++;
}
}
+
else /* if (row_info->bit_depth == 16) */
{
sp = row;
@@ -3286,10 +3530,12 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
sp += 2;
+
v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
sp += 2;
+
v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
@@ -3308,13 +3554,17 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
{
*sp = gamma_table[*sp];
sp++;
+
*sp = gamma_table[*sp];
sp++;
+
*sp = gamma_table[*sp];
sp++;
+
sp++;
}
}
+
else /* if (row_info->bit_depth == 16) */
{
sp = row;
@@ -3324,10 +3574,12 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
sp += 2;
+
v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
sp += 2;
+
v = gamma_16_table[*(sp + 1) >> gamma_shift][*sp];
*sp = (png_byte)((v >> 8) & 0xff);
*(sp + 1) = (png_byte)(v & 0xff);
@@ -3348,6 +3600,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
sp += 2;
}
}
+
else /* if (row_info->bit_depth == 16) */
{
sp = row;
@@ -3375,10 +3628,10 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
int d = *sp & 0x03;
*sp = (png_byte)(
- ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)|
- ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|
- ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|
- ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));
+ ((((int)gamma_table[a|(a>>2)|(a>>4)|(a>>6)]) ) & 0xc0)|
+ ((((int)gamma_table[(b<<2)|b|(b>>2)|(b>>4)])>>2) & 0x30)|
+ ((((int)gamma_table[(c<<4)|(c<<2)|c|(c>>2)])>>4) & 0x0c)|
+ ((((int)gamma_table[(d<<6)|(d<<4)|(d<<2)|d])>>6) ));
sp++;
}
}
@@ -3392,7 +3645,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
int lsb = *sp & 0x0f;
*sp = (png_byte)((((int)gamma_table[msb | (msb >> 4)]) & 0xf0)
- | (((int)gamma_table[(lsb << 4) | lsb]) >> 4));
+ | (((int)gamma_table[(lsb << 4) | lsb]) >> 4));
sp++;
}
}
@@ -3420,6 +3673,9 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
}
break;
}
+
+ default:
+ break;
}
}
}
@@ -3431,7 +3687,7 @@ png_do_gamma(png_row_infop row_info, png_bytep row,
*/
void /* PRIVATE */
png_do_expand_palette(png_row_infop row_info, png_bytep row,
- png_colorp palette, png_bytep trans_alpha, int num_trans)
+ png_const_colorp palette, png_const_bytep trans_alpha, int num_trans)
{
int shift, value;
png_bytep sp, dp;
@@ -3440,8 +3696,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
png_debug(1, "in png_do_expand_palette");
- if (
- row_info->color_type == PNG_COLOR_TYPE_PALETTE)
+ if (row_info->color_type == PNG_COLOR_TYPE_PALETTE)
{
if (row_info->bit_depth < 8)
{
@@ -3456,13 +3711,16 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
{
if ((*sp >> shift) & 0x01)
*dp = 1;
+
else
*dp = 0;
+
if (shift == 7)
{
shift = 0;
sp--;
}
+
else
shift++;
@@ -3485,6 +3743,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
shift = 0;
sp--;
}
+
else
shift += 2;
@@ -3507,6 +3766,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
shift = 0;
sp--;
}
+
else
shift += 4;
@@ -3514,14 +3774,17 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
}
break;
}
+
+ default:
+ break;
}
row_info->bit_depth = 8;
row_info->pixel_depth = 8;
row_info->rowbytes = row_width;
}
- switch (row_info->bit_depth)
+
+ if (row_info->bit_depth == 8)
{
- case 8:
{
if (trans_alpha != NULL)
{
@@ -3532,8 +3795,10 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
{
if ((int)(*sp) >= num_trans)
*dp-- = 0xff;
+
else
*dp-- = trans_alpha[*sp];
+
*dp-- = palette[*sp].blue;
*dp-- = palette[*sp].green;
*dp-- = palette[*sp].red;
@@ -3545,6 +3810,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
row_info->color_type = 6;
row_info->channels = 4;
}
+
else
{
sp = row + (png_size_t)row_width - 1;
@@ -3564,7 +3830,6 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
row_info->color_type = 2;
row_info->channels = 3;
}
- break;
}
}
}
@@ -3575,7 +3840,7 @@ png_do_expand_palette(png_row_infop row_info, png_bytep row,
*/
void /* PRIVATE */
png_do_expand(png_row_infop row_info, png_bytep row,
- png_color_16p trans_value)
+ png_const_color_16p trans_value)
{
int shift, value;
png_bytep sp, dp;
@@ -3595,7 +3860,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
{
case 1:
{
- gray = (png_uint_16)((gray&0x01)*0xff);
+ gray = (png_uint_16)((gray & 0x01) * 0xff);
sp = row + (png_size_t)((row_width - 1) >> 3);
dp = row + (png_size_t)row_width - 1;
shift = 7 - (int)((row_width + 7) & 0x07);
@@ -3603,13 +3868,16 @@ png_do_expand(png_row_infop row_info, png_bytep row,
{
if ((*sp >> shift) & 0x01)
*dp = 0xff;
+
else
*dp = 0;
+
if (shift == 7)
{
shift = 0;
sp--;
}
+
else
shift++;
@@ -3620,7 +3888,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
case 2:
{
- gray = (png_uint_16)((gray&0x03)*0x55);
+ gray = (png_uint_16)((gray & 0x03) * 0x55);
sp = row + (png_size_t)((row_width - 1) >> 2);
dp = row + (png_size_t)row_width - 1;
shift = (int)((3 - ((row_width + 3) & 0x03)) << 1);
@@ -3634,6 +3902,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
shift = 0;
sp--;
}
+
else
shift += 2;
@@ -3644,7 +3913,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
case 4:
{
- gray = (png_uint_16)((gray&0x0f)*0x11);
+ gray = (png_uint_16)((gray & 0x0f) * 0x11);
sp = row + (png_size_t)((row_width - 1) >> 1);
dp = row + (png_size_t)row_width - 1;
shift = (int)((1 - ((row_width + 1) & 0x01)) << 2);
@@ -3657,6 +3926,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
shift = 0;
sp--;
}
+
else
shift = 4;
@@ -3664,6 +3934,9 @@ png_do_expand(png_row_infop row_info, png_bytep row,
}
break;
}
+
+ default:
+ break;
}
row_info->bit_depth = 8;
@@ -3678,20 +3951,23 @@ png_do_expand(png_row_infop row_info, png_bytep row,
gray = gray & 0xff;
sp = row + (png_size_t)row_width - 1;
dp = row + (png_size_t)(row_width << 1) - 1;
+
for (i = 0; i < row_width; i++)
{
if (*sp == gray)
*dp-- = 0;
+
else
*dp-- = 0xff;
+
*dp-- = *sp--;
}
}
else if (row_info->bit_depth == 16)
{
- png_byte gray_high = (gray >> 8) & 0xff;
- png_byte gray_low = gray & 0xff;
+ png_byte gray_high = (png_byte)((gray >> 8) & 0xff);
+ png_byte gray_low = (png_byte)(gray & 0xff);
sp = row + row_info->rowbytes - 1;
dp = row + (row_info->rowbytes << 1) - 1;
for (i = 0; i < row_width; i++)
@@ -3701,11 +3977,13 @@ png_do_expand(png_row_infop row_info, png_bytep row,
*dp-- = 0;
*dp-- = 0;
}
+
else
{
*dp-- = 0xff;
*dp-- = 0xff;
}
+
*dp-- = *sp--;
*dp-- = *sp--;
}
@@ -3722,17 +4000,19 @@ png_do_expand(png_row_infop row_info, png_bytep row,
{
if (row_info->bit_depth == 8)
{
- png_byte red = trans_value->red & 0xff;
- png_byte green = trans_value->green & 0xff;
- png_byte blue = trans_value->blue & 0xff;
+ png_byte red = (png_byte)(trans_value->red & 0xff);
+ png_byte green = (png_byte)(trans_value->green & 0xff);
+ png_byte blue = (png_byte)(trans_value->blue & 0xff);
sp = row + (png_size_t)row_info->rowbytes - 1;
dp = row + (png_size_t)(row_width << 2) - 1;
for (i = 0; i < row_width; i++)
{
if (*(sp - 2) == red && *(sp - 1) == green && *(sp) == blue)
*dp-- = 0;
+
else
*dp-- = 0xff;
+
*dp-- = *sp--;
*dp-- = *sp--;
*dp-- = *sp--;
@@ -3740,31 +4020,33 @@ png_do_expand(png_row_infop row_info, png_bytep row,
}
else if (row_info->bit_depth == 16)
{
- png_byte red_high = (trans_value->red >> 8) & 0xff;
- png_byte green_high = (trans_value->green >> 8) & 0xff;
- png_byte blue_high = (trans_value->blue >> 8) & 0xff;
- png_byte red_low = trans_value->red & 0xff;
- png_byte green_low = trans_value->green & 0xff;
- png_byte blue_low = trans_value->blue & 0xff;
+ png_byte red_high = (png_byte)((trans_value->red >> 8) & 0xff);
+ png_byte green_high = (png_byte)((trans_value->green >> 8) & 0xff);
+ png_byte blue_high = (png_byte)((trans_value->blue >> 8) & 0xff);
+ png_byte red_low = (png_byte)(trans_value->red & 0xff);
+ png_byte green_low = (png_byte)(trans_value->green & 0xff);
+ png_byte blue_low = (png_byte)(trans_value->blue & 0xff);
sp = row + row_info->rowbytes - 1;
dp = row + (png_size_t)(row_width << 3) - 1;
for (i = 0; i < row_width; i++)
{
if (*(sp - 5) == red_high &&
- *(sp - 4) == red_low &&
- *(sp - 3) == green_high &&
- *(sp - 2) == green_low &&
- *(sp - 1) == blue_high &&
- *(sp ) == blue_low)
+ *(sp - 4) == red_low &&
+ *(sp - 3) == green_high &&
+ *(sp - 2) == green_low &&
+ *(sp - 1) == blue_high &&
+ *(sp ) == blue_low)
{
*dp-- = 0;
*dp-- = 0;
}
+
else
{
*dp-- = 0xff;
*dp-- = 0xff;
}
+
*dp-- = *sp--;
*dp-- = *sp--;
*dp-- = *sp--;
@@ -3782,20 +4064,20 @@ png_do_expand(png_row_infop row_info, png_bytep row,
}
#endif
-#ifdef PNG_READ_DITHER_SUPPORTED
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
void /* PRIVATE */
-png_do_dither(png_row_infop row_info, png_bytep row,
- png_bytep palette_lookup, png_bytep dither_lookup)
+png_do_quantize(png_row_infop row_info, png_bytep row,
+ png_const_bytep palette_lookup, png_const_bytep quantize_lookup)
{
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width=row_info->width;
- png_debug(1, "in png_do_dither");
+ png_debug(1, "in png_do_quantize");
+ if (row_info->bit_depth == 8)
{
- if (row_info->color_type == PNG_COLOR_TYPE_RGB &&
- palette_lookup && row_info->bit_depth == 8)
+ if (row_info->color_type == PNG_COLOR_TYPE_RGB && palette_lookup)
{
int r, g, b, p;
sp = row;
@@ -3813,24 +4095,26 @@ png_do_dither(png_row_infop row_info, png_bytep row,
* (((g >> 3) & 0x1f) << 5) |
* ((b >> 3) & 0x1f);
*/
- p = (((r >> (8 - PNG_DITHER_RED_BITS)) &
- ((1 << PNG_DITHER_RED_BITS) - 1)) <<
- (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) |
- (((g >> (8 - PNG_DITHER_GREEN_BITS)) &
- ((1 << PNG_DITHER_GREEN_BITS) - 1)) <<
- (PNG_DITHER_BLUE_BITS)) |
- ((b >> (8 - PNG_DITHER_BLUE_BITS)) &
- ((1 << PNG_DITHER_BLUE_BITS) - 1));
+ p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) &
+ ((1 << PNG_QUANTIZE_RED_BITS) - 1)) <<
+ (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) |
+ (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) &
+ ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) <<
+ (PNG_QUANTIZE_BLUE_BITS)) |
+ ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) &
+ ((1 << PNG_QUANTIZE_BLUE_BITS) - 1));
*dp++ = palette_lookup[p];
}
+
row_info->color_type = PNG_COLOR_TYPE_PALETTE;
row_info->channels = 1;
row_info->pixel_depth = row_info->bit_depth;
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA &&
- palette_lookup != NULL && row_info->bit_depth == 8)
+ palette_lookup != NULL)
{
int r, g, b, p;
sp = row;
@@ -3842,293 +4126,37 @@ png_do_dither(png_row_infop row_info, png_bytep row,
b = *sp++;
sp++;
- p = (((r >> (8 - PNG_DITHER_RED_BITS)) &
- ((1 << PNG_DITHER_RED_BITS) - 1)) <<
- (PNG_DITHER_GREEN_BITS + PNG_DITHER_BLUE_BITS)) |
- (((g >> (8 - PNG_DITHER_GREEN_BITS)) &
- ((1 << PNG_DITHER_GREEN_BITS) - 1)) <<
- (PNG_DITHER_BLUE_BITS)) |
- ((b >> (8 - PNG_DITHER_BLUE_BITS)) &
- ((1 << PNG_DITHER_BLUE_BITS) - 1));
+ p = (((r >> (8 - PNG_QUANTIZE_RED_BITS)) &
+ ((1 << PNG_QUANTIZE_RED_BITS) - 1)) <<
+ (PNG_QUANTIZE_GREEN_BITS + PNG_QUANTIZE_BLUE_BITS)) |
+ (((g >> (8 - PNG_QUANTIZE_GREEN_BITS)) &
+ ((1 << PNG_QUANTIZE_GREEN_BITS) - 1)) <<
+ (PNG_QUANTIZE_BLUE_BITS)) |
+ ((b >> (8 - PNG_QUANTIZE_BLUE_BITS)) &
+ ((1 << PNG_QUANTIZE_BLUE_BITS) - 1));
*dp++ = palette_lookup[p];
}
+
row_info->color_type = PNG_COLOR_TYPE_PALETTE;
row_info->channels = 1;
row_info->pixel_depth = row_info->bit_depth;
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, row_width);
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_PALETTE &&
- dither_lookup && row_info->bit_depth == 8)
+ quantize_lookup)
{
sp = row;
+
for (i = 0; i < row_width; i++, sp++)
{
- *sp = dither_lookup[*sp];
+ *sp = quantize_lookup[*sp];
}
}
}
}
-#endif
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-#ifdef PNG_READ_GAMMA_SUPPORTED
-static PNG_CONST int png_gamma_shift[] =
- {0x10, 0x21, 0x42, 0x84, 0x110, 0x248, 0x550, 0xff0, 0x00};
-
-/* We build the 8- or 16-bit gamma tables here. Note that for 16-bit
- * tables, we don't make a full table if we are reducing to 8-bit in
- * the future. Note also how the gamma_16 tables are segmented so that
- * we don't need to allocate > 64K chunks for a full 16-bit table.
- *
- * See the PNG extensions document for an integer algorithm for creating
- * the gamma tables. Maybe we will implement that here someday.
- *
- * We should only reach this point if
- *
- * the file_gamma is known (i.e., the gAMA or sRGB chunk is present,
- * or the application has provided a file_gamma)
- *
- * AND
- * {
- * the screen_gamma is known
- *
- * OR
- *
- * RGB_to_gray transformation is being performed
- * }
- *
- * AND
- * {
- * the screen_gamma is different from the reciprocal of the
- * file_gamma by more than the specified threshold
- *
- * OR
- *
- * a background color has been specified and the file_gamma
- * and screen_gamma are not 1.0, within the specified threshold.
- * }
- */
-
-void /* PRIVATE */
-png_build_gamma_table(png_structp png_ptr, png_byte bit_depth)
-{
- png_debug(1, "in png_build_gamma_table");
-
- if (bit_depth <= 8)
- {
- int i;
- double g;
-
- if (png_ptr->screen_gamma > .000001)
- g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
-
- else
- g = 1.0;
-
- png_ptr->gamma_table = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)256);
-
- for (i = 0; i < 256; i++)
- {
- png_ptr->gamma_table[i] = (png_byte)(pow((double)i / 255.0,
- g) * 255.0 + .5);
- }
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
- defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
- if (png_ptr->transformations & ((PNG_BACKGROUND) | PNG_RGB_TO_GRAY))
- {
-
- g = 1.0 / (png_ptr->gamma);
-
- png_ptr->gamma_to_1 = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)256);
-
- for (i = 0; i < 256; i++)
- {
- png_ptr->gamma_to_1[i] = (png_byte)(pow((double)i / 255.0,
- g) * 255.0 + .5);
- }
-
-
- png_ptr->gamma_from_1 = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)256);
-
- if (png_ptr->screen_gamma > 0.000001)
- g = 1.0 / png_ptr->screen_gamma;
-
- else
- g = png_ptr->gamma; /* Probably doing rgb_to_gray */
-
- for (i = 0; i < 256; i++)
- {
- png_ptr->gamma_from_1[i] = (png_byte)(pow((double)i / 255.0,
- g) * 255.0 + .5);
-
- }
- }
-#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
- }
- else
- {
- double g;
- int i, j, shift, num;
- int sig_bit;
- png_uint_32 ig;
-
- if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
- {
- sig_bit = (int)png_ptr->sig_bit.red;
-
- if ((int)png_ptr->sig_bit.green > sig_bit)
- sig_bit = png_ptr->sig_bit.green;
-
- if ((int)png_ptr->sig_bit.blue > sig_bit)
- sig_bit = png_ptr->sig_bit.blue;
- }
- else
- {
- sig_bit = (int)png_ptr->sig_bit.gray;
- }
-
- if (sig_bit > 0)
- shift = 16 - sig_bit;
-
- else
- shift = 0;
-
- if (png_ptr->transformations & PNG_16_TO_8)
- {
- if (shift < (16 - PNG_MAX_GAMMA_8))
- shift = (16 - PNG_MAX_GAMMA_8);
- }
-
- if (shift > 8)
- shift = 8;
-
- if (shift < 0)
- shift = 0;
-
- png_ptr->gamma_shift = (png_byte)shift;
-
- num = (1 << (8 - shift));
-
- if (png_ptr->screen_gamma > .000001)
- g = 1.0 / (png_ptr->gamma * png_ptr->screen_gamma);
- else
- g = 1.0;
-
- png_ptr->gamma_16_table = (png_uint_16pp)png_calloc(png_ptr,
- (png_uint_32)(num * png_sizeof(png_uint_16p)));
-
- if (png_ptr->transformations & (PNG_16_TO_8 | PNG_BACKGROUND))
- {
- double fin, fout;
- png_uint_32 last, max;
-
- for (i = 0; i < num; i++)
- {
- png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
- (png_uint_32)(256 * png_sizeof(png_uint_16)));
- }
-
- g = 1.0 / g;
- last = 0;
- for (i = 0; i < 256; i++)
- {
- fout = ((double)i + 0.5) / 256.0;
- fin = pow(fout, g);
- max = (png_uint_32)(fin * (double)((png_uint_32)num << 8));
- while (last <= max)
- {
- png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
- [(int)(last >> (8 - shift))] = (png_uint_16)(
- (png_uint_16)i | ((png_uint_16)i << 8));
- last++;
- }
- }
- while (last < ((png_uint_32)num << 8))
- {
- png_ptr->gamma_16_table[(int)(last & (0xff >> shift))]
- [(int)(last >> (8 - shift))] = (png_uint_16)65535L;
- last++;
- }
- }
- else
- {
- for (i = 0; i < num; i++)
- {
- png_ptr->gamma_16_table[i] = (png_uint_16p)png_malloc(png_ptr,
- (png_uint_32)(256 * png_sizeof(png_uint_16)));
-
- ig = (((png_uint_32)i * (png_uint_32)png_gamma_shift[shift]) >> 4);
-
- for (j = 0; j < 256; j++)
- {
- png_ptr->gamma_16_table[i][j] =
- (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
- 65535.0, g) * 65535.0 + .5);
- }
- }
- }
-
-#if defined(PNG_READ_BACKGROUND_SUPPORTED) || \
- defined(PNG_READ_RGB_TO_GRAY_SUPPORTED)
- if (png_ptr->transformations & (PNG_BACKGROUND | PNG_RGB_TO_GRAY))
- {
-
- g = 1.0 / (png_ptr->gamma);
-
- png_ptr->gamma_16_to_1 = (png_uint_16pp)png_calloc(png_ptr,
- (png_uint_32)(num * png_sizeof(png_uint_16p )));
-
- for (i = 0; i < num; i++)
- {
- png_ptr->gamma_16_to_1[i] = (png_uint_16p)png_malloc(png_ptr,
- (png_uint_32)(256 * png_sizeof(png_uint_16)));
-
- ig = (((png_uint_32)i *
- (png_uint_32)png_gamma_shift[shift]) >> 4);
- for (j = 0; j < 256; j++)
- {
- png_ptr->gamma_16_to_1[i][j] =
- (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
- 65535.0, g) * 65535.0 + .5);
- }
- }
-
- if (png_ptr->screen_gamma > 0.000001)
- g = 1.0 / png_ptr->screen_gamma;
-
- else
- g = png_ptr->gamma; /* Probably doing rgb_to_gray */
-
- png_ptr->gamma_16_from_1 = (png_uint_16pp)png_calloc(png_ptr,
- (png_uint_32)(num * png_sizeof(png_uint_16p)));
-
- for (i = 0; i < num; i++)
- {
- png_ptr->gamma_16_from_1[i] = (png_uint_16p)png_malloc(png_ptr,
- (png_uint_32)(256 * png_sizeof(png_uint_16)));
-
- ig = (((png_uint_32)i *
- (png_uint_32)png_gamma_shift[shift]) >> 4);
-
- for (j = 0; j < 256; j++)
- {
- png_ptr->gamma_16_from_1[i][j] =
- (png_uint_16)(pow((double)(ig + ((png_uint_32)j << 8)) /
- 65535.0, g) * 65535.0 + .5);
- }
- }
- }
-#endif /* PNG_READ_BACKGROUND_SUPPORTED || PNG_RGB_TO_GRAY_SUPPORTED */
- }
-}
-#endif
-/* To do: install integer version of png_build_gamma_table here */
-#endif
+#endif /* PNG_READ_QUANTIZE_SUPPORTED */
#ifdef PNG_MNG_FEATURES_SUPPORTED
/* Undoes intrapixel differencing */
@@ -4142,6 +4170,7 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
{
int bytes_per_pixel;
png_uint_32 row_width = row_info->width;
+
if (row_info->bit_depth == 8)
{
png_bytep rp;
@@ -4158,8 +4187,8 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
{
- *(rp) = (png_byte)((256 + *rp + *(rp+1))&0xff);
- *(rp+2) = (png_byte)((256 + *(rp+2) + *(rp+1))&0xff);
+ *(rp) = (png_byte)((256 + *rp + *(rp + 1)) & 0xff);
+ *(rp+2) = (png_byte)((256 + *(rp + 2) + *(rp + 1)) & 0xff);
}
}
else if (row_info->bit_depth == 16)
@@ -4183,10 +4212,10 @@ png_do_read_intrapixel(png_row_infop row_info, png_bytep row)
png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5);
png_uint_32 red = (png_uint_32)((s0 + s1 + 65536L) & 0xffffL);
png_uint_32 blue = (png_uint_32)((s2 + s1 + 65536L) & 0xffffL);
- *(rp ) = (png_byte)((red >> 8) & 0xff);
- *(rp+1) = (png_byte)(red & 0xff);
- *(rp+4) = (png_byte)((blue >> 8) & 0xff);
- *(rp+5) = (png_byte)(blue & 0xff);
+ *(rp ) = (png_byte)((red >> 8) & 0xff);
+ *(rp + 1) = (png_byte)(red & 0xff);
+ *(rp + 4) = (png_byte)((blue >> 8) & 0xff);
+ *(rp + 5) = (png_byte)(blue & 0xff);
}
}
}
diff --git a/src/3rdparty/libpng/pngrutil.c b/src/3rdparty/libpng/pngrutil.c
index d971e8f..4c3cd53 100644
--- a/src/3rdparty/libpng/pngrutil.c
+++ b/src/3rdparty/libpng/pngrutil.c
@@ -1,8 +1,8 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -14,58 +14,136 @@
* libpng itself during the course of reading an image.
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_READ_SUPPORTED
#include "pngpriv.h"
-# define png_strtod(p,a,b) strtod(a,b)
+#ifdef PNG_READ_SUPPORTED
+
+#define png_strtod(p,a,b) strtod(a,b)
+
png_uint_32 PNGAPI
-png_get_uint_31(png_structp png_ptr, png_bytep buf)
+png_get_uint_31(png_structp png_ptr, png_const_bytep buf)
+{
+ png_uint_32 uval = png_get_uint_32(buf);
+
+ if (uval > PNG_UINT_31_MAX)
+ png_error(png_ptr, "PNG unsigned integer out of range");
+
+ return (uval);
+}
+
+#if defined(PNG_READ_gAMA_SUPPORTED) || defined(PNG_READ_cHRM_SUPPORTED)
+/* The following is a variation on the above for use with the fixed
+ * point values used for gAMA and cHRM. Instead of png_error it
+ * issues a warning and returns (-1) - an invalid value because both
+ * gAMA and cHRM use *unsigned* integers for fixed point values.
+ */
+#define PNG_FIXED_ERROR (-1)
+
+static png_fixed_point /* PRIVATE */
+png_get_fixed_point(png_structp png_ptr, png_const_bytep buf)
{
- png_uint_32 i = png_get_uint_32(buf);
- if (i > PNG_UINT_31_MAX)
- png_error(png_ptr, "PNG unsigned integer out of range");
- return (i);
+ png_uint_32 uval = png_get_uint_32(buf);
+
+ if (uval <= PNG_UINT_31_MAX)
+ return (png_fixed_point)uval; /* known to be in range */
+
+ /* The caller can turn off the warning by passing NULL. */
+ if (png_ptr != NULL)
+ png_warning(png_ptr, "PNG fixed point integer out of range");
+
+ return PNG_FIXED_ERROR;
}
-#ifndef PNG_USE_READ_MACROS
+#endif
+
+#ifdef PNG_READ_INT_FUNCTIONS_SUPPORTED
+/* NOTE: the read macros will obscure these definitions, so that if
+ * PNG_USE_READ_MACROS is set the library will not use them internally,
+ * but the APIs will still be available externally.
+ *
+ * The parentheses around "PNGAPI function_name" in the following three
+ * functions are necessary because they allow the macros to co-exist with
+ * these (unused but exported) functions.
+ */
+
/* Grab an unsigned 32-bit integer from a buffer in big-endian format. */
-png_uint_32 PNGAPI
-png_get_uint_32(png_bytep buf)
+png_uint_32 (PNGAPI
+png_get_uint_32)(png_const_bytep buf)
{
- png_uint_32 i = ((png_uint_32)(*buf) << 24) +
- ((png_uint_32)(*(buf + 1)) << 16) +
- ((png_uint_32)(*(buf + 2)) << 8) +
- (png_uint_32)(*(buf + 3));
+ png_uint_32 uval =
+ ((png_uint_32)(*(buf )) << 24) +
+ ((png_uint_32)(*(buf + 1)) << 16) +
+ ((png_uint_32)(*(buf + 2)) << 8) +
+ ((png_uint_32)(*(buf + 3)) ) ;
- return (i);
+ return uval;
}
/* Grab a signed 32-bit integer from a buffer in big-endian format. The
- * data is stored in the PNG file in two's complement format, and it is
- * assumed that the machine format for signed integers is the same.
+ * data is stored in the PNG file in two's complement format and there
+ * is no guarantee that a 'png_int_32' is exactly 32 bits, therefore
+ * the following code does a two's complement to native conversion.
*/
-png_int_32 PNGAPI
-png_get_int_32(png_bytep buf)
+png_int_32 (PNGAPI
+png_get_int_32)(png_const_bytep buf)
{
- png_int_32 i = ((png_int_32)(*buf) << 24) +
- ((png_int_32)(*(buf + 1)) << 16) +
- ((png_int_32)(*(buf + 2)) << 8) +
- (png_int_32)(*(buf + 3));
+ png_uint_32 uval = png_get_uint_32(buf);
+ if ((uval & 0x80000000L) == 0) /* non-negative */
+ return uval;
- return (i);
+ uval = (uval ^ 0xffffffffL) + 1; /* 2's complement: -x = ~x+1 */
+ return -(png_int_32)uval;
}
/* Grab an unsigned 16-bit integer from a buffer in big-endian format. */
-png_uint_16 PNGAPI
-png_get_uint_16(png_bytep buf)
+png_uint_16 (PNGAPI
+png_get_uint_16)(png_const_bytep buf)
+{
+ /* ANSI-C requires an int value to accomodate at least 16 bits so this
+ * works and allows the compiler not to worry about possible narrowing
+ * on 32 bit systems. (Pre-ANSI systems did not make integers smaller
+ * than 16 bits either.)
+ */
+ unsigned int val =
+ ((unsigned int)(*buf) << 8) +
+ ((unsigned int)(*(buf + 1)));
+
+ return (png_uint_16)val;
+}
+
+#endif /* PNG_READ_INT_FUNCTIONS_SUPPORTED */
+
+/* Read and check the PNG file signature */
+void /* PRIVATE */
+png_read_sig(png_structp png_ptr, png_infop info_ptr)
{
- png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) +
- (png_uint_16)(*(buf + 1)));
+ png_size_t num_checked, num_to_check;
- return (i);
+ /* Exit if the user application does not expect a signature. */
+ if (png_ptr->sig_bytes >= 8)
+ return;
+
+ num_checked = png_ptr->sig_bytes;
+ num_to_check = 8 - num_checked;
+
+#ifdef PNG_IO_STATE_SUPPORTED
+ png_ptr->io_state = PNG_IO_READING | PNG_IO_SIGNATURE;
+#endif
+
+ /* The signature must be serialized in a single I/O call. */
+ png_read_data(png_ptr, &(info_ptr->signature[num_checked]), num_to_check);
+ png_ptr->sig_bytes = 8;
+
+ if (png_sig_cmp(info_ptr->signature, num_checked, num_to_check))
+ {
+ if (num_checked < 4 &&
+ png_sig_cmp(info_ptr->signature, num_checked, num_to_check - 4))
+ png_error(png_ptr, "Not a PNG file");
+ else
+ png_error(png_ptr, "PNG file corrupted by ASCII conversion");
+ }
+ if (num_checked < 3)
+ png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
}
-#endif /* PNG_USE_READ_MACROS */
/* Read the chunk header (length + type name).
* Put the type name into png_ptr->chunk_name, and return the length.
@@ -77,33 +155,29 @@ png_read_chunk_header(png_structp png_ptr)
png_uint_32 length;
#ifdef PNG_IO_STATE_SUPPORTED
- /* Inform the I/O callback that the chunk header is being read.
- * PNG_IO_CHUNK_HDR requires a single I/O call.
- */
png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_HDR;
#endif
- /* Read the length and the chunk name */
+ /* Read the length and the chunk name.
+ * This must be performed in a single I/O call.
+ */
png_read_data(png_ptr, buf, 8);
length = png_get_uint_31(png_ptr, buf);
- /* Put the chunk name into png_ptr->chunk_name */
+ /* Put the chunk name into png_ptr->chunk_name. */
png_memcpy(png_ptr->chunk_name, buf + 4, 4);
- png_debug2(0, "Reading %s chunk, length = %lu",
- png_ptr->chunk_name, length);
+ png_debug2(0, "Reading %s chunk, length = %u",
+ png_ptr->chunk_name, length);
- /* Reset the crc and run it over the chunk name */
+ /* Reset the crc and run it over the chunk name. */
png_reset_crc(png_ptr);
png_calculate_crc(png_ptr, png_ptr->chunk_name, 4);
- /* Check to see if chunk name is valid */
+ /* Check to see if chunk name is valid. */
png_check_chunk_name(png_ptr, png_ptr->chunk_name);
#ifdef PNG_IO_STATE_SUPPORTED
- /* Inform the I/O callback that chunk data will (possibly) be read.
- * PNG_IO_CHUNK_DATA does NOT require a specific number of I/O calls.
- */
png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_DATA;
#endif
@@ -116,6 +190,7 @@ png_crc_read(png_structp png_ptr, png_bytep buf, png_size_t length)
{
if (png_ptr == NULL)
return;
+
png_read_data(png_ptr, buf, length);
png_calculate_crc(png_ptr, buf, length);
}
@@ -135,6 +210,7 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip)
{
png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
}
+
if (i)
{
png_crc_read(png_ptr, png_ptr->zbuf, i);
@@ -149,11 +225,13 @@ png_crc_finish(png_structp png_ptr, png_uint_32 skip)
{
png_chunk_warning(png_ptr, "CRC error");
}
+
else
{
png_chunk_benign_error(png_ptr, "CRC error");
return (0);
}
+
return (1);
}
@@ -176,6 +254,7 @@ png_crc_error(png_structp png_ptr)
(PNG_FLAG_CRC_ANCILLARY_USE | PNG_FLAG_CRC_ANCILLARY_NOWARN))
need_crc = 0;
}
+
else /* critical */
{
if (png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE)
@@ -183,11 +262,10 @@ png_crc_error(png_structp png_ptr)
}
#ifdef PNG_IO_STATE_SUPPORTED
- /* Inform the I/O callback that the chunk CRC is being read */
- /* PNG_IO_CHUNK_CRC requires the I/O to be done at once */
png_ptr->io_state = PNG_IO_READING | PNG_IO_CHUNK_CRC;
#endif
+ /* The chunk CRC must be serialized in a single I/O call. */
png_read_data(png_ptr, crc_bytes, 4);
if (need_crc)
@@ -195,200 +273,268 @@ png_crc_error(png_structp png_ptr)
crc = png_get_uint_32(crc_bytes);
return ((int)(crc != png_ptr->crc));
}
+
else
return (0);
}
#if defined(PNG_READ_zTXt_SUPPORTED) || defined(PNG_READ_iTXt_SUPPORTED) || \
defined(PNG_READ_iCCP_SUPPORTED)
-/*
- * Decompress trailing data in a chunk. The assumption is that chunkdata
- * points at an allocated area holding the contents of a chunk with a
- * trailing compressed part. What we get back is an allocated area
- * holding the original prefix part and an uncompressed version of the
- * trailing part (the malloc area passed in is freed).
- */
-void /* PRIVATE */
-png_decompress_chunk(png_structp png_ptr, int comp_type,
- png_size_t chunklength,
- png_size_t prefix_size, png_size_t *newlength)
+static png_size_t
+png_inflate(png_structp png_ptr, png_bytep data, png_size_t size,
+ png_bytep output, png_size_t output_size)
{
- static PNG_CONST char msg[] = "Error decoding compressed chunk";
- png_charp text;
- png_size_t text_size;
+ png_size_t count = 0;
+
+ /* zlib can't necessarily handle more than 65535 bytes at once (i.e. it can't
+ * even necessarily handle 65536 bytes) because the type uInt is "16 bits or
+ * more". Consequently it is necessary to chunk the input to zlib. This
+ * code uses ZLIB_IO_MAX, from pngpriv.h, as the maximum (the maximum value
+ * that can be stored in a uInt.) It is possible to set ZLIB_IO_MAX to a
+ * lower value in pngpriv.h and this may sometimes have a performance
+ * advantage, because it forces access of the input data to be separated from
+ * at least some of the use by some period of time.
+ */
+ png_ptr->zstream.next_in = data;
+ /* avail_in is set below from 'size' */
+ png_ptr->zstream.avail_in = 0;
- if (comp_type == PNG_COMPRESSION_TYPE_BASE)
+ while (1)
{
- int ret = Z_OK;
- png_ptr->zstream.next_in = (png_bytep)(png_ptr->chunkdata + prefix_size);
- png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size);
+ int ret, avail;
+
+ /* The setting of 'avail_in' used to be outside the loop, by setting it
+ * inside it is possible to chunk the input to zlib and simply rely on
+ * zlib to advance the 'next_in' pointer. This allows arbitrary amounts o
+ * data to be passed through zlib at the unavoidable cost of requiring a
+ * window save (memcpy of up to 32768 output bytes) every ZLIB_IO_MAX
+ * input bytes.
+ */
+ if (png_ptr->zstream.avail_in == 0 && size > 0)
+ {
+ if (size <= ZLIB_IO_MAX)
+ {
+ /* The value is less than ZLIB_IO_MAX so the cast is safe: */
+ png_ptr->zstream.avail_in = (uInt)size;
+ size = 0;
+ }
+
+ else
+ {
+ png_ptr->zstream.avail_in = ZLIB_IO_MAX;
+ size -= ZLIB_IO_MAX;
+ }
+ }
+
+ /* Reset the output buffer each time round - we empty it
+ * after every inflate call.
+ */
png_ptr->zstream.next_out = png_ptr->zbuf;
- png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
+ png_ptr->zstream.avail_out = png_ptr->zbuf_size;
- text_size = 0;
- text = NULL;
+ ret = inflate(&png_ptr->zstream, Z_NO_FLUSH);
+ avail = png_ptr->zbuf_size - png_ptr->zstream.avail_out;
- while (png_ptr->zstream.avail_in)
+ /* First copy/count any new output - but only if we didn't
+ * get an error code.
+ */
+ if ((ret == Z_OK || ret == Z_STREAM_END) && avail > 0)
{
- ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
- if (ret != Z_OK && ret != Z_STREAM_END)
- {
- if (png_ptr->zstream.msg != NULL)
- png_warning(png_ptr, png_ptr->zstream.msg);
- else
- png_warning(png_ptr, msg);
- inflateReset(&png_ptr->zstream);
- png_ptr->zstream.avail_in = 0;
+ png_size_t space = avail; /* > 0, see above */
- if (text == NULL)
- {
- text_size = prefix_size + png_sizeof(msg) + 1;
- text = (png_charp)png_malloc_warn(png_ptr, text_size);
- if (text == NULL)
- {
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
- png_error(png_ptr, "Not enough memory to decompress chunk");
- }
- png_memcpy(text, png_ptr->chunkdata, prefix_size);
- }
+ if (output != 0 && output_size > count)
+ {
+ png_size_t copy = output_size - count;
- text[text_size - 1] = 0x00;
+ if (space < copy)
+ copy = space;
- /* Copy what we can of the error message into the text chunk */
- text_size = (png_size_t)(chunklength -
- (text - png_ptr->chunkdata) - 1);
- if (text_size > png_sizeof(msg))
- text_size = png_sizeof(msg);
- png_memcpy(text + prefix_size, msg, text_size);
- break;
+ png_memcpy(output + count, png_ptr->zbuf, copy);
}
- if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END)
- {
- if (text == NULL)
- {
- text_size = prefix_size +
- png_ptr->zbuf_size - png_ptr->zstream.avail_out;
- text = (png_charp)png_malloc_warn(png_ptr, text_size + 1);
- if (text == NULL)
- {
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
- png_error(png_ptr,
- "Not enough memory to decompress chunk");
- }
- png_memcpy(text + prefix_size, png_ptr->zbuf,
- text_size - prefix_size);
- png_memcpy(text, png_ptr->chunkdata, prefix_size);
- *(text + text_size) = 0x00;
- }
- else
- {
- png_charp tmp;
+ count += space;
+ }
- tmp = text;
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- if ((png_ptr->user_chunk_cache_max != 0) &&
- (--png_ptr->user_chunk_cache_max == 0))
- {
- png_warning(png_ptr, "No space in chunk cache");
- text = NULL;
- }
+ if (ret == Z_OK)
+ continue;
- else
- {
-#endif
- text = (png_charp)png_malloc_warn(png_ptr,
- (png_size_t)(text_size +
- png_ptr->zbuf_size - png_ptr->zstream.avail_out + 1));
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
- }
+ /* Termination conditions - always reset the zstream, it
+ * must be left in inflateInit state.
+ */
+ png_ptr->zstream.avail_in = 0;
+ inflateReset(&png_ptr->zstream);
+
+ if (ret == Z_STREAM_END)
+ return count; /* NOTE: may be zero. */
+
+ /* Now handle the error codes - the API always returns 0
+ * and the error message is dumped into the uncompressed
+ * buffer if available.
+ */
+ {
+ PNG_CONST char *msg;
+#ifdef PNG_CONSOLE_IO_SUPPORTED
+ char umsg[52];
#endif
- if (text == NULL)
- {
- png_free(png_ptr, tmp);
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
- png_error(png_ptr,
- "Not enough memory to decompress chunk");
- }
- png_memcpy(text, tmp, text_size);
- png_free(png_ptr, tmp);
- png_memcpy(text + text_size, png_ptr->zbuf,
- (png_ptr->zbuf_size - png_ptr->zstream.avail_out));
- text_size += png_ptr->zbuf_size - png_ptr->zstream.avail_out;
- *(text + text_size) = 0x00;
- }
- if (ret == Z_STREAM_END)
- break;
- else
+ if (png_ptr->zstream.msg != 0)
+ msg = png_ptr->zstream.msg;
+
+ else
+ {
+#ifdef PNG_CONSOLE_IO_SUPPORTED
+ switch (ret)
{
- png_ptr->zstream.next_out = png_ptr->zbuf;
- png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
+ case Z_BUF_ERROR:
+ msg = "Buffer error in compressed datastream in %s chunk";
+ break;
+
+ case Z_DATA_ERROR:
+ msg = "Data error in compressed datastream in %s chunk";
+ break;
+
+ default:
+ msg = "Incomplete compressed datastream in %s chunk";
+ break;
}
+
+ png_snprintf(umsg, sizeof umsg, msg, png_ptr->chunk_name);
+ msg = umsg;
+#else
+ msg = "Damaged compressed datastream in chunk other than IDAT";
+#endif
}
+
+ png_warning(png_ptr, msg);
}
- if (ret != Z_STREAM_END)
- {
-#ifdef PNG_STDIO_SUPPORTED
- char umsg[52];
- if (ret == Z_BUF_ERROR)
- png_snprintf(umsg, 52,
- "Buffer error in compressed datastream in %s chunk",
- png_ptr->chunk_name);
+ /* 0 means an error - notice that this code simply ignores
+ * zero length compressed chunks as a result.
+ */
+ return 0;
+ }
+}
- else if (ret == Z_DATA_ERROR)
- png_snprintf(umsg, 52,
- "Data error in compressed datastream in %s chunk",
- png_ptr->chunk_name);
+/*
+ * Decompress trailing data in a chunk. The assumption is that chunkdata
+ * points at an allocated area holding the contents of a chunk with a
+ * trailing compressed part. What we get back is an allocated area
+ * holding the original prefix part and an uncompressed version of the
+ * trailing part (the malloc area passed in is freed).
+ */
+void /* PRIVATE */
+png_decompress_chunk(png_structp png_ptr, int comp_type,
+ png_size_t chunklength,
+ png_size_t prefix_size, png_size_t *newlength)
+{
+ /* The caller should guarantee this */
+ if (prefix_size > chunklength)
+ {
+ /* The recovery is to delete the chunk. */
+ png_warning(png_ptr, "invalid chunklength");
+ prefix_size = 0; /* To delete everything */
+ }
- else
- png_snprintf(umsg, 52,
- "Incomplete compressed datastream in %s chunk",
- png_ptr->chunk_name);
+ else if (comp_type == PNG_COMPRESSION_TYPE_BASE)
+ {
+ png_size_t expanded_size = png_inflate(png_ptr,
+ (png_bytep)(png_ptr->chunkdata + prefix_size),
+ chunklength - prefix_size,
+ 0, /*output*/
+ 0); /*output size*/
- png_warning(png_ptr, umsg);
+ /* Now check the limits on this chunk - if the limit fails the
+ * compressed data will be removed, the prefix will remain.
+ */
+#ifdef PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED
+ if (png_ptr->user_chunk_malloc_max &&
+ (prefix_size + expanded_size >= png_ptr->user_chunk_malloc_max - 1))
#else
- png_warning(png_ptr,
- "Incomplete compressed datastream in chunk other than IDAT");
+# ifdef PNG_USER_CHUNK_MALLOC_MAX
+ if ((PNG_USER_CHUNK_MALLOC_MAX > 0) &&
+ prefix_size + expanded_size >= PNG_USER_CHUNK_MALLOC_MAX - 1)
+# endif
+#endif
+ png_warning(png_ptr, "Exceeded size limit while expanding chunk");
+
+ /* If the size is zero either there was an error and a message
+ * has already been output (warning) or the size really is zero
+ * and we have nothing to do - the code will exit through the
+ * error case below.
+ */
+#if defined(PNG_SET_CHUNK_MALLOC_LIMIT_SUPPORTED) || \
+ defined(PNG_USER_CHUNK_MALLOC_MAX)
+ else if (expanded_size > 0)
+#else
+ if (expanded_size > 0)
#endif
- text_size = prefix_size;
- if (text == NULL)
+ {
+ /* Success (maybe) - really uncompress the chunk. */
+ png_size_t new_size = 0;
+ png_charp text = png_malloc_warn(png_ptr,
+ prefix_size + expanded_size + 1);
+
+ if (text != NULL)
{
- text = (png_charp)png_malloc_warn(png_ptr, text_size+1);
- if (text == NULL)
- {
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
- png_error(png_ptr, "Not enough memory for text");
- }
png_memcpy(text, png_ptr->chunkdata, prefix_size);
- }
- *(text + text_size) = 0x00;
- }
+ new_size = png_inflate(png_ptr,
+ (png_bytep)(png_ptr->chunkdata + prefix_size),
+ chunklength - prefix_size,
+ (png_bytep)(text + prefix_size), expanded_size);
+ text[prefix_size + expanded_size] = 0; /* just in case */
- inflateReset(&png_ptr->zstream);
- png_ptr->zstream.avail_in = 0;
+ if (new_size == expanded_size)
+ {
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = text;
+ *newlength = prefix_size + expanded_size;
+ return; /* The success return! */
+ }
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = text;
- *newlength=text_size;
+ png_warning(png_ptr, "png_inflate logic error");
+ png_free(png_ptr, text);
+ }
+
+ else
+ png_warning(png_ptr, "Not enough memory to decompress chunk");
+ }
}
+
else /* if (comp_type != PNG_COMPRESSION_TYPE_BASE) */
{
#ifdef PNG_STDIO_SUPPORTED
char umsg[50];
- png_snprintf(umsg, 50, "Unknown zTXt compression type %d", comp_type);
+ png_snprintf(umsg, sizeof umsg,
+ "Unknown zTXt compression type %d", comp_type);
png_warning(png_ptr, umsg);
#else
png_warning(png_ptr, "Unknown zTXt compression type");
#endif
- *(png_ptr->chunkdata + prefix_size) = 0x00;
- *newlength = prefix_size;
+ /* The recovery is to simply drop the data. */
+ }
+
+ /* Generic error return - leave the prefix, delete the compressed
+ * data, reallocate the chunkdata to remove the potentially large
+ * amount of compressed data.
+ */
+ {
+ png_charp text = png_malloc_warn(png_ptr, prefix_size + 1);
+
+ if (text != NULL)
+ {
+ if (prefix_size > 0)
+ png_memcpy(text, png_ptr->chunkdata, prefix_size);
+
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = text;
+
+ /* This is an extra zero in the 'uncompressed' part. */
+ *(png_ptr->chunkdata + prefix_size) = 0x00;
+ }
+ /* Ignore a malloc error here - it is safe. */
}
+
+ *newlength = prefix_size;
}
#endif
@@ -437,6 +583,7 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* Find number of channels */
switch (png_ptr->color_type)
{
+ default: /* invalid, png_set_IHDR calls png_error */
case PNG_COLOR_TYPE_GRAY:
case PNG_COLOR_TYPE_PALETTE:
png_ptr->channels = 1;
@@ -461,9 +608,9 @@ png_handle_IHDR(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->width);
png_debug1(3, "bit_depth = %d", png_ptr->bit_depth);
png_debug1(3, "channels = %d", png_ptr->channels);
- png_debug1(3, "rowbytes = %lu", png_ptr->rowbytes);
+ png_debug1(3, "rowbytes = %lu", (unsigned long)png_ptr->rowbytes);
png_set_IHDR(png_ptr, info_ptr, width, height, bit_depth,
- color_type, interlace_type, compression_type, filter_type);
+ color_type, interlace_type, compression_type, filter_type);
}
/* Read and check the palette */
@@ -496,10 +643,11 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR))
{
png_warning(png_ptr,
- "Ignoring PLTE chunk in grayscale PNG");
+ "Ignoring PLTE chunk in grayscale PNG");
png_crc_finish(png_ptr, length);
return;
}
+
#ifndef PNG_READ_OPT_PLTE_SUPPORTED
if (png_ptr->color_type != PNG_COLOR_TYPE_PALETTE)
{
@@ -548,7 +696,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
#endif
- /* If we actually NEED the PLTE chunk (ie for a paletted image), we do
+ /* If we actually need the PLTE chunk (ie for a paletted image), we do
* whatever the normal CRC configuration tells us. However, if we
* have an RGB image, the PLTE can be considered ancillary, so
* we will act as though it is.
@@ -559,25 +707,29 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_crc_finish(png_ptr, 0);
}
+
#ifndef PNG_READ_OPT_PLTE_SUPPORTED
else if (png_crc_error(png_ptr)) /* Only if we have a CRC error */
{
/* If we don't want to use the data from an ancillary chunk,
- we have two options: an error abort, or a warning and we
- ignore the data in this chunk (which should be OK, since
- it's considered ancillary for a RGB or RGBA image). */
+ * we have two options: an error abort, or a warning and we
+ * ignore the data in this chunk (which should be OK, since
+ * it's considered ancillary for a RGB or RGBA image).
+ */
if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_USE))
{
if (png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN)
{
png_chunk_benign_error(png_ptr, "CRC error");
}
+
else
{
png_chunk_warning(png_ptr, "CRC error");
return;
}
}
+
/* Otherwise, we (optionally) emit a warning and use the chunk. */
else if (!(png_ptr->flags & PNG_FLAG_CRC_ANCILLARY_NOWARN))
{
@@ -598,6 +750,7 @@ png_handle_PLTE(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_warning(png_ptr, "Truncating incorrect tRNS chunk length");
png_ptr->num_trans = (png_uint_16)num;
}
+
if (info_ptr->num_trans > (png_uint_16)num)
{
png_warning(png_ptr, "Truncating incorrect info tRNS chunk length");
@@ -625,9 +778,10 @@ png_handle_IEND(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_warning(png_ptr, "Incorrect IEND chunk length");
}
+
png_crc_finish(png_ptr, length);
- info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */
+ PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */
}
#ifdef PNG_READ_gAMA_SUPPORTED
@@ -635,30 +789,29 @@ void /* PRIVATE */
png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_fixed_point igamma;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- float file_gamma;
-#endif
png_byte buf[4];
png_debug(1, "in png_handle_gAMA");
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before gAMA");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid gAMA after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (png_ptr->mode & PNG_HAVE_PLTE)
/* Should be an error, but we can cope with it */
png_warning(png_ptr, "Out of place gAMA chunk");
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA)
#ifdef PNG_READ_sRGB_SUPPORTED
- && !(info_ptr->valid & PNG_INFO_sRGB)
+ && !(info_ptr->valid & PNG_INFO_sRGB)
#endif
- )
+ )
{
png_warning(png_ptr, "Duplicate gAMA chunk");
png_crc_finish(png_ptr, length);
@@ -673,41 +826,43 @@ png_handle_gAMA(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, 4);
+
if (png_crc_finish(png_ptr, 0))
return;
- igamma = (png_fixed_point)png_get_uint_32(buf);
- /* Check for zero gamma */
- if (igamma == 0)
- {
- png_warning(png_ptr,
- "Ignoring gAMA chunk with gamma=0");
- return;
- }
+ igamma = png_get_fixed_point(NULL, buf);
-#ifdef PNG_READ_sRGB_SUPPORTED
+ /* Check for zero gamma or an error. */
+ if (igamma <= 0)
+ {
+ png_warning(png_ptr,
+ "Ignoring gAMA chunk with out of range gamma");
+
+ return;
+ }
+
+# ifdef PNG_READ_sRGB_SUPPORTED
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sRGB))
+ {
if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))
{
png_warning(png_ptr,
- "Ignoring incorrect gAMA value when sRGB is also present");
-#ifdef PNG_CONSOLE_IO_SUPPORTED
+ "Ignoring incorrect gAMA value when sRGB is also present");
+
+# ifdef PNG_CONSOLE_IO_SUPPORTED
fprintf(stderr, "gamma = (%d/100000)", (int)igamma);
-#endif
+# endif
return;
}
-#endif /* PNG_READ_sRGB_SUPPORTED */
+ }
+# endif /* PNG_READ_sRGB_SUPPORTED */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- file_gamma = (float)igamma / (float)100000.0;
# ifdef PNG_READ_GAMMA_SUPPORTED
- png_ptr->gamma = file_gamma;
+ /* Gamma correction on read is supported. */
+ png_ptr->gamma = igamma;
# endif
- png_set_gAMA(png_ptr, info_ptr, file_gamma);
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
+ /* And set the 'info' structure members. */
png_set_gAMA_fixed(png_ptr, info_ptr, igamma);
-#endif
}
#endif
@@ -724,17 +879,20 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before sBIT");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid sBIT after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (png_ptr->mode & PNG_HAVE_PLTE)
{
/* Should be an error, but we can cope with it */
png_warning(png_ptr, "Out of place sBIT chunk");
}
+
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sBIT))
{
png_warning(png_ptr, "Duplicate sBIT chunk");
@@ -744,6 +902,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
truelen = 3;
+
else
truelen = (png_size_t)png_ptr->channels;
@@ -755,6 +914,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, truelen);
+
if (png_crc_finish(png_ptr, 0))
return;
@@ -765,6 +925,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->sig_bit.blue = buf[2];
png_ptr->sig_bit.alpha = buf[3];
}
+
else
{
png_ptr->sig_bit.gray = buf[0];
@@ -773,6 +934,7 @@ png_handle_sBIT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->sig_bit.blue = buf[0];
png_ptr->sig_bit.alpha = buf[1];
}
+
png_set_sBIT(png_ptr, info_ptr, &(png_ptr->sig_bit));
}
#endif
@@ -782,32 +944,29 @@ void /* PRIVATE */
png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
png_byte buf[32];
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y;
-#endif
- png_fixed_point int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,
- int_y_green, int_x_blue, int_y_blue;
-
- png_uint_32 uint_x, uint_y;
+ png_fixed_point x_white, y_white, x_red, y_red, x_green, y_green, x_blue,
+ y_blue;
png_debug(1, "in png_handle_cHRM");
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before cHRM");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid cHRM after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (png_ptr->mode & PNG_HAVE_PLTE)
/* Should be an error, but we can cope with it */
png_warning(png_ptr, "Missing PLTE before cHRM");
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM)
-#ifdef PNG_READ_sRGB_SUPPORTED
- && !(info_ptr->valid & PNG_INFO_sRGB)
-#endif
+# ifdef PNG_READ_sRGB_SUPPORTED
+ && !(info_ptr->valid & PNG_INFO_sRGB)
+# endif
)
{
png_warning(png_ptr, "Duplicate cHRM chunk");
@@ -823,81 +982,61 @@ png_handle_cHRM(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, 32);
+
if (png_crc_finish(png_ptr, 0))
return;
- uint_x = png_get_uint_32(buf);
- uint_y = png_get_uint_32(buf + 4);
- int_x_white = (png_fixed_point)uint_x;
- int_y_white = (png_fixed_point)uint_y;
-
- uint_x = png_get_uint_32(buf + 8);
- uint_y = png_get_uint_32(buf + 12);
- int_x_red = (png_fixed_point)uint_x;
- int_y_red = (png_fixed_point)uint_y;
-
- uint_x = png_get_uint_32(buf + 16);
- uint_y = png_get_uint_32(buf + 20);
- int_x_green = (png_fixed_point)uint_x;
- int_y_green = (png_fixed_point)uint_y;
-
- uint_x = png_get_uint_32(buf + 24);
- uint_y = png_get_uint_32(buf + 28);
- int_x_blue = (png_fixed_point)uint_x;
- int_y_blue = (png_fixed_point)uint_y;
+ x_white = png_get_fixed_point(NULL, buf);
+ y_white = png_get_fixed_point(NULL, buf + 4);
+ x_red = png_get_fixed_point(NULL, buf + 8);
+ y_red = png_get_fixed_point(NULL, buf + 12);
+ x_green = png_get_fixed_point(NULL, buf + 16);
+ y_green = png_get_fixed_point(NULL, buf + 20);
+ x_blue = png_get_fixed_point(NULL, buf + 24);
+ y_blue = png_get_fixed_point(NULL, buf + 28);
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- white_x = (float)int_x_white / (float)100000.0;
- white_y = (float)int_y_white / (float)100000.0;
- red_x = (float)int_x_red / (float)100000.0;
- red_y = (float)int_y_red / (float)100000.0;
- green_x = (float)int_x_green / (float)100000.0;
- green_y = (float)int_y_green / (float)100000.0;
- blue_x = (float)int_x_blue / (float)100000.0;
- blue_y = (float)int_y_blue / (float)100000.0;
-#endif
+ if (x_white == PNG_FIXED_ERROR ||
+ y_white == PNG_FIXED_ERROR ||
+ x_red == PNG_FIXED_ERROR ||
+ y_red == PNG_FIXED_ERROR ||
+ x_green == PNG_FIXED_ERROR ||
+ y_green == PNG_FIXED_ERROR ||
+ x_blue == PNG_FIXED_ERROR ||
+ y_blue == PNG_FIXED_ERROR)
+ {
+ png_warning(png_ptr, "Ignoring cHRM chunk with negative chromaticities");
+ return;
+ }
#ifdef PNG_READ_sRGB_SUPPORTED
if ((info_ptr != NULL) && (info_ptr->valid & PNG_INFO_sRGB))
+ {
+ if (PNG_OUT_OF_RANGE(x_white, 31270, 1000) ||
+ PNG_OUT_OF_RANGE(y_white, 32900, 1000) ||
+ PNG_OUT_OF_RANGE(x_red, 64000L, 1000) ||
+ PNG_OUT_OF_RANGE(y_red, 33000, 1000) ||
+ PNG_OUT_OF_RANGE(x_green, 30000, 1000) ||
+ PNG_OUT_OF_RANGE(y_green, 60000L, 1000) ||
+ PNG_OUT_OF_RANGE(x_blue, 15000, 1000) ||
+ PNG_OUT_OF_RANGE(y_blue, 6000, 1000))
{
- if (PNG_OUT_OF_RANGE(int_x_white, 31270, 1000) ||
- PNG_OUT_OF_RANGE(int_y_white, 32900, 1000) ||
- PNG_OUT_OF_RANGE(int_x_red, 64000L, 1000) ||
- PNG_OUT_OF_RANGE(int_y_red, 33000, 1000) ||
- PNG_OUT_OF_RANGE(int_x_green, 30000, 1000) ||
- PNG_OUT_OF_RANGE(int_y_green, 60000L, 1000) ||
- PNG_OUT_OF_RANGE(int_x_blue, 15000, 1000) ||
- PNG_OUT_OF_RANGE(int_y_blue, 6000, 1000))
- {
- png_warning(png_ptr,
- "Ignoring incorrect cHRM value when sRGB is also present");
+ png_warning(png_ptr,
+ "Ignoring incorrect cHRM value when sRGB is also present");
+
#ifdef PNG_CONSOLE_IO_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- fprintf(stderr, "wx=%f, wy=%f, rx=%f, ry=%f\n",
- white_x, white_y, red_x, red_y);
- fprintf(stderr, "gx=%f, gy=%f, bx=%f, by=%f\n",
- green_x, green_y, blue_x, blue_y);
-#else
- fprintf(stderr, "wx=%ld, wy=%ld, rx=%ld, ry=%ld\n",
- int_x_white, int_y_white, int_x_red, int_y_red);
- fprintf(stderr, "gx=%ld, gy=%ld, bx=%ld, by=%ld\n",
- int_x_green, int_y_green, int_x_blue, int_y_blue);
-#endif
+ fprintf(stderr, "wx=%d, wy=%d, rx=%d, ry=%d\n",
+ x_white, y_white, x_red, y_red);
+
+ fprintf(stderr, "gx=%d, gy=%d, bx=%d, by=%d\n",
+ x_green, y_green, x_blue, y_blue);
#endif /* PNG_CONSOLE_IO_SUPPORTED */
- }
- return;
}
+ return;
+ }
#endif /* PNG_READ_sRGB_SUPPORTED */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- png_set_cHRM(png_ptr, info_ptr,
- white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
- png_set_cHRM_fixed(png_ptr, info_ptr,
- int_x_white, int_y_white, int_x_red, int_y_red, int_x_green,
- int_y_green, int_x_blue, int_y_blue);
-#endif
+ png_set_cHRM_fixed(png_ptr, info_ptr, x_white, y_white, x_red, y_red,
+ x_green, y_green, x_blue, y_blue);
}
#endif
@@ -912,12 +1051,14 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before sRGB");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid sRGB after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (png_ptr->mode & PNG_HAVE_PLTE)
/* Should be an error, but we can cope with it */
png_warning(png_ptr, "Out of place sRGB chunk");
@@ -937,10 +1078,12 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, 1);
+
if (png_crc_finish(png_ptr, 0))
return;
intent = buf[0];
+
/* Check for bad intent */
if (intent >= PNG_sRGB_INTENT_LAST)
{
@@ -951,48 +1094,31 @@ png_handle_sRGB(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#if defined(PNG_READ_gAMA_SUPPORTED) && defined(PNG_READ_GAMMA_SUPPORTED)
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_gAMA))
{
- png_fixed_point igamma;
-#ifdef PNG_FIXED_POINT_SUPPORTED
- igamma=info_ptr->int_gamma;
-#else
-# ifdef PNG_FLOATING_POINT_SUPPORTED
- igamma=(png_fixed_point)(info_ptr->gamma * 100000.);
-# endif
-#endif
- if (PNG_OUT_OF_RANGE(igamma, 45500L, 500))
+ if (PNG_OUT_OF_RANGE(info_ptr->gamma, 45500L, 500))
{
png_warning(png_ptr,
- "Ignoring incorrect gAMA value when sRGB is also present");
+ "Ignoring incorrect gAMA value when sRGB is also present");
#ifdef PNG_CONSOLE_IO_SUPPORTED
-# ifdef PNG_FIXED_POINT_SUPPORTED
- fprintf(stderr, "incorrect gamma=(%d/100000)\n",
- (int)png_ptr->int_gamma);
-# else
-# ifdef PNG_FLOATING_POINT_SUPPORTED
- fprintf(stderr, "incorrect gamma=%f\n", png_ptr->gamma);
-# endif
-# endif
+ fprintf(stderr, "incorrect gamma=(%d/100000)\n", info_ptr->gamma);
#endif
}
}
#endif /* PNG_READ_gAMA_SUPPORTED */
#ifdef PNG_READ_cHRM_SUPPORTED
-#ifdef PNG_FIXED_POINT_SUPPORTED
if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_cHRM))
- if (PNG_OUT_OF_RANGE(info_ptr->int_x_white, 31270, 1000) ||
- PNG_OUT_OF_RANGE(info_ptr->int_y_white, 32900, 1000) ||
- PNG_OUT_OF_RANGE(info_ptr->int_x_red, 64000L, 1000) ||
- PNG_OUT_OF_RANGE(info_ptr->int_y_red, 33000, 1000) ||
- PNG_OUT_OF_RANGE(info_ptr->int_x_green, 30000, 1000) ||
- PNG_OUT_OF_RANGE(info_ptr->int_y_green, 60000L, 1000) ||
- PNG_OUT_OF_RANGE(info_ptr->int_x_blue, 15000, 1000) ||
- PNG_OUT_OF_RANGE(info_ptr->int_y_blue, 6000, 1000))
- {
- png_warning(png_ptr,
- "Ignoring incorrect cHRM value when sRGB is also present");
- }
-#endif /* PNG_FIXED_POINT_SUPPORTED */
+ if (PNG_OUT_OF_RANGE(info_ptr->x_white, 31270, 1000) ||
+ PNG_OUT_OF_RANGE(info_ptr->y_white, 32900, 1000) ||
+ PNG_OUT_OF_RANGE(info_ptr->x_red, 64000L, 1000) ||
+ PNG_OUT_OF_RANGE(info_ptr->y_red, 33000, 1000) ||
+ PNG_OUT_OF_RANGE(info_ptr->x_green, 30000, 1000) ||
+ PNG_OUT_OF_RANGE(info_ptr->y_green, 60000L, 1000) ||
+ PNG_OUT_OF_RANGE(info_ptr->x_blue, 15000, 1000) ||
+ PNG_OUT_OF_RANGE(info_ptr->y_blue, 6000, 1000))
+ {
+ png_warning(png_ptr,
+ "Ignoring incorrect cHRM value when sRGB is also present");
+ }
#endif /* PNG_READ_cHRM_SUPPORTED */
png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, intent);
@@ -1008,19 +1134,22 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_bytep pC;
png_charp profile;
png_uint_32 skip = 0;
- png_uint_32 profile_size, profile_length;
+ png_uint_32 profile_size;
+ png_alloc_size_t profile_length;
png_size_t slength, prefix_length, data_length;
png_debug(1, "in png_handle_iCCP");
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before iCCP");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid iCCP after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (png_ptr->mode & PNG_HAVE_PLTE)
/* Should be an error, but we can cope with it */
png_warning(png_ptr, "Out of place iCCP chunk");
@@ -1063,7 +1192,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* There should be at least one zero (the compression type byte)
* following the separator, and we should be on it
*/
- if ( profile >= png_ptr->chunkdata + slength - 1)
+ if (profile >= png_ptr->chunkdata + slength - 1)
{
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
@@ -1073,6 +1202,7 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* Compression_type should always be zero */
compression_type = *profile++;
+
if (compression_type)
{
png_warning(png_ptr, "Ignoring nonzero compression type in iCCP chunk");
@@ -1082,11 +1212,11 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
prefix_length = profile - png_ptr->chunkdata;
png_decompress_chunk(png_ptr, compression_type,
- slength, prefix_length, &data_length);
+ slength, prefix_length, &data_length);
profile_length = data_length - prefix_length;
- if ( prefix_length > data_length || profile_length < 4)
+ if (prefix_length > data_length || profile_length < 4)
{
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
@@ -1096,24 +1226,43 @@ png_handle_iCCP(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* Check the profile_size recorded in the first 32 bits of the ICC profile */
pC = (png_bytep)(png_ptr->chunkdata + prefix_length);
- profile_size = ((*(pC ))<<24) |
- ((*(pC + 1))<<16) |
- ((*(pC + 2))<< 8) |
- ((*(pC + 3)) );
+ profile_size = ((*(pC )) << 24) |
+ ((*(pC + 1)) << 16) |
+ ((*(pC + 2)) << 8) |
+ ((*(pC + 3)) );
+ /* NOTE: the following guarantees that 'profile_length' fits into 32 bits,
+ * because profile_size is a 32 bit value.
+ */
if (profile_size < profile_length)
profile_length = profile_size;
+ /* And the following guarantees that profile_size == profile_length. */
if (profile_size > profile_length)
{
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
- png_warning(png_ptr, "Ignoring truncated iCCP profile");
+#ifdef PNG_STDIO_SUPPORTED
+ {
+ char umsg[80];
+
+ png_snprintf2(umsg, 80,
+ "Ignoring iCCP chunk with declared size = %u "
+ "and actual length = %u",
+ (unsigned int) profile_size,
+ (unsigned int) profile_length);
+ png_warning(png_ptr, umsg);
+ }
+#else
+ png_warning(png_ptr,
+ "Ignoring iCCP chunk with uncompressed size mismatch");
+#endif
return;
}
png_set_iCCP(png_ptr, info_ptr, png_ptr->chunkdata,
- compression_type, png_ptr->chunkdata + prefix_length, profile_length);
+ compression_type, (png_bytep)png_ptr->chunkdata + prefix_length,
+ profile_size);
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
}
@@ -1129,13 +1278,16 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#ifdef PNG_POINTER_INDEXING_SUPPORTED
png_sPLT_entryp pp;
#endif
- int data_length, entry_size, i;
+ png_uint_32 data_length;
+ int entry_size, i;
png_uint_32 skip = 0;
png_size_t slength;
+ png_uint_32 dl;
+ png_size_t max_dl;
png_debug(1, "in png_handle_sPLT");
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+#ifdef PNG_USER_LIMITS_SUPPORTED
if (png_ptr->user_chunk_cache_max != 0)
{
@@ -1144,6 +1296,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, length);
return;
}
+
if (--png_ptr->user_chunk_cache_max == 1)
{
png_warning(png_ptr, "No space in chunk cache for sPLT");
@@ -1155,6 +1308,7 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before sPLT");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid sPLT after IDAT");
@@ -1173,6 +1327,11 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = (png_charp)png_malloc(png_ptr, length + 1);
+
+ /* WARNING: this may break if size_t is less than 32 bits; it is assumed
+ * that the PNG_MAX_MALLOC_64K test is enabled in this case, but this is a
+ * potential breakage point if the types in pngconf.h aren't exactly right.
+ */
slength = (png_size_t)length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
@@ -1185,8 +1344,10 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata[slength] = 0x00;
- for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start; entry_start++)
+ for (entry_start = (png_bytep)png_ptr->chunkdata; *entry_start;
+ entry_start++)
/* Empty loop to find end of name */ ;
+
++entry_start;
/* A sample depth should follow the separator, and we should be on it */
@@ -1200,7 +1361,12 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
new_palette.depth = *entry_start++;
entry_size = (new_palette.depth == 8 ? 6 : 10);
- data_length = (slength - (entry_start - (png_bytep)png_ptr->chunkdata));
+ /* This must fit in a png_uint_32 because it is derived from the original
+ * chunk data length (and use 'length', not 'slength' here for clarity -
+ * they are guaranteed to be the same, see the tests above.)
+ */
+ data_length = length - (png_uint_32)(entry_start -
+ (png_bytep)png_ptr->chunkdata);
/* Integrity-check the data length */
if (data_length % entry_size)
@@ -1211,15 +1377,20 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return;
}
- new_palette.nentries = (png_int_32) ( data_length / entry_size);
- if ((png_uint_32) new_palette.nentries >
- (png_uint_32) (PNG_SIZE_MAX / png_sizeof(png_sPLT_entry)))
+ dl = (png_int_32)(data_length / entry_size);
+ max_dl = PNG_SIZE_MAX / png_sizeof(png_sPLT_entry);
+
+ if (dl > max_dl)
{
png_warning(png_ptr, "sPLT chunk too long");
return;
}
+
+ new_palette.nentries = (png_int_32)(data_length / entry_size);
+
new_palette.entries = (png_sPLT_entryp)png_malloc_warn(
png_ptr, new_palette.nentries * png_sizeof(png_sPLT_entry));
+
if (new_palette.entries == NULL)
{
png_warning(png_ptr, "sPLT chunk requires too much memory");
@@ -1233,39 +1404,44 @@ png_handle_sPLT(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (new_palette.depth == 8)
{
- pp->red = *entry_start++;
- pp->green = *entry_start++;
- pp->blue = *entry_start++;
- pp->alpha = *entry_start++;
+ pp->red = *entry_start++;
+ pp->green = *entry_start++;
+ pp->blue = *entry_start++;
+ pp->alpha = *entry_start++;
}
+
else
{
- pp->red = png_get_uint_16(entry_start); entry_start += 2;
- pp->green = png_get_uint_16(entry_start); entry_start += 2;
- pp->blue = png_get_uint_16(entry_start); entry_start += 2;
- pp->alpha = png_get_uint_16(entry_start); entry_start += 2;
+ pp->red = png_get_uint_16(entry_start); entry_start += 2;
+ pp->green = png_get_uint_16(entry_start); entry_start += 2;
+ pp->blue = png_get_uint_16(entry_start); entry_start += 2;
+ pp->alpha = png_get_uint_16(entry_start); entry_start += 2;
}
+
pp->frequency = png_get_uint_16(entry_start); entry_start += 2;
}
#else
pp = new_palette.entries;
+
for (i = 0; i < new_palette.nentries; i++)
{
if (new_palette.depth == 8)
{
- pp[i].red = *entry_start++;
- pp[i].green = *entry_start++;
- pp[i].blue = *entry_start++;
- pp[i].alpha = *entry_start++;
+ pp[i].red = *entry_start++;
+ pp[i].green = *entry_start++;
+ pp[i].blue = *entry_start++;
+ pp[i].alpha = *entry_start++;
}
+
else
{
- pp[i].red = png_get_uint_16(entry_start); entry_start += 2;
- pp[i].green = png_get_uint_16(entry_start); entry_start += 2;
- pp[i].blue = png_get_uint_16(entry_start); entry_start += 2;
- pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2;
+ pp[i].red = png_get_uint_16(entry_start); entry_start += 2;
+ pp[i].green = png_get_uint_16(entry_start); entry_start += 2;
+ pp[i].blue = png_get_uint_16(entry_start); entry_start += 2;
+ pp[i].alpha = png_get_uint_16(entry_start); entry_start += 2;
}
+
pp->frequency = png_get_uint_16(entry_start); entry_start += 2;
}
#endif
@@ -1291,12 +1467,14 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before tRNS");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid tRNS after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tRNS))
{
png_warning(png_ptr, "Duplicate tRNS chunk");
@@ -1319,6 +1497,7 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->num_trans = 1;
png_ptr->trans_color.gray = png_get_uint_16(buf);
}
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
{
png_byte buf[6];
@@ -1329,12 +1508,14 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, length);
return;
}
+
png_crc_read(png_ptr, buf, (png_size_t)length);
png_ptr->num_trans = 1;
png_ptr->trans_color.red = png_get_uint_16(buf);
png_ptr->trans_color.green = png_get_uint_16(buf + 2);
png_ptr->trans_color.blue = png_get_uint_16(buf + 4);
}
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
if (!(png_ptr->mode & PNG_HAVE_PLTE))
@@ -1342,6 +1523,7 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* Should be an error, but we can cope with it. */
png_warning(png_ptr, "Missing PLTE before tRNS");
}
+
if (length > (png_uint_32)png_ptr->num_palette ||
length > PNG_MAX_PALETTE_LENGTH)
{
@@ -1349,15 +1531,18 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, length);
return;
}
+
if (length == 0)
{
png_warning(png_ptr, "Zero length tRNS chunk");
png_crc_finish(png_ptr, length);
return;
}
+
png_crc_read(png_ptr, readbuf, (png_size_t)length);
png_ptr->num_trans = (png_uint_16)length;
}
+
else
{
png_warning(png_ptr, "tRNS chunk not allowed with alpha channel");
@@ -1372,7 +1557,7 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans,
- &(png_ptr->trans_color));
+ &(png_ptr->trans_color));
}
#endif
@@ -1387,19 +1572,22 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before bKGD");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid bKGD after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
- !(png_ptr->mode & PNG_HAVE_PLTE))
+ !(png_ptr->mode & PNG_HAVE_PLTE))
{
png_warning(png_ptr, "Missing PLTE before bKGD");
png_crc_finish(png_ptr, length);
return;
}
+
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_bKGD))
{
png_warning(png_ptr, "Duplicate bKGD chunk");
@@ -1409,8 +1597,10 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
truelen = 1;
+
else if (png_ptr->color_type & PNG_COLOR_MASK_COLOR)
truelen = 6;
+
else
truelen = 2;
@@ -1422,31 +1612,38 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, truelen);
+
if (png_crc_finish(png_ptr, 0))
return;
/* We convert the index value into RGB components so that we can allow
* arbitrary RGB values for background when we have transparency, and
* so it is easy to determine the RGB values of the background color
- * from the info_ptr struct. */
+ * from the info_ptr struct.
+ */
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
png_ptr->background.index = buf[0];
+
if (info_ptr && info_ptr->num_palette)
{
- if (buf[0] >= info_ptr->num_palette)
- {
- png_warning(png_ptr, "Incorrect bKGD chunk index value");
- return;
- }
- png_ptr->background.red =
+ if (buf[0] >= info_ptr->num_palette)
+ {
+ png_warning(png_ptr, "Incorrect bKGD chunk index value");
+ return;
+ }
+
+ png_ptr->background.red =
(png_uint_16)png_ptr->palette[buf[0]].red;
- png_ptr->background.green =
+
+ png_ptr->background.green =
(png_uint_16)png_ptr->palette[buf[0]].green;
- png_ptr->background.blue =
+
+ png_ptr->background.blue =
(png_uint_16)png_ptr->palette[buf[0]].blue;
}
}
+
else if (!(png_ptr->color_type & PNG_COLOR_MASK_COLOR)) /* GRAY */
{
png_ptr->background.red =
@@ -1454,6 +1651,7 @@ png_handle_bKGD(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->background.blue =
png_ptr->background.gray = png_get_uint_16(buf);
}
+
else
{
png_ptr->background.red = png_get_uint_16(buf);
@@ -1476,18 +1674,21 @@ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before hIST");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid hIST after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (!(png_ptr->mode & PNG_HAVE_PLTE))
{
png_warning(png_ptr, "Missing PLTE before hIST");
png_crc_finish(png_ptr, length);
return;
}
+
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_hIST))
{
png_warning(png_ptr, "Duplicate hIST chunk");
@@ -1496,8 +1697,9 @@ png_handle_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
num = length / 2 ;
- if (num != (unsigned int) png_ptr->num_palette || num >
- (unsigned int) PNG_MAX_PALETTE_LENGTH)
+
+ if (num != (unsigned int)png_ptr->num_palette || num >
+ (unsigned int)PNG_MAX_PALETTE_LENGTH)
{
png_warning(png_ptr, "Incorrect hIST chunk length");
png_crc_finish(png_ptr, length);
@@ -1531,12 +1733,14 @@ png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before pHYs");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid pHYs after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pHYs))
{
png_warning(png_ptr, "Duplicate pHYs chunk");
@@ -1552,6 +1756,7 @@ png_handle_pHYs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, 9);
+
if (png_crc_finish(png_ptr, 0))
return;
@@ -1574,12 +1779,14 @@ png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before oFFs");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid oFFs after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_oFFs))
{
png_warning(png_ptr, "Duplicate oFFs chunk");
@@ -1595,6 +1802,7 @@ png_handle_oFFs(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, 9);
+
if (png_crc_finish(png_ptr, 0))
return;
@@ -1621,12 +1829,14 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before pCAL");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid pCAL after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_pCAL))
{
png_warning(png_ptr, "Duplicate pCAL chunk");
@@ -1634,15 +1844,17 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return;
}
- png_debug1(2, "Allocating and reading pCAL chunk data (%lu bytes)",
- length + 1);
+ png_debug1(2, "Allocating and reading pCAL chunk data (%u bytes)",
+ length + 1);
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
+
if (png_ptr->chunkdata == NULL)
- {
- png_warning(png_ptr, "No memory for pCAL purpose");
- return;
- }
+ {
+ png_warning(png_ptr, "No memory for pCAL purpose");
+ return;
+ }
+
slength = (png_size_t)length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
@@ -1662,7 +1874,8 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
endptr = png_ptr->chunkdata + slength;
/* We need to have at least 12 bytes after the purpose string
- in order to get the parameter information. */
+ * in order to get the parameter information.
+ */
if (endptr <= buf + 12)
{
png_warning(png_ptr, "Invalid pCAL data");
@@ -1680,7 +1893,8 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(3, "Checking pCAL equation type and number of parameters");
/* Check that we have the right number of parameters for known
- equation types. */
+ * equation types.
+ */
if ((type == PNG_EQUATION_LINEAR && nparams != 2) ||
(type == PNG_EQUATION_BASE_E && nparams != 3) ||
(type == PNG_EQUATION_ARBITRARY && nparams != 3) ||
@@ -1691,6 +1905,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata = NULL;
return;
}
+
else if (type >= PNG_EQUATION_LAST)
{
png_warning(png_ptr, "Unrecognized equation type for pCAL chunk");
@@ -1700,15 +1915,17 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
/* Empty loop to move past the units string. */ ;
png_debug(3, "Allocating pCAL parameters array");
+
params = (png_charpp)png_malloc_warn(png_ptr,
- (png_size_t)(nparams * png_sizeof(png_charp)));
+ (png_size_t)(nparams * png_sizeof(png_charp)));
+
if (params == NULL)
- {
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
- png_warning(png_ptr, "No memory for pCAL params");
- return;
- }
+ {
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = NULL;
+ png_warning(png_ptr, "No memory for pCAL params");
+ return;
+ }
/* Get pointers to the start of each parameter string. */
for (i = 0; i < (int)nparams; i++)
@@ -1716,6 +1933,7 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
buf++; /* Skip the null string terminator from previous parameter. */
png_debug1(3, "Reading pCAL parameter %d", i);
+
for (params[i] = buf; buf <= endptr && *buf != 0x00; buf++)
/* Empty loop to move past each parameter string */ ;
@@ -1744,27 +1962,21 @@ png_handle_pCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
void /* PRIVATE */
png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
- png_charp ep;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- double width, height;
- png_charp vp;
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
- png_charp swidth, sheight;
-#endif
-#endif
- png_size_t slength;
+ png_size_t slength, i;
+ int state;
png_debug(1, "in png_handle_sCAL");
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Missing IHDR before sCAL");
+
else if (png_ptr->mode & PNG_HAVE_IDAT)
{
png_warning(png_ptr, "Invalid sCAL after IDAT");
png_crc_finish(png_ptr, length);
return;
}
+
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_sCAL))
{
png_warning(png_ptr, "Duplicate sCAL chunk");
@@ -1772,16 +1984,21 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return;
}
- png_debug1(2, "Allocating and reading sCAL chunk data (%lu bytes)",
+ png_debug1(2, "Allocating and reading sCAL chunk data (%u bytes)",
length + 1);
+
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
+
if (png_ptr->chunkdata == NULL)
{
png_warning(png_ptr, "Out of memory while processing sCAL chunk");
+ png_crc_finish(png_ptr, length);
return;
}
+
slength = (png_size_t)length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
+ png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */
if (png_crc_finish(png_ptr, 0))
{
@@ -1790,95 +2007,44 @@ png_handle_sCAL(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
return;
}
- png_ptr->chunkdata[slength] = 0x00; /* Null terminate the last string */
-
- ep = png_ptr->chunkdata + 1; /* Skip unit byte */
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- width = png_strtod(png_ptr, ep, &vp);
- if (*vp)
- {
- png_warning(png_ptr, "malformed width string in sCAL chunk");
- return;
- }
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
- swidth = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1);
- if (swidth == NULL)
- {
- png_warning(png_ptr, "Out of memory while processing sCAL chunk width");
- return;
- }
- png_memcpy(swidth, ep, png_strlen(ep));
-#endif
-#endif
-
- for (ep = png_ptr->chunkdata; *ep; ep++)
- /* Empty loop */ ;
- ep++;
-
- if (png_ptr->chunkdata + slength < ep)
+ /* Validate the unit. */
+ if (png_ptr->chunkdata[0] != 1 && png_ptr->chunkdata[0] != 2)
{
- png_warning(png_ptr, "Truncated sCAL chunk");
-#if defined(PNG_FIXED_POINT_SUPPORTED) && \
- !defined(PNG_FLOATING_POINT_SUPPORTED)
- png_free(png_ptr, swidth);
-#endif
+ png_warning(png_ptr, "Invalid sCAL ignored: invalid unit");
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
return;
}
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- height = png_strtod(png_ptr, ep, &vp);
- if (*vp)
- {
- png_warning(png_ptr, "malformed height string in sCAL chunk");
- return;
- }
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
- sheight = (png_charp)png_malloc_warn(png_ptr, png_strlen(ep) + 1);
- if (sheight == NULL)
- {
- png_warning(png_ptr, "Out of memory while processing sCAL chunk height");
- return;
- }
- png_memcpy(sheight, ep, png_strlen(ep));
-#endif
-#endif
+ /* Validate the ASCII numbers, need two ASCII numbers separated by
+ * a '\0' and they need to fit exactly in the chunk data.
+ */
+ i = 0;
+ state = 0;
- if (png_ptr->chunkdata + slength < ep
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- || width <= 0. || height <= 0.
-#endif
- )
+ if (png_ptr->chunkdata[1] == 45 /* negative width */ ||
+ !png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) ||
+ i >= slength || png_ptr->chunkdata[i++] != 0)
+ png_warning(png_ptr, "Invalid sCAL chunk ignored: bad width format");
+
+ else
{
- png_warning(png_ptr, "Invalid sCAL data");
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
-#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
- png_free(png_ptr, swidth);
- png_free(png_ptr, sheight);
-#endif
- return;
- }
+ png_size_t heighti = i;
+ if (png_ptr->chunkdata[i] == 45 /* negative height */ ||
+ !png_check_fp_number(png_ptr->chunkdata, slength, &state, &i) ||
+ i != slength)
+ png_warning(png_ptr, "Invalid sCAL chunk ignored: bad height format");
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- png_set_sCAL(png_ptr, info_ptr, png_ptr->chunkdata[0], width, height);
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
- png_set_sCAL_s(png_ptr, info_ptr, png_ptr->chunkdata[0], swidth, sheight);
-#endif
-#endif
+ else
+ /* This is the (only) success case. */
+ png_set_sCAL_s(png_ptr, info_ptr, png_ptr->chunkdata[0],
+ png_ptr->chunkdata+1, png_ptr->chunkdata+heighti);
+ }
+ /* Clean up - just free the temporarily allocated buffer. */
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
-#if defined(PNG_FIXED_POINT_SUPPORTED) && !defined(PNG_FLOATING_POINT_SUPPORTED)
- png_free(png_ptr, swidth);
- png_free(png_ptr, sheight);
-#endif
}
#endif
@@ -1893,6 +2059,7 @@ png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (!(png_ptr->mode & PNG_HAVE_IHDR))
png_error(png_ptr, "Out of place tIME chunk");
+
else if (info_ptr != NULL && (info_ptr->valid & PNG_INFO_tIME))
{
png_warning(png_ptr, "Duplicate tIME chunk");
@@ -1911,6 +2078,7 @@ png_handle_tIME(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
png_crc_read(png_ptr, buf, 7);
+
if (png_crc_finish(png_ptr, 0))
return;
@@ -1939,7 +2107,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_tEXt");
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+#ifdef PNG_USER_LIMITS_SUPPORTED
if (png_ptr->user_chunk_cache_max != 0)
{
if (png_ptr->user_chunk_cache_max == 1)
@@ -1947,6 +2115,7 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, length);
return;
}
+
if (--png_ptr->user_chunk_cache_max == 1)
{
png_warning(png_ptr, "No space in chunk cache for tEXt");
@@ -1974,11 +2143,13 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
+
if (png_ptr->chunkdata == NULL)
{
png_warning(png_ptr, "No memory to process text chunk");
return;
}
+
slength = (png_size_t)length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
@@ -2000,21 +2171,21 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
text++;
text_ptr = (png_textp)png_malloc_warn(png_ptr,
- png_sizeof(png_text));
+ png_sizeof(png_text));
+
if (text_ptr == NULL)
{
- png_warning(png_ptr, "Not enough memory to process text chunk");
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
- return;
+ png_warning(png_ptr, "Not enough memory to process text chunk");
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = NULL;
+ return;
}
+
text_ptr->compression = PNG_TEXT_COMPRESSION_NONE;
text_ptr->key = key;
-#ifdef PNG_iTXt_SUPPORTED
text_ptr->lang = NULL;
text_ptr->lang_key = NULL;
text_ptr->itxt_length = 0;
-#endif
text_ptr->text = text;
text_ptr->text_length = png_strlen(text);
@@ -2023,8 +2194,9 @@ png_handle_tEXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
png_free(png_ptr, text_ptr);
+
if (ret)
- png_warning(png_ptr, "Insufficient memory to process text chunk");
+ png_warning(png_ptr, "Insufficient memory to process text chunk");
}
#endif
@@ -2041,7 +2213,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_zTXt");
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+#ifdef PNG_USER_LIMITS_SUPPORTED
if (png_ptr->user_chunk_cache_max != 0)
{
if (png_ptr->user_chunk_cache_max == 1)
@@ -2049,6 +2221,7 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, length);
return;
}
+
if (--png_ptr->user_chunk_cache_max == 1)
{
png_warning(png_ptr, "No space in chunk cache for zTXt");
@@ -2066,24 +2239,28 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#ifdef PNG_MAX_MALLOC_64K
/* We will no doubt have problems with chunks even half this size, but
- there is no hard and fast rule to tell us where to stop. */
+ * there is no hard and fast rule to tell us where to stop.
+ */
if (length > (png_uint_32)65535L)
{
- png_warning(png_ptr, "zTXt chunk too large to fit in memory");
- png_crc_finish(png_ptr, length);
- return;
+ png_warning(png_ptr, "zTXt chunk too large to fit in memory");
+ png_crc_finish(png_ptr, length);
+ return;
}
#endif
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
+
if (png_ptr->chunkdata == NULL)
{
- png_warning(png_ptr, "Out of memory processing zTXt chunk");
- return;
+ png_warning(png_ptr, "Out of memory processing zTXt chunk");
+ return;
}
+
slength = (png_size_t)length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
+
if (png_crc_finish(png_ptr, 0))
{
png_free(png_ptr, png_ptr->chunkdata);
@@ -2104,37 +2281,41 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata = NULL;
return;
}
+
else
{
comp_type = *(++text);
+
if (comp_type != PNG_TEXT_COMPRESSION_zTXt)
{
png_warning(png_ptr, "Unknown compression type in zTXt chunk");
comp_type = PNG_TEXT_COMPRESSION_zTXt;
}
+
text++; /* Skip the compression_method byte */
}
+
prefix_len = text - png_ptr->chunkdata;
png_decompress_chunk(png_ptr, comp_type,
- (png_size_t)length, prefix_len, &data_len);
+ (png_size_t)length, prefix_len, &data_len);
text_ptr = (png_textp)png_malloc_warn(png_ptr,
- png_sizeof(png_text));
+ png_sizeof(png_text));
+
if (text_ptr == NULL)
{
- png_warning(png_ptr, "Not enough memory to process zTXt chunk");
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
- return;
+ png_warning(png_ptr, "Not enough memory to process zTXt chunk");
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = NULL;
+ return;
}
+
text_ptr->compression = comp_type;
text_ptr->key = png_ptr->chunkdata;
-#ifdef PNG_iTXt_SUPPORTED
text_ptr->lang = NULL;
text_ptr->lang_key = NULL;
text_ptr->itxt_length = 0;
-#endif
text_ptr->text = png_ptr->chunkdata + prefix_len;
text_ptr->text_length = data_len;
@@ -2143,8 +2324,9 @@ png_handle_zTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_free(png_ptr, text_ptr);
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
+
if (ret)
- png_error(png_ptr, "Insufficient memory to store zTXt chunk");
+ png_error(png_ptr, "Insufficient memory to store zTXt chunk");
}
#endif
@@ -2162,7 +2344,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_iTXt");
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+#ifdef PNG_USER_LIMITS_SUPPORTED
if (png_ptr->user_chunk_cache_max != 0)
{
if (png_ptr->user_chunk_cache_max == 1)
@@ -2170,6 +2352,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, length);
return;
}
+
if (--png_ptr->user_chunk_cache_max == 1)
{
png_warning(png_ptr, "No space in chunk cache for iTXt");
@@ -2187,24 +2370,28 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#ifdef PNG_MAX_MALLOC_64K
/* We will no doubt have problems with chunks even half this size, but
- there is no hard and fast rule to tell us where to stop. */
+ * there is no hard and fast rule to tell us where to stop.
+ */
if (length > (png_uint_32)65535L)
{
- png_warning(png_ptr, "iTXt chunk too large to fit in memory");
- png_crc_finish(png_ptr, length);
- return;
+ png_warning(png_ptr, "iTXt chunk too large to fit in memory");
+ png_crc_finish(png_ptr, length);
+ return;
}
#endif
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = (png_charp)png_malloc_warn(png_ptr, length + 1);
+
if (png_ptr->chunkdata == NULL)
{
- png_warning(png_ptr, "No memory to process iTXt chunk");
- return;
+ png_warning(png_ptr, "No memory to process iTXt chunk");
+ return;
}
+
slength = (png_size_t)length;
png_crc_read(png_ptr, (png_bytep)png_ptr->chunkdata, slength);
+
if (png_crc_finish(png_ptr, 0))
{
png_free(png_ptr, png_ptr->chunkdata);
@@ -2216,6 +2403,7 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
for (lang = png_ptr->chunkdata; *lang; lang++)
/* Empty loop */ ;
+
lang++; /* Skip NUL separator */
/* iTXt must have a language tag (possibly empty), two compression bytes,
@@ -2230,14 +2418,16 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_ptr->chunkdata = NULL;
return;
}
+
else
{
- comp_flag = *lang++;
- comp_type = *lang++;
+ comp_flag = *lang++;
+ comp_type = *lang++;
}
for (lang_key = lang; *lang_key; lang_key++)
/* Empty loop */ ;
+
lang_key++; /* Skip NUL separator */
if (lang_key >= png_ptr->chunkdata + slength)
@@ -2250,7 +2440,9 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
for (text = lang_key; *text; text++)
/* Empty loop */ ;
+
text++; /* Skip NUL separator */
+
if (text >= png_ptr->chunkdata + slength)
{
png_warning(png_ptr, "Malformed iTXt chunk");
@@ -2262,20 +2454,25 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
prefix_len = text - png_ptr->chunkdata;
key=png_ptr->chunkdata;
+
if (comp_flag)
- png_decompress_chunk(png_ptr, comp_type,
- (size_t)length, prefix_len, &data_len);
+ png_decompress_chunk(png_ptr, comp_type,
+ (size_t)length, prefix_len, &data_len);
+
else
- data_len = png_strlen(png_ptr->chunkdata + prefix_len);
+ data_len = png_strlen(png_ptr->chunkdata + prefix_len);
+
text_ptr = (png_textp)png_malloc_warn(png_ptr,
- png_sizeof(png_text));
+ png_sizeof(png_text));
+
if (text_ptr == NULL)
{
- png_warning(png_ptr, "Not enough memory to process iTXt chunk");
- png_free(png_ptr, png_ptr->chunkdata);
- png_ptr->chunkdata = NULL;
- return;
+ png_warning(png_ptr, "Not enough memory to process iTXt chunk");
+ png_free(png_ptr, png_ptr->chunkdata);
+ png_ptr->chunkdata = NULL;
+ return;
}
+
text_ptr->compression = (int)comp_flag + 1;
text_ptr->lang_key = png_ptr->chunkdata + (lang_key - key);
text_ptr->lang = png_ptr->chunkdata + (lang - key);
@@ -2289,16 +2486,18 @@ png_handle_iTXt(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_free(png_ptr, text_ptr);
png_free(png_ptr, png_ptr->chunkdata);
png_ptr->chunkdata = NULL;
+
if (ret)
- png_error(png_ptr, "Insufficient memory to store iTXt chunk");
+ png_error(png_ptr, "Insufficient memory to store iTXt chunk");
}
#endif
/* This function is called when we haven't found a handler for a
- chunk. If there isn't a problem with the chunk itself (ie bad
- chunk name, CRC, or a critical chunk), the chunk is silently ignored
- -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which
- case it will be saved away to be written out later. */
+ * chunk. If there isn't a problem with the chunk itself (ie bad
+ * chunk name, CRC, or a critical chunk), the chunk is silently ignored
+ * -- unless the PNG_FLAG_UNKNOWN_CHUNKS_SUPPORTED flag is on in which
+ * case it will be saved away to be written out later.
+ */
void /* PRIVATE */
png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
@@ -2306,7 +2505,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_debug(1, "in png_handle_unknown");
-#ifdef PNG_SET_USER_LIMITS_SUPPORTED
+#ifdef PNG_USER_LIMITS_SUPPORTED
if (png_ptr->user_chunk_cache_max != 0)
{
if (png_ptr->user_chunk_cache_max == 1)
@@ -2314,6 +2513,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, length);
return;
}
+
if (--png_ptr->user_chunk_cache_max == 1)
{
png_warning(png_ptr, "No space in chunk cache for unknown chunk");
@@ -2326,6 +2526,7 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
if (png_ptr->mode & PNG_HAVE_IDAT)
{
PNG_IDAT;
+
if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4)) /* Not an IDAT */
png_ptr->mode |= PNG_AFTER_IDAT;
}
@@ -2334,13 +2535,13 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
{
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
- PNG_HANDLE_CHUNK_ALWAYS
+ PNG_HANDLE_CHUNK_ALWAYS
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
- && png_ptr->read_user_chunk_fn == NULL
+ && png_ptr->read_user_chunk_fn == NULL
#endif
- )
+ )
#endif
- png_chunk_error(png_ptr, "unknown critical chunk");
+ png_chunk_error(png_ptr, "unknown critical chunk");
}
#ifdef PNG_READ_UNKNOWN_CHUNKS_SUPPORTED
@@ -2348,55 +2549,71 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
|| (png_ptr->read_user_chunk_fn != NULL)
#endif
- )
+ )
{
#ifdef PNG_MAX_MALLOC_64K
- if (length > (png_uint_32)65535L)
- {
- png_warning(png_ptr, "unknown chunk too large to fit in memory");
- skip = length - (png_uint_32)65535L;
- length = (png_uint_32)65535L;
- }
+ if (length > (png_uint_32)65535L)
+ {
+ png_warning(png_ptr, "unknown chunk too large to fit in memory");
+ skip = length - (png_uint_32)65535L;
+ length = (png_uint_32)65535L;
+ }
#endif
- png_memcpy((png_charp)png_ptr->unknown_chunk.name,
- (png_charp)png_ptr->chunk_name,
- png_sizeof(png_ptr->unknown_chunk.name));
- png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1] = '\0';
- png_ptr->unknown_chunk.size = (png_size_t)length;
- if (length == 0)
+
+ png_memcpy((png_charp)png_ptr->unknown_chunk.name,
+ (png_charp)png_ptr->chunk_name,
+ png_sizeof(png_ptr->unknown_chunk.name));
+
+ png_ptr->unknown_chunk.name[png_sizeof(png_ptr->unknown_chunk.name)-1]
+ = '\0';
+
+ png_ptr->unknown_chunk.size = (png_size_t)length;
+
+ if (length == 0)
png_ptr->unknown_chunk.data = NULL;
- else
- {
+
+ else
+ {
png_ptr->unknown_chunk.data = (png_bytep)png_malloc(png_ptr, length);
png_crc_read(png_ptr, (png_bytep)png_ptr->unknown_chunk.data, length);
- }
+ }
+
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
- if (png_ptr->read_user_chunk_fn != NULL)
- {
- /* Callback to user unknown chunk handler */
- int ret;
- ret = (*(png_ptr->read_user_chunk_fn))
- (png_ptr, &png_ptr->unknown_chunk);
- if (ret < 0)
- png_chunk_error(png_ptr, "error in user chunk");
- if (ret == 0)
- {
- if (!(png_ptr->chunk_name[0] & 0x20))
+ if (png_ptr->read_user_chunk_fn != NULL)
+ {
+ /* Callback to user unknown chunk handler */
+ int ret;
+
+ ret = (*(png_ptr->read_user_chunk_fn))
+ (png_ptr, &png_ptr->unknown_chunk);
+
+ if (ret < 0)
+ png_chunk_error(png_ptr, "error in user chunk");
+
+ if (ret == 0)
+ {
+ if (!(png_ptr->chunk_name[0] & 0x20))
+ {
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
- if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
- PNG_HANDLE_CHUNK_ALWAYS)
+ if (png_handle_as_unknown(png_ptr, png_ptr->chunk_name) !=
+ PNG_HANDLE_CHUNK_ALWAYS)
#endif
- png_chunk_error(png_ptr, "unknown critical chunk");
- png_set_unknown_chunks(png_ptr, info_ptr,
- &png_ptr->unknown_chunk, 1);
- }
- }
- else
+ png_chunk_error(png_ptr, "unknown critical chunk");
+ }
+
+ png_set_unknown_chunks(png_ptr, info_ptr,
+ &png_ptr->unknown_chunk, 1);
+ }
+ }
+
+ else
#endif
- png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
- png_free(png_ptr, png_ptr->unknown_chunk.data);
- png_ptr->unknown_chunk.data = NULL;
+ png_set_unknown_chunks(png_ptr, info_ptr, &png_ptr->unknown_chunk, 1);
+
+ png_free(png_ptr, png_ptr->unknown_chunk.data);
+ png_ptr->unknown_chunk.data = NULL;
}
+
else
#endif
skip = length;
@@ -2404,20 +2621,21 @@ png_handle_unknown(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
png_crc_finish(png_ptr, skip);
#ifndef PNG_READ_USER_CHUNKS_SUPPORTED
- info_ptr = info_ptr; /* Quiet compiler warnings about unused info_ptr */
+ PNG_UNUSED(info_ptr) /* Quiet compiler warnings about unused info_ptr */
#endif
}
/* This function is called to verify that a chunk name is valid.
- This function can't have the "critical chunk check" incorporated
- into it, since in the future we will need to be able to call user
- functions to handle unknown critical chunks after we check that
- the chunk name itself is valid. */
+ * This function can't have the "critical chunk check" incorporated
+ * into it, since in the future we will need to be able to call user
+ * functions to handle unknown critical chunks after we check that
+ * the chunk name itself is valid.
+ */
#define isnonalpha(c) ((c) < 65 || (c) > 122 || ((c) > 90 && (c) < 97))
void /* PRIVATE */
-png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name)
+png_check_chunk_name(png_structp png_ptr, png_const_bytep chunk_name)
{
png_debug(1, "in png_check_chunk_name");
if (isnonalpha(chunk_name[0]) || isnonalpha(chunk_name[1]) ||
@@ -2428,25 +2646,28 @@ png_check_chunk_name(png_structp png_ptr, png_bytep chunk_name)
}
/* Combines the row recently read in with the existing pixels in the
- row. This routine takes care of alpha and transparency if requested.
- This routine also handles the two methods of progressive display
- of interlaced images, depending on the mask value.
- The mask value describes which pixels are to be combined with
- the row. The pattern always repeats every 8 pixels, so just 8
- bits are needed. A one indicates the pixel is to be combined,
- a zero indicates the pixel is to be skipped. This is in addition
- to any alpha or transparency value associated with the pixel. If
- you want all pixels to be combined, pass 0xff (255) in mask. */
+ * row. This routine takes care of alpha and transparency if requested.
+ * This routine also handles the two methods of progressive display
+ * of interlaced images, depending on the mask value.
+ * The mask value describes which pixels are to be combined with
+ * the row. The pattern always repeats every 8 pixels, so just 8
+ * bits are needed. A one indicates the pixel is to be combined,
+ * a zero indicates the pixel is to be skipped. This is in addition
+ * to any alpha or transparency value associated with the pixel. If
+ * you want all pixels to be combined, pass 0xff (255) in mask.
+ */
void /* PRIVATE */
png_combine_row(png_structp png_ptr, png_bytep row, int mask)
{
png_debug(1, "in png_combine_row");
+
if (mask == 0xff)
{
png_memcpy(row, png_ptr->row_buf + 1,
- PNG_ROWBYTES(png_ptr->row_info.pixel_depth, png_ptr->width));
+ PNG_ROWBYTES(png_ptr->row_info.pixel_depth, png_ptr->width));
}
+
else
{
switch (png_ptr->row_info.pixel_depth)
@@ -2468,6 +2689,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
s_end = 7;
s_inc = 1;
}
+
else
#endif
{
@@ -2495,16 +2717,19 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
sp++;
dp++;
}
+
else
shift += s_inc;
if (m == 1)
m = 0x80;
+
else
m >>= 1;
}
break;
}
+
case 2:
{
png_bytep sp = png_ptr->row_buf + 1;
@@ -2523,6 +2748,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
s_end = 6;
s_inc = 2;
}
+
else
#endif
{
@@ -2548,15 +2774,19 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
sp++;
dp++;
}
+
else
shift += s_inc;
+
if (m == 1)
m = 0x80;
+
else
m >>= 1;
}
break;
}
+
case 4:
{
png_bytep sp = png_ptr->row_buf + 1;
@@ -2575,6 +2805,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
s_end = 4;
s_inc = 4;
}
+
else
#endif
{
@@ -2599,15 +2830,19 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
sp++;
dp++;
}
+
else
shift += s_inc;
+
if (m == 1)
m = 0x80;
+
else
m >>= 1;
}
break;
}
+
default:
{
png_bytep sp = png_ptr->row_buf + 1;
@@ -2617,7 +2852,6 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
png_uint_32 row_width = png_ptr->width;
png_byte m = 0x80;
-
for (i = 0; i < row_width; i++)
{
if (m & mask)
@@ -2630,6 +2864,7 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
if (m == 1)
m = 0x80;
+
else
m >>= 1;
}
@@ -2640,10 +2875,6 @@ png_combine_row(png_structp png_ptr, png_bytep row, int mask)
}
#ifdef PNG_READ_INTERLACING_SUPPORTED
-/* OLD pre-1.0.9 interface:
-void png_do_read_interlace(png_row_infop row_info, png_bytep row, int pass,
- png_uint_32 transformations)
- */
void /* PRIVATE */
png_do_read_interlace(png_structp png_ptr)
{
@@ -2684,6 +2915,7 @@ png_do_read_interlace(png_structp png_ptr)
s_end = 0;
s_inc = -1;
}
+
else
#endif
{
@@ -2701,24 +2933,29 @@ png_do_read_interlace(png_structp png_ptr)
{
*dp &= (png_byte)((0x7f7f >> (7 - dshift)) & 0xff);
*dp |= (png_byte)(v << dshift);
+
if (dshift == s_end)
{
dshift = s_start;
dp--;
}
+
else
dshift += s_inc;
}
+
if (sshift == s_end)
{
sshift = s_start;
sp--;
}
+
else
sshift += s_inc;
}
break;
}
+
case 2:
{
png_bytep sp = row + (png_uint_32)((row_info->width - 1) >> 2);
@@ -2737,6 +2974,7 @@ png_do_read_interlace(png_structp png_ptr)
s_end = 0;
s_inc = -2;
}
+
else
#endif
{
@@ -2757,24 +2995,29 @@ png_do_read_interlace(png_structp png_ptr)
{
*dp &= (png_byte)((0x3f3f >> (6 - dshift)) & 0xff);
*dp |= (png_byte)(v << dshift);
+
if (dshift == s_end)
{
dshift = s_start;
dp--;
}
+
else
dshift += s_inc;
}
+
if (sshift == s_end)
{
sshift = s_start;
sp--;
}
+
else
sshift += s_inc;
}
break;
}
+
case 4:
{
png_bytep sp = row + (png_size_t)((row_info->width - 1) >> 1);
@@ -2793,6 +3036,7 @@ png_do_read_interlace(png_structp png_ptr)
s_end = 0;
s_inc = -4;
}
+
else
#endif
{
@@ -2812,19 +3056,23 @@ png_do_read_interlace(png_structp png_ptr)
{
*dp &= (png_byte)((0xf0f >> (4 - dshift)) & 0xff);
*dp |= (png_byte)(v << dshift);
+
if (dshift == s_end)
{
dshift = s_start;
dp--;
}
+
else
dshift += s_inc;
}
+
if (sshift == s_end)
{
sshift = s_start;
sp--;
}
+
else
sshift += s_inc;
}
@@ -2833,7 +3081,10 @@ png_do_read_interlace(png_structp png_ptr)
default:
{
png_size_t pixel_bytes = (row_info->pixel_depth >> 3);
- png_bytep sp = row + (png_size_t)(row_info->width - 1) * pixel_bytes;
+
+ png_bytep sp = row + (png_size_t)(row_info->width - 1)
+ * pixel_bytes;
+
png_bytep dp = row + (png_size_t)(final_width - 1) * pixel_bytes;
int jstop = png_pass_inc[pass];
@@ -2845,11 +3096,13 @@ png_do_read_interlace(png_structp png_ptr)
int j;
png_memcpy(v, sp, pixel_bytes);
+
for (j = 0; j < jstop; j++)
{
png_memcpy(dp, v, pixel_bytes);
dp -= pixel_bytes;
}
+
sp -= pixel_bytes;
}
break;
@@ -2859,26 +3112,27 @@ png_do_read_interlace(png_structp png_ptr)
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth, final_width);
}
#ifndef PNG_READ_PACKSWAP_SUPPORTED
- transformations = transformations; /* Silence compiler warning */
+ PNG_UNUSED(transformations) /* Silence compiler warning */
#endif
}
#endif /* PNG_READ_INTERLACING_SUPPORTED */
void /* PRIVATE */
png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
- png_bytep prev_row, int filter)
+ png_const_bytep prev_row, int filter)
{
png_debug(1, "in png_read_filter_row");
- png_debug2(2, "row = %lu, filter = %d", png_ptr->row_number, filter);
+ png_debug2(2, "row = %u, filter = %d", png_ptr->row_number, filter);
switch (filter)
{
case PNG_FILTER_VALUE_NONE:
break;
+
case PNG_FILTER_VALUE_SUB:
{
- png_uint_32 i;
- png_uint_32 istop = row_info->rowbytes;
- png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
+ png_size_t i;
+ png_size_t istop = row_info->rowbytes;
+ unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
png_bytep rp = row + bpp;
png_bytep lp = row;
@@ -2891,10 +3145,10 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
}
case PNG_FILTER_VALUE_UP:
{
- png_uint_32 i;
- png_uint_32 istop = row_info->rowbytes;
+ png_size_t i;
+ png_size_t istop = row_info->rowbytes;
png_bytep rp = row;
- png_bytep pp = prev_row;
+ png_const_bytep pp = prev_row;
for (i = 0; i < istop; i++)
{
@@ -2905,37 +3159,39 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
}
case PNG_FILTER_VALUE_AVG:
{
- png_uint_32 i;
+ png_size_t i;
png_bytep rp = row;
- png_bytep pp = prev_row;
+ png_const_bytep pp = prev_row;
png_bytep lp = row;
- png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
- png_uint_32 istop = row_info->rowbytes - bpp;
+ unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
+ png_size_t istop = row_info->rowbytes - bpp;
for (i = 0; i < bpp; i++)
{
*rp = (png_byte)(((int)(*rp) +
- ((int)(*pp++) / 2 )) & 0xff);
+ ((int)(*pp++) / 2 )) & 0xff);
+
rp++;
}
for (i = 0; i < istop; i++)
{
*rp = (png_byte)(((int)(*rp) +
- (int)(*pp++ + *lp++) / 2 ) & 0xff);
+ (int)(*pp++ + *lp++) / 2 ) & 0xff);
+
rp++;
}
break;
}
case PNG_FILTER_VALUE_PAETH:
{
- png_uint_32 i;
+ png_size_t i;
png_bytep rp = row;
- png_bytep pp = prev_row;
+ png_const_bytep pp = prev_row;
png_bytep lp = row;
- png_bytep cp = prev_row;
- png_uint_32 bpp = (row_info->pixel_depth + 7) >> 3;
- png_uint_32 istop=row_info->rowbytes - bpp;
+ png_const_bytep cp = prev_row;
+ unsigned int bpp = (row_info->pixel_depth + 7) >> 3;
+ png_size_t istop=row_info->rowbytes - bpp;
for (i = 0; i < bpp; i++)
{
@@ -2967,8 +3223,10 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
/*
if (pa <= pb && pa <= pc)
p = a;
+
else if (pb <= pc)
p = b;
+
else
p = c;
*/
@@ -2981,8 +3239,8 @@ png_read_filter_row(png_structp png_ptr, png_row_infop row_info, png_bytep row,
break;
}
default:
- png_warning(png_ptr, "Ignoring bad adaptive filter type");
- *row = 0;
+ png_error(png_ptr, "Ignoring bad adaptive filter type");
+ /*NOT REACHED */
break;
}
}
@@ -3016,33 +3274,33 @@ png_read_finish_row(png_structp png_ptr)
if (png_ptr->interlaced)
{
png_ptr->row_number = 0;
- png_memset(png_ptr->prev_row, 0,
- png_ptr->rowbytes + 1);
+
+ png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
+
do
{
png_ptr->pass++;
+
if (png_ptr->pass >= 7)
break;
+
png_ptr->iwidth = (png_ptr->width +
png_pass_inc[png_ptr->pass] - 1 -
png_pass_start[png_ptr->pass]) /
png_pass_inc[png_ptr->pass];
- png_ptr->irowbytes = PNG_ROWBYTES(png_ptr->pixel_depth,
- png_ptr->iwidth) + 1;
-
if (!(png_ptr->transformations & PNG_INTERLACE))
{
png_ptr->num_rows = (png_ptr->height +
- png_pass_yinc[png_ptr->pass] - 1 -
- png_pass_ystart[png_ptr->pass]) /
- png_pass_yinc[png_ptr->pass];
- if (!(png_ptr->num_rows))
- continue;
+ png_pass_yinc[png_ptr->pass] - 1 -
+ png_pass_ystart[png_ptr->pass]) /
+ png_pass_yinc[png_ptr->pass];
}
+
else /* if (png_ptr->transformations & PNG_INTERLACE) */
- break;
- } while (png_ptr->iwidth == 0);
+ break; /* libpng deinterlacing sees every row */
+
+ } while (png_ptr->num_rows == 0 || png_ptr->iwidth == 0);
if (png_ptr->pass < 7)
return;
@@ -3057,44 +3315,45 @@ png_read_finish_row(png_structp png_ptr)
png_ptr->zstream.next_out = (Byte *)&extra;
png_ptr->zstream.avail_out = (uInt)1;
+
for (;;)
{
if (!(png_ptr->zstream.avail_in))
{
while (!png_ptr->idat_size)
{
- png_byte chunk_length[4];
-
png_crc_finish(png_ptr, 0);
-
- png_read_data(png_ptr, chunk_length, 4);
- png_ptr->idat_size = png_get_uint_31(png_ptr, chunk_length);
- png_reset_crc(png_ptr);
- png_crc_read(png_ptr, png_ptr->chunk_name, 4);
+ png_ptr->idat_size = png_read_chunk_header(png_ptr);
if (png_memcmp(png_ptr->chunk_name, png_IDAT, 4))
png_error(png_ptr, "Not enough image data");
-
}
+
png_ptr->zstream.avail_in = (uInt)png_ptr->zbuf_size;
png_ptr->zstream.next_in = png_ptr->zbuf;
+
if (png_ptr->zbuf_size > png_ptr->idat_size)
png_ptr->zstream.avail_in = (uInt)png_ptr->idat_size;
+
png_crc_read(png_ptr, png_ptr->zbuf, png_ptr->zstream.avail_in);
png_ptr->idat_size -= png_ptr->zstream.avail_in;
}
+
ret = inflate(&png_ptr->zstream, Z_PARTIAL_FLUSH);
+
if (ret == Z_STREAM_END)
{
if (!(png_ptr->zstream.avail_out) || png_ptr->zstream.avail_in ||
- png_ptr->idat_size)
+ png_ptr->idat_size)
png_warning(png_ptr, "Extra compressed data");
+
png_ptr->mode |= PNG_AFTER_IDAT;
png_ptr->flags |= PNG_FLAG_ZLIB_FINISHED;
break;
}
+
if (ret != Z_OK)
png_error(png_ptr, png_ptr->zstream.msg ? png_ptr->zstream.msg :
- "Decompression Error");
+ "Decompression Error");
if (!(png_ptr->zstream.avail_out))
{
@@ -3147,25 +3406,24 @@ png_read_start_row(png_structp png_ptr)
{
if (!(png_ptr->transformations & PNG_INTERLACE))
png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
- png_pass_ystart[0]) / png_pass_yinc[0];
+ png_pass_ystart[0]) / png_pass_yinc[0];
+
else
png_ptr->num_rows = png_ptr->height;
png_ptr->iwidth = (png_ptr->width +
- png_pass_inc[png_ptr->pass] - 1 -
- png_pass_start[png_ptr->pass]) /
- png_pass_inc[png_ptr->pass];
-
- png_ptr->irowbytes =
- PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1;
+ png_pass_inc[png_ptr->pass] - 1 -
+ png_pass_start[png_ptr->pass]) /
+ png_pass_inc[png_ptr->pass];
}
+
else
#endif /* PNG_READ_INTERLACING_SUPPORTED */
{
png_ptr->num_rows = png_ptr->height;
png_ptr->iwidth = png_ptr->width;
- png_ptr->irowbytes = png_ptr->rowbytes + 1;
}
+
max_pixel_depth = png_ptr->pixel_depth;
#ifdef PNG_READ_PACK_SUPPORTED
@@ -3180,16 +3438,20 @@ png_read_start_row(png_structp png_ptr)
{
if (png_ptr->num_trans)
max_pixel_depth = 32;
+
else
max_pixel_depth = 24;
}
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)
{
if (max_pixel_depth < 8)
max_pixel_depth = 8;
+
if (png_ptr->num_trans)
max_pixel_depth *= 2;
}
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
{
if (png_ptr->num_trans)
@@ -3206,17 +3468,21 @@ png_read_start_row(png_structp png_ptr)
{
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
max_pixel_depth = 32;
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY)
{
if (max_pixel_depth <= 8)
max_pixel_depth = 16;
+
else
max_pixel_depth = 32;
}
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB)
{
if (max_pixel_depth <= 32)
max_pixel_depth = 32;
+
else
max_pixel_depth = 64;
}
@@ -3228,29 +3494,34 @@ png_read_start_row(png_structp png_ptr)
{
if (
#ifdef PNG_READ_EXPAND_SUPPORTED
- (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) ||
+ (png_ptr->num_trans && (png_ptr->transformations & PNG_EXPAND)) ||
#endif
#ifdef PNG_READ_FILLER_SUPPORTED
- (png_ptr->transformations & (PNG_FILLER)) ||
+ (png_ptr->transformations & (PNG_FILLER)) ||
#endif
- png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ png_ptr->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{
if (max_pixel_depth <= 16)
max_pixel_depth = 32;
+
else
max_pixel_depth = 64;
}
+
else
{
if (max_pixel_depth <= 8)
- {
- if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ {
+ if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
max_pixel_depth = 32;
- else
+
+ else
max_pixel_depth = 24;
- }
+ }
+
else if (png_ptr->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
max_pixel_depth = 64;
+
else
max_pixel_depth = 48;
}
@@ -3260,12 +3531,13 @@ png_read_start_row(png_structp png_ptr)
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) && \
defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
if (png_ptr->transformations & PNG_USER_TRANSFORM)
- {
- int user_pixel_depth = png_ptr->user_transform_depth*
+ {
+ int user_pixel_depth = png_ptr->user_transform_depth*
png_ptr->user_transform_channels;
- if (user_pixel_depth > max_pixel_depth)
+
+ if (user_pixel_depth > max_pixel_depth)
max_pixel_depth=user_pixel_depth;
- }
+ }
#endif
/* Align the width on the next larger 8 pixels. Mainly used
@@ -3276,7 +3548,8 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
* for safety's sake
*/
row_bytes = PNG_ROWBYTES(max_pixel_depth, row_bytes) +
- 1 + ((max_pixel_depth + 7) >> 3);
+ 1 + ((max_pixel_depth + 7) >> 3);
+
#ifdef PNG_MAX_MALLOC_64K
if (row_bytes > (png_uint_32)65536L)
png_error(png_ptr, "This image requires a row greater than 64KB");
@@ -3285,20 +3558,24 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
if (row_bytes + 48 > png_ptr->old_big_row_buf_size)
{
png_free(png_ptr, png_ptr->big_row_buf);
+
if (png_ptr->interlaced)
png_ptr->big_row_buf = (png_bytep)png_calloc(png_ptr,
row_bytes + 48);
+
else
png_ptr->big_row_buf = (png_bytep)png_malloc(png_ptr,
row_bytes + 48);
+
png_ptr->old_big_row_buf_size = row_bytes + 48;
#ifdef PNG_ALIGNED_MEMORY_SUPPORTED
/* Use 16-byte aligned memory for row_buf with at least 16 bytes
* of padding before and after row_buf.
*/
- png_ptr->row_buf = png_ptr->big_row_buf + 32
- - (((png_alloc_size_t)&(png_ptr->big_row_buf[0]) + 15) % 16);
+ png_ptr->row_buf = png_ptr->big_row_buf + 32 -
+ (((png_alloc_size_t)png_ptr->big_row_buf + 15) & 0x0F);
+
png_ptr->old_big_row_buf_size = row_bytes + 48;
#else
/* Use 32 bytes of padding before and 16 bytes after row_buf. */
@@ -3308,28 +3585,31 @@ defined(PNG_USER_TRANSFORM_PTR_SUPPORTED)
}
#ifdef PNG_MAX_MALLOC_64K
- if ((png_uint_32)png_ptr->rowbytes + 1 > (png_uint_32)65536L)
+ if (png_ptr->rowbytes > 65535)
png_error(png_ptr, "This image requires a row greater than 64KB");
+
#endif
- if ((png_uint_32)png_ptr->rowbytes > (png_uint_32)(PNG_SIZE_MAX - 1))
+ if (png_ptr->rowbytes > (PNG_SIZE_MAX - 1))
png_error(png_ptr, "Row has too many bytes to allocate in memory");
if (png_ptr->rowbytes + 1 > png_ptr->old_prev_row_size)
{
png_free(png_ptr, png_ptr->prev_row);
- png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, (png_uint_32)(
- png_ptr->rowbytes + 1));
+
+ png_ptr->prev_row = (png_bytep)png_malloc(png_ptr, png_ptr->rowbytes + 1);
+
png_ptr->old_prev_row_size = png_ptr->rowbytes + 1;
}
png_memset(png_ptr->prev_row, 0, png_ptr->rowbytes + 1);
- png_debug1(3, "width = %lu,", png_ptr->width);
- png_debug1(3, "height = %lu,", png_ptr->height);
- png_debug1(3, "iwidth = %lu,", png_ptr->iwidth);
- png_debug1(3, "num_rows = %lu,", png_ptr->num_rows);
- png_debug1(3, "rowbytes = %lu,", png_ptr->rowbytes);
- png_debug1(3, "irowbytes = %lu", png_ptr->irowbytes);
+ png_debug1(3, "width = %u,", png_ptr->width);
+ png_debug1(3, "height = %u,", png_ptr->height);
+ png_debug1(3, "iwidth = %u,", png_ptr->iwidth);
+ png_debug1(3, "num_rows = %u,", png_ptr->num_rows);
+ png_debug1(3, "rowbytes = %lu,", (unsigned long)png_ptr->rowbytes);
+ png_debug1(3, "irowbytes = %lu",
+ (unsigned long)PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->iwidth) + 1);
png_ptr->flags |= PNG_FLAG_ROW_INIT;
}
diff --git a/src/3rdparty/libpng/pngset.c b/src/3rdparty/libpng/pngset.c
index adb4016..2cfcf33 100644
--- a/src/3rdparty/libpng/pngset.c
+++ b/src/3rdparty/libpng/pngset.c
@@ -1,8 +1,8 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -16,14 +16,14 @@
* info struct and allows us to change the structure in the future.
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
+#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+
#ifdef PNG_bKGD_SUPPORTED
void PNGAPI
-png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
+png_set_bKGD(png_structp png_ptr, png_infop info_ptr,
+ png_const_color_16p background)
{
png_debug1(1, "in %s storage function", "bKGD");
@@ -36,150 +36,94 @@ png_set_bKGD(png_structp png_ptr, png_infop info_ptr, png_color_16p background)
#endif
#ifdef PNG_cHRM_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-void PNGAPI
-png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
- double white_x, double white_y, double red_x, double red_y,
- double green_x, double green_y, double blue_x, double blue_y)
-{
- png_debug1(1, "in %s storage function", "cHRM");
-
- if (png_ptr == NULL || info_ptr == NULL)
- return;
-
- info_ptr->x_white = (float)white_x;
- info_ptr->y_white = (float)white_y;
- info_ptr->x_red = (float)red_x;
- info_ptr->y_red = (float)red_y;
- info_ptr->x_green = (float)green_x;
- info_ptr->y_green = (float)green_y;
- info_ptr->x_blue = (float)blue_x;
- info_ptr->y_blue = (float)blue_y;
-#ifdef PNG_FIXED_POINT_SUPPORTED
- info_ptr->int_x_white = (png_fixed_point)(white_x*100000.+0.5);
- info_ptr->int_y_white = (png_fixed_point)(white_y*100000.+0.5);
- info_ptr->int_x_red = (png_fixed_point)( red_x*100000.+0.5);
- info_ptr->int_y_red = (png_fixed_point)( red_y*100000.+0.5);
- info_ptr->int_x_green = (png_fixed_point)(green_x*100000.+0.5);
- info_ptr->int_y_green = (png_fixed_point)(green_y*100000.+0.5);
- info_ptr->int_x_blue = (png_fixed_point)( blue_x*100000.+0.5);
- info_ptr->int_y_blue = (png_fixed_point)( blue_y*100000.+0.5);
-#endif
- info_ptr->valid |= PNG_INFO_cHRM;
-}
-#endif /* PNG_FLOATING_POINT_SUPPORTED */
-
-#ifdef PNG_FIXED_POINT_SUPPORTED
-void PNGAPI
+void PNGFAPI
png_set_cHRM_fixed(png_structp png_ptr, png_infop info_ptr,
- png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x,
- png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y,
- png_fixed_point blue_x, png_fixed_point blue_y)
+ png_fixed_point white_x, png_fixed_point white_y, png_fixed_point red_x,
+ png_fixed_point red_y, png_fixed_point green_x, png_fixed_point green_y,
+ png_fixed_point blue_x, png_fixed_point blue_y)
{
png_debug1(1, "in %s storage function", "cHRM fixed");
if (png_ptr == NULL || info_ptr == NULL)
return;
-#ifdef PNG_CHECK_cHRM_SUPPORTED
+# ifdef PNG_CHECK_cHRM_SUPPORTED
if (png_check_cHRM_fixed(png_ptr,
- white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y))
-#endif
+ white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y))
+# endif
{
- info_ptr->int_x_white = white_x;
- info_ptr->int_y_white = white_y;
- info_ptr->int_x_red = red_x;
- info_ptr->int_y_red = red_y;
- info_ptr->int_x_green = green_x;
- info_ptr->int_y_green = green_y;
- info_ptr->int_x_blue = blue_x;
- info_ptr->int_y_blue = blue_y;
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- info_ptr->x_white = (float)(white_x/100000.);
- info_ptr->y_white = (float)(white_y/100000.);
- info_ptr->x_red = (float)( red_x/100000.);
- info_ptr->y_red = (float)( red_y/100000.);
- info_ptr->x_green = (float)(green_x/100000.);
- info_ptr->y_green = (float)(green_y/100000.);
- info_ptr->x_blue = (float)( blue_x/100000.);
- info_ptr->y_blue = (float)( blue_y/100000.);
-#endif
+ info_ptr->x_white = white_x;
+ info_ptr->y_white = white_y;
+ info_ptr->x_red = red_x;
+ info_ptr->y_red = red_y;
+ info_ptr->x_green = green_x;
+ info_ptr->y_green = green_y;
+ info_ptr->x_blue = blue_x;
+ info_ptr->y_blue = blue_y;
info_ptr->valid |= PNG_INFO_cHRM;
}
}
-#endif /* PNG_FIXED_POINT_SUPPORTED */
-#endif /* PNG_cHRM_SUPPORTED */
-#ifdef PNG_gAMA_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
+# ifdef PNG_FLOATING_POINT_SUPPORTED
void PNGAPI
-png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
+png_set_cHRM(png_structp png_ptr, png_infop info_ptr,
+ double white_x, double white_y, double red_x, double red_y,
+ double green_x, double green_y, double blue_x, double blue_y)
{
- double png_gamma;
-
- png_debug1(1, "in %s storage function", "gAMA");
+ png_set_cHRM_fixed(png_ptr, info_ptr,
+ png_fixed(png_ptr, white_x, "cHRM White X"),
+ png_fixed(png_ptr, white_y, "cHRM White Y"),
+ png_fixed(png_ptr, red_x, "cHRM Red X"),
+ png_fixed(png_ptr, red_y, "cHRM Red Y"),
+ png_fixed(png_ptr, green_x, "cHRM Green X"),
+ png_fixed(png_ptr, green_y, "cHRM Green Y"),
+ png_fixed(png_ptr, blue_x, "cHRM Blue X"),
+ png_fixed(png_ptr, blue_y, "cHRM Blue Y"));
+}
+# endif /* PNG_FLOATING_POINT_SUPPORTED */
- if (png_ptr == NULL || info_ptr == NULL)
- return;
+#endif /* PNG_cHRM_SUPPORTED */
- /* Check for overflow */
- if (file_gamma > 21474.83)
- {
- png_warning(png_ptr, "Limiting gamma to 21474.83");
- png_gamma=21474.83;
- }
- else
- png_gamma = file_gamma;
- info_ptr->gamma = (float)png_gamma;
-#ifdef PNG_FIXED_POINT_SUPPORTED
- info_ptr->int_gamma = (int)(png_gamma*100000.+.5);
-#endif
- info_ptr->valid |= PNG_INFO_gAMA;
- if (png_gamma == 0.0)
- png_warning(png_ptr, "Setting gamma=0");
-}
-#endif
-void PNGAPI
+#ifdef PNG_gAMA_SUPPORTED
+void PNGFAPI
png_set_gAMA_fixed(png_structp png_ptr, png_infop info_ptr, png_fixed_point
- int_gamma)
+ file_gamma)
{
- png_fixed_point png_gamma;
-
png_debug1(1, "in %s storage function", "gAMA");
if (png_ptr == NULL || info_ptr == NULL)
return;
- if (int_gamma > (png_fixed_point)PNG_UINT_31_MAX)
- {
- png_warning(png_ptr, "Limiting gamma to 21474.83");
- png_gamma=PNG_UINT_31_MAX;
- }
+ /* Previously these values were limited, however they must be
+ * wrong, therefore storing them (and setting PNG_INFO_gAMA)
+ * must be wrong too.
+ */
+ if (file_gamma > (png_fixed_point)PNG_UINT_31_MAX)
+ png_warning(png_ptr, "Gamma too large, ignored");
+
+ else if (file_gamma <= 0)
+ png_warning(png_ptr, "Negative or zero gamma ignored");
+
else
{
- if (int_gamma < 0)
- {
- png_warning(png_ptr, "Setting negative gamma to zero");
- png_gamma = 0;
- }
- else
- png_gamma = int_gamma;
+ info_ptr->gamma = file_gamma;
+ info_ptr->valid |= PNG_INFO_gAMA;
}
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- info_ptr->gamma = (float)(png_gamma/100000.);
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
- info_ptr->int_gamma = png_gamma;
-#endif
- info_ptr->valid |= PNG_INFO_gAMA;
- if (png_gamma == 0)
- png_warning(png_ptr, "Setting gamma=0");
}
+
+# ifdef PNG_FLOATING_POINT_SUPPORTED
+void PNGAPI
+png_set_gAMA(png_structp png_ptr, png_infop info_ptr, double file_gamma)
+{
+ png_set_gAMA_fixed(png_ptr, info_ptr, png_fixed(png_ptr, file_gamma,
+ "png_set_gAMA"));
+}
+# endif
#endif
#ifdef PNG_hIST_SUPPORTED
void PNGAPI
-png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
+png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_const_uint_16p hist)
{
int i;
@@ -192,16 +136,19 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
> PNG_MAX_PALETTE_LENGTH)
{
png_warning(png_ptr,
- "Invalid palette size, hIST allocation skipped");
+ "Invalid palette size, hIST allocation skipped");
+
return;
}
png_free_data(png_ptr, info_ptr, PNG_FREE_HIST, 0);
+
/* Changed from info->num_palette to PNG_MAX_PALETTE_LENGTH in
* version 1.2.1
*/
png_ptr->hist = (png_uint_16p)png_malloc_warn(png_ptr,
- PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16));
+ PNG_MAX_PALETTE_LENGTH * png_sizeof(png_uint_16));
+
if (png_ptr->hist == NULL)
{
png_warning(png_ptr, "Insufficient memory for hIST chunk data");
@@ -210,18 +157,18 @@ png_set_hIST(png_structp png_ptr, png_infop info_ptr, png_uint_16p hist)
for (i = 0; i < info_ptr->num_palette; i++)
png_ptr->hist[i] = hist[i];
+
info_ptr->hist = png_ptr->hist;
info_ptr->valid |= PNG_INFO_hIST;
-
info_ptr->free_me |= PNG_FREE_HIST;
}
#endif
void PNGAPI
png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
- png_uint_32 width, png_uint_32 height, int bit_depth,
- int color_type, int interlace_type, int compression_type,
- int filter_type)
+ png_uint_32 width, png_uint_32 height, int bit_depth,
+ int color_type, int interlace_type, int compression_type,
+ int filter_type)
{
png_debug1(1, "in %s storage function", "IHDR");
@@ -242,21 +189,25 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
info_ptr->channels = 1;
+
else if (info_ptr->color_type & PNG_COLOR_MASK_COLOR)
info_ptr->channels = 3;
+
else
info_ptr->channels = 1;
+
if (info_ptr->color_type & PNG_COLOR_MASK_ALPHA)
info_ptr->channels++;
+
info_ptr->pixel_depth = (png_byte)(info_ptr->channels * info_ptr->bit_depth);
/* Check for potential overflow */
- if (width > (PNG_UINT_32_MAX
- >> 3) /* 8-byte RGBA pixels */
- - 64 /* bigrowbuf hack */
- - 1 /* filter byte */
- - 7*8 /* rounding of width to multiple of 8 pixels */
- - 8) /* extra max_pixel_depth pad */
+ if (width >
+ (PNG_UINT_32_MAX >> 3) /* 8-byte RRGGBBAA pixels */
+ - 48 /* bigrowbuf hack */
+ - 1 /* filter byte */
+ - 7*8 /* rounding of width to multiple of 8 pixels */
+ - 8) /* extra max_pixel_depth pad */
info_ptr->rowbytes = 0;
else
info_ptr->rowbytes = PNG_ROWBYTES(info_ptr->pixel_depth, width);
@@ -265,7 +216,7 @@ png_set_IHDR(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_oFFs_SUPPORTED
void PNGAPI
png_set_oFFs(png_structp png_ptr, png_infop info_ptr,
- png_int_32 offset_x, png_int_32 offset_y, int unit_type)
+ png_int_32 offset_x, png_int_32 offset_y, int unit_type)
{
png_debug1(1, "in %s storage function", "oFFs");
@@ -282,8 +233,8 @@ png_set_oFFs(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_pCAL_SUPPORTED
void PNGAPI
png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
- png_charp purpose, png_int_32 X0, png_int_32 X1, int type, int nparams,
- png_charp units, png_charpp params)
+ png_const_charp purpose, png_int_32 X0, png_int_32 X1, int type,
+ int nparams, png_const_charp units, png_charpp params)
{
png_size_t length;
int i;
@@ -295,13 +246,27 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
length = png_strlen(purpose) + 1;
png_debug1(3, "allocating purpose for info (%lu bytes)",
- (unsigned long)length);
+ (unsigned long)length);
+
+ /* TODO: validate format of calibration name and unit name */
+
+ /* Check that the type matches the specification. */
+ if (type < 0 || type > 3)
+ png_error(png_ptr, "Invalid pCAL equation type");
+
+ /* Validate params[nparams] */
+ for (i=0; i<nparams; ++i)
+ if (!png_check_fp_string(params[i], png_strlen(params[i])))
+ png_error(png_ptr, "Invalid format for pCAL parameter");
+
info_ptr->pcal_purpose = (png_charp)png_malloc_warn(png_ptr, length);
+
if (info_ptr->pcal_purpose == NULL)
{
png_warning(png_ptr, "Insufficient memory for pCAL purpose");
return;
}
+
png_memcpy(info_ptr->pcal_purpose, purpose, length);
png_debug(3, "storing X0, X1, type, and nparams in info");
@@ -313,16 +278,20 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
length = png_strlen(units) + 1;
png_debug1(3, "allocating units for info (%lu bytes)",
(unsigned long)length);
+
info_ptr->pcal_units = (png_charp)png_malloc_warn(png_ptr, length);
+
if (info_ptr->pcal_units == NULL)
{
png_warning(png_ptr, "Insufficient memory for pCAL units");
return;
}
+
png_memcpy(info_ptr->pcal_units, units, length);
info_ptr->pcal_params = (png_charpp)png_malloc_warn(png_ptr,
- (png_size_t)((nparams + 1) * png_sizeof(png_charp)));
+ (png_size_t)((nparams + 1) * png_sizeof(png_charp)));
+
if (info_ptr->pcal_params == NULL)
{
png_warning(png_ptr, "Insufficient memory for pCAL params");
@@ -335,13 +304,16 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
{
length = png_strlen(params[i]) + 1;
png_debug2(3, "allocating parameter %d for info (%lu bytes)", i,
- (unsigned long)length);
+ (unsigned long)length);
+
info_ptr->pcal_params[i] = (png_charp)png_malloc_warn(png_ptr, length);
+
if (info_ptr->pcal_params[i] == NULL)
{
png_warning(png_ptr, "Insufficient memory for pCAL parameter");
return;
}
+
png_memcpy(info_ptr->pcal_params[i], params[i], length);
}
@@ -350,74 +322,132 @@ png_set_pCAL(png_structp png_ptr, png_infop info_ptr,
}
#endif
-#if defined(PNG_READ_sCAL_SUPPORTED) || defined(PNG_WRITE_sCAL_SUPPORTED)
-#ifdef PNG_FLOATING_POINT_SUPPORTED
+#ifdef PNG_sCAL_SUPPORTED
void PNGAPI
-png_set_sCAL(png_structp png_ptr, png_infop info_ptr,
- int unit, double width, double height)
+png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
+ int unit, png_const_charp swidth, png_const_charp sheight)
{
+ png_size_t lengthw = 0, lengthh = 0;
+
png_debug1(1, "in %s storage function", "sCAL");
if (png_ptr == NULL || info_ptr == NULL)
return;
- info_ptr->scal_unit = (png_byte)unit;
- info_ptr->scal_pixel_width = width;
- info_ptr->scal_pixel_height = height;
+ /* Double check the unit (should never get here with an invalid
+ * unit unless this is an API call.)
+ */
+ if (unit != 1 && unit != 2)
+ png_error(png_ptr, "Invalid sCAL unit");
- info_ptr->valid |= PNG_INFO_sCAL;
-}
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-void PNGAPI
-png_set_sCAL_s(png_structp png_ptr, png_infop info_ptr,
- int unit, png_charp swidth, png_charp sheight)
-{
- png_size_t length;
+ if (swidth == NULL || (lengthw = png_strlen(swidth)) <= 0 ||
+ swidth[0] == 45 /*'-'*/ || !png_check_fp_string(swidth, lengthw))
+ png_error(png_ptr, "Invalid sCAL width");
- png_debug1(1, "in %s storage function", "sCAL");
-
- if (png_ptr == NULL || info_ptr == NULL)
- return;
+ if (sheight == NULL || (lengthh = png_strlen(sheight)) <= 0 ||
+ sheight[0] == 45 /*'-'*/ || !png_check_fp_string(sheight, lengthh))
+ png_error(png_ptr, "Invalid sCAL height");
info_ptr->scal_unit = (png_byte)unit;
- length = png_strlen(swidth) + 1;
- png_debug1(3, "allocating unit for info (%u bytes)",
- (unsigned int)length);
- info_ptr->scal_s_width = (png_charp)png_malloc_warn(png_ptr, length);
+ ++lengthw;
+
+ png_debug1(3, "allocating unit for info (%u bytes)", (unsigned int)lengthw);
+
+ info_ptr->scal_s_width = (png_charp)png_malloc_warn(png_ptr, lengthw);
+
if (info_ptr->scal_s_width == NULL)
{
- png_warning(png_ptr,
- "Memory allocation failed while processing sCAL");
+ png_warning(png_ptr, "Memory allocation failed while processing sCAL");
return;
}
- png_memcpy(info_ptr->scal_s_width, swidth, length);
- length = png_strlen(sheight) + 1;
- png_debug1(3, "allocating unit for info (%u bytes)",
- (unsigned int)length);
- info_ptr->scal_s_height = (png_charp)png_malloc_warn(png_ptr, length);
+ png_memcpy(info_ptr->scal_s_width, swidth, lengthw);
+
+ ++lengthh;
+
+ png_debug1(3, "allocating unit for info (%u bytes)", (unsigned int)lengthh);
+
+ info_ptr->scal_s_height = (png_charp)png_malloc_warn(png_ptr, lengthh);
+
if (info_ptr->scal_s_height == NULL)
{
png_free (png_ptr, info_ptr->scal_s_width);
info_ptr->scal_s_width = NULL;
- png_warning(png_ptr,
- "Memory allocation failed while processing sCAL");
+
+ png_warning(png_ptr, "Memory allocation failed while processing sCAL");
return;
}
- png_memcpy(info_ptr->scal_s_height, sheight, length);
+
+ png_memcpy(info_ptr->scal_s_height, sheight, lengthh);
+
info_ptr->valid |= PNG_INFO_sCAL;
info_ptr->free_me |= PNG_FREE_SCAL;
}
-#endif
-#endif
+
+# ifdef PNG_FLOATING_POINT_SUPPORTED
+void PNGAPI
+png_set_sCAL(png_structp png_ptr, png_infop info_ptr, int unit, double width,
+ double height)
+{
+ png_debug1(1, "in %s storage function", "sCAL");
+
+ /* Check the arguments. */
+ if (width <= 0)
+ png_warning(png_ptr, "Invalid sCAL width ignored");
+
+ else if (height <= 0)
+ png_warning(png_ptr, "Invalid sCAL height ignored");
+
+ else
+ {
+ /* Convert 'width' and 'height' to ASCII. */
+ char swidth[PNG_sCAL_MAX_DIGITS+1];
+ char sheight[PNG_sCAL_MAX_DIGITS+1];
+
+ png_ascii_from_fp(png_ptr, swidth, sizeof swidth, width,
+ PNG_sCAL_PRECISION);
+ png_ascii_from_fp(png_ptr, sheight, sizeof sheight, height,
+ PNG_sCAL_PRECISION);
+
+ png_set_sCAL_s(png_ptr, info_ptr, unit, swidth, sheight);
+ }
+}
+# endif
+
+# ifdef PNG_FIXED_POINT_SUPPORTED
+void PNGAPI
+png_set_sCAL_fixed(png_structp png_ptr, png_infop info_ptr, int unit,
+ png_fixed_point width, png_fixed_point height)
+{
+ png_debug1(1, "in %s storage function", "sCAL");
+
+ /* Check the arguments. */
+ if (width <= 0)
+ png_warning(png_ptr, "Invalid sCAL width ignored");
+
+ else if (height <= 0)
+ png_warning(png_ptr, "Invalid sCAL height ignored");
+
+ else
+ {
+ /* Convert 'width' and 'height' to ASCII. */
+ char swidth[PNG_sCAL_MAX_DIGITS+1];
+ char sheight[PNG_sCAL_MAX_DIGITS+1];
+
+ png_ascii_from_fixed(png_ptr, swidth, sizeof swidth, width);
+ png_ascii_from_fixed(png_ptr, sheight, sizeof sheight, height);
+
+ png_set_sCAL_s(png_ptr, info_ptr, unit, swidth, sheight);
+ }
+}
+# endif
#endif
#ifdef PNG_pHYs_SUPPORTED
void PNGAPI
png_set_pHYs(png_structp png_ptr, png_infop info_ptr,
- png_uint_32 res_x, png_uint_32 res_y, int unit_type)
+ png_uint_32 res_x, png_uint_32 res_y, int unit_type)
{
png_debug1(1, "in %s storage function", "pHYs");
@@ -433,7 +463,7 @@ png_set_pHYs(png_structp png_ptr, png_infop info_ptr,
void PNGAPI
png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
- png_colorp palette, int num_palette)
+ png_const_colorp palette, int num_palette)
{
png_debug1(1, "in %s storage function", "PLTE");
@@ -445,6 +475,7 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
{
if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
png_error(png_ptr, "Invalid palette length");
+
else
{
png_warning(png_ptr, "Invalid palette length");
@@ -463,7 +494,8 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
* too-large sample values.
*/
png_ptr->palette = (png_colorp)png_calloc(png_ptr,
- PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));
+ PNG_MAX_PALETTE_LENGTH * png_sizeof(png_color));
+
png_memcpy(png_ptr->palette, palette, num_palette * png_sizeof(png_color));
info_ptr->palette = png_ptr->palette;
info_ptr->num_palette = png_ptr->num_palette = (png_uint_16)num_palette;
@@ -476,7 +508,7 @@ png_set_PLTE(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_sBIT_SUPPORTED
void PNGAPI
png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
- png_color_8p sig_bit)
+ png_const_color_8p sig_bit)
{
png_debug1(1, "in %s storage function", "sBIT");
@@ -490,85 +522,41 @@ png_set_sBIT(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_sRGB_SUPPORTED
void PNGAPI
-png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int intent)
+png_set_sRGB(png_structp png_ptr, png_infop info_ptr, int srgb_intent)
{
png_debug1(1, "in %s storage function", "sRGB");
if (png_ptr == NULL || info_ptr == NULL)
return;
- info_ptr->srgb_intent = (png_byte)intent;
+ info_ptr->srgb_intent = (png_byte)srgb_intent;
info_ptr->valid |= PNG_INFO_sRGB;
}
void PNGAPI
png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
- int intent)
+ int srgb_intent)
{
-#ifdef PNG_gAMA_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- float file_gamma;
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
- png_fixed_point int_file_gamma;
-#endif
-#endif
-#ifdef PNG_cHRM_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- float white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y;
-#endif
- png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,
- int_green_y, int_blue_x, int_blue_y;
-#endif
png_debug1(1, "in %s storage function", "sRGB_gAMA_and_cHRM");
if (png_ptr == NULL || info_ptr == NULL)
return;
- png_set_sRGB(png_ptr, info_ptr, intent);
+ png_set_sRGB(png_ptr, info_ptr, srgb_intent);
-#ifdef PNG_gAMA_SUPPORTED
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- file_gamma = (float).45455;
- png_set_gAMA(png_ptr, info_ptr, file_gamma);
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
- int_file_gamma = 45455L;
- png_set_gAMA_fixed(png_ptr, info_ptr, int_file_gamma);
-#endif
-#endif
-
-#ifdef PNG_cHRM_SUPPORTED
- int_white_x = 31270L;
- int_white_y = 32900L;
- int_red_x = 64000L;
- int_red_y = 33000L;
- int_green_x = 30000L;
- int_green_y = 60000L;
- int_blue_x = 15000L;
- int_blue_y = 6000L;
-
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- white_x = (float).3127;
- white_y = (float).3290;
- red_x = (float).64;
- red_y = (float).33;
- green_x = (float).30;
- green_y = (float).60;
- blue_x = (float).15;
- blue_y = (float).06;
-#endif
+# ifdef PNG_gAMA_SUPPORTED
+ png_set_gAMA_fixed(png_ptr, info_ptr, 45455L);
+# endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
+# ifdef PNG_cHRM_SUPPORTED
png_set_cHRM_fixed(png_ptr, info_ptr,
- int_white_x, int_white_y, int_red_x, int_red_y, int_green_x,
- int_green_y, int_blue_x, int_blue_y);
-#endif
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- png_set_cHRM(png_ptr, info_ptr,
- white_x, white_y, red_x, red_y, green_x, green_y, blue_x, blue_y);
-#endif
-#endif /* cHRM */
+ /* color x y */
+ /* white */ 31270L, 32900L,
+ /* red */ 64000L, 33000L,
+ /* green */ 30000L, 60000L,
+ /* blue */ 15000L, 6000L
+ );
+# endif /* cHRM */
}
#endif /* sRGB */
@@ -576,11 +564,11 @@ png_set_sRGB_gAMA_and_cHRM(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_iCCP_SUPPORTED
void PNGAPI
png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
- png_charp name, int compression_type,
- png_charp profile, png_uint_32 proflen)
+ png_const_charp name, int compression_type,
+ png_const_bytep profile, png_uint_32 proflen)
{
png_charp new_iccp_name;
- png_charp new_iccp_profile;
+ png_bytep new_iccp_profile;
png_uint_32 length;
png_debug1(1, "in %s storage function", "iCCP");
@@ -590,13 +578,16 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
length = png_strlen(name)+1;
new_iccp_name = (png_charp)png_malloc_warn(png_ptr, length);
+
if (new_iccp_name == NULL)
{
png_warning(png_ptr, "Insufficient memory to process iCCP chunk");
return;
}
+
png_memcpy(new_iccp_name, name, length);
- new_iccp_profile = (png_charp)png_malloc_warn(png_ptr, proflen);
+ new_iccp_profile = (png_bytep)png_malloc_warn(png_ptr, proflen);
+
if (new_iccp_profile == NULL)
{
png_free (png_ptr, new_iccp_name);
@@ -604,6 +595,7 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
"Insufficient memory to process iCCP profile");
return;
}
+
png_memcpy(new_iccp_profile, profile, (png_size_t)proflen);
png_free_data(png_ptr, info_ptr, PNG_FREE_ICCP, 0);
@@ -622,24 +614,25 @@ png_set_iCCP(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_TEXT_SUPPORTED
void PNGAPI
-png_set_text(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
- int num_text)
+png_set_text(png_structp png_ptr, png_infop info_ptr, png_const_textp text_ptr,
+ int num_text)
{
int ret;
ret = png_set_text_2(png_ptr, info_ptr, text_ptr, num_text);
+
if (ret)
png_error(png_ptr, "Insufficient memory to store text");
}
int /* PRIVATE */
-png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
- int num_text)
+png_set_text_2(png_structp png_ptr, png_infop info_ptr,
+ png_const_textp text_ptr, int num_text)
{
int i;
png_debug1(1, "in %s storage function", ((png_ptr == NULL ||
- png_ptr->chunk_name[0] == '\0') ?
- "text" : (png_const_charp)png_ptr->chunk_name));
+ png_ptr->chunk_name[0] == '\0') ?
+ "text" : (png_const_charp)png_ptr->chunk_name));
if (png_ptr == NULL || info_ptr == NULL || num_text == 0)
return(0);
@@ -659,27 +652,31 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
old_text = info_ptr->text;
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
(png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
+
if (info_ptr->text == NULL)
{
png_free(png_ptr, old_text);
return(1);
}
+
png_memcpy(info_ptr->text, old_text, (png_size_t)(old_max *
- png_sizeof(png_text)));
+ png_sizeof(png_text)));
png_free(png_ptr, old_text);
}
+
else
{
info_ptr->max_text = num_text + 8;
info_ptr->num_text = 0;
info_ptr->text = (png_textp)png_malloc_warn(png_ptr,
- (png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
+ (png_size_t)(info_ptr->max_text * png_sizeof(png_text)));
if (info_ptr->text == NULL)
return(1);
info_ptr->free_me |= PNG_FREE_TEXT;
}
+
png_debug1(3, "allocated %d entries for info_ptr->text",
- info_ptr->max_text);
+ info_ptr->max_text);
}
for (i = 0; i < num_text; i++)
{
@@ -690,6 +687,13 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
if (text_ptr[i].key == NULL)
continue;
+ if (text_ptr[i].compression < PNG_TEXT_COMPRESSION_NONE ||
+ text_ptr[i].compression >= PNG_TEXT_COMPRESSION_LAST)
+ {
+ png_warning(png_ptr, "text compression mode is out of range");
+ continue;
+ }
+
key_len = png_strlen(text_ptr[i].key);
if (text_ptr[i].compression <= 0)
@@ -699,34 +703,38 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
}
else
-#ifdef PNG_iTXt_SUPPORTED
+# ifdef PNG_iTXt_SUPPORTED
{
/* Set iTXt data */
if (text_ptr[i].lang != NULL)
lang_len = png_strlen(text_ptr[i].lang);
+
else
lang_len = 0;
+
if (text_ptr[i].lang_key != NULL)
lang_key_len = png_strlen(text_ptr[i].lang_key);
+
else
lang_key_len = 0;
}
-#else /* PNG_iTXt_SUPPORTED */
+# else /* PNG_iTXt_SUPPORTED */
{
png_warning(png_ptr, "iTXt chunk not supported");
continue;
}
-#endif
+# endif
if (text_ptr[i].text == NULL || text_ptr[i].text[0] == '\0')
{
text_length = 0;
-#ifdef PNG_iTXt_SUPPORTED
+# ifdef PNG_iTXt_SUPPORTED
if (text_ptr[i].compression > 0)
textp->compression = PNG_ITXT_COMPRESSION_NONE;
+
else
-#endif
+# endif
textp->compression = PNG_TEXT_COMPRESSION_NONE;
}
@@ -737,18 +745,20 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
}
textp->key = (png_charp)png_malloc_warn(png_ptr,
- (png_size_t)
- (key_len + text_length + lang_len + lang_key_len + 4));
+ (png_size_t)
+ (key_len + text_length + lang_len + lang_key_len + 4));
+
if (textp->key == NULL)
return(1);
- png_debug2(2, "Allocated %lu bytes at %x in png_set_text",
- (unsigned long)(png_uint_32)
- (key_len + lang_len + lang_key_len + text_length + 4),
- (int)textp->key);
+
+ png_debug2(2, "Allocated %lu bytes at %p in png_set_text",
+ (unsigned long)(png_uint_32)
+ (key_len + lang_len + lang_key_len + text_length + 4),
+ textp->key);
png_memcpy(textp->key, text_ptr[i].key,(png_size_t)(key_len));
*(textp->key + key_len) = '\0';
-#ifdef PNG_iTXt_SUPPORTED
+
if (text_ptr[i].compression > 0)
{
textp->lang = textp->key + key_len + 1;
@@ -759,35 +769,34 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
*(textp->lang_key + lang_key_len) = '\0';
textp->text = textp->lang_key + lang_key_len + 1;
}
+
else
-#endif
{
-#ifdef PNG_iTXt_SUPPORTED
textp->lang=NULL;
textp->lang_key=NULL;
-#endif
textp->text = textp->key + key_len + 1;
}
+
if (text_length)
png_memcpy(textp->text, text_ptr[i].text,
- (png_size_t)(text_length));
+ (png_size_t)(text_length));
+
*(textp->text + text_length) = '\0';
-#ifdef PNG_iTXt_SUPPORTED
+# ifdef PNG_iTXt_SUPPORTED
if (textp->compression > 0)
{
textp->text_length = 0;
textp->itxt_length = text_length;
}
- else
-#endif
+ else
+# endif
{
textp->text_length = text_length;
-#ifdef PNG_iTXt_SUPPORTED
textp->itxt_length = 0;
-#endif
}
+
info_ptr->num_text++;
png_debug1(3, "transferred text chunk %d", info_ptr->num_text);
}
@@ -797,7 +806,7 @@ png_set_text_2(png_structp png_ptr, png_infop info_ptr, png_textp text_ptr,
#ifdef PNG_tIME_SUPPORTED
void PNGAPI
-png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
+png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_const_timep mod_time)
{
png_debug1(1, "in %s storage function", "tIME");
@@ -813,7 +822,7 @@ png_set_tIME(png_structp png_ptr, png_infop info_ptr, png_timep mod_time)
#ifdef PNG_tRNS_SUPPORTED
void PNGAPI
png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
- png_bytep trans_alpha, int num_trans, png_color_16p trans_color)
+ png_const_bytep trans_alpha, int num_trans, png_const_color_16p trans_color)
{
png_debug1(1, "in %s storage function", "tRNS");
@@ -830,8 +839,9 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
png_free_data(png_ptr, info_ptr, PNG_FREE_TRNS, 0);
/* Changed from num_trans to PNG_MAX_PALETTE_LENGTH in version 1.2.1 */
- png_ptr->trans_alpha = info_ptr->trans_alpha = (png_bytep)png_malloc(png_ptr,
- (png_size_t)PNG_MAX_PALETTE_LENGTH);
+ png_ptr->trans_alpha = info_ptr->trans_alpha =
+ (png_bytep)png_malloc(png_ptr, (png_size_t)PNG_MAX_PALETTE_LENGTH);
+
if (num_trans > 0 && num_trans <= PNG_MAX_PALETTE_LENGTH)
png_memcpy(info_ptr->trans_alpha, trans_alpha, (png_size_t)num_trans);
}
@@ -839,6 +849,7 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
if (trans_color != NULL)
{
int sample_max = (1 << info_ptr->bit_depth);
+
if ((info_ptr->color_type == PNG_COLOR_TYPE_GRAY &&
(int)trans_color->gray > sample_max) ||
(info_ptr->color_type == PNG_COLOR_TYPE_RGB &&
@@ -847,13 +858,16 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
(int)trans_color->blue > sample_max)))
png_warning(png_ptr,
"tRNS chunk has out-of-range samples for bit_depth");
+
png_memcpy(&(info_ptr->trans_color), trans_color,
png_sizeof(png_color_16));
+
if (num_trans == 0)
num_trans = 1;
}
info_ptr->num_trans = (png_uint_16)num_trans;
+
if (num_trans != 0)
{
info_ptr->valid |= PNG_INFO_tRNS;
@@ -865,11 +879,12 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
#ifdef PNG_sPLT_SUPPORTED
void PNGAPI
png_set_sPLT(png_structp png_ptr,
- png_infop info_ptr, png_sPLT_tp entries, int nentries)
+ png_infop info_ptr, png_const_sPLT_tp entries, int nentries)
/*
* entries - array of png_sPLT_t structures
* to be added to the list of palettes
* in the info structure.
+ *
* nentries - number of palette structures to be
* added.
*/
@@ -882,7 +897,8 @@ png_set_sPLT(png_structp png_ptr,
np = (png_sPLT_tp)png_malloc_warn(png_ptr,
(info_ptr->splt_palettes_num + nentries) *
- (png_size_t)png_sizeof(png_sPLT_t));
+ (png_size_t)png_sizeof(png_sPLT_t));
+
if (np == NULL)
{
png_warning(png_ptr, "No memory for sPLT palettes");
@@ -891,36 +907,42 @@ png_set_sPLT(png_structp png_ptr,
png_memcpy(np, info_ptr->splt_palettes,
info_ptr->splt_palettes_num * png_sizeof(png_sPLT_t));
+
png_free(png_ptr, info_ptr->splt_palettes);
info_ptr->splt_palettes=NULL;
for (i = 0; i < nentries; i++)
{
png_sPLT_tp to = np + info_ptr->splt_palettes_num + i;
- png_sPLT_tp from = entries + i;
+ png_const_sPLT_tp from = entries + i;
png_uint_32 length;
length = png_strlen(from->name) + 1;
to->name = (png_charp)png_malloc_warn(png_ptr, (png_size_t)length);
+
if (to->name == NULL)
{
png_warning(png_ptr,
- "Out of memory while processing sPLT chunk");
+ "Out of memory while processing sPLT chunk");
continue;
}
+
png_memcpy(to->name, from->name, length);
to->entries = (png_sPLT_entryp)png_malloc_warn(png_ptr,
(png_size_t)(from->nentries * png_sizeof(png_sPLT_entry)));
+
if (to->entries == NULL)
{
png_warning(png_ptr,
- "Out of memory while processing sPLT chunk");
+ "Out of memory while processing sPLT chunk");
png_free(png_ptr, to->name);
to->name = NULL;
continue;
}
+
png_memcpy(to->entries, from->entries,
from->nentries * png_sizeof(png_sPLT_entry));
+
to->nentries = from->nentries;
to->depth = from->depth;
}
@@ -935,7 +957,7 @@ png_set_sPLT(png_structp png_ptr,
#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
void PNGAPI
png_set_unknown_chunks(png_structp png_ptr,
- png_infop info_ptr, png_unknown_chunkp unknowns, int num_unknowns)
+ png_infop info_ptr, png_const_unknown_chunkp unknowns, int num_unknowns)
{
png_unknown_chunkp np;
int i;
@@ -944,8 +966,9 @@ png_set_unknown_chunks(png_structp png_ptr,
return;
np = (png_unknown_chunkp)png_malloc_warn(png_ptr,
- (png_size_t)((info_ptr->unknown_chunks_num + num_unknowns) *
- png_sizeof(png_unknown_chunk)));
+ (png_size_t)(info_ptr->unknown_chunks_num + num_unknowns) *
+ png_sizeof(png_unknown_chunk));
+
if (np == NULL)
{
png_warning(png_ptr,
@@ -954,34 +977,39 @@ png_set_unknown_chunks(png_structp png_ptr,
}
png_memcpy(np, info_ptr->unknown_chunks,
- info_ptr->unknown_chunks_num * png_sizeof(png_unknown_chunk));
+ (png_size_t)info_ptr->unknown_chunks_num *
+ png_sizeof(png_unknown_chunk));
+
png_free(png_ptr, info_ptr->unknown_chunks);
info_ptr->unknown_chunks = NULL;
for (i = 0; i < num_unknowns; i++)
{
png_unknown_chunkp to = np + info_ptr->unknown_chunks_num + i;
- png_unknown_chunkp from = unknowns + i;
+ png_const_unknown_chunkp from = unknowns + i;
- png_memcpy((png_charp)to->name, (png_charp)from->name,
- png_sizeof(from->name));
+ png_memcpy(to->name, from->name, png_sizeof(from->name));
to->name[png_sizeof(to->name)-1] = '\0';
to->size = from->size;
+
/* Note our location in the read or write sequence */
to->location = (png_byte)(png_ptr->mode & 0xff);
if (from->size == 0)
to->data=NULL;
+
else
{
to->data = (png_bytep)png_malloc_warn(png_ptr,
- (png_size_t)from->size);
+ (png_size_t)from->size);
+
if (to->data == NULL)
{
png_warning(png_ptr,
- "Out of memory while processing unknown chunk");
+ "Out of memory while processing unknown chunk");
to->size = 0;
}
+
else
png_memcpy(to->data, from->data, from->size);
}
@@ -991,12 +1019,13 @@ png_set_unknown_chunks(png_structp png_ptr,
info_ptr->unknown_chunks_num += num_unknowns;
info_ptr->free_me |= PNG_FREE_UNKN;
}
+
void PNGAPI
png_set_unknown_chunk_location(png_structp png_ptr, png_infop info_ptr,
- int chunk, int location)
+ int chunk, int location)
{
if (png_ptr != NULL && info_ptr != NULL && chunk >= 0 && chunk <
- (int)info_ptr->unknown_chunks_num)
+ info_ptr->unknown_chunks_num)
info_ptr->unknown_chunks[chunk].location = (png_byte)location;
}
#endif
@@ -1010,40 +1039,48 @@ png_permit_mng_features (png_structp png_ptr, png_uint_32 mng_features)
if (png_ptr == NULL)
return (png_uint_32)0;
+
png_ptr->mng_features_permitted =
- (png_byte)(mng_features & PNG_ALL_MNG_FEATURES);
+ (png_byte)(mng_features & PNG_ALL_MNG_FEATURES);
+
return (png_uint_32)png_ptr->mng_features_permitted;
}
#endif
#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
void PNGAPI
-png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
- chunk_list, int num_chunks)
+png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_const_bytep
+ chunk_list, int num_chunks)
{
png_bytep new_list, p;
int i, old_num_chunks;
if (png_ptr == NULL)
return;
+
if (num_chunks == 0)
{
if (keep == PNG_HANDLE_CHUNK_ALWAYS || keep == PNG_HANDLE_CHUNK_IF_SAFE)
png_ptr->flags |= PNG_FLAG_KEEP_UNKNOWN_CHUNKS;
+
else
png_ptr->flags &= ~PNG_FLAG_KEEP_UNKNOWN_CHUNKS;
if (keep == PNG_HANDLE_CHUNK_ALWAYS)
png_ptr->flags |= PNG_FLAG_KEEP_UNSAFE_CHUNKS;
+
else
png_ptr->flags &= ~PNG_FLAG_KEEP_UNSAFE_CHUNKS;
+
return;
}
+
if (chunk_list == NULL)
return;
+
old_num_chunks = png_ptr->num_chunk_list;
new_list=(png_bytep)png_malloc(png_ptr,
- (png_size_t)
- (5*(num_chunks + old_num_chunks)));
+ (png_size_t)(5*(num_chunks + old_num_chunks)));
+
if (png_ptr->chunk_list != NULL)
{
png_memcpy(new_list, png_ptr->chunk_list,
@@ -1051,10 +1088,13 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
png_free(png_ptr, png_ptr->chunk_list);
png_ptr->chunk_list=NULL;
}
+
png_memcpy(new_list + 5*old_num_chunks, chunk_list,
(png_size_t)(5*num_chunks));
+
for (p = new_list + 5*old_num_chunks + 4, i = 0; i<num_chunks; i++, p += 5)
*p=(png_byte)keep;
+
png_ptr->num_chunk_list = old_num_chunks + num_chunks;
png_ptr->chunk_list = new_list;
png_ptr->free_me |= PNG_FREE_LIST;
@@ -1064,7 +1104,7 @@ png_set_keep_unknown_chunks(png_structp png_ptr, int keep, png_bytep
#ifdef PNG_READ_USER_CHUNKS_SUPPORTED
void PNGAPI
png_set_read_user_chunk_fn(png_structp png_ptr, png_voidp user_chunk_ptr,
- png_user_chunk_ptr read_user_chunk_fn)
+ png_user_chunk_ptr read_user_chunk_fn)
{
png_debug(1, "in png_set_read_user_chunk_fn");
@@ -1087,26 +1127,41 @@ png_set_rows(png_structp png_ptr, png_infop info_ptr, png_bytepp row_pointers)
if (info_ptr->row_pointers && (info_ptr->row_pointers != row_pointers))
png_free_data(png_ptr, info_ptr, PNG_FREE_ROWS, 0);
+
info_ptr->row_pointers = row_pointers;
+
if (row_pointers)
info_ptr->valid |= PNG_INFO_IDAT;
}
#endif
-#ifdef PNG_WRITE_SUPPORTED
void PNGAPI
-png_set_compression_buffer_size(png_structp png_ptr,
- png_size_t size)
+png_set_compression_buffer_size(png_structp png_ptr, png_size_t size)
{
if (png_ptr == NULL)
return;
+
png_free(png_ptr, png_ptr->zbuf);
- png_ptr->zbuf_size = size;
+
+ if (size > ZLIB_IO_MAX)
+ {
+ png_warning(png_ptr, "Attempt to set buffer size beyond max ignored");
+ png_ptr->zbuf_size = ZLIB_IO_MAX;
+ size = ZLIB_IO_MAX; /* must fit */
+ }
+
+ else
+ png_ptr->zbuf_size = (uInt)size;
+
png_ptr->zbuf = (png_bytep)png_malloc(png_ptr, size);
+
+ /* The following ensures a relatively safe failure if this gets called while
+ * the buffer is actually in use.
+ */
png_ptr->zstream.next_out = png_ptr->zbuf;
- png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
+ png_ptr->zstream.avail_out = 0;
+ png_ptr->zstream.avail_in = 0;
}
-#endif
void PNGAPI
png_set_invalid(png_structp png_ptr, png_infop info_ptr, int mask)
@@ -1129,21 +1184,27 @@ png_set_user_limits (png_structp png_ptr, png_uint_32 user_width_max,
*/
if (png_ptr == NULL)
return;
+
png_ptr->user_width_max = user_width_max;
png_ptr->user_height_max = user_height_max;
}
+
/* This function was added to libpng 1.4.0 */
void PNGAPI
png_set_chunk_cache_max (png_structp png_ptr,
png_uint_32 user_chunk_cache_max)
{
- if (png_ptr == NULL)
- return;
- png_ptr->user_chunk_cache_max = user_chunk_cache_max;
- if (user_chunk_cache_max == 0x7fffffffL) /* Unlimited */
- png_ptr->user_chunk_cache_max = 0;
- else
- png_ptr->user_chunk_cache_max = user_chunk_cache_max + 1;
+ if (png_ptr)
+ png_ptr->user_chunk_cache_max = user_chunk_cache_max;
+}
+
+/* This function was added to libpng 1.4.1 */
+void PNGAPI
+png_set_chunk_malloc_max (png_structp png_ptr,
+ png_alloc_size_t user_chunk_malloc_max)
+{
+ if (png_ptr)
+ png_ptr->user_chunk_malloc_max = user_chunk_malloc_max;
}
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */
@@ -1156,6 +1217,7 @@ png_set_benign_errors(png_structp png_ptr, int allowed)
if (allowed)
png_ptr->flags |= PNG_FLAG_BENIGN_ERRORS_WARN;
+
else
png_ptr->flags &= ~PNG_FLAG_BENIGN_ERRORS_WARN;
}
diff --git a/src/3rdparty/libpng/pngstruct.h b/src/3rdparty/libpng/pngstruct.h
new file mode 100644
index 0000000..8d781fa
--- /dev/null
+++ b/src/3rdparty/libpng/pngstruct.h
@@ -0,0 +1,308 @@
+
+/* pngstruct.h - header file for PNG reference library
+ *
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
+ * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
+ * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
+ *
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ */
+
+/* The structure that holds the information to read and write PNG files.
+ * The only people who need to care about what is inside of this are the
+ * people who will be modifying the library for their own special needs.
+ * It should NOT be accessed directly by an application.
+ */
+
+#ifndef PNGSTRUCT_H
+#define PNGSTRUCT_H
+/* zlib.h defines the structure z_stream, an instance of which is included
+ * in this structure and is required for decompressing the LZ compressed
+ * data in PNG files.
+ */
+#include "zlib.h"
+
+struct png_struct_def
+{
+#ifdef PNG_SETJMP_SUPPORTED
+ jmp_buf png_jmpbuf; /* used in png_error */
+ png_longjmp_ptr longjmp_fn;/* setjmp non-local goto function. */
+#endif
+ png_error_ptr error_fn; /* function for printing errors and aborting */
+ png_error_ptr warning_fn; /* function for printing warnings */
+ png_voidp error_ptr; /* user supplied struct for error functions */
+ png_rw_ptr write_data_fn; /* function for writing output data */
+ png_rw_ptr read_data_fn; /* function for reading input data */
+ png_voidp io_ptr; /* ptr to application struct for I/O functions */
+
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
+ png_user_transform_ptr read_user_transform_fn; /* user read transform */
+#endif
+
+#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
+ png_user_transform_ptr write_user_transform_fn; /* user write transform */
+#endif
+
+/* These were added in libpng-1.0.2 */
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
+#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
+ defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+ png_voidp user_transform_ptr; /* user supplied struct for user transform */
+ png_byte user_transform_depth; /* bit depth of user transformed pixels */
+ png_byte user_transform_channels; /* channels in user transformed pixels */
+#endif
+#endif
+
+ png_uint_32 mode; /* tells us where we are in the PNG file */
+ png_uint_32 flags; /* flags indicating various things to libpng */
+ png_uint_32 transformations; /* which transformations to perform */
+
+ z_stream zstream; /* pointer to decompression structure (below) */
+ png_bytep zbuf; /* buffer for zlib */
+ uInt zbuf_size; /* size of zbuf (typically 65536) */
+ int zlib_level; /* holds zlib compression level */
+ int zlib_method; /* holds zlib compression method */
+ int zlib_window_bits; /* holds zlib compression window bits */
+ int zlib_mem_level; /* holds zlib compression memory level */
+ int zlib_strategy; /* holds zlib compression strategy */
+
+ png_uint_32 width; /* width of image in pixels */
+ png_uint_32 height; /* height of image in pixels */
+ png_uint_32 num_rows; /* number of rows in current pass */
+ png_uint_32 usr_width; /* width of row at start of write */
+ png_size_t rowbytes; /* size of row in bytes */
+ png_uint_32 iwidth; /* width of current interlaced row in pixels */
+ png_uint_32 row_number; /* current row in interlace pass */
+ png_bytep prev_row; /* buffer to save previous (unfiltered) row */
+ png_bytep row_buf; /* buffer to save current (unfiltered) row */
+ png_bytep sub_row; /* buffer to save "sub" row when filtering */
+ png_bytep up_row; /* buffer to save "up" row when filtering */
+ png_bytep avg_row; /* buffer to save "avg" row when filtering */
+ png_bytep paeth_row; /* buffer to save "Paeth" row when filtering */
+ png_row_info row_info; /* used for transformation routines */
+
+ png_uint_32 idat_size; /* current IDAT size for read */
+ png_uint_32 crc; /* current chunk CRC value */
+ png_colorp palette; /* palette from the input file */
+ png_uint_16 num_palette; /* number of color entries in palette */
+ png_uint_16 num_trans; /* number of transparency values */
+ png_byte chunk_name[5]; /* null-terminated name of current chunk */
+ png_byte compression; /* file compression type (always 0) */
+ png_byte filter; /* file filter type (always 0) */
+ png_byte interlaced; /* PNG_INTERLACE_NONE, PNG_INTERLACE_ADAM7 */
+ png_byte pass; /* current interlace pass (0 - 6) */
+ png_byte do_filter; /* row filter flags (see PNG_FILTER_ below ) */
+ png_byte color_type; /* color type of file */
+ png_byte bit_depth; /* bit depth of file */
+ png_byte usr_bit_depth; /* bit depth of users row */
+ png_byte pixel_depth; /* number of bits per pixel */
+ png_byte channels; /* number of channels in file */
+ png_byte usr_channels; /* channels at start of write */
+ png_byte sig_bytes; /* magic bytes read/written from start of file */
+
+#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)
+ png_uint_16 filler; /* filler bytes for pixel expansion */
+#endif
+
+#ifdef PNG_bKGD_SUPPORTED
+ png_byte background_gamma_type;
+ png_fixed_point background_gamma;
+ png_color_16 background; /* background color in screen gamma space */
+#ifdef PNG_READ_GAMMA_SUPPORTED
+ png_color_16 background_1; /* background normalized to gamma 1.0 */
+#endif
+#endif /* PNG_bKGD_SUPPORTED */
+
+#ifdef PNG_WRITE_FLUSH_SUPPORTED
+ png_flush_ptr output_flush_fn; /* Function for flushing output */
+ png_uint_32 flush_dist; /* how many rows apart to flush, 0 - no flush */
+ png_uint_32 flush_rows; /* number of rows written since last flush */
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
+ int gamma_shift; /* number of "insignificant" bits in 16-bit gamma */
+ png_fixed_point gamma; /* file gamma value */
+ png_fixed_point screen_gamma; /* screen gamma value (display_exponent) */
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
+ png_bytep gamma_table; /* gamma table for 8-bit depth files */
+ png_bytep gamma_from_1; /* converts from 1.0 to screen */
+ png_bytep gamma_to_1; /* converts from file to 1.0 */
+ png_uint_16pp gamma_16_table; /* gamma table for 16-bit depth files */
+ png_uint_16pp gamma_16_from_1; /* converts from 1.0 to screen */
+ png_uint_16pp gamma_16_to_1; /* converts from file to 1.0 */
+#endif
+
+#if defined(PNG_READ_GAMMA_SUPPORTED) || defined(PNG_sBIT_SUPPORTED)
+ png_color_8 sig_bit; /* significant bits in each available channel */
+#endif
+
+#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
+ png_color_8 shift; /* shift for significant bit tranformation */
+#endif
+
+#if defined(PNG_tRNS_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED) \
+ || defined(PNG_READ_EXPAND_SUPPORTED) || defined(PNG_READ_BACKGROUND_SUPPORTED)
+ png_bytep trans_alpha; /* alpha values for paletted files */
+ png_color_16 trans_color; /* transparent color for non-paletted files */
+#endif
+
+ png_read_status_ptr read_row_fn; /* called after each row is decoded */
+ png_write_status_ptr write_row_fn; /* called after each row is encoded */
+#ifdef PNG_PROGRESSIVE_READ_SUPPORTED
+ png_progressive_info_ptr info_fn; /* called after header data fully read */
+ png_progressive_row_ptr row_fn; /* called after a prog. row is decoded */
+ png_progressive_end_ptr end_fn; /* called after image is complete */
+ png_bytep save_buffer_ptr; /* current location in save_buffer */
+ png_bytep save_buffer; /* buffer for previously read data */
+ png_bytep current_buffer_ptr; /* current location in current_buffer */
+ png_bytep current_buffer; /* buffer for recently used data */
+ png_uint_32 push_length; /* size of current input chunk */
+ png_uint_32 skip_length; /* bytes to skip in input data */
+ png_size_t save_buffer_size; /* amount of data now in save_buffer */
+ png_size_t save_buffer_max; /* total size of save_buffer */
+ png_size_t buffer_size; /* total amount of available input data */
+ png_size_t current_buffer_size; /* amount of data now in current_buffer */
+ int process_mode; /* what push library is currently doing */
+ int cur_palette; /* current push library palette index */
+
+# ifdef PNG_TEXT_SUPPORTED
+ png_size_t current_text_size; /* current size of text input data */
+ png_size_t current_text_left; /* how much text left to read in input */
+ png_charp current_text; /* current text chunk buffer */
+ png_charp current_text_ptr; /* current location in current_text */
+# endif /* PNG_PROGRESSIVE_READ_SUPPORTED && PNG_TEXT_SUPPORTED */
+
+#endif /* PNG_PROGRESSIVE_READ_SUPPORTED */
+
+#if defined(__TURBOC__) && !defined(_Windows) && !defined(__FLAT__)
+/* For the Borland special 64K segment handler */
+ png_bytepp offset_table_ptr;
+ png_bytep offset_table;
+ png_uint_16 offset_table_number;
+ png_uint_16 offset_table_count;
+ png_uint_16 offset_table_count_free;
+#endif
+
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+ png_bytep palette_lookup; /* lookup table for quantizing */
+ png_bytep quantize_index; /* index translation for palette files */
+#endif
+
+#if defined(PNG_READ_QUANTIZE_SUPPORTED) || defined(PNG_hIST_SUPPORTED)
+ png_uint_16p hist; /* histogram */
+#endif
+
+#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
+ png_byte heuristic_method; /* heuristic for row filter selection */
+ png_byte num_prev_filters; /* number of weights for previous rows */
+ png_bytep prev_filters; /* filter type(s) of previous row(s) */
+ png_uint_16p filter_weights; /* weight(s) for previous line(s) */
+ png_uint_16p inv_filter_weights; /* 1/weight(s) for previous line(s) */
+ png_uint_16p filter_costs; /* relative filter calculation cost */
+ png_uint_16p inv_filter_costs; /* 1/relative filter calculation cost */
+#endif
+
+#ifdef PNG_TIME_RFC1123_SUPPORTED
+ png_charp time_buffer; /* String to hold RFC 1123 time text */
+#endif
+
+/* New members added in libpng-1.0.6 */
+
+ png_uint_32 free_me; /* flags items libpng is responsible for freeing */
+
+#ifdef PNG_USER_CHUNKS_SUPPORTED
+ png_voidp user_chunk_ptr;
+ png_user_chunk_ptr read_user_chunk_fn; /* user read chunk handler */
+#endif
+
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+ int num_chunk_list;
+ png_bytep chunk_list;
+#endif
+
+/* New members added in libpng-1.0.3 */
+#ifdef PNG_READ_RGB_TO_GRAY_SUPPORTED
+ png_byte rgb_to_gray_status;
+ /* These were changed from png_byte in libpng-1.0.6 */
+ png_uint_16 rgb_to_gray_red_coeff;
+ png_uint_16 rgb_to_gray_green_coeff;
+ png_uint_16 rgb_to_gray_blue_coeff;
+#endif
+
+/* New member added in libpng-1.0.4 (renamed in 1.0.9) */
+#if defined(PNG_MNG_FEATURES_SUPPORTED) || \
+ defined(PNG_READ_EMPTY_PLTE_SUPPORTED) || \
+ defined(PNG_WRITE_EMPTY_PLTE_SUPPORTED)
+/* Changed from png_byte to png_uint_32 at version 1.2.0 */
+ png_uint_32 mng_features_permitted;
+#endif
+
+/* New member added in libpng-1.0.9, ifdef'ed out in 1.0.12, enabled in 1.2.0 */
+#ifdef PNG_MNG_FEATURES_SUPPORTED
+ png_byte filter_type;
+#endif
+
+/* New members added in libpng-1.2.0 */
+
+/* New members added in libpng-1.0.2 but first enabled by default in 1.2.0 */
+#ifdef PNG_USER_MEM_SUPPORTED
+ png_voidp mem_ptr; /* user supplied struct for mem functions */
+ png_malloc_ptr malloc_fn; /* function for allocating memory */
+ png_free_ptr free_fn; /* function for freeing memory */
+#endif
+
+/* New member added in libpng-1.0.13 and 1.2.0 */
+ png_bytep big_row_buf; /* buffer to save current (unfiltered) row */
+
+#ifdef PNG_READ_QUANTIZE_SUPPORTED
+/* The following three members were added at version 1.0.14 and 1.2.4 */
+ png_bytep quantize_sort; /* working sort array */
+ png_bytep index_to_palette; /* where the original index currently is
+ in the palette */
+ png_bytep palette_to_index; /* which original index points to this
+ palette color */
+#endif
+
+/* New members added in libpng-1.0.16 and 1.2.6 */
+ png_byte compression_type;
+
+#ifdef PNG_USER_LIMITS_SUPPORTED
+ png_uint_32 user_width_max;
+ png_uint_32 user_height_max;
+
+ /* Added in libpng-1.4.0: Total number of sPLT, text, and unknown
+ * chunks that can be stored (0 means unlimited).
+ */
+ png_uint_32 user_chunk_cache_max;
+
+ /* Total memory that a zTXt, sPLT, iTXt, iCCP, or unknown chunk
+ * can occupy when decompressed. 0 means unlimited.
+ */
+ png_alloc_size_t user_chunk_malloc_max;
+#endif
+
+/* New member added in libpng-1.0.25 and 1.2.17 */
+#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
+ /* Storage for unknown chunk that the library doesn't recognize. */
+ png_unknown_chunk unknown_chunk;
+#endif
+
+/* New members added in libpng-1.2.26 */
+ png_size_t old_big_row_buf_size;
+ png_size_t old_prev_row_size;
+
+/* New member added in libpng-1.2.30 */
+ png_charp chunkdata; /* buffer for reading chunk data */
+
+#ifdef PNG_IO_STATE_SUPPORTED
+/* New member added in libpng-1.4.0 */
+ png_uint_32 io_state;
+#endif
+};
+#endif /* PNGSTRUCT_H */
diff --git a/src/3rdparty/libpng/pngtest.c b/src/3rdparty/libpng/pngtest.c
index 4b70404..cbb7eb2 100644
--- a/src/3rdparty/libpng/pngtest.c
+++ b/src/3rdparty/libpng/pngtest.c
@@ -1,8 +1,8 @@
/* pngtest.c - a simple test program to test libpng
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -31,26 +31,51 @@
* of files at once by typing "pngtest -m file1.png file2.png ..."
*/
+#include "zlib.h"
#include "png.h"
-#include "pngpriv.h"
-
+/* Copied from pngpriv.h but only used in error messages below. */
+#ifndef PNG_ZBUF_SIZE
+# define PNG_ZBUF_SIZE 8192
+#endif
# include <stdio.h>
# include <stdlib.h>
+# include <string.h>
# define FCLOSE(file) fclose(file)
#ifndef PNG_STDIO_SUPPORTED
- typedef FILE * png_FILE_p;
+typedef FILE * png_FILE_p;
#endif
-/* Makes pngtest verbose so we can find problems (needs to be before png.h) */
+/* Makes pngtest verbose so we can find problems. */
#ifndef PNG_DEBUG
# define PNG_DEBUG 0
#endif
+#if PNG_DEBUG > 1
+# define pngtest_debug(m) ((void)fprintf(stderr, m "\n"))
+# define pngtest_debug1(m,p1) ((void)fprintf(stderr, m "\n", p1))
+# define pngtest_debug2(m,p1,p2) ((void)fprintf(stderr, m "\n", p1, p2))
+#else
+# define pngtest_debug(m) ((void)0)
+# define pngtest_debug1(m,p1) ((void)0)
+# define pngtest_debug2(m,p1,p2) ((void)0)
+#endif
+
#if !PNG_DEBUG
# define SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */
#endif
+/* The code uses memcmp and memcpy on large objects (typically row pointers) so
+ * it is necessary to do soemthing special on certain architectures, note that
+ * the actual support for this was effectively removed in 1.4, so only the
+ * memory remains in this program:
+ */
+#define CVT_PTR(ptr) (ptr)
+#define CVT_PTR_NOCHECK(ptr) (ptr)
+#define png_memcmp memcmp
+#define png_memcpy memcpy
+#define png_memset memset
+
/* Turn on CPU timing
#define PNGTEST_TIMING
*/
@@ -82,11 +107,6 @@ int test_one_file PNGARG((PNG_CONST char *inname, PNG_CONST char *outname));
/* #define STDERR stderr */
#define STDERR stdout /* For DOS */
-/* In case a system header (e.g., on AIX) defined jmpbuf */
-#ifdef jmpbuf
-# undef jmpbuf
-#endif
-
/* Define png_jmpbuf() in case we are using a pre-1.0.6 version of libpng */
#ifndef png_jmpbuf
# define png_jmpbuf(png_ptr) png_ptr->jmpbuf
@@ -97,35 +117,40 @@ static int status_pass = 1;
static int status_dots_requested = 0;
static int status_dots = 1;
-void
+void PNGCBAPI
read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
-void
+void PNGCBAPI
read_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
{
if (png_ptr == NULL || row_number > PNG_UINT_31_MAX)
return;
+
if (status_pass != pass)
{
fprintf(stdout, "\n Pass %d: ", pass);
status_pass = pass;
status_dots = 31;
}
+
status_dots--;
+
if (status_dots == 0)
{
fprintf(stdout, "\n ");
status_dots=30;
}
+
fprintf(stdout, "r");
}
-void
+void PNGCBAPI
write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass);
-void
+void PNGCBAPI
write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
{
if (png_ptr == NULL || row_number > PNG_UINT_31_MAX || pass > 7)
return;
+
fprintf(stdout, "w");
}
@@ -136,9 +161,9 @@ write_row_callback(png_structp png_ptr, png_uint_32 row_number, int pass)
* 5 in case illegal filter values are present.)
*/
static png_uint_32 filters_used[256];
-void
+void PNGCBAPI
count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data);
-void
+void PNGCBAPI
count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
{
if (png_ptr != NULL && row_info != NULL)
@@ -153,13 +178,14 @@ count_filters(png_structp png_ptr, png_row_infop row_info, png_bytep data)
static png_uint_32 zero_samples;
-void
+void PNGCBAPI
count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data);
-void
+void PNGCBAPI
count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
{
png_bytep dp = data;
- if (png_ptr == NULL)return;
+ if (png_ptr == NULL)
+ return;
/* Contents of row_info:
* png_uint_32 width width of row
@@ -176,41 +202,49 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
{
int pos = 0;
png_uint_32 n, nstop;
+
for (n = 0, nstop=row_info->width; n<nstop; n++)
{
if (row_info->bit_depth == 1)
{
if (((*dp << pos++ ) & 0x80) == 0)
zero_samples++;
+
if (pos == 8)
{
pos = 0;
dp++;
}
}
+
if (row_info->bit_depth == 2)
{
if (((*dp << (pos+=2)) & 0xc0) == 0)
zero_samples++;
+
if (pos == 8)
{
pos = 0;
dp++;
}
}
+
if (row_info->bit_depth == 4)
{
if (((*dp << (pos+=4)) & 0xf0) == 0)
zero_samples++;
+
if (pos == 8)
{
pos = 0;
dp++;
}
}
+
if (row_info->bit_depth == 8)
if (*dp++ == 0)
zero_samples++;
+
if (row_info->bit_depth == 16)
{
if ((*dp | *(dp+1)) == 0)
@@ -233,10 +267,12 @@ count_zero_samples(png_structp png_ptr, png_row_infop row_info, png_bytep data)
if (row_info->bit_depth == 8)
if (*dp++ == 0)
zero_samples++;
+
if (row_info->bit_depth == 16)
{
if ((*dp | *(dp+1)) == 0)
zero_samples++;
+
dp+=2;
}
}
@@ -263,8 +299,50 @@ static int wrote_question = 0;
* than changing the library.
*/
+#ifdef PNG_IO_STATE_SUPPORTED
+void
+pngtest_check_io_state(png_structp png_ptr, png_size_t data_length,
+ png_uint_32 io_op);
+void
+pngtest_check_io_state(png_structp png_ptr, png_size_t data_length,
+ png_uint_32 io_op)
+{
+ png_uint_32 io_state = png_get_io_state(png_ptr);
+ int err = 0;
+
+ /* Check if the current operation (reading / writing) is as expected. */
+ if ((io_state & PNG_IO_MASK_OP) != io_op)
+ png_error(png_ptr, "Incorrect operation in I/O state");
+
+ /* Check if the buffer size specific to the current location
+ * (file signature / header / data / crc) is as expected.
+ */
+ switch (io_state & PNG_IO_MASK_LOC)
+ {
+ case PNG_IO_SIGNATURE:
+ if (data_length > 8)
+ err = 1;
+ break;
+ case PNG_IO_CHUNK_HDR:
+ if (data_length != 8)
+ err = 1;
+ break;
+ case PNG_IO_CHUNK_DATA:
+ break; /* no restrictions here */
+ case PNG_IO_CHUNK_CRC:
+ if (data_length != 4)
+ err = 1;
+ break;
+ default:
+ err = 1; /* uninitialized */
+ }
+ if (err)
+ png_error(png_ptr, "Bad I/O state or buffer size");
+}
+#endif
+
#ifndef USE_FAR_KEYWORD
-static void
+static void PNGCBAPI
pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check = 0;
@@ -281,8 +359,12 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
if (check != length)
{
- png_error(png_ptr, "Read Error!");
+ png_error(png_ptr, "Read Error");
}
+
+#ifdef PNG_IO_STATE_SUPPORTED
+ pngtest_check_io_state(png_ptr, length, PNG_IO_READING);
+#endif
}
#else
/* This is the model-independent version. Since the standard I/O library
@@ -293,7 +375,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
-static void
+static void PNGCBAPI
pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check;
@@ -302,7 +384,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
/* Check if data really is near. If so, use usual code. */
n_data = (png_byte *)CVT_PTR_NOCHECK(data);
- io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
+ io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr));
if ((png_bytep)n_data == data)
{
check = fread(n_data, 1, length, io_ptr);
@@ -313,6 +395,7 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
png_size_t read, remaining, err;
check = 0;
remaining = length;
+
do
{
read = MIN(NEAR_BUF_SIZE, remaining);
@@ -327,17 +410,22 @@ pngtest_read_data(png_structp png_ptr, png_bytep data, png_size_t length)
}
while (remaining != 0);
}
+
if (check != length)
- png_error(png_ptr, "read Error");
+ png_error(png_ptr, "Read Error");
+
+#ifdef PNG_IO_STATE_SUPPORTED
+ pngtest_check_io_state(png_ptr, length, PNG_IO_READING);
+#endif
}
#endif /* USE_FAR_KEYWORD */
#ifdef PNG_WRITE_FLUSH_SUPPORTED
-static void
+static void PNGCBAPI
pngtest_flush(png_structp png_ptr)
{
/* Do nothing; fflush() is said to be just a waste of energy. */
- png_ptr = png_ptr; /* Stifle compiler warning */
+ PNG_UNUSED(png_ptr) /* Stifle compiler warning */
}
#endif
@@ -347,16 +435,21 @@ pngtest_flush(png_structp png_ptr)
* than changing the library.
*/
#ifndef USE_FAR_KEYWORD
-static void
+static void PNGCBAPI
pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check;
- check = fwrite(data, 1, length, (png_FILE_p)png_ptr->io_ptr);
+ check = fwrite(data, 1, length, (png_FILE_p)png_get_io_ptr(png_ptr));
+
if (check != length)
{
png_error(png_ptr, "Write Error");
}
+
+#ifdef PNG_IO_STATE_SUPPORTED
+ pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING);
+#endif
}
#else
/* This is the model-independent version. Since the standard I/O library
@@ -367,7 +460,7 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
-static void
+static void PNGCBAPI
pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_size_t check;
@@ -376,17 +469,20 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
/* Check if data really is near. If so, use usual code. */
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
- io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
+ io_ptr = (png_FILE_p)CVT_PTR(png_get_io_ptr(png_ptr));
+
if ((png_bytep)near_data == data)
{
check = fwrite(near_data, 1, length, io_ptr);
}
+
else
{
png_byte buf[NEAR_BUF_SIZE];
png_size_t written, remaining, err;
check = 0;
remaining = length;
+
do
{
written = MIN(NEAR_BUF_SIZE, remaining);
@@ -401,10 +497,15 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
}
while (remaining != 0);
}
+
if (check != length)
{
png_error(png_ptr, "Write Error");
}
+
+#ifdef PNG_IO_STATE_SUPPORTED
+ pngtest_check_io_state(png_ptr, length, PNG_IO_WRITING);
+#endif
}
#endif /* USE_FAR_KEYWORD */
@@ -413,14 +514,16 @@ pngtest_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
* here if you don't want to. In the default configuration, png_ptr is
* not used, but it is passed in case it may be useful.
*/
-static void
+static void PNGCBAPI
pngtest_warning(png_structp png_ptr, png_const_charp message)
{
PNG_CONST char *name = "UNKNOWN (ERROR!)";
char *test;
test = png_get_error_ptr(png_ptr);
+
if (test == NULL)
fprintf(STDERR, "%s: libpng warning: %s\n", name, message);
+
else
fprintf(STDERR, "%s: libpng warning: %s\n", test, message);
}
@@ -430,7 +533,7 @@ pngtest_warning(png_structp png_ptr, png_const_charp message)
* function is used by default, or if the program supplies NULL for the
* error function pointer in png_set_error_fn().
*/
-static void
+static void PNGCBAPI
pngtest_error(png_structp png_ptr, png_const_charp message)
{
pngtest_warning(png_ptr, message);
@@ -467,12 +570,12 @@ static int maximum_allocation = 0;
static int total_allocation = 0;
static int num_allocations = 0;
-png_voidp png_debug_malloc
- PNGARG((png_structp png_ptr, png_alloc_size_t size));
-void png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr));
+png_voidp PNGCBAPI png_debug_malloc PNGARG((png_structp png_ptr,
+ png_alloc_size_t size));
+void PNGCBAPI png_debug_free PNGARG((png_structp png_ptr, png_voidp ptr));
png_voidp
-png_debug_malloc(png_structp png_ptr, png_alloc_size_t size)
+PNGCBAPI png_debug_malloc(png_structp png_ptr, png_alloc_size_t size)
{
/* png_malloc has already tested for NULL; png_create_struct calls
@@ -494,12 +597,16 @@ png_debug_malloc(png_structp png_ptr, png_alloc_size_t size)
current_allocation += size;
total_allocation += size;
num_allocations ++;
+
if (current_allocation > maximum_allocation)
maximum_allocation = current_allocation;
+
pinfo->pointer = png_malloc(png_ptr, size);
/* Restore malloc_fn and free_fn */
+
png_set_mem_fn(png_ptr,
NULL, png_debug_malloc, png_debug_free);
+
if (size != 0 && pinfo->pointer == NULL)
{
current_allocation -= size;
@@ -507,23 +614,27 @@ png_debug_malloc(png_structp png_ptr, png_alloc_size_t size)
png_error(png_ptr,
"out of memory in pngtest->png_debug_malloc");
}
+
pinfo->next = pinformation;
pinformation = pinfo;
/* Make sure the caller isn't assuming zeroed memory. */
png_memset(pinfo->pointer, 0xdd, pinfo->size);
+
if (verbose)
- printf("png_malloc %lu bytes at %x\n", (unsigned long)size,
+ printf("png_malloc %lu bytes at %p\n", (unsigned long)size,
pinfo->pointer);
+
return (png_voidp)(pinfo->pointer);
}
}
/* Free a pointer. It is removed from the list at the same time. */
-void
+void PNGCBAPI
png_debug_free(png_structp png_ptr, png_voidp ptr)
{
if (png_ptr == NULL)
fprintf(STDERR, "NULL pointer to png_debug_free.\n");
+
if (ptr == 0)
{
#if 0 /* This happens all the time. */
@@ -535,9 +646,11 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
/* Unlink the element from the list. */
{
memory_infop FAR *ppinfo = &pinformation;
+
for (;;)
{
memory_infop pinfo = *ppinfo;
+
if (pinfo->pointer == ptr)
{
*ppinfo = pinfo->next;
@@ -551,18 +664,21 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
pinfo = NULL;
break;
}
+
if (pinfo->next == NULL)
{
fprintf(STDERR, "Pointer %x not found\n", (unsigned int)ptr);
break;
}
+
ppinfo = &pinfo->next;
}
}
/* Finally free the data. */
if (verbose)
- printf("Freeing %x\n", ptr);
+ printf("Freeing %p\n", ptr);
+
png_free_default(png_ptr, ptr);
ptr = NULL;
}
@@ -584,7 +700,7 @@ static png_uint_32 user_chunk_data[4];
* 3: vpAg units
*/
-static int read_user_chunk_callback(png_struct *png_ptr,
+static int PNGCBAPI read_user_chunk_callback(png_struct *png_ptr,
png_unknown_chunkp chunk)
{
png_uint_32
@@ -609,8 +725,10 @@ static int read_user_chunk_callback(png_struct *png_ptr,
/* Found sTER chunk */
if (chunk->size != 1)
return (-1); /* Error return */
+
if (chunk->data[0] != 0 && chunk->data[0] != 1)
return (-1); /* Invalid mode */
+
my_user_chunk_data=(png_uint_32 *) png_get_user_chunk_ptr(png_ptr);
my_user_chunk_data[0]=chunk->data[0]+1;
return (1);
@@ -661,7 +779,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
int bit_depth, color_type;
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
- jmp_buf jmpbuf;
+ jmp_buf png_jmpbuf;
#endif
#endif
@@ -682,12 +800,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
return (1);
}
- png_debug(0, "Allocating read and write structures");
+ pngtest_debug("Allocating read and write structures");
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
read_ptr =
png_create_read_struct_2(PNG_LIBPNG_VER_STRING, NULL,
- NULL, NULL, NULL,
- (png_malloc_ptr)png_debug_malloc, (png_free_ptr)png_debug_free);
+ NULL, NULL, NULL, png_debug_malloc, png_debug_free);
#else
read_ptr =
png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);
@@ -720,7 +837,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
pngtest_warning);
#endif
#endif
- png_debug(0, "Allocating read_info, write_info and end_info structures");
+ pngtest_debug("Allocating read_info, write_info and end_info structures");
read_info_ptr = png_create_info_struct(read_ptr);
end_info_ptr = png_create_info_struct(read_ptr);
#ifdef PNG_WRITE_SUPPORTED
@@ -729,9 +846,9 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
#ifdef PNG_SETJMP_SUPPORTED
- png_debug(0, "Setting jmpbuf for read struct");
+ pngtest_debug("Setting jmpbuf for read struct");
#ifdef USE_FAR_KEYWORD
- if (setjmp(jmpbuf))
+ if (setjmp(png_jmpbuf))
#else
if (setjmp(png_jmpbuf(read_ptr)))
#endif
@@ -749,13 +866,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
return (1);
}
#ifdef USE_FAR_KEYWORD
- png_memcpy(png_jmpbuf(read_ptr), jmpbuf, png_sizeof(jmp_buf));
+ png_memcpy(png_jmpbuf(read_ptr), png_jmpbuf, png_sizeof(jmp_buf));
#endif
#ifdef PNG_WRITE_SUPPORTED
- png_debug(0, "Setting jmpbuf for write struct");
+ pngtest_debug("Setting jmpbuf for write struct");
#ifdef USE_FAR_KEYWORD
- if (setjmp(jmpbuf))
+
+ if (setjmp(png_jmpbuf))
#else
if (setjmp(png_jmpbuf(write_ptr)))
#endif
@@ -770,13 +888,14 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
FCLOSE(fpout);
return (1);
}
+
#ifdef USE_FAR_KEYWORD
- png_memcpy(png_jmpbuf(write_ptr), jmpbuf, png_sizeof(jmp_buf));
+ png_memcpy(png_jmpbuf(write_ptr), png_jmpbuf, png_sizeof(jmp_buf));
#endif
#endif
#endif
- png_debug(0, "Initializing input and output streams");
+ pngtest_debug("Initializing input and output streams");
#ifdef PNG_STDIO_SUPPORTED
png_init_io(read_ptr, fpin);
# ifdef PNG_WRITE_SUPPORTED
@@ -793,6 +912,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
# endif
# endif
#endif
+
if (status_dots_requested == 1)
{
#ifdef PNG_WRITE_SUPPORTED
@@ -800,6 +920,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
png_set_read_status_fn(read_ptr, read_row_callback);
}
+
else
{
#ifdef PNG_WRITE_SUPPORTED
@@ -811,8 +932,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
{
int i;
+
for (i = 0; i<256; i++)
filters_used[i] = 0;
+
png_set_read_user_transform_fn(read_ptr, count_filters);
}
#endif
@@ -836,10 +959,10 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
NULL, 0);
#endif
- png_debug(0, "Reading info struct");
+ pngtest_debug("Reading info struct");
png_read_info(read_ptr, read_info_ptr);
- png_debug(0, "Transferring info struct");
+ pngtest_debug("Transferring info struct");
{
int interlace_type, compression_type, filter_type;
@@ -859,8 +982,9 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
{
png_fixed_point white_x, white_y, red_x, red_y, green_x, green_y, blue_x,
blue_y;
- if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y, &red_x,
- &red_y, &green_x, &green_y, &blue_x, &blue_y))
+
+ if (png_get_cHRM_fixed(read_ptr, read_info_ptr, &white_x, &white_y,
+ &red_x, &red_y, &green_x, &green_y, &blue_x, &blue_y))
{
png_set_cHRM_fixed(write_ptr, write_info_ptr, white_x, white_y, red_x,
red_y, green_x, green_y, blue_x, blue_y);
@@ -881,6 +1005,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
{
double white_x, white_y, red_x, red_y, green_x, green_y, blue_x,
blue_y;
+
if (png_get_cHRM(read_ptr, read_info_ptr, &white_x, &white_y, &red_x,
&red_y, &green_x, &green_y, &blue_x, &blue_y))
{
@@ -902,7 +1027,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_iCCP_SUPPORTED
{
png_charp name;
- png_charp profile;
+ png_bytep profile;
png_uint_32 proflen;
int compression_type;
@@ -1012,7 +1137,8 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_get_sCAL_s(read_ptr, read_info_ptr, &unit, &scal_width,
&scal_height))
{
- png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width, scal_height);
+ png_set_sCAL_s(write_ptr, write_info_ptr, unit, scal_width,
+ scal_height);
}
}
#endif
@@ -1025,7 +1151,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_get_text(read_ptr, read_info_ptr, &text_ptr, &num_text) > 0)
{
- png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks", num_text);
+ pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text);
png_set_text(write_ptr, write_info_ptr, text_ptr, num_text);
}
}
@@ -1045,6 +1171,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_memcpy(tIME_string,
png_convert_to_rfc1123(read_ptr, mod_time),
png_sizeof(tIME_string));
+
tIME_string[png_sizeof(tIME_string) - 1] = '\0';
tIME_chunk_present++;
#endif /* PNG_TIME_RFC1123_SUPPORTED */
@@ -1076,18 +1203,19 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
{
png_unknown_chunkp unknowns;
- int num_unknowns = (int)png_get_unknown_chunks(read_ptr, read_info_ptr,
+ int num_unknowns = png_get_unknown_chunks(read_ptr, read_info_ptr,
&unknowns);
+
if (num_unknowns)
{
- png_size_t i;
+ int i;
png_set_unknown_chunks(write_ptr, write_info_ptr, unknowns,
num_unknowns);
/* Copy the locations from the read_info_ptr. The automatically
* generated locations in write_info_ptr are wrong because we
* haven't written anything yet.
*/
- for (i = 0; i < (png_size_t)num_unknowns; i++)
+ for (i = 0; i < num_unknowns; i++)
png_set_unknown_chunk_location(write_ptr, write_info_ptr, i,
unknowns[i].location);
}
@@ -1095,7 +1223,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
#ifdef PNG_WRITE_SUPPORTED
- png_debug(0, "Writing info struct");
+ pngtest_debug("Writing info struct");
/* If we wanted, we could write info in two steps:
* png_write_info_before_PLTE(write_ptr, write_info_ptr);
@@ -1113,9 +1241,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (verbose)
fprintf(STDERR, "\n stereo mode = %lu\n",
(unsigned long)(user_chunk_data[0] - 1));
+
ster_chunk_data[0]=(unsigned char)(user_chunk_data[0] - 1);
png_write_chunk(write_ptr, png_sTER, ster_chunk_data, 1);
}
+
if (user_chunk_data[1] != 0 || user_chunk_data[2] != 0)
{
png_byte png_vpAg[5] = {118, 112, 65, 103, '\0'};
@@ -1128,6 +1258,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
(unsigned long)user_chunk_data[1],
(unsigned long)user_chunk_data[2],
(unsigned long)user_chunk_data[3]);
+
png_save_uint_32(vpag_chunk_data, user_chunk_data[1]);
png_save_uint_32(vpag_chunk_data + 4, user_chunk_data[2]);
vpag_chunk_data[8] = (unsigned char)(user_chunk_data[3] & 0xff);
@@ -1138,12 +1269,13 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
#ifdef SINGLE_ROWBUF_ALLOC
- png_debug(0, "Allocating row buffer...");
+ pngtest_debug("Allocating row buffer...");
row_buf = (png_bytep)png_malloc(read_ptr,
png_get_rowbytes(read_ptr, read_info_ptr));
- png_debug1(0, "0x%08lx", (unsigned long)row_buf);
+
+ pngtest_debug1("\t0x%08lx", (unsigned long)row_buf);
#endif /* SINGLE_ROWBUF_ALLOC */
- png_debug(0, "Writing row data");
+ pngtest_debug("Writing row data");
#if defined(PNG_READ_INTERLACING_SUPPORTED) || \
defined(PNG_WRITE_INTERLACING_SUPPORTED)
@@ -1162,15 +1294,17 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
for (pass = 0; pass < num_pass; pass++)
{
- png_debug1(0, "Writing row data for pass %d", pass);
+ pngtest_debug1("Writing row data for pass %d", pass);
for (y = 0; y < height; y++)
{
#ifndef SINGLE_ROWBUF_ALLOC
- png_debug2(0, "Allocating row buffer (pass %d, y = %ld)...", pass, y);
+ pngtest_debug2("Allocating row buffer (pass %d, y = %u)...", pass, y);
row_buf = (png_bytep)png_malloc(read_ptr,
png_get_rowbytes(read_ptr, read_info_ptr));
- png_debug2(0, "0x%08lx (%ld bytes)", (unsigned long)row_buf,
+
+ pngtest_debug2("\t0x%08lx (%u bytes)", (unsigned long)row_buf,
png_get_rowbytes(read_ptr, read_info_ptr));
+
#endif /* !SINGLE_ROWBUF_ALLOC */
png_read_rows(read_ptr, (png_bytepp)&row_buf, NULL, 1);
@@ -1189,7 +1323,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif /* PNG_WRITE_SUPPORTED */
#ifndef SINGLE_ROWBUF_ALLOC
- png_debug2(0, "Freeing row buffer (pass %d, y = %ld)", pass, y);
+ pngtest_debug2("Freeing row buffer (pass %d, y = %u)", pass, y);
png_free(read_ptr, row_buf);
row_buf = NULL;
#endif /* !SINGLE_ROWBUF_ALLOC */
@@ -1203,7 +1337,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_free_data(write_ptr, write_info_ptr, PNG_FREE_UNKN, -1);
#endif
- png_debug(0, "Reading and writing end_info data");
+ pngtest_debug("Reading and writing end_info data");
png_read_end(read_ptr, end_info_ptr);
#ifdef PNG_TEXT_SUPPORTED
@@ -1213,7 +1347,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_get_text(read_ptr, end_info_ptr, &text_ptr, &num_text) > 0)
{
- png_debug1(0, "Handling %d iTXt/tEXt/zTXt chunks", num_text);
+ pngtest_debug1("Handling %d iTXt/tEXt/zTXt chunks", num_text);
png_set_text(write_ptr, write_end_info_ptr, text_ptr, num_text);
}
}
@@ -1232,6 +1366,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_memcpy(tIME_string,
png_convert_to_rfc1123(read_ptr, mod_time),
png_sizeof(tIME_string));
+
tIME_string[png_sizeof(tIME_string) - 1] = '\0';
tIME_chunk_present++;
#endif /* PNG_TIME_RFC1123_SUPPORTED */
@@ -1241,19 +1376,19 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
{
png_unknown_chunkp unknowns;
- int num_unknowns;
- num_unknowns = (int)png_get_unknown_chunks(read_ptr, end_info_ptr,
+ int num_unknowns = png_get_unknown_chunks(read_ptr, end_info_ptr,
&unknowns);
+
if (num_unknowns)
{
- png_size_t i;
+ int i;
png_set_unknown_chunks(write_ptr, write_end_info_ptr, unknowns,
num_unknowns);
/* Copy the locations from the read_info_ptr. The automatically
* generated locations in write_end_info_ptr are wrong because we
* haven't written the end_info yet.
*/
- for (i = 0; i < (png_size_t)num_unknowns; i++)
+ for (i = 0; i < num_unknowns; i++)
png_set_unknown_chunk_location(write_ptr, write_end_info_ptr, i,
unknowns[i].location);
}
@@ -1274,26 +1409,26 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
}
#endif
- png_debug(0, "Destroying data structs");
+ pngtest_debug("Destroying data structs");
#ifdef SINGLE_ROWBUF_ALLOC
- png_debug(1, "destroying row_buf for read_ptr");
+ pngtest_debug("destroying row_buf for read_ptr");
png_free(read_ptr, row_buf);
row_buf = NULL;
#endif /* SINGLE_ROWBUF_ALLOC */
- png_debug(1, "destroying read_ptr, read_info_ptr, end_info_ptr");
+ pngtest_debug("destroying read_ptr, read_info_ptr, end_info_ptr");
png_destroy_read_struct(&read_ptr, &read_info_ptr, &end_info_ptr);
#ifdef PNG_WRITE_SUPPORTED
- png_debug(1, "destroying write_end_info_ptr");
+ pngtest_debug("destroying write_end_info_ptr");
png_destroy_info_struct(write_ptr, &write_end_info_ptr);
- png_debug(1, "destroying write_ptr, write_info_ptr");
+ pngtest_debug("destroying write_ptr, write_info_ptr");
png_destroy_write_struct(&write_ptr, &write_info_ptr);
#endif
- png_debug(0, "Destruction complete.");
+ pngtest_debug("Destruction complete.");
FCLOSE(fpin);
FCLOSE(fpout);
- png_debug(0, "Opening files for comparison");
+ pngtest_debug("Opening files for comparison");
if ((fpin = fopen(inname, "rb")) == NULL)
{
fprintf(STDERR, "Could not find file %s\n", inname);
@@ -1318,6 +1453,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
{
fprintf(STDERR, "\nFiles %s and %s are of a different size\n",
inname, outname);
+
if (wrote_question == 0)
{
fprintf(STDERR,
@@ -1330,6 +1466,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
ZLIB_VERSION);
wrote_question = 1;
}
+
FCLOSE(fpin);
FCLOSE(fpout);
return (0);
@@ -1341,6 +1478,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
if (png_memcmp(inbuf, outbuf, num_in))
{
fprintf(STDERR, "\nFiles %s and %s are different\n", inname, outname);
+
if (wrote_question == 0)
{
fprintf(STDERR,
@@ -1353,6 +1491,7 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
ZLIB_VERSION);
wrote_question = 1;
}
+
FCLOSE(fpin);
FCLOSE(fpout);
return (0);
@@ -1387,11 +1526,10 @@ main(int argc, char *argv[])
fprintf(STDERR, " library (%lu):%s",
(unsigned long)png_access_version_number(),
png_get_header_version(NULL));
+
/* Show the version of libpng used in building the application */
fprintf(STDERR, " pngtest (%lu):%s", (unsigned long)PNG_LIBPNG_VER,
PNG_HEADER_VERSION_STRING);
- fprintf(STDERR, " sizeof(png_struct)=%ld, sizeof(png_info)=%ld\n",
- (long)png_sizeof(png_struct), (long)png_sizeof(png_info));
/* Do some consistency checking on the memory allocation settings, I'm
* not sure this matters, but it is nice to know, the first of these
@@ -1422,6 +1560,7 @@ main(int argc, char *argv[])
multiple = 1;
status_dots_requested = 0;
}
+
else if (strcmp(argv[1], "-mv") == 0 ||
strcmp(argv[1], "-vm") == 0 )
{
@@ -1429,12 +1568,14 @@ main(int argc, char *argv[])
verbose = 1;
status_dots_requested = 1;
}
+
else if (strcmp(argv[1], "-v") == 0)
{
verbose = 1;
status_dots_requested = 1;
inname = argv[2];
}
+
else
{
inname = argv[1];
@@ -1465,14 +1606,14 @@ main(int argc, char *argv[])
#endif
for (i=2; i<argc; ++i)
{
-#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
- int k;
-#endif
int kerror;
fprintf(STDERR, "\n Testing %s:", argv[i]);
kerror = test_one_file(argv[i], outname);
if (kerror == 0)
{
+#ifdef PNG_READ_USER_TRANSFORM_SUPPORTED
+ int k;
+#endif
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
fprintf(STDERR, "\n PASS (%lu zero samples)\n",
(unsigned long)zero_samples);
@@ -1488,9 +1629,11 @@ main(int argc, char *argv[])
#ifdef PNG_TIME_RFC1123_SUPPORTED
if (tIME_chunk_present != 0)
fprintf(STDERR, " tIME = %s\n", tIME_string);
+
tIME_chunk_present = 0;
#endif /* PNG_TIME_RFC1123_SUPPORTED */
}
+
else
{
fprintf(STDERR, " FAIL\n");
@@ -1500,17 +1643,19 @@ main(int argc, char *argv[])
if (allocation_now != current_allocation)
fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n",
current_allocation - allocation_now);
+
if (current_allocation != 0)
{
memory_infop pinfo = pinformation;
fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n",
current_allocation);
+
while (pinfo != NULL)
{
fprintf(STDERR, " %lu bytes at %x\n",
(unsigned long)pinfo->size,
- (unsigned int) pinfo->pointer);
+ (unsigned int)pinfo->pointer);
pinfo = pinfo->next;
}
}
@@ -1527,6 +1672,7 @@ main(int argc, char *argv[])
num_allocations);
#endif
}
+
else
{
int i;
@@ -1536,11 +1682,17 @@ main(int argc, char *argv[])
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
int allocation_now = current_allocation;
#endif
- if (i == 1) status_dots_requested = 1;
- else if (verbose == 0)status_dots_requested = 0;
+ if (i == 1)
+ status_dots_requested = 1;
+
+ else if (verbose == 0)
+ status_dots_requested = 0;
+
if (i == 0 || verbose == 1 || ierror != 0)
fprintf(STDERR, "\n Testing %s:", inname);
+
kerror = test_one_file(inname, outname);
+
if (kerror == 0)
{
if (verbose == 1 || i == 2)
@@ -1558,8 +1710,7 @@ main(int argc, char *argv[])
for (k = 0; k<256; k++)
if (filters_used[k])
fprintf(STDERR, " Filter %d was used %lu times\n",
- k,
- (unsigned long)filters_used[k]);
+ k, (unsigned long)filters_used[k]);
#endif
#ifdef PNG_TIME_RFC1123_SUPPORTED
if (tIME_chunk_present != 0)
@@ -1567,10 +1718,12 @@ main(int argc, char *argv[])
#endif /* PNG_TIME_RFC1123_SUPPORTED */
}
}
+
else
{
if (verbose == 0 && i != 2)
fprintf(STDERR, "\n Testing %s:", inname);
+
fprintf(STDERR, " FAIL\n");
ierror += kerror;
}
@@ -1578,12 +1731,14 @@ main(int argc, char *argv[])
if (allocation_now != current_allocation)
fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n",
current_allocation - allocation_now);
+
if (current_allocation != 0)
{
memory_infop pinfo = pinformation;
fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n",
current_allocation);
+
while (pinfo != NULL)
{
fprintf(STDERR, " %lu bytes at %x\n",
@@ -1621,10 +1776,12 @@ main(int argc, char *argv[])
if (ierror == 0)
fprintf(STDERR, " libpng passes test\n");
+
else
fprintf(STDERR, " libpng FAILS test\n");
+
return (int)(ierror != 0);
}
/* Generate a compiler error if there is an old png.h in the search path. */
-typedef version_1_4_0 your_png_h_is_not_version_1_4_0;
+typedef png_libpng_version_1_5_1 Your_png_h_is_not_version_1_5_1;
diff --git a/src/3rdparty/libpng/pngtest.png b/src/3rdparty/libpng/pngtest.png
deleted file mode 100644
index cfdd36f..0000000
--- a/src/3rdparty/libpng/pngtest.png
+++ /dev/null
Binary files differ
diff --git a/src/3rdparty/libpng/pngtrans.c b/src/3rdparty/libpng/pngtrans.c
index 7b217bb..137f555 100644
--- a/src/3rdparty/libpng/pngtrans.c
+++ b/src/3rdparty/libpng/pngtrans.c
@@ -1,8 +1,8 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,11 +11,10 @@
* and license in png.h
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
#include "pngpriv.h"
+#if defined(PNG_READ_SUPPORTED) || defined(PNG_WRITE_SUPPORTED)
+
#if defined(PNG_READ_BGR_SUPPORTED) || defined(PNG_WRITE_BGR_SUPPORTED)
/* Turn on BGR-to-RGB mapping */
void PNGAPI
@@ -25,6 +24,7 @@ png_set_bgr(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_BGR;
}
#endif
@@ -38,6 +38,7 @@ png_set_swap(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
if (png_ptr->bit_depth == 16)
png_ptr->transformations |= PNG_SWAP_BYTES;
}
@@ -52,6 +53,7 @@ png_set_packing(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
if (png_ptr->bit_depth < 8)
{
png_ptr->transformations |= PNG_PACK;
@@ -69,6 +71,7 @@ png_set_packswap(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
if (png_ptr->bit_depth < 8)
png_ptr->transformations |= PNG_PACKSWAP;
}
@@ -76,12 +79,13 @@ png_set_packswap(png_structp png_ptr)
#if defined(PNG_READ_SHIFT_SUPPORTED) || defined(PNG_WRITE_SHIFT_SUPPORTED)
void PNGAPI
-png_set_shift(png_structp png_ptr, png_color_8p true_bits)
+png_set_shift(png_structp png_ptr, png_const_color_8p true_bits)
{
png_debug(1, "in png_set_shift");
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_SHIFT;
png_ptr->shift = *true_bits;
}
@@ -117,10 +121,13 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_FILLER;
png_ptr->filler = (png_uint_16)filler;
+
if (filler_loc == PNG_FILLER_AFTER)
png_ptr->flags |= PNG_FLAG_FILLER_AFTER;
+
else
png_ptr->flags &= ~PNG_FLAG_FILLER_AFTER;
@@ -135,7 +142,7 @@ png_set_filler(png_structp png_ptr, png_uint_32 filler, int filler_loc)
}
/* Also I added this in libpng-1.0.2a (what happens when we expand
- * a less-than-8-bit grayscale to GA? */
+ * a less-than-8-bit grayscale to GA?) */
if (png_ptr->color_type == PNG_COLOR_TYPE_GRAY && png_ptr->bit_depth >= 8)
{
@@ -151,6 +158,7 @@ png_set_add_alpha(png_structp png_ptr, png_uint_32 filler, int filler_loc)
if (png_ptr == NULL)
return;
+
png_set_filler(png_ptr, filler, filler_loc);
png_ptr->transformations |= PNG_ADD_ALPHA;
}
@@ -166,6 +174,7 @@ png_set_swap_alpha(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_SWAP_ALPHA;
}
#endif
@@ -179,6 +188,7 @@ png_set_invert_alpha(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_INVERT_ALPHA;
}
#endif
@@ -191,6 +201,7 @@ png_set_invert_mono(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_INVERT_MONO;
}
@@ -206,8 +217,8 @@ png_do_invert(png_row_infop row_info, png_bytep row)
if (row_info->color_type == PNG_COLOR_TYPE_GRAY)
{
png_bytep rp = row;
- png_uint_32 i;
- png_uint_32 istop = row_info->rowbytes;
+ png_size_t i;
+ png_size_t istop = row_info->rowbytes;
for (i = 0; i < istop; i++)
{
@@ -215,36 +226,41 @@ png_do_invert(png_row_infop row_info, png_bytep row)
rp++;
}
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
row_info->bit_depth == 8)
{
png_bytep rp = row;
- png_uint_32 i;
- png_uint_32 istop = row_info->rowbytes;
+ png_size_t i;
+ png_size_t istop = row_info->rowbytes;
- for (i = 0; i < istop; i+=2)
+ for (i = 0; i < istop; i += 2)
{
*rp = (png_byte)(~(*rp));
- rp+=2;
+ rp += 2;
}
}
+
+#ifdef PNG_16BIT_SUPPORTED
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
row_info->bit_depth == 16)
{
png_bytep rp = row;
- png_uint_32 i;
- png_uint_32 istop = row_info->rowbytes;
+ png_size_t i;
+ png_size_t istop = row_info->rowbytes;
- for (i = 0; i < istop; i+=4)
+ for (i = 0; i < istop; i += 4)
{
*rp = (png_byte)(~(*rp));
- *(rp+1) = (png_byte)(~(*(rp+1)));
- rp+=4;
+ *(rp + 1) = (png_byte)(~(*(rp + 1)));
+ rp += 4;
}
}
+#endif
}
#endif
+#ifdef PNG_16BIT_SUPPORTED
#if defined(PNG_READ_SWAP_SUPPORTED) || defined(PNG_WRITE_SWAP_SUPPORTED)
/* Swaps byte order on 16 bit depth images */
void /* PRIVATE */
@@ -252,8 +268,7 @@ png_do_swap(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_swap");
- if (
- row_info->bit_depth == 16)
+ if (row_info->bit_depth == 16)
{
png_bytep rp = row;
png_uint_32 i;
@@ -268,6 +283,7 @@ png_do_swap(png_row_infop row_info, png_bytep row)
}
}
#endif
+#endif
#if defined(PNG_READ_PACKSWAP_SUPPORTED)||defined(PNG_WRITE_PACKSWAP_SUPPORTED)
static PNG_CONST png_byte onebppswaptable[256] = {
@@ -381,19 +397,22 @@ png_do_packswap(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_packswap");
- if (
- row_info->bit_depth < 8)
+ if (row_info->bit_depth < 8)
{
- png_bytep rp, end, table;
+ png_bytep rp;
+ png_const_bytep end, table;
end = row + row_info->rowbytes;
if (row_info->bit_depth == 1)
- table = (png_bytep)onebppswaptable;
+ table = onebppswaptable;
+
else if (row_info->bit_depth == 2)
- table = (png_bytep)twobppswaptable;
+ table = twobppswaptable;
+
else if (row_info->bit_depth == 4)
- table = (png_bytep)fourbppswaptable;
+ table = fourbppswaptable;
+
else
return;
@@ -412,9 +431,9 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
png_debug(1, "in png_do_strip_filler");
{
- png_bytep sp=row;
- png_bytep dp=row;
- png_uint_32 row_width=row_info->width;
+ png_bytep sp = row;
+ png_bytep dp = row;
+ png_uint_32 row_width = row_info->width;
png_uint_32 i;
if ((row_info->color_type == PNG_COLOR_TYPE_RGB ||
@@ -427,7 +446,7 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
/* This converts from RGBX or RGBA to RGB */
if (flags & PNG_FLAG_FILLER_AFTER)
{
- dp+=3; sp+=4;
+ dp += 3; sp += 4;
for (i = 1; i < row_width; i++)
{
*dp++ = *sp++;
@@ -436,6 +455,7 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
sp++;
}
}
+
/* This converts from XRGB or ARGB to RGB */
else
{
@@ -450,6 +470,7 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
row_info->pixel_depth = 24;
row_info->rowbytes = row_width * 3;
}
+
else /* if (row_info->bit_depth == 16) */
{
if (flags & PNG_FLAG_FILLER_AFTER)
@@ -473,6 +494,7 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
sp += 2;
}
}
+
else
{
/* This converts from XXRRGGBB or AARRGGBB to RRGGBB */
@@ -484,7 +506,7 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
dp += 6;
*/
- sp+=2;
+ sp += 2;
*dp++ = *sp++;
*dp++ = *sp++;
*dp++ = *sp++;
@@ -493,11 +515,13 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
*dp++ = *sp++;
}
}
+
row_info->pixel_depth = 48;
row_info->rowbytes = row_width * 6;
}
row_info->channels = 3;
}
+
else if ((row_info->color_type == PNG_COLOR_TYPE_GRAY ||
(row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA &&
(flags & PNG_FLAG_STRIP_ALPHA))) &&
@@ -505,27 +529,30 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
{
if (row_info->bit_depth == 8)
{
- /* This converts from GX or GA to G */
if (flags & PNG_FLAG_FILLER_AFTER)
{
+ /* This converts from GX or GA to G */
for (i = 0; i < row_width; i++)
{
*dp++ = *sp++;
sp++;
}
}
- /* This converts from XG or AG to G */
+
else
{
+ /* This converts from XG or AG to G */
for (i = 0; i < row_width; i++)
{
sp++;
*dp++ = *sp++;
}
}
+
row_info->pixel_depth = 8;
row_info->rowbytes = row_width;
}
+
else /* if (row_info->bit_depth == 16) */
{
if (flags & PNG_FLAG_FILLER_AFTER)
@@ -539,6 +566,7 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
sp += 2;
}
}
+
else
{
/* This converts from XXGG or AAGG to GG */
@@ -549,13 +577,16 @@ png_do_strip_filler(png_row_infop row_info, png_bytep row, png_uint_32 flags)
*dp++ = *sp++;
}
}
+
row_info->pixel_depth = 16;
row_info->rowbytes = row_width * 2;
}
row_info->channels = 1;
}
+
if (flags & PNG_FLAG_STRIP_ALPHA)
- row_info->color_type &= ~PNG_COLOR_MASK_ALPHA;
+ row_info->color_type = (png_byte)(row_info->color_type &
+ ~PNG_COLOR_MASK_ALPHA);
}
}
#endif
@@ -567,8 +598,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_bgr");
- if (
- (row_info->color_type & PNG_COLOR_MASK_COLOR))
+ if ((row_info->color_type & PNG_COLOR_MASK_COLOR))
{
png_uint_32 row_width = row_info->width;
if (row_info->bit_depth == 8)
@@ -585,6 +615,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
*(rp + 2) = save;
}
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_bytep rp;
@@ -598,6 +629,8 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
}
}
}
+
+#ifdef PNG_16BIT_SUPPORTED
else if (row_info->bit_depth == 16)
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
@@ -615,6 +648,7 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
*(rp + 5) = save;
}
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
png_bytep rp;
@@ -631,12 +665,14 @@ png_do_bgr(png_row_infop row_info, png_bytep row)
}
}
}
+#endif
}
}
#endif /* PNG_READ_BGR_SUPPORTED or PNG_WRITE_BGR_SUPPORTED */
#if defined(PNG_READ_USER_TRANSFORM_SUPPORTED) || \
defined(PNG_WRITE_USER_TRANSFORM_SUPPORTED)
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
void PNGAPI
png_set_user_transform_info(png_structp png_ptr, png_voidp
user_transform_ptr, int user_transform_depth, int user_transform_channels)
@@ -645,15 +681,9 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
if (png_ptr == NULL)
return;
-#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
png_ptr->user_transform_ptr = user_transform_ptr;
png_ptr->user_transform_depth = (png_byte)user_transform_depth;
png_ptr->user_transform_channels = (png_byte)user_transform_channels;
-#else
- if (user_transform_ptr || user_transform_depth || user_transform_channels)
- png_warning(png_ptr,
- "This version of libpng does not support user transform info");
-#endif
}
#endif
@@ -662,15 +692,32 @@ png_set_user_transform_info(png_structp png_ptr, png_voidp
* associated with this pointer before png_write_destroy and png_read_destroy
* are called.
*/
+#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
png_voidp PNGAPI
-png_get_user_transform_ptr(png_structp png_ptr)
+png_get_user_transform_ptr(png_const_structp png_ptr)
{
if (png_ptr == NULL)
return (NULL);
-#ifdef PNG_USER_TRANSFORM_PTR_SUPPORTED
+
return ((png_voidp)png_ptr->user_transform_ptr);
-#else
- return (NULL);
+}
#endif
+
+png_uint_32 PNGAPI
+png_get_current_row_number(png_const_structp png_ptr)
+{
+ if (png_ptr != NULL)
+ return png_ptr->row_number;
+ return PNG_UINT_32_MAX; /* help the app not to fail silently */
+}
+
+png_byte PNGAPI
+png_get_current_pass_number(png_const_structp png_ptr)
+{
+ if (png_ptr != NULL)
+ return png_ptr->pass;
+ return 8; /* invalid */
}
+#endif /* PNG_READ_USER_TRANSFORM_SUPPORTED ||
+ PNG_WRITE_USER_TRANSFORM_SUPPORTED */
#endif /* PNG_READ_SUPPORTED || PNG_WRITE_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngvalid.c b/src/3rdparty/libpng/pngvalid.c
new file mode 100644
index 0000000..faebe4b
--- /dev/null
+++ b/src/3rdparty/libpng/pngvalid.c
@@ -0,0 +1,6658 @@
+
+/* pngvalid.c - validate libpng by constructing then reading png files.
+ *
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 2011 Glenn Randers-Pehrson
+ * Written by John Cunningham Bowler
+ *
+ * This code is released under the libpng license.
+ * For conditions of distribution and use, see the disclaimer
+ * and license in png.h
+ *
+ * NOTES:
+ * This is a C program that is intended to be linked against libpng. It
+ * generates bitmaps internally, stores them as PNG files (using the
+ * sequential write code) then reads them back (using the sequential
+ * read code) and validates that the result has the correct data.
+ *
+ * The program can be modified and extended to test the correctness of
+ * transformations performed by libpng.
+ */
+
+#include "png.h"
+#if PNG_LIBPNG_VER < 10500
+/* This delibarately lacks the PNG_CONST. */
+typedef png_byte *png_const_bytep;
+
+/* This is copied from 1.5.1 png.h: */
+#define PNG_INTERLACE_ADAM7_PASSES 7
+#define PNG_PASS_START_ROW(pass) (((1U&~(pass))<<(3-((pass)>>1)))&7)
+#define PNG_PASS_START_COL(pass) (((1U& (pass))<<(3-(((pass)+1)>>1)))&7)
+#define PNG_PASS_ROW_SHIFT(pass) ((pass)>2?(8-(pass))>>1:3)
+#define PNG_PASS_COL_SHIFT(pass) ((pass)>1?(7-(pass))>>1:3)
+#define PNG_PASS_ROWS(height, pass) (((height)+(((1<<PNG_PASS_ROW_SHIFT(pass))\
+ -1)-PNG_PASS_START_ROW(pass)))>>PNG_PASS_ROW_SHIFT(pass))
+#define PNG_PASS_COLS(width, pass) (((width)+(((1<<PNG_PASS_COL_SHIFT(pass))\
+ -1)-PNG_PASS_START_COL(pass)))>>PNG_PASS_COL_SHIFT(pass))
+#define PNG_ROW_FROM_PASS_ROW(yIn, pass) \
+ (((yIn)<<PNG_PASS_ROW_SHIFT(pass))+PNG_PASS_START_ROW(pass))
+#define PNG_COL_FROM_PASS_COL(xIn, pass) \
+ (((xIn)<<PNG_PASS_COL_SHIFT(pass))+PNG_PASS_START_COL(pass))
+#define PNG_PASS_MASK(pass,off) ( \
+ ((0x110145AFU>>(((7-(off))-(pass))<<2)) & 0xFU) | \
+ ((0x01145AF0U>>(((7-(off))-(pass))<<2)) & 0xF0U))
+#define PNG_ROW_IN_INTERLACE_PASS(y, pass) \
+ ((PNG_PASS_MASK(pass,0) >> ((y)&7)) & 1)
+#define PNG_COL_IN_INTERLACE_PASS(x, pass) \
+ ((PNG_PASS_MASK(pass,1) >> ((x)&7)) & 1)
+
+/* These are needed too for the defualt build: */
+#define PNG_WRITE_16BIT_SUPPORTED
+#define PNG_READ_16BIT_SUPPORTED
+#endif
+
+#include "zlib.h" /* For crc32 */
+
+#include <float.h> /* For floating point constants */
+#include <stdlib.h> /* For malloc */
+#include <string.h> /* For memcpy, memset */
+#include <math.h> /* For floor */
+
+/* Unused formal parameter errors are removed using the following macro which is
+ * expected to have no bad effects on performance.
+ */
+#ifndef UNUSED
+# if defined(__GNUC__) || defined(_MSC_VER)
+# define UNUSED(param) (void)param;
+# else
+# define UNUSED(param)
+# endif
+#endif
+
+/***************************** EXCEPTION HANDLING *****************************/
+#include "contrib/visupng/cexcept.h"
+struct png_store;
+define_exception_type(struct png_store*);
+
+/* The following are macros to reduce typing everywhere where the well known
+ * name 'the_exception_context' must be defined.
+ */
+#define anon_context(ps) struct exception_context *the_exception_context = \
+ &(ps)->exception_context
+#define context(ps,fault) anon_context(ps); png_store *fault
+
+/******************************* UTILITIES ************************************/
+/* Error handling is particularly problematic in production code - error
+ * handlers often themselves have bugs which lead to programs that detect
+ * minor errors crashing. The following functions deal with one very
+ * common class of errors in error handlers - attempting to format error or
+ * warning messages into buffers that are too small.
+ */
+static size_t safecat(char *buffer, size_t bufsize, size_t pos,
+ PNG_CONST char *cat)
+{
+ while (pos < bufsize && cat != NULL && *cat != 0)
+ buffer[pos++] = *cat++;
+
+ if (pos >= bufsize)
+ pos = bufsize-1;
+
+ buffer[pos] = 0;
+ return pos;
+}
+
+static size_t safecatn(char *buffer, size_t bufsize, size_t pos, int n)
+{
+ char number[64];
+ sprintf(number, "%d", n);
+ return safecat(buffer, bufsize, pos, number);
+}
+
+static size_t safecatd(char *buffer, size_t bufsize, size_t pos, double d,
+ int precision)
+{
+ char number[64];
+ sprintf(number, "%.*f", precision, d);
+ return safecat(buffer, bufsize, pos, number);
+}
+
+static PNG_CONST char invalid[] = "invalid";
+static PNG_CONST char sep[] = ": ";
+
+/* NOTE: this is indexed by ln2(bit_depth)! */
+static PNG_CONST char *bit_depths[8] =
+{
+ "1", "2", "4", "8", "16", invalid, invalid, invalid
+};
+
+static PNG_CONST char *colour_types[8] =
+{
+ "greyscale", invalid, "truecolour", "indexed-colour",
+ "greyscale with alpha", invalid, "truecolour with alpha", invalid
+};
+
+/* To get log-bit-depth from bit depth, returns 0 to 7 (7 on error). */
+static unsigned int
+log2depth(png_byte bit_depth)
+{
+ switch (bit_depth)
+ {
+ case 1:
+ return 0;
+
+ case 2:
+ return 1;
+
+ case 4:
+ return 2;
+
+ case 8:
+ return 3;
+
+ case 16:
+ return 4;
+
+ default:
+ return 7;
+ }
+}
+
+/* A numeric ID based on PNG file characteristics. The 'do_interlace' field
+ * simply records whether pngvalid did the interlace itself or whether it
+ * was done by libpng. Width and height must be less than 256.
+ */
+#define FILEID(col, depth, interlace, width, height, do_interlace) \
+ ((png_uint_32)((col) + ((depth)<<3) + ((interlace)<<8) + \
+ (((do_interlace)!=0)<<15) + ((width)<<16) + ((height)<<24)))
+
+#define COL_FROM_ID(id) ((png_byte)((id)& 0x7U))
+#define DEPTH_FROM_ID(id) ((png_byte)(((id) >> 3) & 0x1fU))
+#define INTERLACE_FROM_ID(id) ((int)(((id) >> 8) & 0x3))
+#define DO_INTERLACE_FROM_ID(id) ((int)(((id)>>15) & 1))
+#define WIDTH_FROM_ID(id) (((id)>>16) & 0xff)
+#define HEIGHT_FROM_ID(id) (((id)>>24) & 0xff)
+
+/* Utility to construct a standard name for a standard image. */
+static size_t
+standard_name(char *buffer, size_t bufsize, size_t pos, png_byte colour_type,
+ int log_bit_depth, int interlace_type, png_uint_32 w, png_uint_32 h,
+ int do_interlace)
+{
+ pos = safecat(buffer, bufsize, pos, colour_types[colour_type]);
+ pos = safecat(buffer, bufsize, pos, " ");
+ pos = safecat(buffer, bufsize, pos, bit_depths[log_bit_depth]);
+ pos = safecat(buffer, bufsize, pos, " bit ");
+
+ if (interlace_type != PNG_INTERLACE_NONE)
+ pos = safecat(buffer, bufsize, pos, "interlaced");
+ if (do_interlace)
+ pos = safecat(buffer, bufsize, pos, "(pngvalid)");
+ else
+ pos = safecat(buffer, bufsize, pos, "(libpng)");
+ if (w > 0 || h > 0)
+ {
+ pos = safecat(buffer, bufsize, pos, " ");
+ pos = safecatn(buffer, bufsize, pos, w);
+ pos = safecat(buffer, bufsize, pos, "x");
+ pos = safecatn(buffer, bufsize, pos, h);
+ }
+
+ return pos;
+}
+
+static size_t
+standard_name_from_id(char *buffer, size_t bufsize, size_t pos, png_uint_32 id)
+{
+ return standard_name(buffer, bufsize, pos, COL_FROM_ID(id),
+ log2depth(DEPTH_FROM_ID(id)), INTERLACE_FROM_ID(id),
+ WIDTH_FROM_ID(id), HEIGHT_FROM_ID(id), DO_INTERLACE_FROM_ID(id));
+}
+
+/* Convenience API and defines to list valid formats. Note that 16 bit read and
+ * write support is required to do 16 bit read tests (we must be able to make a
+ * 16 bit image to test!)
+ */
+#ifdef PNG_WRITE_16BIT_SUPPORTED
+# define WRITE_BDHI 4
+# ifdef PNG_READ_16BIT_SUPPORTED
+# define READ_BDHI 4
+# define DO_16BIT
+# endif
+#else
+# define WRITE_BDHI 3
+#endif
+#ifndef DO_16BIT
+# define READ_BDHI 3
+#endif
+
+static int
+next_format(png_bytep colour_type, png_bytep bit_depth)
+{
+ if (*bit_depth == 0)
+ {
+ *colour_type = 0, *bit_depth = 1;
+ return 1;
+ }
+
+ *bit_depth = (png_byte)(*bit_depth << 1);
+
+ /* Palette images are restricted to 8 bit depth */
+ if (*bit_depth <= 8
+# ifdef DO_16BIT
+ || (*colour_type != 3 && *bit_depth <= 16)
+# endif
+ )
+ return 1;
+
+ /* Move to the next color type, or return 0 at the end. */
+ switch (*colour_type)
+ {
+ case 0:
+ *colour_type = 2;
+ *bit_depth = 8;
+ return 1;
+
+ case 2:
+ *colour_type = 3;
+ *bit_depth = 1;
+ return 1;
+
+ case 3:
+ *colour_type = 4;
+ *bit_depth = 8;
+ return 1;
+
+ case 4:
+ *colour_type = 6;
+ *bit_depth = 8;
+ return 1;
+
+ default:
+ return 0;
+ }
+}
+
+static unsigned int
+sample(png_const_bytep row, png_byte colour_type, png_byte bit_depth,
+ png_uint_32 x, unsigned int sample_index)
+{
+ png_uint_32 bit_index, result;
+
+ /* Find a sample index for the desired sample: */
+ x *= bit_depth;
+ bit_index = x;
+
+ if ((colour_type & 1) == 0) /* !palette */
+ {
+ if (colour_type & 2)
+ bit_index *= 3;
+
+ if (colour_type & 4)
+ bit_index += x; /* Alpha channel */
+
+ if (colour_type & (2+4))
+ bit_index += sample_index * bit_depth; /* Multiple channels: select one */
+ }
+
+ /* Return the sample from the row as an integer. */
+ row += bit_index >> 3;
+ result = *row;
+
+ if (bit_depth == 8)
+ return result;
+
+ else if (bit_depth > 8)
+ return (result << 8) + *++row;
+
+ /* Less than 8 bits per sample. */
+ bit_index &= 7;
+ return (result >> (8-bit_index-bit_depth)) & ((1U<<bit_depth)-1);
+}
+
+/* Copy a single pixel, of a given size, from one buffer to another -
+ * while this is basically bit addressed there is an implicit assumption
+ * that pixels 8 or more bits in size are byte aligned and that pixels
+ * do not otherwise cross byte boundaries. (This is, so far as I know,
+ * universally true in bitmap computer graphics. [JCB 20101212])
+ *
+ * NOTE: The to and from buffers may be the same.
+ */
+static void
+pixel_copy(png_bytep toBuffer, png_uint_32 toIndex,
+ png_const_bytep fromBuffer, png_uint_32 fromIndex, unsigned int pixelSize)
+{
+ /* Assume we can multiply by 'size' without overflow because we are
+ * just working in a single buffer.
+ */
+ toIndex *= pixelSize;
+ fromIndex *= pixelSize;
+ if (pixelSize < 8) /* Sub-byte */
+ {
+ /* Mask to select the location of the copied pixel: */
+ unsigned int destMask = ((1U<<pixelSize)-1) << (8-pixelSize-(toIndex&7));
+ /* The following read the entire pixels and clears the extra: */
+ unsigned int destByte = toBuffer[toIndex >> 3] & ~destMask;
+ unsigned int sourceByte = fromBuffer[fromIndex >> 3];
+
+ /* Don't rely on << or >> supporting '0' here, just in case: */
+ fromIndex &= 7;
+ if (fromIndex > 0) sourceByte <<= fromIndex;
+ if ((toIndex & 7) > 0) sourceByte >>= toIndex & 7;
+
+ toBuffer[toIndex >> 3] = (png_byte)(destByte | (sourceByte & destMask));
+ }
+ else /* One or more bytes */
+ memmove(toBuffer+(toIndex>>3), fromBuffer+(fromIndex>>3), pixelSize>>3);
+}
+
+/* Compare pixels - they are assumed to start at the first byte in the
+ * given buffers.
+ */
+static int
+pixel_cmp(png_const_bytep pa, png_const_bytep pb, png_uint_32 bit_width)
+{
+ if (memcmp(pa, pb, bit_width>>3) == 0)
+ {
+ png_uint_32 p;
+
+ if ((bit_width & 7) == 0) return 0;
+
+ /* Ok, any differences? */
+ p = pa[bit_width >> 3];
+ p ^= pb[bit_width >> 3];
+
+ if (p == 0) return 0;
+
+ /* There are, but they may not be significant, remove the bits
+ * after the end (the low order bits in PNG.)
+ */
+ bit_width &= 7;
+ p >>= 8-bit_width;
+
+ if (p == 0) return 0;
+ }
+
+ return 1; /* Different */
+}
+
+/*************************** BASIC PNG FILE WRITING ***************************/
+/* A png_store takes data from the sequential writer or provides data
+ * to the sequential reader. It can also store the result of a PNG
+ * write for later retrieval.
+ */
+#define STORE_BUFFER_SIZE 500 /* arbitrary */
+typedef struct png_store_buffer
+{
+ struct png_store_buffer* prev; /* NOTE: stored in reverse order */
+ png_byte buffer[STORE_BUFFER_SIZE];
+} png_store_buffer;
+
+#define FILE_NAME_SIZE 64
+
+typedef struct png_store_file
+{
+ struct png_store_file* next; /* as many as you like... */
+ char name[FILE_NAME_SIZE];
+ png_uint_32 id; /* must be correct (see FILEID) */
+ png_size_t datacount; /* In this (the last) buffer */
+ png_store_buffer data; /* Last buffer in file */
+} png_store_file;
+
+/* The following is a pool of memory allocated by a single libpng read or write
+ * operation.
+ */
+typedef struct store_pool
+{
+ struct png_store *store; /* Back pointer */
+ struct store_memory *list; /* List of allocated memory */
+ png_byte mark[4]; /* Before and after data */
+
+ /* Statistics for this run. */
+ png_alloc_size_t max; /* Maximum single allocation */
+ png_alloc_size_t current; /* Current allocation */
+ png_alloc_size_t limit; /* Highest current allocation */
+ png_alloc_size_t total; /* Total allocation */
+
+ /* Overall statistics (retained across successive runs). */
+ png_alloc_size_t max_max;
+ png_alloc_size_t max_limit;
+ png_alloc_size_t max_total;
+} store_pool;
+
+typedef struct png_store
+{
+ /* For cexcept.h exception handling - simply store one of these;
+ * the context is a self pointer but it may point to a different
+ * png_store (in fact it never does in this program.)
+ */
+ struct exception_context
+ exception_context;
+
+ unsigned int verbose :1;
+ unsigned int treat_warnings_as_errors :1;
+ unsigned int expect_error :1;
+ unsigned int expect_warning :1;
+ unsigned int saw_warning :1;
+ unsigned int speed :1;
+ unsigned int progressive :1; /* use progressive read */
+ unsigned int validated :1; /* used as a temporary flag */
+ int nerrors;
+ int nwarnings;
+ char test[128]; /* Name of test */
+ char error[256];
+
+ /* Read fields */
+ png_structp pread; /* Used to read a saved file */
+ png_infop piread;
+ png_store_file* current; /* Set when reading */
+ png_store_buffer* next; /* Set when reading */
+ png_size_t readpos; /* Position in *next */
+ png_byte* image; /* Buffer for reading interlaced images */
+ size_t cb_image; /* Size of this buffer */
+ store_pool read_memory_pool;
+
+ /* Write fields */
+ png_store_file* saved;
+ png_structp pwrite; /* Used when writing a new file */
+ png_infop piwrite;
+ png_size_t writepos; /* Position in .new */
+ char wname[FILE_NAME_SIZE];
+ png_store_buffer new; /* The end of the new PNG file being written. */
+ store_pool write_memory_pool;
+} png_store;
+
+/* Initialization and cleanup */
+static void
+store_pool_mark(png_byte *mark)
+{
+ /* Generate a new mark. This uses a boring repeatable algorithm and it is
+ * implemented here so that it gives the same set of numbers on every
+ * architecture. It's a linear congruential generator (Knuth or Sedgewick
+ * "Algorithms") but it comes from the 'feedback taps' table in Horowitz and
+ * Hill, "The Art of Electronics".
+ */
+ static png_uint_32 u0 = 0x12345678, u1 = 1;
+
+ /* There are thirty three bits, the next bit in the sequence is bit-33 XOR
+ * bit-20. The top 1 bit is in u1, the bottom 32 are in u0.
+ */
+ int i;
+ for (i=0; i<4; ++i)
+ {
+ /* First generate 8 new bits then shift them in at the end. */
+ png_uint_32 u = ((u0 >> (20-8)) ^ ((u1 << 7) | (u0 >> (32-7)))) & 0xff;
+ u1 <<= 8;
+ u1 |= u0 >> 24;
+ u0 <<= 8;
+ u0 |= u;
+ *mark++ = (png_byte)u;
+ }
+}
+
+/* Use this for random 32 bit values, this function makes sure the result is
+ * non-zero.
+ */
+static png_uint_32
+random_32(void)
+{
+
+ for(;;)
+ {
+ png_byte mark[4];
+ png_uint_32 result;
+
+ store_pool_mark(mark);
+ result = png_get_uint_32(mark);
+
+ if (result != 0)
+ return result;
+ }
+}
+
+static void
+store_pool_init(png_store *ps, store_pool *pool)
+{
+ memset(pool, 0, sizeof *pool);
+
+ pool->store = ps;
+ pool->list = NULL;
+ pool->max = pool->current = pool->limit = pool->total = 0;
+ pool->max_max = pool->max_limit = pool->max_total = 0;
+ store_pool_mark(pool->mark);
+}
+
+static void
+store_init(png_store* ps)
+{
+ memset(ps, 0, sizeof *ps);
+ init_exception_context(&ps->exception_context);
+ store_pool_init(ps, &ps->read_memory_pool);
+ store_pool_init(ps, &ps->write_memory_pool);
+ ps->verbose = 0;
+ ps->treat_warnings_as_errors = 0;
+ ps->expect_error = 0;
+ ps->expect_warning = 0;
+ ps->saw_warning = 0;
+ ps->speed = 0;
+ ps->progressive = 0;
+ ps->validated = 0;
+ ps->nerrors = ps->nwarnings = 0;
+ ps->pread = NULL;
+ ps->piread = NULL;
+ ps->saved = ps->current = NULL;
+ ps->next = NULL;
+ ps->readpos = 0;
+ ps->image = NULL;
+ ps->cb_image = 0;
+ ps->pwrite = NULL;
+ ps->piwrite = NULL;
+ ps->writepos = 0;
+ ps->new.prev = NULL;
+}
+
+/* This somewhat odd function is used when reading an image to ensure that the
+ * buffer is big enough - this is why a png_structp is available.
+ */
+static void
+store_ensure_image(png_store *ps, png_structp pp, size_t cb)
+{
+ if (ps->cb_image < cb)
+ {
+ if (ps->image != NULL)
+ {
+ free(ps->image-1);
+ ps->cb_image = 0;
+ }
+
+ /* The buffer is deliberately mis-aligned. */
+ ps->image = malloc(cb+1);
+ if (ps->image == NULL)
+ png_error(pp, "OOM allocating image buffer");
+
+ ++(ps->image);
+ ps->cb_image = cb;
+ }
+
+ /* And, for error checking, the whole buffer is set to '1' - this
+ * matches what happens with the 'size' test images on write and also
+ * matches the unused bits in the test rows.
+ */
+ memset(ps->image, 0xff, cb);
+}
+
+static void
+store_freebuffer(png_store_buffer* psb)
+{
+ if (psb->prev)
+ {
+ store_freebuffer(psb->prev);
+ free(psb->prev);
+ psb->prev = NULL;
+ }
+}
+
+static void
+store_freenew(png_store *ps)
+{
+ store_freebuffer(&ps->new);
+ ps->writepos = 0;
+}
+
+static void
+store_storenew(png_store *ps)
+{
+ png_store_buffer *pb;
+
+ if (ps->writepos != STORE_BUFFER_SIZE)
+ png_error(ps->pwrite, "invalid store call");
+
+ pb = malloc(sizeof *pb);
+
+ if (pb == NULL)
+ png_error(ps->pwrite, "store new: OOM");
+
+ *pb = ps->new;
+ ps->new.prev = pb;
+ ps->writepos = 0;
+}
+
+static void
+store_freefile(png_store_file **ppf)
+{
+ if (*ppf != NULL)
+ {
+ store_freefile(&(*ppf)->next);
+
+ store_freebuffer(&(*ppf)->data);
+ (*ppf)->datacount = 0;
+ free(*ppf);
+ *ppf = NULL;
+ }
+}
+
+/* Main interface to file storeage, after writing a new PNG file (see the API
+ * below) call store_storefile to store the result with the given name and id.
+ */
+static void
+store_storefile(png_store *ps, png_uint_32 id)
+{
+ png_store_file *pf = malloc(sizeof *pf);
+ if (pf == NULL)
+ png_error(ps->pwrite, "storefile: OOM");
+ safecat(pf->name, sizeof pf->name, 0, ps->wname);
+ pf->id = id;
+ pf->data = ps->new;
+ pf->datacount = ps->writepos;
+ ps->new.prev = NULL;
+ ps->writepos = 0;
+
+ /* And save it. */
+ pf->next = ps->saved;
+ ps->saved = pf;
+}
+
+/* Generate an error message (in the given buffer) */
+static size_t
+store_message(png_store *ps, png_structp pp, char *buffer, size_t bufsize,
+ size_t pos, PNG_CONST char *msg)
+{
+ if (pp != NULL && pp == ps->pread)
+ {
+ /* Reading a file */
+ pos = safecat(buffer, bufsize, pos, "read: ");
+
+ if (ps->current != NULL)
+ {
+ pos = safecat(buffer, bufsize, pos, ps->current->name);
+ pos = safecat(buffer, bufsize, pos, sep);
+ }
+ }
+
+ else if (pp != NULL && pp == ps->pwrite)
+ {
+ /* Writing a file */
+ pos = safecat(buffer, bufsize, pos, "write: ");
+ pos = safecat(buffer, bufsize, pos, ps->wname);
+ pos = safecat(buffer, bufsize, pos, sep);
+ }
+
+ else
+ {
+ /* Neither reading nor writing (or a memory error in struct delete) */
+ pos = safecat(buffer, bufsize, pos, "pngvalid: ");
+ }
+
+ if (ps->test[0] != 0)
+ {
+ pos = safecat(buffer, bufsize, pos, ps->test);
+ pos = safecat(buffer, bufsize, pos, sep);
+ }
+ pos = safecat(buffer, bufsize, pos, msg);
+ return pos;
+}
+
+/* Log an error or warning - the relevant count is always incremented. */
+static void
+store_log(png_store* ps, png_structp pp, png_const_charp message, int is_error)
+{
+ /* The warning is copied to the error buffer if there are no errors and it is
+ * the first warning. The error is copied to the error buffer if it is the
+ * first error (overwriting any prior warnings).
+ */
+ if (is_error ? (ps->nerrors)++ == 0 :
+ (ps->nwarnings)++ == 0 && ps->nerrors == 0)
+ store_message(ps, pp, ps->error, sizeof ps->error, 0, message);
+
+ if (ps->verbose)
+ {
+ char buffer[256];
+ size_t pos;
+
+ if (is_error)
+ pos = safecat(buffer, sizeof buffer, 0, "error: ");
+ else
+ pos = safecat(buffer, sizeof buffer, 0, "warning: ");
+
+ store_message(ps, pp, buffer, sizeof buffer, pos, message);
+ fputs(buffer, stderr);
+ fputc('\n', stderr);
+ }
+}
+
+/* Functions to use as PNG callbacks. */
+static void
+store_error(png_structp pp, png_const_charp message) /* PNG_NORETURN */
+{
+ png_store *ps = png_get_error_ptr(pp);
+
+ if (!ps->expect_error)
+ store_log(ps, pp, message, 1 /* error */);
+
+ /* And finally throw an exception. */
+ {
+ struct exception_context *the_exception_context = &ps->exception_context;
+ Throw ps;
+ }
+}
+
+static void
+store_warning(png_structp pp, png_const_charp message)
+{
+ png_store *ps = png_get_error_ptr(pp);
+
+ if (!ps->expect_warning)
+ store_log(ps, pp, message, 0 /* warning */);
+ else
+ ps->saw_warning = 1;
+}
+
+static void
+store_write(png_structp pp, png_bytep pb, png_size_t st)
+{
+ png_store *ps = png_get_io_ptr(pp);
+
+ if (ps->pwrite != pp)
+ png_error(pp, "store state damaged");
+
+ while (st > 0)
+ {
+ size_t cb;
+
+ if (ps->writepos >= STORE_BUFFER_SIZE)
+ store_storenew(ps);
+
+ cb = st;
+
+ if (cb > STORE_BUFFER_SIZE - ps->writepos)
+ cb = STORE_BUFFER_SIZE - ps->writepos;
+
+ memcpy(ps->new.buffer + ps->writepos, pb, cb);
+ pb += cb;
+ st -= cb;
+ ps->writepos += cb;
+ }
+}
+
+static void
+store_flush(png_structp pp)
+{
+ UNUSED(pp) /*DOES NOTHING*/
+}
+
+static size_t
+store_read_buffer_size(png_store *ps)
+{
+ /* Return the bytes available for read in the current buffer. */
+ if (ps->next != &ps->current->data)
+ return STORE_BUFFER_SIZE;
+
+ return ps->current->datacount;
+}
+
+/* Return total bytes available for read. */
+static size_t
+store_read_buffer_avail(png_store *ps)
+{
+ if (ps->current != NULL && ps->next != NULL)
+ {
+ png_store_buffer *next = &ps->current->data;
+ size_t cbAvail = ps->current->datacount;
+
+ while (next != ps->next && next != NULL)
+ {
+ next = next->prev;
+ cbAvail += STORE_BUFFER_SIZE;
+ }
+
+ if (next != ps->next)
+ png_error(ps->pread, "buffer read error");
+
+ if (cbAvail > ps->readpos)
+ return cbAvail - ps->readpos;
+ }
+
+ return 0;
+}
+
+static int
+store_read_buffer_next(png_store *ps)
+{
+ png_store_buffer *pbOld = ps->next;
+ png_store_buffer *pbNew = &ps->current->data;
+ if (pbOld != pbNew)
+ {
+ while (pbNew != NULL && pbNew->prev != pbOld)
+ pbNew = pbNew->prev;
+
+ if (pbNew != NULL)
+ {
+ ps->next = pbNew;
+ ps->readpos = 0;
+ return 1;
+ }
+
+ png_error(ps->pread, "buffer lost");
+ }
+
+ return 0; /* EOF or error */
+}
+
+/* Need separate implementation and callback to allow use of the same code
+ * during progressive read, where the io_ptr is set internally by libpng.
+ */
+static void
+store_read_imp(png_store *ps, png_bytep pb, png_size_t st)
+{
+ if (ps->current == NULL || ps->next == NULL)
+ png_error(ps->pread, "store state damaged");
+
+ while (st > 0)
+ {
+ size_t cbAvail = store_read_buffer_size(ps) - ps->readpos;
+
+ if (cbAvail > 0)
+ {
+ if (cbAvail > st) cbAvail = st;
+ memcpy(pb, ps->next->buffer + ps->readpos, cbAvail);
+ st -= cbAvail;
+ pb += cbAvail;
+ ps->readpos += cbAvail;
+ }
+
+ else if (!store_read_buffer_next(ps))
+ png_error(ps->pread, "read beyond end of file");
+ }
+}
+
+static void
+store_read(png_structp pp, png_bytep pb, png_size_t st)
+{
+ png_store *ps = png_get_io_ptr(pp);
+
+ if (ps == NULL || ps->pread != pp)
+ png_error(pp, "bad store read call");
+
+ store_read_imp(ps, pb, st);
+}
+
+static void
+store_progressive_read(png_store *ps, png_structp pp, png_infop pi)
+{
+ /* Notice that a call to store_read will cause this function to fail because
+ * readpos will be set.
+ */
+ if (ps->pread != pp || ps->current == NULL || ps->next == NULL)
+ png_error(pp, "store state damaged (progressive)");
+
+ do
+ {
+ if (ps->readpos != 0)
+ png_error(pp, "store_read called during progressive read");
+
+ png_process_data(pp, pi, ps->next->buffer, store_read_buffer_size(ps));
+ }
+ while (store_read_buffer_next(ps));
+}
+
+/***************************** MEMORY MANAGEMENT*** ***************************/
+/* A store_memory is simply the header for an allocated block of memory. The
+ * pointer returned to libpng is just after the end of the header block, the
+ * allocated memory is followed by a second copy of the 'mark'.
+ */
+typedef struct store_memory
+{
+ store_pool *pool; /* Originating pool */
+ struct store_memory *next; /* Singly linked list */
+ png_alloc_size_t size; /* Size of memory allocated */
+ png_byte mark[4]; /* ID marker */
+} store_memory;
+
+/* Handle a fatal error in memory allocation. This calls png_error if the
+ * libpng struct is non-NULL, else it outputs a message and returns. This means
+ * that a memory problem while libpng is running will abort (png_error) the
+ * handling of particular file while one in cleanup (after the destroy of the
+ * struct has returned) will simply keep going and free (or attempt to free)
+ * all the memory.
+ */
+static void
+store_pool_error(png_store *ps, png_structp pp, PNG_CONST char *msg)
+{
+ if (pp != NULL)
+ png_error(pp, msg);
+
+ /* Else we have to do it ourselves. png_error eventually calls store_log,
+ * above. store_log accepts a NULL png_structp - it just changes what gets
+ * output by store_message.
+ */
+ store_log(ps, pp, msg, 1 /* error */);
+}
+
+static void
+store_memory_free(png_structp pp, store_pool *pool, store_memory *memory)
+{
+ /* Note that pp may be NULL (see store_pool_delete below), the caller has
+ * found 'memory' in pool->list *and* unlinked this entry, so this is a valid
+ * pointer (for sure), but the contents may have been trashed.
+ */
+ if (memory->pool != pool)
+ store_pool_error(pool->store, pp, "memory corrupted (pool)");
+
+ else if (memcmp(memory->mark, pool->mark, sizeof memory->mark) != 0)
+ store_pool_error(pool->store, pp, "memory corrupted (start)");
+
+ /* It should be safe to read the size field now. */
+ else
+ {
+ png_alloc_size_t cb = memory->size;
+
+ if (cb > pool->max)
+ store_pool_error(pool->store, pp, "memory corrupted (size)");
+
+ else if (memcmp((png_bytep)(memory+1)+cb, pool->mark, sizeof pool->mark)
+ != 0)
+ store_pool_error(pool->store, pp, "memory corrupted (end)");
+
+ /* Finally give the library a chance to find problems too: */
+ else
+ {
+ pool->current -= cb;
+ free(memory);
+ }
+ }
+}
+
+static void
+store_pool_delete(png_store *ps, store_pool *pool)
+{
+ if (pool->list != NULL)
+ {
+ fprintf(stderr, "%s: %s %s: memory lost (list follows):\n", ps->test,
+ pool == &ps->read_memory_pool ? "read" : "write",
+ pool == &ps->read_memory_pool ? (ps->current != NULL ?
+ ps->current->name : "unknown file") : ps->wname);
+ ++ps->nerrors;
+
+ do
+ {
+ store_memory *next = pool->list;
+ pool->list = next->next;
+ next->next = NULL;
+
+ fprintf(stderr, "\t%lu bytes @ %p\n",
+ (unsigned long)next->size, next+1);
+ /* The NULL means this will always return, even if the memory is
+ * corrupted.
+ */
+ store_memory_free(NULL, pool, next);
+ }
+ while (pool->list != NULL);
+ }
+
+ /* And reset the other fields too for the next time. */
+ if (pool->max > pool->max_max) pool->max_max = pool->max;
+ pool->max = 0;
+ if (pool->current != 0) /* unexpected internal error */
+ fprintf(stderr, "%s: %s %s: memory counter mismatch (internal error)\n",
+ ps->test, pool == &ps->read_memory_pool ? "read" : "write",
+ pool == &ps->read_memory_pool ? (ps->current != NULL ?
+ ps->current->name : "unknown file") : ps->wname);
+ pool->current = 0;
+
+ if (pool->limit > pool->max_limit)
+ pool->max_limit = pool->limit;
+
+ pool->limit = 0;
+
+ if (pool->total > pool->max_total)
+ pool->max_total = pool->total;
+
+ pool->total = 0;
+
+ /* Get a new mark too. */
+ store_pool_mark(pool->mark);
+}
+
+/* The memory callbacks: */
+static png_voidp
+store_malloc(png_structp pp, png_alloc_size_t cb)
+{
+ store_pool *pool = png_get_mem_ptr(pp);
+ store_memory *new = malloc(cb + (sizeof *new) + (sizeof pool->mark));
+
+ if (new != NULL)
+ {
+ if (cb > pool->max)
+ pool->max = cb;
+
+ pool->current += cb;
+
+ if (pool->current > pool->limit)
+ pool->limit = pool->current;
+
+ pool->total += cb;
+
+ new->size = cb;
+ memcpy(new->mark, pool->mark, sizeof new->mark);
+ memcpy((png_byte*)(new+1) + cb, pool->mark, sizeof pool->mark);
+ new->pool = pool;
+ new->next = pool->list;
+ pool->list = new;
+ ++new;
+ }
+
+ else
+ store_pool_error(pool->store, pp, "out of memory");
+
+ return new;
+}
+
+static void
+store_free(png_structp pp, png_voidp memory)
+{
+ store_pool *pool = png_get_mem_ptr(pp);
+ store_memory *this = memory, **test;
+
+ /* First check that this 'memory' really is valid memory - it must be in the
+ * pool list. If it is, use the shared memory_free function to free it.
+ */
+ --this;
+ for (test = &pool->list; *test != this; test = &(*test)->next)
+ {
+ if (*test == NULL)
+ {
+ store_pool_error(pool->store, pp, "bad pointer to free");
+ return;
+ }
+ }
+
+ /* Unlink this entry, *test == this. */
+ *test = this->next;
+ this->next = NULL;
+ store_memory_free(pp, pool, this);
+}
+
+/* Setup functions. */
+/* Cleanup when aborting a write or after storing the new file. */
+static void
+store_write_reset(png_store *ps)
+{
+ if (ps->pwrite != NULL)
+ {
+ anon_context(ps);
+
+ Try
+ png_destroy_write_struct(&ps->pwrite, &ps->piwrite);
+
+ Catch_anonymous
+ {
+ /* memory corruption: continue. */
+ }
+
+ ps->pwrite = NULL;
+ ps->piwrite = NULL;
+ }
+
+ /* And make sure that all the memory has been freed - this will output
+ * spurious errors in the case of memory corruption above, but this is safe.
+ */
+ store_pool_delete(ps, &ps->write_memory_pool);
+
+ store_freenew(ps);
+}
+
+/* The following is the main write function, it returns a png_struct and,
+ * optionally, a png_info suitable for writiing a new PNG file. Use
+ * store_storefile above to record this file after it has been written. The
+ * returned libpng structures as destroyed by store_write_reset above.
+ */
+static png_structp
+set_store_for_write(png_store *ps, png_infopp ppi,
+ PNG_CONST char * volatile name)
+{
+ anon_context(ps);
+
+ Try
+ {
+ if (ps->pwrite != NULL)
+ png_error(ps->pwrite, "write store already in use");
+
+ store_write_reset(ps);
+ safecat(ps->wname, sizeof ps->wname, 0, name);
+
+ /* Don't do the slow memory checks if doing a speed test. */
+ if (ps->speed)
+ ps->pwrite = png_create_write_struct(PNG_LIBPNG_VER_STRING,
+ ps, store_error, store_warning);
+
+ else
+ ps->pwrite = png_create_write_struct_2(PNG_LIBPNG_VER_STRING,
+ ps, store_error, store_warning, &ps->write_memory_pool,
+ store_malloc, store_free);
+
+ png_set_write_fn(ps->pwrite, ps, store_write, store_flush);
+
+ if (ppi != NULL)
+ *ppi = ps->piwrite = png_create_info_struct(ps->pwrite);
+ }
+
+ Catch_anonymous
+ return NULL;
+
+ return ps->pwrite;
+}
+
+/* Cleanup when finished reading (either due to error or in the success case).
+ */
+static void
+store_read_reset(png_store *ps)
+{
+ if (ps->pread != NULL)
+ {
+ anon_context(ps);
+
+ Try
+ png_destroy_read_struct(&ps->pread, &ps->piread, NULL);
+
+ Catch_anonymous
+ {
+ /* error already output: continue */
+ }
+
+ ps->pread = NULL;
+ ps->piread = NULL;
+ }
+
+ /* Always do this to be safe. */
+ store_pool_delete(ps, &ps->read_memory_pool);
+
+ ps->current = NULL;
+ ps->next = NULL;
+ ps->readpos = 0;
+ ps->validated = 0;
+}
+
+static void
+store_read_set(png_store *ps, png_uint_32 id)
+{
+ png_store_file *pf = ps->saved;
+
+ while (pf != NULL)
+ {
+ if (pf->id == id)
+ {
+ ps->current = pf;
+ ps->next = NULL;
+ store_read_buffer_next(ps);
+ return;
+ }
+
+ pf = pf->next;
+ }
+
+ {
+ size_t pos;
+ char msg[FILE_NAME_SIZE+64];
+
+ pos = standard_name_from_id(msg, sizeof msg, 0, id);
+ pos = safecat(msg, sizeof msg, pos, ": file not found");
+ png_error(ps->pread, msg);
+ }
+}
+
+/* The main interface for reading a saved file - pass the id number of the file
+ * to retrieve. Ids must be unique or the earlier file will be hidden. The API
+ * returns a png_struct and, optionally, a png_info. Both of these will be
+ * destroyed by store_read_reset above.
+ */
+static png_structp
+set_store_for_read(png_store *ps, png_infopp ppi, png_uint_32 id,
+ PNG_CONST char *name)
+{
+ /* Set the name for png_error */
+ safecat(ps->test, sizeof ps->test, 0, name);
+
+ if (ps->pread != NULL)
+ png_error(ps->pread, "read store already in use");
+
+ store_read_reset(ps);
+
+ /* Both the create APIs can return NULL if used in their default mode
+ * (because there is no other way of handling an error because the jmp_buf
+ * by default is stored in png_struct and that has not been allocated!)
+ * However, given that store_error works correctly in these circumstances
+ * we don't ever expect NULL in this program.
+ */
+ if (ps->speed)
+ ps->pread = png_create_read_struct(PNG_LIBPNG_VER_STRING, ps,
+ store_error, store_warning);
+
+ else
+ ps->pread = png_create_read_struct_2(PNG_LIBPNG_VER_STRING, ps,
+ store_error, store_warning, &ps->read_memory_pool, store_malloc,
+ store_free);
+
+ if (ps->pread == NULL)
+ {
+ struct exception_context *the_exception_context = &ps->exception_context;
+
+ store_log(ps, NULL, "png_create_read_struct returned NULL (unexpected)",
+ 1 /*error*/);
+
+ Throw ps;
+ }
+
+ store_read_set(ps, id);
+
+ if (ppi != NULL)
+ *ppi = ps->piread = png_create_info_struct(ps->pread);
+
+ return ps->pread;
+}
+
+/* The overall cleanup of a store simply calls the above then removes all the
+ * saved files. This does not delete the store itself.
+ */
+static void
+store_delete(png_store *ps)
+{
+ store_write_reset(ps);
+ store_read_reset(ps);
+ store_freefile(&ps->saved);
+
+ if (ps->image != NULL)
+ {
+ free(ps->image-1);
+ ps->image = NULL;
+ ps->cb_image = 0;
+ }
+}
+
+/*********************** PNG FILE MODIFICATION ON READ ************************/
+/* Files may be modified on read. The following structure contains a complete
+ * png_store together with extra members to handle modification and a special
+ * read callback for libpng. To use this the 'modifications' field must be set
+ * to a list of png_modification structures that actually perform the
+ * modification, otherwise a png_modifier is functionally equivalent to a
+ * png_store. There is a special read function, set_modifier_for_read, which
+ * replaces set_store_for_read.
+ */
+typedef struct png_modifier
+{
+ png_store this; /* I am a png_store */
+ struct png_modification *modifications; /* Changes to make */
+
+ enum modifier_state
+ {
+ modifier_start, /* Initial value */
+ modifier_signature, /* Have a signature */
+ modifier_IHDR /* Have an IHDR */
+ } state; /* My state */
+
+ /* Information from IHDR: */
+ png_byte bit_depth; /* From IHDR */
+ png_byte colour_type; /* From IHDR */
+
+ /* While handling PLTE, IDAT and IEND these chunks may be pended to allow
+ * other chunks to be inserted.
+ */
+ png_uint_32 pending_len;
+ png_uint_32 pending_chunk;
+
+ /* Test values */
+ double *gammas;
+ unsigned int ngammas;
+
+ /* Lowest sbit to test (libpng fails for sbit < 8) */
+ png_byte sbitlow;
+
+ /* Error control - these are the limits on errors accepted by the gamma tests
+ * below.
+ */
+ double maxout8; /* Maximum output value error */
+ double maxabs8; /* Absolute sample error 0..1 */
+ double maxpc8; /* Percentage sample error 0..100% */
+ double maxout16; /* Maximum output value error */
+ double maxabs16; /* Absolute sample error 0..1 */
+ double maxpc16; /* Percentage sample error 0..100% */
+
+ /* Logged 8 and 16 bit errors ('output' values): */
+ double error_gray_2;
+ double error_gray_4;
+ double error_gray_8;
+ double error_gray_16;
+ double error_color_8;
+ double error_color_16;
+
+ /* Flags: */
+ /* Whether or not to interlace. */
+ int interlace_type :9; /* int, but must store '1' */
+
+ /* Run the standard tests? */
+ unsigned int test_standard :1;
+
+ /* Run the odd-sized image and interlace read/write tests? */
+ unsigned int test_size :1;
+
+ /* Run tests on reading with a combiniation of transforms, */
+ unsigned int test_transform :1;
+
+ /* When to use the use_input_precision option: */
+ unsigned int use_input_precision :1;
+ unsigned int use_input_precision_sbit :1;
+ unsigned int use_input_precision_16to8 :1;
+
+ /* Which gamma tests to run: */
+ unsigned int test_gamma_threshold :1;
+ unsigned int test_gamma_transform :1; /* main tests */
+ unsigned int test_gamma_sbit :1;
+ unsigned int test_gamma_strip16 :1;
+
+ unsigned int log :1; /* Log max error */
+
+ /* Buffer information, the buffer size limits the size of the chunks that can
+ * be modified - they must fit (including header and CRC) into the buffer!
+ */
+ size_t flush; /* Count of bytes to flush */
+ size_t buffer_count; /* Bytes in buffer */
+ size_t buffer_position; /* Position in buffer */
+ png_byte buffer[1024];
+} png_modifier;
+
+static double abserr(png_modifier *pm, png_byte bit_depth)
+{
+ return bit_depth == 16 ? pm->maxabs16 : pm->maxabs8;
+}
+
+static double pcerr(png_modifier *pm, png_byte bit_depth)
+{
+ return (bit_depth == 16 ? pm->maxpc16 : pm->maxpc8) * .01;
+}
+
+static double outerr(png_modifier *pm, png_byte bit_depth)
+{
+ /* There is a serious error in the 2 and 4 bit grayscale transform because
+ * the gamma table value (8 bits) is simply shifted, not rounded, so the
+ * error in 4 bit greyscale gamma is up to the value below. This is a hack
+ * to allow pngvalid to succeed:
+ */
+ if (bit_depth == 2)
+ return .73182-.5;
+
+ if (bit_depth == 4)
+ return .90644-.5;
+
+ if (bit_depth == 16)
+ return pm->maxout16;
+
+ return pm->maxout8;
+}
+
+/* This returns true if the test should be stopped now because it has already
+ * failed and it is running silently.
+ */
+static int fail(png_modifier *pm)
+{
+ return !pm->log && !pm->this.verbose && (pm->this.nerrors > 0 ||
+ (pm->this.treat_warnings_as_errors && pm->this.nwarnings > 0));
+}
+
+static void
+modifier_init(png_modifier *pm)
+{
+ memset(pm, 0, sizeof *pm);
+ store_init(&pm->this);
+ pm->modifications = NULL;
+ pm->state = modifier_start;
+ pm->sbitlow = 1U;
+ pm->maxout8 = pm->maxpc8 = pm->maxabs8 = 0;
+ pm->maxout16 = pm->maxpc16 = pm->maxabs16 = 0;
+ pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 = 0;
+ pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0;
+ pm->interlace_type = PNG_INTERLACE_NONE;
+ pm->test_standard = 0;
+ pm->test_size = 0;
+ pm->test_transform = 0;
+ pm->use_input_precision = 0;
+ pm->use_input_precision_sbit = 0;
+ pm->use_input_precision_16to8 = 0;
+ pm->test_gamma_threshold = 0;
+ pm->test_gamma_transform = 0;
+ pm->test_gamma_sbit = 0;
+ pm->test_gamma_strip16 = 0;
+ pm->log = 0;
+
+ /* Rely on the memset for all the other fields - there are no pointers */
+}
+
+/* One modification structure must be provided for each chunk to be modified (in
+ * fact more than one can be provided if multiple separate changes are desired
+ * for a single chunk.) Modifications include adding a new chunk when a
+ * suitable chunk does not exist.
+ *
+ * The caller of modify_fn will reset the CRC of the chunk and record 'modified'
+ * or 'added' as appropriate if the modify_fn returns 1 (true). If the
+ * modify_fn is NULL the chunk is simply removed.
+ */
+typedef struct png_modification
+{
+ struct png_modification *next;
+ png_uint_32 chunk;
+
+ /* If the following is NULL all matching chunks will be removed: */
+ int (*modify_fn)(struct png_modifier *pm,
+ struct png_modification *me, int add);
+
+ /* If the following is set to PLTE, IDAT or IEND and the chunk has not been
+ * found and modified (and there is a modify_fn) the modify_fn will be called
+ * to add the chunk before the relevant chunk.
+ */
+ png_uint_32 add;
+ unsigned int modified :1; /* Chunk was modified */
+ unsigned int added :1; /* Chunk was added */
+ unsigned int removed :1; /* Chunk was removed */
+} png_modification;
+
+static void modification_reset(png_modification *pmm)
+{
+ if (pmm != NULL)
+ {
+ pmm->modified = 0;
+ pmm->added = 0;
+ pmm->removed = 0;
+ modification_reset(pmm->next);
+ }
+}
+
+static void
+modification_init(png_modification *pmm)
+{
+ memset(pmm, 0, sizeof *pmm);
+ pmm->next = NULL;
+ pmm->chunk = 0;
+ pmm->modify_fn = NULL;
+ pmm->add = 0;
+ modification_reset(pmm);
+}
+
+static void
+modifier_reset(png_modifier *pm)
+{
+ store_read_reset(&pm->this);
+ pm->modifications = NULL;
+ pm->state = modifier_start;
+ pm->bit_depth = pm->colour_type = 0;
+ pm->pending_len = pm->pending_chunk = 0;
+ pm->flush = pm->buffer_count = pm->buffer_position = 0;
+}
+
+/* Convenience macros. */
+#define CHUNK(a,b,c,d) (((a)<<24)+((b)<<16)+((c)<<8)+(d))
+#define CHUNK_IHDR CHUNK(73,72,68,82)
+#define CHUNK_PLTE CHUNK(80,76,84,69)
+#define CHUNK_IDAT CHUNK(73,68,65,84)
+#define CHUNK_IEND CHUNK(73,69,78,68)
+#define CHUNK_cHRM CHUNK(99,72,82,77)
+#define CHUNK_gAMA CHUNK(103,65,77,65)
+#define CHUNK_sBIT CHUNK(115,66,73,84)
+#define CHUNK_sRGB CHUNK(115,82,71,66)
+
+/* The guts of modification are performed during a read. */
+static void
+modifier_crc(png_bytep buffer)
+{
+ /* Recalculate the chunk CRC - a complete chunk must be in
+ * the buffer, at the start.
+ */
+ uInt datalen = png_get_uint_32(buffer);
+ png_save_uint_32(buffer+datalen+8, crc32(0L, buffer+4, datalen+4));
+}
+
+static void
+modifier_setbuffer(png_modifier *pm)
+{
+ modifier_crc(pm->buffer);
+ pm->buffer_count = png_get_uint_32(pm->buffer)+12;
+ pm->buffer_position = 0;
+}
+
+/* Separate the callback into the actual implementation (which is passed the
+ * png_modifier explicitly) and the callback, which gets the modifier from the
+ * png_struct.
+ */
+static void
+modifier_read_imp(png_modifier *pm, png_bytep pb, png_size_t st)
+{
+ while (st > 0)
+ {
+ size_t cb;
+ png_uint_32 len, chunk;
+ png_modification *mod;
+
+ if (pm->buffer_position >= pm->buffer_count) switch (pm->state)
+ {
+ static png_byte sign[8] = { 137, 80, 78, 71, 13, 10, 26, 10 };
+ case modifier_start:
+ store_read_imp(&pm->this, pm->buffer, 8); /* size of signature. */
+ pm->buffer_count = 8;
+ pm->buffer_position = 0;
+
+ if (memcmp(pm->buffer, sign, 8) != 0)
+ png_error(pm->this.pread, "invalid PNG file signature");
+ pm->state = modifier_signature;
+ break;
+
+ case modifier_signature:
+ store_read_imp(&pm->this, pm->buffer, 13+12); /* size of IHDR */
+ pm->buffer_count = 13+12;
+ pm->buffer_position = 0;
+
+ if (png_get_uint_32(pm->buffer) != 13 ||
+ png_get_uint_32(pm->buffer+4) != CHUNK_IHDR)
+ png_error(pm->this.pread, "invalid IHDR");
+
+ /* Check the list of modifiers for modifications to the IHDR. */
+ mod = pm->modifications;
+ while (mod != NULL)
+ {
+ if (mod->chunk == CHUNK_IHDR && mod->modify_fn &&
+ (*mod->modify_fn)(pm, mod, 0))
+ {
+ mod->modified = 1;
+ modifier_setbuffer(pm);
+ }
+
+ /* Ignore removal or add if IHDR! */
+ mod = mod->next;
+ }
+
+ /* Cache information from the IHDR (the modified one.) */
+ pm->bit_depth = pm->buffer[8+8];
+ pm->colour_type = pm->buffer[8+8+1];
+
+ pm->state = modifier_IHDR;
+ pm->flush = 0;
+ break;
+
+ case modifier_IHDR:
+ default:
+ /* Read a new chunk and process it until we see PLTE, IDAT or
+ * IEND. 'flush' indicates that there is still some data to
+ * output from the preceding chunk.
+ */
+ if ((cb = pm->flush) > 0)
+ {
+ if (cb > st) cb = st;
+ pm->flush -= cb;
+ store_read_imp(&pm->this, pb, cb);
+ pb += cb;
+ st -= cb;
+ if (st <= 0) return;
+ }
+
+ /* No more bytes to flush, read a header, or handle a pending
+ * chunk.
+ */
+ if (pm->pending_chunk != 0)
+ {
+ png_save_uint_32(pm->buffer, pm->pending_len);
+ png_save_uint_32(pm->buffer+4, pm->pending_chunk);
+ pm->pending_len = 0;
+ pm->pending_chunk = 0;
+ }
+ else
+ store_read_imp(&pm->this, pm->buffer, 8);
+
+ pm->buffer_count = 8;
+ pm->buffer_position = 0;
+
+ /* Check for something to modify or a terminator chunk. */
+ len = png_get_uint_32(pm->buffer);
+ chunk = png_get_uint_32(pm->buffer+4);
+
+ /* Terminators first, they may have to be delayed for added
+ * chunks
+ */
+ if (chunk == CHUNK_PLTE || chunk == CHUNK_IDAT ||
+ chunk == CHUNK_IEND)
+ {
+ mod = pm->modifications;
+
+ while (mod != NULL)
+ {
+ if ((mod->add == chunk ||
+ (mod->add == CHUNK_PLTE && chunk == CHUNK_IDAT)) &&
+ mod->modify_fn != NULL && !mod->modified && !mod->added)
+ {
+ /* Regardless of what the modify function does do not run
+ * this again.
+ */
+ mod->added = 1;
+
+ if ((*mod->modify_fn)(pm, mod, 1 /*add*/))
+ {
+ /* Reset the CRC on a new chunk */
+ if (pm->buffer_count > 0)
+ modifier_setbuffer(pm);
+
+ else
+ {
+ pm->buffer_position = 0;
+ mod->removed = 1;
+ }
+
+ /* The buffer has been filled with something (we assume)
+ * so output this. Pend the current chunk.
+ */
+ pm->pending_len = len;
+ pm->pending_chunk = chunk;
+ break; /* out of while */
+ }
+ }
+
+ mod = mod->next;
+ }
+
+ /* Don't do any further processing if the buffer was modified -
+ * otherwise the code will end up modifying a chunk that was
+ * just added.
+ */
+ if (mod != NULL)
+ break; /* out of switch */
+ }
+
+ /* If we get to here then this chunk may need to be modified. To
+ * do this it must be less than 1024 bytes in total size, otherwise
+ * it just gets flushed.
+ */
+ if (len+12 <= sizeof pm->buffer)
+ {
+ store_read_imp(&pm->this, pm->buffer+pm->buffer_count,
+ len+12-pm->buffer_count);
+ pm->buffer_count = len+12;
+
+ /* Check for a modification, else leave it be. */
+ mod = pm->modifications;
+ while (mod != NULL)
+ {
+ if (mod->chunk == chunk)
+ {
+ if (mod->modify_fn == NULL)
+ {
+ /* Remove this chunk */
+ pm->buffer_count = pm->buffer_position = 0;
+ mod->removed = 1;
+ break; /* Terminate the while loop */
+ }
+
+ else if ((*mod->modify_fn)(pm, mod, 0))
+ {
+ mod->modified = 1;
+ /* The chunk may have been removed: */
+ if (pm->buffer_count == 0)
+ {
+ pm->buffer_position = 0;
+ break;
+ }
+ modifier_setbuffer(pm);
+ }
+ }
+
+ mod = mod->next;
+ }
+ }
+
+ else
+ pm->flush = len+12 - pm->buffer_count; /* data + crc */
+
+ /* Take the data from the buffer (if there is any). */
+ break;
+ }
+
+ /* Here to read from the modifier buffer (not directly from
+ * the store, as in the flush case above.)
+ */
+ cb = pm->buffer_count - pm->buffer_position;
+
+ if (cb > st)
+ cb = st;
+
+ memcpy(pb, pm->buffer + pm->buffer_position, cb);
+ st -= cb;
+ pb += cb;
+ pm->buffer_position += cb;
+ }
+}
+
+/* The callback: */
+static void
+modifier_read(png_structp pp, png_bytep pb, png_size_t st)
+{
+ png_modifier *pm = png_get_io_ptr(pp);
+
+ if (pm == NULL || pm->this.pread != pp)
+ png_error(pp, "bad modifier_read call");
+
+ modifier_read_imp(pm, pb, st);
+}
+
+/* Like store_progressive_read but the data is getting changed as we go so we
+ * need a local buffer.
+ */
+static void
+modifier_progressive_read(png_modifier *pm, png_structp pp, png_infop pi)
+{
+ if (pm->this.pread != pp || pm->this.current == NULL ||
+ pm->this.next == NULL)
+ png_error(pp, "store state damaged (progressive)");
+
+ /* This is another Horowitz and Hill random noise generator. In this case
+ * the aim is to stress the progressive reader with truely horrible variable
+ * buffer sizes in the range 1..500, so a sequence of 9 bit random numbers
+ * is generated. We could probably just count from 1 to 32767 and get as
+ * good a result.
+ */
+ for (;;)
+ {
+ static png_uint_32 noise = 1;
+ png_size_t cb, cbAvail;
+ png_byte buffer[512];
+
+ /* Generate 15 more bits of stuff: */
+ noise = (noise << 9) | ((noise ^ (noise >> (9-5))) & 0x1ff);
+ cb = noise & 0x1ff;
+
+ /* Check that this number of bytes are available (in the current buffer.)
+ * (This doesn't quite work - the modifier might delete a chunk; unlikely
+ * but possible, it doesn't happen at present because the modifier only
+ * adds chunks to standard images.)
+ */
+ cbAvail = store_read_buffer_avail(&pm->this);
+ if (pm->buffer_count > pm->buffer_position)
+ cbAvail += pm->buffer_count - pm->buffer_position;
+
+ if (cb > cbAvail)
+ {
+ /* Check for EOF: */
+ if (cbAvail == 0)
+ break;
+
+ cb = cbAvail;
+ }
+
+ modifier_read_imp(pm, buffer, cb);
+ png_process_data(pp, pi, buffer, cb);
+ }
+
+ /* Check the invariants at the end (if this fails it's a problem in this
+ * file!)
+ */
+ if (pm->buffer_count > pm->buffer_position ||
+ pm->this.next != &pm->this.current->data ||
+ pm->this.readpos < pm->this.current->datacount)
+ png_error(pp, "progressive read implementation error");
+}
+
+/* Set up a modifier. */
+static png_structp
+set_modifier_for_read(png_modifier *pm, png_infopp ppi, png_uint_32 id,
+ PNG_CONST char *name)
+{
+ /* Do this first so that the modifier fields are cleared even if an error
+ * happens allocating the png_struct. No allocation is done here so no
+ * cleanup is required.
+ */
+ pm->state = modifier_start;
+ pm->bit_depth = 0;
+ pm->colour_type = 255;
+
+ pm->pending_len = 0;
+ pm->pending_chunk = 0;
+ pm->flush = 0;
+ pm->buffer_count = 0;
+ pm->buffer_position = 0;
+
+ return set_store_for_read(&pm->this, ppi, id, name);
+}
+
+/***************************** STANDARD PNG FILES *****************************/
+/* Standard files - write and save standard files. */
+/* There are two basic forms of standard images. Those which attempt to have
+ * all the possible pixel values (not possible for 16bpp images, but a range of
+ * values are produced) and those which have a range of image sizes. The former
+ * are used for testing transforms, in particular gamma correction and bit
+ * reduction and increase. The latter are reserved for testing the behavior of
+ * libpng with respect to 'odd' image sizes - particularly small images where
+ * rows become 1 byte and interlace passes disappear.
+ *
+ * The first, most useful, set are the 'transform' images, the second set of
+ * small images are the 'size' images.
+ *
+ * The transform files are constructed with rows which fit into a 1024 byte row
+ * buffer. This makes allocation easier below. Further regardless of the file
+ * format every row has 128 pixels (giving 1024 bytes for 64bpp formats).
+ *
+ * Files are stored with no gAMA or sBIT chunks, with a PLTE only when needed
+ * and with an ID derived from the colour type, bit depth and interlace type
+ * as above (FILEID). The width (128) and height (variable) are not stored in
+ * the FILEID - instead the fields are set to 0, indicating a transform file.
+ *
+ * The size files ar constructed with rows a maximum of 128 bytes wide, allowing
+ * a maximum width of 16 pixels (for the 64bpp case.) They also have a maximum
+ * height of 16 rows. The width and height are stored in the FILEID and, being
+ * non-zero, indicate a size file.
+ */
+
+/* The number of passes is related to the interlace type. There wass no libpng
+ * API to determine this prior to 1.5, so we need an inquiry function:
+ */
+static int
+npasses_from_interlace_type(png_structp pp, int interlace_type)
+{
+ switch (interlace_type)
+ {
+ default:
+ png_error(pp, "invalid interlace type");
+
+ case PNG_INTERLACE_NONE:
+ return 1;
+
+ case PNG_INTERLACE_ADAM7:
+ return PNG_INTERLACE_ADAM7_PASSES;
+ }
+}
+
+static unsigned int
+bit_size(png_structp pp, png_byte colour_type, png_byte bit_depth)
+{
+ switch (colour_type)
+ {
+ case 0: return bit_depth;
+
+ case 2: return 3*bit_depth;
+
+ case 3: return bit_depth;
+
+ case 4: return 2*bit_depth;
+
+ case 6: return 4*bit_depth;
+
+ default: png_error(pp, "invalid color type");
+ }
+}
+
+#define TRANSFORM_WIDTH 128U
+#define TRANSFORM_ROWMAX (TRANSFORM_WIDTH*8U)
+#define SIZE_ROWMAX (16*8U) /* 16 pixels, max 8 bytes each - 128 bytes */
+#define STANDARD_ROWMAX TRANSFORM_ROWMAX /* The larger of the two */
+
+/* So the maximum image sizes are as follows. A 'transform' image may require
+ * more than 65535 bytes. The size images are a maximum of 2046 bytes.
+ */
+#define TRANSFORM_IMAGEMAX (TRANSFORM_ROWMAX * (png_uint_32)2048)
+#define SIZE_IMAGEMAX (SIZE_ROWMAX * 16U)
+
+static size_t
+transform_rowsize(png_structp pp, png_byte colour_type, png_byte bit_depth)
+{
+ return (TRANSFORM_WIDTH * bit_size(pp, colour_type, bit_depth)) / 8;
+}
+
+/* transform_width(pp, colour_type, bit_depth) current returns the same number
+ * every time, so just use a macro:
+ */
+#define transform_width(pp, colour_type, bit_depth) TRANSFORM_WIDTH
+
+static png_uint_32
+transform_height(png_structp pp, png_byte colour_type, png_byte bit_depth)
+{
+ switch (bit_size(pp, colour_type, bit_depth))
+ {
+ case 1:
+ case 2:
+ case 4:
+ return 1; /* Total of 128 pixels */
+
+ case 8:
+ return 2; /* Total of 256 pixels/bytes */
+
+ case 16:
+ return 512; /* Total of 65536 pixels */
+
+ case 24:
+ case 32:
+ return 512; /* 65536 pixels */
+
+ case 48:
+ case 64:
+ return 2048;/* 4 x 65536 pixels. */
+
+ default:
+ return 0; /* Error, will be caught later */
+ }
+}
+
+/* The following can only be defined here, now we have the definitions
+ * of the transform image sizes.
+ */
+static png_uint_32
+standard_width(png_structp pp, png_uint_32 id)
+{
+ png_uint_32 width = WIDTH_FROM_ID(id);
+ UNUSED(pp)
+
+ if (width == 0)
+ width = transform_width(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id));
+
+ return width;
+}
+
+static png_uint_32
+standard_height(png_structp pp, png_uint_32 id)
+{
+ png_uint_32 height = HEIGHT_FROM_ID(id);
+
+ if (height == 0)
+ height = transform_height(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id));
+
+ return height;
+}
+
+static png_uint_32
+standard_rowsize(png_structp pp, png_uint_32 id)
+{
+ png_uint_32 width = standard_width(pp, id);
+
+ /* This won't overflow: */
+ width *= bit_size(pp, COL_FROM_ID(id), DEPTH_FROM_ID(id));
+ return (width + 7) / 8;
+}
+
+static void
+transform_row(png_structp pp, png_byte buffer[TRANSFORM_ROWMAX],
+ png_byte colour_type, png_byte bit_depth, png_uint_32 y)
+{
+ png_uint_32 v = y << 7;
+ png_uint_32 i = 0;
+
+ switch (bit_size(pp, colour_type, bit_depth))
+ {
+ case 1:
+ while (i<128/8) buffer[i] = v & 0xff, v += 17, ++i;
+ return;
+
+ case 2:
+ while (i<128/4) buffer[i] = v & 0xff, v += 33, ++i;
+ return;
+
+ case 4:
+ while (i<128/2) buffer[i] = v & 0xff, v += 65, ++i;
+ return;
+
+ case 8:
+ /* 256 bytes total, 128 bytes in each row set as follows: */
+ while (i<128) buffer[i] = v & 0xff, ++v, ++i;
+ return;
+
+ case 16:
+ /* Generate all 65536 pixel values in order, which includes the 8 bit
+ * GA case as well as the 16 bit G case.
+ */
+ while (i<128)
+ buffer[2*i] = (v>>8) & 0xff, buffer[2*i+1] = v & 0xff, ++v, ++i;
+
+ return;
+
+ case 24:
+ /* 65535 pixels, but rotate the values. */
+ while (i<128)
+ {
+ /* Three bytes per pixel, r, g, b, make b by r^g */
+ buffer[3*i+0] = (v >> 8) & 0xff;
+ buffer[3*i+1] = v & 0xff;
+ buffer[3*i+2] = ((v >> 8) ^ v) & 0xff;
+ ++v;
+ ++i;
+ }
+
+ return;
+
+ case 32:
+ /* 65535 pixels, r, g, b, a; just replicate */
+ while (i<128)
+ {
+ buffer[4*i+0] = (v >> 8) & 0xff;
+ buffer[4*i+1] = v & 0xff;
+ buffer[4*i+2] = (v >> 8) & 0xff;
+ buffer[4*i+3] = v & 0xff;
+ ++v;
+ ++i;
+ }
+
+ return;
+
+ case 48:
+ /* y is maximum 2047, giving 4x65536 pixels, make 'r' increase by 1 at
+ * each pixel, g increase by 257 (0x101) and 'b' by 0x1111:
+ */
+ while (i<128)
+ {
+ png_uint_32 t = v++;
+ buffer[6*i+0] = (t >> 8) & 0xff;
+ buffer[6*i+1] = t & 0xff;
+ t *= 257;
+ buffer[6*i+2] = (t >> 8) & 0xff;
+ buffer[6*i+3] = t & 0xff;
+ t *= 17;
+ buffer[6*i+4] = (t >> 8) & 0xff;
+ buffer[6*i+5] = t & 0xff;
+ ++i;
+ }
+
+ return;
+
+ case 64:
+ /* As above in the 32 bit case. */
+ while (i<128)
+ {
+ png_uint_32 t = v++;
+ buffer[8*i+0] = (t >> 8) & 0xff;
+ buffer[8*i+1] = t & 0xff;
+ buffer[8*i+4] = (t >> 8) & 0xff;
+ buffer[8*i+5] = t & 0xff;
+ t *= 257;
+ buffer[8*i+2] = (t >> 8) & 0xff;
+ buffer[8*i+3] = t & 0xff;
+ buffer[8*i+6] = (t >> 8) & 0xff;
+ buffer[8*i+7] = t & 0xff;
+ ++i;
+ }
+ return;
+
+ default:
+ break;
+ }
+
+ png_error(pp, "internal error");
+}
+
+/* This is just to do the right cast - could be changed to a function to check
+ * 'bd' but there isn't much point.
+ */
+#define DEPTH(bd) ((png_byte)(1U << (bd)))
+
+/* Make a standardized image given a an image colour type, bit depth and
+ * interlace type. The standard images have a very restricted range of
+ * rows and heights and are used for testing transforms rather than image
+ * layout details. See make_size_images below for a way to make images
+ * that test odd sizes along with the libpng interlace handling.
+ */
+static void
+make_transform_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type,
+ png_byte PNG_CONST bit_depth, int interlace_type, png_const_charp name)
+{
+ context(ps, fault);
+
+ Try
+ {
+ png_infop pi;
+ png_structp pp = set_store_for_write(ps, &pi, name);
+ png_uint_32 h;
+
+ /* In the event of a problem return control to the Catch statement below
+ * to do the clean up - it is not possible to 'return' directly from a Try
+ * block.
+ */
+ if (pp == NULL)
+ Throw ps;
+
+ h = transform_height(pp, colour_type, bit_depth);
+
+ png_set_IHDR(pp, pi, transform_width(pp, colour_type, bit_depth), h,
+ bit_depth, colour_type, interlace_type,
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+
+ if (colour_type == 3) /* palette */
+ {
+ unsigned int i = 0;
+ png_color pal[256];
+
+ do
+ pal[i].red = pal[i].green = pal[i].blue = (png_byte)i;
+ while(++i < 256U);
+
+ png_set_PLTE(pp, pi, pal, 256);
+ }
+
+ png_write_info(pp, pi);
+
+ if (png_get_rowbytes(pp, pi) !=
+ transform_rowsize(pp, colour_type, bit_depth))
+ png_error(pp, "row size incorrect");
+
+ else
+ {
+ /* Somewhat confusingly this must be called *after* png_write_info
+ * because if it is called before, the information in *pp has not been
+ * updated to reflect the interlaced image.
+ */
+ int npasses = png_set_interlace_handling(pp);
+ int pass;
+
+ if (npasses != npasses_from_interlace_type(pp, interlace_type))
+ png_error(pp, "write: png_set_interlace_handling failed");
+
+ for (pass=0; pass<npasses; ++pass)
+ {
+ png_uint_32 y;
+
+ for (y=0; y<h; ++y)
+ {
+ png_byte buffer[TRANSFORM_ROWMAX];
+
+ transform_row(pp, buffer, colour_type, bit_depth, y);
+ png_write_row(pp, buffer);
+ }
+ }
+ }
+
+ png_write_end(pp, pi);
+
+ /* And store this under the appropriate id, then clean up. */
+ store_storefile(ps, FILEID(colour_type, bit_depth, interlace_type,
+ 0, 0, 0));
+
+ store_write_reset(ps);
+ }
+
+ Catch(fault)
+ {
+ /* Use the png_store returned by the exception. This may help the compiler
+ * because 'ps' is not used in this branch of the setjmp. Note that fault
+ * and ps will always be the same value.
+ */
+ store_write_reset(fault);
+ }
+}
+
+static void
+make_standard(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, int bdlo,
+ int PNG_CONST bdhi)
+{
+ for (; bdlo <= bdhi; ++bdlo)
+ {
+ int interlace_type;
+
+ for (interlace_type = PNG_INTERLACE_NONE;
+ interlace_type < PNG_INTERLACE_LAST; ++interlace_type)
+ {
+ char name[FILE_NAME_SIZE];
+
+ standard_name(name, sizeof name, 0, colour_type, bdlo, interlace_type,
+ 0, 0, 0);
+ make_transform_image(ps, colour_type, DEPTH(bdlo), interlace_type,
+ name);
+ }
+ }
+}
+
+static void
+make_transform_images(png_store *ps)
+{
+ /* This is in case of errors. */
+ safecat(ps->test, sizeof ps->test, 0, "make standard images");
+
+ /* Arguments are colour_type, low bit depth, high bit depth
+ */
+ make_standard(ps, 0, 0, WRITE_BDHI);
+ make_standard(ps, 2, 3, WRITE_BDHI);
+ make_standard(ps, 3, 0, 3 /*palette: max 8 bits*/);
+ make_standard(ps, 4, 3, WRITE_BDHI);
+ make_standard(ps, 6, 3, WRITE_BDHI);
+}
+
+/* The following two routines use the PNG interlace support macros from
+ * png.h to interlace or deinterlace rows.
+ */
+static void
+interlace_row(png_bytep buffer, png_const_bytep imageRow,
+ unsigned int pixel_size, png_uint_32 w, int pass)
+{
+ png_uint_32 xin, xout, xstep;
+
+ /* Note that this can, trivially, be optimized to a memcpy on pass 7, the
+ * code is presented this way to make it easier to understand. In practice
+ * consult the code in the libpng source to see other ways of doing this.
+ */
+ xin = PNG_PASS_START_COL(pass);
+ xstep = 1U<<PNG_PASS_COL_SHIFT(pass);
+
+ for (xout=0; xin<w; xin+=xstep)
+ {
+ pixel_copy(buffer, xout, imageRow, xin, pixel_size);
+ ++xout;
+ }
+}
+
+static void
+deinterlace_row(png_bytep buffer, png_const_bytep row,
+ unsigned int pixel_size, png_uint_32 w, int pass)
+{
+ /* The inverse of the above, 'row' is part of row 'y' of the output image,
+ * in 'buffer'. The image is 'w' wide and this is pass 'pass', distribute
+ * the pixels of row into buffer and return the number written (to allow
+ * this to be checked).
+ */
+ png_uint_32 xin, xout, xstep;
+
+ xout = PNG_PASS_START_COL(pass);
+ xstep = 1U<<PNG_PASS_COL_SHIFT(pass);
+
+ for (xin=0; xout<w; xout+=xstep)
+ {
+ pixel_copy(buffer, xout, row, xin, pixel_size);
+ ++xin;
+ }
+}
+
+/* Build a single row for the 'size' test images, this fills in only the
+ * first bit_width bits of the sample row.
+ */
+static void
+size_row(png_byte buffer[SIZE_ROWMAX], png_uint_32 bit_width, png_uint_32 y)
+{
+ /* height is in the range 1 to 16, so: */
+ y = ((y & 1) << 7) + ((y & 2) << 6) + ((y & 4) << 5) + ((y & 8) << 4);
+ /* the following ensures bits are set in small images: */
+ y ^= 0xA5;
+
+ while (bit_width >= 8)
+ *buffer++ = (png_byte)y++, bit_width -= 8;
+
+ /* There may be up to 7 remaining bits, these go in the most significant
+ * bits of the byte.
+ */
+ if (bit_width > 0)
+ {
+ png_uint_32 mask = (1U<<(8-bit_width))-1;
+ *buffer = (png_byte)((*buffer & mask) | (y & ~mask));
+ }
+}
+
+static void
+make_size_image(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type,
+ png_byte PNG_CONST bit_depth, int PNG_CONST interlace_type,
+ png_uint_32 PNG_CONST w, png_uint_32 PNG_CONST h,
+ int PNG_CONST do_interlace)
+{
+ context(ps, fault);
+
+ Try
+ {
+ png_infop pi;
+ png_structp pp;
+ unsigned int pixel_size;
+
+ /* Make a name and get an appropriate id for the store: */
+ char name[FILE_NAME_SIZE];
+ PNG_CONST png_uint_32 id = FILEID(colour_type, bit_depth, interlace_type,
+ w, h, do_interlace);
+
+ standard_name_from_id(name, sizeof name, 0, id);
+ pp = set_store_for_write(ps, &pi, name);
+
+ /* In the event of a problem return control to the Catch statement below
+ * to do the clean up - it is not possible to 'return' directly from a Try
+ * block.
+ */
+ if (pp == NULL)
+ Throw ps;
+
+ png_set_IHDR(pp, pi, w, h, bit_depth, colour_type, interlace_type,
+ PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+
+ /* Same palette as make_transform_image - I don' think there is any
+ * benefit from using a different one (JB 20101211)
+ */
+ if (colour_type == 3) /* palette */
+ {
+ unsigned int i = 0;
+ png_color pal[256];
+
+ do
+ pal[i].red = pal[i].green = pal[i].blue = (png_byte)i;
+ while(++i < 256U);
+
+ png_set_PLTE(pp, pi, pal, 256);
+ }
+
+ png_write_info(pp, pi);
+
+ /* Calculate the bit size, divide by 8 to get the byte size - this won't
+ * overflow because we know the w values are all small enough even for
+ * a system where 'unsigned int' is only 16 bits.
+ */
+ pixel_size = bit_size(pp, colour_type, bit_depth);
+ if (png_get_rowbytes(pp, pi) != ((w * pixel_size) + 7) / 8)
+ png_error(pp, "row size incorrect");
+
+ else
+ {
+ int npasses = npasses_from_interlace_type(pp, interlace_type);
+ png_uint_32 y;
+ int pass;
+ png_byte image[16][SIZE_ROWMAX];
+
+ /* To help consistent error detection make the parts of this buffer
+ * that aren't set below all '1':
+ */
+ memset(image, 0xff, sizeof image);
+
+ if (!do_interlace && npasses != png_set_interlace_handling(pp))
+ png_error(pp, "write: png_set_interlace_handling failed");
+
+ /* Prepare the whole image first to avoid making it 7 times: */
+ for (y=0; y<h; ++y)
+ size_row(image[y], w * pixel_size, y);
+
+ for (pass=0; pass<npasses; ++pass)
+ {
+ /* The following two are for checking the macros: */
+ PNG_CONST png_uint_32 wPass = PNG_PASS_COLS(w, pass);
+
+ /* If do_interlace is set we don't call png_write_row for every
+ * row because some of them are empty. In fact, for a 1x1 image,
+ * most of them are empty!
+ */
+ for (y=0; y<h; ++y)
+ {
+ png_const_bytep row = image[y];
+ png_byte tempRow[SIZE_ROWMAX];
+
+ /* If do_interlace *and* the image is interlaced we
+ * need a reduced interlace row, this may be reduced
+ * to empty.
+ */
+ if (do_interlace && interlace_type == PNG_INTERLACE_ADAM7)
+ {
+ /* The row must not be written if it doesn't exist, notice
+ * that there are two conditions here, either the row isn't
+ * ever in the pass or the row would be but isn't wide
+ * enough to contribute any pixels. In fact the wPass test
+ * can be used to skip the whole y loop in this case.
+ */
+ if (PNG_ROW_IN_INTERLACE_PASS(y, pass) && wPass > 0)
+ {
+ /* Set to all 1's for error detection (libpng tends to
+ * set unset things to 0).
+ */
+ memset(tempRow, 0xff, sizeof tempRow);
+ interlace_row(tempRow, row, pixel_size, w, pass);
+ row = tempRow;
+ }
+ else
+ continue;
+ }
+
+ /* Only get to here if the row has some pixels in it. */
+ png_write_row(pp, row);
+ }
+ }
+ }
+
+ png_write_end(pp, pi);
+
+ /* And store this under the appropriate id, then clean up. */
+ store_storefile(ps, id);
+
+ store_write_reset(ps);
+ }
+
+ Catch(fault)
+ {
+ /* Use the png_store returned by the exception. This may help the compiler
+ * because 'ps' is not used in this branch of the setjmp. Note that fault
+ * and ps will always be the same value.
+ */
+ store_write_reset(fault);
+ }
+}
+
+static void
+make_size(png_store* PNG_CONST ps, png_byte PNG_CONST colour_type, int bdlo,
+ int PNG_CONST bdhi)
+{
+ for (; bdlo <= bdhi; ++bdlo)
+ {
+ png_uint_32 width;
+
+ for (width = 1; width <= 16; ++width)
+ {
+ png_uint_32 height;
+
+ for (height = 1; height <= 16; ++height)
+ {
+ /* The four combinations of DIY interlace and interlace or not -
+ * no interlace + DIY should be identical to no interlace with
+ * libpng doing it.
+ */
+ make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_NONE,
+ width, height, 0);
+ make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_NONE,
+ width, height, 1);
+ make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_ADAM7,
+ width, height, 0);
+ make_size_image(ps, colour_type, DEPTH(bdlo), PNG_INTERLACE_ADAM7,
+ width, height, 1);
+ }
+ }
+ }
+}
+
+static void
+make_size_images(png_store *ps)
+{
+ /* This is in case of errors. */
+ safecat(ps->test, sizeof ps->test, 0, "make size images");
+
+ /* Arguments are colour_type, low bit depth, high bit depth
+ */
+ make_size(ps, 0, 0, WRITE_BDHI);
+ make_size(ps, 2, 3, WRITE_BDHI);
+ make_size(ps, 3, 0, 3 /*palette: max 8 bits*/);
+ make_size(ps, 4, 3, WRITE_BDHI);
+ make_size(ps, 6, 3, WRITE_BDHI);
+}
+
+/* Return a row based on image id and 'y' for checking: */
+static void
+standard_row(png_structp pp, png_byte std[STANDARD_ROWMAX], png_uint_32 id,
+ png_uint_32 y)
+{
+ if (WIDTH_FROM_ID(id) == 0)
+ transform_row(pp, std, COL_FROM_ID(id), DEPTH_FROM_ID(id), y);
+ else
+ size_row(std, WIDTH_FROM_ID(id) * bit_size(pp, COL_FROM_ID(id),
+ DEPTH_FROM_ID(id)), y);
+}
+
+/* Tests - individual test cases */
+/* Like 'make_standard' but errors are deliberately introduced into the calls
+ * to ensure that they get detected - it should not be possible to write an
+ * invalid image with libpng!
+ */
+static void
+sBIT0_error_fn(png_structp pp, png_infop pi)
+{
+ /* 0 is invalid... */
+ png_color_8 bad;
+ bad.red = bad.green = bad.blue = bad.gray = bad.alpha = 0;
+ png_set_sBIT(pp, pi, &bad);
+}
+
+static void
+sBIT_error_fn(png_structp pp, png_infop pi)
+{
+ png_byte bit_depth;
+ png_color_8 bad;
+
+ if (png_get_color_type(pp, pi) == PNG_COLOR_TYPE_PALETTE)
+ bit_depth = 8;
+
+ else
+ bit_depth = png_get_bit_depth(pp, pi);
+
+ /* Now we know the bit depth we can easily generate an invalid sBIT entry */
+ bad.red = bad.green = bad.blue = bad.gray = bad.alpha =
+ (png_byte)(bit_depth+1);
+ png_set_sBIT(pp, pi, &bad);
+}
+
+static PNG_CONST struct
+{
+ void (*fn)(png_structp, png_infop);
+ PNG_CONST char *msg;
+ unsigned int warning :1; /* the error is a warning... */
+} error_test[] =
+ {
+ { sBIT0_error_fn, "sBIT(0): failed to detect error", 1 },
+ { sBIT_error_fn, "sBIT(too big): failed to detect error", 1 },
+ };
+
+static void
+make_error(png_store* volatile ps, png_byte PNG_CONST colour_type,
+ png_byte bit_depth, int interlace_type, int test, png_const_charp name)
+{
+ context(ps, fault);
+
+ Try
+ {
+ png_structp pp;
+ png_infop pi;
+
+ pp = set_store_for_write(ps, &pi, name);
+
+ if (pp == NULL)
+ Throw ps;
+
+ png_set_IHDR(pp, pi, transform_width(pp, colour_type, bit_depth),
+ transform_height(pp, colour_type, bit_depth), bit_depth, colour_type,
+ interlace_type, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
+
+ if (colour_type == 3) /* palette */
+ {
+ unsigned int i = 0;
+ png_color pal[256];
+
+ do
+ pal[i].red = pal[i].green = pal[i].blue = (png_byte)i;
+ while(++i < 256U);
+
+ png_set_PLTE(pp, pi, pal, 256);
+ }
+
+ /* Time for a few errors, these are in various optional chunks, the
+ * standard tests test the standard chunks pretty well.
+ */
+# define exception__prev exception_prev_1
+# define exception__env exception_env_1
+ Try
+ {
+ /* Expect this to throw: */
+ ps->expect_error = !error_test[test].warning;
+ ps->expect_warning = error_test[test].warning;
+ ps->saw_warning = 0;
+ error_test[test].fn(pp, pi);
+
+ /* Normally the error is only detected here: */
+ png_write_info(pp, pi);
+
+ /* And handle the case where it was only a warning: */
+ if (ps->expect_warning && ps->saw_warning)
+ Throw ps;
+
+ /* If we get here there is a problem, we have success - no error or
+ * no warning - when we shouldn't have success. Log an error.
+ */
+ store_log(ps, pp, error_test[test].msg, 1 /*error*/);
+ }
+
+ Catch (fault)
+ ps = fault; /* expected exit, make sure ps is not clobbered */
+#undef exception__prev
+#undef exception__env
+
+ /* And clear these flags */
+ ps->expect_error = 0;
+ ps->expect_warning = 0;
+
+ /* Now write the whole image, just to make sure that the detected, or
+ * undetected, errro has not created problems inside libpng.
+ */
+ if (png_get_rowbytes(pp, pi) !=
+ transform_rowsize(pp, colour_type, bit_depth))
+ png_error(pp, "row size incorrect");
+
+ else
+ {
+ png_uint_32 h = transform_height(pp, colour_type, bit_depth);
+ int npasses = png_set_interlace_handling(pp);
+ int pass;
+
+ if (npasses != npasses_from_interlace_type(pp, interlace_type))
+ png_error(pp, "write: png_set_interlace_handling failed");
+
+ for (pass=0; pass<npasses; ++pass)
+ {
+ png_uint_32 y;
+
+ for (y=0; y<h; ++y)
+ {
+ png_byte buffer[TRANSFORM_ROWMAX];
+
+ transform_row(pp, buffer, colour_type, bit_depth, y);
+ png_write_row(pp, buffer);
+ }
+ }
+ }
+
+ png_write_end(pp, pi);
+
+ /* The following deletes the file that was just written. */
+ store_write_reset(ps);
+ }
+
+ Catch(fault)
+ {
+ store_write_reset(fault);
+ }
+}
+
+static int
+make_errors(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type,
+ int bdlo, int PNG_CONST bdhi)
+{
+ for (; bdlo <= bdhi; ++bdlo)
+ {
+ int interlace_type;
+
+ for (interlace_type = PNG_INTERLACE_NONE;
+ interlace_type < PNG_INTERLACE_LAST; ++interlace_type)
+ {
+ unsigned int test;
+ char name[FILE_NAME_SIZE];
+
+ standard_name(name, sizeof name, 0, colour_type, bdlo, interlace_type,
+ 0, 0, 0);
+
+ for (test=0; test<(sizeof error_test)/(sizeof error_test[0]); ++test)
+ {
+ make_error(&pm->this, colour_type, DEPTH(bdlo), interlace_type,
+ test, name);
+
+ if (fail(pm))
+ return 0;
+ }
+ }
+ }
+
+ return 1; /* keep going */
+}
+
+static void
+perform_error_test(png_modifier *pm)
+{
+ /* Need to do this here because we just write in this test. */
+ safecat(pm->this.test, sizeof pm->this.test, 0, "error test");
+
+ if (!make_errors(pm, 0, 0, WRITE_BDHI))
+ return;
+
+ if (!make_errors(pm, 2, 3, WRITE_BDHI))
+ return;
+
+ if (!make_errors(pm, 3, 0, 3))
+ return;
+
+ if (!make_errors(pm, 4, 3, WRITE_BDHI))
+ return;
+
+ if (!make_errors(pm, 6, 3, WRITE_BDHI))
+ return;
+}
+
+/* Because we want to use the same code in both the progressive reader and the
+ * sequential reader it is necessary to deal with the fact that the progressive
+ * reader callbacks only have one parameter (png_get_progressive_ptr()), so this
+ * must contain all the test parameters and all the local variables directly
+ * accessible to the sequential reader implementation.
+ *
+ * The technique adopted is to reinvent part of what Dijkstra termed a
+ * 'display'; an array of pointers to the stack frames of enclosing functions so
+ * that a nested function definition can access the local (C auto) variables of
+ * the functions that contain its definition. In fact C provides the first
+ * pointer (the local variables - the stack frame pointer) and the last (the
+ * global variables - the BCPL global vector typically implemented as global
+ * addresses), this code requires one more pointer to make the display - the
+ * local variables (and function call parameters) of the function that actually
+ * invokes either the progressive or sequential reader.
+ *
+ * Perhaps confusingly this technique is confounded with classes - the
+ * 'standard_display' defined here is sub-classed as the 'gamma_display' below.
+ * A gamma_display is a standard_display, taking advantage of the ANSI-C
+ * requirement that the pointer to the first member of a structure must be the
+ * same as the pointer to the structure. This allows us to reuse standard_
+ * functions in the gamma test code; something that could not be done with
+ * nested funtions!
+ */
+typedef struct standard_palette_entry /* pngvalid format palette! */
+{
+ png_byte red;
+ png_byte green;
+ png_byte blue;
+ png_byte alpha;
+} standard_palette[256];
+
+typedef struct standard_display
+{
+ png_store* ps; /* Test parameters (passed to the function) */
+ png_byte colour_type;
+ png_byte bit_depth;
+ png_byte red_sBIT; /* Input data sBIT values. */
+ png_byte green_sBIT;
+ png_byte blue_sBIT;
+ png_byte alpha_sBIT;
+ int interlace_type;
+ png_uint_32 id; /* Calculated file ID */
+ png_uint_32 w; /* Width of image */
+ png_uint_32 h; /* Height of image */
+ int npasses; /* Number of interlaced passes */
+ png_uint_32 pixel_size; /* Width of one pixel in bits */
+ png_uint_32 bit_width; /* Width of output row in bits */
+ size_t cbRow; /* Bytes in a row of the output image */
+ int do_interlace; /* Do interlacing internally */
+ int is_transparent; /* Transparecy information was present. */
+ struct
+ {
+ png_uint_16 red;
+ png_uint_16 green;
+ png_uint_16 blue;
+ } transparent; /* The transparent color, if set. */
+ standard_palette
+ palette;
+} standard_display;
+
+static void
+standard_display_init(standard_display *dp, png_store* ps, png_uint_32 id,
+ int do_interlace)
+{
+ dp->ps = ps;
+ dp->colour_type = COL_FROM_ID(id);
+ dp->bit_depth = DEPTH_FROM_ID(id);
+ dp->alpha_sBIT = dp->blue_sBIT = dp->green_sBIT = dp->alpha_sBIT =
+ dp->bit_depth;
+ dp->interlace_type = INTERLACE_FROM_ID(id);
+ dp->id = id;
+ /* All the rest are filled in after the read_info: */
+ dp->w = 0;
+ dp->h = 0;
+ dp->npasses = 0;
+ dp->pixel_size = 0;
+ dp->bit_width = 0;
+ dp->cbRow = 0;
+ dp->do_interlace = do_interlace;
+ dp->is_transparent = 0;
+ /* Preset the transparent color to black: */
+ memset(&dp->transparent, 0, sizeof dp->transparent);
+ /* Preset the palette to full intensity/opaque througout: */
+ memset(dp->palette, 0xff, sizeof dp->palette);
+
+}
+
+/* Call this only if the colour type is 3 - PNG_COLOR_TYPE_PALETTE - otherwise
+ * it will png_error out. The API returns true if tRNS information was
+ * present.
+ */
+static int
+standard_palette_init(standard_palette palette, png_structp pp, png_infop pi)
+{
+ png_colorp pal;
+ png_bytep trans_alpha;
+ int num;
+
+ pal = 0;
+ num = -1;
+ if (png_get_PLTE(pp, pi, &pal, &num) & PNG_INFO_PLTE)
+ {
+ int i;
+
+ for (i=0; i<num; ++i)
+ {
+ palette[i].red = pal[i].red;
+ palette[i].green = pal[i].green;
+ palette[i].blue = pal[i].blue;
+ }
+
+ /* Mark the remainder of the entries with a flag value: */
+ for (; i<256; ++i)
+ palette[i].red = palette[i].green = palette[i].blue = 126;
+ }
+
+ else /* !png_get_PLTE */
+ png_error(pp, "validate: missing PLTE with color type 3");
+
+ trans_alpha = 0;
+ num = -1;
+ if (png_get_tRNS(pp, pi, &trans_alpha, &num, 0) & PNG_INFO_tRNS)
+ {
+ int i;
+
+ /* Any of these are crash-worthy - given the implementation of
+ * png_get_tRNS up to 1.5 an app won't crash if it just checks the
+ * result above and fails to check that the variables it passed have
+ * actually been filled in! Note that if the app were to pass the
+ * last, png_color_16p, variable too it couldn't rely on this.
+ */
+ if (trans_alpha == 0 || num <= 0 || num > 256)
+ png_error(pp, "validate: unexpected png_get_tRNS (palette) result");
+
+ for (i=0; i<num; ++i)
+ palette[i].alpha = trans_alpha[i];
+
+ for (; i<256; ++i)
+ palette[i].alpha = 255;
+
+ return 1; /* transparency */
+ }
+
+ else
+ {
+ /* No transparency - just set the alpha channel to opaque. */
+ int i;
+
+ for (i=0; i<256; ++i)
+ palette[i].alpha = 255;
+
+ return 0; /* no transparency */
+ }
+}
+
+/* By passing a 'standard_display' the progressive callbacks can be used
+ * directly by the sequential code, the functions suffixed "_imp" are the
+ * implementations, the functions without the suffix are the callbacks.
+ *
+ * The code for the info callback is split into two because this callback calls
+ * png_read_update_info or png_start_read_image and what gets called depends on
+ * whether the info needs updating (we want to test both calls in pngvalid.)
+ */
+static void
+standard_info_part1(standard_display *dp, png_structp pp, png_infop pi)
+{
+ if (png_get_bit_depth(pp, pi) != dp->bit_depth)
+ png_error(pp, "validate: bit depth changed");
+
+ if (png_get_color_type(pp, pi) != dp->colour_type)
+ png_error(pp, "validate: color type changed");
+
+ if (png_get_filter_type(pp, pi) != PNG_FILTER_TYPE_BASE)
+ png_error(pp, "validate: filter type changed");
+
+ if (png_get_interlace_type(pp, pi) != dp->interlace_type)
+ png_error(pp, "validate: interlacing changed");
+
+ if (png_get_compression_type(pp, pi) != PNG_COMPRESSION_TYPE_BASE)
+ png_error(pp, "validate: compression type changed");
+
+ dp->w = png_get_image_width(pp, pi);
+
+ if (dp->w != standard_width(pp, dp->id))
+ png_error(pp, "validate: image width changed");
+
+ dp->h = png_get_image_height(pp, pi);
+
+ if (dp->h != standard_height(pp, dp->id))
+ png_error(pp, "validate: image height changed");
+
+ /* Record (but don't check at present) the input sBIT according to the colour
+ * type information.
+ */
+ {
+ png_color_8p sBIT = 0;
+
+ if (png_get_sBIT(pp, pi, &sBIT) & PNG_INFO_sBIT)
+ {
+ int sBIT_invalid = 0;
+
+ if (sBIT == 0)
+ png_error(pp, "validate: unexpected png_get_sBIT result");
+
+ if (dp->colour_type & PNG_COLOR_MASK_COLOR)
+ {
+ if (sBIT->red == 0 || sBIT->red > dp->bit_depth)
+ sBIT_invalid = 1;
+ else
+ dp->red_sBIT = sBIT->red;
+
+ if (sBIT->green == 0 || sBIT->green > dp->bit_depth)
+ sBIT_invalid = 1;
+ else
+ dp->green_sBIT = sBIT->green;
+
+ if (sBIT->blue == 0 || sBIT->blue > dp->bit_depth)
+ sBIT_invalid = 1;
+ else
+ dp->blue_sBIT = sBIT->blue;
+ }
+
+ else /* !COLOR */
+ {
+ if (sBIT->gray == 0 || sBIT->gray > dp->bit_depth)
+ sBIT_invalid = 1;
+ else
+ dp->blue_sBIT = dp->green_sBIT = dp->red_sBIT = sBIT->gray;
+ }
+
+ /* All 8 bits in tRNS for a palette image are significant - see the
+ * spec.
+ */
+ if (dp->colour_type & PNG_COLOR_MASK_ALPHA)
+ {
+ if (sBIT->alpha == 0 || sBIT->alpha > dp->bit_depth)
+ sBIT_invalid = 1;
+ else
+ dp->alpha_sBIT = sBIT->alpha;
+ }
+
+ if (sBIT_invalid)
+ png_error(pp, "validate: sBIT value out of range");
+ }
+ }
+
+ /* Important: this is validating the value *before* any transforms have been
+ * put in place. It doesn't matter for the standard tests, where there are
+ * no transforms, but it does for other tests where rowbytes may change after
+ * png_read_update_info.
+ */
+ if (png_get_rowbytes(pp, pi) != standard_rowsize(pp, dp->id))
+ png_error(pp, "validate: row size changed");
+
+ /* The palette is never read for non-palette images, even though it is valid
+ * - this could be changed.
+ */
+ if (dp->colour_type == 3) /* palette */
+ {
+ int i;
+
+ dp->is_transparent = standard_palette_init(dp->palette, pp, pi);
+
+ /* And validate the result. */
+ for (i=0; i<256; ++i)
+ if (dp->palette[i].red != i || dp->palette[i].green != i ||
+ dp->palette[i].blue != i)
+ png_error(pp, "validate: color type 3 PLTE chunk changed");
+ }
+
+ /* In any case always check for a tranparent color: */
+ {
+ png_color_16p trans_color = 0;
+
+ if (png_get_tRNS(pp, pi, 0, 0, &trans_color) & PNG_INFO_tRNS)
+ {
+ if (trans_color == 0)
+ png_error(pp, "validate: unexpected png_get_tRNS (color) result");
+
+ switch (dp->colour_type)
+ {
+ case 0:
+ dp->transparent.red = dp->transparent.green = dp->transparent.blue =
+ trans_color->gray;
+ dp->is_transparent = 1;
+ break;
+
+ case 2:
+ dp->transparent.red = trans_color->red;
+ dp->transparent.green = trans_color->green;
+ dp->transparent.blue = trans_color->blue;
+ dp->is_transparent = 1;
+ break;
+
+ case 3:
+ /* Not expected because it should result in the array case
+ * above.
+ */
+ png_error(pp, "validate: unexpected png_get_tRNS result");
+ break;
+
+ default:
+ png_error(pp, "validate: invalid tRNS chunk with alpha image");
+ }
+ }
+ }
+
+ /* Read the number of passes - expected to match the value used when
+ * creating the image (interlaced or not). This has the side effect of
+ * turning on interlace handling (if do_interlace is not set.)
+ */
+ dp->npasses = npasses_from_interlace_type(pp, dp->interlace_type);
+ if (!dp->do_interlace && dp->npasses != png_set_interlace_handling(pp))
+ png_error(pp, "validate: file changed interlace type");
+
+ /* Caller calls png_read_update_info or png_start_read_image now, then calls
+ * part2.
+ */
+}
+
+/* This must be called *after* the png_read_update_info call to get the correct
+ * 'rowbytes' value, otherwise png_get_rowbytes will refer to the untransformed
+ * image.
+ */
+static void
+standard_info_part2(standard_display *dp, png_structp pp, png_infop pi,
+ int nImages)
+{
+ /* Record cbRow now that it can be found. */
+ dp->pixel_size = bit_size(pp, png_get_color_type(pp, pi),
+ png_get_bit_depth(pp, pi));
+ dp->bit_width = png_get_image_width(pp, pi) * dp->pixel_size;
+ dp->cbRow = png_get_rowbytes(pp, pi);
+
+ /* Validate the rowbytes here again. */
+ if (dp->cbRow != (dp->bit_width+7)/8)
+ png_error(pp, "bad png_get_rowbytes calculation");
+
+ /* Then ensure there is enough space for the output image(s). */
+ store_ensure_image(dp->ps, pp, nImages * dp->cbRow * dp->h);
+}
+
+static void
+standard_info_imp(standard_display *dp, png_structp pp, png_infop pi,
+ int nImages)
+{
+ /* Note that the validation routine has the side effect of turning on
+ * interlace handling in the subsequent code.
+ */
+ standard_info_part1(dp, pp, pi);
+
+ /* And the info callback has to call this (or png_read_update_info - see
+ * below in the png_modifier code for that variant.
+ */
+ png_start_read_image(pp);
+
+ /* Validate the height, width and rowbytes plus ensure that sufficient buffer
+ * exists for decoding the image.
+ */
+ standard_info_part2(dp, pp, pi, nImages);
+}
+
+static void
+standard_info(png_structp pp, png_infop pi)
+{
+ standard_display *dp = png_get_progressive_ptr(pp);
+
+ /* Call with nImages==1 because the progressive reader can only produce one
+ * image.
+ */
+ standard_info_imp(dp, pp, pi, 1 /*only one image*/);
+}
+
+static void
+progressive_row(png_structp pp, png_bytep new_row, png_uint_32 y, int pass)
+{
+ PNG_CONST standard_display *dp = png_get_progressive_ptr(pp);
+
+ /* When handling interlacing some rows will be absent in each pass, the
+ * callback still gets called, but with a NULL pointer. This is checked
+ * in the 'else' clause below. We need our own 'cbRow', but we can't call
+ * png_get_rowbytes because we got no info structure.
+ */
+ if (new_row != NULL)
+ {
+ png_bytep row;
+
+ /* In the case where the reader doesn't do the interlace it gives
+ * us the y in the sub-image:
+ */
+ if (dp->do_interlace && dp->interlace_type == PNG_INTERLACE_ADAM7)
+ y = PNG_ROW_FROM_PASS_ROW(y, pass);
+
+ /* Validate this just in case. */
+ if (y >= dp->h)
+ png_error(pp, "invalid y to progressive row callback");
+
+ row = dp->ps->image + y * dp->cbRow;
+
+ /* Combine the new row into the old: */
+ if (dp->do_interlace)
+ {
+ if (dp->interlace_type == PNG_INTERLACE_ADAM7)
+ deinterlace_row(row, new_row, dp->pixel_size, dp->w, pass);
+ else
+ memcpy(row, new_row, dp->cbRow);
+ }
+ else
+ png_progressive_combine_row(pp, row, new_row);
+ } else if (dp->interlace_type == PNG_INTERLACE_ADAM7 &&
+ PNG_ROW_IN_INTERLACE_PASS(y, pass) &&
+ PNG_PASS_COLS(dp->w, pass) > 0)
+ png_error(pp, "missing row in progressive de-interlacing");
+}
+
+static void
+sequential_row(standard_display *dp, png_structp pp, png_infop pi,
+ PNG_CONST png_bytep pImage, PNG_CONST png_bytep pDisplay)
+{
+ PNG_CONST int npasses = dp->npasses;
+ PNG_CONST int do_interlace = dp->do_interlace &&
+ dp->interlace_type == PNG_INTERLACE_ADAM7;
+ PNG_CONST png_uint_32 height = standard_height(pp, dp->id);
+ PNG_CONST png_uint_32 width = standard_width(pp, dp->id);
+ PNG_CONST size_t cbRow = dp->cbRow;
+ int pass;
+
+ for (pass=0; pass<npasses; ++pass)
+ {
+ png_uint_32 y;
+ png_uint_32 wPass = PNG_PASS_COLS(width, pass);
+ png_bytep pRow1 = pImage;
+ png_bytep pRow2 = pDisplay;
+
+ for (y=0; y<height; ++y)
+ {
+ if (do_interlace)
+ {
+ /* wPass may be zero or this row may not be in this pass.
+ * png_read_row must not be called in either case.
+ */
+ if (wPass > 0 && PNG_ROW_IN_INTERLACE_PASS(y, pass))
+ {
+ /* Read the row into a pair of temporary buffers, then do the
+ * merge here into the output rows.
+ */
+ png_byte row[STANDARD_ROWMAX], display[STANDARD_ROWMAX];
+
+ /* The following aids (to some extent) error detection - we can
+ * see where png_read_row wrote. Use opposite values in row and
+ * display to make this easier.
+ */
+ memset(row, 0xff, sizeof row);
+ memset(display, 0, sizeof display);
+
+ png_read_row(pp, row, display);
+
+ if (pRow1 != NULL)
+ deinterlace_row(pRow1, row, dp->pixel_size, dp->w, pass);
+
+ if (pRow2 != NULL)
+ deinterlace_row(pRow2, display, dp->pixel_size, dp->w, pass);
+ }
+ }
+ else
+ png_read_row(pp, pRow1, pRow2);
+
+ if (pRow1 != NULL)
+ pRow1 += cbRow;
+
+ if (pRow2 != NULL)
+ pRow2 += cbRow;
+ }
+ }
+
+ /* And finish the read operation (only really necessary if the caller wants
+ * to find additional data in png_info from chunks after the last IDAT.)
+ */
+ png_read_end(pp, pi);
+}
+
+static void
+standard_row_validate(standard_display *dp, png_structp pp, png_const_bytep row,
+ png_const_bytep display, png_uint_32 y)
+{
+ png_byte std[STANDARD_ROWMAX];
+
+ memset(std, 0xff, sizeof std);
+ standard_row(pp, std, dp->id, y);
+
+ /* At the end both the 'row' and 'display' arrays should end up identical.
+ * In earlier passes 'row' will be partially filled in, with only the pixels
+ * that have been read so far, but 'display' will have those pixels
+ * replicated to fill the unread pixels while reading an interlaced image.
+ * The side effect inside the libpng sequential reader is that the 'row'
+ * array retains the correct values for unwritten pixels within the row
+ * bytes, while the 'display' array gets bits off the end of the image (in
+ * the last byte) trashed. Unfortunately in the progressive reader the
+ * row bytes are always trashed, so we always do a pixel_cmp here even though
+ * a memcmp of all cbRow bytes will succeed for the sequential reader.
+ */
+ if (row != NULL && pixel_cmp(std, row, dp->bit_width) != 0)
+ {
+ char msg[64];
+ sprintf(msg, "PNG image row %d changed", y);
+ png_error(pp, msg);
+ }
+
+ /* In this case use pixel_cmp because we need to compare a partial
+ * byte at the end of the row if the row is not an exact multiple
+ * of 8 bits wide.
+ */
+ if (display != NULL && pixel_cmp(std, display, dp->bit_width) != 0)
+ {
+ char msg[64];
+ sprintf(msg, "display row %d changed", y);
+ png_error(pp, msg);
+ }
+}
+
+static void
+standard_image_validate(standard_display *dp, png_structp pp,
+ png_const_bytep pImage, png_const_bytep pDisplay)
+{
+ png_uint_32 y;
+
+ for (y=0; y<dp->h; ++y)
+ {
+ standard_row_validate(dp, pp, pImage, pDisplay, y);
+
+ if (pImage != NULL)
+ pImage += dp->cbRow;
+
+ if (pDisplay != NULL)
+ pDisplay += dp->cbRow;
+ }
+
+ /* This avoids false positives if the validation code is never called! */
+ dp->ps->validated = 1;
+}
+
+static void
+standard_end(png_structp pp, png_infop pi)
+{
+ standard_display *dp = png_get_progressive_ptr(pp);
+
+ UNUSED(pi)
+
+ /* Validate the image - progressive reading only produces one variant for
+ * interlaced images.
+ */
+ standard_image_validate(dp, pp, dp->ps->image, NULL);
+}
+
+/* A single test run checking the standard image to ensure it is not damaged. */
+static void
+standard_test(png_store* PNG_CONST psIn, png_uint_32 PNG_CONST id,
+ int do_interlace)
+{
+ standard_display d;
+ context(psIn, fault);
+
+ /* Set up the display (stack frame) variables from the arguments to the
+ * function and initialize the locals that are filled in later.
+ */
+ standard_display_init(&d, psIn, id, do_interlace);
+
+ /* Everything is protected by a Try/Catch. The functions called also
+ * typically have local Try/Catch blocks.
+ */
+ Try
+ {
+ png_structp pp;
+ png_infop pi;
+
+ /* Get a png_struct for reading the image. This will throw an error if it
+ * fails, so we don't need to check the result.
+ */
+ pp = set_store_for_read(d.ps, &pi, d.id,
+ d.do_interlace ? (d.ps->progressive ?
+ "pngvalid progressive deinterlacer" :
+ "pngvalid sequential deinterlacer") : (d.ps->progressive ?
+ "progressive reader" : "sequential reader"));
+
+ /* Introduce the correct read function. */
+ if (d.ps->progressive)
+ {
+ png_set_progressive_read_fn(pp, &d, standard_info, progressive_row,
+ standard_end);
+
+ /* Now feed data into the reader until we reach the end: */
+ store_progressive_read(d.ps, pp, pi);
+ }
+ else
+ {
+ /* Note that this takes the store, not the display. */
+ png_set_read_fn(pp, d.ps, store_read);
+
+ /* Check the header values: */
+ png_read_info(pp, pi);
+
+ /* The code tests both versions of the images that the sequential
+ * reader can produce.
+ */
+ standard_info_imp(&d, pp, pi, 2 /*images*/);
+
+ /* Need the total bytes in the image below; we can't get to this point
+ * unless the PNG file values have been checked against the expected
+ * values.
+ */
+ {
+ PNG_CONST png_bytep pImage = d.ps->image;
+ PNG_CONST png_bytep pDisplay = pImage + d.cbRow * d.h;
+
+ sequential_row(&d, pp, pi, pImage, pDisplay);
+
+ /* After the last pass loop over the rows again to check that the
+ * image is correct.
+ */
+ standard_image_validate(&d, pp, pImage, pDisplay);
+ }
+ }
+
+ /* Check for validation. */
+ if (!d.ps->validated)
+ png_error(pp, "image read failed silently");
+
+ /* Successful completion. */
+ }
+
+ Catch(fault)
+ d.ps = fault; /* make sure this hasn't been clobbered. */
+
+ /* In either case clean up the store. */
+ store_read_reset(d.ps);
+}
+
+static int
+test_standard(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type,
+ int bdlo, int PNG_CONST bdhi)
+{
+ for (; bdlo <= bdhi; ++bdlo)
+ {
+ int interlace_type;
+
+ for (interlace_type = PNG_INTERLACE_NONE;
+ interlace_type < PNG_INTERLACE_LAST; ++interlace_type)
+ {
+ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
+ interlace_type, 0, 0, 0), 0/*do_interlace*/);
+
+ if (fail(pm))
+ return 0;
+ }
+ }
+
+ return 1; /* keep going */
+}
+
+static void
+perform_standard_test(png_modifier *pm)
+{
+ /* Test each colour type over the valid range of bit depths (expressed as
+ * log2(bit_depth) in turn, stop as soon as any error is detected.
+ */
+ if (!test_standard(pm, 0, 0, READ_BDHI))
+ return;
+
+ if (!test_standard(pm, 2, 3, READ_BDHI))
+ return;
+
+ if (!test_standard(pm, 3, 0, 3))
+ return;
+
+ if (!test_standard(pm, 4, 3, READ_BDHI))
+ return;
+
+ if (!test_standard(pm, 6, 3, READ_BDHI))
+ return;
+}
+
+
+/********************************** SIZE TESTS ********************************/
+static int
+test_size(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type,
+ int bdlo, int PNG_CONST bdhi)
+{
+ /* Run the tests on each combination.
+ *
+ * NOTE: on my 32 bit x86 each of the following blocks takes
+ * a total of 3.5 seconds if done across every combo of bit depth
+ * width and height. This is a waste of time in practice, hence the
+ * hinc and winc stuff:
+ */
+ static PNG_CONST png_byte hinc[] = {1, 3, 11, 1, 5};
+ static PNG_CONST png_byte winc[] = {1, 9, 5, 7, 1};
+ for (; bdlo <= bdhi; ++bdlo)
+ {
+ png_uint_32 h, w;
+
+ for (h=1; h<=16; h+=hinc[bdlo]) for (w=1; w<=16; w+=winc[bdlo])
+ {
+ /* First test all the 'size' images against the sequential
+ * reader using libpng to deinterlace (where required.) This
+ * validates the write side of libpng. There are four possibilities
+ * to validate.
+ */
+ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
+ PNG_INTERLACE_NONE, w, h, 0), 0/*do_interlace*/);
+
+ if (fail(pm))
+ return 0;
+
+ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
+ PNG_INTERLACE_NONE, w, h, 1), 0/*do_interlace*/);
+
+ if (fail(pm))
+ return 0;
+
+ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
+ PNG_INTERLACE_ADAM7, w, h, 0), 0/*do_interlace*/);
+
+ if (fail(pm))
+ return 0;
+
+ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
+ PNG_INTERLACE_ADAM7, w, h, 1), 0/*do_interlace*/);
+
+ if (fail(pm))
+ return 0;
+
+ /* Now validate the interlaced read side - do_interlace true,
+ * in the progressive case this does actually make a difference
+ * to the code used in the non-interlaced case too.
+ */
+ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
+ PNG_INTERLACE_NONE, w, h, 0), 1/*do_interlace*/);
+
+ if (fail(pm))
+ return 0;
+
+ standard_test(&pm->this, FILEID(colour_type, DEPTH(bdlo),
+ PNG_INTERLACE_ADAM7, w, h, 0), 1/*do_interlace*/);
+
+ if (fail(pm))
+ return 0;
+ }
+ }
+
+ return 1; /* keep going */
+}
+
+static void
+perform_size_test(png_modifier *pm)
+{
+ /* Test each colour type over the valid range of bit depths (expressed as
+ * log2(bit_depth) in turn, stop as soon as any error is detected.
+ */
+ if (!test_size(pm, 0, 0, READ_BDHI))
+ return;
+
+ if (!test_size(pm, 2, 3, READ_BDHI))
+ return;
+
+ /* For the moment don't do the palette test - it's a waste of time when
+ * compared to the greyscale test.
+ */
+#if 0
+ if (!test_size(pm, 3, 0, 3))
+ return;
+#endif
+
+ if (!test_size(pm, 4, 3, READ_BDHI))
+ return;
+
+ if (!test_size(pm, 6, 3, READ_BDHI))
+ return;
+}
+
+
+/******************************* TRANSFORM TESTS ******************************/
+/* A set of tests to validate libpng image transforms. The possibilities here
+ * are legion because the transforms can be combined in a combinatorial
+ * fashion. To deal with this some measure of restraint is required, otherwise
+ * the tests would take forever.
+ */
+typedef struct image_pixel
+{
+ /* A local (pngvalid) representation of a PNG pixel, in all its
+ * various forms.
+ */
+ unsigned int red, green, blue, alpha; /* For non-palette images. */
+ unsigned int palette_index; /* For a palette image. */
+ png_byte colour_type; /* As in the spec. */
+ png_byte bit_depth; /* Defines bit size in row */
+ png_byte sample_depth; /* Scale of samples */
+ int have_tRNS; /* tRNS chunk may need processing */
+
+ /* For checking the code calculates double precision floating point values
+ * along with an error value, accumulated from the transforms. Because an
+ * sBIT setting allows larger error bounds (indeed, by the spec, apparently
+ * up to just less than +/-1 in the scaled value) the *lowest* sBIT for each
+ * channel is stored. This sBIT value is folded in to the stored error value
+ * at the end of the application of the transforms to the pixel.
+ */
+ double redf, greenf, bluef, alphaf;
+ double rede, greene, bluee, alphae;
+ png_byte red_sBIT, green_sBIT, blue_sBIT, alpha_sBIT;
+} image_pixel;
+
+/* Shared utility function, see below. */
+static void
+image_pixel_setf(image_pixel *this, unsigned int max)
+{
+ this->redf = this->red / (double)max;
+ this->greenf = this->green / (double)max;
+ this->bluef = this->blue / (double)max;
+ this->alphaf = this->alpha / (double)max;
+
+ if (this->red < max)
+ this->rede = this->redf * DBL_EPSILON;
+ else
+ this->rede = 0;
+ if (this->green < max)
+ this->greene = this->greenf * DBL_EPSILON;
+ else
+ this->greene = 0;
+ if (this->blue < max)
+ this->bluee = this->bluef * DBL_EPSILON;
+ else
+ this->bluee = 0;
+ if (this->alpha < max)
+ this->alphae = this->alphaf * DBL_EPSILON;
+ else
+ this->alphae = 0;
+}
+
+/* Initialize the structure for the next pixel - call this before doing any
+ * transforms and call it for each pixel since all the fields may need to be
+ * reset.
+ */
+static void
+image_pixel_init(image_pixel *this, png_const_bytep row, png_byte colour_type,
+ png_byte bit_depth, png_uint_32 x, standard_palette palette)
+{
+ PNG_CONST png_byte sample_depth = (png_byte)(colour_type ==
+ PNG_COLOR_TYPE_PALETTE ? 8 : bit_depth);
+ PNG_CONST unsigned int max = (1U<<sample_depth)-1;
+
+ /* Initially just set everything to the same number and the alpha to opaque.
+ * Note that this currently assumes a simple palette where entry x has colour
+ * rgb(x,x,x)!
+ */
+ this->palette_index = this->red = this->green = this->blue =
+ sample(row, colour_type, bit_depth, x, 0);
+ this->alpha = max;
+ this->red_sBIT = this->green_sBIT = this->blue_sBIT = this->alpha_sBIT =
+ sample_depth;
+
+ /* Then override as appropriate: */
+ if (colour_type == 3) /* palette */
+ {
+ /* This permits the caller to default to the sample value. */
+ if (palette != 0)
+ {
+ PNG_CONST unsigned int i = this->palette_index;
+
+ this->red = palette[i].red;
+ this->green = palette[i].green;
+ this->blue = palette[i].blue;
+ this->alpha = palette[i].alpha;
+ }
+ }
+
+ else /* not palette */
+ {
+ unsigned int i = 0;
+
+ if (colour_type & 2)
+ {
+ this->green = sample(row, colour_type, bit_depth, x, 1);
+ this->blue = sample(row, colour_type, bit_depth, x, 2);
+ i = 2;
+ }
+ if (colour_type & 4)
+ this->alpha = sample(row, colour_type, bit_depth, x, ++i);
+ }
+
+ /* Calculate the scaled values, these are simply the values divided by
+ * 'max' and the error is initialized to the double precision epsilon value
+ * from the header file.
+ */
+ image_pixel_setf(this, max);
+
+ /* Store the input information for use in the transforms - these will
+ * modify the information.
+ */
+ this->colour_type = colour_type;
+ this->bit_depth = bit_depth;
+ this->sample_depth = sample_depth;
+ this->have_tRNS = 0;
+}
+
+/* Convert a palette image to an rgb image. This necessarily converts the tRNS
+ * chunk at the same time, because the tRNS will be in palette form.
+ */
+static void
+image_pixel_convert_PLTE(image_pixel *this, const standard_display *display)
+{
+ if (this->colour_type == PNG_COLOR_TYPE_PALETTE)
+ {
+ PNG_CONST unsigned int i = this->palette_index;
+
+ this->bit_depth = this->sample_depth;
+ this->red = display->palette[i].red;
+ this->green = display->palette[i].green;
+ this->blue = display->palette[i].blue;
+ this->red_sBIT = display->red_sBIT;
+ this->green_sBIT = display->green_sBIT;
+ this->blue_sBIT = display->blue_sBIT;
+
+ if (this->have_tRNS)
+ {
+ this->alpha = display->palette[i].alpha;
+ this->colour_type = PNG_COLOR_TYPE_RGB_ALPHA;
+ this->have_tRNS = 0;
+ }
+ else
+ {
+ this->alpha = 255;
+ this->colour_type = PNG_COLOR_TYPE_RGB;
+ }
+ this->alpha_sBIT = 8;
+
+ /* And regenerate the scaled values and all the errors, which are now set
+ * back to the initial values.
+ */
+ image_pixel_setf(this, 255);
+ }
+}
+
+/* Add an alpha channel, this will glom in the tRNS information because tRNS is
+ * not valid in an alpha image. The bit depth will invariably be set to at
+ * least 8. Palette images will be converted to alpha (using the above API).
+ */
+static void
+image_pixel_add_alpha(image_pixel *this, const standard_display *display)
+{
+ if (this->colour_type == PNG_COLOR_TYPE_PALETTE)
+ image_pixel_convert_PLTE(this, display);
+
+ if ((this->colour_type & PNG_COLOR_MASK_ALPHA) == 0)
+ {
+ if (this->colour_type == PNG_COLOR_TYPE_GRAY)
+ {
+ if (this->bit_depth < 8)
+ this->bit_depth = 8;
+
+ if (this->have_tRNS)
+ {
+ this->have_tRNS = 0;
+
+ /* Check the input, original, channel value here against the
+ * original tRNS gray chunk valie.
+ */
+ if (this->red == display->transparent.red)
+ this->alphaf = 0;
+ else
+ this->alphaf = 1;
+ }
+ else
+ this->alphaf = 1;
+
+ this->colour_type = PNG_COLOR_TYPE_GRAY_ALPHA;
+ }
+
+ else if (this->colour_type == PNG_COLOR_TYPE_RGB)
+ {
+ if (this->have_tRNS)
+ {
+ this->have_tRNS = 0;
+
+ /* Again, check the exact input values, not the current transformed
+ * value!
+ */
+ if (this->red == display->transparent.red &&
+ this->green == display->transparent.green &&
+ this->blue == display->transparent.blue)
+ this->alphaf = 0;
+ else
+ this->alphaf = 1;
+
+ this->colour_type = PNG_COLOR_TYPE_RGB_ALPHA;
+ }
+ }
+
+ /* The error in the alpha is zero and the sBIT value comes from the
+ * original sBIT data (actually it will always be the original bit depth).
+ */
+ this->alphae = 0;
+ this->alpha_sBIT = display->alpha_sBIT;
+ }
+}
+
+struct transform_display;
+typedef struct image_transform
+{
+ /* The name of this transform: a string. */
+ PNG_CONST char *name;
+
+ /* Each transform can be disabled from the command line: */
+ int enable;
+
+ /* The global list of transforms; read only. */
+ struct image_transform *PNG_CONST list;
+
+ /* The global count of the number of times this transform has been set on an
+ * image.
+ */
+ unsigned int global_use;
+
+ /* The local count of the number of times this transform has been set. */
+ unsigned int local_use;
+
+ /* The next transform in the list, each transform must call its own next
+ * transform after it has processed the pixel successfully.
+ */
+ PNG_CONST struct image_transform *next;
+
+ /* A single transform for the image, expressed as a series of function
+ * callbacks and some space for values.
+ *
+ * First a callback to set the transform on the current png_read_struct:
+ */
+ void (*set)(PNG_CONST struct image_transform *this,
+ struct transform_display *that, png_structp pp, png_infop pi);
+
+ /* Then a transform that takes an input pixel in one PNG format or another
+ * and modifies it by a pngvalid implementation of the transform (thus
+ * duplicating the libpng intent without, we hope, duplicating the bugs
+ * in the libpng implementation!) The png_structp is solely to allow error
+ * reporting via png_error and png_warning.
+ */
+ void (*mod)(PNG_CONST struct image_transform *this, image_pixel *that,
+ png_structp pp, PNG_CONST struct transform_display *display);
+
+ /* Add this transform to the list and return true if the transform is
+ * meaningful for this colour type and bit depth - if false then the
+ * transform should have no effect on the image so there's not a lot of
+ * point running it.
+ */
+ int (*add)(struct image_transform *this,
+ PNG_CONST struct image_transform **that, png_byte colour_type,
+ png_byte bit_depth);
+} image_transform;
+
+typedef struct transform_display
+{
+ standard_display this;
+
+ /* Parameters */
+ png_modifier* pm;
+ PNG_CONST image_transform* transform_list;
+
+ /* Local variables */
+ png_byte output_colour_type;
+ png_byte output_bit_depth;
+} transform_display;
+
+/* Two functions to end the list: */
+static void
+image_transform_set_end(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ UNUSED(this)
+ UNUSED(that)
+ UNUSED(pp)
+ UNUSED(pi)
+}
+
+/* At the end of the list recalculate the output image pixel value from the
+ * double precision values set up by the preceding 'mod' calls:
+ */
+static unsigned int
+sample_scale(double sample_value, unsigned int scale)
+{
+ sample_value = floor(sample_value * scale + .5);
+
+ /* Return NaN as 0: */
+ if (!(sample_value > 0))
+ sample_value = 0;
+ else if (sample_value > scale)
+ sample_value = scale;
+
+ return (unsigned int)sample_value;
+}
+
+static void
+image_transform_mod_end(PNG_CONST image_transform *this, image_pixel *that,
+ png_structp pp, PNG_CONST transform_display *display)
+{
+ PNG_CONST unsigned int scale = (1U<<that->sample_depth)-1;
+
+ UNUSED(this)
+ UNUSED(pp)
+ UNUSED(display)
+
+ /* At the end recalculate the digitized red green and blue values according
+ * to the current sample_depth of the pixel.
+ *
+ * The sample value is simply scaled to the maximum, checking for over
+ * and underflow (which can both happen for some image transforms,
+ * including simple size scaling, though libpng doesn't do that at present.
+ */
+ that->red = sample_scale(that->redf, scale);
+
+ /* The error value is increased, at the end, according to the lowest sBIT
+ * value seen. Common sense tells us that the intermediate integer
+ * representations are no more accurate than +/- 0.5 in the integral values,
+ * the sBIT allows the implementation to be worse than this. In addition the
+ * PNG specification actually permits any error within the range (-1..+1),
+ * but that is ignored here. Instead the final digitized value is compared,
+ * below to the digitized value of the error limits - this has the net effect
+ * of allowing (almost) +/-1 in the output value. It's difficult to see how
+ * any algorithm that digitizes intermediate results can be more accurate.
+ */
+ that->rede += 1./(2*((1U<<that->red_sBIT)-1));
+
+ if (that->colour_type & PNG_COLOR_MASK_COLOR)
+ {
+ that->green = sample_scale(that->greenf, scale);
+ that->blue = sample_scale(that->bluef, scale);
+ that->greene += 1./(2*((1U<<that->green_sBIT)-1));
+ that->bluee += 1./(2*((1U<<that->blue_sBIT)-1));
+ }
+ else
+ {
+ that->blue = that->green = that->red;
+ that->bluef = that->greenf = that->redf;
+ that->bluee = that->greene = that->rede;
+ }
+
+ if ((that->colour_type & PNG_COLOR_MASK_ALPHA) ||
+ that->colour_type == PNG_COLOR_TYPE_PALETTE)
+ {
+ that->alpha = sample_scale(that->alphaf, scale);
+ that->alphae += 1./(2*((1U<<that->alpha_sBIT)-1));
+ }
+ else
+ {
+ that->alpha = scale; /* opaque */
+ that->alpha = 1; /* Override this. */
+ that->alphae = 0; /* It's exact ;-) */
+ }
+}
+
+/* Static 'end' structure: */
+static image_transform image_transform_end =
+{
+ "(end)", /* name */
+ 1, /* enable */
+ 0, /* list */
+ 0, /* global_use */
+ 0, /* local_use */
+ 0, /* next */
+ image_transform_set_end,
+ image_transform_mod_end,
+ 0 /* never called, I want it to crash if it is! */
+};
+
+/* Reader callbacks and implementations, where they differ from the standard
+ * ones.
+ */
+static void
+transform_display_init(transform_display *dp, png_modifier *pm, png_uint_32 id,
+ PNG_CONST image_transform *transform_list)
+{
+ /* Standard fields */
+ standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/);
+
+ /* Parameter fields */
+ dp->pm = pm;
+ dp->transform_list = transform_list;
+
+ /* Local variable fields */
+ dp->output_colour_type = 255; /* invalid */
+ dp->output_bit_depth = 255; /* invalid */
+}
+
+static void
+transform_info_imp(transform_display *dp, png_structp pp, png_infop pi)
+{
+ /* Reuse the standard stuff as appropriate. */
+ standard_info_part1(&dp->this, pp, pi);
+
+ /* Now set the list of transforms. */
+ dp->transform_list->set(dp->transform_list, dp, pp, pi);
+
+ /* Update the info structure for these transforms: */
+ png_read_update_info(pp, pi);
+
+ /* And get the output information into the standard_display */
+ standard_info_part2(&dp->this, pp, pi, 1/*images*/);
+
+ /* Plus the extra stuff we need for the transform tests: */
+ dp->output_colour_type = png_get_color_type(pp, pi);
+ dp->output_bit_depth = png_get_bit_depth(pp, pi);
+
+ /* Validate the combination of colour type and bit depth that we are getting
+ * out of libpng; the semantics of something not in the PNG spec are, at
+ * best, unclear.
+ */
+ switch (dp->output_colour_type)
+ {
+ case PNG_COLOR_TYPE_PALETTE:
+ if (dp->output_bit_depth > 8) goto error;
+ /*FALL THROUGH*/
+ case PNG_COLOR_TYPE_GRAY:
+ if (dp->output_bit_depth == 1 || dp->output_bit_depth == 2 ||
+ dp->output_bit_depth == 4)
+ break;
+ /*FALL THROUGH*/
+ default:
+ if (dp->output_bit_depth == 8 || dp->output_bit_depth == 16)
+ break;
+ /*FALL THROUGH*/
+ error:
+ {
+ char message[128];
+ size_t pos;
+
+ pos = safecat(message, sizeof message, 0,
+ "invalid final bit depth: colour type(");
+ pos = safecatn(message, sizeof message, pos, dp->output_colour_type);
+ pos = safecat(message, sizeof message, pos, ") with bit depth: ");
+ pos = safecatn(message, sizeof message, pos, dp->output_bit_depth);
+
+ png_error(pp, message);
+ }
+ }
+
+ /* Use a test pixel to check that the output agrees with what we expect -
+ * this avoids running the whole test if the output is unexpected.
+ */
+ {
+ image_pixel test_pixel;
+
+ memset(&test_pixel, 0, sizeof test_pixel);
+ test_pixel.colour_type = dp->this.colour_type; /* input */
+ test_pixel.bit_depth = dp->this.bit_depth;
+ if (test_pixel.colour_type == PNG_COLOR_TYPE_PALETTE)
+ test_pixel.sample_depth = 8;
+ else
+ test_pixel.sample_depth = test_pixel.bit_depth;
+ /* Don't need sBIT here */
+ test_pixel.have_tRNS = dp->this.is_transparent;
+
+ dp->transform_list->mod(dp->transform_list, &test_pixel, pp, dp);
+
+ if (test_pixel.colour_type != dp->output_colour_type)
+ {
+ char message[128];
+ size_t pos = safecat(message, sizeof message, 0, "colour type ");
+
+ pos = safecatn(message, sizeof message, pos, dp->output_colour_type);
+ pos = safecat(message, sizeof message, pos, " expected ");
+ pos = safecatn(message, sizeof message, pos, test_pixel.colour_type);
+
+ png_error(pp, message);
+ }
+
+ if (test_pixel.bit_depth != dp->output_bit_depth)
+ {
+ char message[128];
+ size_t pos = safecat(message, sizeof message, 0, "bit depth ");
+
+ pos = safecatn(message, sizeof message, pos, dp->output_bit_depth);
+ pos = safecat(message, sizeof message, pos, " expected ");
+ pos = safecatn(message, sizeof message, pos, test_pixel.bit_depth);
+
+ png_error(pp, message);
+ }
+
+ /* If both bit depth and colour type are correct check the sample depth.
+ * I believe these are both internal errors.
+ */
+ if (test_pixel.colour_type == PNG_COLOR_TYPE_PALETTE)
+ {
+ if (test_pixel.sample_depth != 8) /* oops - internal error! */
+ png_error(pp, "pngvalid: internal: palette sample depth not 8");
+ }
+ else if (test_pixel.sample_depth != dp->output_bit_depth)
+ {
+ char message[128];
+ size_t pos = safecat(message, sizeof message, 0,
+ "internal: sample depth ");
+
+ pos = safecatn(message, sizeof message, pos, dp->output_bit_depth);
+ pos = safecat(message, sizeof message, pos, " expected ");
+ pos = safecatn(message, sizeof message, pos, test_pixel.sample_depth);
+
+ png_error(pp, message);
+ }
+ }
+}
+
+static void
+transform_info(png_structp pp, png_infop pi)
+{
+ transform_info_imp(png_get_progressive_ptr(pp), pp, pi);
+}
+
+static void
+transform_range_check(png_structp pp, unsigned int r, unsigned int g,
+ unsigned int b, unsigned int a, unsigned int in_digitized, double in,
+ unsigned int out, png_byte sample_depth, double err, PNG_CONST char *name)
+{
+ /* Compare the scaled, digitzed, values of our local calculation (in+-err)
+ * with the digitized values libpng produced; 'sample_depth' is the actual
+ * digitization depth of the libpng output colors (the bit depth except for
+ * palette images where it is always 8.)
+ */
+ unsigned int max = (1U<<sample_depth)-1;
+ double in_min = ceil((in-err)*max - .5);
+ double in_max = floor((in+err)*max + .5);
+ if (!(out >= in_min && out <= in_max))
+ {
+ char message[256];
+ size_t pos;
+
+ pos = safecat(message, sizeof message, 0, name);
+ pos = safecat(message, sizeof message, pos, " output value error: rgba(");
+ pos = safecatn(message, sizeof message, pos, r);
+ pos = safecat(message, sizeof message, pos, ",");
+ pos = safecatn(message, sizeof message, pos, g);
+ pos = safecat(message, sizeof message, pos, ",");
+ pos = safecatn(message, sizeof message, pos, b);
+ pos = safecat(message, sizeof message, pos, ",");
+ pos = safecatn(message, sizeof message, pos, a);
+ pos = safecat(message, sizeof message, pos, "): ");
+ pos = safecatn(message, sizeof message, pos, out);
+ pos = safecat(message, sizeof message, pos, " expected: ");
+ pos = safecatn(message, sizeof message, pos, in_digitized);
+ pos = safecat(message, sizeof message, pos, " (");
+ pos = safecatd(message, sizeof message, pos, (in-err)*max, 3);
+ pos = safecat(message, sizeof message, pos, "..");
+ pos = safecatd(message, sizeof message, pos, (in+err)*max, 3);
+ pos = safecat(message, sizeof message, pos, ")");
+
+ png_error(pp, message);
+ }
+}
+
+static void
+transform_image_validate(transform_display *dp, png_structp pp, png_infop pi,
+ png_const_bytep pRow)
+{
+ /* Constants for the loop below: */
+ PNG_CONST png_byte in_ct = dp->this.colour_type;
+ PNG_CONST png_byte in_bd = dp->this.bit_depth;
+ PNG_CONST png_uint_32 w = dp->this.w;
+ PNG_CONST png_uint_32 h = dp->this.h;
+ PNG_CONST size_t cbRow = dp->this.cbRow;
+ PNG_CONST png_byte out_ct = dp->output_colour_type;
+ PNG_CONST png_byte out_bd = dp->output_bit_depth;
+ PNG_CONST png_byte sample_depth = (png_byte)(out_ct ==
+ PNG_COLOR_TYPE_PALETTE ? 8 : out_bd);
+ PNG_CONST png_byte red_sBIT = dp->this.red_sBIT;
+ PNG_CONST png_byte green_sBIT = dp->this.green_sBIT;
+ PNG_CONST png_byte blue_sBIT = dp->this.blue_sBIT;
+ PNG_CONST png_byte alpha_sBIT = dp->this.alpha_sBIT;
+ PNG_CONST int have_tRNS = dp->this.is_transparent;
+
+ standard_palette out_palette;
+ png_uint_32 y;
+
+ UNUSED(pi)
+
+ /* Read the palette corresponding to the output if the output colour type
+ * indicates a palette, othewise set out_palette to garbage.
+ */
+ if (out_ct == PNG_COLOR_TYPE_PALETTE)
+ (void)standard_palette_init(out_palette, pp, pi);
+ else
+ memset(out_palette, 0x5e, sizeof out_palette);
+
+ for (y=0; y<h; ++y, pRow += cbRow)
+ {
+ png_uint_32 x;
+
+ /* The original, standard, row pre-transforms. */
+ png_byte std[STANDARD_ROWMAX];
+
+ transform_row(pp, std, in_ct, in_bd, y);
+
+ /* Go through each original pixel transforming it and comparing with what
+ * libpng did to the same pixel.
+ */
+ for (x=0; x<w; ++x)
+ {
+ image_pixel in_pixel, out_pixel;
+ unsigned int r, g, b, a;
+
+ /* Find out what we think the pixel should be: */
+ image_pixel_init(&in_pixel, std, in_ct, in_bd, x, dp->this.palette);
+
+ in_pixel.red_sBIT = red_sBIT;
+ in_pixel.green_sBIT = green_sBIT;
+ in_pixel.blue_sBIT = blue_sBIT;
+ in_pixel.alpha_sBIT = alpha_sBIT;
+ in_pixel.have_tRNS = have_tRNS;
+
+ /* For error detection, below. */
+ r = in_pixel.red;
+ g = in_pixel.green;
+ b = in_pixel.blue;
+ a = in_pixel.alpha;
+
+ dp->transform_list->mod(dp->transform_list, &in_pixel, pp, dp);
+
+ /* Read the output pixel and compare it to what we got, we don't
+ * use the error field here, so no need to update sBIT.
+ */
+ image_pixel_init(&out_pixel, pRow, out_ct, out_bd, x, out_palette);
+
+ /* We don't expect changes to the index here even if the bit depth is
+ * changed.
+ */
+ if (in_ct == PNG_COLOR_TYPE_PALETTE &&
+ out_ct == PNG_COLOR_TYPE_PALETTE)
+ {
+ if (in_pixel.palette_index != out_pixel.palette_index)
+ png_error(pp, "unexpected transformed palette index");
+ }
+
+ /* Check the colours for palette images too - in fact the palette could
+ * be separately verified itself in most cases.
+ */
+ if (in_pixel.red != out_pixel.red)
+ transform_range_check(pp, r, g, b, a, in_pixel.red, in_pixel.redf,
+ out_pixel.red, sample_depth, in_pixel.rede, "red/gray");
+
+ if ((out_ct & PNG_COLOR_MASK_COLOR) != 0 &&
+ in_pixel.green != out_pixel.green)
+ transform_range_check(pp, r, g, b, a, in_pixel.green,
+ in_pixel.greenf, out_pixel.green, sample_depth, in_pixel.greene,
+ "green");
+
+ if ((out_ct & PNG_COLOR_MASK_COLOR) != 0 &&
+ in_pixel.blue != out_pixel.blue)
+ transform_range_check(pp, r, g, b, a, in_pixel.blue, in_pixel.bluef,
+ out_pixel.blue, sample_depth, in_pixel.bluee, "blue");
+
+ if ((out_ct & PNG_COLOR_MASK_ALPHA) != 0 &&
+ in_pixel.alpha != out_pixel.alpha)
+ transform_range_check(pp, r, g, b, a, in_pixel.alpha,
+ in_pixel.alphaf, out_pixel.alpha, sample_depth, in_pixel.alphae,
+ "alpha");
+ } /* pixel (x) loop */
+ } /* row (y) loop */
+
+ /* Record that something was actually checked to avoid a false positive. */
+ dp->this.ps->validated = 1;
+}
+
+static void
+transform_end(png_structp pp, png_infop pi)
+{
+ transform_display *dp = png_get_progressive_ptr(pp);
+
+ transform_image_validate(dp, pp, pi, dp->this.ps->image);
+}
+
+/* A single test run. */
+static void
+transform_test(png_modifier *pmIn, PNG_CONST png_uint_32 idIn,
+ PNG_CONST image_transform* transform_listIn, PNG_CONST char *name)
+{
+ transform_display d;
+ context(&pmIn->this, fault);
+
+ transform_display_init(&d, pmIn, idIn, transform_listIn);
+
+ Try
+ {
+ png_structp pp;
+ png_infop pi;
+
+ /* Get a png_struct for writing the image. */
+ pp = set_modifier_for_read(d.pm, &pi, d.this.id, name);
+
+# if 0
+ /* Logging (debugging only) */
+ {
+ char buffer[256];
+
+ (void)store_message(&d.pm->this, pp, buffer, sizeof buffer, 0,
+ "running test");
+
+ fprintf(stderr, "%s\n", buffer);
+ }
+# endif
+
+ /* Introduce the correct read function. */
+ if (d.pm->this.progressive)
+ {
+ /* Share the row function with the standard implementation. */
+ png_set_progressive_read_fn(pp, &d, transform_info, progressive_row,
+ transform_end);
+
+ /* Now feed data into the reader until we reach the end: */
+ modifier_progressive_read(d.pm, pp, pi);
+ }
+ else
+ {
+ /* modifier_read expects a png_modifier* */
+ png_set_read_fn(pp, d.pm, modifier_read);
+
+ /* Check the header values: */
+ png_read_info(pp, pi);
+
+ /* Process the 'info' requirements. Only one image is generated */
+ transform_info_imp(&d, pp, pi);
+
+ sequential_row(&d.this, pp, pi, NULL, d.this.ps->image);
+
+ transform_image_validate(&d, pp, pi, d.this.ps->image);
+ }
+
+ modifier_reset(d.pm);
+ }
+
+ Catch(fault)
+ modifier_reset((png_modifier*)fault);
+}
+
+/* The transforms: */
+#define ITSTRUCT(name) image_transform_##name
+#define IT(name,prev)\
+static image_transform ITSTRUCT(name) =\
+{\
+ #name,\
+ 1, /*enable*/\
+ &ITSTRUCT(prev), /*list*/\
+ 0, /*global_use*/\
+ 0, /*local_use*/\
+ 0, /*next*/\
+ image_transform_png_set_##name##_set,\
+ image_transform_png_set_##name##_mod,\
+ image_transform_png_set_##name##_add\
+}
+
+/* To save code: */
+static int
+image_transform_default_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ UNUSED(colour_type)
+ UNUSED(bit_depth)
+
+ this->next = *that;
+ *that = this;
+
+ return 1;
+}
+
+/* png_set_palette_to_rgb */
+static void
+image_transform_png_set_palette_to_rgb_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ png_set_palette_to_rgb(pp);
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_palette_to_rgb_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ if (that->colour_type == PNG_COLOR_TYPE_PALETTE)
+ image_pixel_convert_PLTE(that, &display->this);
+
+ this->next->mod(this->next, that, pp, display);
+}
+
+static int
+image_transform_png_set_palette_to_rgb_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ UNUSED(bit_depth)
+
+ this->next = *that;
+ *that = this;
+
+ return colour_type == PNG_COLOR_TYPE_PALETTE;
+}
+
+IT(palette_to_rgb, end);
+
+
+/* png_set_tRNS_to_alpha */
+static void
+image_transform_png_set_tRNS_to_alpha_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ png_set_tRNS_to_alpha(pp);
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_tRNS_to_alpha_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ /* LIBPNG BUG: this always forces palette images to RGB. */
+ if (that->colour_type == PNG_COLOR_TYPE_PALETTE)
+ image_pixel_convert_PLTE(that, &display->this);
+
+ /* This effectively does an 'expand' only if there is some transparency to
+ * covert to an alpha channel.
+ */
+ if (that->have_tRNS)
+ image_pixel_add_alpha(that, &display->this);
+
+ /* LIBPNG BUG: otherwise libpng still expands to 8 bits! */
+ else
+ {
+ if (that->bit_depth < 8)
+ that->bit_depth =8;
+ if (that->sample_depth < 8)
+ that->sample_depth = 8;
+ }
+
+ this->next->mod(this->next, that, pp, display);
+}
+
+static int
+image_transform_png_set_tRNS_to_alpha_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ UNUSED(bit_depth)
+
+ this->next = *that;
+ *that = this;
+
+ /* We don't know yet whether there will be a tRNS chunk, but we know that
+ * this transformation should do nothing if there already is an alpha
+ * channel.
+ */
+ return (colour_type & PNG_COLOR_MASK_ALPHA) == 0;
+}
+
+IT(tRNS_to_alpha,palette_to_rgb);
+
+/* png_set_gray_to_rgb */
+static void
+image_transform_png_set_gray_to_rgb_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ png_set_gray_to_rgb(pp);
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_gray_to_rgb_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ /* NOTE: we can actually pend the tRNS processing at this point because we
+ * can correctly recognize the original pixel value even though we have
+ * mapped the one gray channel to the three RGB ones, but in fact libpng
+ * doesn't do this, so we don't either.
+ */
+ if ((that->colour_type & PNG_COLOR_MASK_COLOR) == 0 && that->have_tRNS)
+ image_pixel_add_alpha(that, &display->this);
+
+ /* Simply expand the bit depth and alter the colour type as required. */
+ if (that->colour_type == PNG_COLOR_TYPE_GRAY)
+ {
+ /* RGB images have a bit depth at least equal to '8' */
+ if (that->bit_depth < 8)
+ that->sample_depth = that->bit_depth = 8;
+
+ /* And just changing the colour type works here because the green and blue
+ * channels are being maintained in lock-step with the red/gray:
+ */
+ that->colour_type = PNG_COLOR_TYPE_RGB;
+ }
+
+ else if (that->colour_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ that->colour_type = PNG_COLOR_TYPE_RGB_ALPHA;
+
+ this->next->mod(this->next, that, pp, display);
+}
+
+static int
+image_transform_png_set_gray_to_rgb_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ UNUSED(bit_depth)
+
+ this->next = *that;
+ *that = this;
+
+ return (colour_type & PNG_COLOR_MASK_COLOR) == 0;
+}
+
+IT(gray_to_rgb,tRNS_to_alpha);
+
+/* png_set_expand */
+static void
+image_transform_png_set_expand_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ png_set_expand(pp);
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_expand_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ /* The general expand case depends on what the colour type is: */
+ if (that->colour_type == PNG_COLOR_TYPE_PALETTE)
+ image_pixel_convert_PLTE(that, &display->this);
+ else if (that->bit_depth < 8) /* grayscale */
+ that->sample_depth = that->bit_depth = 8;
+
+ if (that->have_tRNS)
+ image_pixel_add_alpha(that, &display->this);
+
+ this->next->mod(this->next, that, pp, display);
+}
+
+static int
+image_transform_png_set_expand_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ UNUSED(bit_depth)
+
+ this->next = *that;
+ *that = this;
+
+ /* 'expand' should do nothing for RGBA or GA input - no tRNS and the bit
+ * depth is at least 8 already.
+ */
+ return (colour_type & PNG_COLOR_MASK_ALPHA) == 0;
+}
+
+IT(expand,gray_to_rgb);
+
+/* png_set_expand_gray_1_2_4_to_8
+ * LIBPNG BUG: this just does an 'expand'
+ */
+static void
+image_transform_png_set_expand_gray_1_2_4_to_8_set(
+ PNG_CONST image_transform *this, transform_display *that, png_structp pp,
+ png_infop pi)
+{
+ png_set_expand_gray_1_2_4_to_8(pp);
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_expand_gray_1_2_4_to_8_mod(
+ PNG_CONST image_transform *this, image_pixel *that, png_structp pp,
+ PNG_CONST transform_display *display)
+{
+ image_transform_png_set_expand_mod(this, that, pp, display);
+}
+
+static int
+image_transform_png_set_expand_gray_1_2_4_to_8_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ return image_transform_png_set_expand_add(this, that, colour_type,
+ bit_depth);
+}
+
+IT(expand_gray_1_2_4_to_8, expand);
+
+/* png_set_strip_16 */
+static void
+image_transform_png_set_strip_16_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ png_set_strip_16(pp);
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_strip_16_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ if (that->bit_depth == 16)
+ {
+ that->sample_depth = that->bit_depth = 8;
+ if (that->red_sBIT > 8) that->red_sBIT = 8;
+ if (that->green_sBIT > 8) that->green_sBIT = 8;
+ if (that->blue_sBIT > 8) that->blue_sBIT = 8;
+ if (that->alpha_sBIT > 8) that->alpha_sBIT = 8;
+
+# ifndef PNG_READ_16_TO_8_ACCURATE_SCALE_SUPPORTED
+ /* The strip 16 algoirithm drops the low 8 bits rather than calculating
+ * 1/257, so we need to adjust the permitted errors appropriately:
+ */
+ {
+ PNG_CONST double d = (255-128.5)/65535;
+ that->rede += d;
+ that->greene += d;
+ that->bluee += d;
+ that->alphae += d;
+ }
+# endif
+ }
+
+ this->next->mod(this->next, that, pp, display);
+}
+
+static int
+image_transform_png_set_strip_16_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ UNUSED(colour_type)
+
+ this->next = *that;
+ *that = this;
+
+ return bit_depth > 8;
+}
+
+IT(strip_16, expand_gray_1_2_4_to_8);
+
+/* png_set_strip_alpha */
+static void
+image_transform_png_set_strip_alpha_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ png_set_strip_alpha(pp);
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_strip_alpha_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ if (that->colour_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ that->colour_type = PNG_COLOR_TYPE_GRAY;
+ else if (that->colour_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ that->colour_type = PNG_COLOR_TYPE_RGB;
+
+ that->have_tRNS = 0;
+ that->alphaf = 1;
+ that->alphae = 0;
+
+ this->next->mod(this->next, that, pp, display);
+}
+
+static int
+image_transform_png_set_strip_alpha_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ UNUSED(bit_depth)
+
+ this->next = *that;
+ *that = this;
+
+ return (colour_type & PNG_COLOR_MASK_ALPHA) != 0;
+}
+
+IT(strip_alpha,strip_16);
+
+/* png_set_rgb_to_gray(png_structp, int err_action, double red, double green)
+ * png_set_rgb_to_gray_fixed(png_structp, int err_action, png_fixed_point red,
+ * png_fixed_point green)
+ * png_get_rgb_to_gray_status
+ *
+ * At present the APIs are simply tested using the 16.16 fixed point conversion
+ * values known to be used inside libpng:
+ *
+ * red: 6968
+ * green: 23434
+ * blue: 2366
+ *
+ * NOTE: this currently ignores the gamma because no gamma is being set, the
+ * tests on gamma need to happen in the gamma test set.
+ */
+static void
+image_transform_png_set_rgb_to_gray_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ PNG_CONST int error_action = 1; /* no error, no defines in png.h */
+
+# ifdef PNG_FLOATING_POINT_SUPPORTED
+ png_set_rgb_to_gray(pp, error_action, -1, -1);
+# else
+ png_set_rgb_to_gray_fixed(pp, error_action, -1, -1);
+# endif
+
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_rgb_to_gray_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ if ((that->colour_type & PNG_COLOR_MASK_COLOR) != 0)
+ {
+ if (that->colour_type == PNG_COLOR_TYPE_PALETTE)
+ image_pixel_convert_PLTE(that, &display->this);
+
+ /* Image now has RGB channels... */
+ that->bluef = that->greenf = that->redf = (that->redf * 6968 +
+ that->greenf * 23434 + that->bluef * 2366) / 32768;
+ that->bluee = that->greene = that->rede = (that->rede * 6968 +
+ that->greene * 23434 + that->bluee * 2366) / 32768 *
+ (1 + DBL_EPSILON * 6);
+
+ /* The sBIT is the minium of the three colour channel sBITs. */
+ if (that->red_sBIT > that->green_sBIT)
+ that->red_sBIT = that->green_sBIT;
+ if (that->red_sBIT > that->blue_sBIT)
+ that->red_sBIT = that->blue_sBIT;
+ that->blue_sBIT = that->green_sBIT = that->red_sBIT;
+
+ /* And zap the colour bit in the type: */
+ if (that->colour_type == PNG_COLOR_TYPE_RGB)
+ that->colour_type = PNG_COLOR_TYPE_GRAY;
+ else if (that->colour_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ that->colour_type = PNG_COLOR_TYPE_GRAY_ALPHA;
+ }
+
+ this->next->mod(this->next, that, pp, display);
+}
+
+static int
+image_transform_png_set_rgb_to_gray_add(image_transform *this,
+ PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
+{
+ UNUSED(bit_depth)
+
+ this->next = *that;
+ *that = this;
+
+ return (colour_type & PNG_COLOR_MASK_COLOR) != 0;
+}
+
+IT(rgb_to_gray,strip_alpha);
+
+/* png_set_background(png_structp, png_const_color_16p background_color,
+ * int background_gamma_code, int need_expand, double background_gamma)
+ * png_set_background_fixed(png_structp, png_const_color_16p background_color,
+ * int background_gamma_code, int need_expand,
+ * png_fixed_point background_gamma)
+ *
+ * As with rgb_to_gray this ignores the gamma.
+*/
+static void
+image_transform_png_set_background_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ png_color_16 back;
+
+ /* Since we don't know the output bit depth at this point we must use the
+ * input values and ask libpng to expand the chunk as required.
+ */
+ back.index = 255; /* Should not be used */
+ back.gray = back.blue = back.green = back.red =
+ (png_uint_16)((1U << that->this.bit_depth) >> 1);
+
+# ifdef PNG_FLOATING_POINT_SUPPORTED
+ png_set_background(pp, &back, PNG_BACKGROUND_GAMMA_FILE, 1, 0);
+# else
+ png_set_background_fixed(pp, &back, PNG_BACKGROUND_GAMMA_FILE, 1, 0);
+# endif
+
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_background_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ /* Check for tRNS first: */
+ if (that->have_tRNS && that->colour_type != PNG_COLOR_TYPE_PALETTE)
+ image_pixel_add_alpha(that, &display->this);
+
+ /* This is only necessary if the alpha value is less than 1. */
+ if (that->alphaf < 1)
+ {
+ /* Repeat the calculation above and scale the result: */
+ unsigned int tmp = (1U << display->this.bit_depth);
+ double component = (tmp >> 1)/(double)(tmp-1);
+
+ /* Now we do the background calculation without any gamma correction. */
+ if (that->alphaf <= 0)
+ {
+ that->bluef = that->greenf = that->redf = component;
+ that->bluee = that->greene = that->rede = component * DBL_EPSILON;
+ that->blue_sBIT = that->green_sBIT = that->red_sBIT = that->bit_depth;
+ }
+
+ else
+ {
+ component *= 1-that->alphaf;
+ that->redf = that->redf * that->alphaf + component;
+ that->rede = that->rede * that->alphaf + that->redf * 3 * DBL_EPSILON;
+ that->greenf = that->greenf * that->alphaf + component;
+ that->greene = that->greene * that->alphaf + that->greenf * 3 *
+ DBL_EPSILON;
+ that->bluef = that->bluef * that->alphaf + component;
+ that->bluee = that->bluee * that->alphaf + that->bluef * 3 *
+ DBL_EPSILON;
+ }
+
+ /* Remove the alpha type and set the alpha. */
+ that->alphaf = 1;
+ that->alphae = 0;
+
+ if (that->colour_type == PNG_COLOR_TYPE_RGB_ALPHA)
+ that->colour_type = PNG_COLOR_TYPE_RGB;
+ else if (that->colour_type == PNG_COLOR_TYPE_GRAY_ALPHA)
+ that->colour_type = PNG_COLOR_TYPE_GRAY;
+ }
+
+ this->next->mod(this->next, that, pp, display);
+}
+
+#define image_transform_png_set_background_add image_transform_default_add
+
+IT(background,rgb_to_gray);
+
+static image_transform *PNG_CONST image_transform_first = &ITSTRUCT(background);
+
+static void
+transform_enable(PNG_CONST char *name)
+{
+ /* Everything starts out enabled, so if we see an 'enable' disabled
+ * everything else the first time round.
+ */
+ static int all_disabled = 0;
+ int found_it = 0;
+ image_transform *list = image_transform_first;
+
+ while (list != &image_transform_end)
+ {
+ if (strcmp(list->name, name) == 0)
+ {
+ list->enable = 1;
+ found_it = 1;
+ }
+ else if (!all_disabled)
+ list->enable = 0;
+
+ list = list->list;
+ }
+
+ all_disabled = 1;
+
+ if (!found_it)
+ {
+ fprintf(stderr, "pngvalid: --transform-enable=%s: unknown transform\n",
+ name);
+ exit(1);
+ }
+}
+
+static void
+transform_disable(PNG_CONST char *name)
+{
+ image_transform *list = image_transform_first;
+
+ while (list != &image_transform_end)
+ {
+ if (strcmp(list->name, name) == 0)
+ {
+ list->enable = 0;
+ return;
+ }
+
+ list = list->list;
+ }
+
+ fprintf(stderr, "pngvalid: --transform-disable=%s: unknown transform\n",
+ name);
+ exit(1);
+}
+
+static void
+image_transform_reset_count(void)
+{
+ image_transform *next = image_transform_first;
+ int count = 0;
+
+ while (next != &image_transform_end)
+ {
+ next->local_use = 0;
+ next->next = 0;
+ next = next->list;
+ ++count;
+ }
+
+ /* This can only happen if we every have more than 32 transforms (excluding
+ * the end) in the list.
+ */
+ if (count > 32) abort();
+}
+
+static int
+image_transform_test_counter(png_uint_32 counter, unsigned int max)
+{
+ /* Test the list to see if there is any point contining, given a current
+ * counter and a 'max' value.
+ */
+ image_transform *next = image_transform_first;
+
+ while (next != &image_transform_end)
+ {
+ /* For max 0 or 1 continue until the counter overflows: */
+ counter >>= 1;
+
+ /* Continue if any entry hasn't reacked the max. */
+ if (max > 1 && next->local_use < max)
+ return 1;
+ next = next->list;
+ }
+
+ return max <= 1 && counter == 0;
+}
+
+static png_uint_32
+image_transform_add(PNG_CONST image_transform **this, unsigned int max,
+ png_uint_32 counter, char *name, size_t sizeof_name, size_t *pos,
+ png_byte colour_type, png_byte bit_depth)
+{
+ for (;;) /* until we manage to add something */
+ {
+ png_uint_32 mask;
+ image_transform *list;
+
+ /* Find the next counter value, if the counter is zero this is the start
+ * of the list. This routine always returns the current counter (not the
+ * next) so it returns 0 at the end and expects 0 at the beginning.
+ */
+ if (counter == 0) /* first time */
+ {
+ image_transform_reset_count();
+ if (max <= 1)
+ counter = 1;
+ else
+ counter = random_32();
+ }
+ else /* advance the counter */
+ {
+ switch (max)
+ {
+ case 0: ++counter; break;
+ case 1: counter <<= 1; break;
+ default: counter = random_32(); break;
+ }
+ }
+
+ /* Now add all these items, if possible */
+ *this = &image_transform_end;
+ list = image_transform_first;
+ mask = 1;
+
+ /* Go through the whole list adding anything that the counter selects: */
+ while (list != &image_transform_end)
+ {
+ if ((counter & mask) != 0 && list->enable &&
+ (max == 0 || list->local_use < max))
+ {
+ /* Candidate to add: */
+ if (list->add(list, this, colour_type, bit_depth) || max == 0)
+ {
+ /* Added, so add to the name too. */
+ *pos = safecat(name, sizeof_name, *pos, " +");
+ *pos = safecat(name, sizeof_name, *pos, list->name);
+ }
+
+ else
+ {
+ /* Not useful and max>0, so remvoe it from *this: */
+ *this = list->next;
+ list->next = 0;
+
+ /* And, since we know it isn't useful, stop it being added again
+ * in this run:
+ */
+ list->local_use = max;
+ }
+ }
+
+ mask <<= 1;
+ list = list->list;
+ }
+
+ /* Now if anything was added we have something to do. */
+ if (*this != &image_transform_end)
+ return counter;
+
+ /* Nothing added, but was there anything in there to add? */
+ if (!image_transform_test_counter(counter, max))
+ return 0;
+ }
+}
+
+#ifdef THIS_IS_THE_PROFORMA
+static void
+image_transform_png_set_@_set(PNG_CONST image_transform *this,
+ transform_display *that, png_structp pp, png_infop pi)
+{
+ png_set_@(pp);
+ this->next->set(this->next, that, pp, pi);
+}
+
+static void
+image_transform_png_set_@_mod(PNG_CONST image_transform *this,
+ image_pixel *that, png_structp pp, PNG_CONST transform_display *display)
+{
+ this->next->mod(this->next, that, pp, display);
+}
+
+static int
+image_transform_png_set_@_add(image_transform *this,
+ PNG_CONST image_transform **that, char *name, size_t sizeof_name,
+ size_t *pos, png_byte colour_type, png_byte bit_depth)
+{
+ this->next = *that;
+ *that = this;
+
+ *pos = safecat(name, sizeof_name, *pos, " +@");
+
+ return 1;
+}
+
+IT(@);
+#endif
+
+/* png_set_quantize(png_structp, png_colorp palette, int num_palette,
+ * int maximum_colors, png_const_uint_16p histogram, int full_quantize)
+ *
+ * Very difficult to validate this!
+ */
+/*NOTE: TBD NYI */
+
+/* The data layout transforms are handled by swapping our own channel data,
+ * necessarily these need to happen at the end of the transform list because the
+ * semantic of the channels changes after these are executed. Some of these,
+ * like set_shift and set_packing, can't be done at present because they change
+ * the layout of the data at the sub-sample level so sample() won't get the
+ * right answer.
+ */
+/* png_set_invert_alpha */
+/*NOTE: TBD NYI */
+
+/* png_set_bgr */
+/*NOTE: TBD NYI */
+
+/* png_set_swap_alpha */
+/*NOTE: TBD NYI */
+
+/* png_set_swap */
+/*NOTE: TBD NYI */
+
+/* png_set_filler, (png_structp png_ptr, png_uint_32 filler, int flags)); */
+/*NOTE: TBD NYI */
+
+/* png_set_add_alpha, (png_structp png_ptr, png_uint_32 filler, int flags)); */
+/*NOTE: TBD NYI */
+
+/* png_set_packing */
+/*NOTE: TBD NYI */
+
+/* png_set_packswap */
+/*NOTE: TBD NYI */
+
+/* png_set_invert_mono */
+/*NOTE: TBD NYI */
+
+/* png_set_shift(png_structp, png_const_color_8p true_bits) */
+/*NOTE: TBD NYI */
+
+static int
+test_transform(png_modifier* PNG_CONST pm, png_byte PNG_CONST colour_type,
+ int bdlo, int PNG_CONST bdhi, png_uint_32 max)
+{
+ for (; bdlo <= bdhi; ++bdlo)
+ {
+ PNG_CONST png_byte bit_depth = DEPTH(bdlo);
+ png_uint_32 counter = 0;
+ size_t base_pos;
+ char name[64];
+
+ base_pos = safecat(name, sizeof name, 0, "transform:");
+
+ for (;;)
+ {
+ size_t pos = base_pos;
+ PNG_CONST image_transform *list = 0;
+
+ counter = image_transform_add(&list, max, counter, name, sizeof name,
+ &pos, colour_type, bit_depth);
+
+ if (counter == 0)
+ break;
+
+ /* The command line can change this to checking interlaced images. */
+ transform_test(pm, FILEID(colour_type, bit_depth, pm->interlace_type,
+ 0, 0, 0), list, name);
+
+ if (fail(pm))
+ return 0;
+ }
+ }
+
+ return 1; /* keep going */
+}
+
+static void
+perform_transform_test(png_modifier *pm)
+{
+ /* Test each colour type over the valid range of bit depths (expressed as
+ * log2(bit_depth) in turn, stop as soon as any error is detected.
+ */
+ if (!test_transform(pm, 0, 0, READ_BDHI, 1))
+ return;
+
+ if (!test_transform(pm, 2, 3, READ_BDHI, 1))
+ return;
+
+ if (!test_transform(pm, 3, 0, 3, 1))
+ return;
+
+ if (!test_transform(pm, 4, 3, READ_BDHI, 1))
+ return;
+
+ if (!test_transform(pm, 6, 3, READ_BDHI, 1))
+ return;
+}
+
+
+/********************************* GAMMA TESTS ********************************/
+/* Gamma test images. */
+typedef struct gamma_modification
+{
+ png_modification this;
+ png_fixed_point gamma;
+} gamma_modification;
+
+static int
+gamma_modify(png_modifier *pm, png_modification *me, int add)
+{
+ UNUSED(add)
+ /* This simply dumps the given gamma value into the buffer. */
+ png_save_uint_32(pm->buffer, 4);
+ png_save_uint_32(pm->buffer+4, CHUNK_gAMA);
+ png_save_uint_32(pm->buffer+8, ((gamma_modification*)me)->gamma);
+ return 1;
+}
+
+static void
+gamma_modification_init(gamma_modification *me, png_modifier *pm, double gammad)
+{
+ double g;
+
+ modification_init(&me->this);
+ me->this.chunk = CHUNK_gAMA;
+ me->this.modify_fn = gamma_modify;
+ me->this.add = CHUNK_PLTE;
+ g = floor(gammad * 100000 + .5);
+ me->gamma = (png_fixed_point)g;
+ me->this.next = pm->modifications;
+ pm->modifications = &me->this;
+}
+
+typedef struct srgb_modification
+{
+ png_modification this;
+ png_byte intent;
+} srgb_modification;
+
+static int
+srgb_modify(png_modifier *pm, png_modification *me, int add)
+{
+ UNUSED(add)
+ /* As above, ignore add and just make a new chunk */
+ png_save_uint_32(pm->buffer, 1);
+ png_save_uint_32(pm->buffer+4, CHUNK_sRGB);
+ pm->buffer[8] = ((srgb_modification*)me)->intent;
+ return 1;
+}
+
+static void
+srgb_modification_init(srgb_modification *me, png_modifier *pm, png_byte intent)
+{
+ modification_init(&me->this);
+ me->this.chunk = CHUNK_sBIT;
+
+ if (intent <= 3) /* if valid, else *delete* sRGB chunks */
+ {
+ me->this.modify_fn = srgb_modify;
+ me->this.add = CHUNK_PLTE;
+ me->intent = intent;
+ }
+
+ else
+ {
+ me->this.modify_fn = 0;
+ me->this.add = 0;
+ me->intent = 0;
+ }
+
+ me->this.next = pm->modifications;
+ pm->modifications = &me->this;
+}
+
+typedef struct sbit_modification
+{
+ png_modification this;
+ png_byte sbit;
+} sbit_modification;
+
+static int
+sbit_modify(png_modifier *pm, png_modification *me, int add)
+{
+ png_byte sbit = ((sbit_modification*)me)->sbit;
+ if (pm->bit_depth > sbit)
+ {
+ int cb = 0;
+ switch (pm->colour_type)
+ {
+ case 0:
+ cb = 1;
+ break;
+
+ case 2:
+ case 3:
+ cb = 3;
+ break;
+
+ case 4:
+ cb = 2;
+ break;
+
+ case 6:
+ cb = 4;
+ break;
+
+ default:
+ png_error(pm->this.pread,
+ "unexpected colour type in sBIT modification");
+ }
+
+ png_save_uint_32(pm->buffer, cb);
+ png_save_uint_32(pm->buffer+4, CHUNK_sBIT);
+
+ while (cb > 0)
+ (pm->buffer+8)[--cb] = sbit;
+
+ return 1;
+ }
+ else if (!add)
+ {
+ /* Remove the sBIT chunk */
+ pm->buffer_count = pm->buffer_position = 0;
+ return 1;
+ }
+ else
+ return 0; /* do nothing */
+}
+
+static void
+sbit_modification_init(sbit_modification *me, png_modifier *pm, png_byte sbit)
+{
+ modification_init(&me->this);
+ me->this.chunk = CHUNK_sBIT;
+ me->this.modify_fn = sbit_modify;
+ me->this.add = CHUNK_PLTE;
+ me->sbit = sbit;
+ me->this.next = pm->modifications;
+ pm->modifications = &me->this;
+}
+
+/* Reader callbacks and implementations, where they differ from the standard
+ * ones.
+ */
+typedef struct gamma_display
+{
+ standard_display this;
+
+ /* Parameters */
+ png_modifier* pm;
+ double file_gamma;
+ double screen_gamma;
+ png_byte sbit;
+ int threshold_test;
+ PNG_CONST char* name;
+ int speed;
+ int use_input_precision;
+ int strip16;
+
+ /* Local variables */
+ double maxerrout;
+ double maxerrpc;
+ double maxerrabs;
+} gamma_display;
+
+static void
+gamma_display_init(gamma_display *dp, png_modifier *pm, png_uint_32 id,
+ double file_gamma, double screen_gamma, png_byte sbit, int threshold_test,
+ int speed, int use_input_precision, int strip16)
+{
+ /* Standard fields */
+ standard_display_init(&dp->this, &pm->this, id, 0/*do_interlace*/);
+
+ /* Parameter fields */
+ dp->pm = pm;
+ dp->file_gamma = file_gamma;
+ dp->screen_gamma = screen_gamma;
+ dp->sbit = sbit;
+ dp->threshold_test = threshold_test;
+ dp->speed = speed;
+ dp->use_input_precision = use_input_precision;
+ dp->strip16 = strip16;
+
+ /* Local variable fields */
+ dp->maxerrout = dp->maxerrpc = dp->maxerrabs = 0;
+}
+
+static void
+gamma_info_imp(gamma_display *dp, png_structp pp, png_infop pi)
+{
+ /* Reuse the standard stuff as appropriate. */
+ standard_info_part1(&dp->this, pp, pi);
+
+ /* If requested strip 16 to 8 bits - this is handled automagically below
+ * because the output bit depth is read from the library. Note that there
+ * are interactions with sBIT but, internally, libpng makes sbit at most
+ * PNG_MAX_GAMMA_8 when doing the following.
+ */
+ if (dp->strip16)
+# ifdef PNG_READ_16_TO_8_SUPPORTED
+ png_set_strip_16(pp);
+# else
+ png_error(pp, "strip16 (16 to 8 bit conversion) not supported");
+# endif
+
+ png_read_update_info(pp, pi);
+
+ /* Now we may get a different cbRow: */
+ standard_info_part2(&dp->this, pp, pi, 1 /*images*/);
+}
+
+static void
+gamma_info(png_structp pp, png_infop pi)
+{
+ gamma_info_imp(png_get_progressive_ptr(pp), pp, pi);
+}
+
+static void
+gamma_image_validate(gamma_display *dp, png_structp pp, png_infop pi,
+ png_const_bytep pRow)
+{
+ /* Get some constants derived from the input and output file formats: */
+ PNG_CONST png_byte sbit = dp->sbit;
+ PNG_CONST double file_gamma = dp->file_gamma;
+ PNG_CONST double screen_gamma = dp->screen_gamma;
+ PNG_CONST int use_input_precision = dp->use_input_precision;
+ PNG_CONST int speed = dp->speed;
+ PNG_CONST png_byte in_ct = dp->this.colour_type;
+ PNG_CONST png_byte in_bd = dp->this.bit_depth;
+ PNG_CONST png_uint_32 w = dp->this.w;
+ PNG_CONST png_uint_32 h = dp->this.h;
+ PNG_CONST size_t cbRow = dp->this.cbRow;
+ PNG_CONST png_byte out_ct = png_get_color_type(pp, pi);
+ PNG_CONST png_byte out_bd = png_get_bit_depth(pp, pi);
+ PNG_CONST unsigned int outmax = (1U<<out_bd)-1;
+ PNG_CONST double maxabs = abserr(dp->pm, out_bd);
+ PNG_CONST double maxout = outerr(dp->pm, out_bd);
+ PNG_CONST double maxpc = pcerr(dp->pm, out_bd);
+
+ /* There are three sources of error, firstly the quantization in the
+ * file encoding, determined by sbit and/or the file depth, secondly
+ * the output (screen) gamma and thirdly the output file encoding.
+ *
+ * Since this API receives the screen and file gamma in double
+ * precision it is possible to calculate an exact answer given an input
+ * pixel value. Therefore we assume that the *input* value is exact -
+ * sample/maxsample - calculate the corresponding gamma corrected
+ * output to the limits of double precision arithmetic and compare with
+ * what libpng returns.
+ *
+ * Since the library must quantize the output to 8 or 16 bits there is
+ * a fundamental limit on the accuracy of the output of +/-.5 - this
+ * quantization limit is included in addition to the other limits
+ * specified by the paramaters to the API. (Effectively, add .5
+ * everywhere.)
+ *
+ * The behavior of the 'sbit' paramter is defined by section 12.5
+ * (sample depth scaling) of the PNG spec. That section forces the
+ * decoder to assume that the PNG values have been scaled if sBIT is
+ * present:
+ *
+ * png-sample = floor( input-sample * (max-out/max-in) + .5);
+ *
+ * This means that only a subset of the possible PNG values should
+ * appear in the input. However, the spec allows the encoder to use a
+ * variety of approximations to the above and doesn't require any
+ * restriction of the values produced.
+ *
+ * Nevertheless the spec requires that the upper 'sBIT' bits of the
+ * value stored in a PNG file be the original sample bits.
+ * Consequently the code below simply scales the top sbit bits by
+ * (1<<sbit)-1 to obtain an original sample value.
+ *
+ * Because there is limited precision in the input it is arguable that
+ * an acceptable result is any valid result from input-.5 to input+.5.
+ * The basic tests below do not do this, however if
+ * 'use_input_precision' is set a subsequent test is performed below.
+ */
+ PNG_CONST int processing = (fabs(screen_gamma*file_gamma-1) >=
+ PNG_GAMMA_THRESHOLD && !dp->threshold_test && !speed && in_ct != 3) ||
+ in_bd != out_bd;
+
+ PNG_CONST unsigned int samples_per_pixel = (out_ct & 2U) ? 3U : 1U;
+
+ PNG_CONST double gamma_correction = 1/(file_gamma*screen_gamma);/* Overall */
+
+ double maxerrout = 0, maxerrabs = 0, maxerrpc = 0;
+ png_uint_32 y;
+
+ for (y=0; y<h; ++y, pRow += cbRow)
+ {
+ unsigned int s, x;
+ png_byte std[STANDARD_ROWMAX];
+
+ transform_row(pp, std, in_ct, in_bd, y);
+
+ if (processing)
+ {
+ for (x=0; x<w; ++x) for (s=0; s<samples_per_pixel; ++s)
+ {
+ /* Input sample values: */
+ PNG_CONST unsigned int
+ id = sample(std, in_ct, in_bd, x, s);
+
+ PNG_CONST unsigned int
+ od = sample(pRow, out_ct, out_bd, x, s);
+
+ PNG_CONST unsigned int
+ isbit = id >> (in_bd-sbit);
+
+ double i, input_sample, encoded_sample, output;
+ double encoded_error, error;
+ double es_lo, es_hi;
+
+ /* First check on the 'perfect' result obtained from the
+ * digitized input value, id, and compare this against the
+ * actual digitized result, 'od'. 'i' is the input result
+ * in the range 0..1:
+ *
+ * NOTE: sBIT should be taken into account here but isn't,
+ * as described above.
+ */
+ i = isbit; i /= (1U<<sbit)-1;
+
+ /* Then get the gamma corrected version of 'i' and compare
+ * to 'od', any error less than .5 is insignificant - just
+ * quantization of the output value to the nearest digital
+ * value (nevertheless the error is still recorded - it's
+ * interesting ;-)
+ */
+ encoded_sample = pow(i, gamma_correction) * outmax;
+ encoded_error = fabs(od-encoded_sample);
+
+ if (encoded_error > maxerrout)
+ maxerrout = encoded_error;
+
+ if (encoded_error < .5+maxout)
+ continue;
+
+ /* There may be an error, so calculate the actual sample
+ * values - unencoded light intensity values. Note that
+ * in practice these are not unencoded because they
+ * include a 'viewing correction' to decrease or
+ * (normally) increase the perceptual contrast of the
+ * image. There's nothing we can do about this - we don't
+ * know what it is - so assume the unencoded value is
+ * perceptually linear.
+ */
+ input_sample = pow(i, 1/file_gamma); /* In range 0..1 */
+ output = od;
+ output /= outmax;
+ output = pow(output, screen_gamma);
+
+ /* Now we have the numbers for real errors, both absolute
+ * values as as a percentage of the correct value (output):
+ */
+ error = fabs(input_sample-output);
+
+ if (error > maxerrabs)
+ maxerrabs = error;
+
+ /* The following is an attempt to ignore the tendency of
+ * quantization to dominate the percentage errors for low
+ * output sample values:
+ */
+ if (input_sample*maxpc > .5+maxabs)
+ {
+ double percentage_error = error/input_sample;
+ if (percentage_error > maxerrpc) maxerrpc = percentage_error;
+ }
+
+ /* Now calculate the digitization limits for
+ * 'encoded_sample' using the 'max' values. Note that
+ * maxout is in the encoded space but maxpc and maxabs are
+ * in linear light space.
+ *
+ * First find the maximum error in linear light space,
+ * range 0..1:
+ */
+ {
+ double tmp = input_sample * maxpc;
+ if (tmp < maxabs) tmp = maxabs;
+
+ /* Low bound - the minimum of the three: */
+ es_lo = encoded_sample - maxout;
+
+ if (es_lo > 0 && input_sample-tmp > 0)
+ {
+ double low_value = outmax * pow(input_sample-tmp,
+ 1/screen_gamma);
+ if (low_value < es_lo) es_lo = low_value;
+ }
+
+ else
+ es_lo = 0;
+
+ es_hi = encoded_sample + maxout;
+
+ if (es_hi < outmax && input_sample+tmp < 1)
+ {
+ double high_value = outmax * pow(input_sample+tmp,
+ 1/screen_gamma);
+ if (high_value > es_hi) es_hi = high_value;
+ }
+
+ else
+ es_hi = outmax;
+ }
+
+ /* The primary test is that the final encoded value
+ * returned by the library should be between the two limits
+ * (inclusive) that were calculated above. At this point
+ * quantization of the output must be taken into account.
+ */
+ if (od+.5 < es_lo || od-.5 > es_hi)
+ {
+ /* There has been an error in processing. */
+ double is_lo, is_hi;
+
+ if (use_input_precision)
+ {
+ /* Ok, something is wrong - this actually happens in
+ * current libpng sbit processing. Assume that the
+ * input value (id, adjusted for sbit) can be
+ * anywhere between value-.5 and value+.5 - quite a
+ * large range if sbit is low.
+ */
+ double tmp = (isbit - .5)/((1U<<sbit)-1);
+
+ if (tmp > 0)
+ {
+ is_lo = outmax * pow(tmp, gamma_correction) - maxout;
+ if (is_lo < 0) is_lo = 0;
+ }
+
+ else
+ is_lo = 0;
+
+ tmp = (isbit + .5)/((1U<<sbit)-1);
+
+ if (tmp < 1)
+ {
+ is_hi = outmax * pow(tmp, gamma_correction) + maxout;
+ if (is_hi > outmax) is_hi = outmax;
+ }
+
+ else
+ is_hi = outmax;
+
+ if (!(od+.5 < is_lo || od-.5 > is_hi))
+ continue;
+ }
+ else
+ is_lo = es_lo, is_hi = es_hi;
+
+ {
+ char msg[256];
+
+ sprintf(msg,
+ "error: %.3f; %u{%u;%u} -> %u not %.2f (%.1f-%.1f)",
+ od-encoded_sample, id, sbit, isbit, od,
+ encoded_sample, is_lo, is_hi);
+
+ png_warning(pp, msg);
+ }
+ }
+ }
+ }
+
+ else if (!speed && memcmp(std, pRow, cbRow) != 0)
+ {
+ char msg[64];
+
+ /* No transform is expected on the threshold tests. */
+ sprintf(msg, "gamma: below threshold row %d changed", y);
+
+ png_error(pp, msg);
+ }
+ } /* row (y) loop */
+
+ dp->maxerrout = maxerrout;
+ dp->maxerrabs = maxerrabs;
+ dp->maxerrpc = maxerrpc;
+ dp->this.ps->validated = 1;
+}
+
+static void
+gamma_end(png_structp pp, png_infop pi)
+{
+ gamma_display *dp = png_get_progressive_ptr(pp);
+
+ gamma_image_validate(dp, pp, pi, dp->this.ps->image);
+}
+
+/* A single test run checking a gamma transformation.
+ *
+ * maxabs: maximum absolute error as a fraction
+ * maxout: maximum output error in the output units
+ * maxpc: maximum percentage error (as a percentage)
+ */
+static void
+gamma_test(png_modifier *pmIn, PNG_CONST png_byte colour_typeIn,
+ PNG_CONST png_byte bit_depthIn, PNG_CONST int interlace_typeIn,
+ PNG_CONST double file_gammaIn, PNG_CONST double screen_gammaIn,
+ PNG_CONST png_byte sbitIn, PNG_CONST int threshold_testIn,
+ PNG_CONST char *name, PNG_CONST int speedIn,
+ PNG_CONST int use_input_precisionIn, PNG_CONST int strip16In)
+{
+ gamma_display d;
+ context(&pmIn->this, fault);
+
+ gamma_display_init(&d, pmIn, FILEID(colour_typeIn, bit_depthIn,
+ interlace_typeIn, 0, 0, 0), file_gammaIn, screen_gammaIn, sbitIn,
+ threshold_testIn, speedIn, use_input_precisionIn, strip16In);
+
+ Try
+ {
+ png_structp pp;
+ png_infop pi;
+ gamma_modification gamma_mod;
+ srgb_modification srgb_mod;
+ sbit_modification sbit_mod;
+
+ /* Make an appropriate modifier to set the PNG file gamma to the
+ * given gamma value and the sBIT chunk to the given precision.
+ */
+ d.pm->modifications = NULL;
+ gamma_modification_init(&gamma_mod, d.pm, d.file_gamma);
+ srgb_modification_init(&srgb_mod, d.pm, 127 /*delete*/);
+ sbit_modification_init(&sbit_mod, d.pm, d.sbit);
+
+ modification_reset(d.pm->modifications);
+
+ /* Get a png_struct for writing the image. */
+ pp = set_modifier_for_read(d.pm, &pi, d.this.id, name);
+
+ /* Set up gamma processing. */
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+ png_set_gamma(pp, d.screen_gamma, d.file_gamma);
+#else
+ {
+ png_fixed_point s = floor(d.screen_gamma*100000+.5);
+ png_fixed_point f = floor(d.file_gamma*100000+.5);
+ png_set_gamma_fixed(pp, s, f);
+ }
+#endif
+
+ /* Introduce the correct read function. */
+ if (d.pm->this.progressive)
+ {
+ /* Share the row function with the standard implementation. */
+ png_set_progressive_read_fn(pp, &d, gamma_info, progressive_row,
+ gamma_end);
+
+ /* Now feed data into the reader until we reach the end: */
+ modifier_progressive_read(d.pm, pp, pi);
+ }
+ else
+ {
+ /* modifier_read expects a png_modifier* */
+ png_set_read_fn(pp, d.pm, modifier_read);
+
+ /* Check the header values: */
+ png_read_info(pp, pi);
+
+ /* Process the 'info' requirements. Only one image is generated */
+ gamma_info_imp(&d, pp, pi);
+
+ sequential_row(&d.this, pp, pi, NULL, d.this.ps->image);
+
+ gamma_image_validate(&d, pp, pi, d.this.ps->image);
+ }
+
+ modifier_reset(d.pm);
+
+ if (d.pm->log && !d.threshold_test && !d.speed)
+ fprintf(stderr, "%d bit %s %s: max error %f (%.2g, %2g%%)\n",
+ d.this.bit_depth, colour_types[d.this.colour_type], d.name,
+ d.maxerrout, d.maxerrabs, 100*d.maxerrpc);
+
+ /* Log the summary values too. */
+ if (d.this.colour_type == 0 || d.this.colour_type == 4)
+ {
+ switch (d.this.bit_depth)
+ {
+ case 1:
+ break;
+
+ case 2:
+ if (d.maxerrout > d.pm->error_gray_2)
+ d.pm->error_gray_2 = d.maxerrout;
+
+ break;
+
+ case 4:
+ if (d.maxerrout > d.pm->error_gray_4)
+ d.pm->error_gray_4 = d.maxerrout;
+
+ break;
+
+ case 8:
+ if (d.maxerrout > d.pm->error_gray_8)
+ d.pm->error_gray_8 = d.maxerrout;
+
+ break;
+
+ case 16:
+ if (d.maxerrout > d.pm->error_gray_16)
+ d.pm->error_gray_16 = d.maxerrout;
+
+ break;
+
+ default:
+ png_error(pp, "bad bit depth (internal: 1)");
+ }
+ }
+
+ else if (d.this.colour_type == 2 || d.this.colour_type == 6)
+ {
+ switch (d.this.bit_depth)
+ {
+ case 8:
+
+ if (d.maxerrout > d.pm->error_color_8)
+ d.pm->error_color_8 = d.maxerrout;
+
+ break;
+
+ case 16:
+
+ if (d.maxerrout > d.pm->error_color_16)
+ d.pm->error_color_16 = d.maxerrout;
+
+ break;
+
+ default:
+ png_error(pp, "bad bit depth (internal: 2)");
+ }
+ }
+ }
+
+ Catch(fault)
+ modifier_reset((png_modifier*)fault);
+}
+
+static void gamma_threshold_test(png_modifier *pm, png_byte colour_type,
+ png_byte bit_depth, int interlace_type, double file_gamma,
+ double screen_gamma)
+{
+ size_t pos = 0;
+ char name[64];
+ pos = safecat(name, sizeof name, pos, "threshold ");
+ pos = safecatd(name, sizeof name, pos, file_gamma, 3);
+ pos = safecat(name, sizeof name, pos, "/");
+ pos = safecatd(name, sizeof name, pos, screen_gamma, 3);
+
+ (void)gamma_test(pm, colour_type, bit_depth, interlace_type, file_gamma,
+ screen_gamma, bit_depth, 1, name, 0 /*speed*/, 0 /*no input precision*/,
+ 0 /*no strip16*/);
+}
+
+static void
+perform_gamma_threshold_tests(png_modifier *pm)
+{
+ png_byte colour_type = 0;
+ png_byte bit_depth = 0;
+
+ while (next_format(&colour_type, &bit_depth))
+ {
+ double test_gamma = 1.0;
+ while (test_gamma >= .4)
+ {
+ /* There's little point testing the interlacing vs non-interlacing,
+ * but this can be set from the command line.
+ */
+ gamma_threshold_test(pm, colour_type, bit_depth, pm->interlace_type,
+ test_gamma, 1/test_gamma);
+ test_gamma *= .95;
+ }
+
+ /* And a special test for sRGB */
+ gamma_threshold_test(pm, colour_type, bit_depth, pm->interlace_type,
+ .45455, 2.2);
+
+ if (fail(pm))
+ return;
+ }
+}
+
+static void gamma_transform_test(png_modifier *pm,
+ PNG_CONST png_byte colour_type, PNG_CONST png_byte bit_depth,
+ PNG_CONST int interlace_type, PNG_CONST double file_gamma,
+ PNG_CONST double screen_gamma, PNG_CONST png_byte sbit, PNG_CONST int speed,
+ PNG_CONST int use_input_precision, PNG_CONST int strip16)
+{
+ size_t pos = 0;
+ char name[64];
+
+ if (sbit != bit_depth)
+ {
+ pos = safecat(name, sizeof name, pos, "sbit(");
+ pos = safecatn(name, sizeof name, pos, sbit);
+ pos = safecat(name, sizeof name, pos, ") ");
+ }
+
+ else
+ pos = safecat(name, sizeof name, pos, "gamma ");
+
+ if (strip16)
+ pos = safecat(name, sizeof name, pos, "16to8 ");
+
+ pos = safecatd(name, sizeof name, pos, file_gamma, 3);
+ pos = safecat(name, sizeof name, pos, "->");
+ pos = safecatd(name, sizeof name, pos, screen_gamma, 3);
+
+ gamma_test(pm, colour_type, bit_depth, interlace_type, file_gamma,
+ screen_gamma, sbit, 0, name, speed, use_input_precision, strip16);
+}
+
+static void perform_gamma_transform_tests(png_modifier *pm, int speed)
+{
+ png_byte colour_type = 0;
+ png_byte bit_depth = 0;
+
+ /* Ignore palette images - the gamma correction happens on the palette entry,
+ * haven't got the tests for this yet.
+ */
+ while (next_format(&colour_type, &bit_depth)) if (colour_type != 3)
+ {
+ unsigned int i, j;
+
+ for (i=0; i<pm->ngammas; ++i) for (j=0; j<pm->ngammas; ++j) if (i != j)
+ {
+ gamma_transform_test(pm, colour_type, bit_depth, pm->interlace_type,
+ 1/pm->gammas[i], pm->gammas[j], bit_depth, speed,
+ pm->use_input_precision, 0 /*do not strip16*/);
+
+ if (fail(pm))
+ return;
+ }
+ }
+}
+
+static void perform_gamma_sbit_tests(png_modifier *pm, int speed)
+{
+ png_byte sbit;
+
+ /* The only interesting cases are colour and grayscale, alpha is ignored here
+ * for overall speed. Only bit depths 8 and 16 are tested.
+ */
+ for (sbit=pm->sbitlow; sbit<(1<<READ_BDHI); ++sbit)
+ {
+ unsigned int i, j;
+
+ for (i=0; i<pm->ngammas; ++i)
+ {
+ for (j=0; j<pm->ngammas; ++j)
+ {
+ if (i != j)
+ {
+ if (sbit < 8)
+ {
+ gamma_transform_test(pm, 0, 8, pm->interlace_type,
+ 1/pm->gammas[i], pm->gammas[j], sbit, speed,
+ pm->use_input_precision_sbit, 0 /*strip16*/);
+
+ if (fail(pm))
+ return;
+
+ gamma_transform_test(pm, 2, 8, pm->interlace_type,
+ 1/pm->gammas[i], pm->gammas[j], sbit, speed,
+ pm->use_input_precision_sbit, 0 /*strip16*/);
+
+ if (fail(pm))
+ return;
+ }
+
+#ifdef DO_16BIT
+ gamma_transform_test(pm, 0, 16, pm->interlace_type,
+ 1/pm->gammas[i], pm->gammas[j], sbit, speed,
+ pm->use_input_precision_sbit, 0 /*strip16*/);
+
+ if (fail(pm))
+ return;
+
+ gamma_transform_test(pm, 2, 16, pm->interlace_type,
+ 1/pm->gammas[i], pm->gammas[j], sbit, speed,
+ pm->use_input_precision_sbit, 0 /*strip16*/);
+
+ if (fail(pm))
+ return;
+#endif
+ }
+ }
+ }
+ }
+}
+
+/* Note that this requires a 16 bit source image but produces 8 bit output, so
+ * we only need the 16bit write support.
+ */
+#ifdef PNG_READ_16_TO_8_SUPPORTED
+static void perform_gamma_strip16_tests(png_modifier *pm, int speed)
+{
+# ifndef PNG_MAX_GAMMA_8
+# define PNG_MAX_GAMMA_8 11
+# endif
+ /* Include the alpha cases here. Note that sbit matches the internal value
+ * used by the library - otherwise we will get spurious errors from the
+ * internal sbit style approximation.
+ *
+ * The threshold test is here because otherwise the 16 to 8 conversion will
+ * proceed *without* gamma correction, and the tests above will fail (but not
+ * by much) - this could be fixed, it only appears with the -g option.
+ */
+ unsigned int i, j;
+ for (i=0; i<pm->ngammas; ++i)
+ {
+ for (j=0; j<pm->ngammas; ++j)
+ {
+ if (i != j &&
+ fabs(pm->gammas[j]/pm->gammas[i]-1) >= PNG_GAMMA_THRESHOLD)
+ {
+ gamma_transform_test(pm, 0, 16, pm->interlace_type, 1/pm->gammas[i],
+ pm->gammas[j], PNG_MAX_GAMMA_8, speed,
+ pm->use_input_precision_16to8, 1 /*strip16*/);
+
+ if (fail(pm))
+ return;
+
+ gamma_transform_test(pm, 2, 16, pm->interlace_type, 1/pm->gammas[i],
+ pm->gammas[j], PNG_MAX_GAMMA_8, speed,
+ pm->use_input_precision_16to8, 1 /*strip16*/);
+
+ if (fail(pm))
+ return;
+
+ gamma_transform_test(pm, 4, 16, pm->interlace_type, 1/pm->gammas[i],
+ pm->gammas[j], PNG_MAX_GAMMA_8, speed,
+ pm->use_input_precision_16to8, 1 /*strip16*/);
+
+ if (fail(pm))
+ return;
+
+ gamma_transform_test(pm, 6, 16, pm->interlace_type, 1/pm->gammas[i],
+ pm->gammas[j], PNG_MAX_GAMMA_8, speed,
+ pm->use_input_precision_16to8, 1 /*strip16*/);
+
+ if (fail(pm))
+ return;
+ }
+ }
+ }
+}
+#endif /* 16 to 8 bit conversion */
+
+static void
+perform_gamma_test(png_modifier *pm, int speed, int summary)
+{
+ /* First some arbitrary no-transform tests: */
+ if (!speed && pm->test_gamma_threshold)
+ {
+ perform_gamma_threshold_tests(pm);
+
+ if (fail(pm))
+ return;
+ }
+
+ /* Now some real transforms. */
+ if (pm->test_gamma_transform)
+ {
+ perform_gamma_transform_tests(pm, speed);
+
+ if (summary)
+ {
+ printf("Gamma correction error summary\n\n");
+ printf("The printed value is the maximum error in the pixel values\n");
+ printf("calculated by the libpng gamma correction code. The error\n");
+ printf("is calculated as the difference between the output pixel\n");
+ printf("value (always an integer) and the ideal value from the\n");
+ printf("libpng specification (typically not an integer).\n\n");
+
+ printf("Expect this value to be less than .5 for 8 bit formats,\n");
+ printf("less than 1 for formats with fewer than 8 bits and a small\n");
+ printf("number (typically less than 5) for the 16 bit formats.\n");
+ printf("For performance reasons the value for 16 bit formats\n");
+ printf("increases when the image file includes an sBIT chunk.\n\n");
+
+ printf(" 2 bit gray: %.5f\n", pm->error_gray_2);
+ printf(" 4 bit gray: %.5f\n", pm->error_gray_4);
+ printf(" 8 bit gray: %.5f\n", pm->error_gray_8);
+ printf(" 8 bit color: %.5f\n", pm->error_color_8);
+#ifdef DO_16BIT
+ printf(" 16 bit gray: %.5f\n", pm->error_gray_16);
+ printf(" 16 bit color: %.5f\n", pm->error_color_16);
+#endif
+ }
+ }
+
+ /* The sbit tests produce much larger errors: */
+ if (pm->test_gamma_sbit)
+ {
+ pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 =
+ pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0;
+ perform_gamma_sbit_tests(pm, speed);
+
+ if (summary)
+ {
+ printf("Gamma correction with sBIT:\n");
+
+ if (pm->sbitlow < 8U)
+ {
+ printf(" 2 bit gray: %.5f\n", pm->error_gray_2);
+ printf(" 4 bit gray: %.5f\n", pm->error_gray_4);
+ printf(" 8 bit gray: %.5f\n", pm->error_gray_8);
+ printf(" 8 bit color: %.5f\n", pm->error_color_8);
+ }
+
+ #ifdef DO_16BIT
+ printf(" 16 bit gray: %.5f\n", pm->error_gray_16);
+ printf(" 16 bit color: %.5f\n", pm->error_color_16);
+ #endif
+ }
+ }
+
+#ifdef PNG_READ_16_TO_8_SUPPORTED
+ if (pm->test_gamma_strip16)
+ {
+ /* The 16 to 8 bit strip operations: */
+ pm->error_gray_2 = pm->error_gray_4 = pm->error_gray_8 =
+ pm->error_gray_16 = pm->error_color_8 = pm->error_color_16 = 0;
+ perform_gamma_strip16_tests(pm, speed);
+
+ if (summary)
+ {
+ printf("Gamma correction with 16 to 8 bit reduction:\n");
+ printf(" 16 bit gray: %.5f\n", pm->error_gray_16);
+ printf(" 16 bit color: %.5f\n", pm->error_color_16);
+ }
+ }
+#endif
+}
+
+/* INTERLACE MACRO VALIDATION */
+/* This is copied verbatim from the specification, it is simply the pass
+ * number in which each pixel in each 8x8 tile appears. The array must
+ * be indexed adam7[y][x] and notice that the pass numbers are based at
+ * 1, not 0 - the base libpng uses.
+ */
+static PNG_CONST
+png_byte adam7[8][8] =
+{
+ { 1,6,4,6,2,6,4,6 },
+ { 7,7,7,7,7,7,7,7 },
+ { 5,6,5,6,5,6,5,6 },
+ { 7,7,7,7,7,7,7,7 },
+ { 3,6,4,6,3,6,4,6 },
+ { 7,7,7,7,7,7,7,7 },
+ { 5,6,5,6,5,6,5,6 },
+ { 7,7,7,7,7,7,7,7 }
+};
+
+/* This routine validates all the interlace support macros in png.h for
+ * a variety of valid PNG widths and heights. It uses a number of similarly
+ * named internal routines that feed off the above array.
+ */
+static png_uint_32
+png_pass_start_row(int pass)
+{
+ int x, y;
+ ++pass;
+ for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass)
+ return y;
+ return 0xf;
+}
+
+static png_uint_32
+png_pass_start_col(int pass)
+{
+ int x, y;
+ ++pass;
+ for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass)
+ return x;
+ return 0xf;
+}
+
+static int
+png_pass_row_shift(int pass)
+{
+ int x, y, base=(-1), inc=8;
+ ++pass;
+ for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass)
+ {
+ if (base == (-1))
+ base = y;
+ else if (base == y)
+ {}
+ else if (inc == y-base)
+ base=y;
+ else if (inc == 8)
+ inc = y-base, base=y;
+ else if (inc != y-base)
+ return 0xff; /* error - more than one 'inc' value! */
+ }
+
+ if (base == (-1)) return 0xfe; /* error - no row in pass! */
+
+ /* The shift is always 1, 2 or 3 - no pass has all the rows! */
+ switch (inc)
+ {
+case 2: return 1;
+case 4: return 2;
+case 8: return 3;
+default: break;
+ }
+
+ /* error - unrecognized 'inc' */
+ return (inc << 8) + 0xfd;
+}
+
+static int
+png_pass_col_shift(int pass)
+{
+ int x, y, base=(-1), inc=8;
+ ++pass;
+ for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass)
+ {
+ if (base == (-1))
+ base = x;
+ else if (base == x)
+ {}
+ else if (inc == x-base)
+ base=x;
+ else if (inc == 8)
+ inc = x-base, base=x;
+ else if (inc != x-base)
+ return 0xff; /* error - more than one 'inc' value! */
+ }
+
+ if (base == (-1)) return 0xfe; /* error - no row in pass! */
+
+ /* The shift is always 1, 2 or 3 - no pass has all the rows! */
+ switch (inc)
+ {
+case 1: return 0; /* pass 7 has all the columns */
+case 2: return 1;
+case 4: return 2;
+case 8: return 3;
+default: break;
+ }
+
+ /* error - unrecognized 'inc' */
+ return (inc << 8) + 0xfd;
+}
+
+static png_uint_32
+png_row_from_pass_row(png_uint_32 yIn, int pass)
+{
+ /* By examination of the array: */
+ switch (pass)
+ {
+case 0: return yIn * 8;
+case 1: return yIn * 8;
+case 2: return yIn * 8 + 4;
+case 3: return yIn * 4;
+case 4: return yIn * 4 + 2;
+case 5: return yIn * 2;
+case 6: return yIn * 2 + 1;
+default: break;
+ }
+
+ return 0xff; /* bad pass number */
+}
+
+static png_uint_32
+png_col_from_pass_col(png_uint_32 xIn, int pass)
+{
+ /* By examination of the array: */
+ switch (pass)
+ {
+case 0: return xIn * 8;
+case 1: return xIn * 8 + 4;
+case 2: return xIn * 4;
+case 3: return xIn * 4 + 2;
+case 4: return xIn * 2;
+case 5: return xIn * 2 + 1;
+case 6: return xIn;
+default: break;
+ }
+
+ return 0xff; /* bad pass number */
+}
+
+static int
+png_row_in_interlace_pass(png_uint_32 y, int pass)
+{
+ /* Is row 'y' in pass 'pass'? */
+ int x;
+ y &= 7;
+ ++pass;
+ for (x=0; x<8; ++x) if (adam7[y][x] == pass)
+ return 1;
+
+ return 0;
+}
+
+static int
+png_col_in_interlace_pass(png_uint_32 x, int pass)
+{
+ /* Is column 'x' in pass 'pass'? */
+ int y;
+ x &= 7;
+ ++pass;
+ for (y=0; y<8; ++y) if (adam7[y][x] == pass)
+ return 1;
+
+ return 0;
+}
+
+static png_uint_32
+png_pass_rows(png_uint_32 height, int pass)
+{
+ png_uint_32 tiles = height>>3;
+ png_uint_32 rows = 0;
+ unsigned int x, y;
+
+ height &= 7;
+ ++pass;
+ for (y=0; y<8; ++y) for (x=0; x<8; ++x) if (adam7[y][x] == pass)
+ {
+ rows += tiles;
+ if (y < height) ++rows;
+ break; /* i.e. break the 'x', column, loop. */
+ }
+
+ return rows;
+}
+
+static png_uint_32
+png_pass_cols(png_uint_32 width, int pass)
+{
+ png_uint_32 tiles = width>>3;
+ png_uint_32 cols = 0;
+ unsigned int x, y;
+
+ width &= 7;
+ ++pass;
+ for (x=0; x<8; ++x) for (y=0; y<8; ++y) if (adam7[y][x] == pass)
+ {
+ cols += tiles;
+ if (x < width) ++cols;
+ break; /* i.e. break the 'y', row, loop. */
+ }
+
+ return cols;
+}
+
+static void
+perform_interlace_macro_validation(void)
+{
+ /* The macros to validate, first those that depend only on pass:
+ *
+ * PNG_PASS_START_ROW(pass)
+ * PNG_PASS_START_COL(pass)
+ * PNG_PASS_ROW_SHIFT(pass)
+ * PNG_PASS_COL_SHIFT(pass)
+ */
+ int pass;
+
+ for (pass=0; pass<7; ++pass)
+ {
+ png_uint_32 m, f, v;
+
+ m = PNG_PASS_START_ROW(pass);
+ f = png_pass_start_row(pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_PASS_START_ROW(%d) = %u != %x\n", pass, m, f);
+ exit(1);
+ }
+
+ m = PNG_PASS_START_COL(pass);
+ f = png_pass_start_col(pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_PASS_START_COL(%d) = %u != %x\n", pass, m, f);
+ exit(1);
+ }
+
+ m = PNG_PASS_ROW_SHIFT(pass);
+ f = png_pass_row_shift(pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_PASS_ROW_SHIFT(%d) = %u != %x\n", pass, m, f);
+ exit(1);
+ }
+
+ m = PNG_PASS_COL_SHIFT(pass);
+ f = png_pass_col_shift(pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_PASS_COL_SHIFT(%d) = %u != %x\n", pass, m, f);
+ exit(1);
+ }
+
+ /* Macros that depend on the image or sub-image height too:
+ *
+ * PNG_PASS_ROWS(height, pass)
+ * PNG_PASS_COLS(width, pass)
+ * PNG_ROW_FROM_PASS_ROW(yIn, pass)
+ * PNG_COL_FROM_PASS_COL(xIn, pass)
+ * PNG_ROW_IN_INTERLACE_PASS(y, pass)
+ * PNG_COL_IN_INTERLACE_PASS(x, pass)
+ */
+ for (v=0;;)
+ {
+ /* First the base 0 stuff: */
+ m = PNG_ROW_FROM_PASS_ROW(v, pass);
+ f = png_row_from_pass_row(v, pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_ROW_FROM_PASS_ROW(%u, %d) = %u != %x\n",
+ v, pass, m, f);
+ exit(1);
+ }
+
+ m = PNG_COL_FROM_PASS_COL(v, pass);
+ f = png_col_from_pass_col(v, pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_COL_FROM_PASS_COL(%u, %d) = %u != %x\n",
+ v, pass, m, f);
+ exit(1);
+ }
+
+ m = PNG_ROW_IN_INTERLACE_PASS(v, pass);
+ f = png_row_in_interlace_pass(v, pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_ROW_IN_INTERLACE_PASS(%u, %d) = %u != %x\n",
+ v, pass, m, f);
+ exit(1);
+ }
+
+ m = PNG_COL_IN_INTERLACE_PASS(v, pass);
+ f = png_col_in_interlace_pass(v, pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_COL_IN_INTERLACE_PASS(%u, %d) = %u != %x\n",
+ v, pass, m, f);
+ exit(1);
+ }
+
+ /* Then the base 1 stuff: */
+ ++v;
+ m = PNG_PASS_ROWS(v, pass);
+ f = png_pass_rows(v, pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_PASS_ROWS(%u, %d) = %u != %x\n",
+ v, pass, m, f);
+ exit(1);
+ }
+
+ m = PNG_PASS_COLS(v, pass);
+ f = png_pass_cols(v, pass);
+ if (m != f)
+ {
+ fprintf(stderr, "PNG_PASS_COLS(%u, %d) = %u != %x\n",
+ v, pass, m, f);
+ exit(1);
+ }
+
+ /* Move to the next v - the stepping algorithm starts skipping
+ * values above 1024.
+ */
+ if (v > 1024)
+ {
+ if (v == PNG_UINT_31_MAX)
+ break;
+
+ v = (v << 1) ^ v;
+ if (v >= PNG_UINT_31_MAX)
+ v = PNG_UINT_31_MAX-1;
+ }
+ }
+ }
+}
+
+/* main program */
+int main(int argc, PNG_CONST char **argv)
+{
+ volatile int summary = 1; /* Print the error summary at the end */
+
+ /* Create the given output file on success: */
+ PNG_CONST char *volatile touch = NULL;
+
+ /* This is an array of standard gamma values (believe it or not I've seen
+ * every one of these mentioned somewhere.)
+ *
+ * In the following list the most useful values are first!
+ */
+ static double
+ gammas[]={2.2, 1.0, 2.2/1.45, 1.8, 1.5, 2.4, 2.5, 2.62, 2.9};
+
+ png_modifier pm;
+ context(&pm.this, fault);
+
+ modifier_init(&pm);
+
+ /* Preallocate the image buffer, because we know how big it needs to be,
+ * note that, for testing purposes, it is deliberately mis-aligned.
+ */
+ pm.this.image = malloc(2*TRANSFORM_IMAGEMAX+1);
+
+ if (pm.this.image != NULL)
+ {
+ /* Ignore OOM at this point - the 'ensure' routine above will allocate
+ * the array appropriately.
+ */
+ ++(pm.this.image);
+ pm.this.cb_image = 2*TRANSFORM_IMAGEMAX;
+ }
+
+ /* Default to error on warning: */
+ pm.this.treat_warnings_as_errors = 1;
+
+ /* Store the test gammas */
+ pm.gammas = gammas;
+ pm.ngammas = 0; /* default to off */
+ pm.sbitlow = 8U; /* because libpng doesn't do sBIT below 8! */
+ pm.use_input_precision_16to8 = 1U; /* Because of the way libpng does it */
+
+ /* Some default values (set the behavior for 'make check' here).
+ * These values simply control the maximum error permitted in the gamma
+ * transformations. The practial limits for human perception are described
+ * below (the setting for maxpc16), however for 8 bit encodings it isn't
+ * possible to meet the accepted capabilities of human vision - i.e. 8 bit
+ * images can never be good enough, regardless of encoding.
+ */
+ pm.maxout8 = .1; /* Arithmetic error in *encoded* value */
+ pm.maxabs8 = .00005; /* 1/20000 */
+ pm.maxpc8 = .499; /* I.e., .499% fractional error */
+ pm.maxout16 = .499; /* Error in *encoded* value */
+ pm.maxabs16 = .00005;/* 1/20000 */
+
+ /* NOTE: this is a reasonable perceptual limit. We assume that humans can
+ * perceive light level differences of 1% over a 100:1 range, so we need to
+ * maintain 1 in 10000 accuracy (in linear light space), which is what the
+ * following guarantees. It also allows significantly higher errors at
+ * higher 16 bit values, which is important for performance. The actual
+ * maximum 16 bit error is about +/-1.9 in the fixed point implementation but
+ * this is only allowed for values >38149 by the following:
+ */
+ pm.maxpc16 = .005; /* I.e., 1/200% - 1/20000 */
+
+ /* Now parse the command line options. */
+ while (--argc >= 1)
+ {
+ if (strcmp(*++argv, "-v") == 0)
+ pm.this.verbose = 1;
+
+ else if (strcmp(*argv, "-l") == 0)
+ pm.log = 1;
+
+ else if (strcmp(*argv, "-q") == 0)
+ summary = pm.this.verbose = pm.log = 0;
+
+ else if (strcmp(*argv, "-w") == 0)
+ pm.this.treat_warnings_as_errors = 0;
+
+ else if (strcmp(*argv, "--speed") == 0)
+ pm.this.speed = 1, pm.ngammas = (sizeof gammas)/(sizeof gammas[0]),
+ pm.test_standard = 0;
+
+ else if (strcmp(*argv, "--size") == 0)
+ pm.test_size = 1;
+
+ else if (strcmp(*argv, "--nosize") == 0)
+ pm.test_size = 0;
+
+ else if (strcmp(*argv, "--standard") == 0)
+ pm.test_standard = 1;
+
+ else if (strcmp(*argv, "--nostandard") == 0)
+ pm.test_standard = 0;
+
+ else if (strcmp(*argv, "--transform") == 0)
+ pm.test_transform = 1;
+
+ else if (strcmp(*argv, "--notransform") == 0)
+ pm.test_transform = 0;
+
+ else if (strncmp(*argv, "--transform-disable=",
+ sizeof "--transform-disable") == 0)
+ {
+ pm.test_transform = 1;
+ transform_disable(*argv + sizeof "--transform-disable");
+ }
+
+ else if (strncmp(*argv, "--transform-enable=",
+ sizeof "--transform-enable") == 0)
+ {
+ pm.test_transform = 1;
+ transform_enable(*argv + sizeof "--transform-enable");
+ }
+
+ else if (strcmp(*argv, "--gamma") == 0)
+ {
+ /* Just do two gamma tests here (2.2 and linear) for speed: */
+ pm.ngammas = 2U;
+ pm.test_gamma_threshold = 1;
+ pm.test_gamma_transform = 1;
+ pm.test_gamma_sbit = 1;
+ pm.test_gamma_strip16 = 1;
+ }
+
+ else if (strcmp(*argv, "--nogamma") == 0)
+ pm.ngammas = 0;
+
+ else if (strcmp(*argv, "--gamma-threshold") == 0)
+ pm.ngammas = 2U, pm.test_gamma_threshold = 1;
+
+ else if (strcmp(*argv, "--nogamma-threshold") == 0)
+ pm.test_gamma_threshold = 0;
+
+ else if (strcmp(*argv, "--gamma-transform") == 0)
+ pm.ngammas = 2U, pm.test_gamma_transform = 1;
+
+ else if (strcmp(*argv, "--nogamma-transform") == 0)
+ pm.test_gamma_transform = 0;
+
+ else if (strcmp(*argv, "--gamma-sbit") == 0)
+ pm.ngammas = 2U, pm.test_gamma_sbit = 1;
+
+ else if (strcmp(*argv, "--nogamma-sbit") == 0)
+ pm.test_gamma_sbit = 0;
+
+ else if (strcmp(*argv, "--gamma-16-to-8") == 0)
+ pm.ngammas = 2U, pm.test_gamma_strip16 = 1;
+
+ else if (strcmp(*argv, "--nogamma-16-to-8") == 0)
+ pm.test_gamma_strip16 = 0;
+
+ else if (strcmp(*argv, "--all-gammas") == 0)
+ pm.ngammas = (sizeof gammas)/(sizeof gammas[0]);
+
+ else if (strcmp(*argv, "--progressive-read") == 0)
+ pm.this.progressive = 1;
+
+ else if (strcmp(*argv, "--interlace") == 0)
+ pm.interlace_type = PNG_INTERLACE_ADAM7;
+
+ else if (argc >= 1 && strcmp(*argv, "--sbitlow") == 0)
+ --argc, pm.sbitlow = (png_byte)atoi(*++argv);
+
+ else if (argc >= 1 && strcmp(*argv, "--touch") == 0)
+ --argc, touch = *++argv;
+
+ else if (argc >= 1 && strncmp(*argv, "--max", 4) == 0)
+ {
+ --argc;
+
+ if (strcmp(4+*argv, "abs8") == 0)
+ pm.maxabs8 = atof(*++argv);
+
+ else if (strcmp(4+*argv, "abs16") == 0)
+ pm.maxabs16 = atof(*++argv);
+
+ else if (strcmp(4+*argv, "out8") == 0)
+ pm.maxout8 = atof(*++argv);
+
+ else if (strcmp(4+*argv, "out16") == 0)
+ pm.maxout16 = atof(*++argv);
+
+ else if (strcmp(4+*argv, "pc8") == 0)
+ pm.maxpc8 = atof(*++argv);
+
+ else if (strcmp(4+*argv, "pc16") == 0)
+ pm.maxpc16 = atof(*++argv);
+
+ else
+ {
+ fprintf(stderr, "pngvalid: %s: unknown 'max' option\n", *argv);
+ exit(1);
+ }
+ }
+
+ else
+ {
+ fprintf(stderr, "pngvalid: %s: unknown argument\n", *argv);
+ exit(1);
+ }
+ }
+
+ /* If pngvalid is run with no arguments default to a reasonable set of the
+ * tests.
+ */
+ if (pm.test_standard == 0 && pm.test_size == 0 && pm.test_transform == 0 &&
+ pm.ngammas == 0)
+ {
+ pm.test_standard = 1;
+ pm.test_size = 1;
+ pm.test_transform = 1;
+ pm.ngammas = 3U;
+ }
+
+ if (pm.ngammas > 0 &&
+ pm.test_gamma_threshold == 0 && pm.test_gamma_transform == 0 &&
+ pm.test_gamma_sbit == 0 && pm.test_gamma_strip16 == 0)
+ {
+ pm.test_gamma_threshold = 1;
+ pm.test_gamma_transform = 1;
+ pm.test_gamma_sbit = 1;
+ pm.test_gamma_strip16 = 1;
+ }
+
+ else if (pm.ngammas == 0)
+ {
+ /* Nothing to test so turn everything off: */
+ pm.test_gamma_threshold = 0;
+ pm.test_gamma_transform = 0;
+ pm.test_gamma_sbit = 0;
+ pm.test_gamma_strip16 = 0;
+ }
+
+ Try
+ {
+ /* Make useful base images */
+ make_transform_images(&pm.this);
+
+ /* Perform the standard and gamma tests. */
+ if (pm.test_standard)
+ {
+ perform_interlace_macro_validation();
+ perform_standard_test(&pm);
+ perform_error_test(&pm);
+ }
+
+ /* Various oddly sized images: */
+ if (pm.test_size)
+ {
+ make_size_images(&pm.this);
+ perform_size_test(&pm);
+ }
+
+ /* Combinatorial transforms: */
+ if (pm.test_transform)
+ perform_transform_test(&pm);
+
+ if (pm.ngammas > 0)
+ perform_gamma_test(&pm, pm.this.speed != 0,
+ summary && !pm.this.speed);
+ }
+
+ Catch(fault)
+ {
+ fprintf(stderr, "pngvalid: test aborted (probably failed in cleanup)\n");
+ if (!pm.this.verbose)
+ {
+ if (pm.this.error[0] != 0)
+ fprintf(stderr, "pngvalid: first error: %s\n", pm.this.error);
+
+ fprintf(stderr, "pngvalid: run with -v to see what happened\n");
+ }
+ exit(1);
+ }
+
+ if (summary && !pm.this.speed)
+ {
+ printf("Results using %s point arithmetic %s\n",
+#if defined(PNG_FLOATING_ARITHMETIC_SUPPORTED) || PNG_LIBPNG_VER < 10500
+ "floating",
+#else
+ "fixed",
+#endif
+ (pm.this.nerrors || (pm.this.treat_warnings_as_errors &&
+ pm.this.nwarnings)) ? "(errors)" : (pm.this.nwarnings ?
+ "(warnings)" : "(no errors or warnings)")
+ );
+ printf("Allocated memory statistics (in bytes):\n"
+ "\tread %lu maximum single, %lu peak, %lu total\n"
+ "\twrite %lu maximum single, %lu peak, %lu total\n",
+ (unsigned long)pm.this.read_memory_pool.max_max,
+ (unsigned long)pm.this.read_memory_pool.max_limit,
+ (unsigned long)pm.this.read_memory_pool.max_total,
+ (unsigned long)pm.this.write_memory_pool.max_max,
+ (unsigned long)pm.this.write_memory_pool.max_limit,
+ (unsigned long)pm.this.write_memory_pool.max_total);
+ }
+
+ /* Do this here to provoke memory corruption errors in memory not directly
+ * allocated by libpng - not a complete test, but better than nothing.
+ */
+ store_delete(&pm.this);
+
+ /* Error exit if there are any errors, and maybe if there are any
+ * warnings.
+ */
+ if (pm.this.nerrors || (pm.this.treat_warnings_as_errors &&
+ pm.this.nwarnings))
+ {
+ if (!pm.this.verbose)
+ fprintf(stderr, "pngvalid: %s\n", pm.this.error);
+
+ fprintf(stderr, "pngvalid: %d errors, %d warnings\n", pm.this.nerrors,
+ pm.this.nwarnings);
+
+ exit(1);
+ }
+
+ /* Success case. */
+ if (touch != NULL)
+ {
+ FILE *fsuccess = fopen(touch, "wt");
+
+ if (fsuccess != NULL)
+ {
+ int error = 0;
+ fprintf(fsuccess, "PNG validation succeeded\n");
+ fflush(fsuccess);
+ error = ferror(fsuccess);
+
+ if (fclose(fsuccess) || error)
+ {
+ fprintf(stderr, "%s: write failed\n", touch);
+ exit(1);
+ }
+ }
+ }
+
+ return 0;
+}
diff --git a/src/3rdparty/libpng/pngwio.c b/src/3rdparty/libpng/pngwio.c
index f4d995b..95ffb34 100644
--- a/src/3rdparty/libpng/pngwio.c
+++ b/src/3rdparty/libpng/pngwio.c
@@ -1,8 +1,8 @@
/* pngwio.c - functions for data output
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -18,11 +18,10 @@
* them at run time with png_set_write_fn(...).
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
+#ifdef PNG_WRITE_SUPPORTED
+
/* Write the data to whatever output you are using. The default routine
* writes to a file pointer. Note that this routine sometimes gets called
* with very small lengths, so you should implement some kind of simple
@@ -31,10 +30,12 @@
*/
void /* PRIVATE */
-png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
+png_write_data(png_structp png_ptr, png_const_bytep data, png_size_t length)
{
+ /* NOTE: write_data_fn must not change the buffer! */
if (png_ptr->write_data_fn != NULL )
- (*(png_ptr->write_data_fn))(png_ptr, data, length);
+ (*(png_ptr->write_data_fn))(png_ptr, (png_bytep)data, length);
+
else
png_error(png_ptr, "Call to NULL write function");
}
@@ -46,14 +47,16 @@ png_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
* than changing the library.
*/
#ifndef USE_FAR_KEYWORD
-void PNGAPI
+void PNGCBAPI
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
- png_uint_32 check;
+ png_size_t check;
if (png_ptr == NULL)
return;
+
check = fwrite(data, 1, length, (png_FILE_p)(png_ptr->io_ptr));
+
if (check != length)
png_error(png_ptr, "Write Error");
}
@@ -66,7 +69,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
#define NEAR_BUF_SIZE 1024
#define MIN(a,b) (a <= b ? a : b)
-void PNGAPI
+void PNGCBAPI
png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
{
png_uint_32 check;
@@ -75,24 +78,29 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
if (png_ptr == NULL)
return;
+
/* Check if data really is near. If so, use usual code. */
near_data = (png_byte *)CVT_PTR_NOCHECK(data);
io_ptr = (png_FILE_p)CVT_PTR(png_ptr->io_ptr);
+
if ((png_bytep)near_data == data)
{
check = fwrite(near_data, 1, length, io_ptr);
}
+
else
{
png_byte buf[NEAR_BUF_SIZE];
png_size_t written, remaining, err;
check = 0;
remaining = length;
+
do
{
written = MIN(NEAR_BUF_SIZE, remaining);
png_memcpy(buf, data, written); /* Copy far buffer to near buffer */
err = fwrite(buf, 1, written, io_ptr);
+
if (err != written)
break;
@@ -104,6 +112,7 @@ png_default_write_data(png_structp png_ptr, png_bytep data, png_size_t length)
}
while (remaining != 0);
}
+
if (check != length)
png_error(png_ptr, "Write Error");
}
@@ -123,17 +132,19 @@ png_flush(png_structp png_ptr)
(*(png_ptr->output_flush_fn))(png_ptr);
}
-#ifdef PNG_STDIO_SUPPORTED
-void PNGAPI
+# ifdef PNG_STDIO_SUPPORTED
+void PNGCBAPI
png_default_flush(png_structp png_ptr)
{
png_FILE_p io_ptr;
+
if (png_ptr == NULL)
return;
+
io_ptr = (png_FILE_p)CVT_PTR((png_ptr->io_ptr));
fflush(io_ptr);
}
-#endif
+# endif
#endif
/* This function allows the application to supply new output functions for
@@ -155,7 +166,7 @@ png_default_flush(png_structp png_ptr)
* arguments a pointer to a png_struct. After a call to
* the flush function, there should be no data in any buffers
* or pending transmission. If the output method doesn't do
- * any buffering of ouput, a function prototype must still be
+ * any buffering of output, a function prototype must still be
* supplied although it doesn't have to do anything. If
* PNG_WRITE_FLUSH_SUPPORTED is not defined at libpng compile
* time, output_flush_fn will be ignored, although it must be
@@ -167,7 +178,7 @@ png_default_flush(png_structp png_ptr)
*/
void PNGAPI
png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
- png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
+ png_rw_ptr write_data_fn, png_flush_ptr output_flush_fn)
{
if (png_ptr == NULL)
return;
@@ -185,30 +196,32 @@ png_set_write_fn(png_structp png_ptr, png_voidp io_ptr,
#endif
#ifdef PNG_WRITE_FLUSH_SUPPORTED
-#ifdef PNG_STDIO_SUPPORTED
+# ifdef PNG_STDIO_SUPPORTED
+
if (output_flush_fn != NULL)
png_ptr->output_flush_fn = output_flush_fn;
else
png_ptr->output_flush_fn = png_default_flush;
-#else
+
+# else
png_ptr->output_flush_fn = output_flush_fn;
-#endif
+# endif
#endif /* PNG_WRITE_FLUSH_SUPPORTED */
/* It is an error to read while writing a png file */
if (png_ptr->read_data_fn != NULL)
{
png_ptr->read_data_fn = NULL;
+
png_warning(png_ptr,
- "Attempted to set both read_data_fn and write_data_fn in");
- png_warning(png_ptr,
- "the same structure. Resetting read_data_fn to NULL");
+ "Can't set both read_data_fn and write_data_fn in the"
+ " same structure");
}
}
#ifdef USE_FAR_KEYWORD
-#ifdef _MSC_VER
+# ifdef _MSC_VER
void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
{
void *near_ptr;
@@ -236,6 +249,6 @@ void *png_far_to_near(png_structp png_ptr, png_voidp ptr, int check)
return(near_ptr);
}
-# endif
-# endif
+# endif
+#endif
#endif /* PNG_WRITE_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngwrite.c b/src/3rdparty/libpng/pngwrite.c
index 01a7f60..d90f449 100644
--- a/src/3rdparty/libpng/pngwrite.c
+++ b/src/3rdparty/libpng/pngwrite.c
@@ -1,8 +1,8 @@
/* pngwrite.c - general routines to write a PNG file
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.1 [February 3, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,12 +11,10 @@
* and license in png.h
*/
-/* Get internal access to png.h */
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
+#ifdef PNG_WRITE_SUPPORTED
+
/* Writes all the PNG information. This is the suggested way to use the
* library. If you have a new chunk to add, make a function to write it,
* and put it in the correct location here. If you want the chunk written
@@ -33,49 +31,46 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
if (png_ptr == NULL || info_ptr == NULL)
return;
+
if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
{
/* Write PNG signature */
png_write_sig(png_ptr);
+
#ifdef PNG_MNG_FEATURES_SUPPORTED
- if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE)&&(png_ptr->mng_features_permitted))
+ if ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) && \
+ (png_ptr->mng_features_permitted))
{
png_warning(png_ptr, "MNG features are not allowed in a PNG datastream");
png_ptr->mng_features_permitted = 0;
}
#endif
+
/* Write IHDR information. */
png_write_IHDR(png_ptr, info_ptr->width, info_ptr->height,
- info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type,
- info_ptr->filter_type,
+ info_ptr->bit_depth, info_ptr->color_type, info_ptr->compression_type,
+ info_ptr->filter_type,
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
- info_ptr->interlace_type);
+ info_ptr->interlace_type);
#else
- 0);
+ 0);
#endif
/* The rest of these check to see if the valid field has the appropriate
* flag set, and if it does, writes the chunk.
*/
#ifdef PNG_WRITE_gAMA_SUPPORTED
if (info_ptr->valid & PNG_INFO_gAMA)
- {
-# ifdef PNG_FLOATING_POINT_SUPPORTED
- png_write_gAMA(png_ptr, info_ptr->gamma);
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
- png_write_gAMA_fixed(png_ptr, info_ptr->int_gamma);
-# endif
-#endif
- }
+ png_write_gAMA_fixed(png_ptr, info_ptr->gamma);
#endif
#ifdef PNG_WRITE_sRGB_SUPPORTED
if (info_ptr->valid & PNG_INFO_sRGB)
png_write_sRGB(png_ptr, (int)info_ptr->srgb_intent);
#endif
+
#ifdef PNG_WRITE_iCCP_SUPPORTED
if (info_ptr->valid & PNG_INFO_iCCP)
png_write_iCCP(png_ptr, info_ptr->iccp_name, PNG_COMPRESSION_TYPE_BASE,
- info_ptr->iccp_profile, (int)info_ptr->iccp_proflen);
+ (png_charp)info_ptr->iccp_profile, (int)info_ptr->iccp_proflen);
#endif
#ifdef PNG_WRITE_sBIT_SUPPORTED
if (info_ptr->valid & PNG_INFO_sBIT)
@@ -83,24 +78,13 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
#endif
#ifdef PNG_WRITE_cHRM_SUPPORTED
if (info_ptr->valid & PNG_INFO_cHRM)
- {
-#ifdef PNG_FLOATING_POINT_SUPPORTED
- png_write_cHRM(png_ptr,
- info_ptr->x_white, info_ptr->y_white,
- info_ptr->x_red, info_ptr->y_red,
- info_ptr->x_green, info_ptr->y_green,
- info_ptr->x_blue, info_ptr->y_blue);
-#else
-# ifdef PNG_FIXED_POINT_SUPPORTED
png_write_cHRM_fixed(png_ptr,
- info_ptr->int_x_white, info_ptr->int_y_white,
- info_ptr->int_x_red, info_ptr->int_y_red,
- info_ptr->int_x_green, info_ptr->int_y_green,
- info_ptr->int_x_blue, info_ptr->int_y_blue);
-# endif
-#endif
- }
+ info_ptr->x_white, info_ptr->y_white,
+ info_ptr->x_red, info_ptr->y_red,
+ info_ptr->x_green, info_ptr->y_green,
+ info_ptr->x_blue, info_ptr->y_blue);
#endif
+
#ifdef PNG_WRITE_UNKNOWN_CHUNKS_SUPPORTED
if (info_ptr->unknown_chunks_num)
{
@@ -113,14 +97,16 @@ png_write_info_before_PLTE(png_structp png_ptr, png_infop info_ptr)
up++)
{
int keep = png_handle_as_unknown(png_ptr, up->name);
+
if (keep != PNG_HANDLE_CHUNK_NEVER &&
- up->location && !(up->location & PNG_HAVE_PLTE) &&
- !(up->location & PNG_HAVE_IDAT) &&
- ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
- (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
+ up->location && !(up->location & PNG_HAVE_PLTE) &&
+ !(up->location & PNG_HAVE_IDAT) &&
+ ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
+ (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
{
if (up->size == 0)
png_warning(png_ptr, "Writing zero-length unknown chunk");
+
png_write_chunk(png_ptr, up->name, up->data, up->size);
}
}
@@ -146,7 +132,8 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
if (info_ptr->valid & PNG_INFO_PLTE)
png_write_PLTE(png_ptr, info_ptr->palette,
- (png_uint_32)info_ptr->num_palette);
+ (png_uint_32)info_ptr->num_palette);
+
else if (info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
png_error(png_ptr, "Valid palette required for paletted images");
@@ -156,59 +143,51 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
/* Invert the alpha channel (in tRNS) */
if ((png_ptr->transformations & PNG_INVERT_ALPHA) &&
- info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
+ info_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
{
int j;
for (j = 0; j<(int)info_ptr->num_trans; j++)
- info_ptr->trans_alpha[j] = (png_byte)(255 - info_ptr->trans_alpha[j]);
+ info_ptr->trans_alpha[j] =
+ (png_byte)(255 - info_ptr->trans_alpha[j]);
}
#endif
png_write_tRNS(png_ptr, info_ptr->trans_alpha, &(info_ptr->trans_color),
- info_ptr->num_trans, info_ptr->color_type);
+ info_ptr->num_trans, info_ptr->color_type);
}
#endif
#ifdef PNG_WRITE_bKGD_SUPPORTED
if (info_ptr->valid & PNG_INFO_bKGD)
png_write_bKGD(png_ptr, &(info_ptr->background), info_ptr->color_type);
#endif
+
#ifdef PNG_WRITE_hIST_SUPPORTED
if (info_ptr->valid & PNG_INFO_hIST)
png_write_hIST(png_ptr, info_ptr->hist, info_ptr->num_palette);
#endif
+
#ifdef PNG_WRITE_oFFs_SUPPORTED
if (info_ptr->valid & PNG_INFO_oFFs)
png_write_oFFs(png_ptr, info_ptr->x_offset, info_ptr->y_offset,
- info_ptr->offset_unit_type);
+ info_ptr->offset_unit_type);
#endif
+
#ifdef PNG_WRITE_pCAL_SUPPORTED
if (info_ptr->valid & PNG_INFO_pCAL)
png_write_pCAL(png_ptr, info_ptr->pcal_purpose, info_ptr->pcal_X0,
- info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,
- info_ptr->pcal_units, info_ptr->pcal_params);
+ info_ptr->pcal_X1, info_ptr->pcal_type, info_ptr->pcal_nparams,
+ info_ptr->pcal_units, info_ptr->pcal_params);
#endif
-#ifdef PNG_sCAL_SUPPORTED
- if (info_ptr->valid & PNG_INFO_sCAL)
#ifdef PNG_WRITE_sCAL_SUPPORTED
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
- png_write_sCAL(png_ptr, (int)info_ptr->scal_unit,
- info_ptr->scal_pixel_width, info_ptr->scal_pixel_height);
-#else /* !FLOATING_POINT */
-#ifdef PNG_FIXED_POINT_SUPPORTED
+ if (info_ptr->valid & PNG_INFO_sCAL)
png_write_sCAL_s(png_ptr, (int)info_ptr->scal_unit,
info_ptr->scal_s_width, info_ptr->scal_s_height);
-#endif /* FIXED_POINT */
-#endif /* FLOATING_POINT */
-#else /* !WRITE_sCAL */
- png_warning(png_ptr,
- "png_write_sCAL not supported; sCAL chunk not written");
-#endif /* WRITE_sCAL */
#endif /* sCAL */
#ifdef PNG_WRITE_pHYs_SUPPORTED
if (info_ptr->valid & PNG_INFO_pHYs)
png_write_pHYs(png_ptr, info_ptr->x_pixels_per_unit,
- info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type);
+ info_ptr->y_pixels_per_unit, info_ptr->phys_unit_type);
#endif /* pHYs */
#ifdef PNG_WRITE_tIME_SUPPORTED
@@ -221,8 +200,8 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_WRITE_sPLT_SUPPORTED
if (info_ptr->valid & PNG_INFO_sPLT)
- for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)
- png_write_sPLT(png_ptr, info_ptr->splt_palettes + i);
+ for (i = 0; i < (int)info_ptr->splt_palettes_num; i++)
+ png_write_sPLT(png_ptr, info_ptr->splt_palettes + i);
#endif /* sPLT */
#ifdef PNG_WRITE_TEXT_SUPPORTED
@@ -230,45 +209,47 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
for (i = 0; i < info_ptr->num_text; i++)
{
png_debug2(2, "Writing header text chunk %d, type %d", i,
- info_ptr->text[i].compression);
+ info_ptr->text[i].compression);
/* An internationalized chunk? */
if (info_ptr->text[i].compression > 0)
{
#ifdef PNG_WRITE_iTXt_SUPPORTED
- /* Write international chunk */
- png_write_iTXt(png_ptr,
- info_ptr->text[i].compression,
- info_ptr->text[i].key,
- info_ptr->text[i].lang,
- info_ptr->text[i].lang_key,
- info_ptr->text[i].text);
+ /* Write international chunk */
+ png_write_iTXt(png_ptr,
+ info_ptr->text[i].compression,
+ info_ptr->text[i].key,
+ info_ptr->text[i].lang,
+ info_ptr->text[i].lang_key,
+ info_ptr->text[i].text);
#else
png_warning(png_ptr, "Unable to write international text");
#endif
/* Mark this chunk as written */
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
}
+
/* If we want a compressed text chunk */
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_zTXt)
{
#ifdef PNG_WRITE_zTXt_SUPPORTED
/* Write compressed chunk */
png_write_zTXt(png_ptr, info_ptr->text[i].key,
- info_ptr->text[i].text, 0,
- info_ptr->text[i].compression);
+ info_ptr->text[i].text, 0,
+ info_ptr->text[i].compression);
#else
png_warning(png_ptr, "Unable to write compressed text");
#endif
/* Mark this chunk as written */
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
}
+
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
{
#ifdef PNG_WRITE_tEXt_SUPPORTED
/* Write uncompressed chunk */
png_write_tEXt(png_ptr, info_ptr->text[i].key,
- info_ptr->text[i].text,
- 0);
+ info_ptr->text[i].text,
+ 0);
/* Mark this chunk as written */
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
#else
@@ -292,10 +273,10 @@ png_write_info(png_structp png_ptr, png_infop info_ptr)
{
int keep = png_handle_as_unknown(png_ptr, up->name);
if (keep != PNG_HANDLE_CHUNK_NEVER &&
- up->location && (up->location & PNG_HAVE_PLTE) &&
- !(up->location & PNG_HAVE_IDAT) &&
- ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
- (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
+ up->location && (up->location & PNG_HAVE_PLTE) &&
+ !(up->location & PNG_HAVE_IDAT) &&
+ ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
+ (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
{
png_write_chunk(png_ptr, up->name, up->data, up->size);
}
@@ -316,6 +297,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
if (png_ptr == NULL)
return;
+
if (!(png_ptr->mode & PNG_HAVE_IDAT))
png_error(png_ptr, "No IDATs written into file");
@@ -328,8 +310,9 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_WRITE_tIME_SUPPORTED
/* Check to see if user has supplied a time chunk */
if ((info_ptr->valid & PNG_INFO_tIME) &&
- !(png_ptr->mode & PNG_WROTE_tIME))
+ !(png_ptr->mode & PNG_WROTE_tIME))
png_write_tIME(png_ptr, &(info_ptr->mod_time));
+
#endif
#ifdef PNG_WRITE_TEXT_SUPPORTED
/* Loop through comment chunks */
@@ -343,36 +326,38 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_WRITE_iTXt_SUPPORTED
/* Write international chunk */
png_write_iTXt(png_ptr,
- info_ptr->text[i].compression,
- info_ptr->text[i].key,
- info_ptr->text[i].lang,
- info_ptr->text[i].lang_key,
- info_ptr->text[i].text);
+ info_ptr->text[i].compression,
+ info_ptr->text[i].key,
+ info_ptr->text[i].lang,
+ info_ptr->text[i].lang_key,
+ info_ptr->text[i].text);
#else
png_warning(png_ptr, "Unable to write international text");
#endif
/* Mark this chunk as written */
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_NONE_WR;
}
+
else if (info_ptr->text[i].compression >= PNG_TEXT_COMPRESSION_zTXt)
{
#ifdef PNG_WRITE_zTXt_SUPPORTED
/* Write compressed chunk */
png_write_zTXt(png_ptr, info_ptr->text[i].key,
- info_ptr->text[i].text, 0,
- info_ptr->text[i].compression);
+ info_ptr->text[i].text, 0,
+ info_ptr->text[i].compression);
#else
png_warning(png_ptr, "Unable to write compressed text");
#endif
/* Mark this chunk as written */
info_ptr->text[i].compression = PNG_TEXT_COMPRESSION_zTXt_WR;
}
+
else if (info_ptr->text[i].compression == PNG_TEXT_COMPRESSION_NONE)
{
#ifdef PNG_WRITE_tEXt_SUPPORTED
/* Write uncompressed chunk */
png_write_tEXt(png_ptr, info_ptr->text[i].key,
- info_ptr->text[i].text, 0);
+ info_ptr->text[i].text, 0);
#else
png_warning(png_ptr, "Unable to write uncompressed text");
#endif
@@ -395,9 +380,9 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
{
int keep = png_handle_as_unknown(png_ptr, up->name);
if (keep != PNG_HANDLE_CHUNK_NEVER &&
- up->location && (up->location & PNG_AFTER_IDAT) &&
- ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
- (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
+ up->location && (up->location & PNG_AFTER_IDAT) &&
+ ((up->name[3] & 0x20) || keep == PNG_HANDLE_CHUNK_ALWAYS ||
+ (png_ptr->flags & PNG_FLAG_KEEP_UNSAFE_CHUNKS)))
{
png_write_chunk(png_ptr, up->name, up->data, up->size);
}
@@ -427,7 +412,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
#ifdef PNG_CONVERT_tIME_SUPPORTED
/* "tm" structure is not supported on WindowsCE */
void PNGAPI
-png_convert_from_struct_tm(png_timep ptime, struct tm FAR * ttime)
+png_convert_from_struct_tm(png_timep ptime, PNG_CONST struct tm FAR * ttime)
{
png_debug(1, "in png_convert_from_struct_tm");
@@ -452,20 +437,22 @@ png_convert_from_time_t(png_timep ptime, time_t ttime)
#endif
/* Initialize png_ptr structure, and allocate any memory needed */
-png_structp PNGAPI
-png_create_write_struct(png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn)
+PNG_FUNCTION(png_structp,PNGAPI
+png_create_write_struct,(png_const_charp user_png_ver, png_voidp error_ptr,
+ png_error_ptr error_fn, png_error_ptr warn_fn),PNG_ALLOCATED)
{
#ifdef PNG_USER_MEM_SUPPORTED
return (png_create_write_struct_2(user_png_ver, error_ptr, error_fn,
- warn_fn, NULL, NULL, NULL));
+ warn_fn, NULL, NULL, NULL));
}
/* Alternate initialize png_ptr structure, and allocate any memory needed */
-png_structp PNGAPI
-png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
- png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
- png_malloc_ptr malloc_fn, png_free_ptr free_fn)
+static void png_reset_filter_heuristics(png_structp png_ptr); /* forward decl */
+
+PNG_FUNCTION(png_structp,PNGAPI
+png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
+ png_error_ptr error_fn, png_error_ptr warn_fn, png_voidp mem_ptr,
+ png_malloc_ptr malloc_fn, png_free_ptr free_fn),PNG_ALLOCATED)
{
#endif /* PNG_USER_MEM_SUPPORTED */
volatile int png_cleanup_needed = 0;
@@ -475,7 +462,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_structp png_ptr;
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
- jmp_buf jmpbuf;
+ jmp_buf png_jmpbuf;
#endif
#endif
int i;
@@ -484,7 +471,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
#ifdef PNG_USER_MEM_SUPPORTED
png_ptr = (png_structp)png_create_struct_2(PNG_STRUCT_PNG,
- (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
+ (png_malloc_ptr)malloc_fn, (png_voidp)mem_ptr);
#else
png_ptr = (png_structp)png_create_struct(PNG_STRUCT_PNG);
#endif /* PNG_USER_MEM_SUPPORTED */
@@ -502,12 +489,12 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
encounter a png_error() will longjmp here. Since the jmpbuf is
then meaningless we abort instead of returning. */
#ifdef USE_FAR_KEYWORD
- if (setjmp(jmpbuf))
+ if (setjmp(png_jmpbuf))
#else
if (setjmp(png_jmpbuf(png_ptr))) /* sets longjmp to match setjmp */
#endif
#ifdef USE_FAR_KEYWORD
- png_memcpy(png_jmpbuf(png_ptr), jmpbuf, png_sizeof(jmp_buf));
+ png_memcpy(png_jmpbuf(png_ptr), png_jmpbuf, png_sizeof(jmp_buf));
#endif
PNG_ABORT();
#endif
@@ -538,38 +525,40 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
(user_png_ver[0] == '1' && user_png_ver[2] != png_libpng_ver[2]) ||
(user_png_ver[0] == '0' && user_png_ver[2] < '9'))
{
-#ifdef PNG_STDIO_SUPPORTED
+#ifdef PNG_CONSOLE_IO_SUPPORTED
char msg[80];
+
if (user_png_ver)
{
- png_snprintf(msg, 80,
- "Application was compiled with png.h from libpng-%.20s",
- user_png_ver);
- png_warning(png_ptr, msg);
- }
- png_snprintf(msg, 80,
- "Application is running with png.c from libpng-%.20s",
- png_libpng_ver);
- png_warning(png_ptr, msg);
+ png_snprintf2(msg, 80,
+ "Application built with libpng-%.20s"
+ " but running with %.20s",
+ user_png_ver,
+ png_libpng_ver);
+ png_warning(png_ptr, msg);
+ }
+#else
+ png_warning(png_ptr,
+ "Incompatible libpng version in application and library");
#endif
#ifdef PNG_ERROR_NUMBERS_SUPPORTED
png_ptr->flags = 0;
#endif
- png_warning(png_ptr,
- "Incompatible libpng version in application and library");
png_cleanup_needed = 1;
}
}
/* Initialize zbuf - compression buffer */
png_ptr->zbuf_size = PNG_ZBUF_SIZE;
+
if (!png_cleanup_needed)
{
png_ptr->zbuf = (png_bytep)png_malloc_warn(png_ptr,
- png_ptr->zbuf_size);
+ png_ptr->zbuf_size);
if (png_ptr->zbuf == NULL)
png_cleanup_needed = 1;
}
+
if (png_cleanup_needed)
{
/* Clean up PNG structure and deallocate any memory. */
@@ -577,7 +566,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_ptr->zbuf = NULL;
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2((png_voidp)png_ptr,
- (png_free_ptr)free_fn, (png_voidp)mem_ptr);
+ (png_free_ptr)free_fn, (png_voidp)mem_ptr);
#else
png_destroy_struct((png_voidp)png_ptr);
#endif
@@ -587,8 +576,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
png_set_write_fn(png_ptr, NULL, NULL, NULL);
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
- png_set_filter_heuristics(png_ptr, PNG_FILTER_HEURISTIC_DEFAULT,
- 1, NULL, NULL);
+ png_reset_filter_heuristics(png_ptr);
#endif
return (png_ptr);
@@ -602,7 +590,7 @@ png_create_write_struct_2(png_const_charp user_png_ver, png_voidp error_ptr,
*/
void PNGAPI
png_write_rows(png_structp png_ptr, png_bytepp row,
- png_uint_32 num_rows)
+ png_uint_32 num_rows)
{
png_uint_32 i; /* row counter */
png_bytepp rp; /* row pointer */
@@ -655,12 +643,12 @@ png_write_image(png_structp png_ptr, png_bytepp image)
/* Called by user to write a row of image data */
void PNGAPI
-png_write_row(png_structp png_ptr, png_bytep row)
+png_write_row(png_structp png_ptr, png_const_bytep row)
{
if (png_ptr == NULL)
return;
- png_debug2(1, "in png_write_row (row %ld, pass %d)",
+ png_debug2(1, "in png_write_row (row %u, pass %d)",
png_ptr->row_number, png_ptr->pass);
/* Initialize transformations and other stuff if first time */
@@ -669,33 +657,40 @@ png_write_row(png_structp png_ptr, png_bytep row)
/* Make sure we wrote the header info */
if (!(png_ptr->mode & PNG_WROTE_INFO_BEFORE_PLTE))
png_error(png_ptr,
- "png_write_info was never called before png_write_row");
+ "png_write_info was never called before png_write_row");
/* Check for transforms that have been set but were defined out */
#if !defined(PNG_WRITE_INVERT_SUPPORTED) && defined(PNG_READ_INVERT_SUPPORTED)
if (png_ptr->transformations & PNG_INVERT_MONO)
png_warning(png_ptr, "PNG_WRITE_INVERT_SUPPORTED is not defined");
#endif
+
#if !defined(PNG_WRITE_FILLER_SUPPORTED) && defined(PNG_READ_FILLER_SUPPORTED)
if (png_ptr->transformations & PNG_FILLER)
png_warning(png_ptr, "PNG_WRITE_FILLER_SUPPORTED is not defined");
#endif
-#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && defined(PNG_READ_PACKSWAP_SUPPORTED)
+#if !defined(PNG_WRITE_PACKSWAP_SUPPORTED) && \
+ defined(PNG_READ_PACKSWAP_SUPPORTED)
if (png_ptr->transformations & PNG_PACKSWAP)
- png_warning(png_ptr, "PNG_WRITE_PACKSWAP_SUPPORTED is not defined");
+ png_warning(png_ptr,
+ "PNG_WRITE_PACKSWAP_SUPPORTED is not defined");
#endif
+
#if !defined(PNG_WRITE_PACK_SUPPORTED) && defined(PNG_READ_PACK_SUPPORTED)
if (png_ptr->transformations & PNG_PACK)
png_warning(png_ptr, "PNG_WRITE_PACK_SUPPORTED is not defined");
#endif
+
#if !defined(PNG_WRITE_SHIFT_SUPPORTED) && defined(PNG_READ_SHIFT_SUPPORTED)
if (png_ptr->transformations & PNG_SHIFT)
png_warning(png_ptr, "PNG_WRITE_SHIFT_SUPPORTED is not defined");
#endif
+
#if !defined(PNG_WRITE_BGR_SUPPORTED) && defined(PNG_READ_BGR_SUPPORTED)
if (png_ptr->transformations & PNG_BGR)
png_warning(png_ptr, "PNG_WRITE_BGR_SUPPORTED is not defined");
#endif
+
#if !defined(PNG_WRITE_SWAP_SUPPORTED) && defined(PNG_READ_SWAP_SUPPORTED)
if (png_ptr->transformations & PNG_SWAP_BYTES)
png_warning(png_ptr, "PNG_WRITE_SWAP_SUPPORTED is not defined");
@@ -717,6 +712,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
return;
}
break;
+
case 1:
if ((png_ptr->row_number & 0x07) || png_ptr->width < 5)
{
@@ -724,6 +720,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
return;
}
break;
+
case 2:
if ((png_ptr->row_number & 0x07) != 4)
{
@@ -731,6 +728,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
return;
}
break;
+
case 3:
if ((png_ptr->row_number & 0x03) || png_ptr->width < 3)
{
@@ -738,6 +736,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
return;
}
break;
+
case 4:
if ((png_ptr->row_number & 0x03) != 2)
{
@@ -745,6 +744,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
return;
}
break;
+
case 5:
if ((png_ptr->row_number & 0x01) || png_ptr->width < 2)
{
@@ -752,6 +752,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
return;
}
break;
+
case 6:
if (!(png_ptr->row_number & 0x01))
{
@@ -759,6 +760,9 @@ png_write_row(png_structp png_ptr, png_bytep row)
return;
}
break;
+
+ default: /* error: ignore it */
+ break;
}
}
#endif
@@ -775,11 +779,12 @@ png_write_row(png_structp png_ptr, png_bytep row)
png_ptr->row_info.width);
png_debug1(3, "row_info->color_type = %d", png_ptr->row_info.color_type);
- png_debug1(3, "row_info->width = %lu", png_ptr->row_info.width);
+ png_debug1(3, "row_info->width = %u", png_ptr->row_info.width);
png_debug1(3, "row_info->channels = %d", png_ptr->row_info.channels);
png_debug1(3, "row_info->bit_depth = %d", png_ptr->row_info.bit_depth);
png_debug1(3, "row_info->pixel_depth = %d", png_ptr->row_info.pixel_depth);
- png_debug1(3, "row_info->rowbytes = %lu", png_ptr->row_info.rowbytes);
+ png_debug1(3, "row_info->rowbytes = %lu",
+ (unsigned long)png_ptr->row_info.rowbytes);
/* Copy user's row into buffer, leaving room for filter byte. */
png_memcpy(png_ptr->row_buf + 1, row, png_ptr->row_info.rowbytes);
@@ -787,10 +792,10 @@ png_write_row(png_structp png_ptr, png_bytep row)
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
/* Handle interlacing */
if (png_ptr->interlaced && png_ptr->pass < 6 &&
- (png_ptr->transformations & PNG_INTERLACE))
+ (png_ptr->transformations & PNG_INTERLACE))
{
png_do_write_interlace(&(png_ptr->row_info),
- png_ptr->row_buf + 1, png_ptr->pass);
+ png_ptr->row_buf + 1, png_ptr->pass);
/* This should always get caught above, but still ... */
if (!(png_ptr->row_info.width))
{
@@ -815,7 +820,7 @@ png_write_row(png_structp png_ptr, png_bytep row)
* 5. The color_type is RGB or RGBA
*/
if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
- (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
+ (png_ptr->filter_type == PNG_INTRAPIXEL_DIFFERENCING))
{
/* Intrapixel differencing */
png_do_write_intrapixel(&(png_ptr->row_info), png_ptr->row_buf + 1);
@@ -838,6 +843,7 @@ png_set_flush(png_structp png_ptr, int nrows)
if (png_ptr == NULL)
return;
+
png_ptr->flush_dist = (nrows < 0 ? 0 : nrows);
}
@@ -851,6 +857,7 @@ png_write_flush(png_structp png_ptr)
if (png_ptr == NULL)
return;
+
/* We have already written out all of the data */
if (png_ptr->row_number >= png_ptr->num_rows)
return;
@@ -868,6 +875,7 @@ png_write_flush(png_structp png_ptr)
{
if (png_ptr->zstream.msg != NULL)
png_error(png_ptr, png_ptr->zstream.msg);
+
else
png_error(png_ptr, "zlib error");
}
@@ -875,20 +883,19 @@ png_write_flush(png_structp png_ptr)
if (!(png_ptr->zstream.avail_out))
{
/* Write the IDAT and reset the zlib output buffer */
- png_write_IDAT(png_ptr, png_ptr->zbuf,
- png_ptr->zbuf_size);
+ png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size);
png_ptr->zstream.next_out = png_ptr->zbuf;
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
wrote_IDAT = 1;
}
- } while(wrote_IDAT == 1);
+ } while (wrote_IDAT == 1);
/* If there is any data left to be output, write it into a new IDAT */
if (png_ptr->zbuf_size != png_ptr->zstream.avail_out)
{
/* Write the IDAT and reset the zlib output buffer */
png_write_IDAT(png_ptr, png_ptr->zbuf,
- png_ptr->zbuf_size - png_ptr->zstream.avail_out);
+ png_ptr->zbuf_size - png_ptr->zstream.avail_out);
png_ptr->zstream.next_out = png_ptr->zbuf;
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
}
@@ -934,20 +941,20 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
{
if (png_ptr != NULL)
{
- png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
+ png_free_data(png_ptr, info_ptr, PNG_FREE_ALL, -1);
-#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED
- if (png_ptr->num_chunk_list)
- {
- png_free(png_ptr, png_ptr->chunk_list);
- png_ptr->num_chunk_list = 0;
- }
+#ifdef PNG_HANDLE_AS_UNKNOWN_SUPPORTED
+ if (png_ptr->num_chunk_list)
+ {
+ png_free(png_ptr, png_ptr->chunk_list);
+ png_ptr->num_chunk_list = 0;
+ }
#endif
}
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2((png_voidp)info_ptr, (png_free_ptr)free_fn,
- (png_voidp)mem_ptr);
+ (png_voidp)mem_ptr);
#else
png_destroy_struct((png_voidp)info_ptr);
#endif
@@ -959,7 +966,7 @@ png_destroy_write_struct(png_structpp png_ptr_ptr, png_infopp info_ptr_ptr)
png_write_destroy(png_ptr);
#ifdef PNG_USER_MEM_SUPPORTED
png_destroy_struct_2((png_voidp)png_ptr, (png_free_ptr)free_fn,
- (png_voidp)mem_ptr);
+ (png_voidp)mem_ptr);
#else
png_destroy_struct((png_voidp)png_ptr);
#endif
@@ -1003,16 +1010,15 @@ png_write_destroy(png_structp png_ptr)
#endif
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
- png_free(png_ptr, png_ptr->prev_filters);
- png_free(png_ptr, png_ptr->filter_weights);
- png_free(png_ptr, png_ptr->inv_filter_weights);
+ /* Use this to save a little code space, it doesn't free the filter_costs */
+ png_reset_filter_heuristics(png_ptr);
png_free(png_ptr, png_ptr->filter_costs);
png_free(png_ptr, png_ptr->inv_filter_costs);
#endif
#ifdef PNG_SETJMP_SUPPORTED
/* Reset structure */
- png_memcpy(tmp_jmp, png_ptr->jmpbuf, png_sizeof(jmp_buf));
+ png_memcpy(tmp_jmp, png_ptr->png_jmpbuf, png_sizeof(jmp_buf));
#endif
error_fn = png_ptr->error_fn;
@@ -1032,7 +1038,7 @@ png_write_destroy(png_structp png_ptr)
#endif
#ifdef PNG_SETJMP_SUPPORTED
- png_memcpy(png_ptr->jmpbuf, tmp_jmp, png_sizeof(jmp_buf));
+ png_memcpy(png_ptr->png_jmpbuf, tmp_jmp, png_sizeof(jmp_buf));
#endif
}
@@ -1044,10 +1050,12 @@ png_set_filter(png_structp png_ptr, int method, int filters)
if (png_ptr == NULL)
return;
+
#ifdef PNG_MNG_FEATURES_SUPPORTED
if ((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
- (method == PNG_INTRAPIXEL_DIFFERENCING))
- method = PNG_FILTER_TYPE_BASE;
+ (method == PNG_INTRAPIXEL_DIFFERENCING))
+ method = PNG_FILTER_TYPE_BASE;
+
#endif
if (method == PNG_FILTER_TYPE_BASE)
{
@@ -1059,19 +1067,26 @@ png_set_filter(png_structp png_ptr, int method, int filters)
case 7: png_warning(png_ptr, "Unknown row filter for method 0");
#endif /* PNG_WRITE_FILTER_SUPPORTED */
case PNG_FILTER_VALUE_NONE:
- png_ptr->do_filter = PNG_FILTER_NONE; break;
+ png_ptr->do_filter = PNG_FILTER_NONE; break;
+
#ifdef PNG_WRITE_FILTER_SUPPORTED
case PNG_FILTER_VALUE_SUB:
- png_ptr->do_filter = PNG_FILTER_SUB; break;
+ png_ptr->do_filter = PNG_FILTER_SUB; break;
+
case PNG_FILTER_VALUE_UP:
- png_ptr->do_filter = PNG_FILTER_UP; break;
+ png_ptr->do_filter = PNG_FILTER_UP; break;
+
case PNG_FILTER_VALUE_AVG:
- png_ptr->do_filter = PNG_FILTER_AVG; break;
+ png_ptr->do_filter = PNG_FILTER_AVG; break;
+
case PNG_FILTER_VALUE_PAETH:
- png_ptr->do_filter = PNG_FILTER_PAETH; break;
- default: png_ptr->do_filter = (png_byte)filters; break;
+ png_ptr->do_filter = PNG_FILTER_PAETH; break;
+
+ default:
+ png_ptr->do_filter = (png_byte)filters; break;
#else
- default: png_warning(png_ptr, "Unknown row filter for method 0");
+ default:
+ png_warning(png_ptr, "Unknown row filter for method 0");
#endif /* PNG_WRITE_FILTER_SUPPORTED */
}
@@ -1090,7 +1105,7 @@ png_set_filter(png_structp png_ptr, int method, int filters)
if ((png_ptr->do_filter & PNG_FILTER_SUB) && png_ptr->sub_row == NULL)
{
png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,
- (png_ptr->rowbytes + 1));
+ (png_ptr->rowbytes + 1));
png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB;
}
@@ -1099,12 +1114,14 @@ png_set_filter(png_structp png_ptr, int method, int filters)
if (png_ptr->prev_row == NULL)
{
png_warning(png_ptr, "Can't add Up filter after starting");
- png_ptr->do_filter &= ~PNG_FILTER_UP;
+ png_ptr->do_filter = (png_byte)(png_ptr->do_filter &
+ ~PNG_FILTER_UP);
}
+
else
{
png_ptr->up_row = (png_bytep)png_malloc(png_ptr,
- (png_ptr->rowbytes + 1));
+ (png_ptr->rowbytes + 1));
png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;
}
}
@@ -1114,12 +1131,14 @@ png_set_filter(png_structp png_ptr, int method, int filters)
if (png_ptr->prev_row == NULL)
{
png_warning(png_ptr, "Can't add Average filter after starting");
- png_ptr->do_filter &= ~PNG_FILTER_AVG;
+ png_ptr->do_filter = (png_byte)(png_ptr->do_filter &
+ ~PNG_FILTER_AVG);
}
+
else
{
png_ptr->avg_row = (png_bytep)png_malloc(png_ptr,
- (png_ptr->rowbytes + 1));
+ (png_ptr->rowbytes + 1));
png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG;
}
}
@@ -1132,10 +1151,11 @@ png_set_filter(png_structp png_ptr, int method, int filters)
png_warning(png_ptr, "Can't add Paeth filter after starting");
png_ptr->do_filter &= (png_byte)(~PNG_FILTER_PAETH);
}
+
else
{
png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr,
- (png_ptr->rowbytes + 1));
+ (png_ptr->rowbytes + 1));
png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
}
}
@@ -1157,123 +1177,242 @@ png_set_filter(png_structp png_ptr, int method, int filters)
* better compression.
*/
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED /* GRR 970116 */
-void PNGAPI
-png_set_filter_heuristics(png_structp png_ptr, int heuristic_method,
- int num_weights, png_doublep filter_weights,
- png_doublep filter_costs)
+/* Conveneince reset API. */
+static void
+png_reset_filter_heuristics(png_structp png_ptr)
{
- int i;
-
- png_debug(1, "in png_set_filter_heuristics");
-
- if (png_ptr == NULL)
- return;
- if (heuristic_method >= PNG_FILTER_HEURISTIC_LAST)
+ /* Clear out any old values in the 'weights' - this must be done because if
+ * the app calls set_filter_heuristics multiple times with different
+ * 'num_weights' values we would otherwise potentially have wrong sized
+ * arrays.
+ */
+ png_ptr->num_prev_filters = 0;
+ png_ptr->heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED;
+ if (png_ptr->prev_filters != NULL)
{
- png_warning(png_ptr, "Unknown filter heuristic method");
- return;
+ png_bytep old = png_ptr->prev_filters;
+ png_ptr->prev_filters = NULL;
+ png_free(png_ptr, old);
}
-
- if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT)
+ if (png_ptr->filter_weights != NULL)
{
- heuristic_method = PNG_FILTER_HEURISTIC_UNWEIGHTED;
+ png_uint_16p old = png_ptr->filter_weights;
+ png_ptr->filter_weights = NULL;
+ png_free(png_ptr, old);
}
- if (num_weights < 0 || filter_weights == NULL ||
- heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED)
+ if (png_ptr->inv_filter_weights != NULL)
{
- num_weights = 0;
+ png_uint_16p old = png_ptr->inv_filter_weights;
+ png_ptr->inv_filter_weights = NULL;
+ png_free(png_ptr, old);
}
- png_ptr->num_prev_filters = (png_byte)num_weights;
- png_ptr->heuristic_method = (png_byte)heuristic_method;
+ /* Leave the filter_costs - this array is fixed size. */
+}
- if (num_weights > 0)
+static int
+png_init_filter_heuristics(png_structp png_ptr, int heuristic_method,
+ int num_weights)
+{
+ if (png_ptr == NULL)
+ return 0;
+
+ /* Clear out the arrays */
+ png_reset_filter_heuristics(png_ptr);
+
+ /* Check arguments; the 'reset' function makes the correct settings for the
+ * unweighted case, but we must handle the weight case by initializing the
+ * arrays for the caller.
+ */
+ if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
- if (png_ptr->prev_filters == NULL)
+ int i;
+
+ if (num_weights > 0)
{
png_ptr->prev_filters = (png_bytep)png_malloc(png_ptr,
- (png_uint_32)(png_sizeof(png_byte) * num_weights));
+ (png_uint_32)(png_sizeof(png_byte) * num_weights));
/* To make sure that the weighting starts out fairly */
for (i = 0; i < num_weights; i++)
{
png_ptr->prev_filters[i] = 255;
}
- }
- if (png_ptr->filter_weights == NULL)
- {
png_ptr->filter_weights = (png_uint_16p)png_malloc(png_ptr,
- (png_uint_32)(png_sizeof(png_uint_16) * num_weights));
+ (png_uint_32)(png_sizeof(png_uint_16) * num_weights));
png_ptr->inv_filter_weights = (png_uint_16p)png_malloc(png_ptr,
- (png_uint_32)(png_sizeof(png_uint_16) * num_weights));
+ (png_uint_32)(png_sizeof(png_uint_16) * num_weights));
+
for (i = 0; i < num_weights; i++)
{
png_ptr->inv_filter_weights[i] =
png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR;
}
+
+ /* Safe to set this now */
+ png_ptr->num_prev_filters = (png_byte)num_weights;
+ }
+
+ /* If, in the future, there are other filter methods, this would
+ * need to be based on png_ptr->filter.
+ */
+ if (png_ptr->filter_costs == NULL)
+ {
+ png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr,
+ (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST));
+
+ png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr,
+ (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST));
+ }
+
+ for (i = 0; i < PNG_FILTER_VALUE_LAST; i++)
+ {
+ png_ptr->inv_filter_costs[i] =
+ png_ptr->filter_costs[i] = PNG_COST_FACTOR;
}
+ /* All the arrays are inited, safe to set this: */
+ png_ptr->heuristic_method = PNG_FILTER_HEURISTIC_WEIGHTED;
+
+ /* Return the 'ok' code. */
+ return 1;
+ }
+ else if (heuristic_method == PNG_FILTER_HEURISTIC_DEFAULT ||
+ heuristic_method == PNG_FILTER_HEURISTIC_UNWEIGHTED)
+ {
+ return 1;
+ }
+ else
+ {
+ png_warning(png_ptr, "Unknown filter heuristic method");
+ return 0;
+ }
+}
+
+/* Provide floating and fixed point APIs */
+#ifdef PNG_FLOATING_POINT_SUPPORTED
+void PNGAPI
+png_set_filter_heuristics(png_structp png_ptr, int heuristic_method,
+ int num_weights, png_const_doublep filter_weights,
+ png_const_doublep filter_costs)
+{
+ png_debug(1, "in png_set_filter_heuristics");
+
+ /* The internal API allocates all the arrays and ensures that the elements of
+ * those arrays are set to the default value.
+ */
+ if (!png_init_filter_heuristics(png_ptr, heuristic_method, num_weights))
+ return;
+
+ /* If using the weighted method copy in the weights. */
+ if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
+ {
+ int i;
for (i = 0; i < num_weights; i++)
{
- if (filter_weights[i] < 0.0)
+ if (filter_weights[i] <= 0.0)
{
png_ptr->inv_filter_weights[i] =
png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR;
}
+
else
{
png_ptr->inv_filter_weights[i] =
- (png_uint_16)((double)PNG_WEIGHT_FACTOR*filter_weights[i]+0.5);
+ (png_uint_16)(PNG_WEIGHT_FACTOR*filter_weights[i]+.5);
+
png_ptr->filter_weights[i] =
- (png_uint_16)((double)PNG_WEIGHT_FACTOR/filter_weights[i]+0.5);
+ (png_uint_16)(PNG_WEIGHT_FACTOR/filter_weights[i]+.5);
}
}
- }
-
- /* If, in the future, there are other filter methods, this would
- * need to be based on png_ptr->filter.
- */
- if (png_ptr->filter_costs == NULL)
- {
- png_ptr->filter_costs = (png_uint_16p)png_malloc(png_ptr,
- (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST));
-
- png_ptr->inv_filter_costs = (png_uint_16p)png_malloc(png_ptr,
- (png_uint_32)(png_sizeof(png_uint_16) * PNG_FILTER_VALUE_LAST));
- for (i = 0; i < PNG_FILTER_VALUE_LAST; i++)
+ /* Here is where we set the relative costs of the different filters. We
+ * should take the desired compression level into account when setting
+ * the costs, so that Paeth, for instance, has a high relative cost at low
+ * compression levels, while it has a lower relative cost at higher
+ * compression settings. The filter types are in order of increasing
+ * relative cost, so it would be possible to do this with an algorithm.
+ */
+ for (i = 0; i < PNG_FILTER_VALUE_LAST; i++) if (filter_costs[i] >= 1.0)
{
png_ptr->inv_filter_costs[i] =
- png_ptr->filter_costs[i] = PNG_COST_FACTOR;
+ (png_uint_16)(PNG_COST_FACTOR / filter_costs[i] + .5);
+
+ png_ptr->filter_costs[i] =
+ (png_uint_16)(PNG_COST_FACTOR * filter_costs[i] + .5);
}
}
+}
+#endif /* FLOATING_POINT */
+
+#ifdef PNG_FIXED_POINT_SUPPORTED
+void PNGAPI
+png_set_filter_heuristics_fixed(png_structp png_ptr, int heuristic_method,
+ int num_weights, png_const_fixed_point_p filter_weights,
+ png_const_fixed_point_p filter_costs)
+{
+ png_debug(1, "in png_set_filter_heuristics_fixed");
- /* Here is where we set the relative costs of the different filters. We
- * should take the desired compression level into account when setting
- * the costs, so that Paeth, for instance, has a high relative cost at low
- * compression levels, while it has a lower relative cost at higher
- * compression settings. The filter types are in order of increasing
- * relative cost, so it would be possible to do this with an algorithm.
+ /* The internal API allocates all the arrays and ensures that the elements of
+ * those arrays are set to the default value.
*/
- for (i = 0; i < PNG_FILTER_VALUE_LAST; i++)
+ if (!png_init_filter_heuristics(png_ptr, heuristic_method, num_weights))
+ return;
+
+ /* If using the weighted method copy in the weights. */
+ if (heuristic_method == PNG_FILTER_HEURISTIC_WEIGHTED)
{
- if (filter_costs == NULL || filter_costs[i] < 0.0)
+ int i;
+ for (i = 0; i < num_weights; i++)
{
- png_ptr->inv_filter_costs[i] =
- png_ptr->filter_costs[i] = PNG_COST_FACTOR;
+ if (filter_weights[i] <= 0)
+ {
+ png_ptr->inv_filter_weights[i] =
+ png_ptr->filter_weights[i] = PNG_WEIGHT_FACTOR;
+ }
+
+ else
+ {
+ png_ptr->inv_filter_weights[i] = (png_uint_16)
+ ((PNG_WEIGHT_FACTOR*filter_weights[i]+PNG_FP_HALF)/PNG_FP_1);
+
+ png_ptr->filter_weights[i] = (png_uint_16)((PNG_WEIGHT_FACTOR*
+ PNG_FP_1+(filter_weights[i]/2))/filter_weights[i]);
+ }
}
- else if (filter_costs[i] >= 1.0)
+
+ /* Here is where we set the relative costs of the different filters. We
+ * should take the desired compression level into account when setting
+ * the costs, so that Paeth, for instance, has a high relative cost at low
+ * compression levels, while it has a lower relative cost at higher
+ * compression settings. The filter types are in order of increasing
+ * relative cost, so it would be possible to do this with an algorithm.
+ */
+ for (i = 0; i < PNG_FILTER_VALUE_LAST; i++)
+ if (filter_costs[i] >= PNG_FP_1)
{
- png_ptr->inv_filter_costs[i] =
- (png_uint_16)((double)PNG_COST_FACTOR / filter_costs[i] + 0.5);
- png_ptr->filter_costs[i] =
- (png_uint_16)((double)PNG_COST_FACTOR * filter_costs[i] + 0.5);
+ png_uint_32 tmp;
+
+ /* Use a 32 bit unsigned temporary here because otherwise the
+ * intermediate value will be a 32 bit *signed* integer (ANSI rules)
+ * and this will get the wrong answer on division.
+ */
+ tmp = PNG_COST_FACTOR*PNG_FP_1 + (filter_costs[i]/2);
+ tmp /= filter_costs[i];
+
+ png_ptr->inv_filter_costs[i] = (png_uint_16)tmp;
+
+ tmp = PNG_COST_FACTOR * filter_costs[i] + PNG_FP_HALF;
+ tmp /= PNG_FP_1;
+
+ png_ptr->filter_costs[i] = (png_uint_16)tmp;
}
}
}
+#endif /* FIXED_POINT */
#endif /* PNG_WRITE_WEIGHTED_FILTER_SUPPORTED */
void PNGAPI
@@ -1283,6 +1422,7 @@ png_set_compression_level(png_structp png_ptr, int level)
if (png_ptr == NULL)
return;
+
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_LEVEL;
png_ptr->zlib_level = level;
}
@@ -1294,6 +1434,7 @@ png_set_compression_mem_level(png_structp png_ptr, int mem_level)
if (png_ptr == NULL)
return;
+
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL;
png_ptr->zlib_mem_level = mem_level;
}
@@ -1305,6 +1446,7 @@ png_set_compression_strategy(png_structp png_ptr, int strategy)
if (png_ptr == NULL)
return;
+
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_STRATEGY;
png_ptr->zlib_strategy = strategy;
}
@@ -1314,17 +1456,21 @@ png_set_compression_window_bits(png_structp png_ptr, int window_bits)
{
if (png_ptr == NULL)
return;
+
if (window_bits > 15)
png_warning(png_ptr, "Only compression windows <= 32k supported by PNG");
+
else if (window_bits < 8)
png_warning(png_ptr, "Only compression windows >= 256 supported by PNG");
+
#ifndef WBITS_8_OK
/* Avoid libpng bug with 256-byte windows */
if (window_bits == 8)
- {
- png_warning(png_ptr, "Compression window is being reset to 512");
- window_bits = 9;
- }
+ {
+ png_warning(png_ptr, "Compression window is being reset to 512");
+ window_bits = 9;
+ }
+
#endif
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS;
png_ptr->zlib_window_bits = window_bits;
@@ -1337,8 +1483,10 @@ png_set_compression_method(png_structp png_ptr, int method)
if (png_ptr == NULL)
return;
+
if (method != 8)
png_warning(png_ptr, "Only compression method 8 is supported by PNG");
+
png_ptr->flags |= PNG_FLAG_ZLIB_CUSTOM_METHOD;
png_ptr->zlib_method = method;
}
@@ -1348,18 +1496,20 @@ png_set_write_status_fn(png_structp png_ptr, png_write_status_ptr write_row_fn)
{
if (png_ptr == NULL)
return;
+
png_ptr->write_row_fn = write_row_fn;
}
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
void PNGAPI
png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
- write_user_transform_fn)
+ write_user_transform_fn)
{
png_debug(1, "in png_set_write_user_transform_fn");
if (png_ptr == NULL)
return;
+
png_ptr->transformations |= PNG_USER_TRANSFORM;
png_ptr->write_user_transform_fn = write_user_transform_fn;
}
@@ -1369,7 +1519,7 @@ png_set_write_user_transform_fn(png_structp png_ptr, png_user_transform_ptr
#ifdef PNG_INFO_IMAGE_SUPPORTED
void PNGAPI
png_write_png(png_structp png_ptr, png_infop info_ptr,
- int transforms, voidp params)
+ int transforms, voidp params)
{
if (png_ptr == NULL || info_ptr == NULL)
return;
@@ -1390,7 +1540,7 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
* as appropriate to correctly scale the image.
*/
if ((transforms & PNG_TRANSFORM_SHIFT)
- && (info_ptr->valid & PNG_INFO_sBIT))
+ && (info_ptr->valid & PNG_INFO_sBIT))
png_set_shift(png_ptr, &info_ptr->sig_bit);
#endif
@@ -1410,6 +1560,7 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
/* Pack XRGB/RGBX/ARGB/RGBA into * RGB (4 channels -> 3 channels) */
if (transforms & PNG_TRANSFORM_STRIP_FILLER_AFTER)
png_set_filler(png_ptr, 0, PNG_FILLER_AFTER);
+
else if (transforms & PNG_TRANSFORM_STRIP_FILLER_BEFORE)
png_set_filler(png_ptr, 0, PNG_FILLER_BEFORE);
#endif
@@ -1447,8 +1598,8 @@ png_write_png(png_structp png_ptr, png_infop info_ptr,
/* It is REQUIRED to call this to finish writing the rest of the file */
png_write_end(png_ptr, info_ptr);
- transforms = transforms; /* Quiet compiler warnings */
- params = params;
+ PNG_UNUSED(transforms) /* Quiet compiler warnings */
+ PNG_UNUSED(params)
}
#endif
#endif /* PNG_WRITE_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngwtran.c b/src/3rdparty/libpng/pngwtran.c
index 9c8a6e7..115ca37 100644
--- a/src/3rdparty/libpng/pngwtran.c
+++ b/src/3rdparty/libpng/pngwtran.c
@@ -1,8 +1,8 @@
/* pngwtran.c - transforms the data in a row for PNG writers
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,11 +11,10 @@
* and license in png.h
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
+#ifdef PNG_WRITE_SUPPORTED
+
/* Transform the data according to the user's wishes. The order of
* transformations is significant.
*/
@@ -30,52 +29,62 @@ png_do_write_transformations(png_structp png_ptr)
#ifdef PNG_WRITE_USER_TRANSFORM_SUPPORTED
if (png_ptr->transformations & PNG_USER_TRANSFORM)
if (png_ptr->write_user_transform_fn != NULL)
- (*(png_ptr->write_user_transform_fn)) /* User write transform function */
- (png_ptr, /* png_ptr */
- &(png_ptr->row_info), /* row_info: */
- /* png_uint_32 width; width of row */
- /* png_uint_32 rowbytes; number of bytes in row */
- /* png_byte color_type; color type of pixels */
- /* png_byte bit_depth; bit depth of samples */
- /* png_byte channels; number of channels (1-4) */
- /* png_byte pixel_depth; bits per pixel (depth*channels) */
- png_ptr->row_buf + 1); /* start of pixel data for row */
+ (*(png_ptr->write_user_transform_fn)) /* User write transform
+ function */
+ (png_ptr, /* png_ptr */
+ &(png_ptr->row_info), /* row_info: */
+ /* png_uint_32 width; width of row */
+ /* png_size_t rowbytes; number of bytes in row */
+ /* png_byte color_type; color type of pixels */
+ /* png_byte bit_depth; bit depth of samples */
+ /* png_byte channels; number of channels (1-4) */
+ /* png_byte pixel_depth; bits per pixel (depth*channels) */
+ png_ptr->row_buf + 1); /* start of pixel data for row */
#endif
+
#ifdef PNG_WRITE_FILLER_SUPPORTED
if (png_ptr->transformations & PNG_FILLER)
png_do_strip_filler(&(png_ptr->row_info), png_ptr->row_buf + 1,
- png_ptr->flags);
+ png_ptr->flags);
#endif
+
#ifdef PNG_WRITE_PACKSWAP_SUPPORTED
if (png_ptr->transformations & PNG_PACKSWAP)
png_do_packswap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
+
#ifdef PNG_WRITE_PACK_SUPPORTED
if (png_ptr->transformations & PNG_PACK)
png_do_pack(&(png_ptr->row_info), png_ptr->row_buf + 1,
- (png_uint_32)png_ptr->bit_depth);
+ (png_uint_32)png_ptr->bit_depth);
#endif
+
#ifdef PNG_WRITE_SWAP_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_BYTES)
png_do_swap(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
+
#ifdef PNG_WRITE_SHIFT_SUPPORTED
if (png_ptr->transformations & PNG_SHIFT)
png_do_shift(&(png_ptr->row_info), png_ptr->row_buf + 1,
- &(png_ptr->shift));
+ &(png_ptr->shift));
#endif
+
#ifdef PNG_WRITE_SWAP_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_SWAP_ALPHA)
png_do_write_swap_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
+
#ifdef PNG_WRITE_INVERT_ALPHA_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_ALPHA)
png_do_write_invert_alpha(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
+
#ifdef PNG_WRITE_BGR_SUPPORTED
if (png_ptr->transformations & PNG_BGR)
png_do_bgr(&(png_ptr->row_info), png_ptr->row_buf + 1);
#endif
+
#ifdef PNG_WRITE_INVERT_SUPPORTED
if (png_ptr->transformations & PNG_INVERT_MONO)
png_do_invert(&(png_ptr->row_info), png_ptr->row_buf + 1);
@@ -113,9 +122,12 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
{
if (*sp != 0)
v |= mask;
+
sp++;
+
if (mask > 1)
mask >>= 1;
+
else
{
mask = 0x80;
@@ -124,10 +136,13 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
v = 0;
}
}
+
if (mask != 0x80)
*dp = (png_byte)v;
+
break;
}
+
case 2:
{
png_bytep sp, dp;
@@ -139,12 +154,14 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
dp = row;
shift = 6;
v = 0;
+
for (i = 0; i < row_width; i++)
{
png_byte value;
value = (png_byte)(*sp & 0x03);
v |= (value << shift);
+
if (shift == 0)
{
shift = 6;
@@ -152,14 +169,19 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
dp++;
v = 0;
}
+
else
shift -= 2;
+
sp++;
}
+
if (shift != 6)
*dp = (png_byte)v;
+
break;
}
+
case 4:
{
png_bytep sp, dp;
@@ -171,6 +193,7 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
dp = row;
shift = 4;
v = 0;
+
for (i = 0; i < row_width; i++)
{
png_byte value;
@@ -185,20 +208,27 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
dp++;
v = 0;
}
+
else
shift -= 4;
sp++;
}
+
if (shift != 4)
*dp = (png_byte)v;
+
break;
}
+
+ default:
+ break;
}
+
row_info->bit_depth = (png_byte)bit_depth;
row_info->pixel_depth = (png_byte)(bit_depth * row_info->channels);
row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
- row_info->width);
+ row_info->width);
}
}
#endif
@@ -212,12 +242,12 @@ png_do_pack(png_row_infop row_info, png_bytep row, png_uint_32 bit_depth)
* data to 0 to 15.
*/
void /* PRIVATE */
-png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
+png_do_shift(png_row_infop row_info, png_bytep row,
+ png_const_color_8p bit_depth)
{
png_debug(1, "in png_do_shift");
- if (
- row_info->color_type != PNG_COLOR_TYPE_PALETTE)
+ if (row_info->color_type != PNG_COLOR_TYPE_PALETTE)
{
int shift_start[4], shift_dec[4];
int channels = 0;
@@ -227,19 +257,23 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
shift_start[channels] = row_info->bit_depth - bit_depth->red;
shift_dec[channels] = bit_depth->red;
channels++;
+
shift_start[channels] = row_info->bit_depth - bit_depth->green;
shift_dec[channels] = bit_depth->green;
channels++;
+
shift_start[channels] = row_info->bit_depth - bit_depth->blue;
shift_dec[channels] = bit_depth->blue;
channels++;
}
+
else
{
shift_start[channels] = row_info->bit_depth - bit_depth->gray;
shift_dec[channels] = bit_depth->gray;
channels++;
}
+
if (row_info->color_type & PNG_COLOR_MASK_ALPHA)
{
shift_start[channels] = row_info->bit_depth - bit_depth->alpha;
@@ -251,14 +285,16 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
if (row_info->bit_depth < 8)
{
png_bytep bp = row;
- png_uint_32 i;
+ png_size_t i;
png_byte mask;
- png_uint_32 row_bytes = row_info->rowbytes;
+ png_size_t row_bytes = row_info->rowbytes;
if (bit_depth->gray == 1 && row_info->bit_depth == 2)
mask = 0x55;
+
else if (row_info->bit_depth == 4 && bit_depth->gray == 3)
mask = 0x11;
+
else
mask = 0xff;
@@ -269,15 +305,18 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
v = *bp;
*bp = 0;
+
for (j = shift_start[0]; j > -shift_dec[0]; j -= shift_dec[0])
{
if (j > 0)
*bp |= (png_byte)((v << j) & 0xff);
+
else
*bp |= (png_byte)((v >> (-j)) & mask);
}
}
}
+
else if (row_info->bit_depth == 8)
{
png_bytep bp = row;
@@ -293,15 +332,18 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
v = *bp;
*bp = 0;
+
for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])
{
if (j > 0)
*bp |= (png_byte)((v << j) & 0xff);
+
else
*bp |= (png_byte)((v >> (-j)) & 0xff);
}
}
}
+
else
{
png_bytep bp;
@@ -316,10 +358,12 @@ png_do_shift(png_row_infop row_info, png_bytep row, png_color_8p bit_depth)
v = (png_uint_16)(((png_uint_16)(*bp) << 8) + *(bp + 1));
value = 0;
+
for (j = shift_start[c]; j > -shift_dec[c]; j -= shift_dec[c])
{
if (j > 0)
value |= (png_uint_16)((v << j) & (png_uint_16)0xffff);
+
else
value |= (png_uint_16)((v >> (-j)) & (png_uint_16)0xffff);
}
@@ -340,12 +384,13 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
- /* This converts from ARGB to RGBA */
if (row_info->bit_depth == 8)
{
+ /* This converts from ARGB to RGBA */
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
+
for (i = 0, sp = dp = row; i < row_width; i++)
{
png_byte save = *(sp++);
@@ -355,9 +400,11 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save;
}
}
- /* This converts from AARRGGBB to RRGGBBAA */
+
+#ifdef PNG_WRITE_16BIT_SUPPORTED
else
{
+ /* This converts from AARRGGBB to RRGGBBAA */
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
@@ -377,12 +424,14 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save[1];
}
}
+#endif /* PNG_WRITE_16BIT_SUPPORTED */
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{
- /* This converts from AG to GA */
if (row_info->bit_depth == 8)
{
+ /* This converts from AG to GA */
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
@@ -394,9 +443,11 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save;
}
}
- /* This converts from AAGG to GGAA */
+
+#ifdef PNG_WRITE_16BIT_SUPPORTED
else
{
+ /* This converts from AAGG to GGAA */
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
@@ -412,6 +463,7 @@ png_do_write_swap_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = save[1];
}
}
+#endif /* PNG_WRITE_16BIT_SUPPORTED */
}
}
}
@@ -426,12 +478,13 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
{
if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
{
- /* This inverts the alpha channel in RGBA */
if (row_info->bit_depth == 8)
{
+ /* This inverts the alpha channel in RGBA */
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
+
for (i = 0, sp = dp = row; i < row_width; i++)
{
/* Does nothing
@@ -443,9 +496,11 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++));
}
}
- /* This inverts the alpha channel in RRGGBBAA */
+
+#ifdef PNG_WRITE_16BIT_SUPPORTED
else
{
+ /* This inverts the alpha channel in RRGGBBAA */
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
@@ -465,12 +520,14 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++));
}
}
+#endif /* PNG_WRITE_16BIT_SUPPORTED */
}
+
else if (row_info->color_type == PNG_COLOR_TYPE_GRAY_ALPHA)
{
- /* This inverts the alpha channel in GA */
if (row_info->bit_depth == 8)
{
+ /* This inverts the alpha channel in GA */
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
@@ -481,9 +538,11 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++));
}
}
- /* This inverts the alpha channel in GGAA */
+
+#ifdef PNG_WRITE_16BIT_SUPPORTED
else
{
+ /* This inverts the alpha channel in GGAA */
png_bytep sp, dp;
png_uint_32 i;
png_uint_32 row_width = row_info->width;
@@ -499,6 +558,7 @@ png_do_write_invert_alpha(png_row_infop row_info, png_bytep row)
*(dp++) = (png_byte)(255 - *(sp++));
}
}
+#endif /* PNG_WRITE_16BIT_SUPPORTED */
}
}
}
@@ -511,8 +571,7 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
{
png_debug(1, "in png_do_write_intrapixel");
- if (
- (row_info->color_type & PNG_COLOR_MASK_COLOR))
+ if ((row_info->color_type & PNG_COLOR_MASK_COLOR))
{
int bytes_per_pixel;
png_uint_32 row_width = row_info->width;
@@ -523,17 +582,21 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
bytes_per_pixel = 3;
+
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
bytes_per_pixel = 4;
+
else
return;
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
{
- *(rp) = (png_byte)((*rp - *(rp+1))&0xff);
- *(rp+2) = (png_byte)((*(rp+2) - *(rp+1))&0xff);
+ *(rp) = (png_byte)((*rp - *(rp + 1)) & 0xff);
+ *(rp + 2) = (png_byte)((*(rp + 2) - *(rp + 1)) & 0xff);
}
}
+
+#ifdef PNG_WRITE_16BIT_SUPPORTED
else if (row_info->bit_depth == 16)
{
png_bytep rp;
@@ -541,24 +604,27 @@ png_do_write_intrapixel(png_row_infop row_info, png_bytep row)
if (row_info->color_type == PNG_COLOR_TYPE_RGB)
bytes_per_pixel = 6;
+
else if (row_info->color_type == PNG_COLOR_TYPE_RGB_ALPHA)
bytes_per_pixel = 8;
+
else
return;
for (i = 0, rp = row; i < row_width; i++, rp += bytes_per_pixel)
{
- png_uint_32 s0 = (*(rp ) << 8) | *(rp+1);
- png_uint_32 s1 = (*(rp+2) << 8) | *(rp+3);
- png_uint_32 s2 = (*(rp+4) << 8) | *(rp+5);
+ png_uint_32 s0 = (*(rp ) << 8) | *(rp + 1);
+ png_uint_32 s1 = (*(rp + 2) << 8) | *(rp + 3);
+ png_uint_32 s2 = (*(rp + 4) << 8) | *(rp + 5);
png_uint_32 red = (png_uint_32)((s0 - s1) & 0xffffL);
png_uint_32 blue = (png_uint_32)((s2 - s1) & 0xffffL);
- *(rp ) = (png_byte)((red >> 8) & 0xff);
- *(rp+1) = (png_byte)(red & 0xff);
- *(rp+4) = (png_byte)((blue >> 8) & 0xff);
- *(rp+5) = (png_byte)(blue & 0xff);
+ *(rp ) = (png_byte)((red >> 8) & 0xff);
+ *(rp + 1) = (png_byte)(red & 0xff);
+ *(rp + 4) = (png_byte)((blue >> 8) & 0xff);
+ *(rp + 5) = (png_byte)(blue & 0xff);
}
}
+#endif /* PNG_WRITE_16BIT_SUPPORTED */
}
}
#endif /* PNG_MNG_FEATURES_SUPPORTED */
diff --git a/src/3rdparty/libpng/pngwutil.c b/src/3rdparty/libpng/pngwutil.c
index eddac5b..2c35785 100644
--- a/src/3rdparty/libpng/pngwutil.c
+++ b/src/3rdparty/libpng/pngwutil.c
@@ -1,8 +1,8 @@
/* pngwutil.c - utilities to write a PNG file
*
- * Last changed in libpng 1.4.0 [January 3, 2010]
- * Copyright (c) 1998-2010 Glenn Randers-Pehrson
+ * Last changed in libpng 1.5.0 [January 6, 2011]
+ * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
*
@@ -11,11 +11,11 @@
* and license in png.h
*/
-#define PNG_NO_PEDANTIC_WARNINGS
-#include "png.h"
-#ifdef PNG_WRITE_SUPPORTED
#include "pngpriv.h"
+#ifdef PNG_WRITE_SUPPORTED
+
+#ifdef PNG_WRITE_INT_FUNCTIONS_SUPPORTED
/* Place a 32-bit number into a buffer in PNG byte order. We work
* with unsigned numbers for convenience, although one supported
* ancillary chunk uses signed (two's complement) numbers.
@@ -32,7 +32,9 @@ png_save_uint_32(png_bytep buf, png_uint_32 i)
#ifdef PNG_SAVE_INT_32_SUPPORTED
/* The png_save_int_32 function assumes integers are stored in two's
* complement format. If this isn't the case, then this routine needs to
- * be modified to write data in two's complement format.
+ * be modified to write data in two's complement format. Note that,
+ * the following works correctly even if png_int_32 has more than 32 bits
+ * (compare the more complex code required on read for sign extention.)
*/
void PNGAPI
png_save_int_32(png_bytep buf, png_int_32 i)
@@ -54,6 +56,7 @@ png_save_uint_16(png_bytep buf, unsigned int i)
buf[0] = (png_byte)((i >> 8) & 0xff);
buf[1] = (png_byte)(i & 0xff);
}
+#endif
/* Simple function to write the signature. If we have already written
* the magic bytes of the signature, or more likely, the PNG stream is
@@ -74,6 +77,7 @@ png_write_sig(png_structp png_ptr)
/* Write the rest of the 8 byte signature */
png_write_data(png_ptr, &png_signature[png_ptr->sig_bytes],
(png_size_t)(8 - png_ptr->sig_bytes));
+
if (png_ptr->sig_bytes < 3)
png_ptr->mode |= PNG_HAVE_PNG_SIGNATURE;
}
@@ -88,11 +92,12 @@ png_write_sig(png_structp png_ptr)
* functions instead.
*/
void PNGAPI
-png_write_chunk(png_structp png_ptr, png_bytep chunk_name,
- png_bytep data, png_size_t length)
+png_write_chunk(png_structp png_ptr, png_const_bytep chunk_name,
+ png_const_bytep data, png_size_t length)
{
if (png_ptr == NULL)
return;
+
png_write_chunk_start(png_ptr, chunk_name, (png_uint_32)length);
png_write_chunk_data(png_ptr, data, (png_size_t)length);
png_write_chunk_end(png_ptr);
@@ -103,8 +108,8 @@ png_write_chunk(png_structp png_ptr, png_bytep chunk_name,
* passing in png_write_chunk_data().
*/
void PNGAPI
-png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
- png_uint_32 length)
+png_write_chunk_start(png_structp png_ptr, png_const_bytep chunk_name,
+ png_uint_32 length)
{
png_byte buf[8];
@@ -125,10 +130,13 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
png_save_uint_32(buf, length);
png_memcpy(buf + 4, chunk_name, 4);
png_write_data(png_ptr, buf, (png_size_t)8);
+
/* Put the chunk name into png_ptr->chunk_name */
png_memcpy(png_ptr->chunk_name, chunk_name, 4);
+
/* Reset the crc and run it over the chunk name */
png_reset_crc(png_ptr);
+
png_calculate_crc(png_ptr, chunk_name, 4);
#ifdef PNG_IO_STATE_SUPPORTED
@@ -145,14 +153,17 @@ png_write_chunk_start(png_structp png_ptr, png_bytep chunk_name,
* given to png_write_chunk_start().
*/
void PNGAPI
-png_write_chunk_data(png_structp png_ptr, png_bytep data, png_size_t length)
+png_write_chunk_data(png_structp png_ptr, png_const_bytep data,
+ png_size_t length)
{
/* Write the data, and run the CRC over it */
if (png_ptr == NULL)
return;
+
if (data != NULL && length > 0)
{
png_write_data(png_ptr, data, length);
+
/* Update the CRC after writing the data,
* in case that the user I/O routine alters it.
*/
@@ -190,18 +201,18 @@ png_write_chunk_end(png_structp png_ptr)
typedef struct
{
- char *input; /* The uncompressed input data */
- int input_len; /* Its length */
- int num_output_ptr; /* Number of output pointers used */
- int max_output_ptr; /* Size of output_ptr */
- png_charpp output_ptr; /* Array of pointers to output */
+ png_const_bytep input; /* The uncompressed input data */
+ png_size_t input_len; /* Its length */
+ int num_output_ptr; /* Number of output pointers used */
+ int max_output_ptr; /* Size of output_ptr */
+ png_bytep *output_ptr; /* Array of pointers to output */
} compression_state;
/* Compress given text into storage in the png_ptr structure */
static int /* PRIVATE */
png_text_compress(png_structp png_ptr,
- png_charp text, png_size_t text_len, int compression,
- compression_state *comp)
+ png_const_charp text, png_size_t text_len, int compression,
+ compression_state *comp)
{
int ret;
@@ -214,14 +225,14 @@ png_text_compress(png_structp png_ptr,
/* We may just want to pass the text right through */
if (compression == PNG_TEXT_COMPRESSION_NONE)
{
- comp->input = text;
- comp->input_len = text_len;
- return((int)text_len);
+ comp->input = (png_const_bytep)text;
+ comp->input_len = text_len;
+ return((int)text_len);
}
if (compression >= PNG_TEXT_COMPRESSION_LAST)
{
-#ifdef PNG_STDIO_SUPPORTED
+#ifdef PNG_CONSOLE_IO_SUPPORTED
char msg[50];
png_snprintf(msg, 50, "Unknown compression type %d", compression);
png_warning(png_ptr, msg);
@@ -246,24 +257,29 @@ png_text_compress(png_structp png_ptr,
*/
/* Set up the compression buffers */
+ /* TODO: the following cast hides a potential overflow problem. */
png_ptr->zstream.avail_in = (uInt)text_len;
+ /* NOTE: assume zlib doesn't overwrite the input */
png_ptr->zstream.next_in = (Bytef *)text;
- png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
- png_ptr->zstream.next_out = (Bytef *)png_ptr->zbuf;
+ png_ptr->zstream.avail_out = png_ptr->zbuf_size;
+ png_ptr->zstream.next_out = png_ptr->zbuf;
/* This is the same compression loop as in png_write_row() */
do
{
/* Compress the data */
ret = deflate(&png_ptr->zstream, Z_NO_FLUSH);
+
if (ret != Z_OK)
{
/* Error */
if (png_ptr->zstream.msg != NULL)
png_error(png_ptr, png_ptr->zstream.msg);
+
else
png_error(png_ptr, "zlib error");
}
+
/* Check to see if we need more room */
if (!(png_ptr->zstream.avail_out))
{
@@ -276,28 +292,33 @@ png_text_compress(png_structp png_ptr,
comp->max_output_ptr = comp->num_output_ptr + 4;
if (comp->output_ptr != NULL)
{
- png_charpp old_ptr;
+ png_bytepp old_ptr;
old_ptr = comp->output_ptr;
- comp->output_ptr = (png_charpp)png_malloc(png_ptr,
- (png_alloc_size_t)
- (comp->max_output_ptr * png_sizeof(png_charpp)));
+
+ comp->output_ptr = (png_bytepp)png_malloc(png_ptr,
+ (png_alloc_size_t)
+ (comp->max_output_ptr * png_sizeof(png_charpp)));
+
png_memcpy(comp->output_ptr, old_ptr, old_max
- * png_sizeof(png_charp));
+ * png_sizeof(png_charp));
+
png_free(png_ptr, old_ptr);
}
else
- comp->output_ptr = (png_charpp)png_malloc(png_ptr,
- (png_alloc_size_t)
- (comp->max_output_ptr * png_sizeof(png_charp)));
+ comp->output_ptr = (png_bytepp)png_malloc(png_ptr,
+ (png_alloc_size_t)
+ (comp->max_output_ptr * png_sizeof(png_charp)));
}
/* Save the data */
comp->output_ptr[comp->num_output_ptr] =
- (png_charp)png_malloc(png_ptr,
- (png_alloc_size_t)png_ptr->zbuf_size);
+ (png_bytep)png_malloc(png_ptr,
+ (png_alloc_size_t)png_ptr->zbuf_size);
+
png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf,
- png_ptr->zbuf_size);
+ png_ptr->zbuf_size);
+
comp->num_output_ptr++;
/* and reset the buffer */
@@ -327,29 +348,35 @@ png_text_compress(png_structp png_ptr,
comp->max_output_ptr = comp->num_output_ptr + 4;
if (comp->output_ptr != NULL)
{
- png_charpp old_ptr;
+ png_bytepp old_ptr;
old_ptr = comp->output_ptr;
+
/* This could be optimized to realloc() */
- comp->output_ptr = (png_charpp)png_malloc(png_ptr,
- (png_alloc_size_t)(comp->max_output_ptr *
- png_sizeof(png_charp)));
+ comp->output_ptr = (png_bytepp)png_malloc(png_ptr,
+ (png_alloc_size_t)(comp->max_output_ptr *
+ png_sizeof(png_charp)));
+
png_memcpy(comp->output_ptr, old_ptr,
- old_max * png_sizeof(png_charp));
+ old_max * png_sizeof(png_charp));
+
png_free(png_ptr, old_ptr);
}
+
else
- comp->output_ptr = (png_charpp)png_malloc(png_ptr,
- (png_alloc_size_t)(comp->max_output_ptr *
- png_sizeof(png_charp)));
+ comp->output_ptr = (png_bytepp)png_malloc(png_ptr,
+ (png_alloc_size_t)(comp->max_output_ptr *
+ png_sizeof(png_charp)));
}
/* Save the data */
comp->output_ptr[comp->num_output_ptr] =
- (png_charp)png_malloc(png_ptr,
- (png_alloc_size_t)png_ptr->zbuf_size);
+ (png_bytep)png_malloc(png_ptr,
+ (png_alloc_size_t)png_ptr->zbuf_size);
+
png_memcpy(comp->output_ptr[comp->num_output_ptr], png_ptr->zbuf,
- png_ptr->zbuf_size);
+ png_ptr->zbuf_size);
+
comp->num_output_ptr++;
/* and reset the buffer pointers */
@@ -362,6 +389,7 @@ png_text_compress(png_structp png_ptr,
/* We got an error */
if (png_ptr->zstream.msg != NULL)
png_error(png_ptr, png_ptr->zstream.msg);
+
else
png_error(png_ptr, "zlib error");
}
@@ -369,6 +397,7 @@ png_text_compress(png_structp png_ptr,
/* Text length is number of buffers plus last buffer */
text_len = png_ptr->zbuf_size * comp->num_output_ptr;
+
if (png_ptr->zstream.avail_out < png_ptr->zbuf_size)
text_len += png_ptr->zbuf_size - (png_size_t)png_ptr->zstream.avail_out;
@@ -384,24 +413,27 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
/* Handle the no-compression case */
if (comp->input)
{
- png_write_chunk_data(png_ptr, (png_bytep)comp->input,
- (png_size_t)comp->input_len);
+ png_write_chunk_data(png_ptr, comp->input, comp->input_len);
+
return;
}
/* Write saved output buffers, if any */
for (i = 0; i < comp->num_output_ptr; i++)
{
- png_write_chunk_data(png_ptr, (png_bytep)comp->output_ptr[i],
- (png_size_t)png_ptr->zbuf_size);
+ png_write_chunk_data(png_ptr, comp->output_ptr[i],
+ (png_size_t)png_ptr->zbuf_size);
+
png_free(png_ptr, comp->output_ptr[i]);
}
+
if (comp->max_output_ptr != 0)
png_free(png_ptr, comp->output_ptr);
+
/* Write anything left in zbuf */
if (png_ptr->zstream.avail_out < (png_uint_32)png_ptr->zbuf_size)
png_write_chunk_data(png_ptr, png_ptr->zbuf,
- (png_size_t)(png_ptr->zbuf_size - png_ptr->zstream.avail_out));
+ (png_size_t)(png_ptr->zbuf_size - png_ptr->zstream.avail_out));
/* Reset zlib for another zTXt/iTXt or image data */
deflateReset(&png_ptr->zstream);
@@ -415,8 +447,8 @@ png_write_compressed_data_out(png_structp png_ptr, compression_state *comp)
*/
void /* PRIVATE */
png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
- int bit_depth, int color_type, int compression_type, int filter_type,
- int interlace_type)
+ int bit_depth, int color_type, int compression_type, int filter_type,
+ int interlace_type)
{
PNG_IHDR;
int ret;
@@ -435,35 +467,61 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
case 2:
case 4:
case 8:
- case 16: png_ptr->channels = 1; break;
- default: png_error(png_ptr, "Invalid bit depth for grayscale image");
+#ifdef PNG_WRITE_16BIT_SUPPORTED
+ case 16:
+#endif
+ png_ptr->channels = 1; break;
+
+ default:
+ png_error(png_ptr,
+ "Invalid bit depth for grayscale image");
}
break;
+
case PNG_COLOR_TYPE_RGB:
+#ifdef PNG_WRITE_16BIT_SUPPORTED
if (bit_depth != 8 && bit_depth != 16)
+#else
+ if (bit_depth != 8)
+#endif
png_error(png_ptr, "Invalid bit depth for RGB image");
+
png_ptr->channels = 3;
break;
+
case PNG_COLOR_TYPE_PALETTE:
switch (bit_depth)
{
case 1:
case 2:
case 4:
- case 8: png_ptr->channels = 1; break;
- default: png_error(png_ptr, "Invalid bit depth for paletted image");
+ case 8:
+ png_ptr->channels = 1;
+ break;
+
+ default:
+ png_error(png_ptr, "Invalid bit depth for paletted image");
}
break;
+
case PNG_COLOR_TYPE_GRAY_ALPHA:
if (bit_depth != 8 && bit_depth != 16)
png_error(png_ptr, "Invalid bit depth for grayscale+alpha image");
+
png_ptr->channels = 2;
break;
+
case PNG_COLOR_TYPE_RGB_ALPHA:
+#ifdef PNG_WRITE_16BIT_SUPPORTED
if (bit_depth != 8 && bit_depth != 16)
+#else
+ if (bit_depth != 8)
+#endif
png_error(png_ptr, "Invalid bit depth for RGBA image");
+
png_ptr->channels = 4;
break;
+
default:
png_error(png_ptr, "Invalid image color type specified");
}
@@ -485,13 +543,13 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
*/
if (
#ifdef PNG_MNG_FEATURES_SUPPORTED
- !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
- ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
- (color_type == PNG_COLOR_TYPE_RGB ||
- color_type == PNG_COLOR_TYPE_RGB_ALPHA) &&
- (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) &&
+ !((png_ptr->mng_features_permitted & PNG_FLAG_MNG_FILTER_64) &&
+ ((png_ptr->mode&PNG_HAVE_PNG_SIGNATURE) == 0) &&
+ (color_type == PNG_COLOR_TYPE_RGB ||
+ color_type == PNG_COLOR_TYPE_RGB_ALPHA) &&
+ (filter_type == PNG_INTRAPIXEL_DIFFERENCING)) &&
#endif
- filter_type != PNG_FILTER_TYPE_BASE)
+ filter_type != PNG_FILTER_TYPE_BASE)
{
png_warning(png_ptr, "Invalid filter type specified");
filter_type = PNG_FILTER_TYPE_BASE;
@@ -499,7 +557,7 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
#ifdef PNG_WRITE_INTERLACING_SUPPORTED
if (interlace_type != PNG_INTERLACE_NONE &&
- interlace_type != PNG_INTERLACE_ADAM7)
+ interlace_type != PNG_INTERLACE_ADAM7)
{
png_warning(png_ptr, "Invalid interlace type specified");
interlace_type = PNG_INTERLACE_ADAM7;
@@ -536,52 +594,70 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
buf[12] = (png_byte)interlace_type;
/* Write the chunk */
- png_write_chunk(png_ptr, (png_bytep)png_IHDR, buf, (png_size_t)13);
+ png_write_chunk(png_ptr, png_IHDR, buf, (png_size_t)13);
/* Initialize zlib with PNG info */
png_ptr->zstream.zalloc = png_zalloc;
png_ptr->zstream.zfree = png_zfree;
png_ptr->zstream.opaque = (voidpf)png_ptr;
+
if (!(png_ptr->do_filter))
{
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
- png_ptr->bit_depth < 8)
+ png_ptr->bit_depth < 8)
png_ptr->do_filter = PNG_FILTER_NONE;
+
else
png_ptr->do_filter = PNG_ALL_FILTERS;
}
+
if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY))
{
if (png_ptr->do_filter != PNG_FILTER_NONE)
png_ptr->zlib_strategy = Z_FILTERED;
+
else
png_ptr->zlib_strategy = Z_DEFAULT_STRATEGY;
}
+
if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_LEVEL))
png_ptr->zlib_level = Z_DEFAULT_COMPRESSION;
+
if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_MEM_LEVEL))
png_ptr->zlib_mem_level = 8;
+
if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_WINDOW_BITS))
png_ptr->zlib_window_bits = 15;
+
if (!(png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_METHOD))
png_ptr->zlib_method = 8;
+
ret = deflateInit2(&png_ptr->zstream, png_ptr->zlib_level,
- png_ptr->zlib_method, png_ptr->zlib_window_bits,
- png_ptr->zlib_mem_level, png_ptr->zlib_strategy);
+ png_ptr->zlib_method, png_ptr->zlib_window_bits,
+ png_ptr->zlib_mem_level, png_ptr->zlib_strategy);
+
if (ret != Z_OK)
{
- if (ret == Z_VERSION_ERROR) png_error(png_ptr,
- "zlib failed to initialize compressor -- version error");
- if (ret == Z_STREAM_ERROR) png_error(png_ptr,
- "zlib failed to initialize compressor -- stream error");
- if (ret == Z_MEM_ERROR) png_error(png_ptr,
- "zlib failed to initialize compressor -- mem error");
+ if (ret == Z_VERSION_ERROR)
+ png_error(png_ptr,
+ "zlib failed to initialize compressor -- version error");
+
+ if (ret == Z_STREAM_ERROR)
+ png_error(png_ptr,
+ "zlib failed to initialize compressor -- stream error");
+
+ if (ret == Z_MEM_ERROR)
+ png_error(png_ptr,
+ "zlib failed to initialize compressor -- mem error");
+
png_error(png_ptr, "zlib failed to initialize compressor");
}
+
png_ptr->zstream.next_out = png_ptr->zbuf;
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
- /* libpng is not interested in zstream.data_type */
- /* Set it to a predefined value, to avoid its evaluation inside zlib */
+ /* libpng is not interested in zstream.data_type, so set it
+ * to a predefined value, to avoid its evaluation inside zlib
+ */
png_ptr->zstream.data_type = Z_BINARY;
png_ptr->mode = PNG_HAVE_IHDR;
@@ -592,45 +668,48 @@ png_write_IHDR(png_structp png_ptr, png_uint_32 width, png_uint_32 height,
* structure.
*/
void /* PRIVATE */
-png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
+png_write_PLTE(png_structp png_ptr, png_const_colorp palette,
+ png_uint_32 num_pal)
{
PNG_PLTE;
png_uint_32 i;
- png_colorp pal_ptr;
+ png_const_colorp pal_ptr;
png_byte buf[3];
png_debug(1, "in png_write_PLTE");
if ((
#ifdef PNG_MNG_FEATURES_SUPPORTED
- !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) &&
+ !(png_ptr->mng_features_permitted & PNG_FLAG_MNG_EMPTY_PLTE) &&
#endif
- num_pal == 0) || num_pal > 256)
+ num_pal == 0) || num_pal > 256)
{
- if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
- {
- png_error(png_ptr, "Invalid number of colors in palette");
- }
- else
- {
- png_warning(png_ptr, "Invalid number of colors in palette");
- return;
- }
+ if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE)
+ {
+ png_error(png_ptr, "Invalid number of colors in palette");
+ }
+
+ else
+ {
+ png_warning(png_ptr, "Invalid number of colors in palette");
+ return;
+ }
}
if (!(png_ptr->color_type&PNG_COLOR_MASK_COLOR))
{
png_warning(png_ptr,
- "Ignoring request to write a PLTE chunk in grayscale PNG");
+ "Ignoring request to write a PLTE chunk in grayscale PNG");
+
return;
}
png_ptr->num_palette = (png_uint_16)num_pal;
png_debug1(3, "num_palette = %d", png_ptr->num_palette);
- png_write_chunk_start(png_ptr, (png_bytep)png_PLTE,
- (png_uint_32)(num_pal * 3));
+ png_write_chunk_start(png_ptr, png_PLTE, (png_uint_32)(num_pal * 3));
#ifdef PNG_POINTER_INDEXING_SUPPORTED
+
for (i = 0, pal_ptr = palette; i < num_pal; i++, pal_ptr++)
{
buf[0] = pal_ptr->red;
@@ -638,9 +717,13 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
buf[2] = pal_ptr->blue;
png_write_chunk_data(png_ptr, buf, (png_size_t)3);
}
+
#else
- /* This is a little slower but some buggy compilers need to do this instead */
+ /* This is a little slower but some buggy compilers need to do this
+ * instead
+ */
pal_ptr=palette;
+
for (i = 0; i < num_pal; i++)
{
buf[0] = pal_ptr[i].red;
@@ -648,6 +731,7 @@ png_write_PLTE(png_structp png_ptr, png_colorp palette, png_uint_32 num_pal)
buf[2] = pal_ptr[i].blue;
png_write_chunk_data(png_ptr, buf, (png_size_t)3);
}
+
#endif
png_write_chunk_end(png_ptr);
png_ptr->mode |= PNG_HAVE_PLTE;
@@ -678,31 +762,36 @@ png_write_IDAT(png_structp png_ptr, png_bytep data, png_size_t length)
png_ptr->height < 16384 && png_ptr->width < 16384)
{
png_uint_32 uncompressed_idat_size = png_ptr->height *
- ((png_ptr->width *
- png_ptr->channels * png_ptr->bit_depth + 15) >> 3);
+ ((png_ptr->width *
+ png_ptr->channels * png_ptr->bit_depth + 15) >> 3);
unsigned int z_cinfo = z_cmf >> 4;
unsigned int half_z_window_size = 1 << (z_cinfo + 7);
while (uncompressed_idat_size <= half_z_window_size &&
- half_z_window_size >= 256)
+ half_z_window_size >= 256)
{
z_cinfo--;
half_z_window_size >>= 1;
}
+
z_cmf = (z_cmf & 0x0f) | (z_cinfo << 4);
- if (data[0] != (png_byte)z_cmf)
+
+ if (data[0] != z_cmf)
{
+ int tmp;
data[0] = (png_byte)z_cmf;
- data[1] &= 0xe0;
- data[1] += (png_byte)(0x1f - ((z_cmf << 8) + data[1]) % 0x1f);
+ tmp = data[1] & 0xe0;
+ tmp += 0x1f - ((z_cmf << 8) + tmp) % 0x1f;
+ data[1] = (png_byte)tmp;
}
}
}
+
else
png_error(png_ptr,
- "Invalid zlib compression method or flags in IDAT");
+ "Invalid zlib compression method or flags in IDAT");
}
- png_write_chunk(png_ptr, (png_bytep)png_IDAT, data, length);
+ png_write_chunk(png_ptr, png_IDAT, data, length);
png_ptr->mode |= PNG_HAVE_IDAT;
}
@@ -714,30 +803,12 @@ png_write_IEND(png_structp png_ptr)
png_debug(1, "in png_write_IEND");
- png_write_chunk(png_ptr, (png_bytep)png_IEND, NULL,
- (png_size_t)0);
+ png_write_chunk(png_ptr, png_IEND, NULL, (png_size_t)0);
png_ptr->mode |= PNG_HAVE_IEND;
}
#ifdef PNG_WRITE_gAMA_SUPPORTED
/* Write a gAMA chunk */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-void /* PRIVATE */
-png_write_gAMA(png_structp png_ptr, double file_gamma)
-{
- PNG_gAMA;
- png_uint_32 igamma;
- png_byte buf[4];
-
- png_debug(1, "in png_write_gAMA");
-
- /* file_gamma is saved in 1/100,000ths */
- igamma = (png_uint_32)(file_gamma * 100000.0 + 0.5);
- png_save_uint_32(buf, igamma);
- png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);
-}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
void /* PRIVATE */
png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)
{
@@ -748,10 +819,9 @@ png_write_gAMA_fixed(png_structp png_ptr, png_fixed_point file_gamma)
/* file_gamma is saved in 1/100,000ths */
png_save_uint_32(buf, (png_uint_32)file_gamma);
- png_write_chunk(png_ptr, (png_bytep)png_gAMA, buf, (png_size_t)4);
+ png_write_chunk(png_ptr, png_gAMA, buf, (png_size_t)4);
}
#endif
-#endif
#ifdef PNG_WRITE_sRGB_SUPPORTED
/* Write a sRGB chunk */
@@ -764,18 +834,19 @@ png_write_sRGB(png_structp png_ptr, int srgb_intent)
png_debug(1, "in png_write_sRGB");
if (srgb_intent >= PNG_sRGB_INTENT_LAST)
- png_warning(png_ptr,
- "Invalid sRGB rendering intent specified");
+ png_warning(png_ptr,
+ "Invalid sRGB rendering intent specified");
+
buf[0]=(png_byte)srgb_intent;
- png_write_chunk(png_ptr, (png_bytep)png_sRGB, buf, (png_size_t)1);
+ png_write_chunk(png_ptr, png_sRGB, buf, (png_size_t)1);
}
#endif
#ifdef PNG_WRITE_iCCP_SUPPORTED
/* Write an iCCP chunk */
void /* PRIVATE */
-png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
- png_charp profile, int profile_len)
+png_write_iCCP(png_structp png_ptr, png_const_charp name, int compression_type,
+ png_const_charp profile, int profile_len)
{
PNG_iCCP;
png_size_t name_len;
@@ -791,8 +862,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
comp.input = NULL;
comp.input_len = 0;
- if ((name_len = png_check_keyword(png_ptr, name,
- &new_name)) == 0)
+ if ((name_len = png_check_keyword(png_ptr, name, &new_name)) == 0)
return;
if (compression_type != PNG_COMPRESSION_TYPE_BASE)
@@ -803,15 +873,16 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
if (profile_len > 3)
embedded_profile_len =
- ((*( (png_bytep)profile ))<<24) |
- ((*( (png_bytep)profile + 1))<<16) |
- ((*( (png_bytep)profile + 2))<< 8) |
- ((*( (png_bytep)profile + 3)) );
+ ((*( (png_const_bytep)profile ))<<24) |
+ ((*( (png_const_bytep)profile + 1))<<16) |
+ ((*( (png_const_bytep)profile + 2))<< 8) |
+ ((*( (png_const_bytep)profile + 3)) );
if (embedded_profile_len < 0)
{
png_warning(png_ptr,
- "Embedded profile length in iCCP chunk is negative");
+ "Embedded profile length in iCCP chunk is negative");
+
png_free(png_ptr, new_name);
return;
}
@@ -819,7 +890,8 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
if (profile_len < embedded_profile_len)
{
png_warning(png_ptr,
- "Embedded profile length too large in iCCP chunk");
+ "Embedded profile length too large in iCCP chunk");
+
png_free(png_ptr, new_name);
return;
}
@@ -827,20 +899,23 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
if (profile_len > embedded_profile_len)
{
png_warning(png_ptr,
- "Truncating profile to actual length in iCCP chunk");
+ "Truncating profile to actual length in iCCP chunk");
+
profile_len = embedded_profile_len;
}
if (profile_len)
profile_len = png_text_compress(png_ptr, profile,
- (png_size_t)profile_len, PNG_COMPRESSION_TYPE_BASE, &comp);
+ (png_size_t)profile_len, PNG_COMPRESSION_TYPE_BASE, &comp);
/* Make sure we include the NULL after the name and the compression type */
- png_write_chunk_start(png_ptr, (png_bytep)png_iCCP,
- (png_uint_32)(name_len + profile_len + 2));
+ png_write_chunk_start(png_ptr, png_iCCP,
+ (png_uint_32)(name_len + profile_len + 2));
+
new_name[name_len + 1] = 0x00;
+
png_write_chunk_data(png_ptr, (png_bytep)new_name,
- (png_size_t)(name_len + 2));
+ (png_size_t)(name_len + 2));
if (profile_len)
png_write_compressed_data_out(png_ptr, &comp);
@@ -853,7 +928,7 @@ png_write_iCCP(png_structp png_ptr, png_charp name, int compression_type,
#ifdef PNG_WRITE_sPLT_SUPPORTED
/* Write a sPLT chunk */
void /* PRIVATE */
-png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
+png_write_sPLT(png_structp png_ptr, png_const_sPLT_tp spalette)
{
PNG_sPLT;
png_size_t name_len;
@@ -872,11 +947,13 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
return;
/* Make sure we include the NULL after the name */
- png_write_chunk_start(png_ptr, (png_bytep)png_sPLT,
- (png_uint_32)(name_len + 2 + palette_size));
+ png_write_chunk_start(png_ptr, png_sPLT,
+ (png_uint_32)(name_len + 2 + palette_size));
+
png_write_chunk_data(png_ptr, (png_bytep)new_name,
- (png_size_t)(name_len + 1));
- png_write_chunk_data(png_ptr, (png_bytep)&spalette->depth, (png_size_t)1);
+ (png_size_t)(name_len + 1));
+
+ png_write_chunk_data(png_ptr, &spalette->depth, (png_size_t)1);
/* Loop through each palette entry, writing appropriately */
#ifdef PNG_POINTER_INDEXING_SUPPORTED
@@ -884,42 +961,46 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
{
if (spalette->depth == 8)
{
- entrybuf[0] = (png_byte)ep->red;
- entrybuf[1] = (png_byte)ep->green;
- entrybuf[2] = (png_byte)ep->blue;
- entrybuf[3] = (png_byte)ep->alpha;
- png_save_uint_16(entrybuf + 4, ep->frequency);
+ entrybuf[0] = (png_byte)ep->red;
+ entrybuf[1] = (png_byte)ep->green;
+ entrybuf[2] = (png_byte)ep->blue;
+ entrybuf[3] = (png_byte)ep->alpha;
+ png_save_uint_16(entrybuf + 4, ep->frequency);
}
+
else
{
- png_save_uint_16(entrybuf + 0, ep->red);
- png_save_uint_16(entrybuf + 2, ep->green);
- png_save_uint_16(entrybuf + 4, ep->blue);
- png_save_uint_16(entrybuf + 6, ep->alpha);
- png_save_uint_16(entrybuf + 8, ep->frequency);
+ png_save_uint_16(entrybuf + 0, ep->red);
+ png_save_uint_16(entrybuf + 2, ep->green);
+ png_save_uint_16(entrybuf + 4, ep->blue);
+ png_save_uint_16(entrybuf + 6, ep->alpha);
+ png_save_uint_16(entrybuf + 8, ep->frequency);
}
+
png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size);
}
#else
ep=spalette->entries;
- for (i=0; i>spalette->nentries; i++)
+ for (i = 0; i>spalette->nentries; i++)
{
if (spalette->depth == 8)
{
- entrybuf[0] = (png_byte)ep[i].red;
- entrybuf[1] = (png_byte)ep[i].green;
- entrybuf[2] = (png_byte)ep[i].blue;
- entrybuf[3] = (png_byte)ep[i].alpha;
- png_save_uint_16(entrybuf + 4, ep[i].frequency);
+ entrybuf[0] = (png_byte)ep[i].red;
+ entrybuf[1] = (png_byte)ep[i].green;
+ entrybuf[2] = (png_byte)ep[i].blue;
+ entrybuf[3] = (png_byte)ep[i].alpha;
+ png_save_uint_16(entrybuf + 4, ep[i].frequency);
}
+
else
{
- png_save_uint_16(entrybuf + 0, ep[i].red);
- png_save_uint_16(entrybuf + 2, ep[i].green);
- png_save_uint_16(entrybuf + 4, ep[i].blue);
- png_save_uint_16(entrybuf + 6, ep[i].alpha);
- png_save_uint_16(entrybuf + 8, ep[i].frequency);
+ png_save_uint_16(entrybuf + 0, ep[i].red);
+ png_save_uint_16(entrybuf + 2, ep[i].green);
+ png_save_uint_16(entrybuf + 4, ep[i].blue);
+ png_save_uint_16(entrybuf + 6, ep[i].alpha);
+ png_save_uint_16(entrybuf + 8, ep[i].frequency);
}
+
png_write_chunk_data(png_ptr, entrybuf, (png_size_t)entry_size);
}
#endif
@@ -932,7 +1013,7 @@ png_write_sPLT(png_structp png_ptr, png_sPLT_tp spalette)
#ifdef PNG_WRITE_sBIT_SUPPORTED
/* Write the sBIT chunk */
void /* PRIVATE */
-png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
+png_write_sBIT(png_structp png_ptr, png_const_color_8p sbit, int color_type)
{
PNG_sBIT;
png_byte buf[4];
@@ -946,7 +1027,8 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
png_byte maxbits;
maxbits = (png_byte)(color_type==PNG_COLOR_TYPE_PALETTE ? 8 :
- png_ptr->usr_bit_depth);
+ png_ptr->usr_bit_depth);
+
if (sbit->red == 0 || sbit->red > maxbits ||
sbit->green == 0 || sbit->green > maxbits ||
sbit->blue == 0 || sbit->blue > maxbits)
@@ -954,11 +1036,13 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
png_warning(png_ptr, "Invalid sBIT depth specified");
return;
}
+
buf[0] = sbit->red;
buf[1] = sbit->green;
buf[2] = sbit->blue;
size = 3;
}
+
else
{
if (sbit->gray == 0 || sbit->gray > png_ptr->usr_bit_depth)
@@ -966,6 +1050,7 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
png_warning(png_ptr, "Invalid sBIT depth specified");
return;
}
+
buf[0] = sbit->gray;
size = 1;
}
@@ -977,67 +1062,21 @@ png_write_sBIT(png_structp png_ptr, png_color_8p sbit, int color_type)
png_warning(png_ptr, "Invalid sBIT depth specified");
return;
}
+
buf[size++] = sbit->alpha;
}
- png_write_chunk(png_ptr, (png_bytep)png_sBIT, buf, size);
+ png_write_chunk(png_ptr, png_sBIT, buf, size);
}
#endif
#ifdef PNG_WRITE_cHRM_SUPPORTED
/* Write the cHRM chunk */
-#ifdef PNG_FLOATING_POINT_SUPPORTED
-void /* PRIVATE */
-png_write_cHRM(png_structp png_ptr, double white_x, double white_y,
- double red_x, double red_y, double green_x, double green_y,
- double blue_x, double blue_y)
-{
- PNG_cHRM;
- png_byte buf[32];
-
- png_fixed_point int_white_x, int_white_y, int_red_x, int_red_y,
- int_green_x, int_green_y, int_blue_x, int_blue_y;
-
- png_debug(1, "in png_write_cHRM");
-
- int_white_x = (png_uint_32)(white_x * 100000.0 + 0.5);
- int_white_y = (png_uint_32)(white_y * 100000.0 + 0.5);
- int_red_x = (png_uint_32)(red_x * 100000.0 + 0.5);
- int_red_y = (png_uint_32)(red_y * 100000.0 + 0.5);
- int_green_x = (png_uint_32)(green_x * 100000.0 + 0.5);
- int_green_y = (png_uint_32)(green_y * 100000.0 + 0.5);
- int_blue_x = (png_uint_32)(blue_x * 100000.0 + 0.5);
- int_blue_y = (png_uint_32)(blue_y * 100000.0 + 0.5);
-
-#ifdef PNG_CHECK_cHRM_SUPPORTED
- if (png_check_cHRM_fixed(png_ptr, int_white_x, int_white_y,
- int_red_x, int_red_y, int_green_x, int_green_y, int_blue_x, int_blue_y))
-#endif
- {
- /* Each value is saved in 1/100,000ths */
-
- png_save_uint_32(buf, int_white_x);
- png_save_uint_32(buf + 4, int_white_y);
-
- png_save_uint_32(buf + 8, int_red_x);
- png_save_uint_32(buf + 12, int_red_y);
-
- png_save_uint_32(buf + 16, int_green_x);
- png_save_uint_32(buf + 20, int_green_y);
-
- png_save_uint_32(buf + 24, int_blue_x);
- png_save_uint_32(buf + 28, int_blue_y);
-
- png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32);
- }
-}
-#endif
-#ifdef PNG_FIXED_POINT_SUPPORTED
void /* PRIVATE */
png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
- png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y,
- png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x,
- png_fixed_point blue_y)
+ png_fixed_point white_y, png_fixed_point red_x, png_fixed_point red_y,
+ png_fixed_point green_x, png_fixed_point green_y, png_fixed_point blue_x,
+ png_fixed_point blue_y)
{
PNG_cHRM;
png_byte buf[32];
@@ -1047,7 +1086,7 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
/* Each value is saved in 1/100,000ths */
#ifdef PNG_CHECK_cHRM_SUPPORTED
if (png_check_cHRM_fixed(png_ptr, white_x, white_y, red_x, red_y,
- green_x, green_y, blue_x, blue_y))
+ green_x, green_y, blue_x, blue_y))
#endif
{
png_save_uint_32(buf, (png_uint_32)white_x);
@@ -1062,17 +1101,16 @@ png_write_cHRM_fixed(png_structp png_ptr, png_fixed_point white_x,
png_save_uint_32(buf + 24, (png_uint_32)blue_x);
png_save_uint_32(buf + 28, (png_uint_32)blue_y);
- png_write_chunk(png_ptr, (png_bytep)png_cHRM, buf, (png_size_t)32);
+ png_write_chunk(png_ptr, png_cHRM, buf, (png_size_t)32);
}
}
#endif
-#endif
#ifdef PNG_WRITE_tRNS_SUPPORTED
/* Write the tRNS chunk */
void /* PRIVATE */
-png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran,
- int num_trans, int color_type)
+png_write_tRNS(png_structp png_ptr, png_const_bytep trans_alpha,
+ png_const_color_16p tran, int num_trans, int color_type)
{
PNG_tRNS;
png_byte buf[6];
@@ -1086,36 +1124,46 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran,
png_warning(png_ptr, "Invalid number of transparent colors specified");
return;
}
+
/* Write the chunk out as it is */
- png_write_chunk(png_ptr, (png_bytep)png_tRNS, trans_alpha,
- (png_size_t)num_trans);
+ png_write_chunk(png_ptr, png_tRNS, trans_alpha, (png_size_t)num_trans);
}
+
else if (color_type == PNG_COLOR_TYPE_GRAY)
{
/* One 16 bit value */
if (tran->gray >= (1 << png_ptr->bit_depth))
{
png_warning(png_ptr,
- "Ignoring attempt to write tRNS chunk out-of-range for bit_depth");
+ "Ignoring attempt to write tRNS chunk out-of-range for bit_depth");
+
return;
}
+
png_save_uint_16(buf, tran->gray);
- png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)2);
+ png_write_chunk(png_ptr, png_tRNS, buf, (png_size_t)2);
}
+
else if (color_type == PNG_COLOR_TYPE_RGB)
{
/* Three 16 bit values */
png_save_uint_16(buf, tran->red);
png_save_uint_16(buf + 2, tran->green);
png_save_uint_16(buf + 4, tran->blue);
+#ifdef PNG_WRITE_16BIT_SUPPORTED
if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
+#else
+ if (buf[0] | buf[2] | buf[4])
+#endif
{
png_warning(png_ptr,
"Ignoring attempt to write 16-bit tRNS chunk when bit_depth is 8");
return;
}
- png_write_chunk(png_ptr, (png_bytep)png_tRNS, buf, (png_size_t)6);
+
+ png_write_chunk(png_ptr, png_tRNS, buf, (png_size_t)6);
}
+
else
{
png_warning(png_ptr, "Can't write tRNS with an alpha channel");
@@ -1126,7 +1174,7 @@ png_write_tRNS(png_structp png_ptr, png_bytep trans_alpha, png_color_16p tran,
#ifdef PNG_WRITE_bKGD_SUPPORTED
/* Write the background chunk */
void /* PRIVATE */
-png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
+png_write_bKGD(png_structp png_ptr, png_const_color_16p back, int color_type)
{
PNG_bKGD;
png_byte buf[6];
@@ -1145,32 +1193,43 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
png_warning(png_ptr, "Invalid background palette index");
return;
}
+
buf[0] = back->index;
- png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)1);
+ png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)1);
}
+
else if (color_type & PNG_COLOR_MASK_COLOR)
{
png_save_uint_16(buf, back->red);
png_save_uint_16(buf + 2, back->green);
png_save_uint_16(buf + 4, back->blue);
+#ifdef PNG_WRITE_16BIT_SUPPORTED
if (png_ptr->bit_depth == 8 && (buf[0] | buf[2] | buf[4]))
+#else
+ if (buf[0] | buf[2] | buf[4])
+#endif
{
png_warning(png_ptr,
- "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8");
+ "Ignoring attempt to write 16-bit bKGD chunk when bit_depth is 8");
+
return;
}
- png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)6);
+
+ png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)6);
}
+
else
{
if (back->gray >= (1 << png_ptr->bit_depth))
{
png_warning(png_ptr,
- "Ignoring attempt to write bKGD chunk out-of-range for bit_depth");
+ "Ignoring attempt to write bKGD chunk out-of-range for bit_depth");
+
return;
}
+
png_save_uint_16(buf, back->gray);
- png_write_chunk(png_ptr, (png_bytep)png_bKGD, buf, (png_size_t)2);
+ png_write_chunk(png_ptr, png_bKGD, buf, (png_size_t)2);
}
}
#endif
@@ -1178,7 +1237,7 @@ png_write_bKGD(png_structp png_ptr, png_color_16p back, int color_type)
#ifdef PNG_WRITE_hIST_SUPPORTED
/* Write the histogram */
void /* PRIVATE */
-png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)
+png_write_hIST(png_structp png_ptr, png_const_uint_16p hist, int num_hist)
{
PNG_hIST;
int i;
@@ -1189,18 +1248,20 @@ png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)
if (num_hist > (int)png_ptr->num_palette)
{
png_debug2(3, "num_hist = %d, num_palette = %d", num_hist,
- png_ptr->num_palette);
+ png_ptr->num_palette);
+
png_warning(png_ptr, "Invalid number of histogram entries specified");
return;
}
- png_write_chunk_start(png_ptr, (png_bytep)png_hIST,
- (png_uint_32)(num_hist * 2));
+ png_write_chunk_start(png_ptr, png_hIST, (png_uint_32)(num_hist * 2));
+
for (i = 0; i < num_hist; i++)
{
png_save_uint_16(buf, hist[i]);
png_write_chunk_data(png_ptr, buf, (png_size_t)2);
}
+
png_write_chunk_end(png_ptr);
}
#endif
@@ -1218,9 +1279,10 @@ png_write_hIST(png_structp png_ptr, png_uint_16p hist, int num_hist)
* static keywords without having to have duplicate copies of the strings.
*/
png_size_t /* PRIVATE */
-png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
+png_check_keyword(png_structp png_ptr, png_const_charp key, png_charpp new_key)
{
png_size_t key_len;
+ png_const_charp ikp;
png_charp kp, dp;
int kflag;
int kwarn=0;
@@ -1238,6 +1300,7 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
png_debug1(2, "Keyword to be checked is '%s'", key);
*new_key = (png_charp)png_malloc_warn(png_ptr, (png_uint_32)(key_len + 2));
+
if (*new_key == NULL)
{
png_warning(png_ptr, "Out of memory while procesing keyword");
@@ -1245,25 +1308,26 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
}
/* Replace non-printing characters with a blank and print a warning */
- for (kp = key, dp = *new_key; *kp != '\0'; kp++, dp++)
+ for (ikp = key, dp = *new_key; *ikp != '\0'; ikp++, dp++)
{
- if ((png_byte)*kp < 0x20 ||
- ((png_byte)*kp > 0x7E && (png_byte)*kp < 0xA1))
+ if ((png_byte)*ikp < 0x20 ||
+ ((png_byte)*ikp > 0x7E && (png_byte)*ikp < 0xA1))
{
-#ifdef PNG_STDIO_SUPPORTED
+#ifdef PNG_CONSOLE_IO_SUPPORTED
char msg[40];
png_snprintf(msg, 40,
- "invalid keyword character 0x%02X", (png_byte)*kp);
+ "invalid keyword character 0x%02X", (png_byte)*ikp);
png_warning(png_ptr, msg);
#else
png_warning(png_ptr, "invalid character in keyword");
#endif
*dp = ' ';
}
+
else
{
- *dp = *kp;
+ *dp = *ikp;
}
}
*dp = '\0';
@@ -1304,11 +1368,13 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
*(dp++) = *kp;
kflag = 1;
}
+
else if (*kp == ' ')
{
key_len--;
- kwarn=1;
+ kwarn = 1;
}
+
else
{
*(dp++) = *kp;
@@ -1339,8 +1405,8 @@ png_check_keyword(png_structp png_ptr, png_charp key, png_charpp new_key)
#ifdef PNG_WRITE_tEXt_SUPPORTED
/* Write a tEXt chunk */
void /* PRIVATE */
-png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
- png_size_t text_len)
+png_write_tEXt(png_structp png_ptr, png_const_charp key, png_const_charp text,
+ png_size_t text_len)
{
PNG_tEXt;
png_size_t key_len;
@@ -1353,12 +1419,13 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
if (text == NULL || *text == '\0')
text_len = 0;
+
else
text_len = png_strlen(text);
/* Make sure we include the 0 after the key */
- png_write_chunk_start(png_ptr, (png_bytep)png_tEXt,
- (png_uint_32)(key_len + text_len + 1));
+ png_write_chunk_start(png_ptr, png_tEXt,
+ (png_uint_32)(key_len + text_len + 1));
/*
* We leave it to the application to meet PNG-1.0 requirements on the
* contents of the text. PNG-1.0 through PNG-1.2 discourage the use of
@@ -1366,9 +1433,11 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
* The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.
*/
png_write_chunk_data(png_ptr, (png_bytep)new_key,
- (png_size_t)(key_len + 1));
+ (png_size_t)(key_len + 1));
+
if (text_len)
- png_write_chunk_data(png_ptr, (png_bytep)text, (png_size_t)text_len);
+ png_write_chunk_data(png_ptr, (png_const_bytep)text,
+ (png_size_t)text_len);
png_write_chunk_end(png_ptr);
png_free(png_ptr, new_key);
@@ -1378,12 +1447,12 @@ png_write_tEXt(png_structp png_ptr, png_charp key, png_charp text,
#ifdef PNG_WRITE_zTXt_SUPPORTED
/* Write a compressed text chunk */
void /* PRIVATE */
-png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
- png_size_t text_len, int compression)
+png_write_zTXt(png_structp png_ptr, png_const_charp key, png_const_charp text,
+ png_size_t text_len, int compression)
{
PNG_zTXt;
png_size_t key_len;
- char buf[1];
+ png_byte buf;
png_charp new_key;
compression_state comp;
@@ -1395,7 +1464,7 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
comp.input = NULL;
comp.input_len = 0;
- if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0)
+ if ((key_len = png_check_keyword(png_ptr, key, &new_key)) == 0)
{
png_free(png_ptr, new_key);
return;
@@ -1415,16 +1484,20 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
&comp);
/* Write start of chunk */
- png_write_chunk_start(png_ptr, (png_bytep)png_zTXt,
- (png_uint_32)(key_len+text_len + 2));
+ png_write_chunk_start(png_ptr, png_zTXt,
+ (png_uint_32)(key_len+text_len + 2));
+
/* Write key */
png_write_chunk_data(png_ptr, (png_bytep)new_key,
- (png_size_t)(key_len + 1));
+ (png_size_t)(key_len + 1));
+
png_free(png_ptr, new_key);
- buf[0] = (png_byte)compression;
+ buf = (png_byte)compression;
+
/* Write compression */
- png_write_chunk_data(png_ptr, (png_bytep)buf, (png_size_t)1);
+ png_write_chunk_data(png_ptr, &buf, (png_size_t)1);
+
/* Write the compressed data */
png_write_compressed_data_out(png_ptr, &comp);
@@ -1436,8 +1509,8 @@ png_write_zTXt(png_structp png_ptr, png_charp key, png_charp text,
#ifdef PNG_WRITE_iTXt_SUPPORTED
/* Write an iTXt chunk */
void /* PRIVATE */
-png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
- png_charp lang, png_charp lang_key, png_charp text)
+png_write_iTXt(png_structp png_ptr, int compression, png_const_charp key,
+ png_const_charp lang, png_const_charp lang_key, png_const_charp text)
{
PNG_iTXt;
png_size_t lang_len, key_len, lang_key_len, text_len;
@@ -1453,10 +1526,10 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
comp.output_ptr = NULL;
comp.input = NULL;
- if ((key_len = png_check_keyword(png_ptr, key, &new_key))==0)
+ if ((key_len = png_check_keyword(png_ptr, key, &new_key)) == 0)
return;
- if ((lang_len = png_check_keyword(png_ptr, lang, &new_lang))==0)
+ if ((lang_len = png_check_keyword(png_ptr, lang, &new_lang)) == 0)
{
png_warning(png_ptr, "Empty language field in iTXt chunk");
new_lang = NULL;
@@ -1465,24 +1538,26 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
if (lang_key == NULL)
lang_key_len = 0;
+
else
lang_key_len = png_strlen(lang_key);
if (text == NULL)
text_len = 0;
+
else
text_len = png_strlen(text);
/* Compute the compressed data; do it now for the length */
- text_len = png_text_compress(png_ptr, text, text_len, compression-2,
- &comp);
+ text_len = png_text_compress(png_ptr, text, text_len, compression - 2,
+ &comp);
/* Make sure we include the compression flag, the compression byte,
- * and the NULs after the key, lang, and lang_key parts */
+ * and the NULs after the key, lang, and lang_key parts
+ */
- png_write_chunk_start(png_ptr, (png_bytep)png_iTXt,
- (png_uint_32)(
+ png_write_chunk_start(png_ptr, png_iTXt, (png_uint_32)(
5 /* comp byte, comp flag, terminators for key, lang and lang_key */
+ key_len
+ lang_len
@@ -1494,27 +1569,32 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
* any non-Latin-1 characters except for NEWLINE. ISO PNG will forbid them.
* The NUL character is forbidden by PNG-1.0 through PNG-1.2 and ISO PNG.
*/
- png_write_chunk_data(png_ptr, (png_bytep)new_key,
- (png_size_t)(key_len + 1));
+ png_write_chunk_data(png_ptr, (png_bytep)new_key, (png_size_t)(key_len + 1));
/* Set the compression flag */
- if (compression == PNG_ITXT_COMPRESSION_NONE || \
+ if (compression == PNG_ITXT_COMPRESSION_NONE ||
compression == PNG_TEXT_COMPRESSION_NONE)
- cbuf[0] = 0;
+ cbuf[0] = 0;
+
else /* compression == PNG_ITXT_COMPRESSION_zTXt */
- cbuf[0] = 1;
+ cbuf[0] = 1;
+
/* Set the compression method */
cbuf[1] = 0;
+
png_write_chunk_data(png_ptr, cbuf, (png_size_t)2);
cbuf[0] = 0;
- png_write_chunk_data(png_ptr, (new_lang ? (png_bytep)new_lang : cbuf),
- (png_size_t)(lang_len + 1));
- png_write_chunk_data(png_ptr, (lang_key ? (png_bytep)lang_key : cbuf),
- (png_size_t)(lang_key_len + 1));
+ png_write_chunk_data(png_ptr, (new_lang ? (png_const_bytep)new_lang : cbuf),
+ (png_size_t)(lang_len + 1));
+
+ png_write_chunk_data(png_ptr, (lang_key ? (png_const_bytep)lang_key : cbuf),
+ (png_size_t)(lang_key_len + 1));
+
png_write_compressed_data_out(png_ptr, &comp);
png_write_chunk_end(png_ptr);
+
png_free(png_ptr, new_key);
png_free(png_ptr, new_lang);
}
@@ -1524,7 +1604,7 @@ png_write_iTXt(png_structp png_ptr, int compression, png_charp key,
/* Write the oFFs chunk */
void /* PRIVATE */
png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
- int unit_type)
+ int unit_type)
{
PNG_oFFs;
png_byte buf[9];
@@ -1538,14 +1618,15 @@ png_write_oFFs(png_structp png_ptr, png_int_32 x_offset, png_int_32 y_offset,
png_save_int_32(buf + 4, y_offset);
buf[8] = (png_byte)unit_type;
- png_write_chunk(png_ptr, (png_bytep)png_oFFs, buf, (png_size_t)9);
+ png_write_chunk(png_ptr, png_oFFs, buf, (png_size_t)9);
}
#endif
#ifdef PNG_WRITE_pCAL_SUPPORTED
/* Write the pCAL chunk (described in the PNG extensions document) */
void /* PRIVATE */
png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
- png_int_32 X1, int type, int nparams, png_charp units, png_charpp params)
+ png_int_32 X1, int type, int nparams, png_const_charp units,
+ png_charpp params)
{
PNG_pCAL;
png_size_t purpose_len, units_len, total_len;
@@ -1566,35 +1647,36 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
total_len = purpose_len + units_len + 10;
params_len = (png_uint_32p)png_malloc(png_ptr,
- (png_alloc_size_t)(nparams * png_sizeof(png_uint_32)));
+ (png_alloc_size_t)(nparams * png_sizeof(png_uint_32)));
/* Find the length of each parameter, making sure we don't count the
- null terminator for the last parameter. */
+ * null terminator for the last parameter.
+ */
for (i = 0; i < nparams; i++)
{
params_len[i] = png_strlen(params[i]) + (i == nparams - 1 ? 0 : 1);
png_debug2(3, "pCAL parameter %d length = %lu", i,
- (unsigned long) params_len[i]);
+ (unsigned long)params_len[i]);
total_len += (png_size_t)params_len[i];
}
png_debug1(3, "pCAL total length = %d", (int)total_len);
- png_write_chunk_start(png_ptr, (png_bytep)png_pCAL, (png_uint_32)total_len);
- png_write_chunk_data(png_ptr, (png_bytep)new_purpose,
- (png_size_t)purpose_len);
+ png_write_chunk_start(png_ptr, png_pCAL, (png_uint_32)total_len);
+ png_write_chunk_data(png_ptr, (png_const_bytep)new_purpose,
+ (png_size_t)purpose_len);
png_save_int_32(buf, X0);
png_save_int_32(buf + 4, X1);
buf[8] = (png_byte)type;
buf[9] = (png_byte)nparams;
png_write_chunk_data(png_ptr, buf, (png_size_t)10);
- png_write_chunk_data(png_ptr, (png_bytep)units, (png_size_t)units_len);
+ png_write_chunk_data(png_ptr, (png_const_bytep)units, (png_size_t)units_len);
png_free(png_ptr, new_purpose);
for (i = 0; i < nparams; i++)
{
- png_write_chunk_data(png_ptr, (png_bytep)params[i],
- (png_size_t)params_len[i]);
+ png_write_chunk_data(png_ptr, (png_const_bytep)params[i],
+ (png_size_t)params_len[i]);
}
png_free(png_ptr, params_len);
@@ -1604,30 +1686,9 @@ png_write_pCAL(png_structp png_ptr, png_charp purpose, png_int_32 X0,
#ifdef PNG_WRITE_sCAL_SUPPORTED
/* Write the sCAL chunk */
-#if defined(PNG_FLOATING_POINT_SUPPORTED) && defined(PNG_STDIO_SUPPORTED)
void /* PRIVATE */
-png_write_sCAL(png_structp png_ptr, int unit, double width, double height)
-{
- PNG_sCAL;
- char buf[64];
- png_size_t total_len;
-
- png_debug(1, "in png_write_sCAL");
-
- buf[0] = (char)unit;
- png_snprintf(buf + 1, 63, "%12.12e", width);
- total_len = 1 + png_strlen(buf + 1) + 1;
- png_snprintf(buf + total_len, 64-total_len, "%12.12e", height);
- total_len += png_strlen(buf + total_len);
-
- png_debug1(3, "sCAL total length = %u", (unsigned int)total_len);
- png_write_chunk(png_ptr, (png_bytep)png_sCAL, (png_bytep)buf, total_len);
-}
-#else
-#ifdef PNG_FIXED_POINT_SUPPORTED
-void /* PRIVATE */
-png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
- png_charp height)
+png_write_sCAL_s(png_structp png_ptr, int unit, png_const_charp width,
+ png_const_charp height)
{
PNG_sCAL;
png_byte buf[64];
@@ -1638,6 +1699,7 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
wlen = png_strlen(width);
hlen = png_strlen(height);
total_len = wlen + hlen + 2;
+
if (total_len > 64)
{
png_warning(png_ptr, "Can't write sCAL (buffer too small)");
@@ -1649,18 +1711,16 @@ png_write_sCAL_s(png_structp png_ptr, int unit, png_charp width,
png_memcpy(buf + wlen + 2, height, hlen); /* Do NOT append the '\0' here */
png_debug1(3, "sCAL total length = %u", (unsigned int)total_len);
- png_write_chunk(png_ptr, (png_bytep)png_sCAL, buf, total_len);
+ png_write_chunk(png_ptr, png_sCAL, buf, total_len);
}
#endif
-#endif
-#endif
#ifdef PNG_WRITE_pHYs_SUPPORTED
/* Write the pHYs chunk */
void /* PRIVATE */
png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
- png_uint_32 y_pixels_per_unit,
- int unit_type)
+ png_uint_32 y_pixels_per_unit,
+ int unit_type)
{
PNG_pHYs;
png_byte buf[9];
@@ -1674,7 +1734,7 @@ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
png_save_uint_32(buf + 4, y_pixels_per_unit);
buf[8] = (png_byte)unit_type;
- png_write_chunk(png_ptr, (png_bytep)png_pHYs, buf, (png_size_t)9);
+ png_write_chunk(png_ptr, png_pHYs, buf, (png_size_t)9);
}
#endif
@@ -1683,7 +1743,7 @@ png_write_pHYs(png_structp png_ptr, png_uint_32 x_pixels_per_unit,
* or png_convert_from_time_t(), or fill in the structure yourself.
*/
void /* PRIVATE */
-png_write_tIME(png_structp png_ptr, png_timep mod_time)
+png_write_tIME(png_structp png_ptr, png_const_timep mod_time)
{
PNG_tIME;
png_byte buf[7];
@@ -1705,7 +1765,7 @@ png_write_tIME(png_structp png_ptr, png_timep mod_time)
buf[5] = mod_time->minute;
buf[6] = mod_time->second;
- png_write_chunk(png_ptr, (png_bytep)png_tIME, buf, (png_size_t)7);
+ png_write_chunk(png_ptr, png_tIME, buf, (png_size_t)7);
}
#endif
@@ -1734,19 +1794,20 @@ png_write_start_row(png_structp png_ptr)
png_debug(1, "in png_write_start_row");
buf_size = (png_size_t)(PNG_ROWBYTES(
- png_ptr->usr_channels*png_ptr->usr_bit_depth, png_ptr->width) + 1);
+ png_ptr->usr_channels*png_ptr->usr_bit_depth, png_ptr->width) + 1);
/* Set up row buffer */
png_ptr->row_buf = (png_bytep)png_malloc(png_ptr,
- (png_alloc_size_t)buf_size);
+ (png_alloc_size_t)buf_size);
+
png_ptr->row_buf[0] = PNG_FILTER_VALUE_NONE;
#ifdef PNG_WRITE_FILTER_SUPPORTED
/* Set up filtering buffer, if using this filter */
if (png_ptr->do_filter & PNG_FILTER_SUB)
{
- png_ptr->sub_row = (png_bytep)png_malloc(png_ptr,
- (png_alloc_size_t)(png_ptr->rowbytes + 1));
+ png_ptr->sub_row = (png_bytep)png_malloc(png_ptr, png_ptr->rowbytes + 1);
+
png_ptr->sub_row[0] = PNG_FILTER_VALUE_SUB;
}
@@ -1755,26 +1816,29 @@ png_write_start_row(png_structp png_ptr)
{
/* Set up previous row buffer */
png_ptr->prev_row = (png_bytep)png_calloc(png_ptr,
- (png_alloc_size_t)buf_size);
+ (png_alloc_size_t)buf_size);
if (png_ptr->do_filter & PNG_FILTER_UP)
{
png_ptr->up_row = (png_bytep)png_malloc(png_ptr,
- (png_size_t)(png_ptr->rowbytes + 1));
+ png_ptr->rowbytes + 1);
+
png_ptr->up_row[0] = PNG_FILTER_VALUE_UP;
}
if (png_ptr->do_filter & PNG_FILTER_AVG)
{
png_ptr->avg_row = (png_bytep)png_malloc(png_ptr,
- (png_alloc_size_t)(png_ptr->rowbytes + 1));
+ png_ptr->rowbytes + 1);
+
png_ptr->avg_row[0] = PNG_FILTER_VALUE_AVG;
}
if (png_ptr->do_filter & PNG_FILTER_PAETH)
{
png_ptr->paeth_row = (png_bytep)png_malloc(png_ptr,
- (png_size_t)(png_ptr->rowbytes + 1));
+ png_ptr->rowbytes + 1);
+
png_ptr->paeth_row[0] = PNG_FILTER_VALUE_PAETH;
}
}
@@ -1787,22 +1851,26 @@ png_write_start_row(png_structp png_ptr)
if (!(png_ptr->transformations & PNG_INTERLACE))
{
png_ptr->num_rows = (png_ptr->height + png_pass_yinc[0] - 1 -
- png_pass_ystart[0]) / png_pass_yinc[0];
+ png_pass_ystart[0]) / png_pass_yinc[0];
+
png_ptr->usr_width = (png_ptr->width + png_pass_inc[0] - 1 -
- png_pass_start[0]) / png_pass_inc[0];
+ png_pass_start[0]) / png_pass_inc[0];
}
+
else
{
png_ptr->num_rows = png_ptr->height;
png_ptr->usr_width = png_ptr->width;
}
}
+
else
#endif
{
png_ptr->num_rows = png_ptr->height;
png_ptr->usr_width = png_ptr->width;
}
+
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
png_ptr->zstream.next_out = png_ptr->zbuf;
}
@@ -1847,24 +1915,30 @@ png_write_finish_row(png_structp png_ptr)
{
png_ptr->pass++;
}
+
else
{
/* Loop until we find a non-zero width or height pass */
do
{
png_ptr->pass++;
+
if (png_ptr->pass >= 7)
break;
+
png_ptr->usr_width = (png_ptr->width +
- png_pass_inc[png_ptr->pass] - 1 -
- png_pass_start[png_ptr->pass]) /
- png_pass_inc[png_ptr->pass];
+ png_pass_inc[png_ptr->pass] - 1 -
+ png_pass_start[png_ptr->pass]) /
+ png_pass_inc[png_ptr->pass];
+
png_ptr->num_rows = (png_ptr->height +
- png_pass_yinc[png_ptr->pass] - 1 -
- png_pass_ystart[png_ptr->pass]) /
- png_pass_yinc[png_ptr->pass];
+ png_pass_yinc[png_ptr->pass] - 1 -
+ png_pass_ystart[png_ptr->pass]) /
+ png_pass_yinc[png_ptr->pass];
+
if (png_ptr->transformations & PNG_INTERLACE)
break;
+
} while (png_ptr->usr_width == 0 || png_ptr->num_rows == 0);
}
@@ -1874,8 +1948,9 @@ png_write_finish_row(png_structp png_ptr)
{
if (png_ptr->prev_row != NULL)
png_memset(png_ptr->prev_row, 0,
- (png_size_t)(PNG_ROWBYTES(png_ptr->usr_channels*
- png_ptr->usr_bit_depth, png_ptr->width)) + 1);
+ (png_size_t)(PNG_ROWBYTES(png_ptr->usr_channels*
+ png_ptr->usr_bit_depth, png_ptr->width)) + 1);
+
return;
}
}
@@ -1887,6 +1962,7 @@ png_write_finish_row(png_structp png_ptr)
{
/* Tell the compressor we are done */
ret = deflate(&png_ptr->zstream, Z_FINISH);
+
/* Check for an error */
if (ret == Z_OK)
{
@@ -1898,10 +1974,12 @@ png_write_finish_row(png_structp png_ptr)
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
}
}
+
else if (ret != Z_STREAM_END)
{
if (png_ptr->zstream.msg != NULL)
png_error(png_ptr, png_ptr->zstream.msg);
+
else
png_error(png_ptr, "zlib error");
}
@@ -1911,7 +1989,7 @@ png_write_finish_row(png_structp png_ptr)
if (png_ptr->zstream.avail_out < png_ptr->zbuf_size)
{
png_write_IDAT(png_ptr, png_ptr->zbuf, png_ptr->zbuf_size -
- png_ptr->zstream.avail_out);
+ png_ptr->zstream.avail_out);
}
deflateReset(&png_ptr->zstream);
@@ -1958,6 +2036,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
dp = row;
d = 0;
shift = 7;
+
for (i = png_pass_start[pass]; i < row_width;
i += png_pass_inc[pass])
{
@@ -1971,14 +2050,17 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
*dp++ = (png_byte)d;
d = 0;
}
+
else
shift--;
}
if (shift != 7)
*dp = (png_byte)d;
+
break;
}
+
case 2:
{
png_bytep sp;
@@ -1992,6 +2074,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
dp = row;
shift = 6;
d = 0;
+
for (i = png_pass_start[pass]; i < row_width;
i += png_pass_inc[pass])
{
@@ -2005,13 +2088,16 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
*dp++ = (png_byte)d;
d = 0;
}
+
else
shift -= 2;
}
if (shift != 6)
- *dp = (png_byte)d;
+ *dp = (png_byte)d;
+
break;
}
+
case 4:
{
png_bytep sp;
@@ -2026,7 +2112,7 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
shift = 4;
d = 0;
for (i = png_pass_start[pass]; i < row_width;
- i += png_pass_inc[pass])
+ i += png_pass_inc[pass])
{
sp = row + (png_size_t)(i >> 1);
value = (*sp >> ((1 - (int)(i & 0x01)) << 2)) & 0x0f;
@@ -2038,13 +2124,16 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
*dp++ = (png_byte)d;
d = 0;
}
+
else
shift -= 4;
}
if (shift != 4)
*dp = (png_byte)d;
+
break;
}
+
default:
{
png_bytep sp;
@@ -2055,18 +2144,21 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
/* Start at the beginning */
dp = row;
+
/* Find out how many bytes each pixel takes up */
pixel_bytes = (row_info->pixel_depth >> 3);
- /* Loop through the row, only looking at the pixels that
- matter */
+
+ /* Loop through the row, only looking at the pixels that matter */
for (i = png_pass_start[pass]; i < row_width;
i += png_pass_inc[pass])
{
/* Find out where the original pixel is */
sp = row + (png_size_t)i * pixel_bytes;
+
/* Move the pixel */
if (dp != sp)
png_memcpy(dp, sp, pixel_bytes);
+
/* Next pixel */
dp += pixel_bytes;
}
@@ -2075,11 +2167,12 @@ png_do_write_interlace(png_row_infop row_info, png_bytep row, int pass)
}
/* Set new row width */
row_info->width = (row_info->width +
- png_pass_inc[pass] - 1 -
- png_pass_start[pass]) /
- png_pass_inc[pass];
- row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
- row_info->width);
+ png_pass_inc[pass] - 1 -
+ png_pass_start[pass]) /
+ png_pass_inc[pass];
+
+ row_info->rowbytes = PNG_ROWBYTES(row_info->pixel_depth,
+ row_info->width);
}
}
#endif
@@ -2100,20 +2193,20 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
png_bytep prev_row, row_buf;
png_uint_32 mins, bpp;
png_byte filter_to_do = png_ptr->do_filter;
- png_uint_32 row_bytes = row_info->rowbytes;
+ png_size_t row_bytes = row_info->rowbytes;
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
int num_p_filters = (int)png_ptr->num_prev_filters;
-#endif
+#endif
png_debug(1, "in png_write_find_filter");
#ifndef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
if (png_ptr->row_number == 0 && filter_to_do == PNG_ALL_FILTERS)
{
- /* These will never be selected so we need not test them. */
- filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
+ /* These will never be selected so we need not test them. */
+ filter_to_do &= ~(PNG_FILTER_UP | PNG_FILTER_PAETH);
}
-#endif
+#endif
/* Find out how many bytes offset each pixel is */
bpp = (row_info->pixel_depth + 7) >> 3;
@@ -2137,11 +2230,14 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
* computationally expensive).
*
* GRR 980525: consider also
+ *
* (1) minimum sum of absolute differences from running average (i.e.,
* keep running sum of non-absolute differences & count of bytes)
* [track dispersion, too? restart average if dispersion too large?]
+ *
* (1b) minimum sum of absolute differences from sliding average, probably
* with window size <= deflate window (usually 32K)
+ *
* (2) minimum sum of squared differences from zero or running average
* (i.e., ~ root-mean-square approach)
*/
@@ -2150,12 +2246,11 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
/* We don't need to test the 'no filter' case if this is the only filter
* that has been chosen, as it doesn't actually do anything to the data.
*/
- if ((filter_to_do & PNG_FILTER_NONE) &&
- filter_to_do != PNG_FILTER_NONE)
+ if ((filter_to_do & PNG_FILTER_NONE) && filter_to_do != PNG_FILTER_NONE)
{
png_bytep rp;
png_uint_32 sum = 0;
- png_uint_32 i;
+ png_size_t i;
int v;
for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++)
@@ -2178,9 +2273,10 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE)
{
sumlo = (sumlo * png_ptr->filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
sumhi = (sumhi * png_ptr->filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
@@ -2189,12 +2285,14 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
* it has the minimum possible computational cost - none).
*/
sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_NONE]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (sumhi > PNG_HIMASK)
sum = PNG_MAXSUM;
+
else
sum = (sumhi << PNG_HISHIFT) + sumlo;
}
@@ -2207,17 +2305,20 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
/* It's the only filter so no testing is needed */
{
png_bytep rp, lp, dp;
- png_uint_32 i;
+ png_size_t i;
+
for (i = 0, rp = row_buf + 1, dp = png_ptr->sub_row + 1; i < bpp;
i++, rp++, dp++)
{
*dp = *rp;
}
+
for (lp = row_buf + 1; i < row_bytes;
i++, rp++, lp++, dp++)
{
*dp = (png_byte)(((int)*rp - (int)*lp) & 0xff);
}
+
best_row = png_ptr->sub_row;
}
@@ -2225,7 +2326,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
{
png_bytep rp, dp, lp;
png_uint_32 sum = 0, lmins = mins;
- png_uint_32 i;
+ png_size_t i;
int v;
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
@@ -2245,19 +2346,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB)
{
lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (lmhi > PNG_HIMASK)
lmins = PNG_MAXSUM;
+
else
lmins = (lmhi << PNG_HISHIFT) + lmlo;
}
@@ -2270,6 +2374,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
sum += (v < 128) ? v : 256 - v;
}
+
for (lp = row_buf + 1; i < row_bytes;
i++, rp++, lp++, dp++)
{
@@ -2294,19 +2399,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_SUB)
{
sumlo = (sumlo * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
sumhi = (sumhi * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
sumlo = (sumlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
sumhi = (sumhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_SUB]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (sumhi > PNG_HIMASK)
sum = PNG_MAXSUM;
+
else
sum = (sumhi << PNG_HISHIFT) + sumlo;
}
@@ -2323,14 +2431,15 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (filter_to_do == PNG_FILTER_UP)
{
png_bytep rp, dp, pp;
- png_uint_32 i;
+ png_size_t i;
for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1,
- pp = prev_row + 1; i < row_bytes;
- i++, rp++, pp++, dp++)
+ pp = prev_row + 1; i < row_bytes;
+ i++, rp++, pp++, dp++)
{
*dp = (png_byte)(((int)*rp - (int)*pp) & 0xff);
}
+
best_row = png_ptr->up_row;
}
@@ -2338,7 +2447,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
{
png_bytep rp, dp, pp;
png_uint_32 sum = 0, lmins = mins;
- png_uint_32 i;
+ png_size_t i;
int v;
@@ -2355,26 +2464,29 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP)
{
lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_UP]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (lmhi > PNG_HIMASK)
lmins = PNG_MAXSUM;
+
else
lmins = (lmhi << PNG_HISHIFT) + lmlo;
}
#endif
for (i = 0, rp = row_buf + 1, dp = png_ptr->up_row + 1,
- pp = prev_row + 1; i < row_bytes; i++)
+ pp = prev_row + 1; i < row_bytes; i++)
{
v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);
@@ -2397,19 +2509,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_UP)
{
sumlo = (sumlo * png_ptr->filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
sumhi = (sumhi * png_ptr->filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_UP]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (sumhi > PNG_HIMASK)
sum = PNG_MAXSUM;
+
else
sum = (sumhi << PNG_HISHIFT) + sumlo;
}
@@ -2427,11 +2542,13 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
{
png_bytep rp, dp, pp, lp;
png_uint_32 i;
+
for (i = 0, rp = row_buf + 1, dp = png_ptr->avg_row + 1,
pp = prev_row + 1; i < bpp; i++)
{
*dp++ = (png_byte)(((int)*rp++ - ((int)*pp++ / 2)) & 0xff);
}
+
for (lp = row_buf + 1; i < row_bytes; i++)
{
*dp++ = (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2))
@@ -2444,7 +2561,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
{
png_bytep rp, dp, pp, lp;
png_uint_32 sum = 0, lmins = mins;
- png_uint_32 i;
+ png_size_t i;
int v;
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
@@ -2460,19 +2577,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_AVG)
{
lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_AVG]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (lmhi > PNG_HIMASK)
lmins = PNG_MAXSUM;
+
else
lmins = (lmhi << PNG_HISHIFT) + lmlo;
}
@@ -2485,10 +2605,11 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
sum += (v < 128) ? v : 256 - v;
}
+
for (lp = row_buf + 1; i < row_bytes; i++)
{
v = *dp++ =
- (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff);
+ (png_byte)(((int)*rp++ - (((int)*pp++ + (int)*lp++) / 2)) & 0xff);
sum += (v < 128) ? v : 256 - v;
@@ -2509,19 +2630,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_NONE)
{
sumlo = (sumlo * png_ptr->filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
sumhi = (sumhi * png_ptr->filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_AVG]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (sumhi > PNG_HIMASK)
sum = PNG_MAXSUM;
+
else
sum = (sumhi << PNG_HISHIFT) + sumlo;
}
@@ -2538,9 +2662,10 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (filter_to_do == PNG_FILTER_PAETH)
{
png_bytep rp, dp, pp, cp, lp;
- png_uint_32 i;
+ png_size_t i;
+
for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1,
- pp = prev_row + 1; i < bpp; i++)
+ pp = prev_row + 1; i < bpp; i++)
{
*dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);
}
@@ -2577,7 +2702,7 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
{
png_bytep rp, dp, pp, cp, lp;
png_uint_32 sum = 0, lmins = mins;
- png_uint_32 i;
+ png_size_t i;
int v;
#ifdef PNG_WRITE_WEIGHTED_FILTER_SUPPORTED
@@ -2593,26 +2718,29 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH)
{
lmlo = (lmlo * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
lmhi = (lmhi * png_ptr->inv_filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
lmlo = (lmlo * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
lmhi = (lmhi * png_ptr->inv_filter_costs[PNG_FILTER_VALUE_PAETH]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (lmhi > PNG_HIMASK)
lmins = PNG_MAXSUM;
+
else
lmins = (lmhi << PNG_HISHIFT) + lmlo;
}
#endif
for (i = 0, rp = row_buf + 1, dp = png_ptr->paeth_row + 1,
- pp = prev_row + 1; i < bpp; i++)
+ pp = prev_row + 1; i < bpp; i++)
{
v = *dp++ = (png_byte)(((int)*rp++ - (int)*pp++) & 0xff);
@@ -2645,10 +2773,13 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
pa = abs(p - a);
pb = abs(p - b);
pc = abs(p - c);
+
if (pa <= pb && pa <= pc)
p = a;
+
else if (pb <= pc)
p = b;
+
else
p = c;
#endif /* PNG_SLOW_PAETH */
@@ -2674,19 +2805,22 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->prev_filters[j] == PNG_FILTER_VALUE_PAETH)
{
sumlo = (sumlo * png_ptr->filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
+
sumhi = (sumhi * png_ptr->filter_weights[j]) >>
- PNG_WEIGHT_SHIFT;
+ PNG_WEIGHT_SHIFT;
}
}
sumlo = (sumlo * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
+
sumhi = (sumhi * png_ptr->filter_costs[PNG_FILTER_VALUE_PAETH]) >>
- PNG_COST_SHIFT;
+ PNG_COST_SHIFT;
if (sumhi > PNG_HIMASK)
sum = PNG_MAXSUM;
+
else
sum = (sumhi << PNG_HISHIFT) + sumlo;
}
@@ -2708,10 +2842,12 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
if (png_ptr->num_prev_filters > 0)
{
int j;
+
for (j = 1; j < num_p_filters; j++)
{
png_ptr->prev_filters[j] = png_ptr->prev_filters[j - 1];
}
+
png_ptr->prev_filters[j] = best_row[0];
}
#endif
@@ -2723,25 +2859,54 @@ png_write_find_filter(png_structp png_ptr, png_row_infop row_info)
void /* PRIVATE */
png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row)
{
+ png_size_t avail;
+
png_debug(1, "in png_write_filtered_row");
png_debug1(2, "filter = %d", filtered_row[0]);
/* Set up the zlib input buffer */
png_ptr->zstream.next_in = filtered_row;
- png_ptr->zstream.avail_in = (uInt)png_ptr->row_info.rowbytes + 1;
+ png_ptr->zstream.avail_in = 0;
+ avail = png_ptr->row_info.rowbytes + 1;
/* Repeat until we have compressed all the data */
do
{
int ret; /* Return of zlib */
+ /* Record the number of bytes available - zlib supports at least 65535
+ * bytes at one step, depending on the size of the zlib type 'uInt', the
+ * maximum size zlib can write at once is ZLIB_IO_MAX (from pngpriv.h).
+ * Use this because on 16 bit systems 'rowbytes' can be up to 65536 (i.e.
+ * one more than 16 bits) and, in this case 'rowbytes+1' can overflow a
+ * uInt. ZLIB_IO_MAX can be safely reduced to cause zlib to be called
+ * with smaller chunks of data.
+ */
+ if (png_ptr->zstream.avail_in == 0)
+ {
+ if (avail > ZLIB_IO_MAX)
+ {
+ png_ptr->zstream.avail_in = ZLIB_IO_MAX;
+ avail -= ZLIB_IO_MAX;
+ }
+
+ else
+ {
+ /* So this will fit in the available uInt space: */
+ png_ptr->zstream.avail_in = (uInt)avail;
+ avail = 0;
+ }
+ }
+
/* Compress the data */
ret = deflate(&png_ptr->zstream, Z_NO_FLUSH);
+
/* Check for compression errors */
if (ret != Z_OK)
{
if (png_ptr->zstream.msg != NULL)
png_error(png_ptr, png_ptr->zstream.msg);
+
else
png_error(png_ptr, "zlib error");
}
@@ -2755,7 +2920,7 @@ png_write_filtered_row(png_structp png_ptr, png_bytep filtered_row)
png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size;
}
/* Repeat until all data has been compressed */
- } while (png_ptr->zstream.avail_in);
+ } while (avail > 0 || png_ptr->zstream.avail_in > 0);
/* Swap the current and previous rows */
if (png_ptr->prev_row != NULL)
diff --git a/src/3rdparty/libpng/projects/cbuilder5/README.txt b/src/3rdparty/libpng/projects/cbuilder5/README.txt
deleted file mode 100644
index 9efaa4b..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/README.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-The cbuilder5 project has not been updated to libpng-1.4.0.
-
-It needs to depend on pngpriv.h
-
-It needs to *not* depend on pnggccrd.c or pngvcrd.c
-
-It needs to DEFINE PNG_NO_PEDANTIC_WARNING while building
-the library, but not while building an application.
-
-If an updated version is not received, this project will
-be removed when libpng-1.4.0 is released.
diff --git a/src/3rdparty/libpng/projects/cbuilder5/libpng.bpf b/src/3rdparty/libpng/projects/cbuilder5/libpng.bpf
deleted file mode 100644
index ee6d929..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/libpng.bpf
+++ /dev/null
@@ -1,22 +0,0 @@
-USEUNIT("libpng.cpp");
-USEUNIT("..\..\png.c");
-USEUNIT("..\..\pngerror.c");
-USEUNIT("..\..\pngget.c");
-USEUNIT("..\..\pngmem.c");
-USEUNIT("..\..\pngpread.c");
-USEUNIT("..\..\pngread.c");
-USEUNIT("..\..\pngrio.c");
-USEUNIT("..\..\pngrtran.c");
-USEUNIT("..\..\pngrutil.c");
-USEUNIT("..\..\pngset.c");
-USEUNIT("..\..\pngtrans.c");
-USEUNIT("..\..\pngwio.c");
-USEUNIT("..\..\pngwrite.c");
-USEUNIT("..\..\pngwtran.c");
-USEUNIT("..\..\pngwutil.c");
-USELIB("..\..\..\zlib\zlib.lib");
-//---------------------------------------------------------------------------
-This file is used by the project manager only and should be treated like the project file
-
-
-DllEntryPoint
diff --git a/src/3rdparty/libpng/projects/cbuilder5/libpng.bpg b/src/3rdparty/libpng/projects/cbuilder5/libpng.bpg
deleted file mode 100644
index c6c6a4e..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/libpng.bpg
+++ /dev/null
@@ -1,25 +0,0 @@
-#------------------------------------------------------------------------------
-VERSION = BWS.01
-#------------------------------------------------------------------------------
-!ifndef ROOT
-ROOT = $(MAKEDIR)\..
-!endif
-#------------------------------------------------------------------------------
-MAKE = $(ROOT)\bin\make.exe -$(MAKEFLAGS) -f$**
-DCC = $(ROOT)\bin\dcc32.exe $**
-BRCC = $(ROOT)\bin\brcc32.exe $**
-#------------------------------------------------------------------------------
-PROJECTS = libpngstat.lib libpng.dll
-#------------------------------------------------------------------------------
-default: $(PROJECTS)
-#------------------------------------------------------------------------------
-
-libpngstat.lib: libpngstat.bpr
- $(ROOT)\bin\bpr2mak -t$(ROOT)\bin\deflib.bmk $**
- $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
-
-libpng.dll: libpng.bpr
- $(ROOT)\bin\bpr2mak $**
- $(ROOT)\bin\make -$(MAKEFLAGS) -f$*.mak
-
-
diff --git a/src/3rdparty/libpng/projects/cbuilder5/libpng.bpr b/src/3rdparty/libpng/projects/cbuilder5/libpng.bpr
deleted file mode 100644
index 7e09dda..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/libpng.bpr
+++ /dev/null
@@ -1,157 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!-- C++Builder XML Project -->
-<PROJECT>
- <MACROS>
- <VERSION value="BCB.05.03"/>
- <PROJECT value="libpng.dll"/>
- <OBJFILES value="libpng.obj ..\..\pngwutil.obj ..\..\pngerror.obj ..\..\pngget.obj
- ..\..\pngmem.obj ..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj
- ..\..\pngrtran.obj ..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj
- ..\..\pngwio.obj ..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\png.obj"/>
- <RESFILES value=""/>
- <DEFFILE value=""/>
- <RESDEPEN value="$(RESFILES)"/>
- <LIBFILES value="..\..\..\zlib\zlib.lib"/>
- <LIBRARIES value="bcbsmp50.lib dclocx50.lib NMFast50.lib Tee50.lib Vclx50.lib Vcl50.lib"/>
- <SPARELIBS value="Vcl50.lib Vclx50.lib Tee50.lib NMFast50.lib dclocx50.lib bcbsmp50.lib"/>
- <PACKAGES value="Vcl50.bpi Vclx50.bpi bcbsmp50.bpi Qrpt50.bpi Vcldb50.bpi Vclbde50.bpi
- ibsmp50.bpi vcldbx50.bpi TeeUI50.bpi TeeDB50.bpi Tee50.bpi TeeQR50.bpi
- VCLIB50.bpi bcbie50.bpi vclie50.bpi Inetdb50.bpi Inet50.bpi NMFast50.bpi
- dclocx50.bpi bcb97axserver50.bpi SIMULUSCOMPONENTS.bpi Simulus2.bpi"/>
- <PATHCPP value=".;..\.."/>
- <PATHPAS value=".;"/>
- <PATHRC value=".;"/>
- <PATHASM value=".;"/>
- <DEBUGLIBPATH value="$(BCB)\lib\debug"/>
- <RELEASELIBPATH value="$(BCB)\lib\release"/>
- <LINKER value="tlink32"/>
- <USERDEFINES value="PNG_BUILD_DLL;PNG_NO_MODULEDEF"/>
- <SYSDEFINES value="NO_STRICT;_NO_VCL;_RTLDLL"/>
- <MAINSOURCE value="libpng.bpf"/>
- <INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
- <LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
- <WARNINGS value="-w8092 -w8091 -w8090 -w8089 -w8087 -wprc -wucp -wstv -wstu -wsig -wpin
- -wnod -wnak -wdef -wcln -wbbf -wasm -wamp -wamb"/>
- </MACROS>
- <OPTIONS>
- <CFLAG1 value="-WD -O2 -w -Vx -Ve -x- -RT- -X- -a8 -5 -b- -d -k- -vi -tWD -tWM -c"/>
- <PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
- <RFLAGS value=""/>
- <AFLAGS value="/mx /w2 /zn"/>
- <LFLAGS value="-D&quot;&quot; -aa -Tpd -x -Gn -Gi -w"/>
- </OPTIONS>
- <LINKER>
- <ALLOBJ value="c0d32.obj $(OBJFILES)"/>
- <ALLRES value="$(RESFILES)"/>
- <ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mti.lib"/>
- </LINKER>
- <IDEOPTIONS>
-[Version Info]
-IncludeVerInfo=0
-AutoIncBuild=0
-MajorVer=1
-MinorVer=0
-Release=0
-Build=0
-Debug=0
-PreRelease=0
-Special=0
-Private=0
-DLL=1
-Locale=2057
-CodePage=1252
-
-[Version Info Keys]
-CompanyName=
-FileDescription=
-FileVersion=1.0.0.0
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=
-Comments=
-
-[HistoryLists\hlIncludePath]
-Count=18
-Item0=..\..;..\..\..\zlib;$(BCB)\include
-Item1=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
-Item2=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
-Item3=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression\external;$(BCB)\include
-Item4=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
-Item5=..\Source\ThirdParty\PortableNetworkGraphics;..\Source\ThirdParty\ZLibCompression;$(BCB)\include
-Item6=..\Source\ThirdParty\PortableNetworkGraphics;P:\Development\Source\ThirdParty\ZLibCompression;$(BCB)\include
-Item7=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\include
-Item8=$(BCB)\include
-Item9=..\Source;..\Source\General\Templates;..\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
-Item10=P:\Development\Source\;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
-Item11=P:\Development\Source;P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
-Item12=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities\;$(BCB)\include;$(BCB)\include\vcl
-Item13=P:\Development\Source\General\Templates\;P:\Development\Source\SIMUtilities;$(BCB)\include;$(BCB)\include\vcl
-Item14=P:\Development\Source\General\Templates\;$(BCB)\include;$(BCB)\include\vcl
-Item15=P:\Development\Source\General\Templates;$(BCB)\include;$(BCB)\include\vcl
-Item16=P:\Development\Source;$(BCB)\include;$(BCB)\include\vcl
-Item17=$(BCB)\include;$(BCB)\include\vcl
-
-[HistoryLists\hlLibraryPath]
-Count=10
-Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
-Item1=..\..;..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
-Item2=..\Source\ThirdParty\PortableNetworkGraphics\external;..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
-Item3=..\Source\ThirdParty\PortableNetworkGraphics;$(BCB)\lib\obj;$(BCB)\lib
-Item4=$(BCB)\lib\obj;$(BCB)\lib
-Item5=..\Source\SIMUtilities;..\Source;$(BCB)\lib\obj;$(BCB)\lib
-Item6=P:\Development\Source\SIMUtilities\;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
-Item7=P:\Development\Source\SIMUtilities;P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
-Item8=P:\Development\Source\;$(BCB)\lib\obj;$(BCB)\lib
-Item9=P:\Development\Source;$(BCB)\lib\obj;$(BCB)\lib
-
-[HistoryLists\hlDebugSourcePath]
-Count=1
-Item0=$(BCB)\source\vcl
-
-[HistoryLists\hlConditionals]
-Count=20
-Item0=ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
-Item1=_DEBUG;ZLIB_DLL;Z_PREFIX;PNG_BUILD_DLL;PNG_NO_MODULEDEF
-Item2=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_NO_MODULEDEF
-Item3=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_NO_GLOBAL_ARRAYS
-Item4=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED;PNG_DEBUG_FILE=stderr
-Item5=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
-Item6=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF;PNG_SETJMP_NOT_SUPPORTED
-Item7=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5;PNG_NO_MODULEDEF
-Item8=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG;PNG_DEBUG=5
-Item9=PNG_BUILD_DLL;ZLIB_DLL;_DEBUG
-Item10=PNG_BUILD_DLL;ZLIB_DLL
-Item11=PNG_BUILD_DLL
-Item12=PNG_DLL;PNG_BUILD_DLL;ZLIB_DLL
-Item13=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS;ZLIB_DLL
-Item14=PNG_DLL;PNG_BUILD_DLL;PNG_NO_GLOBAL_ARRAYS
-Item15=PNG_DLL;PNG_BUILD_DLL
-Item16=PNG_DLL;PNG_BUILD_DLL;PNG_MODULEDEF
-Item17=_HTML_FORM
-Item18=_DEBUG;_HTML_FORM
-Item19=_DEBUG
-
-[HistoryLists\hlIntOutputDir]
-Count=2
-Item0=..\Obj
-Item1=P:\Development\Obj
-
-[Debugging]
-DebugSourceDirs=
-
-[Parameters]
-RunParams=
-HostApplication=P:\Development\Executables\LibPNGTestApp.exe
-RemoteHost=
-RemotePath=
-RemoteDebug=0
-
-[Compiler]
-ShowInfoMsgs=0
-LinkDebugVcl=0
-LinkCGLIB=0
- </IDEOPTIONS>
-</PROJECT> \ No newline at end of file
diff --git a/src/3rdparty/libpng/projects/cbuilder5/libpng.cpp b/src/3rdparty/libpng/projects/cbuilder5/libpng.cpp
deleted file mode 100644
index 97865f5..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/libpng.cpp
+++ /dev/null
@@ -1,29 +0,0 @@
-//---------------------------------------------------------------------------
-#include <windows.h>
-//---------------------------------------------------------------------------
-// Important note about DLL memory management when your DLL uses the
-// static version of the RunTime Library:
-//
-// If your DLL exports any functions that pass String objects (or structs/
-// classes containing nested Strings) as parameter or function results,
-// you will need to add the library MEMMGR.LIB to both the DLL project and
-// any other projects that use the DLL. You will also need to use MEMMGR.LIB
-// if any other projects which use the DLL will be performing new or delete
-// operations on any non-TObject-derived classes which are exported from the
-// DLL. Adding MEMMGR.LIB to your project will change the DLL and its calling
-// EXE's to use the BORLNDMM.DLL as their memory manager. In these cases,
-// the file BORLNDMM.DLL should be deployed along with your DLL.
-//
-// To avoid using BORLNDMM.DLL, pass string information using "char *" or
-// ShortString parameters.
-//
-// If your DLL uses the dynamic version of the RTL, you do not need to
-// explicitly add MEMMGR.LIB as this will be done implicitly for you
-//---------------------------------------------------------------------------
-
-int WINAPI DllEntryPoint(HINSTANCE, unsigned long, void*)
-{
- return 1;
-}
-//---------------------------------------------------------------------------
- \ No newline at end of file
diff --git a/src/3rdparty/libpng/projects/cbuilder5/libpng.readme.txt b/src/3rdparty/libpng/projects/cbuilder5/libpng.readme.txt
deleted file mode 100644
index c99c1e9..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/libpng.readme.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-Project files to build libpng using Borland C++ Builder v5.0
-
-In order to build and use libpng, please follow these steps:
-
- 1). Install zlib in a directory at the same level with libpng.
-
- 2). In a console window, go to the zlib directory and type:
- make -f win32\Makefile.bor
- After performing this step, you should have a file named
- zlib.lib in the zlib directory.
-
- 3). Add the following conditional define to your project:
- PNG_USE_DLL
-
- 4). Add libpng.lib or libpngstat.lib to the project.
- Build the project.
-
- 5). If the build fails, add the paths to png.h and zlib.h to
- your include path, and restart the build.
-
-By default, the libpng project uses zlib as a static library. If
-you wish to use zlib as a DLL, please read the important notes from
-the zlib DLL FAQ, found inside the zlib distribution.
-
-See the libpng documentation for instructions on how to use the code.
diff --git a/src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpf b/src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpf
deleted file mode 100644
index f736b62..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpf
+++ /dev/null
@@ -1,22 +0,0 @@
-USEUNIT("..\..\png.c");
-USEUNIT("..\..\pngerror.c");
-USEUNIT("..\..\pngget.c");
-USEUNIT("..\..\pngmem.c");
-USEUNIT("..\..\pngpread.c");
-USEUNIT("..\..\pngread.c");
-USEUNIT("..\..\pngrio.c");
-USEUNIT("..\..\pngrtran.c");
-USEUNIT("..\..\pngrutil.c");
-USEUNIT("..\..\pngset.c");
-USEUNIT("..\..\pngtrans.c");
-USEUNIT("..\..\pngwio.c");
-USEUNIT("..\..\pngwrite.c");
-USEUNIT("..\..\pngwtran.c");
-USEUNIT("..\..\pngwutil.c");
-USELIB("..\..\..\zlib\zlib.lib");
-//---------------------------------------------------------------------------
-#define Library
-
-// To add a file to the library use the Project menu 'Add to Project'.
-
- \ No newline at end of file
diff --git a/src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpr b/src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpr
deleted file mode 100644
index 68abb8d..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/libpngstat.bpr
+++ /dev/null
@@ -1,109 +0,0 @@
-<?xml version='1.0' encoding='utf-8' ?>
-<!-- C++Builder XML Project -->
-<PROJECT>
- <MACROS>
- <VERSION value="BCB.05.03"/>
- <PROJECT value="libpngstat.lib"/>
- <OBJFILES value="..\..\pngerror.obj ..\..\png.obj ..\..\pngwutil.obj ..\..\pngmem.obj
- ..\..\pngpread.obj ..\..\pngread.obj ..\..\pngrio.obj ..\..\pngrtran.obj
- ..\..\pngrutil.obj ..\..\pngset.obj ..\..\pngtrans.obj ..\..\pngwio.obj
- ..\..\pngwrite.obj ..\..\pngwtran.obj ..\..\pngget.obj"/>
- <RESFILES value=""/>
- <DEFFILE value=""/>
- <RESDEPEN value="$(RESFILES)"/>
- <LIBFILES value="..\..\..\zlib\zlib.lib"/>
- <LIBRARIES value=""/>
- <PACKAGES value=""/>
- <PATHCPP value=".;..\.."/>
- <PATHPAS value=".;"/>
- <PATHRC value=".;"/>
- <PATHASM value=".;"/>
- <LINKER value="TLib"/>
- <USERDEFINES value=""/>
- <SYSDEFINES value="_RTLDLL;NO_STRICT"/>
- <MAINSOURCE value="libpngstat.bpf"/>
- <INCLUDEPATH value="..\..;..\..\..\zlib;$(BCB)\include"/>
- <LIBPATH value="..\..;$(BCB)\lib\obj;$(BCB)\lib"/>
- <WARNINGS value="-w-par"/>
- <LISTFILE value=""/>
- </MACROS>
- <OPTIONS>
- <CFLAG1 value="-O2 -w -Vx -Ve -X- -a8 -5 -b- -d -k- -vi -c -tW -tWM"/>
- <PFLAGS value="-$Y- -$L- -$D- -$C- -v -JPHNE -M"/>
- <AFLAGS value="/mx /w2 /zn"/>
- <LFLAGS value=""/>
- </OPTIONS>
- <LINKER>
- <ALLOBJ value="$(OBJFILES)"/>
- <ALLLIB value=""/>
- </LINKER>
- <IDEOPTIONS>
-[Version Info]
-IncludeVerInfo=0
-AutoIncBuild=0
-MajorVer=1
-MinorVer=0
-Release=0
-Build=0
-Debug=0
-PreRelease=0
-Special=0
-Private=0
-DLL=0
-Locale=2057
-CodePage=1252
-
-[Version Info Keys]
-CompanyName=
-FileDescription=
-FileVersion=1.0.0.0
-InternalName=
-LegalCopyright=
-LegalTrademarks=
-OriginalFilename=
-ProductName=
-ProductVersion=1.0.0.0
-Comments=
-
-[HistoryLists\hlIncludePath]
-Count=2
-Item0=..\..;P:\My Documents\Source\PNG+ZLib\zlib;$(BCB)\include
-Item1=..\..;$(BCB)\include;$(BCB)\include\vcl
-
-[HistoryLists\hlLibraryPath]
-Count=1
-Item0=..\..;$(BCB)\lib\obj;$(BCB)\lib
-
-[HistoryLists\hlDebugSourcePath]
-Count=1
-Item0=$(BCB)\source\vcl
-
-[HistoryLists\hlConditionals]
-Count=1
-Item0=_DEBUG
-
-[HistoryLists\hlTlibPageSize]
-Count=1
-Item0=0x0010
-
-[Debugging]
-DebugSourceDirs=$(BCB)\source\vcl
-
-[Parameters]
-RunParams=
-HostApplication=
-RemoteHost=
-RemotePath=
-RemoteDebug=0
-
-[Compiler]
-ShowInfoMsgs=0
-LinkDebugVcl=0
-LinkCGLIB=0
-
-[Language]
-ActiveLang=
-ProjectLang=
-RootDir=
- </IDEOPTIONS>
-</PROJECT> \ No newline at end of file
diff --git a/src/3rdparty/libpng/projects/cbuilder5/zlib.readme.txt b/src/3rdparty/libpng/projects/cbuilder5/zlib.readme.txt
deleted file mode 100644
index cb6a7a8..0000000
--- a/src/3rdparty/libpng/projects/cbuilder5/zlib.readme.txt
+++ /dev/null
@@ -1,14 +0,0 @@
-The project that builds libpng under Borland C++ Builder does not
-explicitly build zlib. By taking this decision, there is no need
-to update the libpng project each time when there is a change in
-the list of zlib source files. After all, this list is private to
-zlib, and applications (such as libpng) should not assume anything
-about it.
-
-If you wish to contribute a project that builds zlib under Borland
-C++ Builder, please submit it to the zlib developers, not to the
-libpng developers.
-
-By default, the libpng project uses zlib as a static library. If
-you wish to use zlib as a DLL, please read the important notes from
-the zlib DLL FAQ, found inside the zlib distribution.
diff --git a/src/3rdparty/libpng/projects/visualc6/README.txt b/src/3rdparty/libpng/projects/visualc6/README.txt
deleted file mode 100644
index b650e9e..0000000
--- a/src/3rdparty/libpng/projects/visualc6/README.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-Microsoft Developer Studio Project File, Format Version 6.00 for libpng.
-
-Copyright (C) 2000-2004 Simon-Pierre Cadieux.
-Copyright (C) 2004 Cosmin Truta.
-
-This code is released under the libpng license.
-For conditions of distribution and use, see copyright notice in png.h
-
-
-Assumptions:
-* The libpng source files are in ..\..
-* The zlib source files are in ..\..\..\zlib
-* The zlib project files are in ..\..\..\zlib\projects\visualc6
-
-
-To use:
-
-1) On the main menu, select "File | Open Workspace".
- Open "libpng.dsw".
-
-2) Select "Build | Set Active Configuration".
- Choose the configuration you wish to build.
- (Choose libpng or pngtest; zlib will be built automatically.)
-
-3) Select "Build | Clean".
-
-4) Select "Build | Build ... (F7)". Ignore warning messages about
- not being able to find certain include files (e.g. alloc.h).
-
-5) If you built the sample program (pngtest),
- select "Build | Execute ... (Ctrl+F5)".
-
-
-This project builds the libpng binaries as follows:
-
-* Win32_DLL_Release\libpng14.dll DLL build
-* Win32_DLL_Debug\libpng14d.dll DLL build (debug version)
-* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall
-* Win32_LIB_Release\libpng.lib static build
-* Win32_LIB_Debug\libpngd.lib static build (debug version)
-
-
-Notes:
-
-If you change anything in the source files, or select different compiler
-settings, please change the DLL name to something different than any of
-the above names. Also, make sure that in your "pngusr.h" you define
-PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX according to the
-instructions provided in "pngconf.h".
-
-All DLLs built by this project use the Microsoft dynamic C runtime library
-MSVCRT.DLL (MSVCRTD.DLL for debug versions). If you distribute any of the
-above mentioned libraries you should also include this DLL in your package.
-For a list of files that are redistributable in Visual C++ 6.0, see
-Common\Redist\Redist.txt on Disc 1 of the Visual C++ 6.0 product CDs.
diff --git a/src/3rdparty/libpng/projects/visualc6/libpng.dsp b/src/3rdparty/libpng/projects/visualc6/libpng.dsp
deleted file mode 100644
index 6704255..0000000
--- a/src/3rdparty/libpng/projects/visualc6/libpng.dsp
+++ /dev/null
@@ -1,328 +0,0 @@
-# Microsoft Developer Studio Project File - Name="libpng" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=libpng - Win32 DLL Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "libpng.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "libpng.mak" CFG="libpng - Win32 DLL Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "libpng - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 DLL VB" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "libpng - Win32 LIB Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "libpng - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "libpng - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_Release\libpng14.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "libpng___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG" /d PNG_DEBUG=1
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 zlib1d.lib /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\libpng14d.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Debug"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_DLL_VB"
-# PROP BASE Intermediate_Dir "libpng___Win32_DLL_VB"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_VB"
-# PROP Intermediate_Dir "Win32_DLL_VB"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_BUILD_DLL" /D "ZLIB_DLL" /D PNGAPI=__stdcall /D "PNG_NO_MODULEDEF" /D "PNG_LIBPNG_SPECIALBUILD" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG" /dPNG_LIBPNG_DLLFNAME_POSTFIX=""""VB"""" /dPNG_LIBPNG_SPECIALBUILD=""""__stdcall calling convention used for exported functions""""
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /dll /machine:I386
-# ADD LINK32 zlib1.lib /nologo /dll /machine:I386 /out:"Win32_DLL_VB\libpng14vb.dll" /libpath:"..\..\..\zlib\projects\visualc6\Win32_DLL_Release"
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_VB
-TargetName=libpng14vb
-SOURCE="$(InputPath)"
-PostBuild_Cmds=echo Deleting $(targetname) import library and export file (Not required for VB projects) del $(outdir)\$(targetname).lib del $(outdir)\$(targetname).exp
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "libpng___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "libpng___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
-# ADD RSC /l 0x409 /i "..\.." /d "PNG_NO_PEDANTIC_WARNINGS" /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "libpng___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "libpng___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\.." /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D PNG_DEBUG=1 /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
-# ADD RSC /l 0x409 /d "PNG_NO_PEDANTIC_WARNINGS" /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_Debug\libpngd.lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "libpng - Win32 DLL Release"
-# Name "libpng - Win32 DLL Debug"
-# Name "libpng - Win32 DLL VB"
-# Name "libpng - Win32 LIB Release"
-# Name "libpng - Win32 LIB Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\png.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngerror.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngget.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngmem.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngpread.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngread.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrtran.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngrutil.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngset.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngtrans.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\scripts\pngwin.def
-
-!IF "$(CFG)" == "libpng - Win32 DLL Release"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwrite.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwtran.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngwutil.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\png.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\pngpriv.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=..\..\scripts\pngwin.rc
-
-!IF "$(CFG)" == "libpng - Win32 DLL Release"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL Debug"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 DLL VB"
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "libpng - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\README.txt
-# End Source File
-# End Target
-# End Project
diff --git a/src/3rdparty/libpng/projects/visualc6/libpng.dsw b/src/3rdparty/libpng/projects/visualc6/libpng.dsw
deleted file mode 100644
index 2a98646..0000000
--- a/src/3rdparty/libpng/projects/visualc6/libpng.dsw
+++ /dev/null
@@ -1,59 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "libpng"=".\libpng.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name zlib
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "pngtest"=".\pngtest.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name libpng
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "zlib"="..\..\..\zlib\projects\visualc6\zlib.dsp" - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/src/3rdparty/libpng/projects/visualc6/pngtest.dsp b/src/3rdparty/libpng/projects/visualc6/pngtest.dsp
deleted file mode 100644
index d3cb068..0000000
--- a/src/3rdparty/libpng/projects/visualc6/pngtest.dsp
+++ /dev/null
@@ -1,178 +0,0 @@
-# Microsoft Developer Studio Project File - Name="pngtest" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=pngtest - Win32 DLL Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "pngtest.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "pngtest.mak" CFG="pngtest - Win32 DLL Release"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "pngtest - Win32 DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "pngtest - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "pngtest - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pngtest___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_DLL_Release\libpng14.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Release\zlib1.lib /nologo /subsystem:console /machine:I386
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_Release
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Release; $(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "pngtest - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pngtest___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "pngtest___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /D "PNG_DLL" /D "PNG_NO_STDIO" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_DLL_Debug\libpng14d.lib ..\..\..\zlib\projects\visualc6\Win32_DLL_Debug\zlib1d.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Win32_DLL_Debug
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=set path=$(outdir);..\..\..\zlib\projects\visualc6\Win32_DLL_Debug; $(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "pngtest - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "pngtest___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /I "..\..\..\zlib" /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /machine:I386
-# ADD LINK32 Win32_LIB_Release\libpng.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Release\zlib.lib /nologo /subsystem:console /machine:I386
-# Begin Special Build Tool
-OutDir=.\Win32_LIB_Release
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ELSEIF "$(CFG)" == "pngtest - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "pngtest___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "pngtest___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /I "..\..\..\zlib" /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 Win32_LIB_Debug\libpngd.lib ..\..\..\zlib\projects\visualc6\Win32_LIB_Debug\zlibd.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# Begin Special Build Tool
-OutDir=.\Win32_LIB_Debug
-SOURCE="$(InputPath)"
-PostBuild_Desc=[Run Test]
-PostBuild_Cmds=$(outdir)\pngtest.exe ..\..\pngtest.png
-# End Special Build Tool
-
-!ENDIF
-
-# Begin Target
-
-# Name "pngtest - Win32 DLL Release"
-# Name "pngtest - Win32 DLL Debug"
-# Name "pngtest - Win32 LIB Release"
-# Name "pngtest - Win32 LIB Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\pngtest.c
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/libpng/projects/visualc71/PRJ0041.mak b/src/3rdparty/libpng/projects/visualc71/PRJ0041.mak
deleted file mode 100644
index e15e12b..0000000
--- a/src/3rdparty/libpng/projects/visualc71/PRJ0041.mak
+++ /dev/null
@@ -1,21 +0,0 @@
-# Prevent "Cannot find missing dependency..." warnings while compiling
-# pngwin.rc (PRJ0041).
-
-all: $(IntDir)\alloc.h \
- $(IntDir)\fp.h \
- $(IntDir)\m68881.h \
- $(IntDir)\mem.h \
- $(IntDir)\pngusr.h \
- $(IntDir)\strings.h \
- $(IntDir)\unistd.h \
- $(IntDir)\unixio.h
-
-$(IntDir)\alloc.h \
-$(IntDir)\fp.h \
-$(IntDir)\m68881.h \
-$(IntDir)\mem.h \
-$(IntDir)\pngusr.h \
-$(IntDir)\strings.h \
-$(IntDir)\unistd.h \
-$(IntDir)\unixio.h:
- @!echo.>$@
diff --git a/src/3rdparty/libpng/projects/visualc71/README.txt b/src/3rdparty/libpng/projects/visualc71/README.txt
deleted file mode 100644
index 7d51eed..0000000
--- a/src/3rdparty/libpng/projects/visualc71/README.txt
+++ /dev/null
@@ -1,55 +0,0 @@
-Microsoft Developer Studio Project File, Format Version 7.10 for libpng.
-
-Copyright (C) 2004 Simon-Pierre Cadieux.
-
-This code is released under the libpng license.
-For conditions of distribution and use, see copyright notice in png.h
-
-Assumptions:
-* The libpng source files are in ..\..
-* The zlib source files are in ..\..\..\zlib
-* The zlib project file is in . /* Warning: This is until the zlib project
- files get intergrated into the next zlib release. The final zlib project
- directory will then be ..\..\..\zlib\projects\visualc71. */
-
-To use:
-
-1) On the main menu, select "File | Open Solution".
- Open "libpng.sln".
-
-2) Display the Solution Explorer view (Ctrl+Alt+L)
-
-3) Set one of the project as the StartUp project. If you just want to build the
- binaries set "libpng" as the startup project (Select "libpng" tree view
- item + Project | Set as StartUp project). If you want to build and test the
- binaries set it to "pngtest" (Select "pngtest" tree view item +
- Project | Set as StartUp project)
-
-4) Select "Build | Configuration Manager...".
- Choose the configuration you wish to build.
-
-5) Select "Build | Clean Solution".
-
-6) Select "Build | Build Solution (Ctrl-Shift-B)"
-
-This project builds the libpng binaries as follows:
-
-* Win32_DLL_Release\libpng14.dll DLL build
-* Win32_DLL_Debug\libpng14d.dll DLL build (debug version)
-* Win32_DLL_VB\libpng14vb.dll DLL build for Visual Basic, using stdcall
-* Win32_LIB_Release\libpng.lib static build
-* Win32_LIB_Debug\libpngd.lib static build (debug version)
-
-Notes:
-
-If you change anything in the source files, or select different compiler
-settings, please change the DLL name to something different than any of
-the above names. Also, make sure that in your "pngusr.h" you define
-PNG_USER_PRIVATEBUILD and PNG_USER_DLLFNAME_POSTFIX according to the
-instructions provided in "pngconf.h".
-
-All DLLs built by this project use the Microsoft dynamic C runtime library
-MSVCR71.DLL (MSVCR71D.DLL for debug versions). If you distribute any of the
-above mentioned libraries you may have to include this DLL in your package.
-For a list of files that are redistributable in Visual Studio see
-$(VCINSTALLDIR)\redist.txt.
diff --git a/src/3rdparty/libpng/projects/visualc71/README_zlib.txt b/src/3rdparty/libpng/projects/visualc71/README_zlib.txt
deleted file mode 100644
index cc73899..0000000
--- a/src/3rdparty/libpng/projects/visualc71/README_zlib.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-/* WARNING: This file was put in the LibPNG distribution for convenience only.
- It is expected to be part of the next zlib release under
- "projects\visualc71\README.txt." */
-
-Microsoft Developer Studio Project File, Format Version 7.10 for zlib.
-
-Copyright (C) 2004 Simon-Pierre Cadieux.
-Copyright (C) 2004 Cosmin Truta.
-
-This code is released under the libpng license.
-For conditions of distribution and use, see copyright notice in zlib.h.
-
-
-To use:
-
-1) On the main menu, select "File | Open Solution".
- Open "zlib.sln".
-
-2) Display the Solution Explorer view (Ctrl+Alt+L)
-
-3) Set one of the project as the StartUp project. If you just want to build the
- binaries set "zlib" as the startup project (Select "zlib" tree view item +
- Project | Set as StartUp project). If you want to build and test the
- binaries set it to "example" (Select "example" tree view item + Project |
- Set as StartUp project), If you want to build the minigzip utility set it to
- "minigzip" (Select "minigzip" tree view item + Project | Set as StartUp
- project
-
-4) Select "Build | Configuration Manager...".
- Choose the configuration you wish to build.
-
-5) Select "Build | Clean Solution".
-
-6) Select "Build | Build Solution (Ctrl-Shift-B)"
-
-This project builds the zlib binaries as follows:
-
-* Win32_DLL_Release\zlib1.dll DLL build
-* Win32_DLL_Debug\zlib1d.dll DLL build (debug version)
-* Win32_LIB_Release\zlib.lib static build
-* Win32_LIB_Debug\zlibd.lib static build (debug version)
-
diff --git a/src/3rdparty/libpng/projects/xcode/Info.plist b/src/3rdparty/libpng/projects/xcode/Info.plist
deleted file mode 100644
index 0b525df..0000000
--- a/src/3rdparty/libpng/projects/xcode/Info.plist
+++ /dev/null
@@ -1,26 +0,0 @@
-<?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>CFBundleDevelopmentRegion</key>
- <string>English</string>
- <key>CFBundleExecutable</key>
- <string>libpng</string>
- <key>CFBundleIconFile</key>
- <string></string>
- <key>CFBundleIdentifier</key>
- <string>com.apple.carbonframeworktemplate</string>
- <key>CFBundleInfoDictionaryVersion</key>
- <string>6.0</string>
- <key>CFBundlePackageType</key>
- <string>FMWK</string>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CSResourcesFileMapped</key>
- <true/>
-</dict>
-</plist>
diff --git a/src/3rdparty/libpng/projects/xcode/README.txt b/src/3rdparty/libpng/projects/xcode/README.txt
deleted file mode 100644
index 440149d..0000000
--- a/src/3rdparty/libpng/projects/xcode/README.txt
+++ /dev/null
@@ -1,9 +0,0 @@
-The xcode project has not been entirely updated to libpng-1.4.0.
-
-It needs to *not* depend on pnggccrd.c or pngvcrd.c
-
-It needs to PNG_NO_PEDANTIC_WARNINGS in the CFLAGS while building
-the library, but not while building an application.
-
-If an updated version is not received, this project will
-be removed when libpng-1.4.0 is released.
diff --git a/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/.gitignore b/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/.gitignore
deleted file mode 100644
index 0a2b14b..0000000
--- a/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.mode1*
-*.pbxuser
diff --git a/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj b/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj
deleted file mode 100644
index 1171a39..0000000
--- a/src/3rdparty/libpng/projects/xcode/libpng.xcodeproj/project.pbxproj
+++ /dev/null
@@ -1,353 +0,0 @@
-// !$*UTF8*$!
-{
- archiveVersion = 1;
- classes = {
- };
- objectVersion = 44;
- objects = {
-
-/* Begin PBXBuildFile section */
- 14461C7109C3C37F005840C0 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C5D09C3C37F005840C0 /* png.c */; };
- 14461C7209C3C37F005840C0 /* png.h in Headers */ = {isa = PBXBuildFile; fileRef = 14461C5E09C3C37F005840C0 /* png.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 14461C7309C3C37F005840C0 /* pngconf.h in Headers */ = {isa = PBXBuildFile; fileRef = 14461C5F09C3C37F005840C0 /* pngconf.h */; settings = {ATTRIBUTES = (Public, ); }; };
- 14461C7409C3C37F005840C0 /* pngerror.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6009C3C37F005840C0 /* pngerror.c */; };
- 14461C7509C3C37F005840C0 /* pnggccrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6109C3C37F005840C0 /* pnggccrd.c */; };
- 14461C7609C3C37F005840C0 /* pngget.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6209C3C37F005840C0 /* pngget.c */; };
- 14461C7709C3C37F005840C0 /* pngmem.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6309C3C37F005840C0 /* pngmem.c */; };
- 14461C7809C3C37F005840C0 /* pngpread.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6409C3C37F005840C0 /* pngpread.c */; };
- 14461C7909C3C37F005840C0 /* pngread.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6509C3C37F005840C0 /* pngread.c */; };
- 14461C7A09C3C37F005840C0 /* pngrio.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6609C3C37F005840C0 /* pngrio.c */; };
- 14461C7B09C3C37F005840C0 /* pngrtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6709C3C37F005840C0 /* pngrtran.c */; };
- 14461C7C09C3C37F005840C0 /* pngrutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6809C3C37F005840C0 /* pngrutil.c */; };
- 14461C7D09C3C37F005840C0 /* pngset.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6909C3C37F005840C0 /* pngset.c */; };
- 14461C7F09C3C37F005840C0 /* pngtrans.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6B09C3C37F005840C0 /* pngtrans.c */; };
- 14461C8009C3C37F005840C0 /* pngvcrd.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6C09C3C37F005840C0 /* pngvcrd.c */; };
- 14461C8109C3C37F005840C0 /* pngwio.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6D09C3C37F005840C0 /* pngwio.c */; };
- 14461C8209C3C37F005840C0 /* pngwrite.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6E09C3C37F005840C0 /* pngwrite.c */; };
- 14461C8309C3C37F005840C0 /* pngwtran.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C6F09C3C37F005840C0 /* pngwtran.c */; };
- 14461C8409C3C37F005840C0 /* pngwutil.c in Sources */ = {isa = PBXBuildFile; fileRef = 14461C7009C3C37F005840C0 /* pngwutil.c */; };
- 67FA470510693F6B0078FB9E /* pngpriv.h in Headers */ = {isa = PBXBuildFile; fileRef = 67FA470410693F6B0078FB9E /* pngpriv.h */; };
-/* End PBXBuildFile section */
-
-/* Begin PBXFileReference section */
- 14461C5D09C3C37F005840C0 /* png.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = png.c; path = ../../png.c; sourceTree = SOURCE_ROOT; };
- 14461C5E09C3C37F005840C0 /* png.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = png.h; path = ../../png.h; sourceTree = SOURCE_ROOT; };
- 14461C5F09C3C37F005840C0 /* pngconf.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = pngconf.h; path = ../../pngconf.h; sourceTree = SOURCE_ROOT; };
- 14461C6009C3C37F005840C0 /* pngerror.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngerror.c; path = ../../pngerror.c; sourceTree = SOURCE_ROOT; };
- 14461C6109C3C37F005840C0 /* pnggccrd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pnggccrd.c; path = ../../pnggccrd.c; sourceTree = SOURCE_ROOT; };
- 14461C6209C3C37F005840C0 /* pngget.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngget.c; path = ../../pngget.c; sourceTree = SOURCE_ROOT; };
- 14461C6309C3C37F005840C0 /* pngmem.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngmem.c; path = ../../pngmem.c; sourceTree = SOURCE_ROOT; };
- 14461C6409C3C37F005840C0 /* pngpread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngpread.c; path = ../../pngpread.c; sourceTree = SOURCE_ROOT; };
- 14461C6509C3C37F005840C0 /* pngread.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngread.c; path = ../../pngread.c; sourceTree = SOURCE_ROOT; };
- 14461C6609C3C37F005840C0 /* pngrio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrio.c; path = ../../pngrio.c; sourceTree = SOURCE_ROOT; };
- 14461C6709C3C37F005840C0 /* pngrtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrtran.c; path = ../../pngrtran.c; sourceTree = SOURCE_ROOT; };
- 14461C6809C3C37F005840C0 /* pngrutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngrutil.c; path = ../../pngrutil.c; sourceTree = SOURCE_ROOT; };
- 14461C6909C3C37F005840C0 /* pngset.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngset.c; path = ../../pngset.c; sourceTree = SOURCE_ROOT; };
- 14461C6B09C3C37F005840C0 /* pngtrans.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngtrans.c; path = ../../pngtrans.c; sourceTree = SOURCE_ROOT; };
- 14461C6C09C3C37F005840C0 /* pngvcrd.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngvcrd.c; path = ../../pngvcrd.c; sourceTree = SOURCE_ROOT; };
- 14461C6D09C3C37F005840C0 /* pngwio.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwio.c; path = ../../pngwio.c; sourceTree = SOURCE_ROOT; };
- 14461C6E09C3C37F005840C0 /* pngwrite.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwrite.c; path = ../../pngwrite.c; sourceTree = SOURCE_ROOT; };
- 14461C6F09C3C37F005840C0 /* pngwtran.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwtran.c; path = ../../pngwtran.c; sourceTree = SOURCE_ROOT; };
- 14461C7009C3C37F005840C0 /* pngwutil.c */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.c; name = pngwutil.c; path = ../../pngwutil.c; sourceTree = SOURCE_ROOT; };
- 67FA470410693F6B0078FB9E /* pngpriv.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = pngpriv.h; path = ../../pngpriv.h; sourceTree = SOURCE_ROOT; };
- 8D07F2C70486CC7A007CD1D0 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
- 8D07F2C80486CC7A007CD1D0 /* libpng.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = libpng.framework; sourceTree = BUILT_PRODUCTS_DIR; };
-/* End PBXFileReference section */
-
-/* Begin PBXFrameworksBuildPhase section */
- 8D07F2C30486CC7A007CD1D0 /* Frameworks */ = {
- isa = PBXFrameworksBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXFrameworksBuildPhase section */
-
-/* Begin PBXGroup section */
- 034768DDFF38A45A11DB9C8B /* Products */ = {
- isa = PBXGroup;
- children = (
- 8D07F2C80486CC7A007CD1D0 /* libpng.framework */,
- );
- name = Products;
- sourceTree = "<group>";
- };
- 0867D691FE84028FC02AAC07 /* libpng */ = {
- isa = PBXGroup;
- children = (
- 08FB77ACFE841707C02AAC07 /* Source */,
- 089C1665FE841158C02AAC07 /* Resources */,
- 034768DDFF38A45A11DB9C8B /* Products */,
- );
- name = libpng;
- sourceTree = "<group>";
- };
- 089C1665FE841158C02AAC07 /* Resources */ = {
- isa = PBXGroup;
- children = (
- 8D07F2C70486CC7A007CD1D0 /* Info.plist */,
- );
- name = Resources;
- sourceTree = "<group>";
- };
- 08FB77ACFE841707C02AAC07 /* Source */ = {
- isa = PBXGroup;
- children = (
- 67FA470410693F6B0078FB9E /* pngpriv.h */,
- 14461C5D09C3C37F005840C0 /* png.c */,
- 14461C5E09C3C37F005840C0 /* png.h */,
- 14461C5F09C3C37F005840C0 /* pngconf.h */,
- 14461C6009C3C37F005840C0 /* pngerror.c */,
- 14461C6109C3C37F005840C0 /* pnggccrd.c */,
- 14461C6209C3C37F005840C0 /* pngget.c */,
- 14461C6309C3C37F005840C0 /* pngmem.c */,
- 14461C6409C3C37F005840C0 /* pngpread.c */,
- 14461C6509C3C37F005840C0 /* pngread.c */,
- 14461C6609C3C37F005840C0 /* pngrio.c */,
- 14461C6709C3C37F005840C0 /* pngrtran.c */,
- 14461C6809C3C37F005840C0 /* pngrutil.c */,
- 14461C6909C3C37F005840C0 /* pngset.c */,
- 14461C6B09C3C37F005840C0 /* pngtrans.c */,
- 14461C6C09C3C37F005840C0 /* pngvcrd.c */,
- 14461C6D09C3C37F005840C0 /* pngwio.c */,
- 14461C6E09C3C37F005840C0 /* pngwrite.c */,
- 14461C6F09C3C37F005840C0 /* pngwtran.c */,
- 14461C7009C3C37F005840C0 /* pngwutil.c */,
- );
- name = Source;
- sourceTree = "<group>";
- };
-/* End PBXGroup section */
-
-/* Begin PBXHeadersBuildPhase section */
- 8D07F2BD0486CC7A007CD1D0 /* Headers */ = {
- isa = PBXHeadersBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 14461C7209C3C37F005840C0 /* png.h in Headers */,
- 14461C7309C3C37F005840C0 /* pngconf.h in Headers */,
- 67FA470510693F6B0078FB9E /* pngpriv.h in Headers */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXHeadersBuildPhase section */
-
-/* Begin PBXNativeTarget section */
- 8D07F2BC0486CC7A007CD1D0 /* libpng */ = {
- isa = PBXNativeTarget;
- buildConfigurationList = 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "libpng" */;
- buildPhases = (
- 8D07F2BD0486CC7A007CD1D0 /* Headers */,
- 8D07F2BF0486CC7A007CD1D0 /* Resources */,
- 8D07F2C10486CC7A007CD1D0 /* Sources */,
- 8D07F2C30486CC7A007CD1D0 /* Frameworks */,
- 8D07F2C50486CC7A007CD1D0 /* Rez */,
- );
- buildRules = (
- );
- dependencies = (
- );
- name = libpng;
- productInstallPath = "$(HOME)/Library/Frameworks";
- productName = libpng;
- productReference = 8D07F2C80486CC7A007CD1D0 /* libpng.framework */;
- productType = "com.apple.product-type.framework";
- };
-/* End PBXNativeTarget section */
-
-/* Begin PBXProject section */
- 0867D690FE84028FC02AAC07 /* Project object */ = {
- isa = PBXProject;
- buildConfigurationList = 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "libpng" */;
- compatibilityVersion = "Xcode 2.4";
- hasScannedForEncodings = 1;
- mainGroup = 0867D691FE84028FC02AAC07 /* libpng */;
- productRefGroup = 034768DDFF38A45A11DB9C8B /* Products */;
- projectDirPath = "";
- projectRoot = ../..;
- targets = (
- 8D07F2BC0486CC7A007CD1D0 /* libpng */,
- );
- };
-/* End PBXProject section */
-
-/* Begin PBXResourcesBuildPhase section */
- 8D07F2BF0486CC7A007CD1D0 /* Resources */ = {
- isa = PBXResourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXResourcesBuildPhase section */
-
-/* Begin PBXRezBuildPhase section */
- 8D07F2C50486CC7A007CD1D0 /* Rez */ = {
- isa = PBXRezBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXRezBuildPhase section */
-
-/* Begin PBXSourcesBuildPhase section */
- 8D07F2C10486CC7A007CD1D0 /* Sources */ = {
- isa = PBXSourcesBuildPhase;
- buildActionMask = 2147483647;
- files = (
- 14461C7109C3C37F005840C0 /* png.c in Sources */,
- 14461C7409C3C37F005840C0 /* pngerror.c in Sources */,
- 14461C7509C3C37F005840C0 /* pnggccrd.c in Sources */,
- 14461C7609C3C37F005840C0 /* pngget.c in Sources */,
- 14461C7709C3C37F005840C0 /* pngmem.c in Sources */,
- 14461C7809C3C37F005840C0 /* pngpread.c in Sources */,
- 14461C7909C3C37F005840C0 /* pngread.c in Sources */,
- 14461C7A09C3C37F005840C0 /* pngrio.c in Sources */,
- 14461C7B09C3C37F005840C0 /* pngrtran.c in Sources */,
- 14461C7C09C3C37F005840C0 /* pngrutil.c in Sources */,
- 14461C7D09C3C37F005840C0 /* pngset.c in Sources */,
- 14461C7F09C3C37F005840C0 /* pngtrans.c in Sources */,
- 14461C8009C3C37F005840C0 /* pngvcrd.c in Sources */,
- 14461C8109C3C37F005840C0 /* pngwio.c in Sources */,
- 14461C8209C3C37F005840C0 /* pngwrite.c in Sources */,
- 14461C8309C3C37F005840C0 /* pngwtran.c in Sources */,
- 14461C8409C3C37F005840C0 /* pngwutil.c in Sources */,
- );
- runOnlyForDeploymentPostprocessing = 0;
- };
-/* End PBXSourcesBuildPhase section */
-
-/* Begin XCBuildConfiguration section */
- 4FADC24308B4156D00ABE55E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- COPY_PHASE_STRIP = NO;
- DYLIB_COMPATIBILITY_VERSION = 14;
- DYLIB_CURRENT_VERSION = 14;
- FRAMEWORK_VERSION = 1.4.0;
- GCC_PRECOMPILE_PREFIX_HEADER = NO;
- GCC_PREFIX_HEADER = "";
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "@executable_path/../Frameworks";
- LIBRARY_STYLE = DYNAMIC;
- MACH_O_TYPE = mh_dylib;
- OTHER_LDFLAGS = "-lz";
- PRODUCT_NAME = libpng;
- WRAPPER_EXTENSION = framework;
- };
- name = Debug;
- };
- 4FADC24408B4156D00ABE55E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- DYLIB_COMPATIBILITY_VERSION = 14;
- DYLIB_CURRENT_VERSION = 14;
- FRAMEWORK_VERSION = 1.4.0;
- GCC_PRECOMPILE_PREFIX_HEADER = NO;
- GCC_PREFIX_HEADER = "";
- INFOPLIST_FILE = Info.plist;
- INSTALL_PATH = "@executable_path/../Frameworks";
- LIBRARY_STYLE = DYNAMIC;
- MACH_O_TYPE = mh_dylib;
- OTHER_LDFLAGS = "-lz";
- PRODUCT_NAME = libpng;
- WRAPPER_EXTENSION = framework;
- };
- name = Release;
- };
- 4FADC24708B4156D00ABE55E /* Debug */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = (
- i386,
- ppc,
- ppc64,
- x86_64,
- );
- DEPLOYMENT_POSTPROCESSING = YES;
- GCC_ENABLE_CPP_EXCEPTIONS = NO;
- GCC_ENABLE_CPP_RTTI = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = YES;
- GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
- GCC_OPTIMIZATION_LEVEL = 0;
- GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
- GCC_VERSION_i386 = 4.0;
- GCC_VERSION_ppc = 3.3;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- "MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4;
- "MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.2;
- MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
- MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
- PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
- "SDKROOT[arch=i386]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
- "SDKROOT[arch=ppc]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk";
- SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
- SDKROOT_ppc = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk";
- ZERO_LINK = NO;
- };
- name = Debug;
- };
- 4FADC24808B4156D00ABE55E /* Release */ = {
- isa = XCBuildConfiguration;
- buildSettings = {
- ARCHS = (
- i386,
- ppc,
- ppc64,
- x86_64,
- );
- GCC_ENABLE_CPP_EXCEPTIONS = NO;
- GCC_ENABLE_CPP_RTTI = NO;
- GCC_ENABLE_FIX_AND_CONTINUE = NO;
- GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
- GCC_OPTIMIZATION_LEVEL = 2;
- GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS = YES;
- GCC_VERSION_i386 = 4.0;
- GCC_VERSION_ppc = 3.3;
- GCC_WARN_ABOUT_RETURN_TYPE = YES;
- GCC_WARN_UNUSED_VARIABLE = YES;
- MACOSX_DEPLOYMENT_TARGET = 10.5;
- "MACOSX_DEPLOYMENT_TARGET[arch=i386]" = 10.4;
- "MACOSX_DEPLOYMENT_TARGET[arch=ppc]" = 10.2;
- MACOSX_DEPLOYMENT_TARGET_i386 = 10.4;
- MACOSX_DEPLOYMENT_TARGET_ppc = 10.2;
- PREBINDING = NO;
- SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk";
- "SDKROOT[arch=i386]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
- "SDKROOT[arch=ppc]" = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk";
- SDKROOT_i386 = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
- SDKROOT_ppc = "$(DEVELOPER_SDK_DIR)/MacOSX10.3.9.sdk";
- ZERO_LINK = NO;
- };
- name = Release;
- };
-/* End XCBuildConfiguration section */
-
-/* Begin XCConfigurationList section */
- 4FADC24208B4156D00ABE55E /* Build configuration list for PBXNativeTarget "libpng" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FADC24308B4156D00ABE55E /* Debug */,
- 4FADC24408B4156D00ABE55E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
- 4FADC24608B4156D00ABE55E /* Build configuration list for PBXProject "libpng" */ = {
- isa = XCConfigurationList;
- buildConfigurations = (
- 4FADC24708B4156D00ABE55E /* Debug */,
- 4FADC24808B4156D00ABE55E /* Release */,
- );
- defaultConfigurationIsVisible = 0;
- defaultConfigurationName = Release;
- };
-/* End XCConfigurationList section */
- };
- rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
-}
diff --git a/src/3rdparty/libpng/scripts/README.txt b/src/3rdparty/libpng/scripts/README.txt
deleted file mode 100644
index fa7ffed..0000000
--- a/src/3rdparty/libpng/scripts/README.txt
+++ /dev/null
@@ -1,67 +0,0 @@
-
-Makefiles for libpng version 1.4.0 - January 3, 2010
-
- makefile.linux => Linux/ELF makefile
- (gcc, creates libpng14.so.14.1.4.0)
- makefile.gcc => Generic makefile (gcc, creates static libpng.a)
- makefile.knr => Archaic UNIX Makefile that converts files with
- ansi2knr (Requires ansi2knr.c from
- ftp://ftp.cs.wisc.edu/ghost)
- makefile.acorn => Acorn makefile
- makefile.aix => AIX/gcc makefile
- makefile.amiga => Amiga makefile
- makefile.atari => Atari makefile
- makefile.bc32 => 32-bit Borland C++ (all modules compiled in C mode)
- makefile.beos => beos makefile
- makefile.bor => Borland makefile (uses bcc)
- makefile.cegcc => minge32ce for Windows CE makefile
- makefile.cygwin => Cygwin/gcc makefile
- makefile.darwin => Darwin makefile, can use on MacosX
- makefile.dec => DEC Alpha UNIX makefile
- makefile.dj2 => DJGPP 2 makefile
- makefile.elf => Linux/ELF makefile symbol versioning,
- gcc, creates libpng14.so.14.1.4.0)
- makefile.freebsd => FreeBSD makefile
- makefile.gcc => Generic gcc makefile
- makefile.hpgcc => HPUX makefile using gcc
- makefile.hpux => HPUX (10.20 and 11.00) makefile
- makefile.hp64 => HPUX (10.20 and 11.00) makefile, 64-bit
- makefile.ibmc => IBM C/C++ version 3.x for Win32 and OS/2 (static)
- makefile.intel => Intel C/C++ version 4.0 and later
- makefile.mingw => Mingw makefile
- makefile.mips => MIPS makefile
- makefile.msc => Microsoft C makefile
- makefile.netbsd => NetBSD/cc makefile, makes libpng.so.
- makefile.openbsd => OpenBSD makefile
- makefile.os2 => OS/2 Makefile (gcc and emx, requires pngos2.def)
- makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
- makefile.sggcc => Silicon Graphics (gcc,
- creates libpng14.so.14.1.4.0)
- makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
- makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng14.so.14.1.4.0)
- makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng14.so.14.1.4.0)
- makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
- makefile.sunos => Sun makefile
- makefile.32sunu => Sun Ultra 32-bit makefile
- makefile.64sunu => Sun Ultra 64-bit makefile
- makefile.tc3 => Turbo C 3.0 makefile
- makefile.vcwin32 => makefile for Microsoft Visual C++ 4.0 and later
- makefile.watcom => Watcom 10a+ Makefile, 32-bit flat memory model
- makevms.com => VMS build script
- smakefile.ppc => AMIGA smakefile for SAS C V6.58/7.00 PPC compiler
- (Requires SCOPTIONS, copied from scripts/SCOPTIONS.ppc)
-
-Other supporting scripts:
- descrip.mms => VMS makefile for MMS or MMK
- libpng-config-body.in => used by several makefiles to create libpng-config
- libpng-config-head.in => used by several makefiles to create libpng-config
- libpng.pc.in => Used by several makefiles to create libpng.pc
- pngos2.def => OS/2 module definition file used by makefile.os2
- pngwin.def => Module definitions for makefile.cygwin and mingw
- png32ce.def => Module definition file used by makefile.cegcc
- pngwin.rc => Used by the visualc6 and visualc71 projects.
- SCOPTIONS.ppc => Used with smakefile.ppc
-
-Further information can be found in comments in the individual makefiles.
diff --git a/src/3rdparty/libpng/scripts/SCOPTIONS.ppc b/src/3rdparty/libpng/scripts/SCOPTIONS.ppc
deleted file mode 100644
index 2c3503e..0000000
--- a/src/3rdparty/libpng/scripts/SCOPTIONS.ppc
+++ /dev/null
@@ -1,7 +0,0 @@
-OPTIMIZE
-OPTPEEP
-OPTTIME
-OPTSCHED
-AUTOREGISTER
-PARMS=REGISTERS
-INCLUDEDIR=hlp:ppc/include
diff --git a/src/3rdparty/libpng/scripts/descrip.mms b/src/3rdparty/libpng/scripts/descrip.mms
deleted file mode 100644
index d0642c0..0000000
--- a/src/3rdparty/libpng/scripts/descrip.mms
+++ /dev/null
@@ -1,52 +0,0 @@
-
-cc_defs = /inc=$(ZLIBSRC)
-c_deb =
-
-.ifdef __DECC__
-pref = /prefix=all
-.endif
-
-
-
-OBJS = png.obj, pngset.obj, pngget.obj, pngrutil.obj, pngtrans.obj,\
- pngwutil.obj, pngread.obj, pngmem.obj, pngwrite.obj, pngrtran.obj,\
- pngwtran.obj, pngrio.obj, pngwio.obj, pngerror.obj, pngpread.obj
-
-
-CFLAGS= $(C_DEB) $(CC_DEFS) $(PREF)
-
-all : pngtest.exe libpng.olb
- @ write sys$output " pngtest available"
-
-libpng.olb : libpng.olb($(OBJS))
- @ write sys$output " Libpng available"
-
-
-pngtest.exe : pngtest.obj libpng.olb
- link pngtest,libpng.olb/lib,$(ZLIBSRC)libz.olb/lib
-
-test : pngtest.exe
- run pngtest
-
-clean :
- delete *.obj;*,*.exe;
-
-
-# Other dependencies.
-png.obj : png.h, pngconf.h, pngpriv.h
-pngpread.obj : png.h, pngconf.h, pngpriv.h
-pngset.obj : png.h, pngconf.h, pngpriv.h
-pngget.obj : png.h, pngconf.h, pngpriv.h
-pngread.obj : png.h, pngconf.h, pngpriv.h
-pngrtran.obj : png.h, pngconf.h, pngpriv.h
-pngrutil.obj : png.h, pngconf.h, pngpriv.h
-pngerror.obj : png.h, pngconf.h, pngpriv.h
-pngmem.obj : png.h, pngconf.h, pngpriv.h
-pngrio.obj : png.h, pngconf.h, pngpriv.h
-pngwio.obj : png.h, pngconf.h, pngpriv.h
-pngtrans.obj : png.h, pngconf.h, pngpriv.h
-pngwrite.obj : png.h, pngconf.h, pngpriv.h
-pngwtran.obj : png.h, pngconf.h, pngpriv.h
-pngwutil.obj : png.h, pngconf.h, pngpriv.h
-
-pngtest.obj : png.h, pngconf.h
diff --git a/src/3rdparty/libpng/scripts/libpng-config-body.in b/src/3rdparty/libpng/scripts/libpng-config-body.in
deleted file mode 100755
index b466432..0000000
--- a/src/3rdparty/libpng/scripts/libpng-config-body.in
+++ /dev/null
@@ -1,96 +0,0 @@
-
-usage()
-{
- cat <<EOF
-Usage: libpng-config [OPTION] ...
-
-Known values for OPTION are:
-
- --prefix print libpng prefix
- --libdir print path to directory containing library
- --libs print library linking information
- --ccopts print compiler options
- --cppflags print pre-processor flags
- --cflags print preprocessor flags, I_opts, and compiler options
- --I_opts print "-I" include options
- --L_opts print linker "-L" flags for dynamic linking
- --R_opts print dynamic linker "-R" or "-rpath" flags
- --ldopts print linker options
- --ldflags print linker flags (ldopts, L_opts, R_opts, and libs)
- --static revise subsequent outputs for static linking
- --help print this help and exit
- --version print version information
-EOF
-
- exit $1
-}
-
-if test $# -eq 0; then
- usage 1
-fi
-
-while test $# -gt 0; do
- case "$1" in
-
- --prefix)
- echo ${prefix}
- ;;
-
- --version)
- echo ${version}
- exit 0
- ;;
-
- --help)
- usage 0
- ;;
-
- --ccopts)
- echo ${ccopts}
- ;;
-
- --cppflags)
- echo ${cppflags}
- ;;
-
- --cflags)
- echo ${I_opts} ${cppflags} ${ccopts}
- ;;
-
- --libdir)
- echo ${libdir}
- ;;
-
- --libs)
- echo ${libs}
- ;;
-
- --I_opts)
- echo ${I_opts}
- ;;
-
- --L_opts)
- echo ${L_opts}
- ;;
-
- --R_opts)
- echo ${R_opts}
- ;;
-
- --ldflags)
- echo ${ldflags} ${L_opts} ${R_opts} ${libs}
- ;;
-
- --static)
- R_opts=""
- ;;
-
- *)
- usage
- exit 1
- ;;
- esac
- shift
-done
-
-exit 0
diff --git a/src/3rdparty/libpng/scripts/libpng-config-head.in b/src/3rdparty/libpng/scripts/libpng-config-head.in
deleted file mode 100755
index 01e7254..0000000
--- a/src/3rdparty/libpng/scripts/libpng-config-head.in
+++ /dev/null
@@ -1,24 +0,0 @@
-#! /bin/sh
-
-# libpng-config
-# provides configuration info for libpng.
-
-# Copyright (C) 2002 Glenn Randers-Pehrson
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Modeled after libxml-config.
-
-version=1.4.0
-prefix=""
-libdir=""
-libs=""
-I_opts=""
-L_opts=""
-R_opts=""
-cppflags=""
-ccopts=""
-ldopts=""
-
diff --git a/src/3rdparty/libpng/scripts/libpng.pc.in b/src/3rdparty/libpng/scripts/libpng.pc.in
deleted file mode 100644
index 573df5a..0000000
--- a/src/3rdparty/libpng/scripts/libpng.pc.in
+++ /dev/null
@@ -1,10 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/libpng14
-
-Name: libpng
-Description: Loads and saves PNG files
-Version: 1.4.0
-Libs: -L${libdir} -lpng14
-Cflags: -I${includedir}
diff --git a/src/3rdparty/libpng/scripts/makefile.32sunu b/src/3rdparty/libpng/scripts/makefile.32sunu
deleted file mode 100644
index 3ae51f6..0000000
--- a/src/3rdparty/libpng/scripts/makefile.32sunu
+++ /dev/null
@@ -1,257 +0,0 @@
-# makefile for libpng on Solaris 2.x with cc
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME=libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-CC=cc
-AR_RC=ar rc
-MKDIR_P=mkdir -p
-LN_SF=ln -f -s
-RANLIB=echo
-RM_F=/bin/rm -f
-
-SUN_CC_FLAGS=-fast -xtarget=ultra
-SUN_LD_FLAGS=-fast -xtarget=ultra
-
-# where make install puts libpng.a, libpng14.so and libpng14/png.h
-prefix=/a
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk. If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ZLIBLIB=/usr/lib
-ZLIBINC=/usr/include
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
- # $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=$(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) libpng.a -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo libdir=\"$(LIBPATH)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo ccopts=\"-xtarget=ultra\"; \
- echo ldopts=\"-xtarget=ultra\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- @case "`type ld`" in *ucb*) \
- echo; \
- echo '## WARNING:'; \
- echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
- echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
- echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
- echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
- echo '## at all. If it is, things are likely to break because of'; \
- echo '## the libucb dependency that is created.'; \
- echo; \
- ;; \
- esac
- $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \
- -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \
- -o $(OLDSOVER) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.64sunu b/src/3rdparty/libpng/scripts/makefile.64sunu
deleted file mode 100644
index 3a04d97..0000000
--- a/src/3rdparty/libpng/scripts/makefile.64sunu
+++ /dev/null
@@ -1,257 +0,0 @@
-# makefile for libpng on Solaris 2.x with cc
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME=libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-CC=cc
-AR_RC=ar rc
-MKDIR_P=mkdir -p
-LN_SF=ln -f -s
-RANLIB=echo
-RM_F=/bin/rm -f
-
-SUN_CC_FLAGS=-fast -xtarget=ultra -xarch=v9
-SUN_LD_FLAGS=-fast -xtarget=ultra -xarch=v9
-
-# where make install puts libpng.a, libpng14.so and libpng14/png.h
-prefix=/a
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk. If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ZLIBLIB=/usr/lib
-ZLIBINC=/usr/include
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) $(SUN_CC_FLAGS) \
- # $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo libdir=\"$(LIBPATH)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo ccopts=\"-xtarget=ultra -xarch=v9\"; \
- echo ldopts=\"-xtarget=ultra -xarch=v9\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- @case "`type ld`" in *ucb*) \
- echo; \
- echo '## WARNING:'; \
- echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
- echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
- echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
- echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
- echo '## at all. If it is, things are likely to break because of'; \
- echo '## the libucb dependency that is created.'; \
- echo; \
- ;; \
- esac
- $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(LIBSOMAJ) \
- -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(LD) -G -L$(ZLIBLIB) -R$(ZLIBLIB) -h $(OLDSOMAJ) \
- -o $(OLDSOVER) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOMAJ).$(PNGVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) $(SUN_CC_FLAGS) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtestd -L$(DL) -R$(DL) `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(SUN_CC_FLAGS) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- $(SUN_LD_FLAGS) -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.acorn b/src/3rdparty/libpng/scripts/makefile.acorn
deleted file mode 100644
index a0e577b..0000000
--- a/src/3rdparty/libpng/scripts/makefile.acorn
+++ /dev/null
@@ -1,50 +0,0 @@
-# Project: libpng
-
-
-# Toolflags:
-CCflags = -c -depend !Depend -IC:,Zlib: -g -throwback -DRISCOS -fnah
-C++flags = -c -depend !Depend -IC: -throwback
-Linkflags = -aif -c++ -o $@
-ObjAsmflags = -throwback -NoCache -depend !Depend
-CMHGflags =
-LibFileflags = -c -l -o $@
-Squeezeflags = -o $@
-
-# Final targets:
-@.libpng-lib: @.o.png @.o.pngerror @.o.pngrio @.o.pngwio @.o.pngmem \
- @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngrtran \
- @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil
- LibFile $(LibFileflags) @.o.png @.o.pngerror @.o.pngrio @.o.pngrtran \
- @.o.pngmem @.o.pngpread @.o.pngset @.o.pngget @.o.pngread @.o.pngwio \
- @.o.pngrutil @.o.pngtrans @.o.pngwrite @.o.pngwtran @.o.pngwutil
-@.mm-libpng-lib: @.mm.png @.mm.pngerror @.mm.pngrio @.mm.pngwio @.mm.pngmem \
- @.mm.pngpread @.mm.pngset @.mm.pngget @.mm.pngread @.mm.pngrtran \
- @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite @.mm.pngwtran @.mm.pngwutil
- LibFile $(LibFileflags) @.mm.png @.mm.pngerror @.mm.pngrio \
- @.mm.pngwio @.mm.pngmem @.mm.pngpread @.mm.pngset @.mm.pngget \
- @.mm.pngread @.mm.pngrtran @.mm.pngrutil @.mm.pngtrans @.mm.pngwrite \
- @.mm.pngwtran @.mm.pngwutil
-
-
-# User-editable dependencies:
-# (C) Copyright 1997 Tom Tanner
-Test: @.pngtest
- <Prefix$Dir>.pngtest
- @remove <Prefix$Dir>.pngtest
-
-#It would be nice if you could stop "make" listing from here on!
-@.pngtest: @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib
- Link $(Linkflags) @.o.pngtest @.libpng-lib C:o.Stubs Zlib:zlib_lib
-
-.SUFFIXES: .o .mm .c
-
-.c.mm:
- MemCheck.CC cc $(ccflags) -o $@ LibPng:$<
-.c.o:
- cc $(ccflags) -o $@ $<
-
-
-# Static dependencies:
-
-
-# Dynamic dependencies:
diff --git a/src/3rdparty/libpng/scripts/makefile.aix b/src/3rdparty/libpng/scripts/makefile.aix
deleted file mode 100644
index e6e1a89..0000000
--- a/src/3rdparty/libpng/scripts/makefile.aix
+++ /dev/null
@@ -1,116 +0,0 @@
-# makefile for libpng using gcc (generic, static library)
-# Copyright (C) 2002, 2006-2009 Glenn Randers-Pehrson
-# Copyright (C) 2000 Cosmin Truta
-# Copyright (C) 2000 Marc O. Gloor (AIX support added, from makefile.gcc)
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Location of the zlib library and include files
-ZLIBINC = ../zlib
-ZLIBLIB = ../zlib
-
-# Compiler, linker, lib and other tools
-CC = gcc
-LD = $(CC)
-AR_RC = ar rcs
-MKDIR_P = mkdir -p
-RANLIB = ranlib
-RM_F = rm -f
-LN_SF = ln -f -s
-
-LIBNAME=libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-
-CDEBUG = -g -DPNG_DEBUG=5
-LDDEBUG =
-CRELEASE = -O2
-LDRELEASE = -s
-WARNMORE=-W -Wall
-CFLAGS = -I$(ZLIBINC) $(WARNMORE) $(CRELEASE)
-LDFLAGS = -L. -L$(ZLIBLIB) -lpng14 -lz -lm $(LDRELEASE)
-
-# File extensions
-O=.o
-A=.a
-E=
-
-# Variables
-OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
- pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
- pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-
-# Targets
-all: $(LIBNAME)$(A) pngtest$(E)
-
-$(LIBNAME)$(A): $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-test: pngtest$(E)
- ./pngtest$(E)
-
-pngtest$(E): pngtest$(O) $(LIBNAME)$(A)
- $(LD) -o $@ pngtest$(O) $(LDFLAGS)
-
-install: $(LIBNAME)$(A)
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DI)/$(LIBNAME)/png.h
- -@$(RM_F) $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h
- -@$(RM_F) $(DI)/pngconf.h
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h \
- $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) -r $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
- -@$(RM_F) $(DL)/$(LIBNAME)$(A)
- -@$(RM_F) $(DL)/libpng$(A)
- cp $(LIBNAME)$(A) $(DL)/$(LIBNAME)$(A)
- chmod 644 $(DL)/$(LIBNAME)$(A)
- (cd $(DL); $(LN_SF) $(LIBNAME)$(A) libpng$(A))
- (cd $(DI); $(LN_SF) libpng/* .;)
-
-clean:
- $(RM_F) *.o $(LIBNAME)$(A) pngtest pngout.png
-
-png$(O): png.h pngconf.h pngpriv.h
-pngerror$(O): png.h pngconf.h pngpriv.h
-pngget$(O): png.h pngconf.h pngpriv.h
-pngmem$(O): png.h pngconf.h pngpriv.h
-pngpread$(O): png.h pngconf.h pngpriv.h
-pngread$(O): png.h pngconf.h pngpriv.h
-pngrio$(O): png.h pngconf.h pngpriv.h
-pngrtran$(O): png.h pngconf.h pngpriv.h
-pngrutil$(O): png.h pngconf.h pngpriv.h
-pngset$(O): png.h pngconf.h pngpriv.h
-pngtrans$(O): png.h pngconf.h pngpriv.h
-pngwio$(O): png.h pngconf.h pngpriv.h
-pngwrite$(O): png.h pngconf.h pngpriv.h
-pngwtran$(O): png.h pngconf.h pngpriv.h
-pngwutil$(O): png.h pngconf.h pngpriv.h
-
-pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.amiga b/src/3rdparty/libpng/scripts/makefile.amiga
deleted file mode 100644
index 8bf0f45..0000000
--- a/src/3rdparty/libpng/scripts/makefile.amiga
+++ /dev/null
@@ -1,51 +0,0 @@
-# Commodore Amiga Makefile
-# makefile for libpng and SAS C V6.5x compiler
-# Copyright (C) 1995-2000 Wolf Faust
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-#
-# Note: Use #define PNG_READ_BIG_ENDIAN_SUPPORTED in pngconf.h
-#
-# Location/path of zlib include files
-ZLIB=/zlib
-#compiler
-CC=sc
-#compiler flags
-# WARNING: a bug in V6.51 causes bad code with OPTGO
-# So use V6.55 or set NOOPTGO!!!!!!!!!
-CFLAGS= NOSTKCHK PARMS=REG OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL\
- OPTLOOP OPTRDEP=4 OPTDEP=4 OPTCOMP=4 INCLUDEDIR=$(ZLIB) \
- DEFINE=PNG_INTERNAL
-#linker flags
-LDFLAGS= SD ND BATCH
-#link libs
-LDLIBS= libpng.lib libgz.lib LIB:scm.lib LIB:sc.lib Lib:amiga.lib
-# linker
-LN= slink
-# file deletion command
-RM= delete quiet
-# library (.lib) file creation command
-AR= oml
-# make directory command
-MKDIR= makedir
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.lib pngtest
-
-libpng.lib: $(OBJS)
--$(RM) libpng.lib
-$(AR) libpng.lib r $(OBJS)
-
-pngtest: pngtest.o libpng.lib
-$(LN) <WITH <
-$(LDFLAGS)
-TO pngtest
-FROM LIB:c.o pngtest.o
-LIB $(LDLIBS)
-<
-
diff --git a/src/3rdparty/libpng/scripts/makefile.atari b/src/3rdparty/libpng/scripts/makefile.atari
deleted file mode 100644
index 0e1ca72..0000000
--- a/src/3rdparty/libpng/scripts/makefile.atari
+++ /dev/null
@@ -1,55 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2002 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-#
-# Modified for LC56/ATARI assumes libz.lib is in same dir and uses default
-# rules for library management
-#
-CFLAGS=-I..\zlib -O
-LBR = png.lib
-LDFLAGS=-lpng -lz -lm
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-OBJS = $(LBR)(png.o) $(LBR)(pngset.o) $(LBR)(pngget.o) $(LBR)(pngrutil.o)\
- $(LBR)(pngtrans.o) $(LBR)(pngwutil.o)\
- $(LBR)(pngread.o) $(LBR)(pngerror.o) $(LBR)(pngwrite.o)\
- $(LBR)(pngrtran.o) $(LBR)(pngwtran.o)\
- $(LBR)(pngmem.o) $(LBR)(pngrio.o) $(LBR)(pngwio.o) $(LBR)(pngpread.o)
-
-all: $(LBR) pngtest.ttp
-
-$(LBR): $(OBJS)
-
-pngtest.ttp: pngtest.o $(LBR)
- $(CC) $(CFLAGS) $(LDFLAGS) -o$@ pngtest.o
-
-install: libpng.a
- -@mkdir $(DESTDIR)$(INCPATH)
- -@mkdir $(DESTDIR)$(INCPATH)/libpng
- -@mkdir $(DESTDIR)$(LIBPATH)
- -@rm -f $(DESTDIR)$(INCPATH)/png.h
- -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- (cd $(DESTDIR)$(INCPATH); ln -f -s $(LIBNAME) libpng; \
- ln -f -s $(LIBNAME)/* .)
diff --git a/src/3rdparty/libpng/scripts/makefile.bc32 b/src/3rdparty/libpng/scripts/makefile.bc32
deleted file mode 100644
index 2020e6e..0000000
--- a/src/3rdparty/libpng/scripts/makefile.bc32
+++ /dev/null
@@ -1,145 +0,0 @@
-# Makefile for libpng
-# 32-bit Borland C++ (Note: All modules are compiled in C mode)
-# To build the library, do:
-# "make -fmakefile.bc32"
-#
-# -------------------- 32-bit Borland C++ --------------------
-
-### Absolutely necessary for this makefile to work
-.AUTODEPEND
-
-## Where zlib.h, zconf.h and zlib.lib are
-ZLIB_DIR=..\zlib
-
-## Compiler, linker and lib stuff
-CC=bcc32
-LD=bcc32
-LIB=tlib
-
-# -3 = 386, -4 = 486, -5 = Pentium etc.
-!ifndef TARGET_CPU
-#TARGET_CPU=-6
-!endif
-
-# Use this if you don't want Borland's fancy exception handling
-# (Caution: doesn't work with CBuilderX)
-#NOEHLIB=noeh32.lib
-
-!ifdef DEBUG
-CDEBUG=-v
-LDEBUG=-v
-!else
-CDEBUG=
-LDEBUG=
-!endif
-
-# STACKOFLOW=1
-!ifdef STACKOFLOW
-CDEBUG=$(CDEBUG) -N
-LDEBUG=$(LDEBUG) -N
-!endif
-
-# -O2 optimize for speed
-# -d merge duplicate strings
-# -k- turn off standard stack frame
-# -w display all warnings
-CFLAGS=-I$(ZLIB_DIR) -O2 -d -k- -w $(TARGET_CPU) $(CDEBUG)
-
-# -M generate map file
-LDFLAGS=-L$(ZLIB_DIR) -M $(LDEBUG)
-
-## Variables
-OBJS = \
- png.obj \
- pngerror.obj \
- pngget.obj \
- pngmem.obj \
- pngpread.obj \
- pngread.obj \
- pngrio.obj \
- pngrtran.obj \
- pngrutil.obj \
- pngset.obj \
- pngtrans.obj \
- pngwio.obj \
- pngwrite.obj \
- pngwtran.obj \
- pngwutil.obj
-
-LIBOBJS = \
- +png.obj \
- +pngerror.obj \
- +pngget.obj \
- +pngmem.obj \
- +pngpread.obj \
- +pngread.obj \
- +pngrio.obj \
- +pngrtran.obj \
- +pngrutil.obj \
- +pngset.obj \
- +pngtrans.obj \
- +pngwio.obj \
- +pngwrite.obj \
- +pngwtran.obj \
- +pngwutil.obj
-
-LIBNAME=libpng.lib
-
-## Implicit rules
-# Braces let make "batch" calls to the compiler,
-# 2 calls instead of 12; space is important.
-.c.obj:
- $(CC) $(CFLAGS) -c {$*.c }
-
-.c.exe:
- $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib.lib $(NOEHLIB)
-
-.obj.exe:
- $(LD) $(LDFLAGS) $*.obj $(LIBNAME) zlib.lib $(NOEHLIB)
-
-## Major targets
-all: libpng pngtest
-
-libpng: $(LIBNAME)
-
-pngtest: pngtest.exe
-
-test: pngtest.exe
- pngtest
-
-## Minor Targets
-
-png.obj: png.c png.h pngconf.h pngpriv.h
-pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h
-pngget.obj: pngget.c png.h pngconf.h pngpriv.h
-pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h
-pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h
-pngread.obj: pngread.c png.h pngconf.h pngpriv.h
-pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h
-pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h
-pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h
-pngset.obj: pngset.c png.h pngconf.h pngpriv.h
-pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h
-pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h
-pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h
-pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h
-pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h
-pngtest.obj: pngtest.c png.h pngconf.h
-
-$(LIBNAME): $(OBJS)
- -del $(LIBNAME)
- $(LIB) $(LIBNAME) @&&|
-$(LIBOBJS), libpng
-|
-
-# Cleanup
-clean:
- -del *.obj
- -del $(LIBNAME)
- -del pngtest.exe
- -del *.lst
- -del *.map
- -del *.tds
- -del pngout.png
-
-# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makefile.beos b/src/3rdparty/libpng/scripts/makefile.beos
deleted file mode 100644
index 0b184d6..0000000
--- a/src/3rdparty/libpng/scripts/makefile.beos
+++ /dev/null
@@ -1,230 +0,0 @@
-# makefile for libpng on BeOS x86 ELF with gcc
-# modified from makefile.linux by Sander Stoks
-# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson
-# Copyright (C) 1999 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME=libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-CC=gcc
-AR_RC=ar rc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-# Where the zlib library and include files are located
-ZLIBLIB=/usr/local/lib
-ZLIBINC=/usr/local/include
-
-ALIGN=
-# For i386:
-# ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# On BeOS, -O1 is actually better than -O3. This is a known bug but it's
-# still here in R4.5
-CFLAGS=-I$(ZLIBINC) -W -Wall -O1 -funroll-loops \
- $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-# LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng -lz
-LDFLAGS=-L. -Wl,-soname=$(LIBSOMAJ) -L$(ZLIBLIB) -lz
-
-# where make install puts libpng.a, libpng14.so*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS)
-
-.SUFFIXES: .c .o
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo libs=\"-lpng14 -lz \"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
- cp $(LIBSO)* /boot/home/config/lib
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(CC) -nostart -Wl,-soname,$(LIBSOMAJ) -o \
- $(LIBSOVER) $(OBJSDLL) $(LDFLAGS)
-
-$(OLDSOVER): $(OBJSDLL)
- $(CC) -nostart -Wl,-soname,$(OLDSOMAJ) -o \
- $(OLDSOVER) $(OBJSDLL) $(LDFLAGS)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -L$(ZLIBLIB) -L. -lz -lpng14 -o pngtest pngtest.o
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) -Wl,-rpath $(ZLIBLIB):$(DL) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) $(CFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- $(LIBSO) $(LIBSOMAJ)* pngtesti \
- $(OLDSOVER) \
- libpng.pc
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.bor b/src/3rdparty/libpng/scripts/makefile.bor
deleted file mode 100644
index dcc3c63..0000000
--- a/src/3rdparty/libpng/scripts/makefile.bor
+++ /dev/null
@@ -1,156 +0,0 @@
-# Makefile for libpng
-# 16-bit Borland C++ (Note: All modules are compiled in C mode)
-# To build the library, do:
-# "make -fmakefile.bor -DMODEL=c"
-# or: "make -fmakefile.bor -DMODEL=l"
-#
-# ------------ Borland C++ ------------
-
-### Absolutely necessary for this makefile to work
-.AUTODEPEND
-
-## Where zlib.h, zconf.h and zlib_MODEL.lib are
-ZLIB_DIR=..\zlib
-
-## Compiler, linker and lib stuff
-CC=bcc
-LD=bcc
-LIB=tlib
-
-!ifndef MODEL
-MODEL=l
-!endif
-
-MODEL_ARG=-m$(MODEL)
-
-#TARGET_CPU=3
-# 2 = 286, 3 = 386, etc.
-!ifndef TARGET_CPU
-TARGET_CPU=2
-!endif
-
-# Use this if you don't want Borland's fancy exception handling
-# (for Borland C++ 4.0 or later)
-#NOEHLIB=noeh$(MODEL).lib
-
-!ifdef DEBUG
-CDEBUG=-v
-LDEBUG=-v
-!else
-CDEBUG=
-LDEBUG=
-!endif
-
-# STACKOFLOW=1
-!ifdef STACKOFLOW
-CDEBUG=$(CDEBUG) -N
-LDEBUG=$(LDEBUG) -N
-!endif
-
-# -X- turn on dependency generation in the object file
-# -w set all warnings on
-# -O2 optimize for speed
-# -Z global optimization
-CFLAGS=-O2 -Z -X- -w -I$(ZLIB_DIR) -$(TARGET_CPU) $(MODEL_ARG) $(CDEBUG)
-
-# -M generate map file
-LDFLAGS=-M -L$(ZLIB_DIR) $(MODEL_ARG) $(LDEBUG)
-
-## Variables
-
-OBJS = \
- png.obj \
- pngerror.obj \
- pngget.obj \
- pngmem.obj \
- pngpread.obj \
- pngread.obj \
- pngrio.obj \
- pngrtran.obj \
- pngrutil.obj \
- pngset.obj \
- pngtrans.obj \
- pngwio.obj \
- pngwrite.obj \
- pngwtran.obj \
- pngwutil.obj
-
-LIBOBJS = \
- +png.obj \
- +pngerror.obj \
- +pngget.obj \
- +pngmem.obj \
- +pngpread.obj \
- +pngread.obj \
- +pngrio.obj \
- +pngrtran.obj \
- +pngrutil.obj \
- +pngset.obj \
- +pngtrans.obj \
- +pngwio.obj \
- +pngwrite.obj \
- +pngwtran.obj \
- +pngwutil.obj
-
-LIBNAME=libpng$(MODEL).lib
-
-## Implicit rules
-
-# Braces let make "batch" calls to the compiler,
-# 2 calls instead of 12; space is important.
-.c.obj:
- $(CC) $(CFLAGS) -c {$*.c }
-
-.c.exe:
- $(CC) $(CFLAGS) $(LDFLAGS) $*.c $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
-
-## Major targets
-
-all: libpng pngtest
-
-libpng: $(LIBNAME)
-
-pngtest: pngtest$(MODEL).exe
-
-test: pngtest$(MODEL).exe
- pngtest$(MODEL)
-
-## Minor Targets
-
-png.obj: png.c png.h pngconf.h pngpriv.h
-pngerror.obj: pngerror.c png.h pngconf.h pngpriv.h
-pngget.obj: pngget.c png.h pngconf.h pngpriv.h
-pngmem.obj: pngmem.c png.h pngconf.h pngpriv.h
-pngpread.obj: pngpread.c png.h pngconf.h pngpriv.h
-pngread.obj: pngread.c png.h pngconf.h pngpriv.h
-pngrio.obj: pngrio.c png.h pngconf.h pngpriv.h
-pngrtran.obj: pngrtran.c png.h pngconf.h pngpriv.h
-pngrutil.obj: pngrutil.c png.h pngconf.h pngpriv.h
-pngset.obj: pngset.c png.h pngconf.h pngpriv.h
-pngtrans.obj: pngtrans.c png.h pngconf.h pngpriv.h
-pngwio.obj: pngwio.c png.h pngconf.h pngpriv.h
-pngwrite.obj: pngwrite.c png.h pngconf.h pngpriv.h
-pngwtran.obj: pngwtran.c png.h pngconf.h pngpriv.h
-pngwutil.obj: pngwutil.c png.h pngconf.h pngpriv.h
-
-$(LIBNAME): $(OBJS)
- -del $(LIBNAME)
- $(LIB) $(LIBNAME) @&&|
-$(LIBOBJS), libpng$(MODEL)
-|
-
-pngtest$(MODEL).obj: pngtest.c png.h pngconf.h
- $(CC) $(CFLAGS) -opngtest$(MODEL) -c pngtest.c
-
-pngtest$(MODEL).exe: pngtest$(MODEL).obj
- $(LD) $(LDFLAGS) pngtest$(MODEL).obj $(LIBNAME) zlib_$(MODEL).lib $(NOEHLIB)
-
-# Clean up anything else you want
-clean:
- -del *.obj
- -del *.exe
- -del *.lib
- -del *.lst
- -del *.map
-
-# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makefile.cegcc b/src/3rdparty/libpng/scripts/makefile.cegcc
deleted file mode 100644
index 5b023df..0000000
--- a/src/3rdparty/libpng/scripts/makefile.cegcc
+++ /dev/null
@@ -1,113 +0,0 @@
-# Makefile for creating Windows CE release archives, with the
-# mingw32ce compiler.
-
-# Last updated: 22-Jul-2008
-
-# Copyright (C) 2008 Vincent Torri
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# To get some help, type
-#
-# make help
-#
-# To create the archives
-#
-# make
-#
-# To remove everything, type:
-#
-# make clean
-
-VERMAJ = 1
-VERMIN = 4
-VERMIC = 0
-VER = $(VERMAJ).$(VERMIN).$(VERMIC)
-NAME = libpng
-PACKAGE = $(NAME)-$(VER)
-
-BIN = libpng14-0.dll libpng-14.dll
-LIB = libpng14.a libpng14.dll.a libpng.a libpng.dll.a scripts/png32ce.def
-INCLUDE = png.h pngconf.h pngpriv.h
-PC = libpng14.pc libpng.pc
-
-MANIFESTVERBIN = "Libpng-$(VER): Binary files"
-MANIFESTVERDEV = "Libpng-$(VER): Developer files"
-MANIFESTVERDESC = "Libpng: the official PNG reference library"
-
-all: $(NAME)
-
-$(NAME): remove-old copy-src compilation copy manifest archive
- @echo " * Removal of the directories"
- @rm -rf $(PACKAGE)/ $(PACKAGE)-bin/ $(PACKAGE)-dev/
-
-remove-old:
- @echo " * Removal of the old files"
- @rm -rf $(PACKAGE)-bin*
- @rm -rf $(PACKAGE)-dev*
-
-copy-src:
- @echo " * Copy of source files"
- @cp -R ../src/$(PACKAGE) .
- @echo " * Creation of directories and files"
- @mkdir -p $(PACKAGE)-bin/bin
- @mkdir -p $(PACKAGE)-bin/manifest
- @mkdir -p $(PACKAGE)-dev/lib/pkgconfig
- @mkdir -p $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN)
- @mkdir -p $(PACKAGE)-dev/manifest
- @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.mft
- @touch $(PACKAGE)-bin/manifest/$(PACKAGE)-bin.ver
- @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.mft
- @touch $(PACKAGE)-dev/manifest/$(PACKAGE)-dev.ver
-
-compilation:
- @echo " * Compilation of $(PACKAGE)"
- cd $(PACKAGE) && CPPFLAGS="$(CPPFLAGS) -DPNG_BUILD_DLL -DPNG_CONSOLE_IO_SUPPORTED -DPNG_NO_MMX_CODE -D_WIN32_WCE=0x0420" CFLAGS="$(CFLAGS) -mms-bitfields -O3 -pipe -fomit-frame-pointer" LDFLAGS="$(LDFLAGS) -Wl,--enable-auto-import -Wl,-s" ./configure --prefix=/opt/wince --host=arm-mingw32ce && make
-
-copy:
- @echo " * Copy of binary and development files"
- @for i in $(BIN); do \
- cp $(PACKAGE)/.libs/$$i $(PACKAGE)-bin/bin; \
- done
- @for i in $(LIB); do \
- cp $(PACKAGE)/.libs/$$i $(PACKAGE)-dev/lib; \
- done
- @for i in $(INCLUDE); do \
- cp $(PACKAGE)/$$i $(PACKAGE)-dev/include/$(NAME)$(VERMAJ)$(VERMIN); \
- done
- @for i in $(PC); do \
- cp $(PACKAGE)/$$i $(PACKAGE)-dev/lib/pkgconfig; \
- done
-
-manifest:
- @echo " * Creation of the manifest"
- @cd $(PACKAGE)-bin && find * >> manifest/$(PACKAGE)-bin.mft
- @cd $(PACKAGE)-bin && \
- echo $(MANIFESTVERBIN) >> manifest/$(PACKAGE)-bin.ver && \
- echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-bin.ver
- @cd $(PACKAGE)-dev && find * >> manifest/$(PACKAGE)-dev.mft
- @cd $(PACKAGE)-dev && \
- echo $(MANIFESTVERDEV) >> manifest/$(PACKAGE)-dev.ver && \
- echo $(MANIFESTVERDESC) >> manifest/$(PACKAGE)-dev.ver
-
-archive:
- @echo " * Creation of the archives"
- @tar cf $(PACKAGE)-bin.tar $(PACKAGE)-bin
- @bzip2 -9 $(PACKAGE)-bin.tar
- @tar cf $(PACKAGE)-dev.tar $(PACKAGE)-dev
- @bzip2 -9 $(PACKAGE)-dev.tar
-
-clean:
- @echo " * Cleaning"
- @rm -rf $(PACKAGE)*
-
-help:
- @echo
- @echo "To create the archives, type:"
- @echo " make"
- @echo
- @echo "To remove everything, type:"
- @echo " make clean"
- @echo
diff --git a/src/3rdparty/libpng/scripts/makefile.cygwin b/src/3rdparty/libpng/scripts/makefile.cygwin
deleted file mode 100644
index bdd904e..0000000
--- a/src/3rdparty/libpng/scripts/makefile.cygwin
+++ /dev/null
@@ -1,293 +0,0 @@
-# makefile for cygwin on x86
-# Builds both dll (with import lib) and static lib versions
-# of the library, and builds two copies of pngtest: one
-# statically linked and one dynamically linked.
-#
-# Copyright (C) 2002, 2006-2008 Soren Anderson, Charles Wilson,
-# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
-# Copyright (C) 1998-2000 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# This makefile intends to support building outside the src directory
-# if desired. When invoking it, specify an argument to SRCDIR on the
-# command line that points to the top of the directory where your source
-# is located.
-
-ifdef SRCDIR
-VPATH = $(SRCDIR)
-else
-SRCDIR = .
-endif
-
-# Override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-
-DESTDIR=
-
-CC=gcc
-ifdef MINGW
-MINGW_CCFLAGS=-mno-cygwin -I/usr/include/mingw
-MINGW_LDFLAGS=-mno-cygwin -L/usr/lib/mingw
-endif
-
-# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
-ifndef prefix
-prefix=/usr
-$(warning You haven't specified a 'prefix=' location. Defaulting to "/usr")
-endif
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-ZLIBLIB= /usr/lib
-ZLIBINC=
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
- -W -Wall -O3 $(ALIGN) -funroll-loops \
- -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-
-LIBNAME = libpng14
-PNGMAJ = 14
-CYGDLL = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-SHAREDLIB=cygpng$(CYGDLL).dll
-STATLIB=libpng.a
-IMPLIB=libpng.dll.a
-SHAREDDEF=libpng.def
-LIBS=$(SHAREDLIB) $(STATLIB)
-EXE=.exe
-
-LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
-LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS) -Wl,--export-all)
-LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
-
-MKDIR_P=/bin/mkdir -pv
-RANLIB=ranlib
-#RANLIB=echo
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-
-BINPATH=$(exec_prefix)/bin
-MANPATH=$(prefix)/man
-MAN3PATH=$(MANPATH)/man3
-MAN5PATH=$(MANPATH)/man5
-
-# cosmetic: shortened strings:
-S =$(SRCDIR)
-D =$(DESTDIR)
-DB =$(D)$(BINPATH)
-DI =$(D)$(INCPATH)
-DL =$(D)$(LIBPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-%.o : %.c
- $(CC) -c $(CFLAGS) -o $@ $<
-%.pic.o : CFLAGS += -DPNG_BUILD_DLL
-%.pic.o : %.c
- $(CC) -c $(CFLAGS) -o $@ $<
-
-all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config
-
-# Make this to verify that "make [...] install" will do what you want.
-buildsetup-tell:
- @echo VPATH is set to: \"$(VPATH)\"
- @echo prefix is set to: \"$(prefix)\"
- @echo -e INCPATH,LIBPATH, etc. are set to:'\n' \
- $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \
- $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n'
-
-libpng.pc: scripts/libpng.pc.in
- @echo -e Making pkg-config file for this libpng installation..'\n' \
- using PREFIX=\"$(prefix)\"'\n'
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz! > libpng.pc
-
-libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
- @echo -e Making $(LIBNAME) libpng-config file for this libpng \
- installation..'\n' using PREFIX=\"$(prefix)\"'\n'
- ( cat $(S)/scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng$(CYGDLL) -lz\"; \
- cat $(S)/scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-static: all-static
-shared: all-shared
-all-static: $(STATLIB) pngtest-stat$(EXE)
-all-shared: $(SHAREDLIB) pngtest$(EXE)
-
-$(STATLIB): $(OBJS)
- ar rc $@ $(OBJS)
- $(RANLIB) $@
-
-$(SHAREDDEF): scripts/pngwin.def
- cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
- sed -e 's/\([^;]*\);/;/' > $@
-
-$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF)
- $(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA)
-
-pngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
- $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
-
-pngtest-stat$(EXE): pngtest.o $(STATLIB)
- $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@
-
-pngtest.pic.o: pngtest.c
- $(CC) $(CFLAGS) -c $< -o $@
-
-pngtest.o: pngtest.c png.h pngconf.h
- $(CC) $(CFLAGS) -c $< -o $@
-
-test: test-static test-shared
-
-test-static: pngtest-stat$(EXE)
- ./pngtest-stat $(S)/pngtest.png
-
-test-shared: pngtest$(EXE)
- ./pngtest $(S)/pngtest.png
-
-install-static: $(STATLIB) install-headers install-man
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
- -@rm -f $(DL)/$(STATLIB)
- (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
-
-install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
- install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
- -@rm -f $(DL)/$(IMPLIB)
- (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB))
- install -s -m 755 $(SHAREDLIB) $(DB)
- install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-headers:
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- -@rm -f $(DI)/png.h
- -@rm -f $(DI)/pngconf.h
- install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
- -@rm -f $(DI)/libpng
- (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-man:
- -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR_P) $(D)$(MAN3PATH); fi
- -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR_P) $(D)$(MAN5PATH); fi
- install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
- install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@/bin/rm -f $(DB)/libpng-config
- -@/bin/rm -f $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-# Run this to verify that a future `configure' run will pick up the settings
-# you want.
-test-config-install: SHELL=/bin/bash
-test-config-install: $(DB)/libpng-config
- @echo -e Testing libpng-config functions...'\n'
- @ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \
- do \
- printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \
- "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \
- gytiu=$$(( $$gytiu + 1 )); \
- done
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CFLAGS) \
- `$(BINPATH)/libpng14-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/libpng14-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) $(CFLAGS) \
- `$(BINPATH)/libpng14-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti$(EXE) `$(BINPATH)/libpng14-config --ldflags`
- ./pngtesti$(EXE) pngtest.png
-
-clean:
- /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
- pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \
- libpng-config libpng.pc pngtesti$(EXE)
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-.PHONY: buildsetup-tell libpng.pc libpng-config test-config-install clean
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h png.c
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h pngerror.c
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h pngrio.c
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h pngwio.c
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h pngmem.c
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h pngset.c
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h pngget.c
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h pngread.c
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h pngrtran.c
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h pngrutil.c
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h pngtrans.c
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h pngwrite.c
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h pngwtran.c
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h pngwutil.c
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngpread.c
-
-pngtest.o: png.h pngconf.h pngtest.c
-pngtest-stat.o: png.h pngconf.h pngtest.c
-
-
-
diff --git a/src/3rdparty/libpng/scripts/makefile.darwin b/src/3rdparty/libpng/scripts/makefile.darwin
deleted file mode 100644
index a35ad70..0000000
--- a/src/3rdparty/libpng/scripts/makefile.darwin
+++ /dev/null
@@ -1,237 +0,0 @@
-# makefile for libpng on Darwin / Mac OS X
-# Copyright (C) 2002, 2004, 2006, 2008 Glenn Randers-Pehrson
-# Copyright (C) 2001 Christoph Pfisterer
-# derived from makefile.linux:
-# Copyright (C) 1998, 1999 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# where "make install" puts libpng.a, libpng14.dylib, png.h and pngconf.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).dylib
-LIBSOMAJ=$(LIBNAME).$(PNGMAJ).dylib
-LIBSOVER=$(LIBNAME).$(PNGVER).dylib
-OLDSO=libpng.dylib
-OLDSOMAJ=libpng.14.dylib
-OLDSOVER=libpng.14.$(PNGMIN).dylib
-
-# Utilities:
-CC=cc
-AR_RC=ar rc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-# CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops
-CFLAGS=-I$(ZLIBINC) -W -Wall -O -funroll-loops
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -fno-common -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(CC) -dynamiclib \
- -install_name $(LIBPATH)/$(LIBSOMAJ) \
- -current_version 14 -compatibility_version 14 \
- -o $(LIBSOVER) \
- $(OBJSDLL) -L$(ZLIBLIB) -lz
-
-$(OLDSOVER): $(OBJSDLL)
- $(CC) -dynamiclib \
- -install_name $(LIBPATH)/$(OLDSOMAJ) \
- -current_version 14 -compatibility_version 14 \
- -o $(OLDSOVER) \
- $(OBJSDLL) -L$(ZLIBLIB) -lz
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- $(RANLIB) $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSO) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBNAME).$(PNGVER)*.dylib
- -@$(RM_F) $(DL)/$(LIBNAME).$(PNGMAJ)*.dylib
- -@$(RM_F) $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/libpng.3.$(PNGMIN)*.dylib
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) $(CFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- $(OLDSOVER) \
- libpng.pc $(LIBNAME).*dylib pngtesti
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.dec b/src/3rdparty/libpng/scripts/makefile.dec
deleted file mode 100644
index eb1fd14..0000000
--- a/src/3rdparty/libpng/scripts/makefile.dec
+++ /dev/null
@@ -1,217 +0,0 @@
-# makefile for libpng on DEC Alpha Unix
-# Copyright (C) 2000-2002, 2006 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng14
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=cc
-MKDIR_P=mkdir
-LN_SF=ln -f -s
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-CFLAGS=-std -w1 -I$(ZLIBINC) -O # -g -DPNG_DEBUG=1
-LDFLAGS=-L$(ZLIBLIB) -rpath $(ZLIBLIB) libpng.a -lz -lm
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: $(LIBSO) libpng.a pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-std\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJS)
- $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
- -soname $(LIBSOMAJ)
-
-$(OLDSOVER): $(OBJS)
- $(CC) -shared -o $@ $(OBJS) -L$(ZLIBLIB) \
- -soname $(OLDSOMAJ)
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@/bin/rm -f $(DI)/png.h $(DI)/pngconf.h
- -@/bin/rm -f $(DI)/libpng
- (cd $(DI); $(LN_SF)(LIBNAME) libpng; $(LN_SF)(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@/bin/rm -f $(DL)/libpng.a
- (cd $(DL); $(LN_SF)(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@/bin/rm -f $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@/bin/rm -f $(DL)/$(LIBSOMAJ)
- -@/bin/rm -f $(DL)/$(OLDSO)
- -@/bin/rm -f $(DL)/$(OLDSOMAJ)
- -@/bin/rm -f $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF)(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF)(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF)(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@/bin/rm -f $(DM)/man3/libpng.3
- -@/bin/rm -f $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@/bin/rm -f $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@/bin/rm -f $(DB)/libpng-config
- -@/bin/rm -f $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF)(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -w1 -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) -w1 -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -R$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- /bin/rm -f *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.dj2 b/src/3rdparty/libpng/scripts/makefile.dj2
deleted file mode 100644
index 021e969..0000000
--- a/src/3rdparty/libpng/scripts/makefile.dj2
+++ /dev/null
@@ -1,58 +0,0 @@
-# DJGPP (DOS gcc) makefile for libpng
-# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# where make install will put libpng.a and png.h
-#prefix=/usr/local
-prefix=.
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-CC=gcc
-CFLAGS=-I../zlib -O
-LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
-
-RANLIB=ranlib
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o pngwtran.o \
- pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest
-
-libpng.a: $(OBJS)
- ar rc $@ $(OBJS)
- $(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
- coff2exe pngtest
-
-test: pngtest
- ./pngtest
-clean:
- rm -f *.o libpng.a pngtest pngout.png
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.elf b/src/3rdparty/libpng/scripts/makefile.elf
deleted file mode 100644
index 7d70af1..0000000
--- a/src/3rdparty/libpng/scripts/makefile.elf
+++ /dev/null
@@ -1,279 +0,0 @@
-# makefile for libpng.a and libpng14.so on Linux ELF with gcc
-# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs
-# and Glenn Randers-Pehrson
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Modified for Debian by Junichi Uekawa and Josselin Mouette
-# Major modifications are:
-# * link libpng explicitly with libz and libm
-# * $(OLDSO).14 is a symlink rather than a different library
-# * versioned symbols
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=gcc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-# where "make install" puts libpng14.a, libpng14.so*,
-# libpng14/png.h and libpng14/pngconf.h
-# Prefix must be a full pathname.
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located.
-ZLIBLIB=/usr/local/lib
-ZLIBINC=/usr/local/include
-# ZLIBLIB=../zlib
-# ZLIBINC=../zlib
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-
-CFLAGS=-W -Wall -D_REENTRANT -O2 \
- $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-
-LDFLAGS=-L. -lpng14
-LDFLAGS_A=libpng.a -lz -lm
-LIBADDFLAGS=-lz -lm
-
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng.syms: png.h pngconf.h
- $(CC) $(CFLAGS) -E -DPNG_BUILDSYMS -DPNG_INTERNAL png.h |\
- awk -F '[\t [\\]();]' -v PNGMAJ=$(PNGMAJ) 'BEGIN{printf("PNG14_%s {global:\n",PNGMAJ)}\
- { for (i=1;i+2<=NF;++i)\
- if ($$(i)=="PNG_FUNCTION_EXPORT" && $$(i+2)=="END")\
- print $$(i+1) ";";\
- for (i=1;i+1<=NF;++i)\
- if ($$(i)=="PNG_DATA_EXPORT")\
- print $$(i+1) ";";}\
- END{print "local: *; };"}' >$@.new
- $(RM_F) $@
- mv $@.new $@
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"\"; \
- echo R_opts=\"\"; \
- echo libs=\"-lpng14\"; \
- echo all_libs=\"-lpng14 $(LIBADDFLAGS)\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL) libpng.syms
- $(CC) -shared -Wl,-soname,$(LIBSOMAJ) \
- -Wl,-version-script,libpng.syms \
- -o $(LIBSOVER) \
- $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL) libpng.syms
- $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
- -Wl,-version-script,libpng.syms \
- -o $(OLDSOVER) \
- $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-pngtest-static: pngtest.o libpng.a
- $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
-
-test: pngtest pngtest-static
- @echo ""
- @echo " Running pngtest dynamically linked with $(LIBSO):"
- @echo ""
- LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}" ./pngtest
- @echo ""
- @echo " Running pngtest statically linked with libpng.a:"
- @echo ""
- ./pngtest-static
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a libpng.syms pngtest pngout.png libpng-config \
- $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.freebsd b/src/3rdparty/libpng/scripts/makefile.freebsd
deleted file mode 100644
index c0014af..0000000
--- a/src/3rdparty/libpng/scripts/makefile.freebsd
+++ /dev/null
@@ -1,48 +0,0 @@
-# makefile for libpng under FreeBSD
-# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-PREFIX?= /usr/local
-SHLIB_VER?= 14
-
-LIB= png
-SHLIB_MAJOR= ${SHLIB_VER}
-SHLIB_MINOR= 0
-NOPROFILE= YES
-NOOBJ= YES
-
-# where make install puts libpng.a and png.h
-DESTDIR= ${PREFIX}
-LIBDIR= /lib
-INCS= png.h pngconf.h pngpriv.h
-INCSDIR= /include/libpng
-INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
-MAN= libpng.3 libpngpf.3 png.5
-MANDIR= /man/man
-SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
- libpng/pngconf.h ${INCSDIR}/../pngconf.h
-LDADD+= -lm -lz
-DPADD+= ${LIBM} ${LIBZ}
-
-CFLAGS+= -I.
-
-SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
- pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
- pngwtran.c pngmem.c pngerror.c pngpread.c
-
-pngtest: pngtest.o libpng.a
- ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
-
-CLEANFILES= pngtest pngtest.o pngout.png
-
-test: pngtest
- ./pngtest
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-.include <bsd.lib.mk>
diff --git a/src/3rdparty/libpng/scripts/makefile.gcc b/src/3rdparty/libpng/scripts/makefile.gcc
deleted file mode 100644
index b31adee..0000000
--- a/src/3rdparty/libpng/scripts/makefile.gcc
+++ /dev/null
@@ -1,83 +0,0 @@
-# makefile for libpng using gcc (generic, static library)
-# Copyright (C) 2008 Glenn Randers-Pehrson
-# Copyright (C) 2000 Cosmin Truta
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Location of the zlib library and include files
-ZLIBINC = ../zlib
-ZLIBLIB = ../zlib
-
-# Compiler, linker, lib and other tools
-CC = gcc
-LD = $(CC)
-AR_RC = ar rcs
-RANLIB = ranlib
-RM_F = rm -f
-
-CDEBUG = -g -DPNG_DEBUG=5
-LDDEBUG =
-CRELEASE = -O2
-LDRELEASE = -s
-#CFLAGS = -W -Wall $(CDEBUG)
-CFLAGS = -W -Wall $(CRELEASE)
-#LDFLAGS = $(LDDEBUG)
-LDFLAGS = $(LDRELEASE)
-LIBS = -lz -lm
-
-# File extensions
-O=.o
-A=.a
-EXE=
-
-# Variables
-OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
- pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
- pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-
-# Targets
-all: static
-
-.c$(O):
- $(CC) -c $(CFLAGS) -I$(ZLIBINC) $<
-
-static: libpng$(A) pngtest$(EXE)
-
-shared:
- @echo This is a generic makefile that cannot create shared libraries.
- @echo Please use a configuration that is specific to your platform.
- @false
-
-libpng$(A): $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-test: pngtest$(EXE)
- ./pngtest$(EXE)
-
-pngtest$(EXE): pngtest$(O) libpng$(A)
- $(LD) $(LDFLAGS) -L$(ZLIBLIB) -o $@ pngtest$(O) libpng$(A) $(LIBS)
-
-clean:
- $(RM_F) *$(O) libpng$(A) pngtest$(EXE) pngout.png
-
-png$(O): png.h pngconf.h pngpriv.h
-pngerror$(O): png.h pngconf.h pngpriv.h
-pngget$(O): png.h pngconf.h pngpriv.h
-pngmem$(O): png.h pngconf.h pngpriv.h
-pngpread$(O): png.h pngconf.h pngpriv.h
-pngread$(O): png.h pngconf.h pngpriv.h
-pngrio$(O): png.h pngconf.h pngpriv.h
-pngrtran$(O): png.h pngconf.h pngpriv.h
-pngrutil$(O): png.h pngconf.h pngpriv.h
-pngset$(O): png.h pngconf.h pngpriv.h
-pngtrans$(O): png.h pngconf.h pngpriv.h
-pngwio$(O): png.h pngconf.h pngpriv.h
-pngwrite$(O): png.h pngconf.h pngpriv.h
-pngwtran$(O): png.h pngconf.h pngpriv.h
-pngwutil$(O): png.h pngconf.h pngpriv.h
-
-pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.hp64 b/src/3rdparty/libpng/scripts/makefile.hp64
deleted file mode 100644
index 300421a..0000000
--- a/src/3rdparty/libpng/scripts/makefile.hp64
+++ /dev/null
@@ -1,239 +0,0 @@
-# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
-# Copyright (C) 1999-2002, 2006, 2009 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42
-# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Where the zlib library and include files are located
-ZLIBLIB=/opt/zlib/lib
-ZLIBINC=/opt/zlib/include
-
-# Note that if you plan to build a libpng shared library, zlib must also
-# be a shared library, which zlib's configure does not do. After running
-# zlib's configure, edit the appropriate lines of makefile to read:
-# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
-# LDSHARED=ld -b
-# SHAREDLIB=libz.sl
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).sl
-LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).sl.$(PNGVER)
-OLDSO=libpng.sl
-OLDSOMAJ=libpng.sl.14
-OLDSOVER=libpng.sl.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=cc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-CFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
--D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
-# Caution: be sure you have built zlib with the same CFLAGS.
-CCFLAGS=-I$(ZLIBINC) -O -Ae -Wl,+vnocompatwarnings +DD64 \
--D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 +Z -DHAVE_UNISTD_H -DUSE_MMAP
-
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-
-# where make install puts libpng.a, libpng14.sl, and png.h
-prefix=/opt/libpng
-exec_prefix=$(prefix)
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) +z -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(LD) -b +s \
- +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(LD) -b +s \
- +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CCFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.hpgcc b/src/3rdparty/libpng/scripts/makefile.hpgcc
deleted file mode 100644
index 5a147e6..0000000
--- a/src/3rdparty/libpng/scripts/makefile.hpgcc
+++ /dev/null
@@ -1,248 +0,0 @@
-# makefile for libpng on HP-UX using GCC with the HP ANSI/C linker.
-# Copyright (C) 2002, 2006-2008 Glenn Randers-Pehrson
-# Copyright (C) 2001, Laurent faillie
-# Copyright (C) 1998, 1999 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).sl
-LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).sl.$(PNGVER)
-OLDSO=libpng.sl
-OLDSOMAJ=libpng.sl.14
-OLDSOVER=libpng.sl.14.$(PNGMIN)
-
-# Utilities:
-CC=gcc
-LD=ld
-AR_RC=ar rc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-# where "make install" puts libpng.a, $(OLDSO)*, png.h and pngconf.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-ZLIBLIB=/opt/zlib/lib
-ZLIBINC=/opt/zlib/include
-
-# Note that if you plan to build a libpng shared library, zlib must also
-# be a shared library, which zlib's configure does not do. After running
-# zlib's configure, edit the appropriate lines of makefile to read:
-# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
-# LDSHARED=ld -b
-# SHAREDLIB=libz.sl
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-
-CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops -DPNG_NO_MMX_CODE \
- $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-#LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(LD) -b +s \
- +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(LD) -b +s \
- +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) -Wl,-rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.hpux b/src/3rdparty/libpng/scripts/makefile.hpux
deleted file mode 100644
index 4966fa9..0000000
--- a/src/3rdparty/libpng/scripts/makefile.hpux
+++ /dev/null
@@ -1,236 +0,0 @@
-# makefile for libpng, HPUX (10.20 and 11.00) using the ANSI/C product.
-# Copyright (C) 1999-2002, 2006 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42
-# contributed by Jim Rice and updated by Chris Schleicher, Hewlett Packard
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Where the zlib library and include files are located
-ZLIBLIB=/opt/zlib/lib
-ZLIBINC=/opt/zlib/include
-
-# Note that if you plan to build a libpng shared library, zlib must also
-# be a shared library, which zlib's configure does not do. After running
-# zlib's configure, edit the appropriate lines of makefile to read:
-# CFLAGS=-O1 -DHAVE_UNISTD -DUSE_MAP -fPIC \
-# LDSHARED=ld -b
-# SHAREDLIB=libz.sl
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).sl
-LIBSOMAJ=$(LIBNAME).sl.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).sl.$(PNGVER)
-OLDSO=libpng.sl
-OLDSOMAJ=libpng.sl.14
-OLDSOVER=libpng.sl.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=cc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-# where make install puts libpng.a, libpng14.sl, and png.h
-prefix=/opt/libpng
-exec_prefix=$(prefix)
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-CFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
-# Caution: be sure you have built zlib with the same CFLAGS.
-CCFLAGS=-I$(ZLIBINC) -O -Ae +DA1.1 +DS2.0
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) +z -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-Ae +DA1.1 +DS2.0\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(LD) -b +s \
- +h $(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(LD) -b +s \
- +h $(OLDSOMAJ) -o $(OLDSOVER) $(OBJSDLL)
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CCFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) $(CCFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) $(CCFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.ibmc b/src/3rdparty/libpng/scripts/makefile.ibmc
deleted file mode 100644
index b0b445a..0000000
--- a/src/3rdparty/libpng/scripts/makefile.ibmc
+++ /dev/null
@@ -1,77 +0,0 @@
-# Makefile for libpng (static)
-# IBM C version 3.x for Win32 and OS/2
-# Copyright (C) 2006 Glenn Randers-Pehrson
-# Copyright (C) 2000 Cosmin Truta
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-#
-# Notes:
-# Derived from makefile.std
-# All modules are compiled in C mode
-# Tested under Win32, expected to work under OS/2
-# Can be easily adapted for IBM VisualAge/C++ for AIX
-
-# Location of the zlib library and include files
-ZLIBINC = ../zlib
-ZLIBLIB = ../zlib
-
-# Compiler, linker, lib and other tools
-CC = icc
-LD = ilink
-AR = ilib
-RM = del
-
-CFLAGS = -I$(ZLIBINC) -Mc -O2 -W3
-LDFLAGS =
-
-# File extensions
-O=.obj
-A=.lib
-E=.exe
-
-# Variables
-OBJS = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O) \
- pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O) \
- pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-
-LIBS = libpng$(A) $(ZLIBLIB)/zlib$(A)
-
-# Targets
-all: libpng$(A) pngtest$(E)
-
-libpng$(A): $(OBJS)
- $(AR) -out:$@ $(OBJS)
-
-test: pngtest$(E)
- pngtest$(E)
-
-pngtest: pngtest$(E)
-
-pngtest$(E): pngtest$(O) libpng$(A)
- $(LD) $(LDFLAGS) pngtest$(O) $(LIBS)
-
-clean:
- $(RM) *$(O)
- $(RM) libpng$(A)
- $(RM) pngtest$(E)
- $(RM) pngout.png
-
-png$(O): png.h pngconf.h pngpriv.h
-pngerror$(O): png.h pngconf.h pngpriv.h
-pngget$(O): png.h pngconf.h pngpriv.h
-pngmem$(O): png.h pngconf.h pngpriv.h
-pngpread$(O): png.h pngconf.h pngpriv.h
-pngread$(O): png.h pngconf.h pngpriv.h
-pngrio$(O): png.h pngconf.h pngpriv.h
-pngrtran$(O): png.h pngconf.h pngpriv.h
-pngrutil$(O): png.h pngconf.h pngpriv.h
-pngset$(O): png.h pngconf.h pngpriv.h
-pngtrans$(O): png.h pngconf.h pngpriv.h
-pngwio$(O): png.h pngconf.h pngpriv.h
-pngwrite$(O): png.h pngconf.h pngpriv.h
-pngwtran$(O): png.h pngconf.h pngpriv.h
-pngwutil$(O): png.h pngconf.h pngpriv.h
-
-pngtest$(O): png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.intel b/src/3rdparty/libpng/scripts/makefile.intel
deleted file mode 100644
index fb705e1..0000000
--- a/src/3rdparty/libpng/scripts/makefile.intel
+++ /dev/null
@@ -1,106 +0,0 @@
-# Makefile for libpng
-# Microsoft Visual C++ with Intel C/C++ Compiler 4.0 and later
-
-# Copyright (C) 2006 Glenn Randers-Pehrson
-# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
-# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-#
-# To use, do "nmake /f scripts\makefile.intel"
-#
-# ------------------- Intel C/C++ Compiler 4.0 and later -------------------
-
-# Where the zlib library and include files are located
-ZLIBLIB=..\zlib
-ZLIBINC=..\zlib
-
-# Target CPU
-CPU=6 # Pentium II
-#CPU=5 # Pentium
-
-# Calling convention
-CALLING=r # __fastcall
-#CALLING=z # __stdcall
-#CALLING=d # __cdecl
-
-# Uncomment next to put error messages in a file
-#ERRFILE=>>pngerrs
-
-# --------------------------------------------------------------------------
-
-CC=icl -c
-CFLAGS=-O2 -G$(CPU)$(CALLING) -Qip -Qunroll4 -I$(ZLIBINC) -nologo
-LD=link
-LDFLAGS=/SUBSYSTEM:CONSOLE /NOLOGO
-
-O=.obj
-
-OBJS=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O) \
-pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O) \
-pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
-
-all: test
-
-png$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS)
- if exist libpng.lib del libpng.lib
- lib /NOLOGO /OUT:libpng.lib $(OBJS)
-
-pngtest.exe: pngtest.obj libpng.lib
- $(LD) $(LDFLAGS) /OUT:pngtest.exe pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
-
-pngtest$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-test: pngtest.exe
- pngtest.exe
-
-
-# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makefile.knr b/src/3rdparty/libpng/scripts/makefile.knr
deleted file mode 100644
index 75cb1b5..0000000
--- a/src/3rdparty/libpng/scripts/makefile.knr
+++ /dev/null
@@ -1,103 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2002, 2006, 2009 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-#
-# This makefile requires the file ansi2knr.c, which you can get
-# from the Ghostscript ftp site at ftp://ftp.cs.wisc.edu/ghost/
-# If you have libjpeg, you probably already have ansi2knr.c in the jpeg
-# source distribution.
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-CC=cc
-CFLAGS=-I../zlib -O
-LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
-# flags for ansi2knr
-ANSI2KNRFLAGS=
-
-RANLIB=ranlib
-#RANLIB=echo
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: ansi2knr libpng.a pngtest
-
-# general rule to allow ansi2knr to work
-.c.o:
- ./ansi2knr $*.c T$*.c
- $(CC) $(CFLAGS) -c T$*.c
- rm -f T$*.c $*.o
- mv T$*.o $*.o
-
-ansi2knr: ansi2knr.c
- $(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
-
-libpng.a: ansi2knr $(OBJS)
- ar rc $@ $(OBJS)
- $(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install: libpng.a png.h pngconf.h
- -@mkdir $(DESTDIR)$(INCPATH)
- -@mkdir $(DESTDIR)$(INCPATH)/libpng
- -@mkdir $(DESTDIR)$(LIBPATH)
- -@rm -f $(DESTDIR)$(INCPATH)/png.h
- -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
- cp libpng.a $(DESTDIR)$(LIBPATH)
- chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
-
-clean:
- rm -f *.o libpng.a pngtest pngout.png ansi2knr
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.linux b/src/3rdparty/libpng/scripts/makefile.linux
deleted file mode 100644
index 8d02d5a..0000000
--- a/src/3rdparty/libpng/scripts/makefile.linux
+++ /dev/null
@@ -1,253 +0,0 @@
-# makefile for libpng.a and libpng14.so on Linux ELF with gcc
-# Copyright (C) 1998, 1999, 2002, 2006, 2008 Greg Roelofs and
-# Glenn Randers-Pehrson
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=gcc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-# where "make install" puts libpng14.a, libpng14.so*,
-# libpng14/png.h and libpng14/pngconf.h
-# Prefix must be a full pathname.
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located.
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-# for pgcc version 2.95.1, -O3 is buggy; don't use it.
-
-CFLAGS=-I$(ZLIBINC) -W -Wall -O3 -funroll-loops \
- $(ALIGN) # $(WARNMORE) -g -DPNG_DEBUG=5
-
-LDFLAGS=-L. -Wl,-rpath,. -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) -lpng14 -lz -lm
-LDFLAGS_A=-L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) libpng.a -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-Wl,-rpath,$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(CC) -shared -Wl,-soname,$(LIBSOMAJ) -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(CC) -shared -Wl,-soname,$(OLDSOMAJ) \
- -o $(OLDSOVER) \
- $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-pngtest-static: pngtest.o libpng.a
- $(CC) -o pngtest-static $(CFLAGS) pngtest.o $(LDFLAGS_A)
-
-test: pngtest pngtest-static
- @echo ""
- @echo " Running pngtest dynamically linked with $(LIBSO):"
- @echo ""
- ./pngtest
- @echo ""
- @echo " Running pngtest statically linked with libpng.a:"
- @echo ""
- ./pngtest-static
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) -Wl, -rpath,$(DL) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) -Wl,-rpath,$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.mingw b/src/3rdparty/libpng/scripts/makefile.mingw
deleted file mode 100644
index 8faad93..0000000
--- a/src/3rdparty/libpng/scripts/makefile.mingw
+++ /dev/null
@@ -1,280 +0,0 @@
-# makefile for mingw on x86
-# Builds both dll (with import lib) and static lib versions
-# of the library, and builds two copies of pngtest: one
-# statically linked and one dynamically linked.
-#
-# Copyright (C) 2002, 2006, 2008 Soren Anderson, Charles Wilson,
-# and Glenn Randers-Pehrson, based on makefile for linux-elf w/mmx by:
-# Copyright (C) 1998-2000, 2007 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Built from makefile.cygwin
-
-# This makefile intends to support building outside the src directory
-# if desired. When invoking it, specify an argument to SRCDIR on the
-# command line that points to the top of the directory where your source
-# is located.
-ifdef SRCDIR
-VPATH = $(SRCDIR)
-else
-SRCDIR = .
-endif
-
-# Override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-# If you're using a cross-compiler, add the appropriate prefix (e.g.,
-# "i386-mingw32msvc-") to the following three commands:
-CC=gcc
-AR=ar
-RANLIB=ranlib
-
-MKDIR_P=/bin/mkdir -pv
-
-# Where "make install" puts libpng*.a, *png*.dll, png.h, and pngconf.h
-ifndef prefix
-prefix=/usr
-$(warning "You haven't specified a 'prefix=' location. Defaulting to '/usr'")
-endif
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-ZLIBLIB= /usr/lib
-ZLIBINC=
-
-ALIGN=
-# for i386:
-#ALIGN=-malign-loops=2 -malign-functions=2
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-
-CFLAGS= $(strip $(MINGW_CCFLAGS) $(addprefix -I,$(ZLIBINC)) \
- -W -Wall -O3 $(ALIGN) -funroll-loops \
- -fomit-frame-pointer) # $(WARNMORE) -g -DPNG_DEBUG=5
-
-LIBNAME = libpng14
-PNGMAJ = 14
-MINGDLL = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-SHAREDLIB=libpng$(MINGDLL).dll
-STATLIB=libpng.a
-IMPLIB=libpng.dll.a
-SHAREDDEF=libpng.def
-LIBS=$(SHAREDLIB) $(STATLIB)
-EXE=.exe
-
-LDFLAGS=$(strip -L. $(MINGW_LDFLAGS) -lpng $(addprefix -L,$(ZLIBLIB)) -lz)
-LDSFLAGS=$(strip -shared -L. $(MINGW_LDFLAGS))
-LDEXTRA=-Wl,--out-implib=$(IMPLIB) $(addprefix -L,$(ZLIBLIB)) -lz
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-
-BINPATH=$(exec_prefix)/bin
-MANPATH=$(prefix)/man
-MAN3PATH=$(MANPATH)/man3
-MAN5PATH=$(MANPATH)/man5
-
-# cosmetic: shortened strings:
-S =$(SRCDIR)
-D =$(DESTDIR)
-DB =$(D)$(BINPATH)
-DI =$(D)$(INCPATH)
-DL =$(D)$(LIBPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-%.o : %.c
- $(CC) -c $(CFLAGS) -o $@ $<
-%.pic.o : CFLAGS += -DPNG_BUILD_DLL
-%.pic.o : %.c
- $(CC) -c $(CFLAGS) -o $@ $<
-
-all: all-static all-shared libpng.pc libpng-config libpng.pc libpng-config
-
-# Make this to verify that "make [...] install" will do what you want.
-buildsetup-tell:
- @echo VPATH is set to: \"$(VPATH)\"
- @echo prefix is set to: \"$(prefix)\"
- @echo -e INCPATH,LIBPATH, etc. are set to:'\n' \
- $(addprefix $(D),$(INCPATH)'\n' $(LIBPATH)'\n' $(BINPATH)'\n' \
- $(MANPATH)'\n' $(MAN3PATH)'\n' $(MAN5PATH)'\n')'\n'
-
-libpng.pc: scripts/libpng.pc.in
- @echo -e Making pkg-config file for this libpng installation..'\n' \
- using PREFIX=\"$(prefix)\"'\n'
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config: scripts/libpng-config-head.in scripts/libpng-config-body.in
- @echo -e Making $(LIBNAME) libpng-config file for this libpng \
- installation..'\n' using PREFIX=\"$(prefix)\"'\n'
- ( cat $(S)/scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng$(MINGDLL) -lz\"; \
- cat $(S)/scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-static: all-static
-shared: all-shared
-all-static: $(STATLIB) pngtest-stat$(EXE)
-all-shared: $(SHAREDLIB) pngtest$(EXE)
-
-$(STATLIB): $(OBJS)
- $(AR) rc $@ $(OBJS)
- $(RANLIB) $@
-
-$(SHAREDDEF): scripts/pngwin.def
- cat $< | sed -e '1{G;s/^\(.*\)\(\n\)/EXPORTS/;};2,/^EXPORTS/d' | \
- sed -e 's/\([^;]*\);/;/' > $@
-
-$(SHAREDLIB): $(OBJSDLL) $(SHAREDDEF)
- $(CC) $(LDSFLAGS) -o $@ $(OBJSDLL) -L. $(LDEXTRA)
-
-pngtest$(EXE): pngtest.pic.o $(SHAREDLIB)
- $(CC) $(CFLAGS) $< $(LDFLAGS) -o $@
-
-pngtest-stat$(EXE): pngtest.o $(STATLIB)
- $(CC) -static $(CFLAGS) $< $(LDFLAGS) -o $@
-
-test: test-static test-shared
-
-test-static: pngtest-stat$(EXE)
- ./pngtest-stat $(S)/pngtest.png
-
-test-shared: pngtest$(EXE)
- ./pngtest $(S)/pngtest.png
-
-install-static: $(STATLIB) install-headers install-man
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- install -m 644 $(STATLIB) $(DL)/$(LIBNAME).a
- -@rm -f $(DL)/$(STATLIB)
- (cd $(DL); ln -sf $(LIBNAME).a $(STATLIB))
-
-install-shared: $(SHAREDLIB) libpng.pc libpng-config install-headers install-man
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@/bin/rm -f $(DL)/pkgconfig/$(LIBNAME).pc
- -@/bin/rm -f $(DL)/pkgconfig/libpng.pc
- install -m 644 $(IMPLIB) $(DL)/$(LIBNAME).dll.a
- -@rm -f $(DL)/$(IMPLIB)
- (cd $(DL); ln -sf $(LIBNAME).dll.a $(IMPLIB))
- install -s -m 755 $(SHAREDLIB) $(DB)
- install -m 644 libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; ln -sf $(LIBNAME).pc libpng.pc)
-
-install-headers:
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- -@rm -f $(DI)/png.h
- -@rm -f $(DI)/pngconf.h
- install -m 644 $(S)/png.h $(S)/pngconf.h $(DI)/$(LIBNAME)
- -@rm -f $(DI)/libpng
- (cd $(DI); ln -sf $(LIBNAME) libpng; ln -sf $(LIBNAME)/* .)
-
-install-man:
- -@if [ ! -d $(D)$(MAN3PATH) ]; then $(MKDIR_P) $(D)$(MAN3PATH); fi
- -@if [ ! -d $(D)$(MAN5PATH) ]; then $(MKDIR_P) $(D)$(MAN5PATH); fi
- install -m 644 $(S)/libpngpf.3 $(S)/libpng.3 $(D)$(MAN3PATH)
- install -m 644 $(S)/png.5 $(D)$(MAN5PATH)
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@/bin/rm -f $(DB)/libpng-config
- -@/bin/rm -f $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); ln -sf $(LIBNAME)-config libpng-config)
-
-# Run this to verify that a future `configure' run will pick up the settings
-# you want.
-test-config-install: SHELL=/bin/bash
-test-config-install: $(DB)/libpng-config
- @echo -e Testing libpng-config functions...'\n'
- @ for TYRA in LDFLAGS CPPFLAGS CFLAGS LIBS VERSION; \
- do \
- printf "(%d)\t %10s =%s\n" $$(($$gytiu + 1)) $$TYRA \
- "$$($(DB)/libpng-config `echo --$$TYRA |tr '[:upper:]' '[:lower:]'`)"; \
- gytiu=$$(( $$gytiu + 1 )); \
- done
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CFLAGS) \
- `$(BINPATH)/libpng14-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/libpng14-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) $(CFLAGS) \
- `$(BINPATH)/libpng14-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti$(EXE) `$(BINPATH)/libpng14-config --ldflags`
- ./pngtesti$(EXE) pngtest.png
-
-clean:
- /bin/rm -f *.pic.o *.o $(STATLIB) $(IMPLIB) $(SHAREDLIB) \
- pngtest-stat$(EXE) pngtest$(EXE) pngout.png $(SHAREDDEF) \
- libpng-config libpng.pc pngtesti$(EXE)
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-.PHONY: buildsetup-tell libpng.pc libpng-config test-config-install clean
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h png.c
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h pngerror.c
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h pngrio.c
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h pngwio.c
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h pngmem.c
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h pngset.c
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h pngget.c
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h pngread.c
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h pngrtran.c
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h pngrutil.c
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h pngtrans.c
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h pngwrite.c
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h pngwtran.c
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h pngwutil.c
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h pngpread.c
-
-pngtest.o pngtest.pic.o: png.h pngconf.h pngtest.c
diff --git a/src/3rdparty/libpng/scripts/makefile.mips b/src/3rdparty/libpng/scripts/makefile.mips
deleted file mode 100644
index 5e1040e..0000000
--- a/src/3rdparty/libpng/scripts/makefile.mips
+++ /dev/null
@@ -1,87 +0,0 @@
-# makefile for libpng
-# Copyright (C) Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-CC=cc
-CFLAGS=-I../zlib -O -systype sysv -DSYSV -w -Dmips
-#CFLAGS=-O
-LDFLAGS=-L. -L../zlib/ -lpng -lz -lm
-
-#RANLIB=ranlib
-RANLIB=echo
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest
-
-libpng.a: $(OBJS)
- ar rc $@ $(OBJS)
- $(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install: libpng.a
- -@mkdir $(DESTDIR)$(INCPATH)
- -@mkdir $(DESTDIR)$(INCPATH)/libpng
- -@mkdir $(DESTDIR)$(LIBPATH)
- -@rm -f $(DESTDIR)$(INCPATH)/png.h
- -@rm -f $(DESTDIR)$(INCPATH)/pngconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
- cp libpng.a $(DESTDIR)$(LIBPATH)
- chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
-
-clean:
- rm -f *.o libpng.a pngtest pngout.png
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.msc b/src/3rdparty/libpng/scripts/makefile.msc
deleted file mode 100644
index e744644..0000000
--- a/src/3rdparty/libpng/scripts/makefile.msc
+++ /dev/null
@@ -1,91 +0,0 @@
-# makefile for libpng
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# Copyright (C) 2006, 2009 Glenn Randers-Pehrson
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-#
-# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
-
-# -------- Microsoft C 5.1 and later, does not use assembler code --------
-MODEL=L
-CFLAGS=-Oait -Gs -nologo -W3 -A$(MODEL) -I..\zlib
-#-Ox generates bad code with MSC 5.1
-CC=cl
-LD=link
-LDFLAGS=/e/st:0x1500/noe
-O=.obj
-
-#uncomment next to put error messages in a file
-ERRFILE= >> pngerrs
-
-# variables
-OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
-OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
-OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
-
-all: libpng.lib
-
-png$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
- del libpng.lib
- lib libpng $(OBJS1);
- lib libpng $(OBJS2);
- lib libpng $(OBJS3);
-
-pngtest$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest.exe: pngtest.obj libpng.lib
- $(LD) $(LDFLAGS) pngtest.obj,,,libpng.lib ..\zlib\zlib.lib ;
-
-test: pngtest.exe
- pngtest
-
-# End of makefile for libpng
-
diff --git a/src/3rdparty/libpng/scripts/makefile.ne12bsd b/src/3rdparty/libpng/scripts/makefile.ne12bsd
deleted file mode 100644
index acf9c3c..0000000
--- a/src/3rdparty/libpng/scripts/makefile.ne12bsd
+++ /dev/null
@@ -1,46 +0,0 @@
-# makefile for libpng for NetBSD for the standard
-# make obj && make depend && make && make test
-# make includes && make install
-# Copyright (C) 2002 Patrick R.L. Welche
-# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# You should also run makefile.netbsd
-
-LOCALBASE?=/usr/local
-LIBDIR= ${LOCALBASE}/lib
-MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include/libpng14
-
-LIB= png14
-SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.4.0
-SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
- pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
- pngwtran.c pngmem.c pngerror.c pngpread.c
-INCS= png.h pngconf.h
-MAN= libpng.3 libpngpf.3 png.5
-
-CPPFLAGS+=-I${.CURDIR}
-
-# We should be able to do something like this instead of the manual
-# uncommenting, but it core dumps for me at the moment:
-# .if ${MACHINE_ARCH} == "i386"
-# MKLINT= no
-# .endif
-
-CLEANFILES+=pngtest.o pngtest
-
-pngtest.o: pngtest.c
- ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
-
-pngtest: pngtest.o libpng.a
- ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
-
-test: pngtest
- cd ${.CURDIR} && ${.OBJDIR}/pngtest
-
-.include <bsd.lib.mk>
diff --git a/src/3rdparty/libpng/scripts/makefile.netbsd b/src/3rdparty/libpng/scripts/makefile.netbsd
deleted file mode 100644
index ef470f8..0000000
--- a/src/3rdparty/libpng/scripts/makefile.netbsd
+++ /dev/null
@@ -1,46 +0,0 @@
-# makefile for libpng for NetBSD for the standard
-# make obj && make depend && make && make test
-# make includes && make install
-# Copyright (C) 2002 Patrick R.L. Welche
-# Copyright (C) 2007-2009 Glenn Randers-Pehrson
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# You should also run makefile.ne14bsd
-
-LOCALBASE?=/usr/local
-LIBDIR= ${LOCALBASE}/lib
-MANDIR= ${LOCALBASE}/man
-INCSDIR=${LOCALBASE}/include
-
-LIB= png
-SHLIB_MAJOR= 3
-SHLIB_MINOR= 1.4.0
-SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
- pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
- pngwtran.c pngmem.c pngerror.c pngpread.c
-INCS= png.h pngconf.h
-MAN= libpng.3 libpngpf.3 png.5
-
-CPPFLAGS+=-I${.CURDIR}
-
-# We should be able to do something like this instead of the manual
-# uncommenting, but it core dumps for me at the moment:
-# .if ${MACHINE_ARCH} == "i386"
-# MKLINT= no
-# .endif
-
-CLEANFILES+=pngtest.o pngtest
-
-pngtest.o: pngtest.c
- ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
-
-pngtest: pngtest.o libpng.a
- ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
-
-test: pngtest
- cd ${.CURDIR} && ${.OBJDIR}/pngtest
-
-.include <bsd.lib.mk>
diff --git a/src/3rdparty/libpng/scripts/makefile.openbsd b/src/3rdparty/libpng/scripts/makefile.openbsd
deleted file mode 100644
index c924284..0000000
--- a/src/3rdparty/libpng/scripts/makefile.openbsd
+++ /dev/null
@@ -1,76 +0,0 @@
-# makefile for libpng
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-# Copyright (C) 2007-2009 Glenn Randers-Pehrson
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-PREFIX?= /usr/local
-LIBDIR= ${PREFIX}/lib
-MANDIR= ${PREFIX}/man/cat
-
-SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.4.0
-
-LIB= png
-SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
- pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
- pngwio.c pngwrite.c pngwtran.c pngwutil.c
-
-HDRS= png.h pngconf.h
-
-CFLAGS+= -W -Wall
-CPPFLAGS+= -I${.CURDIR}
-
-NOPROFILE= Yes
-
-CLEANFILES+= pngtest.o pngtest
-
-MAN= libpng.3 libpngpf.3 png.5
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO libpng.txt
-
-pngtest.o: pngtest.c
- ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
-
-pngtest: pngtest.o
- ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
-
-test: pngtest
- cd ${.OBJDIR} && env \
- LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
-
-beforeinstall:
- if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \
- fi
- if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
- fi
- if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
- fi
- if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
- fi
- if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
- fi
- if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
- ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
- fi
-
-afterinstall:
- @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
- @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
- @rm -f ${DESTDIR}${PREFIX}/include/png.h
- @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
- @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
- ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
- -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
- ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
- -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
- ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
- -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png
-
-.include <bsd.lib.mk>
diff --git a/src/3rdparty/libpng/scripts/makefile.os2 b/src/3rdparty/libpng/scripts/makefile.os2
deleted file mode 100644
index affb03c..0000000
--- a/src/3rdparty/libpng/scripts/makefile.os2
+++ /dev/null
@@ -1,72 +0,0 @@
-# makefile for libpng on OS/2 with gcc
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Related files: pngos2.def
-
-CC=gcc -Zomf -s
-
-# Where the zlib library and include files are located
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) -W -Wall -O6 -funroll-loops -malign-loops=2 \
- -malign-functions=2 #$(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lzdll -Zcrtdll
-AR=emxomfar
-
-PNGLIB=png.lib
-IMPLIB=emximp
-SHAREDLIB=png.dll
-SHAREDLIBIMP=pngdll.lib
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-.SUFFIXES: .c .o
-
-all: $(PNGLIB) $(SHAREDLIB) $(SHAREDLIBIMP)
-
-$(PNGLIB): $(OBJS)
- $(AR) rc $@ $(OBJS)
-
-$(SHAREDLIB): $(OBJS) pngos2.def
- $(CC) $(LDFLAGS) -Zdll -o $@ $^
-
-$(SHAREDLIBIMP): pngos2.def
- $(IMPLIB) -o $@ $^
-
-pngtest.exe: pngtest.o png.dll pngdll.lib
- $(CC) -o $@ $(CFLAGS) $< $(LDFLAGS)
-
-test: pngtest.exe
- ./pngtest.exe
-
-clean:
- rm -f *.o $(PNGLIB) png.dll pngdll.lib pngtest.exe pngout.png
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sco b/src/3rdparty/libpng/scripts/makefile.sco
deleted file mode 100644
index 22bb976..0000000
--- a/src/3rdparty/libpng/scripts/makefile.sco
+++ /dev/null
@@ -1,232 +0,0 @@
-# makefile for SCO OSr5 ELF and Unixware 7 with Native cc
-# Contributed by Mike Hopkirk (hops@sco.com) modified from Makefile.lnx
-# force ELF build dynamic linking, SONAME setting in lib and RPATH in app
-# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-CC=cc
-AR_RC=ar rc
-MKDIR_P=mkdir
-LN_SF=ln -f -s
-RANLIB=echo
-RM_F=/bin/rm -f
-
-# where make install puts libpng.a, $(OLDSO)*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-CFLAGS= -dy -belf -I$(ZLIBINC) -O3
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng14 -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"-belf\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- $(CC) -G -Wl,-h,$(LIBSOMAJ) -o $(LIBSOVER) \
- $(OBJSDLL)
-
-$(OLDSOVER): $(OBJSDLL)
- $(CC) -G -Wl,-h,$(OLDSOMAJ) -o $(OLDSOVER) \
- $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- LD_RUN_PATH=.:$(ZLIBLIB) $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- -@$(RM_F) $(DI)/png.h
- -@$(RM_F) $(DI)/pngconf.h
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) $(CFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- $(CC) $(CFLAGS) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngout.png libpng-config \
- $(LIBSO) $(LIBSOMAJ)* pngtest-static pngtesti \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sggcc b/src/3rdparty/libpng/scripts/makefile.sggcc
deleted file mode 100644
index bcc9d01..0000000
--- a/src/3rdparty/libpng/scripts/makefile.sggcc
+++ /dev/null
@@ -1,243 +0,0 @@
-# makefile for libpng.a and libpng14.so, SGI IRIX with 'cc'
-# Copyright (C) 2001-2002, 2006 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME=libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=gcc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=echo
-RM_F=/bin/rm -f
-
-# Where make install puts libpng.a, libpng14.so, and libpng14/png.h
-# Prefix must be a full pathname.
-
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib32
-#ZLIBINC=/usr/local/include
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
-# See "man abi". zlib must be built with the same ABI.
-ABI=
-
-WARNMORE= # -g -DPNG_DEBUG=5
-CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE) -fPIC -mabi=n32
-LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
-LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
- -set_version sgi$(PNGMAJ).0
-LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \
- -set_version sgi$3.0
-# See "man dso" for info about shared objects
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-#LIBPATH=$(exec_prefix)/lib32
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest shared libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-shared: $(LIBSOVER)
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"$(ABI)\"; \
- echo cppflags=\"\"; \
- echo ldopts=\"$(ABI)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libdir=\"$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJS)
- $(LDSHARED) -o $@ $(OBJS)
- $(RM_F) $(LIBSO) $(LIBSOMAJ)
-
-$(OLDSOVER): $(OBJS)
- $(LDLEGACY) -o $@ $(OBJS)
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- echo
- echo Testing local static library.
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -rpath $(ZLIBLIB):$(DL) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) libpng.a pngtest pngtesti pngout.png libpng.pc \
- so_locations libpng-config $(LIBSO) $(LIBSOMAJ)* $(OLDSOVER)
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sgi b/src/3rdparty/libpng/scripts/makefile.sgi
deleted file mode 100644
index c7550f1..0000000
--- a/src/3rdparty/libpng/scripts/makefile.sgi
+++ /dev/null
@@ -1,247 +0,0 @@
-# makefile for libpng.a and libpng14.so, SGI IRIX with 'cc'
-# Copyright (C) 2001-2002, 2006, 2007 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME=libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=cc
-MKDIR_P=mkdir -p
-LN_SF=ln -sf
-RANLIB=echo
-RM_F=/bin/rm -f
-
-# Where make install puts libpng.a, libpng14.so, and libpng14/png.h
-# Prefix must be a full pathname.
-
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib32
-#ZLIBINC=/usr/local/include
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-# ABI can be blank to use default for your system, -32, -o32, -n32, or -64
-# See "man abi". zlib must be built with the same ABI.
-ABI=
-
-WARNMORE=-fullwarn
-# Note: -KPIC is the default anyhow
-#CFLAGS= $(ABI) -I$(ZLIBINC) -O $(WARNMORE) -KPIC # -g -DPNG_DEBUG=5
-CFLAGS=$(ABI) -I$(ZLIBINC) -O $(WARNMORE)
-LDFLAGS_A=$(ABI) -L. -L$(ZLIBLIB) -lpng14 -lz -lm
-LDFLAGS=$(ABI) -L. -L$(ZLIBLIB) -lpng -lz -lm
-LDSHARED=cc $(ABI) -shared -soname $(LIBSOMAJ) \
- -set_version sgi$(PNGMAJ).0
-LDLEGACY=cc $(ABI) -shared -soname $(OLDSOMAJ) \
- -set_version sgi$3.0
-# See "man dso" for info about shared objects
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-#LIBPATH=$(exec_prefix)/lib32
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest shared libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-shared: $(LIBSOVER)
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo ccopts=\"$(ABI)\"; \
- echo ldopts=\"$(ABI)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo libdir=\"$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJS)
- $(LDSHARED) -o $@ $(OBJS)
- $(RM_F) $(LIBSO) $(LIBSOMAJ)
-
-$(OLDSOVER): $(OBJS)
- $(LDLEGACY) -o $@ $(OBJS)
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- echo
- echo Testing local static library.
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(DL) -L$(ZLIBLIB) \
- -rpath $(ZLIBLIB):$(DL) \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -L$(ZLIBLIB) \
- -rpath $(ZLIBLIB):`$(BINPATH)/$(LIBNAME)-config --libdir` \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags`
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png libpng.pc libpng-config \
- $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- so_locations
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.so9 b/src/3rdparty/libpng/scripts/makefile.so9
deleted file mode 100644
index fb09b9e..0000000
--- a/src/3rdparty/libpng/scripts/makefile.so9
+++ /dev/null
@@ -1,254 +0,0 @@
-# makefile for libpng on Solaris 9 (beta) with Forte cc
-# Updated by Chad Schrock for Solaris 9
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 2002, 2006, 2008 Glenn Randers-Pehrson
-# Copyright (C) 1998-2001 Greg Roelofs
-# Copyright (C) 1996-1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-LIBNAME = libpng14
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-# gcc 2.95 doesn't work.
-CC=cc
-AR_RC=ar rc
-MKDIR_P=mkdir -p
-LN_SF=ln -f -s
-RANLIB=echo
-RM_F=/bin/rm -f
-
-# Where make install puts libpng.a, $(OLDSO)*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk. If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-#Use the preinstalled zlib that comes with Solaris 9:
-ZLIBLIB=/usr/lib
-ZLIBINC=/usr/include
-
-#WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-#CFLAGS=-I$(ZLIBINC) -W -Wall -O3 $(WARNMORE) -g -DPNG_DEBUG=5 -DPNG_NO_MMX_CODE
-CFLAGS=-I$(ZLIBINC) -O3 -DPNG_NO_MMX_CODE
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -KPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- @case "`type ld`" in *ucb*) \
- echo; \
- echo '## WARNING:'; \
- echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
- echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
- echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
- echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
- echo '## at all. If it is, things are likely to break because of'; \
- echo '## the libucb dependency that is created.'; \
- echo; \
- ;; \
- esac
- $(LD) -G -h $(LIBSOMAJ) \
- -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJS)
- $(LD) -G -h $(OLDSOMAJ) \
- -o $(OLDSOVER) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ); \
- $(LN_SF) $(LIBSOMAJ) $(LIBSO))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.solaris b/src/3rdparty/libpng/scripts/makefile.solaris
deleted file mode 100644
index 6c4adfc..0000000
--- a/src/3rdparty/libpng/scripts/makefile.solaris
+++ /dev/null
@@ -1,251 +0,0 @@
-# makefile for libpng on Solaris 2.x with gcc
-# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=gcc
-MKDIR_P=mkdir -p
-LN_SF=ln -f -s
-RANLIB=echo
-RM_F=/bin/rm -f
-
-# Where make install puts libpng.a, libpng14.so*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk. If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ZLIBLIB=/usr/local/lib
-ZLIBINC=/usr/local/include
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) -W -Wall -O \
- # $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo cppflags=\"\"; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- @case "`type ld`" in *ucb*) \
- echo; \
- echo '## WARNING:'; \
- echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
- echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
- echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
- echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
- echo '## at all. If it is, things are likely to break because of'; \
- echo '## the libucb dependency that is created.'; \
- echo; \
- ;; \
- esac
- $(LD) -G -h $(LIBSOMAJ) \
- -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJS)
- $(LD) -G -h $(OLDSOMAJ) \
- -o $(OLDSOVER) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.solaris-x86 b/src/3rdparty/libpng/scripts/makefile.solaris-x86
deleted file mode 100644
index 8ee7be1..0000000
--- a/src/3rdparty/libpng/scripts/makefile.solaris-x86
+++ /dev/null
@@ -1,251 +0,0 @@
-# makefile for libpng on Solaris 2.x with gcc
-# Copyright (C) 2004, 2006-2008 Glenn Randers-Pehrson
-# Contributed by William L. Sebok, based on makefile.linux
-# Copyright (C) 1998 Greg Roelofs
-# Copyright (C) 1996, 1997 Andreas Dilger
-
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# Library name:
-LIBNAME = libpng14
-PNGMAJ = 14
-PNGMIN = 1.4.0
-PNGVER = $(PNGMAJ).$(PNGMIN)
-
-# Shared library names:
-LIBSO=$(LIBNAME).so
-LIBSOMAJ=$(LIBNAME).so.$(PNGMAJ)
-LIBSOVER=$(LIBNAME).so.$(PNGVER)
-OLDSO=libpng.so
-OLDSOMAJ=libpng.so.14
-OLDSOVER=libpng.so.14.$(PNGMIN)
-
-# Utilities:
-AR_RC=ar rc
-CC=gcc
-MKDIR_P=mkdir -p
-LN_SF=ln -f -s
-RANLIB=echo
-RM_F=/bin/rm -f
-
-# Where make install puts libpng.a, libpng14.so*, and png.h
-prefix=/usr/local
-exec_prefix=$(prefix)
-
-# Where the zlib library and include files are located
-# Changing these to ../zlib poses a security risk. If you want
-# to have zlib in an adjacent directory, specify the full path instead of "..".
-#ZLIBLIB=../zlib
-#ZLIBINC=../zlib
-
-ZLIBLIB=/usr/local/lib
-ZLIBINC=/usr/local/include
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes #-Wconversion
-CFLAGS=-I$(ZLIBINC) -W -Wall -O \
- # $(WARNMORE) -g -DPNG_DEBUG=5
-LDFLAGS=-L. -R. -L$(ZLIBLIB) -R$(ZLIBLIB) -lpng14 -lz -lm
-
-INCPATH=$(prefix)/include
-LIBPATH=$(exec_prefix)/lib
-MANPATH=$(prefix)/man
-BINPATH=$(exec_prefix)/bin
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-DB=$(DESTDIR)$(BINPATH)
-DI=$(DESTDIR)$(INCPATH)
-DL=$(DESTDIR)$(LIBPATH)
-DM=$(DESTDIR)$(MANPATH)
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-OBJSDLL = $(OBJS:.o=.pic.o)
-
-.SUFFIXES: .c .o .pic.o
-
-.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
-
-all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-libpng.pc:
- cat scripts/libpng.pc.in | sed -e s!@prefix@!$(prefix)! \
- -e s!@exec_prefix@!$(exec_prefix)! \
- -e s!@libdir@!$(LIBPATH)! \
- -e s!@includedir@!$(INCPATH)! \
- -e s!-lpng14!-lpng14\ -lz\ -lm! > libpng.pc
-
-libpng-config:
- ( cat scripts/libpng-config-head.in; \
- echo prefix=\"$(prefix)\"; \
- echo I_opts=\"-I$(INCPATH)/$(LIBNAME)\"; \
- echo cppflags=\""; \
- echo L_opts=\"-L$(LIBPATH)\"; \
- echo R_opts=\"-R$(LIBPATH)\"; \
- echo libs=\"-lpng14 -lz -lm\"; \
- cat scripts/libpng-config-body.in ) > libpng-config
- chmod +x libpng-config
-
-$(LIBSO): $(LIBSOMAJ)
- $(LN_SF) $(LIBSOMAJ) $(LIBSO)
-
-$(LIBSOMAJ): $(LIBSOVER)
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ)
-
-$(LIBSOVER): $(OBJSDLL)
- @case "`type ld`" in *ucb*) \
- echo; \
- echo '## WARNING:'; \
- echo '## The commands "CC" and "LD" must NOT refer to /usr/ucb/cc'; \
- echo '## and /usr/ucb/ld. If they do, you need to adjust your PATH'; \
- echo '## environment variable to put /usr/ccs/bin ahead of /usr/ucb.'; \
- echo '## The environment variable LD_LIBRARY_PATH should not be set'; \
- echo '## at all. If it is, things are likely to break because of'; \
- echo '## the libucb dependency that is created.'; \
- echo; \
- ;; \
- esac
- $(LD) -G -h $(LIBSOMAJ) \
- -o $(LIBSOVER) $(OBJSDLL)
-
-$(OLDSOVER): $(OBJS)
- $(LD) -G -h $(OLDSOMAJ) \
- -o $(OLDSOVER) $(OBJSDLL)
-
-pngtest: pngtest.o $(LIBSO)
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install-headers: png.h pngconf.h
- -@if [ ! -d $(DI) ]; then $(MKDIR_P) $(DI); fi
- -@if [ ! -d $(DI)/$(LIBNAME) ]; then $(MKDIR_P) $(DI)/$(LIBNAME); fi
- cp png.h pngconf.h $(DI)/$(LIBNAME)
- chmod 644 $(DI)/$(LIBNAME)/png.h $(DI)/$(LIBNAME)/pngconf.h
- -@$(RM_F) $(DI)/png.h $(DI)/pngconf.h
- -@$(RM_F) $(DI)/libpng
- (cd $(DI); $(LN_SF) $(LIBNAME) libpng; $(LN_SF) $(LIBNAME)/* .)
-
-install-static: install-headers libpng.a
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- cp libpng.a $(DL)/$(LIBNAME).a
- chmod 644 $(DL)/$(LIBNAME).a
- -@$(RM_F) $(DL)/libpng.a
- (cd $(DL); $(LN_SF) $(LIBNAME).a libpng.a)
-
-install-shared: install-headers $(LIBSOVER) libpng.pc \
- $(OLDSOVER)
- -@if [ ! -d $(DL) ]; then $(MKDIR_P) $(DL); fi
- -@$(RM_F) $(DL)/$(LIBSOVER)* $(DL)/$(LIBSO)
- -@$(RM_F) $(DL)/$(LIBSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSO)
- -@$(RM_F) $(DL)/$(OLDSOMAJ)
- -@$(RM_F) $(DL)/$(OLDSOVER)*
- cp $(LIBSOVER) $(DL)
- cp $(OLDSOVER) $(DL)
- chmod 755 $(DL)/$(LIBSOVER)
- chmod 755 $(DL)/$(OLDSOVER)
- (cd $(DL); \
- $(LN_SF) $(OLDSOVER) $(OLDSOMAJ); \
- $(LN_SF) $(OLDSOMAJ) $(OLDSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSO); \
- $(LN_SF) $(LIBSOVER) $(LIBSOMAJ))
- -@if [ ! -d $(DL)/pkgconfig ]; then $(MKDIR_P) $(DL)/pkgconfig; fi
- -@$(RM_F) $(DL)/pkgconfig/$(LIBNAME).pc
- -@$(RM_F) $(DL)/pkgconfig/libpng.pc
- cp libpng.pc $(DL)/pkgconfig/$(LIBNAME).pc
- chmod 644 $(DL)/pkgconfig/$(LIBNAME).pc
- (cd $(DL)/pkgconfig; $(LN_SF) $(LIBNAME).pc libpng.pc)
-
-install-man: libpng.3 libpngpf.3 png.5
- -@if [ ! -d $(DM) ]; then $(MKDIR_P) $(DM); fi
- -@if [ ! -d $(DM)/man3 ]; then $(MKDIR_P) $(DM)/man3; fi
- -@$(RM_F) $(DM)/man3/libpng.3
- -@$(RM_F) $(DM)/man3/libpngpf.3
- cp libpng.3 $(DM)/man3
- cp libpngpf.3 $(DM)/man3
- -@if [ ! -d $(DM)/man5 ]; then $(MKDIR_P) $(DM)/man5; fi
- -@$(RM_F) $(DM)/man5/png.5
- cp png.5 $(DM)/man5
-
-install-config: libpng-config
- -@if [ ! -d $(DB) ]; then $(MKDIR_P) $(DB); fi
- -@$(RM_F) $(DB)/libpng-config
- -@$(RM_F) $(DB)/$(LIBNAME)-config
- cp libpng-config $(DB)/$(LIBNAME)-config
- chmod 755 $(DB)/$(LIBNAME)-config
- (cd $(DB); $(LN_SF) $(LIBNAME)-config libpng-config)
-
-install: install-static install-shared install-man install-config
-
-# If you installed in $(DESTDIR), test-installed won't work until you
-# move the library to its final location. Use test-dd to test it
-# before then.
-
-test-dd:
- echo
- echo Testing installed dynamic shared library in $(DL).
- $(CC) -I$(DI) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtestd `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(DL) -L$(ZLIBLIB) -R$(ZLIBLIB) -R$(DL)
- ./pngtestd pngtest.png
-
-test-installed:
- echo
- echo Testing installed dynamic shared library.
- $(CC) -I$(ZLIBINC) \
- `$(BINPATH)/$(LIBNAME)-config --cflags` pngtest.c \
- -o pngtesti `$(BINPATH)/$(LIBNAME)-config --ldflags` \
- -L$(ZLIBLIB) -R$(ZLIBLIB)
- ./pngtesti pngtest.png
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngtesti pngout.png \
- libpng-config $(LIBSO) $(LIBSOMAJ)* \
- $(OLDSOVER) \
- libpng.pc
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o png.pic.o: png.h pngconf.h pngpriv.h
-pngerror.o pngerror.pic.o: png.h pngconf.h pngpriv.h
-pngrio.o pngrio.pic.o: png.h pngconf.h pngpriv.h
-pngwio.o pngwio.pic.o: png.h pngconf.h pngpriv.h
-pngmem.o pngmem.pic.o: png.h pngconf.h pngpriv.h
-pngset.o pngset.pic.o: png.h pngconf.h pngpriv.h
-pngget.o pngget.pic.o: png.h pngconf.h pngpriv.h
-pngread.o pngread.pic.o: png.h pngconf.h pngpriv.h
-pngrtran.o pngrtran.pic.o: png.h pngconf.h pngpriv.h
-pngrutil.o pngrutil.pic.o: png.h pngconf.h pngpriv.h
-pngtrans.o pngtrans.pic.o: png.h pngconf.h pngpriv.h
-pngwrite.o pngwrite.pic.o: png.h pngconf.h pngpriv.h
-pngwtran.o pngwtran.pic.o: png.h pngconf.h pngpriv.h
-pngwutil.o pngwutil.pic.o: png.h pngconf.h pngpriv.h
-pngpread.o pngpread.pic.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.std b/src/3rdparty/libpng/scripts/makefile.std
deleted file mode 100644
index afb885a..0000000
--- a/src/3rdparty/libpng/scripts/makefile.std
+++ /dev/null
@@ -1,95 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-CC=cc
-AR_RC=ar rc
-MKDIR_P=mkdir
-LN_SF=ln -sf
-RANLIB=ranlib
-RM_F=rm -f
-
-CFLAGS=-I$(ZLIBINC) -O # -g -DPNG_DEBUG=5
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install: libpng.a
- -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
- -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
- -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
- -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
- -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- (cd $(DESTDIR)$(INCPATH); ln -f -s libpng/* .)
- cp libpng.a $(DESTDIR)$(LIBPATH)
- chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngout.png
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.sunos b/src/3rdparty/libpng/scripts/makefile.sunos
deleted file mode 100644
index 984379c..0000000
--- a/src/3rdparty/libpng/scripts/makefile.sunos
+++ /dev/null
@@ -1,100 +0,0 @@
-# makefile for libpng
-# Copyright (C) 2002, 2006 Glenn Randers-Pehrson
-# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# where make install puts libpng.a and png.h
-prefix=/usr/local
-INCPATH=$(prefix)/include
-LIBPATH=$(prefix)/lib
-
-# override DESTDIR= on the make install command line to easily support
-# installing into a temporary location. Example:
-#
-# make install DESTDIR=/tmp/build/libpng
-#
-# If you're going to install into a temporary location
-# via DESTDIR, $(DESTDIR)$(prefix) must already exist before
-# you execute make install.
-DESTDIR=
-
-# Where the zlib library and include files are located
-#ZLIBLIB=/usr/local/lib
-#ZLIBINC=/usr/local/include
-ZLIBLIB=../zlib
-ZLIBINC=../zlib
-
-
-WARNMORE=-Wwrite-strings -Wpointer-arith -Wshadow -Wconversion \
- -Wmissing-declarations -Wtraditional -Wcast-align \
- -Wstrict-prototypes -Wmissing-prototypes
-
-CC=gcc
-AR_RC=ar rc
-MKDIR_P=mkdir -p
-LN_SF=ln -f -s
-RANLIB=ranlib
-RM_F=/bin/rm -f
-
-CFLAGS=-I$(ZLIBINC) -O # $(WARNMORE) -DPNG_DEBUG=5
-LDFLAGS=-L. -L$(ZLIBLIB) -lpng -lz -lm
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o \
- pngread.o pngrio.o pngwio.o pngwrite.o pngrtran.o \
- pngwtran.o pngmem.o pngerror.o pngpread.o
-
-all: libpng.a pngtest
-
-libpng.a: $(OBJS)
- $(AR_RC) $@ $(OBJS)
- $(RANLIB) $@
-
-pngtest: pngtest.o libpng.a
- $(CC) -o pngtest $(CFLAGS) pngtest.o $(LDFLAGS)
-
-test: pngtest
- ./pngtest
-
-install: libpng.a
- -@$(MKDIR_P) $(DESTDIR)$(INCPATH)
- -@$(MKDIR_P) $(DESTDIR)$(INCPATH)/libpng
- -@$(MKDIR_P) $(DESTDIR)$(LIBPATH)
- -@$(RM_F) $(DESTDIR)$(INCPATH)/png.h
- -@$(RM_F) $(DESTDIR)$(INCPATH)/pngconf.h
- cp png.h $(DESTDIR)$(INCPATH)/libpng
- cp pngconf.h $(DESTDIR)$(INCPATH)/libpng
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/png.h
- chmod 644 $(DESTDIR)$(INCPATH)/libpng/pngconf.h
- (cd $(DESTDIR)$(INCPATH); $(LN_SF) libpng/* .)
- cp libpng.a $(DESTDIR)$(LIBPATH)
- chmod 644 $(DESTDIR)$(LIBPATH)/libpng.a
-
-clean:
- $(RM_F) *.o libpng.a pngtest pngout.png
-
-DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
-writelock:
- chmod a-w *.[ch35] $(DOCS) scripts/*
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-png.o: png.h pngconf.h pngpriv.h
-pngerror.o: png.h pngconf.h pngpriv.h
-pngrio.o: png.h pngconf.h pngpriv.h
-pngwio.o: png.h pngconf.h pngpriv.h
-pngmem.o: png.h pngconf.h pngpriv.h
-pngset.o: png.h pngconf.h pngpriv.h
-pngget.o: png.h pngconf.h pngpriv.h
-pngread.o: png.h pngconf.h pngpriv.h
-pngrtran.o: png.h pngconf.h pngpriv.h
-pngrutil.o: png.h pngconf.h pngpriv.h
-pngtrans.o: png.h pngconf.h pngpriv.h
-pngwrite.o: png.h pngconf.h pngpriv.h
-pngwtran.o: png.h pngconf.h pngpriv.h
-pngwutil.o: png.h pngconf.h pngpriv.h
-pngpread.o: png.h pngconf.h pngpriv.h
-
-pngtest.o: png.h pngconf.h
diff --git a/src/3rdparty/libpng/scripts/makefile.tc3 b/src/3rdparty/libpng/scripts/makefile.tc3
deleted file mode 100644
index bf6ade6..0000000
--- a/src/3rdparty/libpng/scripts/makefile.tc3
+++ /dev/null
@@ -1,89 +0,0 @@
-# Makefile for libpng
-# TurboC/C++ (Note: All modules are compiled in C mode)
-
-# To use, do "make -fmakefile.tc3"
-
-# ----- Turbo C 3.00 (can be modified to work with earlier versions) -----
-
-MODEL=l
-CFLAGS=-O2 -Z -m$(MODEL) -I..\zlib
-#CFLAGS=-D_NO_PROTO -O2 -Z -m$(MODEL) -I..\zlib # Turbo C older than 3.00
-CC=tcc
-LD=tcc
-LIB=tlib
-LDFLAGS=-m$(MODEL) -L..\zlib
-O=.obj
-E=.exe
-
-# variables
-OBJS1 = png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
-OBJS2 = pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
-OBJS3 = pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
-OBJSL1 = +png$(O) +pngset$(O) +pngget$(O) +pngrutil$(O) +pngtrans$(O)
-OBJSL2 = +pngwutil$(O) +pngmem$(O) +pngpread$(O) +pngread$(O) +pngerror$(O)
-OBJSL3 = +pngwrite$(O) +pngrtran$(O) +pngwtran$(O) +pngrio$(O) +pngwio$(O)
-
-all: libpng$(MODEL).lib pngtest$(E)
-
-pngtest: pngtest$(E)
-
-test: pngtest$(E)
- pngtest$(E)
-
-png$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngset$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngget$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngread$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngpread$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngrtran$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngrutil$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngerror$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngmem$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngrio$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngwio$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngtest$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngtrans$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngwrite$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngwtran$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-pngwutil$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c
-
-libpng$(MODEL).lib: $(OBJS1) $(OBJS2) $(OBJS3)
- $(LIB) libpng$(MODEL) +$(OBJSL1)
- $(LIB) libpng$(MODEL) +$(OBJSL2)
- $(LIB) libpng$(MODEL) +$(OBJSL3)
-
-pngtest$(E): pngtest$(O) libpng$(MODEL).lib
- $(LD) $(LDFLAGS) pngtest.obj libpng$(MODEL).lib zlib_$(MODEL).lib
-
-# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makefile.vcwin32 b/src/3rdparty/libpng/scripts/makefile.vcwin32
deleted file mode 100644
index a65f1c1..0000000
--- a/src/3rdparty/libpng/scripts/makefile.vcwin32
+++ /dev/null
@@ -1,103 +0,0 @@
-# makefile for libpng
-# Copyright (C) 1998 Tim Wegner
-# Copyright (C) 2006,2009 Glenn Randers-Pehrson
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-#
-# Assumes that zlib.lib, zconf.h, and zlib.h have been copied to ..\zlib
-# To use, do "nmake /f scripts\makefile.vcwin32"
-
-# -------- Microsoft Visual C++ 2.0 and later, no assembler code --------
-
-# Compiler, linker, librarian, and other tools
-CC = cl
-LD = link
-AR = lib
-CFLAGS = -nologo -MD -O2 -W3 -I..\zlib
-LDFLAGS = -nologo
-ARFLAGS = -nologo
-RM = del
-
-# File extensions
-O=.obj
-
-#uncomment next to put error messages in a file
-#ERRFILE= >> pngerrs.log
-
-# Variables
-OBJS1 = png$(O) pngerror$(O) pngget$(O) pngmem$(O) pngpread$(O)
-OBJS2 = pngread$(O) pngrio$(O) pngrtran$(O) pngrutil$(O) pngset$(O)
-OBJS3 = pngtrans$(O) pngwio$(O) pngwrite$(O) pngwtran$(O) pngwutil$(O)
-OBJS = $(OBJS1) $(OBJS2) $(OBJS3)
-
-# Targets
-all: libpng.lib
-
-png$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h pngpriv.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS)
- -$(RM) $@
- $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
- $(CC) -c $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest.exe: pngtest$(O) libpng.lib
- $(LD) $(LDFLAGS) -out:$@ pngtest$(O) libpng.lib ..\zlib\zlib.lib $(ERRFILE)
-
-test: pngtest.exe
- pngtest
-
-clean:
- -$(RM) *$(O)
- -$(RM) libpng.lib
- -$(RM) pngtest.exe
- -$(RM) pngout.png
-
-# End of makefile for libpng
-
diff --git a/src/3rdparty/libpng/scripts/makefile.watcom b/src/3rdparty/libpng/scripts/makefile.watcom
deleted file mode 100644
index db4d534..0000000
--- a/src/3rdparty/libpng/scripts/makefile.watcom
+++ /dev/null
@@ -1,112 +0,0 @@
-# Makefile for libpng
-# Watcom C/C++ 10.0 and later, 32-bit protected mode, flat memory model
-
-# Copyright (C) 2000, Pawel Mrochen, based on makefile.msc which is
-# copyright 1995 Guy Eric Schalnat, Group 42, Inc.
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-# To use, do "wmake /f scripts\makefile.watcom"
-
-
-# ---------------------- Watcom C/C++ 10.0 and later -----------------------
-
-# Where the zlib library and include files are located
-ZLIBLIB=..\zlib
-ZLIBINC=..\zlib
-
-# Target OS
-OS=DOS
-#OS=NT
-
-# Target CPU
-CPU=6 # Pentium Pro
-#CPU=5 # Pentium
-
-# Calling convention
-CALLING=r # registers
-#CALLING=s # stack
-
-# Uncomment next to put error messages in a file
-#ERRFILE=>>pngerrs
-
-# --------------------------------------------------------------------------
-
-
-CC=wcc386
-CFLAGS=-$(CPU)$(CALLING) -fp$(CPU) -fpi87 -oneatx -mf -bt=$(OS) -i=$(ZLIBINC) -zq
-LD=wcl386
-LDFLAGS=-zq
-
-O=.obj
-
-OBJS1=png$(O) pngset$(O) pngget$(O) pngrutil$(O) pngtrans$(O) pngwutil$(O)
-OBJS2=pngmem$(O) pngpread$(O) pngread$(O) pngerror$(O) pngwrite$(O)
-OBJS3=pngrtran$(O) pngwtran$(O) pngrio$(O) pngwio$(O)
-
-
-all: test
-
-png$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngset$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngget$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngread$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngpread$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrtran$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrutil$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngerror$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngmem$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngrio$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwio$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtest$(O): png.h pngconf.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngtrans$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwrite$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwtran$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-pngwutil$(O): png.h pngconf.h pngpriv.h
- $(CC) $(CFLAGS) $*.c $(ERRFILE)
-
-libpng.lib: $(OBJS1) $(OBJS2) $(OBJS3)
- wlib -b -c -n -q libpng.lib $(OBJS1)
- wlib -b -c -q libpng.lib $(OBJS2)
- wlib -b -c -q libpng.lib $(OBJS3)
-
-pngtest.exe: pngtest.obj libpng.lib
- $(LD) $(LDFLAGS) pngtest.obj libpng.lib $(ZLIBLIB)\zlib.lib
-
-test: pngtest.exe .symbolic
- pngtest.exe
-
-
-# End of makefile for libpng
diff --git a/src/3rdparty/libpng/scripts/makevms.com b/src/3rdparty/libpng/scripts/makevms.com
deleted file mode 100644
index 2fa9d0d..0000000
--- a/src/3rdparty/libpng/scripts/makevms.com
+++ /dev/null
@@ -1,142 +0,0 @@
-$! make libpng under VMS
-$!
-$!
-$! Check for MMK/MMS
-$!
-$! This procedure accepts one parameter (contrib), which causes it to build
-$! the programs from the contrib directory instead of libpng.
-$!
-$ p1 = f$edit(p1,"UPCASE")
-$ if p1 .eqs. "CONTRIB"
-$ then
-$ set def [.contrib.gregbook]
-$ @makevms
-$ set def [-.pngminus]
-$ @makevms
-$ set def [--]
-$ exit
-$ endif
-$ Make = ""
-$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
-$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
-$!
-$! Look for the compiler used
-$!
-$ zlibsrc = "[-.zlib]"
-$ ccopt="/include=''zlibsrc'"
-$ if f$getsyi("HW_MODEL").ge.1024
-$ then
-$ ccopt = "/prefix=all"+ccopt
-$ comp = "__decc__=1"
-$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ else
-$ if f$search("SYS$SYSTEM:DECC$COMPILER.EXE").eqs.""
-$ then
-$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ if f$search("SYS$SYSTEM:VAXC.EXE").eqs.""
-$ then
-$ comp = "__gcc__=1"
-$ CC :== GCC
-$ else
-$ comp = "__vaxc__=1"
-$ endif
-$ else
-$ if f$trnlnm("SYS").eqs."" then define sys decc$library_include:
-$ ccopt = "/decc/prefix=all"+ccopt
-$ comp = "__decc__=1"
-$ endif
-$ endif
-$!
-$! Build the thing plain or with mms/mmk
-$!
-$ write sys$output "Compiling Libpng sources ..."
-$ if make.eqs.""
-$ then
-$ dele pngtest.obj;*
-$ CALL MAKE png.OBJ "cc ''CCOPT' png" -
- png.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngset.OBJ "cc ''CCOPT' pngset" -
- pngset.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngget.OBJ "cc ''CCOPT' pngget" -
- pngget.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngread.OBJ "cc ''CCOPT' pngread" -
- pngread.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngpread.OBJ "cc ''CCOPT' pngpread" -
- pngpread.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngrtran.OBJ "cc ''CCOPT' pngrtran" -
- pngrtran.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngrutil.OBJ "cc ''CCOPT' pngrutil" -
- pngrutil.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngerror.OBJ "cc ''CCOPT' pngerror" -
- pngerror.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngmem.OBJ "cc ''CCOPT' pngmem" -
- pngmem.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngrio.OBJ "cc ''CCOPT' pngrio" -
- pngrio.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngwio.OBJ "cc ''CCOPT' pngwio" -
- pngwio.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngtrans.OBJ "cc ''CCOPT' pngtrans" -
- pngtrans.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngwrite.OBJ "cc ''CCOPT' pngwrite" -
- pngwrite.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngwtran.OBJ "cc ''CCOPT' pngwtran" -
- pngwtran.c png.h pngconf.h pngpriv.h
-$ CALL MAKE pngwutil.OBJ "cc ''CCOPT' pngwutil" -
- pngwutil.c png.h pngconf.h pngpriv.h
-$ write sys$output "Building Libpng ..."
-$ CALL MAKE libpng.OLB "lib/crea libpng.olb *.obj" *.OBJ
-$ write sys$output "Building pngtest..."
-$ CALL MAKE pngtest.OBJ "cc ''CCOPT' pngtest" -
- pngtest.c png.h pngconf.h
-$ call make pngtest.exe -
- "LINK pngtest,libpng.olb/lib,''zlibsrc'libz.olb/lib" -
- pngtest.obj libpng.olb
-$ write sys$output "Testing Libpng..."
-$ run pngtest
-$ else
-$ if f$search("DESCRIP.MMS") .eqs. "" then copy/nolog [.SCRIPTS]DESCRIP.MMS []
-$ 'make'/macro=('comp',zlibsrc='zlibsrc')
-$ endif
-$ write sys$output "Libpng build completed"
-$ exit
-$!
-$!
-$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
-$ V = 'F$Verify(0)
-$! P1 = What we are trying to make
-$! P2 = Command to make it
-$! P3 - P8 What it depends on
-$
-$ If F$Search(P1) .Eqs. "" Then Goto Makeit
-$ Time = F$CvTime(F$File(P1,"RDT"))
-$arg=3
-$Loop:
-$ Argument = P'arg
-$ If Argument .Eqs. "" Then Goto Exit
-$ El=0
-$Loop2:
-$ File = F$Element(El," ",Argument)
-$ If File .Eqs. " " Then Goto Endl
-$ AFile = ""
-$Loop3:
-$ OFile = AFile
-$ AFile = F$Search(File)
-$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
-$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
-$ Goto Loop3
-$NextEL:
-$ El = El + 1
-$ Goto Loop2
-$EndL:
-$ arg=arg+1
-$ If arg .Le. 8 Then Goto Loop
-$ Goto Exit
-$
-$Makeit:
-$ VV=F$VERIFY(0)
-$ write sys$output P2
-$ 'P2
-$ VV='F$Verify(VV)
-$Exit:
-$ If V Then Set Verify
-$ENDSUBROUTINE
diff --git a/src/3rdparty/libpng/scripts/png32ce.def b/src/3rdparty/libpng/scripts/png32ce.def
deleted file mode 100644
index 7e3b235..0000000
--- a/src/3rdparty/libpng/scripts/png32ce.def
+++ /dev/null
@@ -1,257 +0,0 @@
-;------------------------------------------
-; LIBPNG module definition file for Windows
-;------------------------------------------
-
-LIBRARY lpngce
-
- png_memcpy_check
- png_memset_check
- png_set_dither
- png_read_init_3
- png_write_init_3
- png_set_strip_error_numbers
- png_get_uint_32
- png_get_uint_16
- png_get_int_32
-
-EXPORTS
-;Version 1.4.0
- png_build_grayscale_palette @1
-; png_check_sig @2
- png_chunk_error @3
- png_chunk_warning @4
-; png_convert_from_struct_tm @5
-; png_convert_from_time_t @6
- png_create_info_struct @7
- png_create_read_struct @8
- png_create_write_struct @9
- png_data_freer @10
- png_destroy_info_struct @11
- png_destroy_read_struct @12
- png_destroy_write_struct @13
- png_error @14
- png_free @15
- png_free_data @16
- png_get_IHDR @17
- png_get_PLTE @18
- png_get_bKGD @19
- png_get_bit_depth @20
- png_get_cHRM @21
- png_get_cHRM_fixed @22
- png_get_channels @23
- png_get_color_type @24
- png_get_compression_buffer_size @25
- png_get_compression_type @26
- png_get_copyright @27
- png_get_error_ptr @28
- png_get_filter_type @29
- png_get_gAMA @30
- png_get_gAMA_fixed @31
- png_get_hIST @32
- png_get_header_ver @33
- png_get_header_version @34
- png_get_iCCP @35
- png_get_image_height @36
- png_get_image_width @37
- png_get_interlace_type @38
- png_get_io_ptr @39
- png_get_libpng_ver @40
- png_get_oFFs @41
- png_get_pCAL @42
- png_get_pHYs @43
- png_get_pixel_aspect_ratio @44
- png_get_pixels_per_meter @45
- png_get_progressive_ptr @46
- png_get_rgb_to_gray_status @47
- png_get_rowbytes @48
- png_get_rows @49
- png_get_sBIT @50
- png_get_sCAL @51
- png_get_sPLT @52
- png_get_sRGB @53
- png_get_signature @54
- png_get_tIME @55
- png_get_tRNS @56
- png_get_text @57
- png_get_unknown_chunks @58
- png_get_user_chunk_ptr @59
- png_get_user_transform_ptr @60
- png_get_valid @61
- png_get_x_offset_microns @62
- png_get_x_offset_pixels @63
- png_get_x_pixels_per_meter @64
- png_get_y_offset_microns @65
- png_get_y_offset_pixels @66
- png_get_y_pixels_per_meter @67
- png_malloc @68
-; png_memcpy_check @69
-; png_memset_check @70
- png_permit_empty_plte @71
- png_process_data @72
- png_progressive_combine_row @73
- png_read_end @74
- png_read_image @75
- png_read_info @76
-; png_read_init is deprecated
- png_read_init @77
- png_read_png @78
- png_read_row @79
- png_read_rows @80
- png_read_update_info @81
- png_reset_zstream @82
- png_set_IHDR @83
- png_set_PLTE @84
- png_set_bKGD @85
- png_set_background @86
- png_set_bgr @87
- png_set_cHRM @88
- png_set_cHRM_fixed @89
- png_set_compression_buffer_size @90
- png_set_compression_level @91
- png_set_compression_mem_level @92
- png_set_compression_method @93
- png_set_compression_strategy @94
- png_set_compression_window_bits @95
- png_set_crc_action @96
-; png_set_dither @97
- png_set_error_fn @98
- png_set_expand @99
- png_set_filler @100
- png_set_filter @101
- png_set_filter_heuristics @102
- png_set_flush @103
- png_set_gAMA @104
- png_set_gAMA_fixed @105
- png_set_gamma @106
- png_set_gray_1_2_4_to_8 @107 ; deprecated
- png_set_gray_to_rgb @108
- png_set_hIST @109
- png_set_iCCP @110
- png_set_interlace_handling @111
- png_set_invert_alpha @112
- png_set_invert_mono @113
- png_set_keep_unknown_chunks @114
- png_set_oFFs @115
- png_set_pCAL @116
- png_set_pHYs @117
- png_set_packing @118
- png_set_packswap @119
- png_set_palette_to_rgb @120
- png_set_progressive_read_fn @121
- png_set_read_fn @122
- png_set_read_status_fn @123
- png_set_read_user_chunk_fn @124
- png_set_read_user_transform_fn @125
- png_set_rgb_to_gray @126
- png_set_rgb_to_gray_fixed @127
- png_set_rows @128
- png_set_sBIT @129
- png_set_sCAL @130
- png_set_sPLT @131
- png_set_sRGB @132
- png_set_sRGB_gAMA_and_cHRM @133
- png_set_shift @134
- png_set_sig_bytes @135
- png_set_strip_16 @136
- png_set_strip_alpha @137
- png_set_swap @138
- png_set_swap_alpha @139
- png_set_tIME @140
- png_set_tRNS @141
- png_set_tRNS_to_alpha @142
- png_set_text @143
- png_set_unknown_chunk_location @144
- png_set_unknown_chunks @145
- png_set_user_transform_info @146
- png_set_write_fn @147
- png_set_write_status_fn @148
- png_set_write_user_transform_fn @149
- png_sig_cmp @150
- png_start_read_image @151
- png_warning @152
- png_write_chunk @153
- png_write_chunk_data @154
- png_write_chunk_end @155
- png_write_chunk_start @156
- png_write_end @157
- png_write_flush @158
- png_write_image @159
- png_write_info @160
- png_write_info_before_PLTE @161
-; png_write_init is deprecated
- png_write_init @162
- png_write_png @163
- png_write_row @164
- png_write_rows @165
-; png_read_init_2 and png_write_init_2 are deprecated.
- png_read_init_2 @166
- png_write_init_2 @167
- png_access_version_number @168
-; png_sig_bytes @169
-; png_libpng_ver @170
- png_init_io @171
- png_convert_to_rfc1123 @172
- png_set_invalid @173
-; Added at version 1.0.12
-; For compatiblity with 1.0.7-1.0.11
- png_info_init @174
-; png_read_init_3 @175
-; png_write_init_3 @176
- png_info_init_3 @177
- png_destroy_struct @178
-; Added at version 1.2.0
-; For use with PNG_USER_MEM_SUPPORTED
-; png_destroy_struct_2 @179
-; png_create_read_struct_2 @180
-; png_create_write_struct_2 @181
-; png_malloc_default @182
-; png_free_default @183
-; MNG features
-; png_permit_mng_features @184
-; MMX support
-; png_mmx_support @185
-; png_get_mmx_flagmask @186
-; png_get_asm_flagmask @187
-; png_get_asm_flags @188
-; png_get_mmx_bitdepth_threshold @189
-; png_get_mmx_rowbytes_threshold @190
-; png_set_asm_flags @191
-; png_init_mmx_flags @192
-; Strip error numbers
-; png_set_strip_error_numbers @193
-; Added at version 1.2.2
- png_handle_as_unknown @179
- png_zalloc @180
- png_zfree @181
-; png_handle_as_unknown @194
-; png_zalloc @195
-; png_zfree @196
-; Added at version 1.2.6
- png_malloc_warn @195
- png_get_user_height_max @196
- png_get_user_width_max @197
- png_set_user_limits @198
-; Added at version 1.2.7
- png_set_add_alpha @199
-; Added at version 1.2.9
-; png_get_uint_32 @200
- png_save_uint_32 @201
-; png_get_uint_16 @202
- png_save_uint_16 @203
-; png_get_int_32 @204
- png_save_int_32 @205
- png_get_uint_31 @206
- png_set_expand_gray_1_2_4_to_8 @207
-; Added at version 1.2.41
- png_write_sig @208
- png_benign_error @209
- png_benign_chunk_error @210
- png_set_benign_error @211
- png_get_io_chunk_name @212
- png_get_io_state @213
- png_set_premultiply_alpha @214
- png_get_chunk_cache_max @215
- png_set_chunk_cache_max @216
- png_check_cHRM_fixed @217
- png_calloc @218
- png_set_longjmp_fn @219
diff --git a/src/3rdparty/libpng/scripts/pngos2.def b/src/3rdparty/libpng/scripts/pngos2.def
deleted file mode 100644
index 2d80eb4..0000000
--- a/src/3rdparty/libpng/scripts/pngos2.def
+++ /dev/null
@@ -1,251 +0,0 @@
-;----------------------------------------
-; PNG.LIB module definition file for OS/2
-;----------------------------------------
-
-; Version 1.4.0
-
-LIBRARY PNG
-DESCRIPTION "PNG image compression library for OS/2"
-CODE PRELOAD MOVEABLE DISCARDABLE
-DATA PRELOAD MOVEABLE MULTIPLE
-
-EXPORTS
-
- png_build_grayscale_palette
- png_chunk_error
- png_chunk_warning
- png_convert_from_struct_tm
- png_convert_from_time_t
- png_create_info_struct
- png_create_read_struct
- png_create_write_struct
- png_data_freer
- png_destroy_info_struct
- png_destroy_read_struct
- png_destroy_write_struct
- png_error
- png_free
- png_free_data
- png_get_IHDR
- png_get_PLTE
- png_get_bKGD
- png_get_bit_depth
- png_get_cHRM
- png_get_cHRM_fixed
- png_get_channels
- png_get_color_type
- png_get_compression_buffer_size
- png_get_compression_type
- png_get_copyright
- png_get_error_ptr
- png_get_filter_type
- png_get_gAMA
- png_get_gAMA_fixed
- png_get_hIST
- png_get_header_ver
- png_get_header_version
- png_get_iCCP
- png_get_image_height
- png_get_image_width
- png_get_interlace_type
- png_get_io_ptr
- png_get_libpng_ver
- png_get_oFFs
- png_get_pCAL
- png_get_pHYs
- png_get_pixel_aspect_ratio
- png_get_pixels_per_meter
- png_get_progressive_ptr
- png_get_rgb_to_gray_status
- png_get_rowbytes
- png_get_rows
- png_get_sBIT
- png_get_sCAL
- png_get_sPLT
- png_get_sRGB
- png_get_signature
- png_get_tIME
- png_get_tRNS
- png_get_text
- png_get_unknown_chunks
- png_get_user_chunk_ptr
- png_get_user_transform_ptr
- png_get_valid
- png_get_x_offset_microns
- png_get_x_offset_pixels
- png_get_x_pixels_per_meter
- png_get_y_offset_microns
- png_get_y_offset_pixels
- png_get_y_pixels_per_meter
- png_malloc
- png_process_data
- png_progressive_combine_row
- png_read_end
- png_read_image
- png_read_info
- png_read_png
- png_read_row
- png_read_rows
- png_read_update_info
- png_reset_zstream
- png_set_IHDR
- png_set_PLTE
- png_set_bKGD
- png_set_background
- png_set_bgr
- png_set_cHRM
- png_set_cHRM_fixed
- png_set_compression_buffer_size
- png_set_compression_level
- png_set_compression_mem_level
- png_set_compression_method
- png_set_compression_strategy
- png_set_compression_window_bits
- png_set_crc_action
- png_set_error_fn
- png_set_expand
- png_set_filler
- png_set_filter
- png_set_filter_heuristics
- png_set_flush
- png_set_gAMA
- png_set_gAMA_fixed
- png_set_gamma
- png_set_gray_to_rgb
- png_set_hIST
- png_set_iCCP
- png_set_interlace_handling
- png_set_invert_alpha
- png_set_invert_mono
- png_set_keep_unknown_chunks
- png_set_oFFs
- png_set_pCAL
- png_set_pHYs
- png_set_packing
- png_set_packswap
- png_set_palette_to_rgb
- png_set_progressive_read_fn
- png_set_read_fn
- png_set_read_status_fn
- png_set_read_user_chunk_fn
- png_set_read_user_transform_fn
- png_set_rgb_to_gray
- png_set_rgb_to_gray_fixed
- png_set_rows
- png_set_sBIT
- png_set_sCAL
- png_set_sPLT
- png_set_sRGB
- png_set_sRGB_gAMA_and_cHRM
- png_set_shift
- png_set_sig_bytes
- png_set_strip_16
- png_set_strip_alpha
- png_set_swap
- png_set_swap_alpha
- png_set_tIME
- png_set_tRNS
- png_set_tRNS_to_alpha
- png_set_text
- png_set_unknown_chunk_location
- png_set_unknown_chunks
- png_set_user_transform_info
- png_set_write_fn
- png_set_write_status_fn
- png_set_write_user_transform_fn
- png_sig_cmp
- png_start_read_image
- png_warning
- png_write_chunk
- png_write_chunk_data
- png_write_chunk_end
- png_write_chunk_start
- png_write_end
- png_write_flush
- png_write_image
- png_write_info
- png_write_info_before_PLTE
- png_write_png
- png_write_row
- png_write_rows
- png_write_sig
- png_access_version_number
- png_init_io
- png_convert_to_rfc1123
- png_set_invalid
-
-; Added at version 1.2.0:
- png_permit_empty_plte
- png_permit_mng_features
-
-; Added at version 1.2.2:
- png_handle_as_unknown
-
-; Added at version 1.2.2 and deleted from 1.2.3:
-; png_zalloc
-; png_zfree
-
-; Added at version 1.2.4
- png_malloc_warn
-
-; Added at version 1.2.6
- png_set_user_limits
- png_get_user_height_max
- png_get_user_width_max
-; Added at version 1.2.7
- png_set_add_alpha
-
-; Added at version 1.2.9
- png_save_uint_32
- png_save_uint_16
- png_save_int_32
- png_get_uint_31
- png_set_expand_gray_1_2_4_to_8
-
-; Added at version 1.2.41
- png_write_sig
-; png_benign_error
-; png_benign_chunk_error
-; png_set_benign_error
- png_get_io_chunk_name
- png_get_io_state
- png_set_premultiply_alpha
- png_get_chunk_cache_max
- png_set_chunk_cache_max
- png_check_cHRM_fixed
- png_calloc
- png_set_longjmp_fn
-
-; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
- png_libpng_ver
- png_pass_start
- png_pass_inc
- png_pass_ystart
- png_pass_yinc
- png_pass_mask
- png_pass_dsp_mask
-; png_pass_width
-; png_pass_height
-
-; These are not present when libpng is compiled with PNG_NO_GLOBAL_ARRAYS
- png_IHDR
- png_IDAT
- png_IEND
- png_PLTE
- png_bKGD
- png_cHRM
- png_gAMA
- png_hIST
- png_iCCP
- png_iTXt
- png_oFFs
- png_pCAL
- png_pHYs
- png_sBIT
- png_sCAL
- png_sPLT
- png_sRGB
- png_tEXt
- png_tIME
- png_tRNS
- png_zTXt
diff --git a/src/3rdparty/libpng/scripts/pngwin.def b/src/3rdparty/libpng/scripts/pngwin.def
deleted file mode 100644
index 657e3b4..0000000
--- a/src/3rdparty/libpng/scripts/pngwin.def
+++ /dev/null
@@ -1,212 +0,0 @@
-;------------------------------------------
-; LIBPNG module definition file for Windows
-;------------------------------------------
-
-LIBRARY
-
-EXPORTS
-;Version 1.4.0
- png_build_grayscale_palette
- png_chunk_error
- png_chunk_warning
- png_convert_from_struct_tm
- png_convert_from_time_t
- png_create_info_struct
- png_create_read_struct
- png_create_write_struct
- png_data_freer
- png_destroy_info_struct
- png_destroy_read_struct
- png_destroy_write_struct
- png_error
- png_free
- png_free_data
- png_get_IHDR
- png_get_PLTE
- png_get_bKGD
- png_get_bit_depth
- png_get_cHRM
- png_get_cHRM_fixed
- png_get_channels
- png_get_color_type
- png_get_compression_buffer_size
- png_get_compression_type
- png_get_copyright
- png_get_error_ptr
- png_get_filter_type
- png_get_gAMA
- png_get_gAMA_fixed
- png_get_hIST
- png_get_header_ver
- png_get_header_version
- png_get_iCCP
- png_get_image_height
- png_get_image_width
- png_get_interlace_type
- png_get_io_ptr
- png_get_libpng_ver
- png_get_oFFs
- png_get_pCAL
- png_get_pHYs
- png_get_pixel_aspect_ratio
- png_get_pixels_per_meter
- png_get_progressive_ptr
- png_get_rgb_to_gray_status
- png_get_rowbytes
- png_get_rows
- png_get_sBIT
- png_get_sCAL
- png_get_sPLT
- png_get_sRGB
- png_get_signature
- png_get_tIME
- png_get_tRNS
- png_get_text
- png_get_unknown_chunks
- png_get_user_chunk_ptr
- png_get_user_transform_ptr
- png_get_valid
- png_get_x_offset_microns
- png_get_x_offset_pixels
- png_get_x_pixels_per_meter
- png_get_y_offset_microns
- png_get_y_offset_pixels
- png_get_y_pixels_per_meter
- png_malloc
- png_process_data
- png_progressive_combine_row
- png_read_end
- png_read_image
- png_read_info
- png_read_png
- png_read_row
- png_read_rows
- png_read_update_info
- png_reset_zstream
- png_set_IHDR
- png_set_PLTE
- png_set_bKGD
- png_set_background
- png_set_bgr
- png_set_cHRM
- png_set_cHRM_fixed
- png_set_compression_buffer_size
- png_set_compression_level
- png_set_compression_mem_level
- png_set_compression_method
- png_set_compression_strategy
- png_set_compression_window_bits
- png_set_crc_action
- png_set_error_fn
- png_set_expand
- png_set_filler
- png_set_filter
- png_set_filter_heuristics
- png_set_flush
- png_set_gAMA
- png_set_gAMA_fixed
- png_set_gamma
- png_set_gray_to_rgb
- png_set_hIST
- png_set_iCCP
- png_set_interlace_handling
- png_set_invert_alpha
- png_set_invert_mono
- png_set_keep_unknown_chunks
- png_set_oFFs
- png_set_pCAL
- png_set_pHYs
- png_set_packing
- png_set_packswap
- png_set_palette_to_rgb
- png_set_progressive_read_fn
- png_set_read_fn
- png_set_read_status_fn
- png_set_read_user_chunk_fn
- png_set_read_user_transform_fn
- png_set_rgb_to_gray
- png_set_rgb_to_gray_fixed
- png_set_rows
- png_set_sBIT
- png_set_sCAL
- png_set_sPLT
- png_set_sRGB
- png_set_sRGB_gAMA_and_cHRM
- png_set_shift
- png_set_sig_bytes
- png_set_strip_16
- png_set_strip_alpha
- png_set_swap
- png_set_swap_alpha
- png_set_tIME
- png_set_tRNS
- png_set_tRNS_to_alpha
- png_set_text
- png_set_unknown_chunk_location
- png_set_unknown_chunks
- png_set_user_transform_info
- png_set_write_fn
- png_set_write_status_fn
- png_set_write_user_transform_fn
- png_sig_cmp
- png_start_read_image
- png_warning
- png_write_chunk
- png_write_chunk_data
- png_write_chunk_end
- png_write_chunk_start
- png_write_end
- png_write_flush
- png_write_image
- png_write_info
- png_write_info_before_PLTE
- png_write_png
- png_write_row
- png_write_rows
- png_access_version_number
- png_init_io
- png_convert_to_rfc1123
- png_set_invalid
-; Added at version 1.0.12
- png_info_init_3
- png_destroy_struct
-; Added at version 1.2.0
-; For use with PNG_USER_MEM_SUPPORTED
- png_destroy_struct_2
- png_create_read_struct_2
- png_create_write_struct_2
- png_malloc_default
- png_free_default
-; MNG features
- png_permit_mng_features
-; Added at version 1.2.2
- png_handle_as_unknown
-; Added at version 1.2.2 and deleted from 1.2.3
-; png_zalloc
-; png_zfree
-; Added at version 1.2.4
- png_malloc_warn
- png_get_user_height_max
- png_get_user_width_max
- png_set_user_limits
-; Added at version 1.2.7
- png_set_add_alpha
-; Added at version 1.2.9
- png_save_uint_32
- png_save_uint_16
- png_save_int_32
- png_get_uint_31
- png_set_expand_gray_1_2_4_to_8
-; Added at version 1.2.41
- png_write_sig
-; png_benign_error
-; png_benign_chunk_error
-; png_set_benign_error
- png_get_io_chunk_name
- png_get_io_state
- png_set_premultiply_alpha
- png_get_chunk_cache_max
- png_set_chunk_cache_max
- png_check_cHRM_fixed
- png_calloc
- png_set_longjmp_fn
diff --git a/src/3rdparty/libpng/scripts/pngwin.rc b/src/3rdparty/libpng/scripts/pngwin.rc
deleted file mode 100644
index 9335cbb..0000000
--- a/src/3rdparty/libpng/scripts/pngwin.rc
+++ /dev/null
@@ -1,112 +0,0 @@
-#define PNG_VERSION_INFO_ONLY
-
-#include <windows.h>
-#include "../png.h"
-
-#define _QUOTE(x) # x
-#define QUOTE(x) _QUOTE(x)
-
-#define PNG_LIBPNG_DLLFNAME "LIBPNG"
-
-/* Support deprecated PRIVATEBUILD macro */
-#if defined(PRIVATEBUILD) && !defined(PNG_USER_PRIVATEBUILD)
-# define PNG_USER_PRIVATEBUILD PRIVATEBUILD
-#endif
-
-#if defined(PNG_USER_DLLFNAME_POSTFIX) && !defined(PNG_USER_PRIVATEBUILD)
-# error "PNG_USER_PRIVATEBUILD must be defined as a string describing the\
- custom changes made to the library."
-#endif
-
-/* Prioritize PNG_USER_x over PNG_LIBPNG_x */
-#ifdef PNG_USER_DLLFNAME_POSTFIX
-# undef PNG_LIBPNG_DLLFNAME_POSTFIX
-# define PNG_LIBPNG_DLLFNAME_POSTFIX PNG_USER_DLLFNAME_POSTFIX
-#endif
-
-#ifdef PNG_USER_VERSIONINFO_COMMENTS
-# undef PNG_LIBPNG_VERSIONINFO_COMMENTS
-# define PNG_LIBPNG_VERSIONINFO_COMMENTS PNG_USER_VERSIONINFO_COMMENTS
-#endif
-
-#if defined(PNG_DEBUG) && (PNG_DEBUG > 0)
-# define VS_DEBUG VS_FF_DEBUG
-# ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
-# define PNG_LIBPNG_DLLFNAME_POSTFIX "D"
-# endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
-# ifndef PNG_LIBPNG_VERSIONINFO_COMMENTS
-# define PNG_LIBPNG_VERSIONINFO_COMMENTS "PNG_DEBUG=" QUOTE(PNG_DEBUG)
-# endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
-#else
-# define VS_DEBUG 0
-# ifndef PNG_LIBPNG_DLLFNAME_POSTFIX
-# define PNG_LIBPNG_DLLFNAME_POSTFIX
-# endif /* PNG_LIBPNG_DLLFNAME_POSTFIX */
-#endif /* defined(DEBUG)... */
-
-#ifdef PNG_USER_PRIVATEBUILD
-# define VS_PRIVATEBUILD VS_FF_PRIVATEBUILD
-#else
-# define VS_PRIVATEBUILD 0
-#endif /* PNG_USER_PRIVATEBUILD */
-
-#ifdef PNG_LIBPNG_SPECIALBUILD
-# define VS_SPECIALBUILD VS_FF_SPECIALBUILD
-#else
-# define VS_SPECIALBUILD 0
-#endif /* PNG_LIBPNG_BUILD_SPECIAL */
-
-#if ((PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_RELEASE_STATUS_MASK) !=\
- PNG_LIBPNG_BUILD_STABLE)
-# define VS_PRERELEASE VS_FF_PRERELEASE
-# define VS_PATCHED 0
-#else
-# define VS_PRERELEASE 0
-# if (PNG_LIBPNG_BUILD_BASE_TYPE & PNG_LIBPNG_BUILD_PATCHED)
-# define VS_PATCHED VS_FF_PATCHED
-# else
-# define VS_PATCHED 0
-# endif
-#endif
-
-VS_VERSION_INFO VERSIONINFO
-FILEVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
-PRODUCTVERSION PNG_LIBPNG_VER_MAJOR, PNG_LIBPNG_VER_MINOR, PNG_LIBPNG_VER_RELEASE, PNG_LIBPNG_VER_BUILD
-FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-FILEFLAGS VS_DEBUG | VS_PRIVATEBUILD | VS_SPECIALBUILD | VS_PRERELEASE | VS_PATCHED
-FILEOS VOS__WINDOWS32
-FILETYPE VFT_DLL
-FILESUBTYPE VFT2_UNKNOWN
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN BLOCK "040904E4" /* Language type = U.S English(0x0409) and Character Set = Windows, Multilingual(0x04E4) */
- BEGIN
-#ifdef PNG_LIBPNG_VERSIONINFO_COMMENTS
- VALUE "Comments", PNG_LIBPNG_VERSIONINFO_COMMENTS "\000"
-#endif /* PNG_LIBPNG_VERSIONINFO_COMMENTS */
-#ifdef PNG_USER_VERSIONINFO_COMPANYNAME
- VALUE "CompanyName", PNG_USER_VERSIONINFO_COMPANYNAME "\000"
-#endif /* PNG_USER_VERSIONINFO_COMPANYNAME */
- VALUE "FileDescription", "PNG image compression library\000"
- VALUE "FileVersion", PNG_LIBPNG_VER_STRING "\000"
- VALUE "InternalName", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX " (Windows 32 bit)\000"
- VALUE "LegalCopyright", "\251 1998-2009 Glenn Randers-Pehrson et al.\000"
-#ifdef PNG_USER_VERSIONINFO_LEGALTRADEMARKS
- VALUE "LegalTrademarks", PNG_USER_VERSIONINFO_LEGALTRADEMARKS "\000"
-#endif /* PNG_USER_VERSIONINFO_LEGALTRADEMARKS */
- VALUE "OriginalFilename", PNG_LIBPNG_DLLFNAME QUOTE(PNG_LIBPNG_VER_DLLNUM) PNG_LIBPNG_DLLFNAME_POSTFIX ".DLL\000"
-#ifdef PNG_USER_PRIVATEBUILD
- VALUE "PrivateBuild", PNG_USER_PRIVATEBUILD "\000"
-#endif /* PNG_USER_PRIVATEBUILD */
- VALUE "ProductName", "LibPNG\000"
- VALUE "ProductVersion", "1\000"
-#ifdef PNG_LIBPNG_SPECIALBUILD
- VALUE "SpecialBuild", PNG_LIBPNG_SPECIALBUILD "\000"
-#endif /* PNG_LIBPNG_SPECIALBUILD */
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0409, 0x04E4
- END
-END
diff --git a/src/3rdparty/libpng/scripts/smakefile.ppc b/src/3rdparty/libpng/scripts/smakefile.ppc
deleted file mode 100644
index 531c693..0000000
--- a/src/3rdparty/libpng/scripts/smakefile.ppc
+++ /dev/null
@@ -1,33 +0,0 @@
-# Amiga powerUP (TM) Makefile
-# makefile for libpng and SAS C V6.58/7.00 PPC compiler
-# Copyright (C) 1998 by Andreas R. Kleinert
-#
-# This code is released under the libpng license.
-# For conditions of distribution and use, see the disclaimer
-# and license in png.h
-
-CC = scppc
-CFLAGS = NOSTKCHK NOSINT OPTIMIZE OPTGO OPTPEEP OPTINLOCAL OPTINL IDIR /zlib \
- OPTLOOP OPTRDEP=8 OPTDEP=8 OPTCOMP=8
-LIBNAME = libpng.a
-AR = ppc-amigaos-ar
-AR_FLAGS = cr
-RANLIB = ppc-amigaos-ranlib
-LDFLAGS = -r -o
-LDLIBS = ../zlib/libzip.a LIB:scppc.a
-LN = ppc-amigaos-ld
-RM = delete quiet
-MKDIR = makedir
-
-OBJS = png.o pngset.o pngget.o pngrutil.o pngtrans.o pngwutil.o pngread.o \
-pngerror.o pngpread.o pngwrite.o pngrtran.o pngwtran.o pngrio.o pngwio.o pngmem.o
-
-all: $(LIBNAME) pngtest
-
-$(LIBNAME): $(OBJS)
- $(AR) $(AR_FLAGS) $@ $(OBJS)
- $(RANLIB) $@
-
-pngtest: pngtest.o $(LIBNAME)
- $(LN) $(LDFLAGS) pngtest LIB:c_ppc.o pngtest.o $(LIBNAME) $(LDLIBS) \
-LIB:end.o
diff --git a/src/3rdparty/libpng/test-pngtest.sh b/src/3rdparty/libpng/test-pngtest.sh
deleted file mode 100755
index c134a8a..0000000
--- a/src/3rdparty/libpng/test-pngtest.sh
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-
-./pngtest ${srcdir}/pngtest.png
diff --git a/src/3rdparty/libtiff/libtiff/tif_config.h b/src/3rdparty/libtiff/libtiff/tif_config.h
index 6d89e71..f851384 100644
--- a/src/3rdparty/libtiff/libtiff/tif_config.h
+++ b/src/3rdparty/libtiff/libtiff/tif_config.h
@@ -160,7 +160,9 @@
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if you have the <unistd.h> header file. */
+#if !defined(Q_OS_WIN)
#define HAVE_UNISTD_H 1
+#endif
/* Define to 1 if you have the <windows.h> header file. */
/* #undef HAVE_WINDOWS_H */
diff --git a/src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch b/src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch
deleted file mode 100644
index 83899ad..0000000
--- a/src/3rdparty/patches/zlib-1.2.3-elf-visibility.patch
+++ /dev/null
@@ -1,433 +0,0 @@
---- compress.c.orig 2003-07-07 07:37:56.000000000 +0200
-+++ compress.c 2006-06-16 00:00:00.000000000 +0200
-@@ -59,7 +59,7 @@
-
- /* ===========================================================================
- */
--int ZEXPORT compress (dest, destLen, source, sourceLen)
-+int Q_ZEXPORT compress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
---- gzio.c.orig 2005-07-11 22:31:48.000000000 +0200
-+++ gzio.c 2006-08-25 00:00:00.000000000 +0200
-@@ -205,7 +205,7 @@
- /* ===========================================================================
- Opens a gzip (.gz) file for reading or writing.
- */
--gzFile ZEXPORT gzopen (path, mode)
-+gzFile Q_ZEXPORT gzopen (path, mode)
- const char *path;
- const char *mode;
- {
-@@ -391,7 +391,7 @@
- Reads the given number of uncompressed bytes from the compressed file.
- gzread returns the number of bytes actually read (0 for end of file).
- */
--int ZEXPORT gzread (file, buf, len)
-+int Q_ZEXPORT gzread (file, buf, len)
- gzFile file;
- voidp buf;
- unsigned len;
-@@ -600,7 +600,7 @@
- #ifdef STDC
- #include <stdarg.h>
-
--int ZEXPORTVA gzprintf (gzFile file, const char *format, /* args */ ...)
-+int Q_ZEXPORT gzprintf (gzFile file, const char *format, /* args */ ...)
- {
- char buf[Z_PRINTF_BUFSIZE];
- va_list va;
-@@ -634,7 +634,7 @@
- }
- #else /* not ANSI C */
-
--int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
-+int Q_ZEXPORT gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
- gzFile file;
- const char *format;
-@@ -950,7 +950,7 @@
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state.
- */
--int ZEXPORT gzclose (file)
-+int Q_ZEXPORT gzclose (file)
- gzFile file;
- {
- gz_stream *s = (gz_stream*)file;
---- uncompr.c.orig 2003-07-07 07:36:56.000000000 +0200
-+++ uncompr.c 2006-06-16 00:00:00.000000000 +0200
-@@ -23,7 +23,7 @@
- enough memory, Z_BUF_ERROR if there was not enough room in the output
- buffer, or Z_DATA_ERROR if the input data was corrupted.
- */
--int ZEXPORT uncompress (dest, destLen, source, sourceLen)
-+int Q_ZEXPORT uncompress (dest, destLen, source, sourceLen)
- Bytef *dest;
- uLongf *destLen;
- const Bytef *source;
---- zlib.h.orig 2005-07-18 04:26:49.000000000 +0200
-+++ zlib.h 2006-08-25 00:00:00.000000000 +0200
-@@ -32,6 +32,7 @@
- #define ZLIB_H
-
- #include "zconf.h"
-+#include "qconfig.h"
-
- #ifdef __cplusplus
- extern "C" {
-@@ -40,6 +41,19 @@
- #define ZLIB_VERSION "1.2.3"
- #define ZLIB_VERNUM 0x1230
-
-+#if defined(QT_VISIBILITY_AVAILABLE)
-+# define Q_ZEXPORT __attribute__((visibility("default")))
-+#else
-+# ifdef QT_MAKEDLL
-+# define Q_ZEXPORT __declspec(dllexport)
-+# else
-+# define Q_ZEXPORT ZEXPORT
-+# endif
-+#endif
-+#ifdef Q_OS_TEMP
-+#include <qfunctions_wce.h>
-+#endif
-+
- /*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
-@@ -209,7 +223,7 @@
-
- /* basic functions */
-
--ZEXTERN const char * ZEXPORT zlibVersion OF((void));
-+ZEXTERN Q_ZEXPORT const char * zlibVersion OF((void));
- /* The application can compare zlibVersion and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
-@@ -239,7 +253,7 @@
- */
-
-
--ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
-+ZEXTERN int Q_ZEXPORT deflate OF((z_streamp strm, int flush));
- /*
- deflate compresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce some
-@@ -325,7 +339,7 @@
- */
-
-
--ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
-+ZEXTERN int Q_ZEXPORT deflateEnd OF((z_streamp strm));
- /*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
-@@ -360,7 +374,7 @@
- */
-
-
--ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
-+ZEXTERN int Q_ZEXPORT inflate OF((z_streamp strm, int flush));
- /*
- inflate decompresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce
-@@ -459,7 +473,7 @@
- */
-
-
--ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
-+ZEXTERN int Q_ZEXPORT inflateEnd OF((z_streamp strm));
- /*
- All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
-@@ -535,7 +549,7 @@
- not perform any compression: this will be done by deflate().
- */
-
--ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
-+ZEXTERN int Q_ZEXPORT deflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
- /*
-@@ -574,7 +588,7 @@
- perform any compression: this will be done by deflate().
- */
-
--ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
-+ZEXTERN int Q_ZEXPORT deflateCopy OF((z_streamp dest,
- z_streamp source));
- /*
- Sets the destination stream as a complete copy of the source stream.
-@@ -592,7 +606,7 @@
- destination.
- */
-
--ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
-+ZEXTERN int Q_ZEXPORT deflateReset OF((z_streamp strm));
- /*
- This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
-@@ -603,7 +617,7 @@
- stream state was inconsistent (such as zalloc or state being NULL).
- */
-
--ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
-+ZEXTERN int Q_ZEXPORT deflateParams OF((z_streamp strm,
- int level,
- int strategy));
- /*
-@@ -733,7 +747,7 @@
- and avail_out are unchanged.)
- */
-
--ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
-+ZEXTERN int Q_ZEXPORT inflateSetDictionary OF((z_streamp strm,
- const Bytef *dictionary,
- uInt dictLength));
- /*
-@@ -755,7 +769,7 @@
- inflate().
- */
-
--ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
-+ZEXTERN int Q_ZEXPORT inflateSync OF((z_streamp strm));
- /*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
-@@ -786,7 +800,7 @@
- destination.
- */
-
--ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
-+ZEXTERN int Q_ZEXPORT inflateReset OF((z_streamp strm));
- /*
- This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
-@@ -1006,7 +1020,7 @@
- utility functions can easily be modified if you need special options.
- */
-
--ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
-+ZEXTERN int Q_ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
- /*
- Compresses the source buffer into the destination buffer. sourceLen is
-@@ -1021,7 +1035,7 @@
- buffer.
- */
-
--ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
-+ZEXTERN int Q_ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen,
- int level));
- /*
-@@ -1044,7 +1058,7 @@
- a compress() or compress2() call to allocate the destination buffer.
- */
-
--ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
-+ZEXTERN int Q_ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
- const Bytef *source, uLong sourceLen));
- /*
- Decompresses the source buffer into the destination buffer. sourceLen is
-@@ -1065,7 +1079,7 @@
-
- typedef voidp gzFile;
-
--ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
-+ZEXTERN gzFile Q_ZEXPORT gzopen OF((const char *path, const char *mode));
- /*
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb") but can also include a compression level
-@@ -1082,7 +1096,7 @@
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR). */
-
--ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
-+ZEXTERN gzFile Q_ZEXPORT gzdopen OF((int fd, const char *mode));
- /*
- gzdopen() associates a gzFile with the file descriptor fd. File
- descriptors are obtained from calls like open, dup, creat, pipe or
-@@ -1095,7 +1109,7 @@
- the (de)compression state.
- */
-
--ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
-+ZEXTERN int Q_ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
- /*
- Dynamically update the compression level or strategy. See the description
- of deflateInit2 for the meaning of these parameters.
-@@ -1103,7 +1117,7 @@
- opened for writing.
- */
-
--ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
-+ZEXTERN int Q_ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
- /*
- Reads the given number of uncompressed bytes from the compressed file.
- If the input file was not in gzip format, gzread copies the given number
-@@ -1111,7 +1125,7 @@
- gzread returns the number of uncompressed bytes actually read (0 for
- end of file, -1 for error). */
-
--ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
-+ZEXTERN int Q_ZEXPORT gzwrite OF((gzFile file,
- voidpc buf, unsigned len));
- /*
- Writes the given number of uncompressed bytes into the compressed file.
-@@ -1119,7 +1133,7 @@
- (0 in case of error).
- */
-
--ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
-+ZEXTERN int Q_ZEXPORT gzprintf OF((gzFile file, const char *format, ...));
- /*
- Converts, formats, and writes the args to the compressed file under
- control of the format string, as in fprintf. gzprintf returns the number of
-@@ -1132,14 +1146,14 @@
- because the secure snprintf() or vsnprintf() functions were not available.
- */
-
--ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
-+ZEXTERN int Q_ZEXPORT gzputs OF((gzFile file, const char *s));
- /*
- Writes the given null-terminated string to the compressed file, excluding
- the terminating null character.
- gzputs returns the number of characters written, or -1 in case of error.
- */
-
--ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
-+ZEXTERN Q_ZEXPORT char * gzgets OF((gzFile file, char *buf, int len));
- /*
- Reads bytes from the compressed file until len-1 characters are read, or
- a newline character is read and transferred to buf, or an end-of-file
-@@ -1148,13 +1162,13 @@
- gzgets returns buf, or Z_NULL in case of error.
- */
-
--ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
-+ZEXTERN int Q_ZEXPORT gzputc OF((gzFile file, int c));
- /*
- Writes c, converted to an unsigned char, into the compressed file.
- gzputc returns the value that was written, or -1 in case of error.
- */
-
--ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
-+ZEXTERN int Q_ZEXPORT gzgetc OF((gzFile file));
- /*
- Reads one byte from the compressed file. gzgetc returns this byte
- or -1 in case of end of file or error.
-@@ -1170,7 +1184,7 @@
- or gzrewind().
- */
-
--ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
-+ZEXTERN int Q_ZEXPORT gzflush OF((gzFile file, int flush));
- /*
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function. The return value is the zlib
-@@ -1180,7 +1194,7 @@
- degrade compression.
- */
-
--ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
-+ZEXTERN z_off_t Q_ZEXPORT gzseek OF((gzFile file,
- z_off_t offset, int whence));
- /*
- Sets the starting position for the next gzread or gzwrite on the
-@@ -1198,14 +1212,14 @@
- would be before the current position.
- */
-
--ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
-+ZEXTERN int Q_ZEXPORT gzrewind OF((gzFile file));
- /*
- Rewinds the given file. This function is supported only for reading.
-
- gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
- */
-
--ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
-+ZEXTERN z_off_t Q_ZEXPORT gztell OF((gzFile file));
- /*
- Returns the starting position for the next gzread or gzwrite on the
- given compressed file. This position represents a number of bytes in the
-@@ -1214,7 +1228,7 @@
- gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
- */
-
--ZEXTERN int ZEXPORT gzeof OF((gzFile file));
-+ZEXTERN int Q_ZEXPORT gzeof OF((gzFile file));
- /*
- Returns 1 when EOF has previously been detected reading the given
- input stream, otherwise zero.
-@@ -1226,14 +1240,14 @@
- zero.
- */
-
--ZEXTERN int ZEXPORT gzclose OF((gzFile file));
-+ZEXTERN int Q_ZEXPORT gzclose OF((gzFile file));
- /*
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state. The return value is the zlib
- error number (see function gzerror below).
- */
-
--ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
-+ZEXTERN Q_ZEXPORT const char * gzerror OF((gzFile file, int *errnum));
- /*
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
-@@ -1257,7 +1271,7 @@
- compression library.
- */
-
--ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
-+ZEXTERN uLong Q_ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
- /*
- Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
-@@ -1282,7 +1296,7 @@
- seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
- */
-
--ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
-+ZEXTERN uLong Q_ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
- /*
- Update a running CRC-32 with the bytes buf[0..len-1] and return the
- updated CRC-32. If buf is NULL, this function returns the required initial
-@@ -1314,15 +1328,15 @@
- /* deflateInit and inflateInit are macros to allow checking the zlib version
- * and the compiler's view of z_stream:
- */
--ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
-+ZEXTERN int Q_ZEXPORT deflateInit_ OF((z_streamp strm, int level,
- const char *version, int stream_size));
--ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
-+ZEXTERN int Q_ZEXPORT inflateInit_ OF((z_streamp strm,
- const char *version, int stream_size));
--ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
-+ZEXTERN int Q_ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
- int windowBits, int memLevel,
- int strategy, const char *version,
- int stream_size));
--ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
-+ZEXTERN int Q_ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
- const char *version, int stream_size));
- ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
- unsigned char FAR *window,
-@@ -1346,9 +1360,9 @@
- struct internal_state {int dummy;}; /* hack for buggy compilers */
- #endif
-
--ZEXTERN const char * ZEXPORT zError OF((int));
--ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z));
--ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
-+ZEXTERN Q_ZEXPORT const char * zError OF((int));
-+ZEXTERN int Q_ZEXPORT inflateSyncPoint OF((z_streamp z));
-+ZEXTERN Q_ZEXPORT const uLongf * get_crc_table OF((void));
-
- #ifdef __cplusplus
- }
diff --git a/src/3rdparty/zlib.pri b/src/3rdparty/zlib.pri
index bae3221..b8c4d44 100644
--- a/src/3rdparty/zlib.pri
+++ b/src/3rdparty/zlib.pri
@@ -5,7 +5,11 @@ SOURCES+= \
$$PWD/zlib/compress.c \
$$PWD/zlib/crc32.c \
$$PWD/zlib/deflate.c \
- $$PWD/zlib/gzio.c \
+ $$PWD/zlib/gzclose.c \
+ $$PWD/zlib/gzlib.c \
+ $$PWD/zlib/gzread.c \
+ $$PWD/zlib/gzwrite.c \
+ $$PWD/zlib/infback.c \
$$PWD/zlib/inffast.c \
$$PWD/zlib/inflate.c \
$$PWD/zlib/inftrees.c \
diff --git a/src/3rdparty/zlib/CMakeLists.txt b/src/3rdparty/zlib/CMakeLists.txt
new file mode 100644
index 0000000..a64fe0b
--- /dev/null
+++ b/src/3rdparty/zlib/CMakeLists.txt
@@ -0,0 +1,190 @@
+cmake_minimum_required(VERSION 2.4.4)
+set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
+
+project(zlib C)
+
+if(NOT DEFINED BUILD_SHARED_LIBS)
+ option(BUILD_SHARED_LIBS "Build a shared library form of zlib" ON)
+endif()
+
+include(CheckTypeSize)
+include(CheckFunctionExists)
+include(CheckIncludeFile)
+include(CheckCSourceCompiles)
+enable_testing()
+
+check_include_file(sys/types.h HAVE_SYS_TYPES_H)
+check_include_file(stdint.h HAVE_STDINT_H)
+check_include_file(stddef.h HAVE_STDDEF_H)
+
+#
+# Check to see if we have large file support
+#
+set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
+# We add these other definitions here because CheckTypeSize.cmake
+# in CMake 2.4.x does not automatically do so and we want
+# compatibility with CMake 2.4.x.
+if(HAVE_SYS_TYPES_H)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
+endif()
+if(HAVE_STDINT_H)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
+endif()
+if(HAVE_STDDEF_H)
+ list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
+endif()
+check_type_size(off64_t OFF64_T)
+if(HAVE_OFF64_T)
+ add_definitions(-D_LARGEFILE64_SOURCE=1)
+endif()
+set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
+
+#
+# Check for fseeko
+#
+check_function_exists(fseeko HAVE_FSEEKO)
+if(NOT HAVE_FSEEKO)
+ add_definitions(-DNO_FSEEKO)
+endif()
+
+#
+# Check for unistd.h
+#
+check_include_file(unistd.h Z_HAVE_UNISTD_H)
+
+if(MSVC)
+ set(CMAKE_DEBUG_POSTFIX "d")
+ add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
+ add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
+endif()
+
+if(NOT CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
+ # If we're doing an out of source build and the user has a zconf.h
+ # in their source tree...
+ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h)
+ message(FATAL_ERROR
+ "You must remove ${CMAKE_CURRENT_SOURCE_DIR}/zconf.h "
+ "from the source tree. This file is included with zlib "
+ "but CMake generates this file for you automatically "
+ "in the build directory.")
+ endif()
+endif()
+
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/zconf.h.cmakein
+ ${CMAKE_CURRENT_BINARY_DIR}/zconf.h @ONLY)
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+
+#============================================================================
+# zlib
+#============================================================================
+
+set(ZLIB_PUBLIC_HDRS
+ ${CMAKE_CURRENT_BINARY_DIR}/zconf.h
+ zlib.h
+)
+set(ZLIB_PRIVATE_HDRS
+ crc32.h
+ deflate.h
+ gzguts.h
+ inffast.h
+ inffixed.h
+ inflate.h
+ inftrees.h
+ trees.h
+ zutil.h
+)
+set(ZLIB_SRCS
+ adler32.c
+ compress.c
+ crc32.c
+ deflate.c
+ gzclose.c
+ gzlib.c
+ gzread.c
+ gzwrite.c
+ inflate.c
+ infback.c
+ inftrees.c
+ inffast.c
+ trees.c
+ uncompr.c
+ zutil.c
+ win32/zlib1.rc
+)
+
+# parse the full version number from zlib.h and include in ZLIB_FULL_VERSION
+file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents)
+string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([0-9A-Za-z.]+)\".*"
+ "\\1" ZLIB_FULL_VERSION ${_zlib_h_contents})
+
+if(MINGW)
+ # This gets us DLL resource information when compiling on MinGW.
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
+ COMMAND windres.exe
+ -D GCC_WINDRES
+ -I ${CMAKE_CURRENT_SOURCE_DIR}
+ -I ${CMAKE_CURRENT_BINARY_DIR}
+ -o ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj
+ -i ${CMAKE_CURRENT_SOURCE_DIR}/win32/zlib1.rc)
+ set(ZLIB_SRCS ${ZLIB_SRCS} ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj)
+endif(MINGW)
+
+add_library(zlib ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS})
+set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL)
+
+set_target_properties(zlib PROPERTIES SOVERSION 1)
+
+if(NOT CYGWIN)
+ # This property causes shared libraries on Linux to have the full version
+ # encoded into their final filename. We disable this on Cygwin because
+ # it causes cygz-${ZLIB_FULL_VERSION}.dll to be created when cygz.dll
+ # seems to be the default.
+ #
+ # This has no effect with MSVC, on that platform the version info for
+ # the DLL comes from the resource file win32/zlib1.rc
+ set_target_properties(zlib PROPERTIES VERSION ${ZLIB_FULL_VERSION})
+endif()
+
+if(UNIX)
+ # On unix-like platforms the library is almost always called libz
+ set_target_properties(zlib PROPERTIES OUTPUT_NAME z)
+elseif(BUILD_SHARED_LIBS AND WIN32)
+ # Creates zlib1.dll when building shared library version
+ set_target_properties(zlib PROPERTIES SUFFIX "1.dll")
+endif()
+
+if(NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
+ install(TARGETS zlib
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib )
+endif()
+if(NOT SKIP_INSTALL_HEADERS AND NOT SKIP_INSTALL_ALL )
+ install(FILES ${ZLIB_PUBLIC_HDRS} DESTINATION include)
+endif()
+if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
+ install(FILES zlib.3 DESTINATION share/man/man3)
+endif()
+
+#============================================================================
+# Example binaries
+#============================================================================
+
+add_executable(example example.c)
+target_link_libraries(example zlib)
+add_test(example example)
+
+add_executable(minigzip minigzip.c)
+target_link_libraries(minigzip zlib)
+
+if(HAVE_OFF64_T)
+ add_executable(example64 example.c)
+ target_link_libraries(example64 zlib)
+ set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+ add_test(example64 example64)
+
+ add_executable(minigzip64 minigzip.c)
+ target_link_libraries(minigzip64 zlib)
+ set_target_properties(minigzip64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
+endif()
diff --git a/src/3rdparty/zlib/ChangeLog b/src/3rdparty/zlib/ChangeLog
index 7f6869d..f310bb0 100644
--- a/src/3rdparty/zlib/ChangeLog
+++ b/src/3rdparty/zlib/ChangeLog
@@ -1,6 +1,359 @@
ChangeLog file for zlib
+Changes in 1.2.5 (19 Apr 2010)
+- Disable visibility attribute in win32/Makefile.gcc [Bar-Lev]
+- Default to libdir as sharedlibdir in configure [Nieder]
+- Update copyright dates on modified source files
+- Update trees.c to be able to generate modified trees.h
+- Exit configure for MinGW, suggesting win32/Makefile.gcc
+
+Changes in 1.2.4.5 (18 Apr 2010)
+- Set sharedlibdir in configure [Torok]
+- Set LDFLAGS in Makefile.in [Bar-Lev]
+- Avoid mkdir objs race condition in Makefile.in [Bowler]
+- Add ZLIB_INTERNAL in front of internal inter-module functions and arrays
+- Define ZLIB_INTERNAL to hide internal functions and arrays for GNU C
+- Don't use hidden attribute when it is a warning generator (e.g. Solaris)
+
+Changes in 1.2.4.4 (18 Apr 2010)
+- Fix CROSS_PREFIX executable testing, CHOST extract, mingw* [Torok]
+- Undefine _LARGEFILE64_SOURCE in zconf.h if it is zero, but not if empty
+- Try to use bash or ksh regardless of functionality of /bin/sh
+- Fix configure incompatibility with NetBSD sh
+- Remove attempt to run under bash or ksh since have better NetBSD fix
+- Fix win32/Makefile.gcc for MinGW [Bar-Lev]
+- Add diagnostic messages when using CROSS_PREFIX in configure
+- Added --sharedlibdir option to configure [Weigelt]
+- Use hidden visibility attribute when available [Frysinger]
+
+Changes in 1.2.4.3 (10 Apr 2010)
+- Only use CROSS_PREFIX in configure for ar and ranlib if they exist
+- Use CROSS_PREFIX for nm [Bar-Lev]
+- Assume _LARGEFILE64_SOURCE defined is equivalent to true
+- Avoid use of undefined symbols in #if with && and ||
+- Make *64 prototypes in gzguts.h consistent with functions
+- Add -shared load option for MinGW in configure [Bowler]
+- Move z_off64_t to public interface, use instead of off64_t
+- Remove ! from shell test in configure (not portable to Solaris)
+- Change +0 macro tests to -0 for possibly increased portability
+
+Changes in 1.2.4.2 (9 Apr 2010)
+- Add consistent carriage returns to readme.txt's in masmx86 and masmx64
+- Really provide prototypes for *64 functions when building without LFS
+- Only define unlink() in minigzip.c if unistd.h not included
+- Update README to point to contrib/vstudio project files
+- Move projects/vc6 to old/ and remove projects/
+- Include stdlib.h in minigzip.c for setmode() definition under WinCE
+- Clean up assembler builds in win32/Makefile.msc [Rowe]
+- Include sys/types.h for Microsoft for off_t definition
+- Fix memory leak on error in gz_open()
+- Symbolize nm as $NM in configure [Weigelt]
+- Use TEST_LDSHARED instead of LDSHARED to link test programs [Weigelt]
+- Add +0 to _FILE_OFFSET_BITS and _LFS64_LARGEFILE in case not defined
+- Fix bug in gzeof() to take into account unused input data
+- Avoid initialization of structures with variables in puff.c
+- Updated win32/README-WIN32.txt [Rowe]
+
+Changes in 1.2.4.1 (28 Mar 2010)
+- Remove the use of [a-z] constructs for sed in configure [gentoo 310225]
+- Remove $(SHAREDLIB) from LIBS in Makefile.in [Creech]
+- Restore "for debugging" comment on sprintf() in gzlib.c
+- Remove fdopen for MVS from gzguts.h
+- Put new README-WIN32.txt in win32 [Rowe]
+- Add check for shell to configure and invoke another shell if needed
+- Fix big fat stinking bug in gzseek() on uncompressed files
+- Remove vestigial F_OPEN64 define in zutil.h
+- Set and check the value of _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE
+- Avoid errors on non-LFS systems when applications define LFS macros
+- Set EXE to ".exe" in configure for MINGW [Kahle]
+- Match crc32() in crc32.c exactly to the prototype in zlib.h [Sherrill]
+- Add prefix for cross-compilation in win32/makefile.gcc [Bar-Lev]
+- Add DLL install in win32/makefile.gcc [Bar-Lev]
+- Allow Linux* or linux* from uname in configure [Bar-Lev]
+- Allow ldconfig to be redefined in configure and Makefile.in [Bar-Lev]
+- Add cross-compilation prefixes to configure [Bar-Lev]
+- Match type exactly in gz_load() invocation in gzread.c
+- Match type exactly of zcalloc() in zutil.c to zlib.h alloc_func
+- Provide prototypes for *64 functions when building zlib without LFS
+- Don't use -lc when linking shared library on MinGW
+- Remove errno.h check in configure and vestigial errno code in zutil.h
+
+Changes in 1.2.4 (14 Mar 2010)
+- Fix VER3 extraction in configure for no fourth subversion
+- Update zlib.3, add docs to Makefile.in to make .pdf out of it
+- Add zlib.3.pdf to distribution
+- Don't set error code in gzerror() if passed pointer is NULL
+- Apply destination directory fixes to CMakeLists.txt [Lowman]
+- Move #cmakedefine's to a new zconf.in.cmakein
+- Restore zconf.h for builds that don't use configure or cmake
+- Add distclean to dummy Makefile for convenience
+- Update and improve INDEX, README, and FAQ
+- Update CMakeLists.txt for the return of zconf.h [Lowman]
+- Update contrib/vstudio/vc9 and vc10 [Vollant]
+- Change libz.dll.a back to libzdll.a in win32/Makefile.gcc
+- Apply license and readme changes to contrib/asm686 [Raiter]
+- Check file name lengths and add -c option in minigzip.c [Li]
+- Update contrib/amd64 and contrib/masmx86/ [Vollant]
+- Avoid use of "eof" parameter in trees.c to not shadow library variable
+- Update make_vms.com for removal of zlibdefs.h [Zinser]
+- Update assembler code and vstudio projects in contrib [Vollant]
+- Remove outdated assembler code contrib/masm686 and contrib/asm586
+- Remove old vc7 and vc8 from contrib/vstudio
+- Update win32/Makefile.msc, add ZLIB_VER_SUBREVISION [Rowe]
+- Fix memory leaks in gzclose_r() and gzclose_w(), file leak in gz_open()
+- Add contrib/gcc_gvmat64 for longest_match and inflate_fast [Vollant]
+- Remove *64 functions from win32/zlib.def (they're not 64-bit yet)
+- Fix bug in void-returning vsprintf() case in gzwrite.c
+- Fix name change from inflate.h in contrib/inflate86/inffas86.c
+- Check if temporary file exists before removing in make_vms.com [Zinser]
+- Fix make install and uninstall for --static option
+- Fix usage of _MSC_VER in gzguts.h and zutil.h [Truta]
+- Update readme.txt in contrib/masmx64 and masmx86 to assemble
+
+Changes in 1.2.3.9 (21 Feb 2010)
+- Expunge gzio.c
+- Move as400 build information to old
+- Fix updates in contrib/minizip and contrib/vstudio
+- Add const to vsnprintf test in configure to avoid warnings [Weigelt]
+- Delete zconf.h (made by configure) [Weigelt]
+- Change zconf.in.h to zconf.h.in per convention [Weigelt]
+- Check for NULL buf in gzgets()
+- Return empty string for gzgets() with len == 1 (like fgets())
+- Fix description of gzgets() in zlib.h for end-of-file, NULL return
+- Update minizip to 1.1 [Vollant]
+- Avoid MSVC loss of data warnings in gzread.c, gzwrite.c
+- Note in zlib.h that gzerror() should be used to distinguish from EOF
+- Remove use of snprintf() from gzlib.c
+- Fix bug in gzseek()
+- Update contrib/vstudio, adding vc9 and vc10 [Kuno, Vollant]
+- Fix zconf.h generation in CMakeLists.txt [Lowman]
+- Improve comments in zconf.h where modified by configure
+
+Changes in 1.2.3.8 (13 Feb 2010)
+- Clean up text files (tabs, trailing whitespace, etc.) [Oberhumer]
+- Use z_off64_t in gz_zero() and gz_skip() to match state->skip
+- Avoid comparison problem when sizeof(int) == sizeof(z_off64_t)
+- Revert to Makefile.in from 1.2.3.6 (live with the clutter)
+- Fix missing error return in gzflush(), add zlib.h note
+- Add *64 functions to zlib.map [Levin]
+- Fix signed/unsigned comparison in gz_comp()
+- Use SFLAGS when testing shared linking in configure
+- Add --64 option to ./configure to use -m64 with gcc
+- Fix ./configure --help to correctly name options
+- Have make fail if a test fails [Levin]
+- Avoid buffer overrun in contrib/masmx64/gvmat64.asm [Simpson]
+- Remove assembler object files from contrib
+
+Changes in 1.2.3.7 (24 Jan 2010)
+- Always gzopen() with O_LARGEFILE if available
+- Fix gzdirect() to work immediately after gzopen() or gzdopen()
+- Make gzdirect() more precise when the state changes while reading
+- Improve zlib.h documentation in many places
+- Catch memory allocation failure in gz_open()
+- Complete close operation if seek forward in gzclose_w() fails
+- Return Z_ERRNO from gzclose_r() if close() fails
+- Return Z_STREAM_ERROR instead of EOF for gzclose() being passed NULL
+- Return zero for gzwrite() errors to match zlib.h description
+- Return -1 on gzputs() error to match zlib.h description
+- Add zconf.in.h to allow recovery from configure modification [Weigelt]
+- Fix static library permissions in Makefile.in [Weigelt]
+- Avoid warnings in configure tests that hide functionality [Weigelt]
+- Add *BSD and DragonFly to Linux case in configure [gentoo 123571]
+- Change libzdll.a to libz.dll.a in win32/Makefile.gcc [gentoo 288212]
+- Avoid access of uninitialized data for first inflateReset2 call [Gomes]
+- Keep object files in subdirectories to reduce the clutter somewhat
+- Remove default Makefile and zlibdefs.h, add dummy Makefile
+- Add new external functions to Z_PREFIX, remove duplicates, z_z_ -> z_
+- Remove zlibdefs.h completely -- modify zconf.h instead
+
+Changes in 1.2.3.6 (17 Jan 2010)
+- Avoid void * arithmetic in gzread.c and gzwrite.c
+- Make compilers happier with const char * for gz_error message
+- Avoid unused parameter warning in inflate.c
+- Avoid signed-unsigned comparison warning in inflate.c
+- Indent #pragma's for traditional C
+- Fix usage of strwinerror() in glib.c, change to gz_strwinerror()
+- Correct email address in configure for system options
+- Update make_vms.com and add make_vms.com to contrib/minizip [Zinser]
+- Update zlib.map [Brown]
+- Fix Makefile.in for Solaris 10 make of example64 and minizip64 [Torok]
+- Apply various fixes to CMakeLists.txt [Lowman]
+- Add checks on len in gzread() and gzwrite()
+- Add error message for no more room for gzungetc()
+- Remove zlib version check in gzwrite()
+- Defer compression of gzprintf() result until need to
+- Use snprintf() in gzdopen() if available
+- Remove USE_MMAP configuration determination (only used by minigzip)
+- Remove examples/pigz.c (available separately)
+- Update examples/gun.c to 1.6
+
+Changes in 1.2.3.5 (8 Jan 2010)
+- Add space after #if in zutil.h for some compilers
+- Fix relatively harmless bug in deflate_fast() [Exarevsky]
+- Fix same problem in deflate_slow()
+- Add $(SHAREDLIBV) to LIBS in Makefile.in [Brown]
+- Add deflate_rle() for faster Z_RLE strategy run-length encoding
+- Add deflate_huff() for faster Z_HUFFMAN_ONLY encoding
+- Change name of "write" variable in inffast.c to avoid library collisions
+- Fix premature EOF from gzread() in gzio.c [Brown]
+- Use zlib header window size if windowBits is 0 in inflateInit2()
+- Remove compressBound() call in deflate.c to avoid linking compress.o
+- Replace use of errno in gz* with functions, support WinCE [Alves]
+- Provide alternative to perror() in minigzip.c for WinCE [Alves]
+- Don't use _vsnprintf on later versions of MSVC [Lowman]
+- Add CMake build script and input file [Lowman]
+- Update contrib/minizip to 1.1 [Svensson, Vollant]
+- Moved nintendods directory from contrib to .
+- Replace gzio.c with a new set of routines with the same functionality
+- Add gzbuffer(), gzoffset(), gzclose_r(), gzclose_w() as part of above
+- Update contrib/minizip to 1.1b
+- Change gzeof() to return 0 on error instead of -1 to agree with zlib.h
+
+Changes in 1.2.3.4 (21 Dec 2009)
+- Use old school .SUFFIXES in Makefile.in for FreeBSD compatibility
+- Update comments in configure and Makefile.in for default --shared
+- Fix test -z's in configure [Marquess]
+- Build examplesh and minigzipsh when not testing
+- Change NULL's to Z_NULL's in deflate.c and in comments in zlib.h
+- Import LDFLAGS from the environment in configure
+- Fix configure to populate SFLAGS with discovered CFLAGS options
+- Adapt make_vms.com to the new Makefile.in [Zinser]
+- Add zlib2ansi script for C++ compilation [Marquess]
+- Add _FILE_OFFSET_BITS=64 test to make test (when applicable)
+- Add AMD64 assembler code for longest match to contrib [Teterin]
+- Include options from $SFLAGS when doing $LDSHARED
+- Simplify 64-bit file support by introducing z_off64_t type
+- Make shared object files in objs directory to work around old Sun cc
+- Use only three-part version number for Darwin shared compiles
+- Add rc option to ar in Makefile.in for when ./configure not run
+- Add -WI,-rpath,. to LDFLAGS for OSF 1 V4*
+- Set LD_LIBRARYN32_PATH for SGI IRIX shared compile
+- Protect against _FILE_OFFSET_BITS being defined when compiling zlib
+- Rename Makefile.in targets allstatic to static and allshared to shared
+- Fix static and shared Makefile.in targets to be independent
+- Correct error return bug in gz_open() by setting state [Brown]
+- Put spaces before ;;'s in configure for better sh compatibility
+- Add pigz.c (parallel implementation of gzip) to examples/
+- Correct constant in crc32.c to UL [Leventhal]
+- Reject negative lengths in crc32_combine()
+- Add inflateReset2() function to work like inflateEnd()/inflateInit2()
+- Include sys/types.h for _LARGEFILE64_SOURCE [Brown]
+- Correct typo in doc/algorithm.txt [Janik]
+- Fix bug in adler32_combine() [Zhu]
+- Catch missing-end-of-block-code error in all inflates and in puff
+ Assures that random input to inflate eventually results in an error
+- Added enough.c (calculation of ENOUGH for inftrees.h) to examples/
+- Update ENOUGH and its usage to reflect discovered bounds
+- Fix gzerror() error report on empty input file [Brown]
+- Add ush casts in trees.c to avoid pedantic runtime errors
+- Fix typo in zlib.h uncompress() description [Reiss]
+- Correct inflate() comments with regard to automatic header detection
+- Remove deprecation comment on Z_PARTIAL_FLUSH (it stays)
+- Put new version of gzlog (2.0) in examples with interruption recovery
+- Add puff compile option to permit invalid distance-too-far streams
+- Add puff TEST command options, ability to read piped input
+- Prototype the *64 functions in zlib.h when _FILE_OFFSET_BITS == 64, but
+ _LARGEFILE64_SOURCE not defined
+- Fix Z_FULL_FLUSH to truly erase the past by resetting s->strstart
+- Fix deflateSetDictionary() to use all 32K for output consistency
+- Remove extraneous #define MIN_LOOKAHEAD in deflate.c (in deflate.h)
+- Clear bytes after deflate lookahead to avoid use of uninitialized data
+- Change a limit in inftrees.c to be more transparent to Coverity Prevent
+- Update win32/zlib.def with exported symbols from zlib.h
+- Correct spelling error in zlib.h [Willem]
+- Allow Z_BLOCK for deflate() to force a new block
+- Allow negative bits in inflatePrime() to delete existing bit buffer
+- Add Z_TREES flush option to inflate() to return at end of trees
+- Add inflateMark() to return current state information for random access
+- Add Makefile for NintendoDS to contrib [Costa]
+- Add -w in configure compile tests to avoid spurious warnings [Beucler]
+- Fix typos in zlib.h comments for deflateSetDictionary()
+- Fix EOF detection in transparent gzread() [Maier]
+
+Changes in 1.2.3.3 (2 October 2006)
+- Make --shared the default for configure, add a --static option
+- Add compile option to permit invalid distance-too-far streams
+- Add inflateUndermine() function which is required to enable above
+- Remove use of "this" variable name for C++ compatibility [Marquess]
+- Add testing of shared library in make test, if shared library built
+- Use ftello() and fseeko() if available instead of ftell() and fseek()
+- Provide two versions of all functions that use the z_off_t type for
+ binary compatibility -- a normal version and a 64-bit offset version,
+ per the Large File Support Extension when _LARGEFILE64_SOURCE is
+ defined; use the 64-bit versions by default when _FILE_OFFSET_BITS
+ is defined to be 64
+- Add a --uname= option to configure to perhaps help with cross-compiling
+
+Changes in 1.2.3.2 (3 September 2006)
+- Turn off silly Borland warnings [Hay]
+- Use off64_t and define _LARGEFILE64_SOURCE when present
+- Fix missing dependency on inffixed.h in Makefile.in
+- Rig configure --shared to build both shared and static [Teredesai, Truta]
+- Remove zconf.in.h and instead create a new zlibdefs.h file
+- Fix contrib/minizip/unzip.c non-encrypted after encrypted [Vollant]
+- Add treebuild.xml (see http://treebuild.metux.de/) [Weigelt]
+
+Changes in 1.2.3.1 (16 August 2006)
+- Add watcom directory with OpenWatcom make files [Daniel]
+- Remove #undef of FAR in zconf.in.h for MVS [Fedtke]
+- Update make_vms.com [Zinser]
+- Use -fPIC for shared build in configure [Teredesai, Nicholson]
+- Use only major version number for libz.so on IRIX and OSF1 [Reinholdtsen]
+- Use fdopen() (not _fdopen()) for Interix in zutil.h [BŠck]
+- Add some FAQ entries about the contrib directory
+- Update the MVS question in the FAQ
+- Avoid extraneous reads after EOF in gzio.c [Brown]
+- Correct spelling of "successfully" in gzio.c [Randers-Pehrson]
+- Add comments to zlib.h about gzerror() usage [Brown]
+- Set extra flags in gzip header in gzopen() like deflate() does
+- Make configure options more compatible with double-dash conventions
+ [Weigelt]
+- Clean up compilation under Solaris SunStudio cc [Rowe, Reinholdtsen]
+- Fix uninstall target in Makefile.in [Truta]
+- Add pkgconfig support [Weigelt]
+- Use $(DESTDIR) macro in Makefile.in [Reinholdtsen, Weigelt]
+- Replace set_data_type() with a more accurate detect_data_type() in
+ trees.c, according to the txtvsbin.txt document [Truta]
+- Swap the order of #include <stdio.h> and #include "zlib.h" in
+ gzio.c, example.c and minigzip.c [Truta]
+- Shut up annoying VS2005 warnings about standard C deprecation [Rowe,
+ Truta] (where?)
+- Fix target "clean" from win32/Makefile.bor [Truta]
+- Create .pdb and .manifest files in win32/makefile.msc [Ziegler, Rowe]
+- Update zlib www home address in win32/DLL_FAQ.txt [Truta]
+- Update contrib/masmx86/inffas32.asm for VS2005 [Vollant, Van Wassenhove]
+- Enable browse info in the "Debug" and "ASM Debug" configurations in
+ the Visual C++ 6 project, and set (non-ASM) "Debug" as default [Truta]
+- Add pkgconfig support [Weigelt]
+- Add ZLIB_VER_MAJOR, ZLIB_VER_MINOR and ZLIB_VER_REVISION in zlib.h,
+ for use in win32/zlib1.rc [Polushin, Rowe, Truta]
+- Add a document that explains the new text detection scheme to
+ doc/txtvsbin.txt [Truta]
+- Add rfc1950.txt, rfc1951.txt and rfc1952.txt to doc/ [Truta]
+- Move algorithm.txt into doc/ [Truta]
+- Synchronize FAQ with website
+- Fix compressBound(), was low for some pathological cases [Fearnley]
+- Take into account wrapper variations in deflateBound()
+- Set examples/zpipe.c input and output to binary mode for Windows
+- Update examples/zlib_how.html with new zpipe.c (also web site)
+- Fix some warnings in examples/gzlog.c and examples/zran.c (it seems
+ that gcc became pickier in 4.0)
+- Add zlib.map for Linux: "All symbols from zlib-1.1.4 remain
+ un-versioned, the patch adds versioning only for symbols introduced in
+ zlib-1.2.0 or later. It also declares as local those symbols which are
+ not designed to be exported." [Levin]
+- Update Z_PREFIX list in zconf.in.h, add --zprefix option to configure
+- Do not initialize global static by default in trees.c, add a response
+ NO_INIT_GLOBAL_POINTERS to initialize them if needed [Marquess]
+- Don't use strerror() in gzio.c under WinCE [Yakimov]
+- Don't use errno.h in zutil.h under WinCE [Yakimov]
+- Move arguments for AR to its usage to allow replacing ar [Marot]
+- Add HAVE_VISIBILITY_PRAGMA in zconf.in.h for Mozilla [Randers-Pehrson]
+- Improve inflateInit() and inflateInit2() documentation
+- Fix structure size comment in inflate.h
+- Change configure help option from --h* to --help [Santos]
+
Changes in 1.2.3 (18 July 2005)
- Apply security vulnerability fixes to contrib/infback9 as well
- Clean up some text files (carriage returns, trailing space)
@@ -13,7 +366,7 @@ Changes in 1.2.2.4 (11 July 2005)
compile
- Fix some spelling errors in comments [Betts]
- Correct inflateInit2() error return documentation in zlib.h
-- Added zran.c example of compressed data random access to examples
+- Add zran.c example of compressed data random access to examples
directory, shows use of inflatePrime()
- Fix cast for assignments to strm->state in inflate.c and infback.c
- Fix zlibCompileFlags() in zutil.c to use 1L for long shifts [Oberhumer]
diff --git a/src/3rdparty/zlib/FAQ b/src/3rdparty/zlib/FAQ
index 441d910..1a22750 100644
--- a/src/3rdparty/zlib/FAQ
+++ b/src/3rdparty/zlib/FAQ
@@ -3,8 +3,8 @@
If your question is not there, please check the zlib home page
-http://www.zlib.org which may have more recent information.
-The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
+http://zlib.net/ which may have more recent information.
+The lastest zlib FAQ is at http://zlib.net/zlib_faq.html
1. Is zlib Y2K-compliant?
@@ -13,54 +13,51 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
2. Where can I get a Windows DLL version?
- The zlib sources can be compiled without change to produce a DLL.
- See the file win32/DLL_FAQ.txt in the zlib distribution.
- Pointers to the precompiled DLL are found in the zlib web site at
- http://www.zlib.org.
+ The zlib sources can be compiled without change to produce a DLL. See the
+ file win32/DLL_FAQ.txt in the zlib distribution. Pointers to the
+ precompiled DLL are found in the zlib web site at http://zlib.net/ .
3. Where can I get a Visual Basic interface to zlib?
See
- * http://www.dogma.net/markn/articles/zlibtool/zlibtool.htm
- * contrib/visual-basic.txt in the zlib distribution
+ * http://marknelson.us/1997/01/01/zlib-engine/
* win32/DLL_FAQ.txt in the zlib distribution
4. compress() returns Z_BUF_ERROR.
- Make sure that before the call of compress, the length of the compressed
- buffer is equal to the total size of the compressed buffer and not
- zero. For Visual Basic, check that this parameter is passed by reference
+ Make sure that before the call of compress(), the length of the compressed
+ buffer is equal to the available size of the compressed buffer and not
+ zero. For Visual Basic, check that this parameter is passed by reference
("as any"), not by value ("as long").
5. deflate() or inflate() returns Z_BUF_ERROR.
- Before making the call, make sure that avail_in and avail_out are not
- zero. When setting the parameter flush equal to Z_FINISH, also make sure
- that avail_out is big enough to allow processing all pending input.
- Note that a Z_BUF_ERROR is not fatal--another call to deflate() or
- inflate() can be made with more input or output space. A Z_BUF_ERROR
- may in fact be unavoidable depending on how the functions are used, since
- it is not possible to tell whether or not there is more output pending
- when strm.avail_out returns with zero.
+ Before making the call, make sure that avail_in and avail_out are not zero.
+ When setting the parameter flush equal to Z_FINISH, also make sure that
+ avail_out is big enough to allow processing all pending input. Note that a
+ Z_BUF_ERROR is not fatal--another call to deflate() or inflate() can be
+ made with more input or output space. A Z_BUF_ERROR may in fact be
+ unavoidable depending on how the functions are used, since it is not
+ possible to tell whether or not there is more output pending when
+ strm.avail_out returns with zero. See http://zlib.net/zlib_how.html for a
+ heavily annotated example.
6. Where's the zlib documentation (man pages, etc.)?
- It's in zlib.h for the moment, and Francis S. Lin has converted it to a
- web page zlib.html. Volunteers to transform this to Unix-style man pages,
- please contact us (zlib@gzip.org). Examples of zlib usage are in the files
- example.c and minigzip.c.
+ It's in zlib.h . Examples of zlib usage are in the files example.c and
+ minigzip.c, with more in examples/ .
7. Why don't you use GNU autoconf or libtool or ...?
- Because we would like to keep zlib as a very small and simple
- package. zlib is rather portable and doesn't need much configuration.
+ Because we would like to keep zlib as a very small and simple package.
+ zlib is rather portable and doesn't need much configuration.
8. I found a bug in zlib.
- Most of the time, such problems are due to an incorrect usage of
- zlib. Please try to reproduce the problem with a small program and send
- the corresponding source to us at zlib@gzip.org . Do not send
- multi-megabyte data files without prior agreement.
+ Most of the time, such problems are due to an incorrect usage of zlib.
+ Please try to reproduce the problem with a small program and send the
+ corresponding source to us at zlib@gzip.org . Do not send multi-megabyte
+ data files without prior agreement.
9. Why do I get "undefined reference to gzputc"?
@@ -82,7 +79,7 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
12. Can zlib handle .Z files?
- No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
+ No, sorry. You have to spawn an uncompress or gunzip subprocess, or adapt
the code of uncompress on your own.
13. How can I make a Unix shared library?
@@ -99,8 +96,10 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
However, many flavors of Unix come with a shared zlib already installed.
Before going to the trouble of compiling a shared version of zlib and
- trying to install it, you may want to check if it's already there! If you
- can #include <zlib.h>, it's there. The -lz option will probably link to it.
+ trying to install it, you may want to check if it's already there! If you
+ can #include <zlib.h>, it's there. The -lz option will probably link to
+ it. You can check the version at the top of zlib.h or with the
+ ZLIB_VERSION symbol defined in zlib.h .
15. I have a question about OttoPDF.
@@ -109,8 +108,8 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
16. Can zlib decode Flate data in an Adobe PDF file?
- Yes. See http://www.fastio.com/ (ClibPDF), or http://www.pdflib.com/ .
- To modify PDF forms, see http://sourceforge.net/projects/acroformtool/ .
+ Yes. See http://www.pdflib.com/ . To modify PDF forms, see
+ http://sourceforge.net/projects/acroformtool/ .
17. Why am I getting this "register_frame_info not found" error on Solaris?
@@ -121,67 +120,67 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
symbol __register_frame_info: referenced symbol not found
The symbol __register_frame_info is not part of zlib, it is generated by
- the C compiler (cc or gcc). You must recompile applications using zlib
- which have this problem. This problem is specific to Solaris. See
+ the C compiler (cc or gcc). You must recompile applications using zlib
+ which have this problem. This problem is specific to Solaris. See
http://www.sunfreeware.com for Solaris versions of zlib and applications
using zlib.
18. Why does gzip give an error on a file I make with compress/deflate?
The compress and deflate functions produce data in the zlib format, which
- is different and incompatible with the gzip format. The gz* functions in
- zlib on the other hand use the gzip format. Both the zlib and gzip
- formats use the same compressed data format internally, but have different
- headers and trailers around the compressed data.
+ is different and incompatible with the gzip format. The gz* functions in
+ zlib on the other hand use the gzip format. Both the zlib and gzip formats
+ use the same compressed data format internally, but have different headers
+ and trailers around the compressed data.
19. Ok, so why are there two different formats?
- The gzip format was designed to retain the directory information about
- a single file, such as the name and last modification date. The zlib
- format on the other hand was designed for in-memory and communication
- channel applications, and has a much more compact header and trailer and
- uses a faster integrity check than gzip.
+ The gzip format was designed to retain the directory information about a
+ single file, such as the name and last modification date. The zlib format
+ on the other hand was designed for in-memory and communication channel
+ applications, and has a much more compact header and trailer and uses a
+ faster integrity check than gzip.
20. Well that's nice, but how do I make a gzip file in memory?
You can request that deflate write the gzip format instead of the zlib
- format using deflateInit2(). You can also request that inflate decode
- the gzip format using inflateInit2(). Read zlib.h for more details.
+ format using deflateInit2(). You can also request that inflate decode the
+ gzip format using inflateInit2(). Read zlib.h for more details.
21. Is zlib thread-safe?
- Yes. However any library routines that zlib uses and any application-
- provided memory allocation routines must also be thread-safe. zlib's gz*
+ Yes. However any library routines that zlib uses and any application-
+ provided memory allocation routines must also be thread-safe. zlib's gz*
functions use stdio library routines, and most of zlib's functions use the
- library memory allocation routines by default. zlib's Init functions allow
- for the application to provide custom memory allocation routines.
+ library memory allocation routines by default. zlib's *Init* functions
+ allow for the application to provide custom memory allocation routines.
Of course, you should only operate on any given zlib or gzip stream from a
single thread at a time.
22. Can I use zlib in my commercial application?
- Yes. Please read the license in zlib.h.
+ Yes. Please read the license in zlib.h.
23. Is zlib under the GNU license?
- No. Please read the license in zlib.h.
+ No. Please read the license in zlib.h.
24. The license says that altered source versions must be "plainly marked". So
what exactly do I need to do to meet that requirement?
- You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
+ You need to change the ZLIB_VERSION and ZLIB_VERNUM #defines in zlib.h. In
particular, the final version number needs to be changed to "f", and an
- identification string should be appended to ZLIB_VERSION. Version numbers
+ identification string should be appended to ZLIB_VERSION. Version numbers
x.x.x.f are reserved for modifications to zlib by others than the zlib
- maintainers. For example, if the version of the base zlib you are altering
+ maintainers. For example, if the version of the base zlib you are altering
is "1.2.3.4", then in zlib.h you should change ZLIB_VERNUM to 0x123f, and
- ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
+ ZLIB_VERSION to something like "1.2.3.f-zachary-mods-v3". You can also
update the version strings in deflate.c and inftrees.c.
For altered source distributions, you should also note the origin and
nature of the changes in zlib.h, as well as in ChangeLog and README, along
- with the dates of the alterations. The origin should include at least your
+ with the dates of the alterations. The origin should include at least your
name (or your company's name), and an email address to contact for help or
issues with the library.
@@ -197,105 +196,112 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
26. Will zlib work on a 64-bit machine?
- It should. It has been tested on 64-bit machines, and has no dependence
- on any data types being limited to 32-bits in length. If you have any
+ Yes. It has been tested on 64-bit machines, and has no dependence on any
+ data types being limited to 32-bits in length. If you have any
difficulties, please provide a complete problem report to zlib@gzip.org
27. Will zlib decompress data from the PKWare Data Compression Library?
- No. The PKWare DCL uses a completely different compressed data format
- than does PKZIP and zlib. However, you can look in zlib's contrib/blast
+ No. The PKWare DCL uses a completely different compressed data format than
+ does PKZIP and zlib. However, you can look in zlib's contrib/blast
directory for a possible solution to your problem.
28. Can I access data randomly in a compressed stream?
- No, not without some preparation. If when compressing you periodically
- use Z_FULL_FLUSH, carefully write all the pending data at those points,
- and keep an index of those locations, then you can start decompression
- at those points. You have to be careful to not use Z_FULL_FLUSH too
- often, since it can significantly degrade compression.
+ No, not without some preparation. If when compressing you periodically use
+ Z_FULL_FLUSH, carefully write all the pending data at those points, and
+ keep an index of those locations, then you can start decompression at those
+ points. You have to be careful to not use Z_FULL_FLUSH too often, since it
+ can significantly degrade compression. Alternatively, you can scan a
+ deflate stream once to generate an index, and then use that index for
+ random access. See examples/zran.c .
29. Does zlib work on MVS, OS/390, CICS, etc.?
- We don't know for sure. We have heard occasional reports of success on
- these systems. If you do use it on one of these, please provide us with
- a report, instructions, and patches that we can reference when we get
- these questions. Thanks.
+ It has in the past, but we have not heard of any recent evidence. There
+ were working ports of zlib 1.1.4 to MVS, but those links no longer work.
+ If you know of recent, successful applications of zlib on these operating
+ systems, please let us know. Thanks.
-30. Is there some simpler, easier to read version of inflate I can look at
- to understand the deflate format?
+30. Is there some simpler, easier to read version of inflate I can look at to
+ understand the deflate format?
- First off, you should read RFC 1951. Second, yes. Look in zlib's
+ First off, you should read RFC 1951. Second, yes. Look in zlib's
contrib/puff directory.
31. Does zlib infringe on any patents?
- As far as we know, no. In fact, that was originally the whole point behind
- zlib. Look here for some more information:
+ As far as we know, no. In fact, that was originally the whole point behind
+ zlib. Look here for some more information:
http://www.gzip.org/#faq11
32. Can zlib work with greater than 4 GB of data?
- Yes. inflate() and deflate() will process any amount of data correctly.
+ Yes. inflate() and deflate() will process any amount of data correctly.
Each call of inflate() or deflate() is limited to input and output chunks
of the maximum value that can be stored in the compiler's "unsigned int"
- type, but there is no limit to the number of chunks. Note however that the
- strm.total_in and strm_total_out counters may be limited to 4 GB. These
+ type, but there is no limit to the number of chunks. Note however that the
+ strm.total_in and strm_total_out counters may be limited to 4 GB. These
counters are provided as a convenience and are not used internally by
- inflate() or deflate(). The application can easily set up its own counters
+ inflate() or deflate(). The application can easily set up its own counters
updated after each call of inflate() or deflate() to count beyond 4 GB.
compress() and uncompress() may be limited to 4 GB, since they operate in a
- single call. gzseek() and gztell() may be limited to 4 GB depending on how
- zlib is compiled. See the zlibCompileFlags() function in zlib.h.
+ single call. gzseek() and gztell() may be limited to 4 GB depending on how
+ zlib is compiled. See the zlibCompileFlags() function in zlib.h.
- The word "may" appears several times above since there is a 4 GB limit
- only if the compiler's "long" type is 32 bits. If the compiler's "long"
- type is 64 bits, then the limit is 16 exabytes.
+ The word "may" appears several times above since there is a 4 GB limit only
+ if the compiler's "long" type is 32 bits. If the compiler's "long" type is
+ 64 bits, then the limit is 16 exabytes.
33. Does zlib have any security vulnerabilities?
- The only one that we are aware of is potentially in gzprintf(). If zlib
- is compiled to use sprintf() or vsprintf(), then there is no protection
- against a buffer overflow of a 4K string space, other than the caller of
- gzprintf() assuring that the output will not exceed 4K. On the other
- hand, if zlib is compiled to use snprintf() or vsnprintf(), which should
- normally be the case, then there is no vulnerability. The ./configure
- script will display warnings if an insecure variation of sprintf() will
- be used by gzprintf(). Also the zlibCompileFlags() function will return
- information on what variant of sprintf() is used by gzprintf().
+ The only one that we are aware of is potentially in gzprintf(). If zlib is
+ compiled to use sprintf() or vsprintf(), then there is no protection
+ against a buffer overflow of an 8K string space (or other value as set by
+ gzbuffer()), other than the caller of gzprintf() assuring that the output
+ will not exceed 8K. On the other hand, if zlib is compiled to use
+ snprintf() or vsnprintf(), which should normally be the case, then there is
+ no vulnerability. The ./configure script will display warnings if an
+ insecure variation of sprintf() will be used by gzprintf(). Also the
+ zlibCompileFlags() function will return information on what variant of
+ sprintf() is used by gzprintf().
If you don't have snprintf() or vsnprintf() and would like one, you can
find a portable implementation here:
http://www.ijs.si/software/snprintf/
- Note that you should be using the most recent version of zlib. Versions
- 1.1.3 and before were subject to a double-free vulnerability.
+ Note that you should be using the most recent version of zlib. Versions
+ 1.1.3 and before were subject to a double-free vulnerability, and versions
+ 1.2.1 and 1.2.2 were subject to an access exception when decompressing
+ invalid compressed data.
34. Is there a Java version of zlib?
Probably what you want is to use zlib in Java. zlib is already included
as part of the Java SDK in the java.util.zip package. If you really want
a version of zlib written in the Java language, look on the zlib home
- page for links: http://www.zlib.org/
+ page for links: http://zlib.net/ .
35. I get this or that compiler or source-code scanner warning when I crank it
up to maximally-pedantic. Can't you guys write proper code?
Many years ago, we gave up attempting to avoid warnings on every compiler
- in the universe. It just got to be a waste of time, and some compilers
- were downright silly. So now, we simply make sure that the code always
- works.
+ in the universe. It just got to be a waste of time, and some compilers
+ were downright silly as well as contradicted each other. So now, we simply
+ make sure that the code always works.
36. Valgrind (or some similar memory access checker) says that deflate is
performing a conditional jump that depends on an uninitialized value.
Isn't that a bug?
- No. That is intentional for performance reasons, and the output of
- deflate is not affected. This only started showing up recently since
- zlib 1.2.x uses malloc() by default for allocations, whereas earlier
- versions used calloc(), which zeros out the allocated memory.
+ No. That is intentional for performance reasons, and the output of deflate
+ is not affected. This only started showing up recently since zlib 1.2.x
+ uses malloc() by default for allocations, whereas earlier versions used
+ calloc(), which zeros out the allocated memory. Even though the code was
+ correct, versions 1.2.4 and later was changed to not stimulate these
+ checkers.
37. Will zlib read the (insert any ancient or arcane format here) compressed
data format?
@@ -305,20 +311,21 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
38. How can I encrypt/decrypt zip files with zlib?
- zlib doesn't support encryption. The original PKZIP encryption is very weak
- and can be broken with freely available programs. To get strong encryption,
- use GnuPG, http://www.gnupg.org/ , which already includes zlib compression.
- For PKZIP compatible "encryption", look at http://www.info-zip.org/
+ zlib doesn't support encryption. The original PKZIP encryption is very
+ weak and can be broken with freely available programs. To get strong
+ encryption, use GnuPG, http://www.gnupg.org/ , which already includes zlib
+ compression. For PKZIP compatible "encryption", look at
+ http://www.info-zip.org/
39. What's the difference between the "gzip" and "deflate" HTTP 1.1 encodings?
- "gzip" is the gzip format, and "deflate" is the zlib format. They should
- probably have called the second one "zlib" instead to avoid confusion
- with the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
+ "gzip" is the gzip format, and "deflate" is the zlib format. They should
+ probably have called the second one "zlib" instead to avoid confusion with
+ the raw deflate compressed data format. While the HTTP 1.1 RFC 2616
correctly points to the zlib specification in RFC 1950 for the "deflate"
transfer encoding, there have been reports of servers and browsers that
incorrectly produce or expect raw deflate data per the deflate
- specficiation in RFC 1951, most notably Microsoft. So even though the
+ specficiation in RFC 1951, most notably Microsoft. So even though the
"deflate" transfer encoding using the zlib format would be the more
efficient approach (and in fact exactly what the zlib format was designed
for), using the "gzip" transfer encoding is probably more reliable due to
@@ -328,12 +335,32 @@ The lastest zlib FAQ is at http://www.gzip.org/zlib/zlib_faq.html
40. Does zlib support the new "Deflate64" format introduced by PKWare?
- No. PKWare has apparently decided to keep that format proprietary, since
- they have not documented it as they have previous compression formats.
- In any case, the compression improvements are so modest compared to other
- more modern approaches, that it's not worth the effort to implement.
+ No. PKWare has apparently decided to keep that format proprietary, since
+ they have not documented it as they have previous compression formats. In
+ any case, the compression improvements are so modest compared to other more
+ modern approaches, that it's not worth the effort to implement.
-41. Can you please sign these lengthy legal documents and fax them back to us
+41. I'm having a problem with the zip functions in zlib, can you help?
+
+ There are no zip functions in zlib. You are probably using minizip by
+ Giles Vollant, which is found in the contrib directory of zlib. It is not
+ part of zlib. In fact none of the stuff in contrib is part of zlib. The
+ files in there are not supported by the zlib authors. You need to contact
+ the authors of the respective contribution for help.
+
+42. The match.asm code in contrib is under the GNU General Public License.
+ Since it's part of zlib, doesn't that mean that all of zlib falls under the
+ GNU GPL?
+
+ No. The files in contrib are not part of zlib. They were contributed by
+ other authors and are provided as a convenience to the user within the zlib
+ distribution. Each item in contrib has its own license.
+
+43. Is zlib subject to export controls? What is its ECCN?
+
+ zlib is not subject to export controls, and so is classified as EAR99.
+
+44. Can you please sign these lengthy legal documents and fax them back to us
so that we can use your software in our product?
No. Go away. Shoo.
diff --git a/src/3rdparty/zlib/INDEX b/src/3rdparty/zlib/INDEX
index 0587e59..f6c51ca 100644
--- a/src/3rdparty/zlib/INDEX
+++ b/src/3rdparty/zlib/INDEX
@@ -1,23 +1,32 @@
+CMakeLists.txt cmake build file
ChangeLog history of changes
FAQ Frequently Asked Questions about zlib
INDEX this file
-Makefile makefile for Unix (generated by configure)
-Makefile.in makefile for Unix (template for configure)
+Makefile dummy Makefile that tells you to ./configure
+Makefile.in template for Unix Makefile
README guess what
-algorithm.txt description of the (de)compression algorithm
configure configure script for Unix
-zconf.in.h template for zconf.h (used by configure)
+make_vms.com makefile for VMS
+treebuild.xml XML description of source file dependencies
+zconf.h.cmakein zconf.h template for cmake
+zconf.h.in zconf.h template for configure
+zlib.3 Man page for zlib
+zlib.3.pdf Man page in PDF format
+zlib.map Linux symbol information
+zlib.pc.in Template for pkg-config descriptor
+zlib2ansi perl script to convert source files for C++ compilation
amiga/ makefiles for Amiga SAS C
-as400/ makefiles for IBM AS/400
+doc/ documentation for formats and algorithms
msdos/ makefiles for MSDOS
+nintendods/ makefile for Nintendo DS
old/ makefiles for various architectures and zlib documentation
files that have not yet been updated for zlib 1.2.x
-projects/ projects for various Integrated Development Environments
qnx/ makefiles for QNX
+watcom/ makefiles for OpenWatcom
win32/ makefiles for Windows
- zlib public header files (must be kept):
+ zlib public header files (required for library use):
zconf.h
zlib.h
@@ -28,7 +37,11 @@ crc32.c
crc32.h
deflate.c
deflate.h
-gzio.c
+gzclose.c
+gzguts.h
+gzlib.c
+gzread.c
+gzwrite.c
infback.c
inffast.c
inffast.h
@@ -46,6 +59,7 @@ zutil.h
source files for sample programs:
example.c
minigzip.c
+See examples/README.examples for more
unsupported contribution by third parties
See contrib/README.contrib
diff --git a/src/3rdparty/zlib/Makefile b/src/3rdparty/zlib/Makefile
deleted file mode 100644
index 2fd6e45..0000000
--- a/src/3rdparty/zlib/Makefile
+++ /dev/null
@@ -1,154 +0,0 @@
-# Makefile for zlib
-# Copyright (C) 1995-2005 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-# ./configure; make test
-# The call of configure is optional if you don't have special requirements
-# If you wish to build zlib as a shared library, use: ./configure -s
-
-# To use the asm code, type:
-# cp contrib/asm?86/match.S ./match.S
-# make LOC=-DASMV OBJA=match.o
-
-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
-# make install
-# To install in $HOME instead of /usr/local, use:
-# make install prefix=$HOME
-
-CC=cc
-
-CFLAGS=-O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-# -Wstrict-prototypes -Wmissing-prototypes
-
-LDFLAGS=libz.a
-LDSHARED=$(CC)
-CPP=$(CC) -E
-
-LIBS=libz.a
-SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.3
-SHAREDLIBM=libz.so.1
-
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
-SHELL=/bin/sh
-EXE=
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-libdir = ${exec_prefix}/lib
-includedir = ${prefix}/include
-mandir = ${prefix}/share/man
-man3dir = ${mandir}/man3
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
- zutil.o inflate.o infback.o inftrees.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example$(EXE) minigzip$(EXE)
-
-check: test
-test: all
- @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
- echo hello world | ./minigzip | ./minigzip -d || \
- echo ' *** minigzip test FAILED ***' ; \
- if ./example; then \
- echo ' *** zlib test OK ***'; \
- else \
- echo ' *** zlib test FAILED ***'; \
- fi
-
-libz.a: $(OBJS) $(OBJA)
- $(AR) $@ $(OBJS) $(OBJA)
- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-match.o: match.S
- $(CPP) match.S > _match.s
- $(CC) -c _match.s
- mv _match.o match.o
- rm -f _match.s
-
-$(SHAREDLIBV): $(OBJS)
- $(LDSHARED) -o $@ $(OBJS)
- rm -f $(SHAREDLIB) $(SHAREDLIBM)
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIBM)
-
-example$(EXE): example.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip$(EXE): minigzip.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-install: $(LIBS)
- -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
- -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
- -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
- -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi
- cp zlib.h zconf.h $(includedir)
- chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
- cp $(LIBS) $(libdir)
- cd $(libdir); chmod 755 $(LIBS)
- -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
- cd $(libdir); if test -f $(SHAREDLIBV); then \
- rm -f $(SHAREDLIB) $(SHAREDLIBM); \
- ln -s $(SHAREDLIBV) $(SHAREDLIB); \
- ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
- (ldconfig || true) >/dev/null 2>&1; \
- fi
- cp zlib.3 $(man3dir)
- chmod 644 $(man3dir)/zlib.3
-# The ranlib in install is needed on NeXTSTEP which checks file times
-# ldconfig is for Linux
-
-uninstall:
- cd $(includedir); \
- cd $(libdir); rm -f libz.a; \
- if test -f $(SHAREDLIBV); then \
- rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
- fi
- cd $(man3dir); rm -f zlib.3
-
-mostlyclean: clean
-clean:
- rm -f *.o *~ example$(EXE) minigzip$(EXE) \
- libz.* foo.gz so_locations \
- _match.s maketree contrib/infback9/*.o
-
-maintainer-clean: distclean
-distclean: clean
- cp -p Makefile.in Makefile
- cp -p zconf.in.h zconf.h
- rm -f .DS_Store
-
-tags:
- etags *.[ch]
-
-depend:
- makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/src/3rdparty/zlib/Makefile.in b/src/3rdparty/zlib/Makefile.in
deleted file mode 100644
index 2fd6e45..0000000
--- a/src/3rdparty/zlib/Makefile.in
+++ /dev/null
@@ -1,154 +0,0 @@
-# Makefile for zlib
-# Copyright (C) 1995-2005 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile and test, type:
-# ./configure; make test
-# The call of configure is optional if you don't have special requirements
-# If you wish to build zlib as a shared library, use: ./configure -s
-
-# To use the asm code, type:
-# cp contrib/asm?86/match.S ./match.S
-# make LOC=-DASMV OBJA=match.o
-
-# To install /usr/local/lib/libz.* and /usr/local/include/zlib.h, type:
-# make install
-# To install in $HOME instead of /usr/local, use:
-# make install prefix=$HOME
-
-CC=cc
-
-CFLAGS=-O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-g -DDEBUG
-#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
-# -Wstrict-prototypes -Wmissing-prototypes
-
-LDFLAGS=libz.a
-LDSHARED=$(CC)
-CPP=$(CC) -E
-
-LIBS=libz.a
-SHAREDLIB=libz.so
-SHAREDLIBV=libz.so.1.2.3
-SHAREDLIBM=libz.so.1
-
-AR=ar rc
-RANLIB=ranlib
-TAR=tar
-SHELL=/bin/sh
-EXE=
-
-prefix = /usr/local
-exec_prefix = ${prefix}
-libdir = ${exec_prefix}/lib
-includedir = ${prefix}/include
-mandir = ${prefix}/share/man
-man3dir = ${mandir}/man3
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
- zutil.o inflate.o infback.o inftrees.o inffast.o
-
-OBJA =
-# to use the asm code: make OBJA=match.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example$(EXE) minigzip$(EXE)
-
-check: test
-test: all
- @LD_LIBRARY_PATH=.:$(LD_LIBRARY_PATH) ; export LD_LIBRARY_PATH; \
- echo hello world | ./minigzip | ./minigzip -d || \
- echo ' *** minigzip test FAILED ***' ; \
- if ./example; then \
- echo ' *** zlib test OK ***'; \
- else \
- echo ' *** zlib test FAILED ***'; \
- fi
-
-libz.a: $(OBJS) $(OBJA)
- $(AR) $@ $(OBJS) $(OBJA)
- -@ ($(RANLIB) $@ || true) >/dev/null 2>&1
-
-match.o: match.S
- $(CPP) match.S > _match.s
- $(CC) -c _match.s
- mv _match.o match.o
- rm -f _match.s
-
-$(SHAREDLIBV): $(OBJS)
- $(LDSHARED) -o $@ $(OBJS)
- rm -f $(SHAREDLIB) $(SHAREDLIBM)
- ln -s $@ $(SHAREDLIB)
- ln -s $@ $(SHAREDLIBM)
-
-example$(EXE): example.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ example.o $(LDFLAGS)
-
-minigzip$(EXE): minigzip.o $(LIBS)
- $(CC) $(CFLAGS) -o $@ minigzip.o $(LDFLAGS)
-
-install: $(LIBS)
- -@if [ ! -d $(exec_prefix) ]; then mkdir -p $(exec_prefix); fi
- -@if [ ! -d $(includedir) ]; then mkdir -p $(includedir); fi
- -@if [ ! -d $(libdir) ]; then mkdir -p $(libdir); fi
- -@if [ ! -d $(man3dir) ]; then mkdir -p $(man3dir); fi
- cp zlib.h zconf.h $(includedir)
- chmod 644 $(includedir)/zlib.h $(includedir)/zconf.h
- cp $(LIBS) $(libdir)
- cd $(libdir); chmod 755 $(LIBS)
- -@(cd $(libdir); $(RANLIB) libz.a || true) >/dev/null 2>&1
- cd $(libdir); if test -f $(SHAREDLIBV); then \
- rm -f $(SHAREDLIB) $(SHAREDLIBM); \
- ln -s $(SHAREDLIBV) $(SHAREDLIB); \
- ln -s $(SHAREDLIBV) $(SHAREDLIBM); \
- (ldconfig || true) >/dev/null 2>&1; \
- fi
- cp zlib.3 $(man3dir)
- chmod 644 $(man3dir)/zlib.3
-# The ranlib in install is needed on NeXTSTEP which checks file times
-# ldconfig is for Linux
-
-uninstall:
- cd $(includedir); \
- cd $(libdir); rm -f libz.a; \
- if test -f $(SHAREDLIBV); then \
- rm -f $(SHAREDLIBV) $(SHAREDLIB) $(SHAREDLIBM); \
- fi
- cd $(man3dir); rm -f zlib.3
-
-mostlyclean: clean
-clean:
- rm -f *.o *~ example$(EXE) minigzip$(EXE) \
- libz.* foo.gz so_locations \
- _match.s maketree contrib/infback9/*.o
-
-maintainer-clean: distclean
-distclean: clean
- cp -p Makefile.in Makefile
- cp -p zconf.in.h zconf.h
- rm -f .DS_Store
-
-tags:
- etags *.[ch]
-
-depend:
- makedepend -- $(CFLAGS) -- *.[ch]
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/src/3rdparty/zlib/README b/src/3rdparty/zlib/README
index 758cc50..d4219bf 100644
--- a/src/3rdparty/zlib/README
+++ b/src/3rdparty/zlib/README
@@ -1,56 +1,52 @@
ZLIB DATA COMPRESSION LIBRARY
-zlib 1.2.3 is a general purpose data compression library. All the code is
+zlib 1.2.5 is a general purpose data compression library. All the code is
thread safe. The data format used by the zlib library is described by RFCs
(Request for Comments) 1950 to 1952 in the files
http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format)
-and rfc1952.txt (gzip format). These documents are also available in other
-formats from ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
+and rfc1952.txt (gzip format).
All functions of the compression library are documented in the file zlib.h
-(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
+(volunteer to write man pages welcome, contact zlib@gzip.org). A usage example
of the library is given in the file example.c which also tests that the library
-is working correctly. Another example is given in the file minigzip.c. The
+is working correctly. Another example is given in the file minigzip.c. The
compression library itself is composed of all source files except example.c and
minigzip.c.
To compile all files and run the test program, follow the instructions given at
-the top of Makefile. In short "make test; make install" should work for most
-machines. For Unix: "./configure; make test; make install". For MSDOS, use one
-of the special makefiles such as Makefile.msc. For VMS, use make_vms.com.
+the top of Makefile.in. In short "./configure; make test", and if that goes
+well, "make install" should work for most flavors of Unix. For Windows, use one
+of the special makefiles in win32/ or contrib/vstudio/ . For VMS, use
+make_vms.com.
Questions about zlib should be sent to <zlib@gzip.org>, or to Gilles Vollant
-<info@winimage.com> for the Windows DLL version. The zlib home page is
-http://www.zlib.org or http://www.gzip.org/zlib/ Before reporting a problem,
-please check this site to verify that you have the latest version of zlib;
-otherwise get the latest version and check whether the problem still exists or
-not.
+<info@winimage.com> for the Windows DLL version. The zlib home page is
+http://zlib.net/ . Before reporting a problem, please check this site to
+verify that you have the latest version of zlib; otherwise get the latest
+version and check whether the problem still exists or not.
-PLEASE read the zlib FAQ http://www.gzip.org/zlib/zlib_faq.html before asking
-for help.
+PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
-Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
-issue of Dr. Dobb's Journal; a copy of the article is available in
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
+Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
+issue of Dr. Dobb's Journal; a copy of the article is available at
+http://marknelson.us/1997/01/01/zlib-engine/ .
-The changes made in version 1.2.3 are documented in the file ChangeLog.
+The changes made in version 1.2.5 are documented in the file ChangeLog.
-Unsupported third party contributions are provided in directory "contrib".
+Unsupported third party contributions are provided in directory contrib/ .
-A Java implementation of zlib is available in the Java Development Kit
-http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html
-See the zlib home page http://www.zlib.org for details.
+zlib is available in Java using the java.util.zip package, documented at
+http://java.sun.com/developer/technicalArticles/Programming/compression/ .
-A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is in the
-CPAN (Comprehensive Perl Archive Network) sites
-http://www.cpan.org/modules/by-module/Compress/
+A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is available
+at CPAN (Comprehensive Perl Archive Network) sites, including
+http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
available in Python 1.5 and later versions, see
-http://www.python.org/doc/lib/module-zlib.html
+http://www.python.org/doc/lib/module-zlib.html .
-A zlib binding for TCL written by Andreas Kupries <a.kupries@westend.com> is
-availlable at http://www.oche.de/~akupries/soft/trf/trf_zip.html
+zlib is built into tcl: http://wiki.tcl.tk/4610 .
An experimental package to read and write files in .zip format, written on top
of zlib by Gilles Vollant <info@winimage.com>, is available in the
@@ -74,25 +70,21 @@ Notes for some targets:
- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
other compilers. Use "make test" to check your compiler.
-- gzdopen is not supported on RISCOS, BEOS and by some Mac compilers.
+- gzdopen is not supported on RISCOS or BEOS.
- For PalmOs, see http://palmzlib.sourceforge.net/
-- When building a shared, i.e. dynamic library on Mac OS X, the library must be
- installed before testing (do "make install" before "make test"), since the
- library location is specified in the library.
-
Acknowledgments:
- The deflate format used by zlib was defined by Phil Katz. The deflate
- and zlib specifications were written by L. Peter Deutsch. Thanks to all the
- people who reported problems and suggested various improvements in zlib;
- they are too numerous to cite here.
+ The deflate format used by zlib was defined by Phil Katz. The deflate and
+ zlib specifications were written by L. Peter Deutsch. Thanks to all the
+ people who reported problems and suggested various improvements in zlib; they
+ are too numerous to cite here.
Copyright notice:
- (C) 1995-2004 Jean-loup Gailly and Mark Adler
+ (C) 1995-2010 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -113,13 +105,11 @@ Copyright notice:
Jean-loup Gailly Mark Adler
jloup@gzip.org madler@alumni.caltech.edu
-If you use the zlib library in a product, we would appreciate *not*
-receiving lengthy legal documents to sign. The sources are provided
-for free but without warranty of any kind. The library has been
-entirely written by Jean-loup Gailly and Mark Adler; it does not
-include third-party code.
+If you use the zlib library in a product, we would appreciate *not* receiving
+lengthy legal documents to sign. The sources are provided for free but without
+warranty of any kind. The library has been entirely written by Jean-loup
+Gailly and Mark Adler; it does not include third-party code.
-If you redistribute modified sources, we would appreciate that you include
-in the file ChangeLog history information documenting your changes. Please
-read the FAQ for more information on the distribution of modified source
-versions.
+If you redistribute modified sources, we would appreciate that you include in
+the file ChangeLog history information documenting your changes. Please read
+the FAQ for more information on the distribution of modified source versions.
diff --git a/src/3rdparty/zlib/adler32.c b/src/3rdparty/zlib/adler32.c
index 007ba26..65ad6a5 100644
--- a/src/3rdparty/zlib/adler32.c
+++ b/src/3rdparty/zlib/adler32.c
@@ -1,12 +1,15 @@
/* adler32.c -- compute the Adler-32 checksum of a data stream
- * Copyright (C) 1995-2004 Mark Adler
+ * Copyright (C) 1995-2007 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
-#define ZLIB_INTERNAL
-#include "zlib.h"
+#include "zutil.h"
+
+#define local static
+
+local uLong adler32_combine_(uLong adler1, uLong adler2, z_off64_t len2);
#define BASE 65521UL /* largest prime smaller than 65536 */
#define NMAX 5552
@@ -125,10 +128,10 @@ uLong ZEXPORT adler32(adler, buf, len)
}
/* ========================================================================= */
-uLong ZEXPORT adler32_combine(adler1, adler2, len2)
+local uLong adler32_combine_(adler1, adler2, len2)
uLong adler1;
uLong adler2;
- z_off_t len2;
+ z_off64_t len2;
{
unsigned long sum1;
unsigned long sum2;
@@ -141,9 +144,26 @@ uLong ZEXPORT adler32_combine(adler1, adler2, len2)
MOD(sum2);
sum1 += (adler2 & 0xffff) + BASE - 1;
sum2 += ((adler1 >> 16) & 0xffff) + ((adler2 >> 16) & 0xffff) + BASE - rem;
- if (sum1 > BASE) sum1 -= BASE;
- if (sum1 > BASE) sum1 -= BASE;
- if (sum2 > (BASE << 1)) sum2 -= (BASE << 1);
- if (sum2 > BASE) sum2 -= BASE;
+ if (sum1 >= BASE) sum1 -= BASE;
+ if (sum1 >= BASE) sum1 -= BASE;
+ if (sum2 >= (BASE << 1)) sum2 -= (BASE << 1);
+ if (sum2 >= BASE) sum2 -= BASE;
return sum1 | (sum2 << 16);
}
+
+/* ========================================================================= */
+uLong ZEXPORT adler32_combine(adler1, adler2, len2)
+ uLong adler1;
+ uLong adler2;
+ z_off_t len2;
+{
+ return adler32_combine_(adler1, adler2, len2);
+}
+
+uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
+ uLong adler1;
+ uLong adler2;
+ z_off64_t len2;
+{
+ return adler32_combine_(adler1, adler2, len2);
+}
diff --git a/src/3rdparty/zlib/compress.c b/src/3rdparty/zlib/compress.c
index df80134..ea4dfbe 100644
--- a/src/3rdparty/zlib/compress.c
+++ b/src/3rdparty/zlib/compress.c
@@ -1,5 +1,5 @@
/* compress.c -- compress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * Copyright (C) 1995-2005 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -59,7 +59,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
/* ===========================================================================
*/
-int Q_ZEXPORT compress (dest, destLen, source, sourceLen)
+int ZEXPORT compress (dest, destLen, source, sourceLen)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
@@ -75,5 +75,6 @@ int Q_ZEXPORT compress (dest, destLen, source, sourceLen)
uLong ZEXPORT compressBound (sourceLen)
uLong sourceLen;
{
- return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + 11;
+ return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
+ (sourceLen >> 25) + 13;
}
diff --git a/src/3rdparty/zlib/configure b/src/3rdparty/zlib/configure
deleted file mode 100755
index d7ffdc3..0000000
--- a/src/3rdparty/zlib/configure
+++ /dev/null
@@ -1,459 +0,0 @@
-#!/bin/sh
-# configure script for zlib. This script is needed only if
-# you wish to build a shared library and your system supports them,
-# of if you need special compiler, flags or install directory.
-# Otherwise, you can just use directly "make test; make install"
-#
-# To create a shared library, use "configure --shared"; by default a static
-# library is created. If the primitive shared library support provided here
-# does not work, use ftp://prep.ai.mit.edu/pub/gnu/libtool-*.tar.gz
-#
-# To impose specific compiler or flags or install directory, use for example:
-# prefix=$HOME CC=cc CFLAGS="-O4" ./configure
-# or for csh/tcsh users:
-# (setenv prefix $HOME; setenv CC cc; setenv CFLAGS "-O4"; ./configure)
-# LDSHARED is the command to be used to create a shared library
-
-# Incorrect settings of CC or CFLAGS may prevent creating a shared library.
-# If you have problems, try without defining CC and CFLAGS before reporting
-# an error.
-
-LIBS=libz.a
-LDFLAGS="-L. ${LIBS}"
-VER=`sed -n -e '/VERSION "/s/.*"\(.*\)".*/\1/p' < zlib.h`
-VER2=`sed -n -e '/VERSION "/s/.*"\([0-9]*\\.[0-9]*\)\\..*/\1/p' < zlib.h`
-VER1=`sed -n -e '/VERSION "/s/.*"\([0-9]*\)\\..*/\1/p' < zlib.h`
-AR=${AR-"ar rc"}
-RANLIB=${RANLIB-"ranlib"}
-prefix=${prefix-/usr/local}
-exec_prefix=${exec_prefix-'${prefix}'}
-libdir=${libdir-'${exec_prefix}/lib'}
-includedir=${includedir-'${prefix}/include'}
-mandir=${mandir-'${prefix}/share/man'}
-shared_ext='.so'
-shared=0
-gcc=0
-old_cc="$CC"
-old_cflags="$CFLAGS"
-
-while test $# -ge 1
-do
-case "$1" in
- -h* | --h*)
- echo 'usage:'
- echo ' configure [--shared] [--prefix=PREFIX] [--exec_prefix=EXPREFIX]'
- echo ' [--libdir=LIBDIR] [--includedir=INCLUDEDIR]'
- exit 0;;
- -p*=* | --p*=*) prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
- -e*=* | --e*=*) exec_prefix=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
- -l*=* | --libdir=*) libdir=`echo $1 | sed 's/[-a-z_]*=//'`; shift;;
- -i*=* | --includedir=*) includedir=`echo $1 | sed 's/[-a-z_]*=//'`;shift;;
- -p* | --p*) prefix="$2"; shift; shift;;
- -e* | --e*) exec_prefix="$2"; shift; shift;;
- -l* | --l*) libdir="$2"; shift; shift;;
- -i* | --i*) includedir="$2"; shift; shift;;
- -s* | --s*) shared=1; shift;;
- *) echo "unknown option: $1"; echo "$0 --help for help"; exit 1;;
- esac
-done
-
-test=ztest$$
-cat > $test.c <<EOF
-extern int getchar();
-int hello() {return getchar();}
-EOF
-
-test -z "$CC" && echo Checking for gcc...
-cc=${CC-gcc}
-cflags=${CFLAGS-"-O3"}
-# to force the asm version use: CFLAGS="-O3 -DASMV" ./configure
-case "$cc" in
- *gcc*) gcc=1;;
-esac
-
-if test "$gcc" -eq 1 && ($cc -c $cflags $test.c) 2>/dev/null; then
- CC="$cc"
- SFLAGS=${CFLAGS-"-fPIC -O3"}
- CFLAGS="$cflags"
- case `(uname -s || echo unknown) 2>/dev/null` in
- Linux | linux | GNU | GNU/*) LDSHARED=${LDSHARED-"$cc -shared -Wl,-soname,libz.so.1"};;
- CYGWIN* | Cygwin* | cygwin* | OS/2* )
- EXE='.exe';;
- QNX*) # This is for QNX6. I suppose that the QNX rule below is for QNX2,QNX4
- # (alain.bonnefoy@icbt.com)
- LDSHARED=${LDSHARED-"$cc -shared -Wl,-hlibz.so.1"};;
- HP-UX*)
- LDSHARED=${LDSHARED-"$cc -shared $SFLAGS"}
- case `(uname -m || echo unknown) 2>/dev/null` in
- ia64)
- shared_ext='.so'
- SHAREDLIB='libz.so';;
- *)
- shared_ext='.sl'
- SHAREDLIB='libz.sl';;
- esac;;
- Darwin*) shared_ext='.dylib'
- SHAREDLIB=libz$shared_ext
- SHAREDLIBV=libz.$VER$shared_ext
- SHAREDLIBM=libz.$VER1$shared_ext
- LDSHARED=${LDSHARED-"$cc -dynamiclib -install_name $libdir/$SHAREDLIBM -compatibility_version $VER1 -current_version $VER"};;
- *) LDSHARED=${LDSHARED-"$cc -shared"};;
- esac
-else
- # find system name and corresponding cc options
- CC=${CC-cc}
- case `(uname -sr || echo unknown) 2>/dev/null` in
- HP-UX*) SFLAGS=${CFLAGS-"-O +z"}
- CFLAGS=${CFLAGS-"-O"}
-# LDSHARED=${LDSHARED-"ld -b +vnocompatwarnings"}
- LDSHARED=${LDSHARED-"ld -b"}
- case `(uname -m || echo unknown) 2>/dev/null` in
- ia64)
- shared_ext='.so'
- SHAREDLIB='libz.so';;
- *)
- shared_ext='.sl'
- SHAREDLIB='libz.sl';;
- esac;;
- IRIX*) SFLAGS=${CFLAGS-"-ansi -O2 -rpath ."}
- CFLAGS=${CFLAGS-"-ansi -O2"}
- LDSHARED=${LDSHARED-"cc -shared"};;
- OSF1\ V4*) SFLAGS=${CFLAGS-"-O -std1"}
- CFLAGS=${CFLAGS-"-O -std1"}
- LDSHARED=${LDSHARED-"cc -shared -Wl,-soname,libz.so -Wl,-msym -Wl,-rpath,$(libdir) -Wl,-set_version,${VER}:1.0"};;
- OSF1*) SFLAGS=${CFLAGS-"-O -std1"}
- CFLAGS=${CFLAGS-"-O -std1"}
- LDSHARED=${LDSHARED-"cc -shared"};;
- QNX*) SFLAGS=${CFLAGS-"-4 -O"}
- CFLAGS=${CFLAGS-"-4 -O"}
- LDSHARED=${LDSHARED-"cc"}
- RANLIB=${RANLIB-"true"}
- AR="cc -A";;
- SCO_SV\ 3.2*) SFLAGS=${CFLAGS-"-O3 -dy -KPIC "}
- CFLAGS=${CFLAGS-"-O3"}
- LDSHARED=${LDSHARED-"cc -dy -KPIC -G"};;
- SunOS\ 5*) SFLAGS=${CFLAGS-"-fast -xcg89 -KPIC -R."}
- CFLAGS=${CFLAGS-"-fast -xcg89"}
- LDSHARED=${LDSHARED-"cc -G"};;
- SunOS\ 4*) SFLAGS=${CFLAGS-"-O2 -PIC"}
- CFLAGS=${CFLAGS-"-O2"}
- LDSHARED=${LDSHARED-"ld"};;
- SunStudio\ 9*) SFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xcode=pic32 -xtarget=ultra3 -xarch=v9b"}
- CFLAGS=${CFLAGS-"-DUSE_MMAP -fast -xtarget=ultra3 -xarch=v9b"}
- LDSHARED=${LDSHARED-"cc -xarch=v9b"};;
- UNIX_System_V\ 4.2.0)
- SFLAGS=${CFLAGS-"-KPIC -O"}
- CFLAGS=${CFLAGS-"-O"}
- LDSHARED=${LDSHARED-"cc -G"};;
- UNIX_SV\ 4.2MP)
- SFLAGS=${CFLAGS-"-Kconform_pic -O"}
- CFLAGS=${CFLAGS-"-O"}
- LDSHARED=${LDSHARED-"cc -G"};;
- OpenUNIX\ 5)
- SFLAGS=${CFLAGS-"-KPIC -O"}
- CFLAGS=${CFLAGS-"-O"}
- LDSHARED=${LDSHARED-"cc -G"};;
- AIX*) # Courtesy of dbakker@arrayasolutions.com
- SFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
- CFLAGS=${CFLAGS-"-O -qmaxmem=8192"}
- LDSHARED=${LDSHARED-"xlc -G"};;
- # send working options for other systems to support@gzip.org
- *) SFLAGS=${CFLAGS-"-O"}
- CFLAGS=${CFLAGS-"-O"}
- LDSHARED=${LDSHARED-"cc -shared"};;
- esac
-fi
-
-SHAREDLIB=${SHAREDLIB-"libz$shared_ext"}
-SHAREDLIBV=${SHAREDLIBV-"libz$shared_ext.$VER"}
-SHAREDLIBM=${SHAREDLIBM-"libz$shared_ext.$VER1"}
-
-if test $shared -eq 1; then
- echo Checking for shared library support...
- # we must test in two steps (cc then ld), required at least on SunOS 4.x
- if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
- test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
- CFLAGS="$SFLAGS"
- LIBS="$SHAREDLIBV"
- echo Building shared library $SHAREDLIBV with $CC.
- elif test -z "$old_cc" -a -z "$old_cflags"; then
- echo No shared library support.
- shared=0;
- else
- echo 'No shared library support; try without defining CC and CFLAGS'
- shared=0;
- fi
-fi
-if test $shared -eq 0; then
- LDSHARED="$CC"
- echo Building static library $LIBS version $VER with $CC.
-else
- LDFLAGS="-L. ${SHAREDLIBV}"
-fi
-
-cat > $test.c <<EOF
-#include <unistd.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- sed < zconf.in.h "/HAVE_UNISTD_H/s%0%1%" > zconf.h
- echo "Checking for unistd.h... Yes."
-else
- cp -p zconf.in.h zconf.h
- echo "Checking for unistd.h... No."
-fi
-
-cat > $test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-#include "zconf.h"
-
-int main()
-{
-#ifndef STDC
- choke me
-#endif
-
- return 0;
-}
-EOF
-
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()"
-
- cat > $test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
- char buf[20];
- va_list ap;
-
- va_start(ap, fmt);
- vsnprintf(buf, sizeof(buf), fmt, ap);
- va_end(ap);
- return 0;
-}
-
-int main()
-{
- return (mytest("Hello%d\n", 1));
-}
-EOF
-
- if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
- echo "Checking for vsnprintf() in stdio.h... Yes."
-
- cat >$test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
- int n;
- char buf[20];
- va_list ap;
-
- va_start(ap, fmt);
- n = vsnprintf(buf, sizeof(buf), fmt, ap);
- va_end(ap);
- return n;
-}
-
-int main()
-{
- return (mytest("Hello%d\n", 1));
-}
-EOF
-
- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking for return value of vsnprintf()... Yes."
- else
- CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
- echo "Checking for return value of vsnprintf()... No."
- echo " WARNING: apparently vsnprintf() does not return a value. zlib"
- echo " can build but will be open to possible string-format security"
- echo " vulnerabilities."
- fi
- else
- CFLAGS="$CFLAGS -DNO_vsnprintf"
- echo "Checking for vsnprintf() in stdio.h... No."
- echo " WARNING: vsnprintf() not found, falling back to vsprintf(). zlib"
- echo " can build but will be open to possible buffer-overflow security"
- echo " vulnerabilities."
-
- cat >$test.c <<EOF
-#include <stdio.h>
-#include <stdarg.h>
-
-int mytest(char *fmt, ...)
-{
- int n;
- char buf[20];
- va_list ap;
-
- va_start(ap, fmt);
- n = vsprintf(buf, fmt, ap);
- va_end(ap);
- return n;
-}
-
-int main()
-{
- return (mytest("Hello%d\n", 1));
-}
-EOF
-
- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking for return value of vsprintf()... Yes."
- else
- CFLAGS="$CFLAGS -DHAS_vsprintf_void"
- echo "Checking for return value of vsprintf()... No."
- echo " WARNING: apparently vsprintf() does not return a value. zlib"
- echo " can build but will be open to possible string-format security"
- echo " vulnerabilities."
- fi
- fi
-else
- echo "Checking whether to use vs[n]printf() or s[n]printf()... using s[n]printf()"
-
- cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
- char buf[20];
-
- snprintf(buf, sizeof(buf), "%s", "foo");
- return 0;
-}
-
-int main()
-{
- return (mytest());
-}
-EOF
-
- if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
- echo "Checking for snprintf() in stdio.h... Yes."
-
- cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
- char buf[20];
-
- return snprintf(buf, sizeof(buf), "%s", "foo");
-}
-
-int main()
-{
- return (mytest());
-}
-EOF
-
- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking for return value of snprintf()... Yes."
- else
- CFLAGS="$CFLAGS -DHAS_snprintf_void"
- echo "Checking for return value of snprintf()... No."
- echo " WARNING: apparently snprintf() does not return a value. zlib"
- echo " can build but will be open to possible string-format security"
- echo " vulnerabilities."
- fi
- else
- CFLAGS="$CFLAGS -DNO_snprintf"
- echo "Checking for snprintf() in stdio.h... No."
- echo " WARNING: snprintf() not found, falling back to sprintf(). zlib"
- echo " can build but will be open to possible buffer-overflow security"
- echo " vulnerabilities."
-
- cat >$test.c <<EOF
-#include <stdio.h>
-
-int mytest()
-{
- char buf[20];
-
- return sprintf(buf, "%s", "foo");
-}
-
-int main()
-{
- return (mytest());
-}
-EOF
-
- if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking for return value of sprintf()... Yes."
- else
- CFLAGS="$CFLAGS -DHAS_sprintf_void"
- echo "Checking for return value of sprintf()... No."
- echo " WARNING: apparently sprintf() does not return a value. zlib"
- echo " can build but will be open to possible string-format security"
- echo " vulnerabilities."
- fi
- fi
-fi
-
-cat >$test.c <<EOF
-#include <errno.h>
-int main() { return 0; }
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- echo "Checking for errno.h... Yes."
-else
- echo "Checking for errno.h... No."
- CFLAGS="$CFLAGS -DNO_ERRNO_H"
-fi
-
-cat > $test.c <<EOF
-#include <sys/types.h>
-#include <sys/mman.h>
-#include <sys/stat.h>
-caddr_t hello() {
- return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
-}
-EOF
-if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
- CFLAGS="$CFLAGS -DUSE_MMAP"
- echo Checking for mmap support... Yes.
-else
- echo Checking for mmap support... No.
-fi
-
-CPP=${CPP-"$CC -E"}
-case $CFLAGS in
- *ASMV*)
- if test "`nm $test.o | grep _hello`" = ""; then
- CPP="$CPP -DNO_UNDERLINE"
- echo Checking for underline in external names... No.
- else
- echo Checking for underline in external names... Yes.
- fi;;
-esac
-
-rm -f $test.[co] $test $test$shared_ext
-
-# udpate Makefile
-sed < Makefile.in "
-/^CC *=/s#=.*#=$CC#
-/^CFLAGS *=/s#=.*#=$CFLAGS#
-/^CPP *=/s#=.*#=$CPP#
-/^LDSHARED *=/s#=.*#=$LDSHARED#
-/^LIBS *=/s#=.*#=$LIBS#
-/^SHAREDLIB *=/s#=.*#=$SHAREDLIB#
-/^SHAREDLIBV *=/s#=.*#=$SHAREDLIBV#
-/^SHAREDLIBM *=/s#=.*#=$SHAREDLIBM#
-/^AR *=/s#=.*#=$AR#
-/^RANLIB *=/s#=.*#=$RANLIB#
-/^EXE *=/s#=.*#=$EXE#
-/^prefix *=/s#=.*#=$prefix#
-/^exec_prefix *=/s#=.*#=$exec_prefix#
-/^libdir *=/s#=.*#=$libdir#
-/^includedir *=/s#=.*#=$includedir#
-/^mandir *=/s#=.*#=$mandir#
-/^LDFLAGS *=/s#=.*#=$LDFLAGS#
-" > Makefile
diff --git a/src/3rdparty/zlib/crc32.c b/src/3rdparty/zlib/crc32.c
index f658a9e..91be372 100644
--- a/src/3rdparty/zlib/crc32.c
+++ b/src/3rdparty/zlib/crc32.c
@@ -1,5 +1,5 @@
/* crc32.c -- compute the CRC-32 of a data stream
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2006, 2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* Thanks to Rodney Brown <rbrown64@csc.com.au> for his contribution of faster
@@ -53,7 +53,7 @@
/* Definitions for doing the crc four data bytes at a time. */
#ifdef BYFOUR
-# define REV(w) (((w)>>24)+(((w)>>8)&0xff00)+ \
+# define REV(w) ((((w)>>24)&0xff)+(((w)>>8)&0xff00)+ \
(((w)&0xff00)<<8)+(((w)&0xff)<<24))
local unsigned long crc32_little OF((unsigned long,
const unsigned char FAR *, unsigned));
@@ -68,6 +68,8 @@
local unsigned long gf2_matrix_times OF((unsigned long *mat,
unsigned long vec));
local void gf2_matrix_square OF((unsigned long *square, unsigned long *mat));
+local uLong crc32_combine_(uLong crc1, uLong crc2, z_off64_t len2);
+
#ifdef DYNAMIC_CRC_TABLE
@@ -219,7 +221,7 @@ const unsigned long FAR * ZEXPORT get_crc_table()
unsigned long ZEXPORT crc32(crc, buf, len)
unsigned long crc;
const unsigned char FAR *buf;
- unsigned len;
+ uInt len;
{
if (buf == Z_NULL) return 0UL;
@@ -367,22 +369,22 @@ local void gf2_matrix_square(square, mat)
}
/* ========================================================================= */
-uLong ZEXPORT crc32_combine(crc1, crc2, len2)
+local uLong crc32_combine_(crc1, crc2, len2)
uLong crc1;
uLong crc2;
- z_off_t len2;
+ z_off64_t len2;
{
int n;
unsigned long row;
unsigned long even[GF2_DIM]; /* even-power-of-two zeros operator */
unsigned long odd[GF2_DIM]; /* odd-power-of-two zeros operator */
- /* degenerate case */
- if (len2 == 0)
+ /* degenerate case (also disallow negative lengths) */
+ if (len2 <= 0)
return crc1;
/* put operator for one zero bit in odd */
- odd[0] = 0xedb88320L; /* CRC-32 polynomial */
+ odd[0] = 0xedb88320UL; /* CRC-32 polynomial */
row = 1;
for (n = 1; n < GF2_DIM; n++) {
odd[n] = row;
@@ -421,3 +423,20 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2)
crc1 ^= crc2;
return crc1;
}
+
+/* ========================================================================= */
+uLong ZEXPORT crc32_combine(crc1, crc2, len2)
+ uLong crc1;
+ uLong crc2;
+ z_off_t len2;
+{
+ return crc32_combine_(crc1, crc2, len2);
+}
+
+uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
+ uLong crc1;
+ uLong crc2;
+ z_off64_t len2;
+{
+ return crc32_combine_(crc1, crc2, len2);
+}
diff --git a/src/3rdparty/zlib/deflate.c b/src/3rdparty/zlib/deflate.c
index 29ce1f6..5c4022f 100644
--- a/src/3rdparty/zlib/deflate.c
+++ b/src/3rdparty/zlib/deflate.c
@@ -1,5 +1,5 @@
/* deflate.c -- compress data using the deflation algorithm
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -52,7 +52,7 @@
#include "deflate.h"
const char deflate_copyright[] =
- " deflate 1.2.3 Copyright 1995-2005 Jean-loup Gailly ";
+ " deflate 1.2.5 Copyright 1995-2010 Jean-loup Gailly and Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -79,19 +79,18 @@ local block_state deflate_fast OF((deflate_state *s, int flush));
#ifndef FASTEST
local block_state deflate_slow OF((deflate_state *s, int flush));
#endif
+local block_state deflate_rle OF((deflate_state *s, int flush));
+local block_state deflate_huff OF((deflate_state *s, int flush));
local void lm_init OF((deflate_state *s));
local void putShortMSB OF((deflate_state *s, uInt b));
local void flush_pending OF((z_streamp strm));
local int read_buf OF((z_streamp strm, Bytef *buf, unsigned size));
-#ifndef FASTEST
#ifdef ASMV
void match_init OF((void)); /* asm code initialization */
uInt longest_match OF((deflate_state *s, IPos cur_match));
#else
local uInt longest_match OF((deflate_state *s, IPos cur_match));
#endif
-#endif
-local uInt longest_match_fast OF((deflate_state *s, IPos cur_match));
#ifdef DEBUG
local void check_match OF((deflate_state *s, IPos start, IPos match,
@@ -110,11 +109,6 @@ local void check_match OF((deflate_state *s, IPos start, IPos match,
#endif
/* Matches of length 3 are discarded if their distance exceeds TOO_FAR */
-#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1)
-/* Minimum amount of lookahead, except at the end of the input file.
- * See deflate.c for comments about the MIN_MATCH+1.
- */
-
/* Values for max_lazy_match, good_match and max_chain_length, depending on
* the desired pack level (0..9). The values given below have been tuned to
* exclude worst case performance for pathological files. Better values may be
@@ -288,6 +282,8 @@ int ZEXPORT deflateInit2_(strm, level, method, windowBits, memLevel, strategy,
s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos));
s->head = (Posf *) ZALLOC(strm, s->hash_size, sizeof(Pos));
+ s->high_water = 0; /* nothing written to s->window yet */
+
s->lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
@@ -332,8 +328,8 @@ int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength)
strm->adler = adler32(strm->adler, dictionary, dictLength);
if (length < MIN_MATCH) return Z_OK;
- if (length > MAX_DIST(s)) {
- length = MAX_DIST(s);
+ if (length > s->w_size) {
+ length = s->w_size;
dictionary += dictLength - length; /* use the tail of the dictionary */
}
zmemcpy(s->window, dictionary, length);
@@ -435,9 +431,10 @@ int ZEXPORT deflateParams(strm, level, strategy)
}
func = configuration_table[s->level].func;
- if (func != configuration_table[level].func && strm->total_in != 0) {
+ if ((strategy != s->strategy || func != configuration_table[level].func) &&
+ strm->total_in != 0) {
/* Flush the last buffer: */
- err = deflate(strm, Z_PARTIAL_FLUSH);
+ err = deflate(strm, Z_BLOCK);
}
if (s->level != level) {
s->level = level;
@@ -481,33 +478,66 @@ int ZEXPORT deflateTune(strm, good_length, max_lazy, nice_length, max_chain)
* resulting from using fixed blocks instead of stored blocks, which deflate
* can emit on compressed data for some combinations of the parameters.
*
- * This function could be more sophisticated to provide closer upper bounds
- * for every combination of windowBits and memLevel, as well as wrap.
- * But even the conservative upper bound of about 14% expansion does not
- * seem onerous for output buffer allocation.
+ * This function could be more sophisticated to provide closer upper bounds for
+ * every combination of windowBits and memLevel. But even the conservative
+ * upper bound of about 14% expansion does not seem onerous for output buffer
+ * allocation.
*/
uLong ZEXPORT deflateBound(strm, sourceLen)
z_streamp strm;
uLong sourceLen;
{
deflate_state *s;
- uLong destLen;
+ uLong complen, wraplen;
+ Bytef *str;
- /* conservative upper bound */
- destLen = sourceLen +
- ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 11;
+ /* conservative upper bound for compressed data */
+ complen = sourceLen +
+ ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5;
- /* if can't get parameters, return conservative bound */
+ /* if can't get parameters, return conservative bound plus zlib wrapper */
if (strm == Z_NULL || strm->state == Z_NULL)
- return destLen;
+ return complen + 6;
- /* if not default parameters, return conservative bound */
+ /* compute wrapper length */
s = strm->state;
+ switch (s->wrap) {
+ case 0: /* raw deflate */
+ wraplen = 0;
+ break;
+ case 1: /* zlib wrapper */
+ wraplen = 6 + (s->strstart ? 4 : 0);
+ break;
+ case 2: /* gzip wrapper */
+ wraplen = 18;
+ if (s->gzhead != Z_NULL) { /* user-supplied gzip header */
+ if (s->gzhead->extra != Z_NULL)
+ wraplen += 2 + s->gzhead->extra_len;
+ str = s->gzhead->name;
+ if (str != Z_NULL)
+ do {
+ wraplen++;
+ } while (*str++);
+ str = s->gzhead->comment;
+ if (str != Z_NULL)
+ do {
+ wraplen++;
+ } while (*str++);
+ if (s->gzhead->hcrc)
+ wraplen += 2;
+ }
+ break;
+ default: /* for compiler happiness */
+ wraplen = 6;
+ }
+
+ /* if not default parameters, return conservative bound */
if (s->w_bits != 15 || s->hash_bits != 8 + 7)
- return destLen;
+ return complen + wraplen;
/* default settings: return tight bound for that case */
- return compressBound(sourceLen);
+ return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
+ (sourceLen >> 25) + 13 - 6 + wraplen;
}
/* =========================================================================
@@ -557,7 +587,7 @@ int ZEXPORT deflate (strm, flush)
deflate_state *s;
if (strm == Z_NULL || strm->state == Z_NULL ||
- flush > Z_FINISH || flush < 0) {
+ flush > Z_BLOCK || flush < 0) {
return Z_STREAM_ERROR;
}
s = strm->state;
@@ -581,7 +611,7 @@ int ZEXPORT deflate (strm, flush)
put_byte(s, 31);
put_byte(s, 139);
put_byte(s, 8);
- if (s->gzhead == NULL) {
+ if (s->gzhead == Z_NULL) {
put_byte(s, 0);
put_byte(s, 0);
put_byte(s, 0);
@@ -608,7 +638,7 @@ int ZEXPORT deflate (strm, flush)
(s->strategy >= Z_HUFFMAN_ONLY || s->level < 2 ?
4 : 0));
put_byte(s, s->gzhead->os & 0xff);
- if (s->gzhead->extra != NULL) {
+ if (s->gzhead->extra != Z_NULL) {
put_byte(s, s->gzhead->extra_len & 0xff);
put_byte(s, (s->gzhead->extra_len >> 8) & 0xff);
}
@@ -650,7 +680,7 @@ int ZEXPORT deflate (strm, flush)
}
#ifdef GZIP
if (s->status == EXTRA_STATE) {
- if (s->gzhead->extra != NULL) {
+ if (s->gzhead->extra != Z_NULL) {
uInt beg = s->pending; /* start of bytes to update crc */
while (s->gzindex < (s->gzhead->extra_len & 0xffff)) {
@@ -678,7 +708,7 @@ int ZEXPORT deflate (strm, flush)
s->status = NAME_STATE;
}
if (s->status == NAME_STATE) {
- if (s->gzhead->name != NULL) {
+ if (s->gzhead->name != Z_NULL) {
uInt beg = s->pending; /* start of bytes to update crc */
int val;
@@ -709,7 +739,7 @@ int ZEXPORT deflate (strm, flush)
s->status = COMMENT_STATE;
}
if (s->status == COMMENT_STATE) {
- if (s->gzhead->comment != NULL) {
+ if (s->gzhead->comment != Z_NULL) {
uInt beg = s->pending; /* start of bytes to update crc */
int val;
@@ -787,7 +817,9 @@ int ZEXPORT deflate (strm, flush)
(flush != Z_NO_FLUSH && s->status != FINISH_STATE)) {
block_state bstate;
- bstate = (*(configuration_table[s->level].func))(s, flush);
+ bstate = s->strategy == Z_HUFFMAN_ONLY ? deflate_huff(s, flush) :
+ (s->strategy == Z_RLE ? deflate_rle(s, flush) :
+ (*(configuration_table[s->level].func))(s, flush));
if (bstate == finish_started || bstate == finish_done) {
s->status = FINISH_STATE;
@@ -808,13 +840,17 @@ int ZEXPORT deflate (strm, flush)
if (bstate == block_done) {
if (flush == Z_PARTIAL_FLUSH) {
_tr_align(s);
- } else { /* FULL_FLUSH or SYNC_FLUSH */
+ } else if (flush != Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */
_tr_stored_block(s, (char*)0, 0L, 0);
/* For a full flush, this empty block will be recognized
* as a special marker by inflate_sync().
*/
if (flush == Z_FULL_FLUSH) {
CLEAR_HASH(s); /* forget history */
+ if (s->lookahead == 0) {
+ s->strstart = 0;
+ s->block_start = 0L;
+ }
}
}
flush_pending(strm);
@@ -1167,12 +1203,13 @@ local uInt longest_match(s, cur_match)
return s->lookahead;
}
#endif /* ASMV */
-#endif /* FASTEST */
+
+#else /* FASTEST */
/* ---------------------------------------------------------------------------
- * Optimized version for level == 1 or strategy == Z_RLE only
+ * Optimized version for FASTEST only
*/
-local uInt longest_match_fast(s, cur_match)
+local uInt longest_match(s, cur_match)
deflate_state *s;
IPos cur_match; /* current match */
{
@@ -1225,6 +1262,8 @@ local uInt longest_match_fast(s, cur_match)
return (uInt)len <= s->lookahead ? (uInt)len : s->lookahead;
}
+#endif /* FASTEST */
+
#ifdef DEBUG
/* ===========================================================================
* Check that the match at match_start is indeed a match.
@@ -1303,7 +1342,6 @@ local void fill_window(s)
later. (Using level 0 permanently is not an optimal usage of
zlib, so we don't care about this pathological case.)
*/
- /* %%% avoid this when Z_RLE */
n = s->hash_size;
p = &s->head[n];
do {
@@ -1355,27 +1393,61 @@ local void fill_window(s)
*/
} while (s->lookahead < MIN_LOOKAHEAD && s->strm->avail_in != 0);
+
+ /* If the WIN_INIT bytes after the end of the current data have never been
+ * written, then zero those bytes in order to avoid memory check reports of
+ * the use of uninitialized (or uninitialised as Julian writes) bytes by
+ * the longest match routines. Update the high water mark for the next
+ * time through here. WIN_INIT is set to MAX_MATCH since the longest match
+ * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead.
+ */
+ if (s->high_water < s->window_size) {
+ ulg curr = s->strstart + (ulg)(s->lookahead);
+ ulg init;
+
+ if (s->high_water < curr) {
+ /* Previous high water mark below current data -- zero WIN_INIT
+ * bytes or up to end of window, whichever is less.
+ */
+ init = s->window_size - curr;
+ if (init > WIN_INIT)
+ init = WIN_INIT;
+ zmemzero(s->window + curr, (unsigned)init);
+ s->high_water = curr + init;
+ }
+ else if (s->high_water < (ulg)curr + WIN_INIT) {
+ /* High water mark at or above current data, but below current data
+ * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
+ * to end of window, whichever is less.
+ */
+ init = (ulg)curr + WIN_INIT - s->high_water;
+ if (init > s->window_size - s->high_water)
+ init = s->window_size - s->high_water;
+ zmemzero(s->window + s->high_water, (unsigned)init);
+ s->high_water += init;
+ }
+ }
}
/* ===========================================================================
* Flush the current block, with given end-of-file flag.
* IN assertion: strstart is set to the end of the current match.
*/
-#define FLUSH_BLOCK_ONLY(s, eof) { \
+#define FLUSH_BLOCK_ONLY(s, last) { \
_tr_flush_block(s, (s->block_start >= 0L ? \
(charf *)&s->window[(unsigned)s->block_start] : \
(charf *)Z_NULL), \
(ulg)((long)s->strstart - s->block_start), \
- (eof)); \
+ (last)); \
s->block_start = s->strstart; \
flush_pending(s->strm); \
Tracev((stderr,"[FLUSH]")); \
}
/* Same but force premature exit if necessary. */
-#define FLUSH_BLOCK(s, eof) { \
- FLUSH_BLOCK_ONLY(s, eof); \
- if (s->strm->avail_out == 0) return (eof) ? finish_started : need_more; \
+#define FLUSH_BLOCK(s, last) { \
+ FLUSH_BLOCK_ONLY(s, last); \
+ if (s->strm->avail_out == 0) return (last) ? finish_started : need_more; \
}
/* ===========================================================================
@@ -1449,7 +1521,7 @@ local block_state deflate_fast(s, flush)
deflate_state *s;
int flush;
{
- IPos hash_head = NIL; /* head of the hash chain */
+ IPos hash_head; /* head of the hash chain */
int bflush; /* set if current block must be flushed */
for (;;) {
@@ -1469,6 +1541,7 @@ local block_state deflate_fast(s, flush)
/* Insert the string window[strstart .. strstart+2] in the
* dictionary, and set hash_head to the head of the hash chain:
*/
+ hash_head = NIL;
if (s->lookahead >= MIN_MATCH) {
INSERT_STRING(s, s->strstart, hash_head);
}
@@ -1481,19 +1554,8 @@ local block_state deflate_fast(s, flush)
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).
*/
-#ifdef FASTEST
- if ((s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) ||
- (s->strategy == Z_RLE && s->strstart - hash_head == 1)) {
- s->match_length = longest_match_fast (s, hash_head);
- }
-#else
- if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
- s->match_length = longest_match (s, hash_head);
- } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
- s->match_length = longest_match_fast (s, hash_head);
- }
-#endif
- /* longest_match() or longest_match_fast() sets match_start */
+ s->match_length = longest_match (s, hash_head);
+ /* longest_match() sets match_start */
}
if (s->match_length >= MIN_MATCH) {
check_match(s, s->strstart, s->match_start, s->match_length);
@@ -1555,7 +1617,7 @@ local block_state deflate_slow(s, flush)
deflate_state *s;
int flush;
{
- IPos hash_head = NIL; /* head of hash chain */
+ IPos hash_head; /* head of hash chain */
int bflush; /* set if current block must be flushed */
/* Process the input block. */
@@ -1576,6 +1638,7 @@ local block_state deflate_slow(s, flush)
/* Insert the string window[strstart .. strstart+2] in the
* dictionary, and set hash_head to the head of the hash chain:
*/
+ hash_head = NIL;
if (s->lookahead >= MIN_MATCH) {
INSERT_STRING(s, s->strstart, hash_head);
}
@@ -1591,12 +1654,8 @@ local block_state deflate_slow(s, flush)
* of window index 0 (in particular we have to avoid a match
* of the string with itself at the start of the input file).
*/
- if (s->strategy != Z_HUFFMAN_ONLY && s->strategy != Z_RLE) {
- s->match_length = longest_match (s, hash_head);
- } else if (s->strategy == Z_RLE && s->strstart - hash_head == 1) {
- s->match_length = longest_match_fast (s, hash_head);
- }
- /* longest_match() or longest_match_fast() sets match_start */
+ s->match_length = longest_match (s, hash_head);
+ /* longest_match() sets match_start */
if (s->match_length <= 5 && (s->strategy == Z_FILTERED
#if TOO_FAR <= 32767
@@ -1674,7 +1733,6 @@ local block_state deflate_slow(s, flush)
}
#endif /* FASTEST */
-#if 0
/* ===========================================================================
* For Z_RLE, simply look for runs of bytes, generate matches only of distance
* one. Do not maintain a hash table. (It will be regenerated if this run of
@@ -1684,11 +1742,9 @@ local block_state deflate_rle(s, flush)
deflate_state *s;
int flush;
{
- int bflush; /* set if current block must be flushed */
- uInt run; /* length of run */
- uInt max; /* maximum length of run */
- uInt prev; /* byte at distance one to match */
- Bytef *scan; /* scan for end of run */
+ int bflush; /* set if current block must be flushed */
+ uInt prev; /* byte at distance one to match */
+ Bytef *scan, *strend; /* scan goes up to strend for length of run */
for (;;) {
/* Make sure that we always have enough lookahead, except
@@ -1704,23 +1760,33 @@ local block_state deflate_rle(s, flush)
}
/* See how many times the previous byte repeats */
- run = 0;
- if (s->strstart > 0) { /* if there is a previous byte, that is */
- max = s->lookahead < MAX_MATCH ? s->lookahead : MAX_MATCH;
+ s->match_length = 0;
+ if (s->lookahead >= MIN_MATCH && s->strstart > 0) {
scan = s->window + s->strstart - 1;
- prev = *scan++;
- do {
- if (*scan++ != prev)
- break;
- } while (++run < max);
+ prev = *scan;
+ if (prev == *++scan && prev == *++scan && prev == *++scan) {
+ strend = s->window + s->strstart + MAX_MATCH;
+ do {
+ } while (prev == *++scan && prev == *++scan &&
+ prev == *++scan && prev == *++scan &&
+ prev == *++scan && prev == *++scan &&
+ prev == *++scan && prev == *++scan &&
+ scan < strend);
+ s->match_length = MAX_MATCH - (int)(strend - scan);
+ if (s->match_length > s->lookahead)
+ s->match_length = s->lookahead;
+ }
}
/* Emit match if have run of MIN_MATCH or longer, else emit literal */
- if (run >= MIN_MATCH) {
- check_match(s, s->strstart, s->strstart - 1, run);
- _tr_tally_dist(s, 1, run - MIN_MATCH, bflush);
- s->lookahead -= run;
- s->strstart += run;
+ if (s->match_length >= MIN_MATCH) {
+ check_match(s, s->strstart, s->strstart - 1, s->match_length);
+
+ _tr_tally_dist(s, 1, s->match_length - MIN_MATCH, bflush);
+
+ s->lookahead -= s->match_length;
+ s->strstart += s->match_length;
+ s->match_length = 0;
} else {
/* No match, output a literal byte */
Tracevv((stderr,"%c", s->window[s->strstart]));
@@ -1733,4 +1799,36 @@ local block_state deflate_rle(s, flush)
FLUSH_BLOCK(s, flush == Z_FINISH);
return flush == Z_FINISH ? finish_done : block_done;
}
-#endif
+
+/* ===========================================================================
+ * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table.
+ * (It will be regenerated if this run of deflate switches away from Huffman.)
+ */
+local block_state deflate_huff(s, flush)
+ deflate_state *s;
+ int flush;
+{
+ int bflush; /* set if current block must be flushed */
+
+ for (;;) {
+ /* Make sure that we have a literal to write. */
+ if (s->lookahead == 0) {
+ fill_window(s);
+ if (s->lookahead == 0) {
+ if (flush == Z_NO_FLUSH)
+ return need_more;
+ break; /* flush the current block */
+ }
+ }
+
+ /* Output a literal byte */
+ s->match_length = 0;
+ Tracevv((stderr,"%c", s->window[s->strstart]));
+ _tr_tally_lit (s, s->window[s->strstart], bflush);
+ s->lookahead--;
+ s->strstart++;
+ if (bflush) FLUSH_BLOCK(s, 0);
+ }
+ FLUSH_BLOCK(s, flush == Z_FINISH);
+ return flush == Z_FINISH ? finish_done : block_done;
+}
diff --git a/src/3rdparty/zlib/deflate.h b/src/3rdparty/zlib/deflate.h
index 05a5ab3..cbf0d1e 100644
--- a/src/3rdparty/zlib/deflate.h
+++ b/src/3rdparty/zlib/deflate.h
@@ -1,5 +1,5 @@
/* deflate.h -- internal compression state
- * Copyright (C) 1995-2004 Jean-loup Gailly
+ * Copyright (C) 1995-2010 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -260,6 +260,13 @@ typedef struct internal_state {
* are always zero.
*/
+ ulg high_water;
+ /* High water mark offset in window for initialized bytes -- bytes above
+ * this are set to zero in order to avoid memory check warnings when
+ * longest match routines access bytes past the input. This is then
+ * updated to the new high water mark.
+ */
+
} FAR deflate_state;
/* Output a byte on the stream.
@@ -278,14 +285,18 @@ typedef struct internal_state {
* distances are limited to MAX_DIST instead of WSIZE.
*/
+#define WIN_INIT MAX_MATCH
+/* Number of bytes after end of data in window to initialize in order to avoid
+ memory checker errors from longest match routines */
+
/* in trees.c */
-void _tr_init OF((deflate_state *s));
-int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
-void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
-void _tr_align OF((deflate_state *s));
-void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
- int eof));
+void ZLIB_INTERNAL _tr_init OF((deflate_state *s));
+int ZLIB_INTERNAL _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc));
+void ZLIB_INTERNAL _tr_flush_block OF((deflate_state *s, charf *buf,
+ ulg stored_len, int last));
+void ZLIB_INTERNAL _tr_align OF((deflate_state *s));
+void ZLIB_INTERNAL _tr_stored_block OF((deflate_state *s, charf *buf,
+ ulg stored_len, int last));
#define d_code(dist) \
((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)])
@@ -298,11 +309,11 @@ void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len,
/* Inline versions of _tr_tally for speed: */
#if defined(GEN_TREES_H) || !defined(STDC)
- extern uch _length_code[];
- extern uch _dist_code[];
+ extern uch ZLIB_INTERNAL _length_code[];
+ extern uch ZLIB_INTERNAL _dist_code[];
#else
- extern const uch _length_code[];
- extern const uch _dist_code[];
+ extern const uch ZLIB_INTERNAL _length_code[];
+ extern const uch ZLIB_INTERNAL _dist_code[];
#endif
# define _tr_tally_lit(s, c, flush) \
diff --git a/src/3rdparty/zlib/algorithm.txt b/src/3rdparty/zlib/doc/algorithm.txt
index b022dde..34960bd 100644
--- a/src/3rdparty/zlib/algorithm.txt
+++ b/src/3rdparty/zlib/doc/algorithm.txt
@@ -121,7 +121,7 @@ At least for deflate's output that generates new trees every several 10's of
kbytes. You can imagine that filling in a 2^15 entry table for a 15-bit code
would take too long if you're only decoding several thousand symbols. At the
other extreme, you could make a new table for every bit in the code. In fact,
-that's essentially a Huffman tree. But then you spend two much time
+that's essentially a Huffman tree. But then you spend too much time
traversing the tree while decoding, even for short symbols.
So the number of bits for the first lookup table is a trade of the time to
diff --git a/src/3rdparty/zlib/doc/rfc1950.txt b/src/3rdparty/zlib/doc/rfc1950.txt
new file mode 100644
index 0000000..ce6428a
--- /dev/null
+++ b/src/3rdparty/zlib/doc/rfc1950.txt
@@ -0,0 +1,619 @@
+
+
+
+
+
+
+Network Working Group P. Deutsch
+Request for Comments: 1950 Aladdin Enterprises
+Category: Informational J-L. Gailly
+ Info-ZIP
+ May 1996
+
+
+ ZLIB Compressed Data Format Specification version 3.3
+
+Status of This Memo
+
+ This memo provides information for the Internet community. This memo
+ does not specify an Internet standard of any kind. Distribution of
+ this memo is unlimited.
+
+IESG Note:
+
+ The IESG takes no position on the validity of any Intellectual
+ Property Rights statements contained in this document.
+
+Notices
+
+ Copyright (c) 1996 L. Peter Deutsch and Jean-Loup Gailly
+
+ Permission is granted to copy and distribute this document for any
+ purpose and without charge, including translations into other
+ languages and incorporation into compilations, provided that the
+ copyright notice and this notice are preserved, and that any
+ substantive changes or deletions from the original are clearly
+ marked.
+
+ A pointer to the latest version of this and related documentation in
+ HTML format can be found at the URL
+ <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
+
+Abstract
+
+ This specification defines a lossless compressed data format. The
+ data can be produced or consumed, even for an arbitrarily long
+ sequentially presented input data stream, using only an a priori
+ bounded amount of intermediate storage. The format presently uses
+ the DEFLATE compression method but can be easily extended to use
+ other compression methods. It can be implemented readily in a manner
+ not covered by patents. This specification also defines the ADLER-32
+ checksum (an extension and improvement of the Fletcher checksum),
+ used for detection of data corruption, and provides an algorithm for
+ computing it.
+
+
+
+
+Deutsch & Gailly Informational [Page 1]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+Table of Contents
+
+ 1. Introduction ................................................... 2
+ 1.1. Purpose ................................................... 2
+ 1.2. Intended audience ......................................... 3
+ 1.3. Scope ..................................................... 3
+ 1.4. Compliance ................................................ 3
+ 1.5. Definitions of terms and conventions used ................ 3
+ 1.6. Changes from previous versions ............................ 3
+ 2. Detailed specification ......................................... 3
+ 2.1. Overall conventions ....................................... 3
+ 2.2. Data format ............................................... 4
+ 2.3. Compliance ................................................ 7
+ 3. References ..................................................... 7
+ 4. Source code .................................................... 8
+ 5. Security Considerations ........................................ 8
+ 6. Acknowledgements ............................................... 8
+ 7. Authors' Addresses ............................................. 8
+ 8. Appendix: Rationale ............................................ 9
+ 9. Appendix: Sample code ..........................................10
+
+1. Introduction
+
+ 1.1. Purpose
+
+ The purpose of this specification is to define a lossless
+ compressed data format that:
+
+ * Is independent of CPU type, operating system, file system,
+ and character set, and hence can be used for interchange;
+
+ * Can be produced or consumed, even for an arbitrarily long
+ sequentially presented input data stream, using only an a
+ priori bounded amount of intermediate storage, and hence can
+ be used in data communications or similar structures such as
+ Unix filters;
+
+ * Can use a number of different compression methods;
+
+ * Can be implemented readily in a manner not covered by
+ patents, and hence can be practiced freely.
+
+ The data format defined by this specification does not attempt to
+ allow random access to compressed data.
+
+
+
+
+
+
+
+Deutsch & Gailly Informational [Page 2]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+ 1.2. Intended audience
+
+ This specification is intended for use by implementors of software
+ to compress data into zlib format and/or decompress data from zlib
+ format.
+
+ The text of the specification assumes a basic background in
+ programming at the level of bits and other primitive data
+ representations.
+
+ 1.3. Scope
+
+ The specification specifies a compressed data format that can be
+ used for in-memory compression of a sequence of arbitrary bytes.
+
+ 1.4. Compliance
+
+ Unless otherwise indicated below, a compliant decompressor must be
+ able to accept and decompress any data set that conforms to all
+ the specifications presented here; a compliant compressor must
+ produce data sets that conform to all the specifications presented
+ here.
+
+ 1.5. Definitions of terms and conventions used
+
+ byte: 8 bits stored or transmitted as a unit (same as an octet).
+ (For this specification, a byte is exactly 8 bits, even on
+ machines which store a character on a number of bits different
+ from 8.) See below, for the numbering of bits within a byte.
+
+ 1.6. Changes from previous versions
+
+ Version 3.1 was the first public release of this specification.
+ In version 3.2, some terminology was changed and the Adler-32
+ sample code was rewritten for clarity. In version 3.3, the
+ support for a preset dictionary was introduced, and the
+ specification was converted to RFC style.
+
+2. Detailed specification
+
+ 2.1. Overall conventions
+
+ In the diagrams below, a box like this:
+
+ +---+
+ | | <-- the vertical bars might be missing
+ +---+
+
+
+
+
+Deutsch & Gailly Informational [Page 3]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+ represents one byte; a box like this:
+
+ +==============+
+ | |
+ +==============+
+
+ represents a variable number of bytes.
+
+ Bytes stored within a computer do not have a "bit order", since
+ they are always treated as a unit. However, a byte considered as
+ an integer between 0 and 255 does have a most- and least-
+ significant bit, and since we write numbers with the most-
+ significant digit on the left, we also write bytes with the most-
+ significant bit on the left. In the diagrams below, we number the
+ bits of a byte so that bit 0 is the least-significant bit, i.e.,
+ the bits are numbered:
+
+ +--------+
+ |76543210|
+ +--------+
+
+ Within a computer, a number may occupy multiple bytes. All
+ multi-byte numbers in the format described here are stored with
+ the MOST-significant byte first (at the lower memory address).
+ For example, the decimal number 520 is stored as:
+
+ 0 1
+ +--------+--------+
+ |00000010|00001000|
+ +--------+--------+
+ ^ ^
+ | |
+ | + less significant byte = 8
+ + more significant byte = 2 x 256
+
+ 2.2. Data format
+
+ A zlib stream has the following structure:
+
+ 0 1
+ +---+---+
+ |CMF|FLG| (more-->)
+ +---+---+
+
+
+
+
+
+
+
+
+Deutsch & Gailly Informational [Page 4]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+ (if FLG.FDICT set)
+
+ 0 1 2 3
+ +---+---+---+---+
+ | DICTID | (more-->)
+ +---+---+---+---+
+
+ +=====================+---+---+---+---+
+ |...compressed data...| ADLER32 |
+ +=====================+---+---+---+---+
+
+ Any data which may appear after ADLER32 are not part of the zlib
+ stream.
+
+ CMF (Compression Method and flags)
+ This byte is divided into a 4-bit compression method and a 4-
+ bit information field depending on the compression method.
+
+ bits 0 to 3 CM Compression method
+ bits 4 to 7 CINFO Compression info
+
+ CM (Compression method)
+ This identifies the compression method used in the file. CM = 8
+ denotes the "deflate" compression method with a window size up
+ to 32K. This is the method used by gzip and PNG (see
+ references [1] and [2] in Chapter 3, below, for the reference
+ documents). CM = 15 is reserved. It might be used in a future
+ version of this specification to indicate the presence of an
+ extra field before the compressed data.
+
+ CINFO (Compression info)
+ For CM = 8, CINFO is the base-2 logarithm of the LZ77 window
+ size, minus eight (CINFO=7 indicates a 32K window size). Values
+ of CINFO above 7 are not allowed in this version of the
+ specification. CINFO is not defined in this specification for
+ CM not equal to 8.
+
+ FLG (FLaGs)
+ This flag byte is divided as follows:
+
+ bits 0 to 4 FCHECK (check bits for CMF and FLG)
+ bit 5 FDICT (preset dictionary)
+ bits 6 to 7 FLEVEL (compression level)
+
+ The FCHECK value must be such that CMF and FLG, when viewed as
+ a 16-bit unsigned integer stored in MSB order (CMF*256 + FLG),
+ is a multiple of 31.
+
+
+
+
+Deutsch & Gailly Informational [Page 5]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+ FDICT (Preset dictionary)
+ If FDICT is set, a DICT dictionary identifier is present
+ immediately after the FLG byte. The dictionary is a sequence of
+ bytes which are initially fed to the compressor without
+ producing any compressed output. DICT is the Adler-32 checksum
+ of this sequence of bytes (see the definition of ADLER32
+ below). The decompressor can use this identifier to determine
+ which dictionary has been used by the compressor.
+
+ FLEVEL (Compression level)
+ These flags are available for use by specific compression
+ methods. The "deflate" method (CM = 8) sets these flags as
+ follows:
+
+ 0 - compressor used fastest algorithm
+ 1 - compressor used fast algorithm
+ 2 - compressor used default algorithm
+ 3 - compressor used maximum compression, slowest algorithm
+
+ The information in FLEVEL is not needed for decompression; it
+ is there to indicate if recompression might be worthwhile.
+
+ compressed data
+ For compression method 8, the compressed data is stored in the
+ deflate compressed data format as described in the document
+ "DEFLATE Compressed Data Format Specification" by L. Peter
+ Deutsch. (See reference [3] in Chapter 3, below)
+
+ Other compressed data formats are not specified in this version
+ of the zlib specification.
+
+ ADLER32 (Adler-32 checksum)
+ This contains a checksum value of the uncompressed data
+ (excluding any dictionary data) computed according to Adler-32
+ algorithm. This algorithm is a 32-bit extension and improvement
+ of the Fletcher algorithm, used in the ITU-T X.224 / ISO 8073
+ standard. See references [4] and [5] in Chapter 3, below)
+
+ Adler-32 is composed of two sums accumulated per byte: s1 is
+ the sum of all bytes, s2 is the sum of all s1 values. Both sums
+ are done modulo 65521. s1 is initialized to 1, s2 to zero. The
+ Adler-32 checksum is stored as s2*65536 + s1 in most-
+ significant-byte first (network) order.
+
+
+
+
+
+
+
+
+Deutsch & Gailly Informational [Page 6]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+ 2.3. Compliance
+
+ A compliant compressor must produce streams with correct CMF, FLG
+ and ADLER32, but need not support preset dictionaries. When the
+ zlib data format is used as part of another standard data format,
+ the compressor may use only preset dictionaries that are specified
+ by this other data format. If this other format does not use the
+ preset dictionary feature, the compressor must not set the FDICT
+ flag.
+
+ A compliant decompressor must check CMF, FLG, and ADLER32, and
+ provide an error indication if any of these have incorrect values.
+ A compliant decompressor must give an error indication if CM is
+ not one of the values defined in this specification (only the
+ value 8 is permitted in this version), since another value could
+ indicate the presence of new features that would cause subsequent
+ data to be interpreted incorrectly. A compliant decompressor must
+ give an error indication if FDICT is set and DICTID is not the
+ identifier of a known preset dictionary. A decompressor may
+ ignore FLEVEL and still be compliant. When the zlib data format
+ is being used as a part of another standard format, a compliant
+ decompressor must support all the preset dictionaries specified by
+ the other format. When the other format does not use the preset
+ dictionary feature, a compliant decompressor must reject any
+ stream in which the FDICT flag is set.
+
+3. References
+
+ [1] Deutsch, L.P.,"GZIP Compressed Data Format Specification",
+ available in ftp://ftp.uu.net/pub/archiving/zip/doc/
+
+ [2] Thomas Boutell, "PNG (Portable Network Graphics) specification",
+ available in ftp://ftp.uu.net/graphics/png/documents/
+
+ [3] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification",
+ available in ftp://ftp.uu.net/pub/archiving/zip/doc/
+
+ [4] Fletcher, J. G., "An Arithmetic Checksum for Serial
+ Transmissions," IEEE Transactions on Communications, Vol. COM-30,
+ No. 1, January 1982, pp. 247-252.
+
+ [5] ITU-T Recommendation X.224, Annex D, "Checksum Algorithms,"
+ November, 1993, pp. 144, 145. (Available from
+ gopher://info.itu.ch). ITU-T X.244 is also the same as ISO 8073.
+
+
+
+
+
+
+
+Deutsch & Gailly Informational [Page 7]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+4. Source code
+
+ Source code for a C language implementation of a "zlib" compliant
+ library is available at ftp://ftp.uu.net/pub/archiving/zip/zlib/.
+
+5. Security Considerations
+
+ A decoder that fails to check the ADLER32 checksum value may be
+ subject to undetected data corruption.
+
+6. Acknowledgements
+
+ Trademarks cited in this document are the property of their
+ respective owners.
+
+ Jean-Loup Gailly and Mark Adler designed the zlib format and wrote
+ the related software described in this specification. Glenn
+ Randers-Pehrson converted this document to RFC and HTML format.
+
+7. Authors' Addresses
+
+ L. Peter Deutsch
+ Aladdin Enterprises
+ 203 Santa Margarita Ave.
+ Menlo Park, CA 94025
+
+ Phone: (415) 322-0103 (AM only)
+ FAX: (415) 322-1734
+ EMail: <ghost@aladdin.com>
+
+
+ Jean-Loup Gailly
+
+ EMail: <gzip@prep.ai.mit.edu>
+
+ Questions about the technical content of this specification can be
+ sent by email to
+
+ Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
+ Mark Adler <madler@alumni.caltech.edu>
+
+ Editorial comments on this specification can be sent by email to
+
+ L. Peter Deutsch <ghost@aladdin.com> and
+ Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
+
+
+
+
+
+
+Deutsch & Gailly Informational [Page 8]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+8. Appendix: Rationale
+
+ 8.1. Preset dictionaries
+
+ A preset dictionary is specially useful to compress short input
+ sequences. The compressor can take advantage of the dictionary
+ context to encode the input in a more compact manner. The
+ decompressor can be initialized with the appropriate context by
+ virtually decompressing a compressed version of the dictionary
+ without producing any output. However for certain compression
+ algorithms such as the deflate algorithm this operation can be
+ achieved without actually performing any decompression.
+
+ The compressor and the decompressor must use exactly the same
+ dictionary. The dictionary may be fixed or may be chosen among a
+ certain number of predefined dictionaries, according to the kind
+ of input data. The decompressor can determine which dictionary has
+ been chosen by the compressor by checking the dictionary
+ identifier. This document does not specify the contents of
+ predefined dictionaries, since the optimal dictionaries are
+ application specific. Standard data formats using this feature of
+ the zlib specification must precisely define the allowed
+ dictionaries.
+
+ 8.2. The Adler-32 algorithm
+
+ The Adler-32 algorithm is much faster than the CRC32 algorithm yet
+ still provides an extremely low probability of undetected errors.
+
+ The modulo on unsigned long accumulators can be delayed for 5552
+ bytes, so the modulo operation time is negligible. If the bytes
+ are a, b, c, the second sum is 3a + 2b + c + 3, and so is position
+ and order sensitive, unlike the first sum, which is just a
+ checksum. That 65521 is prime is important to avoid a possible
+ large class of two-byte errors that leave the check unchanged.
+ (The Fletcher checksum uses 255, which is not prime and which also
+ makes the Fletcher check insensitive to single byte changes 0 <->
+ 255.)
+
+ The sum s1 is initialized to 1 instead of zero to make the length
+ of the sequence part of s2, so that the length does not have to be
+ checked separately. (Any sequence of zeroes has a Fletcher
+ checksum of zero.)
+
+
+
+
+
+
+
+
+Deutsch & Gailly Informational [Page 9]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+9. Appendix: Sample code
+
+ The following C code computes the Adler-32 checksum of a data buffer.
+ It is written for clarity, not for speed. The sample code is in the
+ ANSI C programming language. Non C users may find it easier to read
+ with these hints:
+
+ & Bitwise AND operator.
+ >> Bitwise right shift operator. When applied to an
+ unsigned quantity, as here, right shift inserts zero bit(s)
+ at the left.
+ << Bitwise left shift operator. Left shift inserts zero
+ bit(s) at the right.
+ ++ "n++" increments the variable n.
+ % modulo operator: a % b is the remainder of a divided by b.
+
+ #define BASE 65521 /* largest prime smaller than 65536 */
+
+ /*
+ Update a running Adler-32 checksum with the bytes buf[0..len-1]
+ and return the updated checksum. The Adler-32 checksum should be
+ initialized to 1.
+
+ Usage example:
+
+ unsigned long adler = 1L;
+
+ while (read_buffer(buffer, length) != EOF) {
+ adler = update_adler32(adler, buffer, length);
+ }
+ if (adler != original_adler) error();
+ */
+ unsigned long update_adler32(unsigned long adler,
+ unsigned char *buf, int len)
+ {
+ unsigned long s1 = adler & 0xffff;
+ unsigned long s2 = (adler >> 16) & 0xffff;
+ int n;
+
+ for (n = 0; n < len; n++) {
+ s1 = (s1 + buf[n]) % BASE;
+ s2 = (s2 + s1) % BASE;
+ }
+ return (s2 << 16) + s1;
+ }
+
+ /* Return the adler32 of the bytes buf[0..len-1] */
+
+
+
+
+Deutsch & Gailly Informational [Page 10]
+
+RFC 1950 ZLIB Compressed Data Format Specification May 1996
+
+
+ unsigned long adler32(unsigned char *buf, int len)
+ {
+ return update_adler32(1L, buf, len);
+ }
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Deutsch & Gailly Informational [Page 11]
+
diff --git a/src/3rdparty/zlib/doc/rfc1951.txt b/src/3rdparty/zlib/doc/rfc1951.txt
new file mode 100644
index 0000000..403c8c7
--- /dev/null
+++ b/src/3rdparty/zlib/doc/rfc1951.txt
@@ -0,0 +1,955 @@
+
+
+
+
+
+
+Network Working Group P. Deutsch
+Request for Comments: 1951 Aladdin Enterprises
+Category: Informational May 1996
+
+
+ DEFLATE Compressed Data Format Specification version 1.3
+
+Status of This Memo
+
+ This memo provides information for the Internet community. This memo
+ does not specify an Internet standard of any kind. Distribution of
+ this memo is unlimited.
+
+IESG Note:
+
+ The IESG takes no position on the validity of any Intellectual
+ Property Rights statements contained in this document.
+
+Notices
+
+ Copyright (c) 1996 L. Peter Deutsch
+
+ Permission is granted to copy and distribute this document for any
+ purpose and without charge, including translations into other
+ languages and incorporation into compilations, provided that the
+ copyright notice and this notice are preserved, and that any
+ substantive changes or deletions from the original are clearly
+ marked.
+
+ A pointer to the latest version of this and related documentation in
+ HTML format can be found at the URL
+ <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
+
+Abstract
+
+ This specification defines a lossless compressed data format that
+ compresses data using a combination of the LZ77 algorithm and Huffman
+ coding, with efficiency comparable to the best currently available
+ general-purpose compression methods. The data can be produced or
+ consumed, even for an arbitrarily long sequentially presented input
+ data stream, using only an a priori bounded amount of intermediate
+ storage. The format can be implemented readily in a manner not
+ covered by patents.
+
+
+
+
+
+
+
+
+Deutsch Informational [Page 1]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+Table of Contents
+
+ 1. Introduction ................................................... 2
+ 1.1. Purpose ................................................... 2
+ 1.2. Intended audience ......................................... 3
+ 1.3. Scope ..................................................... 3
+ 1.4. Compliance ................................................ 3
+ 1.5. Definitions of terms and conventions used ................ 3
+ 1.6. Changes from previous versions ............................ 4
+ 2. Compressed representation overview ............................. 4
+ 3. Detailed specification ......................................... 5
+ 3.1. Overall conventions ....................................... 5
+ 3.1.1. Packing into bytes .................................. 5
+ 3.2. Compressed block format ................................... 6
+ 3.2.1. Synopsis of prefix and Huffman coding ............... 6
+ 3.2.2. Use of Huffman coding in the "deflate" format ....... 7
+ 3.2.3. Details of block format ............................. 9
+ 3.2.4. Non-compressed blocks (BTYPE=00) ................... 11
+ 3.2.5. Compressed blocks (length and distance codes) ...... 11
+ 3.2.6. Compression with fixed Huffman codes (BTYPE=01) .... 12
+ 3.2.7. Compression with dynamic Huffman codes (BTYPE=10) .. 13
+ 3.3. Compliance ............................................... 14
+ 4. Compression algorithm details ................................. 14
+ 5. References .................................................... 16
+ 6. Security Considerations ....................................... 16
+ 7. Source code ................................................... 16
+ 8. Acknowledgements .............................................. 16
+ 9. Author's Address .............................................. 17
+
+1. Introduction
+
+ 1.1. Purpose
+
+ The purpose of this specification is to define a lossless
+ compressed data format that:
+ * Is independent of CPU type, operating system, file system,
+ and character set, and hence can be used for interchange;
+ * Can be produced or consumed, even for an arbitrarily long
+ sequentially presented input data stream, using only an a
+ priori bounded amount of intermediate storage, and hence
+ can be used in data communications or similar structures
+ such as Unix filters;
+ * Compresses data with efficiency comparable to the best
+ currently available general-purpose compression methods,
+ and in particular considerably better than the "compress"
+ program;
+ * Can be implemented readily in a manner not covered by
+ patents, and hence can be practiced freely;
+
+
+
+Deutsch Informational [Page 2]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ * Is compatible with the file format produced by the current
+ widely used gzip utility, in that conforming decompressors
+ will be able to read data produced by the existing gzip
+ compressor.
+
+ The data format defined by this specification does not attempt to:
+
+ * Allow random access to compressed data;
+ * Compress specialized data (e.g., raster graphics) as well
+ as the best currently available specialized algorithms.
+
+ A simple counting argument shows that no lossless compression
+ algorithm can compress every possible input data set. For the
+ format defined here, the worst case expansion is 5 bytes per 32K-
+ byte block, i.e., a size increase of 0.015% for large data sets.
+ English text usually compresses by a factor of 2.5 to 3;
+ executable files usually compress somewhat less; graphical data
+ such as raster images may compress much more.
+
+ 1.2. Intended audience
+
+ This specification is intended for use by implementors of software
+ to compress data into "deflate" format and/or decompress data from
+ "deflate" format.
+
+ The text of the specification assumes a basic background in
+ programming at the level of bits and other primitive data
+ representations. Familiarity with the technique of Huffman coding
+ is helpful but not required.
+
+ 1.3. Scope
+
+ The specification specifies a method for representing a sequence
+ of bytes as a (usually shorter) sequence of bits, and a method for
+ packing the latter bit sequence into bytes.
+
+ 1.4. Compliance
+
+ Unless otherwise indicated below, a compliant decompressor must be
+ able to accept and decompress any data set that conforms to all
+ the specifications presented here; a compliant compressor must
+ produce data sets that conform to all the specifications presented
+ here.
+
+ 1.5. Definitions of terms and conventions used
+
+ Byte: 8 bits stored or transmitted as a unit (same as an octet).
+ For this specification, a byte is exactly 8 bits, even on machines
+
+
+
+Deutsch Informational [Page 3]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ which store a character on a number of bits different from eight.
+ See below, for the numbering of bits within a byte.
+
+ String: a sequence of arbitrary bytes.
+
+ 1.6. Changes from previous versions
+
+ There have been no technical changes to the deflate format since
+ version 1.1 of this specification. In version 1.2, some
+ terminology was changed. Version 1.3 is a conversion of the
+ specification to RFC style.
+
+2. Compressed representation overview
+
+ A compressed data set consists of a series of blocks, corresponding
+ to successive blocks of input data. The block sizes are arbitrary,
+ except that non-compressible blocks are limited to 65,535 bytes.
+
+ Each block is compressed using a combination of the LZ77 algorithm
+ and Huffman coding. The Huffman trees for each block are independent
+ of those for previous or subsequent blocks; the LZ77 algorithm may
+ use a reference to a duplicated string occurring in a previous block,
+ up to 32K input bytes before.
+
+ Each block consists of two parts: a pair of Huffman code trees that
+ describe the representation of the compressed data part, and a
+ compressed data part. (The Huffman trees themselves are compressed
+ using Huffman encoding.) The compressed data consists of a series of
+ elements of two types: literal bytes (of strings that have not been
+ detected as duplicated within the previous 32K input bytes), and
+ pointers to duplicated strings, where a pointer is represented as a
+ pair <length, backward distance>. The representation used in the
+ "deflate" format limits distances to 32K bytes and lengths to 258
+ bytes, but does not limit the size of a block, except for
+ uncompressible blocks, which are limited as noted above.
+
+ Each type of value (literals, distances, and lengths) in the
+ compressed data is represented using a Huffman code, using one code
+ tree for literals and lengths and a separate code tree for distances.
+ The code trees for each block appear in a compact form just before
+ the compressed data for that block.
+
+
+
+
+
+
+
+
+
+
+Deutsch Informational [Page 4]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+3. Detailed specification
+
+ 3.1. Overall conventions In the diagrams below, a box like this:
+
+ +---+
+ | | <-- the vertical bars might be missing
+ +---+
+
+ represents one byte; a box like this:
+
+ +==============+
+ | |
+ +==============+
+
+ represents a variable number of bytes.
+
+ Bytes stored within a computer do not have a "bit order", since
+ they are always treated as a unit. However, a byte considered as
+ an integer between 0 and 255 does have a most- and least-
+ significant bit, and since we write numbers with the most-
+ significant digit on the left, we also write bytes with the most-
+ significant bit on the left. In the diagrams below, we number the
+ bits of a byte so that bit 0 is the least-significant bit, i.e.,
+ the bits are numbered:
+
+ +--------+
+ |76543210|
+ +--------+
+
+ Within a computer, a number may occupy multiple bytes. All
+ multi-byte numbers in the format described here are stored with
+ the least-significant byte first (at the lower memory address).
+ For example, the decimal number 520 is stored as:
+
+ 0 1
+ +--------+--------+
+ |00001000|00000010|
+ +--------+--------+
+ ^ ^
+ | |
+ | + more significant byte = 2 x 256
+ + less significant byte = 8
+
+ 3.1.1. Packing into bytes
+
+ This document does not address the issue of the order in which
+ bits of a byte are transmitted on a bit-sequential medium,
+ since the final data format described here is byte- rather than
+
+
+
+Deutsch Informational [Page 5]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ bit-oriented. However, we describe the compressed block format
+ in below, as a sequence of data elements of various bit
+ lengths, not a sequence of bytes. We must therefore specify
+ how to pack these data elements into bytes to form the final
+ compressed byte sequence:
+
+ * Data elements are packed into bytes in order of
+ increasing bit number within the byte, i.e., starting
+ with the least-significant bit of the byte.
+ * Data elements other than Huffman codes are packed
+ starting with the least-significant bit of the data
+ element.
+ * Huffman codes are packed starting with the most-
+ significant bit of the code.
+
+ In other words, if one were to print out the compressed data as
+ a sequence of bytes, starting with the first byte at the
+ *right* margin and proceeding to the *left*, with the most-
+ significant bit of each byte on the left as usual, one would be
+ able to parse the result from right to left, with fixed-width
+ elements in the correct MSB-to-LSB order and Huffman codes in
+ bit-reversed order (i.e., with the first bit of the code in the
+ relative LSB position).
+
+ 3.2. Compressed block format
+
+ 3.2.1. Synopsis of prefix and Huffman coding
+
+ Prefix coding represents symbols from an a priori known
+ alphabet by bit sequences (codes), one code for each symbol, in
+ a manner such that different symbols may be represented by bit
+ sequences of different lengths, but a parser can always parse
+ an encoded string unambiguously symbol-by-symbol.
+
+ We define a prefix code in terms of a binary tree in which the
+ two edges descending from each non-leaf node are labeled 0 and
+ 1 and in which the leaf nodes correspond one-for-one with (are
+ labeled with) the symbols of the alphabet; then the code for a
+ symbol is the sequence of 0's and 1's on the edges leading from
+ the root to the leaf labeled with that symbol. For example:
+
+
+
+
+
+
+
+
+
+
+
+Deutsch Informational [Page 6]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ /\ Symbol Code
+ 0 1 ------ ----
+ / \ A 00
+ /\ B B 1
+ 0 1 C 011
+ / \ D 010
+ A /\
+ 0 1
+ / \
+ D C
+
+ A parser can decode the next symbol from an encoded input
+ stream by walking down the tree from the root, at each step
+ choosing the edge corresponding to the next input bit.
+
+ Given an alphabet with known symbol frequencies, the Huffman
+ algorithm allows the construction of an optimal prefix code
+ (one which represents strings with those symbol frequencies
+ using the fewest bits of any possible prefix codes for that
+ alphabet). Such a code is called a Huffman code. (See
+ reference [1] in Chapter 5, references for additional
+ information on Huffman codes.)
+
+ Note that in the "deflate" format, the Huffman codes for the
+ various alphabets must not exceed certain maximum code lengths.
+ This constraint complicates the algorithm for computing code
+ lengths from symbol frequencies. Again, see Chapter 5,
+ references for details.
+
+ 3.2.2. Use of Huffman coding in the "deflate" format
+
+ The Huffman codes used for each alphabet in the "deflate"
+ format have two additional rules:
+
+ * All codes of a given bit length have lexicographically
+ consecutive values, in the same order as the symbols
+ they represent;
+
+ * Shorter codes lexicographically precede longer codes.
+
+
+
+
+
+
+
+
+
+
+
+
+Deutsch Informational [Page 7]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ We could recode the example above to follow this rule as
+ follows, assuming that the order of the alphabet is ABCD:
+
+ Symbol Code
+ ------ ----
+ A 10
+ B 0
+ C 110
+ D 111
+
+ I.e., 0 precedes 10 which precedes 11x, and 110 and 111 are
+ lexicographically consecutive.
+
+ Given this rule, we can define the Huffman code for an alphabet
+ just by giving the bit lengths of the codes for each symbol of
+ the alphabet in order; this is sufficient to determine the
+ actual codes. In our example, the code is completely defined
+ by the sequence of bit lengths (2, 1, 3, 3). The following
+ algorithm generates the codes as integers, intended to be read
+ from most- to least-significant bit. The code lengths are
+ initially in tree[I].Len; the codes are produced in
+ tree[I].Code.
+
+ 1) Count the number of codes for each code length. Let
+ bl_count[N] be the number of codes of length N, N >= 1.
+
+ 2) Find the numerical value of the smallest code for each
+ code length:
+
+ code = 0;
+ bl_count[0] = 0;
+ for (bits = 1; bits <= MAX_BITS; bits++) {
+ code = (code + bl_count[bits-1]) << 1;
+ next_code[bits] = code;
+ }
+
+ 3) Assign numerical values to all codes, using consecutive
+ values for all codes of the same length with the base
+ values determined at step 2. Codes that are never used
+ (which have a bit length of zero) must not be assigned a
+ value.
+
+ for (n = 0; n <= max_code; n++) {
+ len = tree[n].Len;
+ if (len != 0) {
+ tree[n].Code = next_code[len];
+ next_code[len]++;
+ }
+
+
+
+Deutsch Informational [Page 8]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ }
+
+ Example:
+
+ Consider the alphabet ABCDEFGH, with bit lengths (3, 3, 3, 3,
+ 3, 2, 4, 4). After step 1, we have:
+
+ N bl_count[N]
+ - -----------
+ 2 1
+ 3 5
+ 4 2
+
+ Step 2 computes the following next_code values:
+
+ N next_code[N]
+ - ------------
+ 1 0
+ 2 0
+ 3 2
+ 4 14
+
+ Step 3 produces the following code values:
+
+ Symbol Length Code
+ ------ ------ ----
+ A 3 010
+ B 3 011
+ C 3 100
+ D 3 101
+ E 3 110
+ F 2 00
+ G 4 1110
+ H 4 1111
+
+ 3.2.3. Details of block format
+
+ Each block of compressed data begins with 3 header bits
+ containing the following data:
+
+ first bit BFINAL
+ next 2 bits BTYPE
+
+ Note that the header bits do not necessarily begin on a byte
+ boundary, since a block does not necessarily occupy an integral
+ number of bytes.
+
+
+
+
+
+Deutsch Informational [Page 9]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ BFINAL is set if and only if this is the last block of the data
+ set.
+
+ BTYPE specifies how the data are compressed, as follows:
+
+ 00 - no compression
+ 01 - compressed with fixed Huffman codes
+ 10 - compressed with dynamic Huffman codes
+ 11 - reserved (error)
+
+ The only difference between the two compressed cases is how the
+ Huffman codes for the literal/length and distance alphabets are
+ defined.
+
+ In all cases, the decoding algorithm for the actual data is as
+ follows:
+
+ do
+ read block header from input stream.
+ if stored with no compression
+ skip any remaining bits in current partially
+ processed byte
+ read LEN and NLEN (see next section)
+ copy LEN bytes of data to output
+ otherwise
+ if compressed with dynamic Huffman codes
+ read representation of code trees (see
+ subsection below)
+ loop (until end of block code recognized)
+ decode literal/length value from input stream
+ if value < 256
+ copy value (literal byte) to output stream
+ otherwise
+ if value = end of block (256)
+ break from loop
+ otherwise (value = 257..285)
+ decode distance from input stream
+
+ move backwards distance bytes in the output
+ stream, and copy length bytes from this
+ position to the output stream.
+ end loop
+ while not last block
+
+ Note that a duplicated string reference may refer to a string
+ in a previous block; i.e., the backward distance may cross one
+ or more block boundaries. However a distance cannot refer past
+ the beginning of the output stream. (An application using a
+
+
+
+Deutsch Informational [Page 10]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ preset dictionary might discard part of the output stream; a
+ distance can refer to that part of the output stream anyway)
+ Note also that the referenced string may overlap the current
+ position; for example, if the last 2 bytes decoded have values
+ X and Y, a string reference with <length = 5, distance = 2>
+ adds X,Y,X,Y,X to the output stream.
+
+ We now specify each compression method in turn.
+
+ 3.2.4. Non-compressed blocks (BTYPE=00)
+
+ Any bits of input up to the next byte boundary are ignored.
+ The rest of the block consists of the following information:
+
+ 0 1 2 3 4...
+ +---+---+---+---+================================+
+ | LEN | NLEN |... LEN bytes of literal data...|
+ +---+---+---+---+================================+
+
+ LEN is the number of data bytes in the block. NLEN is the
+ one's complement of LEN.
+
+ 3.2.5. Compressed blocks (length and distance codes)
+
+ As noted above, encoded data blocks in the "deflate" format
+ consist of sequences of symbols drawn from three conceptually
+ distinct alphabets: either literal bytes, from the alphabet of
+ byte values (0..255), or <length, backward distance> pairs,
+ where the length is drawn from (3..258) and the distance is
+ drawn from (1..32,768). In fact, the literal and length
+ alphabets are merged into a single alphabet (0..285), where
+ values 0..255 represent literal bytes, the value 256 indicates
+ end-of-block, and values 257..285 represent length codes
+ (possibly in conjunction with extra bits following the symbol
+ code) as follows:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Deutsch Informational [Page 11]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ Extra Extra Extra
+ Code Bits Length(s) Code Bits Lengths Code Bits Length(s)
+ ---- ---- ------ ---- ---- ------- ---- ---- -------
+ 257 0 3 267 1 15,16 277 4 67-82
+ 258 0 4 268 1 17,18 278 4 83-98
+ 259 0 5 269 2 19-22 279 4 99-114
+ 260 0 6 270 2 23-26 280 4 115-130
+ 261 0 7 271 2 27-30 281 5 131-162
+ 262 0 8 272 2 31-34 282 5 163-194
+ 263 0 9 273 3 35-42 283 5 195-226
+ 264 0 10 274 3 43-50 284 5 227-257
+ 265 1 11,12 275 3 51-58 285 0 258
+ 266 1 13,14 276 3 59-66
+
+ The extra bits should be interpreted as a machine integer
+ stored with the most-significant bit first, e.g., bits 1110
+ represent the value 14.
+
+ Extra Extra Extra
+ Code Bits Dist Code Bits Dist Code Bits Distance
+ ---- ---- ---- ---- ---- ------ ---- ---- --------
+ 0 0 1 10 4 33-48 20 9 1025-1536
+ 1 0 2 11 4 49-64 21 9 1537-2048
+ 2 0 3 12 5 65-96 22 10 2049-3072
+ 3 0 4 13 5 97-128 23 10 3073-4096
+ 4 1 5,6 14 6 129-192 24 11 4097-6144
+ 5 1 7,8 15 6 193-256 25 11 6145-8192
+ 6 2 9-12 16 7 257-384 26 12 8193-12288
+ 7 2 13-16 17 7 385-512 27 12 12289-16384
+ 8 3 17-24 18 8 513-768 28 13 16385-24576
+ 9 3 25-32 19 8 769-1024 29 13 24577-32768
+
+ 3.2.6. Compression with fixed Huffman codes (BTYPE=01)
+
+ The Huffman codes for the two alphabets are fixed, and are not
+ represented explicitly in the data. The Huffman code lengths
+ for the literal/length alphabet are:
+
+ Lit Value Bits Codes
+ --------- ---- -----
+ 0 - 143 8 00110000 through
+ 10111111
+ 144 - 255 9 110010000 through
+ 111111111
+ 256 - 279 7 0000000 through
+ 0010111
+ 280 - 287 8 11000000 through
+ 11000111
+
+
+
+Deutsch Informational [Page 12]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ The code lengths are sufficient to generate the actual codes,
+ as described above; we show the codes in the table for added
+ clarity. Literal/length values 286-287 will never actually
+ occur in the compressed data, but participate in the code
+ construction.
+
+ Distance codes 0-31 are represented by (fixed-length) 5-bit
+ codes, with possible additional bits as shown in the table
+ shown in Paragraph 3.2.5, above. Note that distance codes 30-
+ 31 will never actually occur in the compressed data.
+
+ 3.2.7. Compression with dynamic Huffman codes (BTYPE=10)
+
+ The Huffman codes for the two alphabets appear in the block
+ immediately after the header bits and before the actual
+ compressed data, first the literal/length code and then the
+ distance code. Each code is defined by a sequence of code
+ lengths, as discussed in Paragraph 3.2.2, above. For even
+ greater compactness, the code length sequences themselves are
+ compressed using a Huffman code. The alphabet for code lengths
+ is as follows:
+
+ 0 - 15: Represent code lengths of 0 - 15
+ 16: Copy the previous code length 3 - 6 times.
+ The next 2 bits indicate repeat length
+ (0 = 3, ... , 3 = 6)
+ Example: Codes 8, 16 (+2 bits 11),
+ 16 (+2 bits 10) will expand to
+ 12 code lengths of 8 (1 + 6 + 5)
+ 17: Repeat a code length of 0 for 3 - 10 times.
+ (3 bits of length)
+ 18: Repeat a code length of 0 for 11 - 138 times
+ (7 bits of length)
+
+ A code length of 0 indicates that the corresponding symbol in
+ the literal/length or distance alphabet will not occur in the
+ block, and should not participate in the Huffman code
+ construction algorithm given earlier. If only one distance
+ code is used, it is encoded using one bit, not zero bits; in
+ this case there is a single code length of one, with one unused
+ code. One distance code of zero bits means that there are no
+ distance codes used at all (the data is all literals).
+
+ We can now define the format of the block:
+
+ 5 Bits: HLIT, # of Literal/Length codes - 257 (257 - 286)
+ 5 Bits: HDIST, # of Distance codes - 1 (1 - 32)
+ 4 Bits: HCLEN, # of Code Length codes - 4 (4 - 19)
+
+
+
+Deutsch Informational [Page 13]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ (HCLEN + 4) x 3 bits: code lengths for the code length
+ alphabet given just above, in the order: 16, 17, 18,
+ 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
+
+ These code lengths are interpreted as 3-bit integers
+ (0-7); as above, a code length of 0 means the
+ corresponding symbol (literal/length or distance code
+ length) is not used.
+
+ HLIT + 257 code lengths for the literal/length alphabet,
+ encoded using the code length Huffman code
+
+ HDIST + 1 code lengths for the distance alphabet,
+ encoded using the code length Huffman code
+
+ The actual compressed data of the block,
+ encoded using the literal/length and distance Huffman
+ codes
+
+ The literal/length symbol 256 (end of data),
+ encoded using the literal/length Huffman code
+
+ The code length repeat codes can cross from HLIT + 257 to the
+ HDIST + 1 code lengths. In other words, all code lengths form
+ a single sequence of HLIT + HDIST + 258 values.
+
+ 3.3. Compliance
+
+ A compressor may limit further the ranges of values specified in
+ the previous section and still be compliant; for example, it may
+ limit the range of backward pointers to some value smaller than
+ 32K. Similarly, a compressor may limit the size of blocks so that
+ a compressible block fits in memory.
+
+ A compliant decompressor must accept the full range of possible
+ values defined in the previous section, and must accept blocks of
+ arbitrary size.
+
+4. Compression algorithm details
+
+ While it is the intent of this document to define the "deflate"
+ compressed data format without reference to any particular
+ compression algorithm, the format is related to the compressed
+ formats produced by LZ77 (Lempel-Ziv 1977, see reference [2] below);
+ since many variations of LZ77 are patented, it is strongly
+ recommended that the implementor of a compressor follow the general
+ algorithm presented here, which is known not to be patented per se.
+ The material in this section is not part of the definition of the
+
+
+
+Deutsch Informational [Page 14]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+ specification per se, and a compressor need not follow it in order to
+ be compliant.
+
+ The compressor terminates a block when it determines that starting a
+ new block with fresh trees would be useful, or when the block size
+ fills up the compressor's block buffer.
+
+ The compressor uses a chained hash table to find duplicated strings,
+ using a hash function that operates on 3-byte sequences. At any
+ given point during compression, let XYZ be the next 3 input bytes to
+ be examined (not necessarily all different, of course). First, the
+ compressor examines the hash chain for XYZ. If the chain is empty,
+ the compressor simply writes out X as a literal byte and advances one
+ byte in the input. If the hash chain is not empty, indicating that
+ the sequence XYZ (or, if we are unlucky, some other 3 bytes with the
+ same hash function value) has occurred recently, the compressor
+ compares all strings on the XYZ hash chain with the actual input data
+ sequence starting at the current point, and selects the longest
+ match.
+
+ The compressor searches the hash chains starting with the most recent
+ strings, to favor small distances and thus take advantage of the
+ Huffman encoding. The hash chains are singly linked. There are no
+ deletions from the hash chains; the algorithm simply discards matches
+ that are too old. To avoid a worst-case situation, very long hash
+ chains are arbitrarily truncated at a certain length, determined by a
+ run-time parameter.
+
+ To improve overall compression, the compressor optionally defers the
+ selection of matches ("lazy matching"): after a match of length N has
+ been found, the compressor searches for a longer match starting at
+ the next input byte. If it finds a longer match, it truncates the
+ previous match to a length of one (thus producing a single literal
+ byte) and then emits the longer match. Otherwise, it emits the
+ original match, and, as described above, advances N bytes before
+ continuing.
+
+ Run-time parameters also control this "lazy match" procedure. If
+ compression ratio is most important, the compressor attempts a
+ complete second search regardless of the length of the first match.
+ In the normal case, if the current match is "long enough", the
+ compressor reduces the search for a longer match, thus speeding up
+ the process. If speed is most important, the compressor inserts new
+ strings in the hash table only when no match was found, or when the
+ match is not "too long". This degrades the compression ratio but
+ saves time since there are both fewer insertions and fewer searches.
+
+
+
+
+
+Deutsch Informational [Page 15]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+5. References
+
+ [1] Huffman, D. A., "A Method for the Construction of Minimum
+ Redundancy Codes", Proceedings of the Institute of Radio
+ Engineers, September 1952, Volume 40, Number 9, pp. 1098-1101.
+
+ [2] Ziv J., Lempel A., "A Universal Algorithm for Sequential Data
+ Compression", IEEE Transactions on Information Theory, Vol. 23,
+ No. 3, pp. 337-343.
+
+ [3] Gailly, J.-L., and Adler, M., ZLIB documentation and sources,
+ available in ftp://ftp.uu.net/pub/archiving/zip/doc/
+
+ [4] Gailly, J.-L., and Adler, M., GZIP documentation and sources,
+ available as gzip-*.tar in ftp://prep.ai.mit.edu/pub/gnu/
+
+ [5] Schwartz, E. S., and Kallick, B. "Generating a canonical prefix
+ encoding." Comm. ACM, 7,3 (Mar. 1964), pp. 166-169.
+
+ [6] Hirschberg and Lelewer, "Efficient decoding of prefix codes,"
+ Comm. ACM, 33,4, April 1990, pp. 449-459.
+
+6. Security Considerations
+
+ Any data compression method involves the reduction of redundancy in
+ the data. Consequently, any corruption of the data is likely to have
+ severe effects and be difficult to correct. Uncompressed text, on
+ the other hand, will probably still be readable despite the presence
+ of some corrupted bytes.
+
+ It is recommended that systems using this data format provide some
+ means of validating the integrity of the compressed data. See
+ reference [3], for example.
+
+7. Source code
+
+ Source code for a C language implementation of a "deflate" compliant
+ compressor and decompressor is available within the zlib package at
+ ftp://ftp.uu.net/pub/archiving/zip/zlib/.
+
+8. Acknowledgements
+
+ Trademarks cited in this document are the property of their
+ respective owners.
+
+ Phil Katz designed the deflate format. Jean-Loup Gailly and Mark
+ Adler wrote the related software described in this specification.
+ Glenn Randers-Pehrson converted this document to RFC and HTML format.
+
+
+
+Deutsch Informational [Page 16]
+
+RFC 1951 DEFLATE Compressed Data Format Specification May 1996
+
+
+9. Author's Address
+
+ L. Peter Deutsch
+ Aladdin Enterprises
+ 203 Santa Margarita Ave.
+ Menlo Park, CA 94025
+
+ Phone: (415) 322-0103 (AM only)
+ FAX: (415) 322-1734
+ EMail: <ghost@aladdin.com>
+
+ Questions about the technical content of this specification can be
+ sent by email to:
+
+ Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
+ Mark Adler <madler@alumni.caltech.edu>
+
+ Editorial comments on this specification can be sent by email to:
+
+ L. Peter Deutsch <ghost@aladdin.com> and
+ Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Deutsch Informational [Page 17]
+
diff --git a/src/3rdparty/zlib/doc/rfc1952.txt b/src/3rdparty/zlib/doc/rfc1952.txt
new file mode 100644
index 0000000..a8e51b4
--- /dev/null
+++ b/src/3rdparty/zlib/doc/rfc1952.txt
@@ -0,0 +1,675 @@
+
+
+
+
+
+
+Network Working Group P. Deutsch
+Request for Comments: 1952 Aladdin Enterprises
+Category: Informational May 1996
+
+
+ GZIP file format specification version 4.3
+
+Status of This Memo
+
+ This memo provides information for the Internet community. This memo
+ does not specify an Internet standard of any kind. Distribution of
+ this memo is unlimited.
+
+IESG Note:
+
+ The IESG takes no position on the validity of any Intellectual
+ Property Rights statements contained in this document.
+
+Notices
+
+ Copyright (c) 1996 L. Peter Deutsch
+
+ Permission is granted to copy and distribute this document for any
+ purpose and without charge, including translations into other
+ languages and incorporation into compilations, provided that the
+ copyright notice and this notice are preserved, and that any
+ substantive changes or deletions from the original are clearly
+ marked.
+
+ A pointer to the latest version of this and related documentation in
+ HTML format can be found at the URL
+ <ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html>.
+
+Abstract
+
+ This specification defines a lossless compressed data format that is
+ compatible with the widely used GZIP utility. The format includes a
+ cyclic redundancy check value for detecting data corruption. The
+ format presently uses the DEFLATE method of compression but can be
+ easily extended to use other compression methods. The format can be
+ implemented readily in a manner not covered by patents.
+
+
+
+
+
+
+
+
+
+
+Deutsch Informational [Page 1]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+Table of Contents
+
+ 1. Introduction ................................................... 2
+ 1.1. Purpose ................................................... 2
+ 1.2. Intended audience ......................................... 3
+ 1.3. Scope ..................................................... 3
+ 1.4. Compliance ................................................ 3
+ 1.5. Definitions of terms and conventions used ................. 3
+ 1.6. Changes from previous versions ............................ 3
+ 2. Detailed specification ......................................... 4
+ 2.1. Overall conventions ....................................... 4
+ 2.2. File format ............................................... 5
+ 2.3. Member format ............................................. 5
+ 2.3.1. Member header and trailer ........................... 6
+ 2.3.1.1. Extra field ................................... 8
+ 2.3.1.2. Compliance .................................... 9
+ 3. References .................................................. 9
+ 4. Security Considerations .................................... 10
+ 5. Acknowledgements ........................................... 10
+ 6. Author's Address ........................................... 10
+ 7. Appendix: Jean-Loup Gailly's gzip utility .................. 11
+ 8. Appendix: Sample CRC Code .................................. 11
+
+1. Introduction
+
+ 1.1. Purpose
+
+ The purpose of this specification is to define a lossless
+ compressed data format that:
+
+ * Is independent of CPU type, operating system, file system,
+ and character set, and hence can be used for interchange;
+ * Can compress or decompress a data stream (as opposed to a
+ randomly accessible file) to produce another data stream,
+ using only an a priori bounded amount of intermediate
+ storage, and hence can be used in data communications or
+ similar structures such as Unix filters;
+ * Compresses data with efficiency comparable to the best
+ currently available general-purpose compression methods,
+ and in particular considerably better than the "compress"
+ program;
+ * Can be implemented readily in a manner not covered by
+ patents, and hence can be practiced freely;
+ * Is compatible with the file format produced by the current
+ widely used gzip utility, in that conforming decompressors
+ will be able to read data produced by the existing gzip
+ compressor.
+
+
+
+
+Deutsch Informational [Page 2]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+ The data format defined by this specification does not attempt to:
+
+ * Provide random access to compressed data;
+ * Compress specialized data (e.g., raster graphics) as well as
+ the best currently available specialized algorithms.
+
+ 1.2. Intended audience
+
+ This specification is intended for use by implementors of software
+ to compress data into gzip format and/or decompress data from gzip
+ format.
+
+ The text of the specification assumes a basic background in
+ programming at the level of bits and other primitive data
+ representations.
+
+ 1.3. Scope
+
+ The specification specifies a compression method and a file format
+ (the latter assuming only that a file can store a sequence of
+ arbitrary bytes). It does not specify any particular interface to
+ a file system or anything about character sets or encodings
+ (except for file names and comments, which are optional).
+
+ 1.4. Compliance
+
+ Unless otherwise indicated below, a compliant decompressor must be
+ able to accept and decompress any file that conforms to all the
+ specifications presented here; a compliant compressor must produce
+ files that conform to all the specifications presented here. The
+ material in the appendices is not part of the specification per se
+ and is not relevant to compliance.
+
+ 1.5. Definitions of terms and conventions used
+
+ byte: 8 bits stored or transmitted as a unit (same as an octet).
+ (For this specification, a byte is exactly 8 bits, even on
+ machines which store a character on a number of bits different
+ from 8.) See below for the numbering of bits within a byte.
+
+ 1.6. Changes from previous versions
+
+ There have been no technical changes to the gzip format since
+ version 4.1 of this specification. In version 4.2, some
+ terminology was changed, and the sample CRC code was rewritten for
+ clarity and to eliminate the requirement for the caller to do pre-
+ and post-conditioning. Version 4.3 is a conversion of the
+ specification to RFC style.
+
+
+
+Deutsch Informational [Page 3]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+2. Detailed specification
+
+ 2.1. Overall conventions
+
+ In the diagrams below, a box like this:
+
+ +---+
+ | | <-- the vertical bars might be missing
+ +---+
+
+ represents one byte; a box like this:
+
+ +==============+
+ | |
+ +==============+
+
+ represents a variable number of bytes.
+
+ Bytes stored within a computer do not have a "bit order", since
+ they are always treated as a unit. However, a byte considered as
+ an integer between 0 and 255 does have a most- and least-
+ significant bit, and since we write numbers with the most-
+ significant digit on the left, we also write bytes with the most-
+ significant bit on the left. In the diagrams below, we number the
+ bits of a byte so that bit 0 is the least-significant bit, i.e.,
+ the bits are numbered:
+
+ +--------+
+ |76543210|
+ +--------+
+
+ This document does not address the issue of the order in which
+ bits of a byte are transmitted on a bit-sequential medium, since
+ the data format described here is byte- rather than bit-oriented.
+
+ Within a computer, a number may occupy multiple bytes. All
+ multi-byte numbers in the format described here are stored with
+ the least-significant byte first (at the lower memory address).
+ For example, the decimal number 520 is stored as:
+
+ 0 1
+ +--------+--------+
+ |00001000|00000010|
+ +--------+--------+
+ ^ ^
+ | |
+ | + more significant byte = 2 x 256
+ + less significant byte = 8
+
+
+
+Deutsch Informational [Page 4]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+ 2.2. File format
+
+ A gzip file consists of a series of "members" (compressed data
+ sets). The format of each member is specified in the following
+ section. The members simply appear one after another in the file,
+ with no additional information before, between, or after them.
+
+ 2.3. Member format
+
+ Each member has the following structure:
+
+ +---+---+---+---+---+---+---+---+---+---+
+ |ID1|ID2|CM |FLG| MTIME |XFL|OS | (more-->)
+ +---+---+---+---+---+---+---+---+---+---+
+
+ (if FLG.FEXTRA set)
+
+ +---+---+=================================+
+ | XLEN |...XLEN bytes of "extra field"...| (more-->)
+ +---+---+=================================+
+
+ (if FLG.FNAME set)
+
+ +=========================================+
+ |...original file name, zero-terminated...| (more-->)
+ +=========================================+
+
+ (if FLG.FCOMMENT set)
+
+ +===================================+
+ |...file comment, zero-terminated...| (more-->)
+ +===================================+
+
+ (if FLG.FHCRC set)
+
+ +---+---+
+ | CRC16 |
+ +---+---+
+
+ +=======================+
+ |...compressed blocks...| (more-->)
+ +=======================+
+
+ 0 1 2 3 4 5 6 7
+ +---+---+---+---+---+---+---+---+
+ | CRC32 | ISIZE |
+ +---+---+---+---+---+---+---+---+
+
+
+
+
+Deutsch Informational [Page 5]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+ 2.3.1. Member header and trailer
+
+ ID1 (IDentification 1)
+ ID2 (IDentification 2)
+ These have the fixed values ID1 = 31 (0x1f, \037), ID2 = 139
+ (0x8b, \213), to identify the file as being in gzip format.
+
+ CM (Compression Method)
+ This identifies the compression method used in the file. CM
+ = 0-7 are reserved. CM = 8 denotes the "deflate"
+ compression method, which is the one customarily used by
+ gzip and which is documented elsewhere.
+
+ FLG (FLaGs)
+ This flag byte is divided into individual bits as follows:
+
+ bit 0 FTEXT
+ bit 1 FHCRC
+ bit 2 FEXTRA
+ bit 3 FNAME
+ bit 4 FCOMMENT
+ bit 5 reserved
+ bit 6 reserved
+ bit 7 reserved
+
+ If FTEXT is set, the file is probably ASCII text. This is
+ an optional indication, which the compressor may set by
+ checking a small amount of the input data to see whether any
+ non-ASCII characters are present. In case of doubt, FTEXT
+ is cleared, indicating binary data. For systems which have
+ different file formats for ascii text and binary data, the
+ decompressor can use FTEXT to choose the appropriate format.
+ We deliberately do not specify the algorithm used to set
+ this bit, since a compressor always has the option of
+ leaving it cleared and a decompressor always has the option
+ of ignoring it and letting some other program handle issues
+ of data conversion.
+
+ If FHCRC is set, a CRC16 for the gzip header is present,
+ immediately before the compressed data. The CRC16 consists
+ of the two least significant bytes of the CRC32 for all
+ bytes of the gzip header up to and not including the CRC16.
+ [The FHCRC bit was never set by versions of gzip up to
+ 1.2.4, even though it was documented with a different
+ meaning in gzip 1.2.4.]
+
+ If FEXTRA is set, optional extra fields are present, as
+ described in a following section.
+
+
+
+Deutsch Informational [Page 6]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+ If FNAME is set, an original file name is present,
+ terminated by a zero byte. The name must consist of ISO
+ 8859-1 (LATIN-1) characters; on operating systems using
+ EBCDIC or any other character set for file names, the name
+ must be translated to the ISO LATIN-1 character set. This
+ is the original name of the file being compressed, with any
+ directory components removed, and, if the file being
+ compressed is on a file system with case insensitive names,
+ forced to lower case. There is no original file name if the
+ data was compressed from a source other than a named file;
+ for example, if the source was stdin on a Unix system, there
+ is no file name.
+
+ If FCOMMENT is set, a zero-terminated file comment is
+ present. This comment is not interpreted; it is only
+ intended for human consumption. The comment must consist of
+ ISO 8859-1 (LATIN-1) characters. Line breaks should be
+ denoted by a single line feed character (10 decimal).
+
+ Reserved FLG bits must be zero.
+
+ MTIME (Modification TIME)
+ This gives the most recent modification time of the original
+ file being compressed. The time is in Unix format, i.e.,
+ seconds since 00:00:00 GMT, Jan. 1, 1970. (Note that this
+ may cause problems for MS-DOS and other systems that use
+ local rather than Universal time.) If the compressed data
+ did not come from a file, MTIME is set to the time at which
+ compression started. MTIME = 0 means no time stamp is
+ available.
+
+ XFL (eXtra FLags)
+ These flags are available for use by specific compression
+ methods. The "deflate" method (CM = 8) sets these flags as
+ follows:
+
+ XFL = 2 - compressor used maximum compression,
+ slowest algorithm
+ XFL = 4 - compressor used fastest algorithm
+
+ OS (Operating System)
+ This identifies the type of file system on which compression
+ took place. This may be useful in determining end-of-line
+ convention for text files. The currently defined values are
+ as follows:
+
+
+
+
+
+
+Deutsch Informational [Page 7]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+ 0 - FAT filesystem (MS-DOS, OS/2, NT/Win32)
+ 1 - Amiga
+ 2 - VMS (or OpenVMS)
+ 3 - Unix
+ 4 - VM/CMS
+ 5 - Atari TOS
+ 6 - HPFS filesystem (OS/2, NT)
+ 7 - Macintosh
+ 8 - Z-System
+ 9 - CP/M
+ 10 - TOPS-20
+ 11 - NTFS filesystem (NT)
+ 12 - QDOS
+ 13 - Acorn RISCOS
+ 255 - unknown
+
+ XLEN (eXtra LENgth)
+ If FLG.FEXTRA is set, this gives the length of the optional
+ extra field. See below for details.
+
+ CRC32 (CRC-32)
+ This contains a Cyclic Redundancy Check value of the
+ uncompressed data computed according to CRC-32 algorithm
+ used in the ISO 3309 standard and in section 8.1.1.6.2 of
+ ITU-T recommendation V.42. (See http://www.iso.ch for
+ ordering ISO documents. See gopher://info.itu.ch for an
+ online version of ITU-T V.42.)
+
+ ISIZE (Input SIZE)
+ This contains the size of the original (uncompressed) input
+ data modulo 2^32.
+
+ 2.3.1.1. Extra field
+
+ If the FLG.FEXTRA bit is set, an "extra field" is present in
+ the header, with total length XLEN bytes. It consists of a
+ series of subfields, each of the form:
+
+ +---+---+---+---+==================================+
+ |SI1|SI2| LEN |... LEN bytes of subfield data ...|
+ +---+---+---+---+==================================+
+
+ SI1 and SI2 provide a subfield ID, typically two ASCII letters
+ with some mnemonic value. Jean-Loup Gailly
+ <gzip@prep.ai.mit.edu> is maintaining a registry of subfield
+ IDs; please send him any subfield ID you wish to use. Subfield
+ IDs with SI2 = 0 are reserved for future use. The following
+ IDs are currently defined:
+
+
+
+Deutsch Informational [Page 8]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+ SI1 SI2 Data
+ ---------- ---------- ----
+ 0x41 ('A') 0x70 ('P') Apollo file type information
+
+ LEN gives the length of the subfield data, excluding the 4
+ initial bytes.
+
+ 2.3.1.2. Compliance
+
+ A compliant compressor must produce files with correct ID1,
+ ID2, CM, CRC32, and ISIZE, but may set all the other fields in
+ the fixed-length part of the header to default values (255 for
+ OS, 0 for all others). The compressor must set all reserved
+ bits to zero.
+
+ A compliant decompressor must check ID1, ID2, and CM, and
+ provide an error indication if any of these have incorrect
+ values. It must examine FEXTRA/XLEN, FNAME, FCOMMENT and FHCRC
+ at least so it can skip over the optional fields if they are
+ present. It need not examine any other part of the header or
+ trailer; in particular, a decompressor may ignore FTEXT and OS
+ and always produce binary output, and still be compliant. A
+ compliant decompressor must give an error indication if any
+ reserved bit is non-zero, since such a bit could indicate the
+ presence of a new field that would cause subsequent data to be
+ interpreted incorrectly.
+
+3. References
+
+ [1] "Information Processing - 8-bit single-byte coded graphic
+ character sets - Part 1: Latin alphabet No.1" (ISO 8859-1:1987).
+ The ISO 8859-1 (Latin-1) character set is a superset of 7-bit
+ ASCII. Files defining this character set are available as
+ iso_8859-1.* in ftp://ftp.uu.net/graphics/png/documents/
+
+ [2] ISO 3309
+
+ [3] ITU-T recommendation V.42
+
+ [4] Deutsch, L.P.,"DEFLATE Compressed Data Format Specification",
+ available in ftp://ftp.uu.net/pub/archiving/zip/doc/
+
+ [5] Gailly, J.-L., GZIP documentation, available as gzip-*.tar in
+ ftp://prep.ai.mit.edu/pub/gnu/
+
+ [6] Sarwate, D.V., "Computation of Cyclic Redundancy Checks via Table
+ Look-Up", Communications of the ACM, 31(8), pp.1008-1013.
+
+
+
+
+Deutsch Informational [Page 9]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+ [7] Schwaderer, W.D., "CRC Calculation", April 85 PC Tech Journal,
+ pp.118-133.
+
+ [8] ftp://ftp.adelaide.edu.au/pub/rocksoft/papers/crc_v3.txt,
+ describing the CRC concept.
+
+4. Security Considerations
+
+ Any data compression method involves the reduction of redundancy in
+ the data. Consequently, any corruption of the data is likely to have
+ severe effects and be difficult to correct. Uncompressed text, on
+ the other hand, will probably still be readable despite the presence
+ of some corrupted bytes.
+
+ It is recommended that systems using this data format provide some
+ means of validating the integrity of the compressed data, such as by
+ setting and checking the CRC-32 check value.
+
+5. Acknowledgements
+
+ Trademarks cited in this document are the property of their
+ respective owners.
+
+ Jean-Loup Gailly designed the gzip format and wrote, with Mark Adler,
+ the related software described in this specification. Glenn
+ Randers-Pehrson converted this document to RFC and HTML format.
+
+6. Author's Address
+
+ L. Peter Deutsch
+ Aladdin Enterprises
+ 203 Santa Margarita Ave.
+ Menlo Park, CA 94025
+
+ Phone: (415) 322-0103 (AM only)
+ FAX: (415) 322-1734
+ EMail: <ghost@aladdin.com>
+
+ Questions about the technical content of this specification can be
+ sent by email to:
+
+ Jean-Loup Gailly <gzip@prep.ai.mit.edu> and
+ Mark Adler <madler@alumni.caltech.edu>
+
+ Editorial comments on this specification can be sent by email to:
+
+ L. Peter Deutsch <ghost@aladdin.com> and
+ Glenn Randers-Pehrson <randeg@alumni.rpi.edu>
+
+
+
+Deutsch Informational [Page 10]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+7. Appendix: Jean-Loup Gailly's gzip utility
+
+ The most widely used implementation of gzip compression, and the
+ original documentation on which this specification is based, were
+ created by Jean-Loup Gailly <gzip@prep.ai.mit.edu>. Since this
+ implementation is a de facto standard, we mention some more of its
+ features here. Again, the material in this section is not part of
+ the specification per se, and implementations need not follow it to
+ be compliant.
+
+ When compressing or decompressing a file, gzip preserves the
+ protection, ownership, and modification time attributes on the local
+ file system, since there is no provision for representing protection
+ attributes in the gzip file format itself. Since the file format
+ includes a modification time, the gzip decompressor provides a
+ command line switch that assigns the modification time from the file,
+ rather than the local modification time of the compressed input, to
+ the decompressed output.
+
+8. Appendix: Sample CRC Code
+
+ The following sample code represents a practical implementation of
+ the CRC (Cyclic Redundancy Check). (See also ISO 3309 and ITU-T V.42
+ for a formal specification.)
+
+ The sample code is in the ANSI C programming language. Non C users
+ may find it easier to read with these hints:
+
+ & Bitwise AND operator.
+ ^ Bitwise exclusive-OR operator.
+ >> Bitwise right shift operator. When applied to an
+ unsigned quantity, as here, right shift inserts zero
+ bit(s) at the left.
+ ! Logical NOT operator.
+ ++ "n++" increments the variable n.
+ 0xNNN 0x introduces a hexadecimal (base 16) constant.
+ Suffix L indicates a long value (at least 32 bits).
+
+ /* Table of CRCs of all 8-bit messages. */
+ unsigned long crc_table[256];
+
+ /* Flag: has the table been computed? Initially false. */
+ int crc_table_computed = 0;
+
+ /* Make the table for a fast CRC. */
+ void make_crc_table(void)
+ {
+ unsigned long c;
+
+
+
+Deutsch Informational [Page 11]
+
+RFC 1952 GZIP File Format Specification May 1996
+
+
+ int n, k;
+ for (n = 0; n < 256; n++) {
+ c = (unsigned long) n;
+ for (k = 0; k < 8; k++) {
+ if (c & 1) {
+ c = 0xedb88320L ^ (c >> 1);
+ } else {
+ c = c >> 1;
+ }
+ }
+ crc_table[n] = c;
+ }
+ crc_table_computed = 1;
+ }
+
+ /*
+ Update a running crc with the bytes buf[0..len-1] and return
+ the updated crc. The crc should be initialized to zero. Pre- and
+ post-conditioning (one's complement) is performed within this
+ function so it shouldn't be done by the caller. Usage example:
+
+ unsigned long crc = 0L;
+
+ while (read_buffer(buffer, length) != EOF) {
+ crc = update_crc(crc, buffer, length);
+ }
+ if (crc != original_crc) error();
+ */
+ unsigned long update_crc(unsigned long crc,
+ unsigned char *buf, int len)
+ {
+ unsigned long c = crc ^ 0xffffffffL;
+ int n;
+
+ if (!crc_table_computed)
+ make_crc_table();
+ for (n = 0; n < len; n++) {
+ c = crc_table[(c ^ buf[n]) & 0xff] ^ (c >> 8);
+ }
+ return c ^ 0xffffffffL;
+ }
+
+ /* Return the CRC of the bytes buf[0..len-1]. */
+ unsigned long crc(unsigned char *buf, int len)
+ {
+ return update_crc(0L, buf, len);
+ }
+
+
+
+
+Deutsch Informational [Page 12]
+
diff --git a/src/3rdparty/zlib/doc/txtvsbin.txt b/src/3rdparty/zlib/doc/txtvsbin.txt
new file mode 100644
index 0000000..3d0f063
--- /dev/null
+++ b/src/3rdparty/zlib/doc/txtvsbin.txt
@@ -0,0 +1,107 @@
+A Fast Method for Identifying Plain Text Files
+==============================================
+
+
+Introduction
+------------
+
+Given a file coming from an unknown source, it is sometimes desirable
+to find out whether the format of that file is plain text. Although
+this may appear like a simple task, a fully accurate detection of the
+file type requires heavy-duty semantic analysis on the file contents.
+It is, however, possible to obtain satisfactory results by employing
+various heuristics.
+
+Previous versions of PKZip and other zip-compatible compression tools
+were using a crude detection scheme: if more than 80% (4/5) of the bytes
+found in a certain buffer are within the range [7..127], the file is
+labeled as plain text, otherwise it is labeled as binary. A prominent
+limitation of this scheme is the restriction to Latin-based alphabets.
+Other alphabets, like Greek, Cyrillic or Asian, make extensive use of
+the bytes within the range [128..255], and texts using these alphabets
+are most often misidentified by this scheme; in other words, the rate
+of false negatives is sometimes too high, which means that the recall
+is low. Another weakness of this scheme is a reduced precision, due to
+the false positives that may occur when binary files containing large
+amounts of textual characters are misidentified as plain text.
+
+In this article we propose a new, simple detection scheme that features
+a much increased precision and a near-100% recall. This scheme is
+designed to work on ASCII, Unicode and other ASCII-derived alphabets,
+and it handles single-byte encodings (ISO-8859, MacRoman, KOI8, etc.)
+and variable-sized encodings (ISO-2022, UTF-8, etc.). Wider encodings
+(UCS-2/UTF-16 and UCS-4/UTF-32) are not handled, however.
+
+
+The Algorithm
+-------------
+
+The algorithm works by dividing the set of bytecodes [0..255] into three
+categories:
+- The white list of textual bytecodes:
+ 9 (TAB), 10 (LF), 13 (CR), 32 (SPACE) to 255.
+- The gray list of tolerated bytecodes:
+ 7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB), 27 (ESC).
+- The black list of undesired, non-textual bytecodes:
+ 0 (NUL) to 6, 14 to 31.
+
+If a file contains at least one byte that belongs to the white list and
+no byte that belongs to the black list, then the file is categorized as
+plain text; otherwise, it is categorized as binary. (The boundary case,
+when the file is empty, automatically falls into the latter category.)
+
+
+Rationale
+---------
+
+The idea behind this algorithm relies on two observations.
+
+The first observation is that, although the full range of 7-bit codes
+[0..127] is properly specified by the ASCII standard, most control
+characters in the range [0..31] are not used in practice. The only
+widely-used, almost universally-portable control codes are 9 (TAB),
+10 (LF) and 13 (CR). There are a few more control codes that are
+recognized on a reduced range of platforms and text viewers/editors:
+7 (BEL), 8 (BS), 11 (VT), 12 (FF), 26 (SUB) and 27 (ESC); but these
+codes are rarely (if ever) used alone, without being accompanied by
+some printable text. Even the newer, portable text formats such as
+XML avoid using control characters outside the list mentioned here.
+
+The second observation is that most of the binary files tend to contain
+control characters, especially 0 (NUL). Even though the older text
+detection schemes observe the presence of non-ASCII codes from the range
+[128..255], the precision rarely has to suffer if this upper range is
+labeled as textual, because the files that are genuinely binary tend to
+contain both control characters and codes from the upper range. On the
+other hand, the upper range needs to be labeled as textual, because it
+is used by virtually all ASCII extensions. In particular, this range is
+used for encoding non-Latin scripts.
+
+Since there is no counting involved, other than simply observing the
+presence or the absence of some byte values, the algorithm produces
+consistent results, regardless what alphabet encoding is being used.
+(If counting were involved, it could be possible to obtain different
+results on a text encoded, say, using ISO-8859-16 versus UTF-8.)
+
+There is an extra category of plain text files that are "polluted" with
+one or more black-listed codes, either by mistake or by peculiar design
+considerations. In such cases, a scheme that tolerates a small fraction
+of black-listed codes would provide an increased recall (i.e. more true
+positives). This, however, incurs a reduced precision overall, since
+false positives are more likely to appear in binary files that contain
+large chunks of textual data. Furthermore, "polluted" plain text should
+be regarded as binary by general-purpose text detection schemes, because
+general-purpose text processing algorithms might not be applicable.
+Under this premise, it is safe to say that our detection method provides
+a near-100% recall.
+
+Experiments have been run on many files coming from various platforms
+and applications. We tried plain text files, system logs, source code,
+formatted office documents, compiled object code, etc. The results
+confirm the optimistic assumptions about the capabilities of this
+algorithm.
+
+
+--
+Cosmin Truta
+Last updated: 2006-May-28
diff --git a/src/3rdparty/zlib/example.c b/src/3rdparty/zlib/example.c
index 6c8a0ee..604736f 100644
--- a/src/3rdparty/zlib/example.c
+++ b/src/3rdparty/zlib/example.c
@@ -1,12 +1,12 @@
/* example.c -- usage example of the zlib compression library
- * Copyright (C) 1995-2004 Jean-loup Gailly.
+ * Copyright (C) 1995-2006 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
/* @(#) $Id$ */
-#include <stdio.h>
#include "zlib.h"
+#include <stdio.h>
#ifdef STDC
# include <string.h>
diff --git a/src/3rdparty/zlib/examples/README.examples b/src/3rdparty/zlib/examples/README.examples
deleted file mode 100644
index 5632d7a..0000000
--- a/src/3rdparty/zlib/examples/README.examples
+++ /dev/null
@@ -1,42 +0,0 @@
-This directory contains examples of the use of zlib.
-
-fitblk.c
- compress just enough input to nearly fill a requested output size
- - zlib isn't designed to do this, but fitblk does it anyway
-
-gun.c
- uncompress a gzip file
- - illustrates the use of inflateBack() for high speed file-to-file
- decompression using call-back functions
- - is approximately twice as fast as gzip -d
- - also provides Unix uncompress functionality, again twice as fast
-
-gzappend.c
- append to a gzip file
- - illustrates the use of the Z_BLOCK flush parameter for inflate()
- - illustrates the use of deflatePrime() to start at any bit
-
-gzjoin.c
- join gzip files without recalculating the crc or recompressing
- - illustrates the use of the Z_BLOCK flush parameter for inflate()
- - illustrates the use of crc32_combine()
-
-gzlog.c
-gzlog.h
- efficiently maintain a message log file in gzip format
- - illustrates use of raw deflate and Z_SYNC_FLUSH
- - illustrates use of gzip header extra field
-
-zlib_how.html
- painfully comprehensive description of zpipe.c (see below)
- - describes in excruciating detail the use of deflate() and inflate()
-
-zpipe.c
- reads and writes zlib streams from stdin to stdout
- - illustrates the proper use of deflate() and inflate()
- - deeply commented in zlib_how.html (see above)
-
-zran.c
- index a zlib or gzip stream and randomly access it
- - illustrates the use of Z_BLOCK, inflatePrime(), and
- inflateSetDictionary() to provide random access
diff --git a/src/3rdparty/zlib/examples/fitblk.c b/src/3rdparty/zlib/examples/fitblk.c
deleted file mode 100644
index c61de5c..0000000
--- a/src/3rdparty/zlib/examples/fitblk.c
+++ /dev/null
@@ -1,233 +0,0 @@
-/* fitblk.c: example of fitting compressed output to a specified size
- Not copyrighted -- provided to the public domain
- Version 1.1 25 November 2004 Mark Adler */
-
-/* Version history:
- 1.0 24 Nov 2004 First version
- 1.1 25 Nov 2004 Change deflateInit2() to deflateInit()
- Use fixed-size, stack-allocated raw buffers
- Simplify code moving compression to subroutines
- Use assert() for internal errors
- Add detailed description of approach
- */
-
-/* Approach to just fitting a requested compressed size:
-
- fitblk performs three compression passes on a portion of the input
- data in order to determine how much of that input will compress to
- nearly the requested output block size. The first pass generates
- enough deflate blocks to produce output to fill the requested
- output size plus a specfied excess amount (see the EXCESS define
- below). The last deflate block may go quite a bit past that, but
- is discarded. The second pass decompresses and recompresses just
- the compressed data that fit in the requested plus excess sized
- buffer. The deflate process is terminated after that amount of
- input, which is less than the amount consumed on the first pass.
- The last deflate block of the result will be of a comparable size
- to the final product, so that the header for that deflate block and
- the compression ratio for that block will be about the same as in
- the final product. The third compression pass decompresses the
- result of the second step, but only the compressed data up to the
- requested size minus an amount to allow the compressed stream to
- complete (see the MARGIN define below). That will result in a
- final compressed stream whose length is less than or equal to the
- requested size. Assuming sufficient input and a requested size
- greater than a few hundred bytes, the shortfall will typically be
- less than ten bytes.
-
- If the input is short enough that the first compression completes
- before filling the requested output size, then that compressed
- stream is return with no recompression.
-
- EXCESS is chosen to be just greater than the shortfall seen in a
- two pass approach similar to the above. That shortfall is due to
- the last deflate block compressing more efficiently with a smaller
- header on the second pass. EXCESS is set to be large enough so
- that there is enough uncompressed data for the second pass to fill
- out the requested size, and small enough so that the final deflate
- block of the second pass will be close in size to the final deflate
- block of the third and final pass. MARGIN is chosen to be just
- large enough to assure that the final compression has enough room
- to complete in all cases.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <assert.h>
-#include "zlib.h"
-
-#define local static
-
-/* print nastygram and leave */
-local void quit(char *why)
-{
- fprintf(stderr, "fitblk abort: %s\n", why);
- exit(1);
-}
-
-#define RAWLEN 4096 /* intermediate uncompressed buffer size */
-
-/* compress from file to def until provided buffer is full or end of
- input reached; return last deflate() return value, or Z_ERRNO if
- there was read error on the file */
-local int partcompress(FILE *in, z_streamp def)
-{
- int ret, flush;
- unsigned char raw[RAWLEN];
-
- flush = Z_NO_FLUSH;
- do {
- def->avail_in = fread(raw, 1, RAWLEN, in);
- if (ferror(in))
- return Z_ERRNO;
- def->next_in = raw;
- if (feof(in))
- flush = Z_FINISH;
- ret = deflate(def, flush);
- assert(ret != Z_STREAM_ERROR);
- } while (def->avail_out != 0 && flush == Z_NO_FLUSH);
- return ret;
-}
-
-/* recompress from inf's input to def's output; the input for inf and
- the output for def are set in those structures before calling;
- return last deflate() return value, or Z_MEM_ERROR if inflate()
- was not able to allocate enough memory when it needed to */
-local int recompress(z_streamp inf, z_streamp def)
-{
- int ret, flush;
- unsigned char raw[RAWLEN];
-
- flush = Z_NO_FLUSH;
- do {
- /* decompress */
- inf->avail_out = RAWLEN;
- inf->next_out = raw;
- ret = inflate(inf, Z_NO_FLUSH);
- assert(ret != Z_STREAM_ERROR && ret != Z_DATA_ERROR &&
- ret != Z_NEED_DICT);
- if (ret == Z_MEM_ERROR)
- return ret;
-
- /* compress what was decompresed until done or no room */
- def->avail_in = RAWLEN - inf->avail_out;
- def->next_in = raw;
- if (inf->avail_out != 0)
- flush = Z_FINISH;
- ret = deflate(def, flush);
- assert(ret != Z_STREAM_ERROR);
- } while (ret != Z_STREAM_END && def->avail_out != 0);
- return ret;
-}
-
-#define EXCESS 256 /* empirically determined stream overage */
-#define MARGIN 8 /* amount to back off for completion */
-
-/* compress from stdin to fixed-size block on stdout */
-int main(int argc, char **argv)
-{
- int ret; /* return code */
- unsigned size; /* requested fixed output block size */
- unsigned have; /* bytes written by deflate() call */
- unsigned char *blk; /* intermediate and final stream */
- unsigned char *tmp; /* close to desired size stream */
- z_stream def, inf; /* zlib deflate and inflate states */
-
- /* get requested output size */
- if (argc != 2)
- quit("need one argument: size of output block");
- ret = strtol(argv[1], argv + 1, 10);
- if (argv[1][0] != 0)
- quit("argument must be a number");
- if (ret < 8) /* 8 is minimum zlib stream size */
- quit("need positive size of 8 or greater");
- size = (unsigned)ret;
-
- /* allocate memory for buffers and compression engine */
- blk = malloc(size + EXCESS);
- def.zalloc = Z_NULL;
- def.zfree = Z_NULL;
- def.opaque = Z_NULL;
- ret = deflateInit(&def, Z_DEFAULT_COMPRESSION);
- if (ret != Z_OK || blk == NULL)
- quit("out of memory");
-
- /* compress from stdin until output full, or no more input */
- def.avail_out = size + EXCESS;
- def.next_out = blk;
- ret = partcompress(stdin, &def);
- if (ret == Z_ERRNO)
- quit("error reading input");
-
- /* if it all fit, then size was undersubscribed -- done! */
- if (ret == Z_STREAM_END && def.avail_out >= EXCESS) {
- /* write block to stdout */
- have = size + EXCESS - def.avail_out;
- if (fwrite(blk, 1, have, stdout) != have || ferror(stdout))
- quit("error writing output");
-
- /* clean up and print results to stderr */
- ret = deflateEnd(&def);
- assert(ret != Z_STREAM_ERROR);
- free(blk);
- fprintf(stderr,
- "%u bytes unused out of %u requested (all input)\n",
- size - have, size);
- return 0;
- }
-
- /* it didn't all fit -- set up for recompression */
- inf.zalloc = Z_NULL;
- inf.zfree = Z_NULL;
- inf.opaque = Z_NULL;
- inf.avail_in = 0;
- inf.next_in = Z_NULL;
- ret = inflateInit(&inf);
- tmp = malloc(size + EXCESS);
- if (ret != Z_OK || tmp == NULL)
- quit("out of memory");
- ret = deflateReset(&def);
- assert(ret != Z_STREAM_ERROR);
-
- /* do first recompression close to the right amount */
- inf.avail_in = size + EXCESS;
- inf.next_in = blk;
- def.avail_out = size + EXCESS;
- def.next_out = tmp;
- ret = recompress(&inf, &def);
- if (ret == Z_MEM_ERROR)
- quit("out of memory");
-
- /* set up for next reocmpression */
- ret = inflateReset(&inf);
- assert(ret != Z_STREAM_ERROR);
- ret = deflateReset(&def);
- assert(ret != Z_STREAM_ERROR);
-
- /* do second and final recompression (third compression) */
- inf.avail_in = size - MARGIN; /* assure stream will complete */
- inf.next_in = tmp;
- def.avail_out = size;
- def.next_out = blk;
- ret = recompress(&inf, &def);
- if (ret == Z_MEM_ERROR)
- quit("out of memory");
- assert(ret == Z_STREAM_END); /* otherwise MARGIN too small */
-
- /* done -- write block to stdout */
- have = size - def.avail_out;
- if (fwrite(blk, 1, have, stdout) != have || ferror(stdout))
- quit("error writing output");
-
- /* clean up and print results to stderr */
- free(tmp);
- ret = inflateEnd(&inf);
- assert(ret != Z_STREAM_ERROR);
- ret = deflateEnd(&def);
- assert(ret != Z_STREAM_ERROR);
- free(blk);
- fprintf(stderr,
- "%u bytes unused out of %u requested (%lu input)\n",
- size - have, size, def.total_in);
- return 0;
-}
diff --git a/src/3rdparty/zlib/examples/gun.c b/src/3rdparty/zlib/examples/gun.c
deleted file mode 100644
index bfec590..0000000
--- a/src/3rdparty/zlib/examples/gun.c
+++ /dev/null
@@ -1,693 +0,0 @@
-/* gun.c -- simple gunzip to give an example of the use of inflateBack()
- * Copyright (C) 2003, 2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- Version 1.3 12 June 2005 Mark Adler */
-
-/* Version history:
- 1.0 16 Feb 2003 First version for testing of inflateBack()
- 1.1 21 Feb 2005 Decompress concatenated gzip streams
- Remove use of "this" variable (C++ keyword)
- Fix return value for in()
- Improve allocation failure checking
- Add typecasting for void * structures
- Add -h option for command version and usage
- Add a bunch of comments
- 1.2 20 Mar 2005 Add Unix compress (LZW) decompression
- Copy file attributes from input file to output file
- 1.3 12 Jun 2005 Add casts for error messages [Oberhumer]
- */
-
-/*
- gun [ -t ] [ name ... ]
-
- decompresses the data in the named gzip files. If no arguments are given,
- gun will decompress from stdin to stdout. The names must end in .gz, -gz,
- .z, -z, _z, or .Z. The uncompressed data will be written to a file name
- with the suffix stripped. On success, the original file is deleted. On
- failure, the output file is deleted. For most failures, the command will
- continue to process the remaining names on the command line. A memory
- allocation failure will abort the command. If -t is specified, then the
- listed files or stdin will be tested as gzip files for integrity (without
- checking for a proper suffix), no output will be written, and no files
- will be deleted.
-
- Like gzip, gun allows concatenated gzip streams and will decompress them,
- writing all of the uncompressed data to the output. Unlike gzip, gun allows
- an empty file on input, and will produce no error writing an empty output
- file.
-
- gun will also decompress files made by Unix compress, which uses LZW
- compression. These files are automatically detected by virtue of their
- magic header bytes. Since the end of Unix compress stream is marked by the
- end-of-file, they cannot be concantenated. If a Unix compress stream is
- encountered in an input file, it is the last stream in that file.
-
- Like gunzip and uncompress, the file attributes of the orignal compressed
- file are maintained in the final uncompressed file, to the extent that the
- user permissions allow it.
-
- On my Mac OS X PowerPC G4, gun is almost twice as fast as gunzip (version
- 1.2.4) is on the same file, when gun is linked with zlib 1.2.2. Also the
- LZW decompression provided by gun is about twice as fast as the standard
- Unix uncompress command.
- */
-
-/* external functions and related types and constants */
-#include <stdio.h> /* fprintf() */
-#include <stdlib.h> /* malloc(), free() */
-#include <string.h> /* strerror(), strcmp(), strlen(), memcpy() */
-#include <errno.h> /* errno */
-#include <fcntl.h> /* open() */
-#include <unistd.h> /* read(), write(), close(), chown(), unlink() */
-#include <sys/types.h>
-#include <sys/stat.h> /* stat(), chmod() */
-#include <utime.h> /* utime() */
-#include "zlib.h" /* inflateBackInit(), inflateBack(), */
- /* inflateBackEnd(), crc32() */
-
-/* function declaration */
-#define local static
-
-/* buffer constants */
-#define SIZE 32768U /* input and output buffer sizes */
-#define PIECE 16384 /* limits i/o chunks for 16-bit int case */
-
-/* structure for infback() to pass to input function in() -- it maintains the
- input file and a buffer of size SIZE */
-struct ind {
- int infile;
- unsigned char *inbuf;
-};
-
-/* Load input buffer, assumed to be empty, and return bytes loaded and a
- pointer to them. read() is called until the buffer is full, or until it
- returns end-of-file or error. Return 0 on error. */
-local unsigned in(void *in_desc, unsigned char **buf)
-{
- int ret;
- unsigned len;
- unsigned char *next;
- struct ind *me = (struct ind *)in_desc;
-
- next = me->inbuf;
- *buf = next;
- len = 0;
- do {
- ret = PIECE;
- if ((unsigned)ret > SIZE - len)
- ret = (int)(SIZE - len);
- ret = (int)read(me->infile, next, ret);
- if (ret == -1) {
- len = 0;
- break;
- }
- next += ret;
- len += ret;
- } while (ret != 0 && len < SIZE);
- return len;
-}
-
-/* structure for infback() to pass to output function out() -- it maintains the
- output file, a running CRC-32 check on the output and the total number of
- bytes output, both for checking against the gzip trailer. (The length in
- the gzip trailer is stored modulo 2^32, so it's ok if a long is 32 bits and
- the output is greater than 4 GB.) */
-struct outd {
- int outfile;
- int check; /* true if checking crc and total */
- unsigned long crc;
- unsigned long total;
-};
-
-/* Write output buffer and update the CRC-32 and total bytes written. write()
- is called until all of the output is written or an error is encountered.
- On success out() returns 0. For a write failure, out() returns 1. If the
- output file descriptor is -1, then nothing is written.
- */
-local int out(void *out_desc, unsigned char *buf, unsigned len)
-{
- int ret;
- struct outd *me = (struct outd *)out_desc;
-
- if (me->check) {
- me->crc = crc32(me->crc, buf, len);
- me->total += len;
- }
- if (me->outfile != -1)
- do {
- ret = PIECE;
- if ((unsigned)ret > len)
- ret = (int)len;
- ret = (int)write(me->outfile, buf, ret);
- if (ret == -1)
- return 1;
- buf += ret;
- len -= ret;
- } while (len != 0);
- return 0;
-}
-
-/* next input byte macro for use inside lunpipe() and gunpipe() */
-#define NEXT() (have ? 0 : (have = in(indp, &next)), \
- last = have ? (have--, (int)(*next++)) : -1)
-
-/* memory for gunpipe() and lunpipe() --
- the first 256 entries of prefix[] and suffix[] are never used, could
- have offset the index, but it's faster to waste the memory */
-unsigned char inbuf[SIZE]; /* input buffer */
-unsigned char outbuf[SIZE]; /* output buffer */
-unsigned short prefix[65536]; /* index to LZW prefix string */
-unsigned char suffix[65536]; /* one-character LZW suffix */
-unsigned char match[65280 + 2]; /* buffer for reversed match or gzip
- 32K sliding window */
-
-/* throw out what's left in the current bits byte buffer (this is a vestigial
- aspect of the compressed data format derived from an implementation that
- made use of a special VAX machine instruction!) */
-#define FLUSHCODE() \
- do { \
- left = 0; \
- rem = 0; \
- if (chunk > have) { \
- chunk -= have; \
- have = 0; \
- if (NEXT() == -1) \
- break; \
- chunk--; \
- if (chunk > have) { \
- chunk = have = 0; \
- break; \
- } \
- } \
- have -= chunk; \
- next += chunk; \
- chunk = 0; \
- } while (0)
-
-/* Decompress a compress (LZW) file from indp to outfile. The compress magic
- header (two bytes) has already been read and verified. There are have bytes
- of buffered input at next. strm is used for passing error information back
- to gunpipe().
-
- lunpipe() will return Z_OK on success, Z_BUF_ERROR for an unexpected end of
- file, read error, or write error (a write error indicated by strm->next_in
- not equal to Z_NULL), or Z_DATA_ERROR for invalid input.
- */
-local int lunpipe(unsigned have, unsigned char *next, struct ind *indp,
- int outfile, z_stream *strm)
-{
- int last; /* last byte read by NEXT(), or -1 if EOF */
- int chunk; /* bytes left in current chunk */
- int left; /* bits left in rem */
- unsigned rem; /* unused bits from input */
- int bits; /* current bits per code */
- unsigned code; /* code, table traversal index */
- unsigned mask; /* mask for current bits codes */
- int max; /* maximum bits per code for this stream */
- int flags; /* compress flags, then block compress flag */
- unsigned end; /* last valid entry in prefix/suffix tables */
- unsigned temp; /* current code */
- unsigned prev; /* previous code */
- unsigned final; /* last character written for previous code */
- unsigned stack; /* next position for reversed string */
- unsigned outcnt; /* bytes in output buffer */
- struct outd outd; /* output structure */
-
- /* set up output */
- outd.outfile = outfile;
- outd.check = 0;
-
- /* process remainder of compress header -- a flags byte */
- flags = NEXT();
- if (last == -1)
- return Z_BUF_ERROR;
- if (flags & 0x60) {
- strm->msg = (char *)"unknown lzw flags set";
- return Z_DATA_ERROR;
- }
- max = flags & 0x1f;
- if (max < 9 || max > 16) {
- strm->msg = (char *)"lzw bits out of range";
- return Z_DATA_ERROR;
- }
- if (max == 9) /* 9 doesn't really mean 9 */
- max = 10;
- flags &= 0x80; /* true if block compress */
-
- /* clear table */
- bits = 9;
- mask = 0x1ff;
- end = flags ? 256 : 255;
-
- /* set up: get first 9-bit code, which is the first decompressed byte, but
- don't create a table entry until the next code */
- if (NEXT() == -1) /* no compressed data is ok */
- return Z_OK;
- final = prev = (unsigned)last; /* low 8 bits of code */
- if (NEXT() == -1) /* missing a bit */
- return Z_BUF_ERROR;
- if (last & 1) { /* code must be < 256 */
- strm->msg = (char *)"invalid lzw code";
- return Z_DATA_ERROR;
- }
- rem = (unsigned)last >> 1; /* remaining 7 bits */
- left = 7;
- chunk = bits - 2; /* 7 bytes left in this chunk */
- outbuf[0] = (unsigned char)final; /* write first decompressed byte */
- outcnt = 1;
-
- /* decode codes */
- stack = 0;
- for (;;) {
- /* if the table will be full after this, increment the code size */
- if (end >= mask && bits < max) {
- FLUSHCODE();
- bits++;
- mask <<= 1;
- mask++;
- }
-
- /* get a code of length bits */
- if (chunk == 0) /* decrement chunk modulo bits */
- chunk = bits;
- code = rem; /* low bits of code */
- if (NEXT() == -1) { /* EOF is end of compressed data */
- /* write remaining buffered output */
- if (outcnt && out(&outd, outbuf, outcnt)) {
- strm->next_in = outbuf; /* signal write error */
- return Z_BUF_ERROR;
- }
- return Z_OK;
- }
- code += (unsigned)last << left; /* middle (or high) bits of code */
- left += 8;
- chunk--;
- if (bits > left) { /* need more bits */
- if (NEXT() == -1) /* can't end in middle of code */
- return Z_BUF_ERROR;
- code += (unsigned)last << left; /* high bits of code */
- left += 8;
- chunk--;
- }
- code &= mask; /* mask to current code length */
- left -= bits; /* number of unused bits */
- rem = (unsigned)last >> (8 - left); /* unused bits from last byte */
-
- /* process clear code (256) */
- if (code == 256 && flags) {
- FLUSHCODE();
- bits = 9; /* initialize bits and mask */
- mask = 0x1ff;
- end = 255; /* empty table */
- continue; /* get next code */
- }
-
- /* special code to reuse last match */
- temp = code; /* save the current code */
- if (code > end) {
- /* Be picky on the allowed code here, and make sure that the code
- we drop through (prev) will be a valid index so that random
- input does not cause an exception. The code != end + 1 check is
- empirically derived, and not checked in the original uncompress
- code. If this ever causes a problem, that check could be safely
- removed. Leaving this check in greatly improves gun's ability
- to detect random or corrupted input after a compress header.
- In any case, the prev > end check must be retained. */
- if (code != end + 1 || prev > end) {
- strm->msg = (char *)"invalid lzw code";
- return Z_DATA_ERROR;
- }
- match[stack++] = (unsigned char)final;
- code = prev;
- }
-
- /* walk through linked list to generate output in reverse order */
- while (code >= 256) {
- match[stack++] = suffix[code];
- code = prefix[code];
- }
- match[stack++] = (unsigned char)code;
- final = code;
-
- /* link new table entry */
- if (end < mask) {
- end++;
- prefix[end] = (unsigned short)prev;
- suffix[end] = (unsigned char)final;
- }
-
- /* set previous code for next iteration */
- prev = temp;
-
- /* write output in forward order */
- while (stack > SIZE - outcnt) {
- while (outcnt < SIZE)
- outbuf[outcnt++] = match[--stack];
- if (out(&outd, outbuf, outcnt)) {
- strm->next_in = outbuf; /* signal write error */
- return Z_BUF_ERROR;
- }
- outcnt = 0;
- }
- do {
- outbuf[outcnt++] = match[--stack];
- } while (stack);
-
- /* loop for next code with final and prev as the last match, rem and
- left provide the first 0..7 bits of the next code, end is the last
- valid table entry */
- }
-}
-
-/* Decompress a gzip file from infile to outfile. strm is assumed to have been
- successfully initialized with inflateBackInit(). The input file may consist
- of a series of gzip streams, in which case all of them will be decompressed
- to the output file. If outfile is -1, then the gzip stream(s) integrity is
- checked and nothing is written.
-
- The return value is a zlib error code: Z_MEM_ERROR if out of memory,
- Z_DATA_ERROR if the header or the compressed data is invalid, or if the
- trailer CRC-32 check or length doesn't match, Z_BUF_ERROR if the input ends
- prematurely or a write error occurs, or Z_ERRNO if junk (not a another gzip
- stream) follows a valid gzip stream.
- */
-local int gunpipe(z_stream *strm, int infile, int outfile)
-{
- int ret, first, last;
- unsigned have, flags, len;
- unsigned char *next;
- struct ind ind, *indp;
- struct outd outd;
-
- /* setup input buffer */
- ind.infile = infile;
- ind.inbuf = inbuf;
- indp = &ind;
-
- /* decompress concatenated gzip streams */
- have = 0; /* no input data read in yet */
- first = 1; /* looking for first gzip header */
- strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */
- for (;;) {
- /* look for the two magic header bytes for a gzip stream */
- if (NEXT() == -1) {
- ret = Z_OK;
- break; /* empty gzip stream is ok */
- }
- if (last != 31 || (NEXT() != 139 && last != 157)) {
- strm->msg = (char *)"incorrect header check";
- ret = first ? Z_DATA_ERROR : Z_ERRNO;
- break; /* not a gzip or compress header */
- }
- first = 0; /* next non-header is junk */
-
- /* process a compress (LZW) file -- can't be concatenated after this */
- if (last == 157) {
- ret = lunpipe(have, next, indp, outfile, strm);
- break;
- }
-
- /* process remainder of gzip header */
- ret = Z_BUF_ERROR;
- if (NEXT() != 8) { /* only deflate method allowed */
- if (last == -1) break;
- strm->msg = (char *)"unknown compression method";
- ret = Z_DATA_ERROR;
- break;
- }
- flags = NEXT(); /* header flags */
- NEXT(); /* discard mod time, xflgs, os */
- NEXT();
- NEXT();
- NEXT();
- NEXT();
- NEXT();
- if (last == -1) break;
- if (flags & 0xe0) {
- strm->msg = (char *)"unknown header flags set";
- ret = Z_DATA_ERROR;
- break;
- }
- if (flags & 4) { /* extra field */
- len = NEXT();
- len += (unsigned)(NEXT()) << 8;
- if (last == -1) break;
- while (len > have) {
- len -= have;
- have = 0;
- if (NEXT() == -1) break;
- len--;
- }
- if (last == -1) break;
- have -= len;
- next += len;
- }
- if (flags & 8) /* file name */
- while (NEXT() != 0 && last != -1)
- ;
- if (flags & 16) /* comment */
- while (NEXT() != 0 && last != -1)
- ;
- if (flags & 2) { /* header crc */
- NEXT();
- NEXT();
- }
- if (last == -1) break;
-
- /* set up output */
- outd.outfile = outfile;
- outd.check = 1;
- outd.crc = crc32(0L, Z_NULL, 0);
- outd.total = 0;
-
- /* decompress data to output */
- strm->next_in = next;
- strm->avail_in = have;
- ret = inflateBack(strm, in, indp, out, &outd);
- if (ret != Z_STREAM_END) break;
- next = strm->next_in;
- have = strm->avail_in;
- strm->next_in = Z_NULL; /* so Z_BUF_ERROR means EOF */
-
- /* check trailer */
- ret = Z_BUF_ERROR;
- if (NEXT() != (outd.crc & 0xff) ||
- NEXT() != ((outd.crc >> 8) & 0xff) ||
- NEXT() != ((outd.crc >> 16) & 0xff) ||
- NEXT() != ((outd.crc >> 24) & 0xff)) {
- /* crc error */
- if (last != -1) {
- strm->msg = (char *)"incorrect data check";
- ret = Z_DATA_ERROR;
- }
- break;
- }
- if (NEXT() != (outd.total & 0xff) ||
- NEXT() != ((outd.total >> 8) & 0xff) ||
- NEXT() != ((outd.total >> 16) & 0xff) ||
- NEXT() != ((outd.total >> 24) & 0xff)) {
- /* length error */
- if (last != -1) {
- strm->msg = (char *)"incorrect length check";
- ret = Z_DATA_ERROR;
- }
- break;
- }
-
- /* go back and look for another gzip stream */
- }
-
- /* clean up and return */
- return ret;
-}
-
-/* Copy file attributes, from -> to, as best we can. This is best effort, so
- no errors are reported. The mode bits, including suid, sgid, and the sticky
- bit are copied (if allowed), the owner's user id and group id are copied
- (again if allowed), and the access and modify times are copied. */
-local void copymeta(char *from, char *to)
-{
- struct stat was;
- struct utimbuf when;
-
- /* get all of from's Unix meta data, return if not a regular file */
- if (stat(from, &was) != 0 || (was.st_mode & S_IFMT) != S_IFREG)
- return;
-
- /* set to's mode bits, ignore errors */
- (void)chmod(to, was.st_mode & 07777);
-
- /* copy owner's user and group, ignore errors */
- (void)chown(to, was.st_uid, was.st_gid);
-
- /* copy access and modify times, ignore errors */
- when.actime = was.st_atime;
- when.modtime = was.st_mtime;
- (void)utime(to, &when);
-}
-
-/* Decompress the file inname to the file outnname, of if test is true, just
- decompress without writing and check the gzip trailer for integrity. If
- inname is NULL or an empty string, read from stdin. If outname is NULL or
- an empty string, write to stdout. strm is a pre-initialized inflateBack
- structure. When appropriate, copy the file attributes from inname to
- outname.
-
- gunzip() returns 1 if there is an out-of-memory error or an unexpected
- return code from gunpipe(). Otherwise it returns 0.
- */
-local int gunzip(z_stream *strm, char *inname, char *outname, int test)
-{
- int ret;
- int infile, outfile;
-
- /* open files */
- if (inname == NULL || *inname == 0) {
- inname = "-";
- infile = 0; /* stdin */
- }
- else {
- infile = open(inname, O_RDONLY, 0);
- if (infile == -1) {
- fprintf(stderr, "gun cannot open %s\n", inname);
- return 0;
- }
- }
- if (test)
- outfile = -1;
- else if (outname == NULL || *outname == 0) {
- outname = "-";
- outfile = 1; /* stdout */
- }
- else {
- outfile = open(outname, O_CREAT | O_TRUNC | O_WRONLY, 0666);
- if (outfile == -1) {
- close(infile);
- fprintf(stderr, "gun cannot create %s\n", outname);
- return 0;
- }
- }
- errno = 0;
-
- /* decompress */
- ret = gunpipe(strm, infile, outfile);
- if (outfile > 2) close(outfile);
- if (infile > 2) close(infile);
-
- /* interpret result */
- switch (ret) {
- case Z_OK:
- case Z_ERRNO:
- if (infile > 2 && outfile > 2) {
- copymeta(inname, outname); /* copy attributes */
- unlink(inname);
- }
- if (ret == Z_ERRNO)
- fprintf(stderr, "gun warning: trailing garbage ignored in %s\n",
- inname);
- break;
- case Z_DATA_ERROR:
- if (outfile > 2) unlink(outname);
- fprintf(stderr, "gun data error on %s: %s\n", inname, strm->msg);
- break;
- case Z_MEM_ERROR:
- if (outfile > 2) unlink(outname);
- fprintf(stderr, "gun out of memory error--aborting\n");
- return 1;
- case Z_BUF_ERROR:
- if (outfile > 2) unlink(outname);
- if (strm->next_in != Z_NULL) {
- fprintf(stderr, "gun write error on %s: %s\n",
- outname, strerror(errno));
- }
- else if (errno) {
- fprintf(stderr, "gun read error on %s: %s\n",
- inname, strerror(errno));
- }
- else {
- fprintf(stderr, "gun unexpected end of file on %s\n",
- inname);
- }
- break;
- default:
- if (outfile > 2) unlink(outname);
- fprintf(stderr, "gun internal error--aborting\n");
- return 1;
- }
- return 0;
-}
-
-/* Process the gun command line arguments. See the command syntax near the
- beginning of this source file. */
-int main(int argc, char **argv)
-{
- int ret, len, test;
- char *outname;
- unsigned char *window;
- z_stream strm;
-
- /* initialize inflateBack state for repeated use */
- window = match; /* reuse LZW match buffer */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- ret = inflateBackInit(&strm, 15, window);
- if (ret != Z_OK) {
- fprintf(stderr, "gun out of memory error--aborting\n");
- return 1;
- }
-
- /* decompress each file to the same name with the suffix removed */
- argc--;
- argv++;
- test = 0;
- if (argc && strcmp(*argv, "-h") == 0) {
- fprintf(stderr, "gun 1.3 (12 Jun 2005)\n");
- fprintf(stderr, "Copyright (c) 2005 Mark Adler\n");
- fprintf(stderr, "usage: gun [-t] [file1.gz [file2.Z ...]]\n");
- return 0;
- }
- if (argc && strcmp(*argv, "-t") == 0) {
- test = 1;
- argc--;
- argv++;
- }
- if (argc)
- do {
- if (test)
- outname = NULL;
- else {
- len = (int)strlen(*argv);
- if (strcmp(*argv + len - 3, ".gz") == 0 ||
- strcmp(*argv + len - 3, "-gz") == 0)
- len -= 3;
- else if (strcmp(*argv + len - 2, ".z") == 0 ||
- strcmp(*argv + len - 2, "-z") == 0 ||
- strcmp(*argv + len - 2, "_z") == 0 ||
- strcmp(*argv + len - 2, ".Z") == 0)
- len -= 2;
- else {
- fprintf(stderr, "gun error: no gz type on %s--skipping\n",
- *argv);
- continue;
- }
- outname = malloc(len + 1);
- if (outname == NULL) {
- fprintf(stderr, "gun out of memory error--aborting\n");
- ret = 1;
- break;
- }
- memcpy(outname, *argv, len);
- outname[len] = 0;
- }
- ret = gunzip(&strm, *argv, outname, test);
- if (outname != NULL) free(outname);
- if (ret) break;
- } while (argv++, --argc);
- else
- ret = gunzip(&strm, NULL, NULL, test);
-
- /* clean up */
- inflateBackEnd(&strm);
- return ret;
-}
diff --git a/src/3rdparty/zlib/examples/gzappend.c b/src/3rdparty/zlib/examples/gzappend.c
deleted file mode 100644
index e9e878e..0000000
--- a/src/3rdparty/zlib/examples/gzappend.c
+++ /dev/null
@@ -1,500 +0,0 @@
-/* gzappend -- command to append to a gzip file
-
- Copyright (C) 2003 Mark Adler, all rights reserved
- version 1.1, 4 Nov 2003
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the author be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Mark Adler madler@alumni.caltech.edu
- */
-
-/*
- * Change history:
- *
- * 1.0 19 Oct 2003 - First version
- * 1.1 4 Nov 2003 - Expand and clarify some comments and notes
- * - Add version and copyright to help
- * - Send help to stdout instead of stderr
- * - Add some preemptive typecasts
- * - Add L to constants in lseek() calls
- * - Remove some debugging information in error messages
- * - Use new data_type definition for zlib 1.2.1
- * - Simplfy and unify file operations
- * - Finish off gzip file in gztack()
- * - Use deflatePrime() instead of adding empty blocks
- * - Keep gzip file clean on appended file read errors
- * - Use in-place rotate instead of auxiliary buffer
- * (Why you ask? Because it was fun to write!)
- */
-
-/*
- gzappend takes a gzip file and appends to it, compressing files from the
- command line or data from stdin. The gzip file is written to directly, to
- avoid copying that file, in case it's large. Note that this results in the
- unfriendly behavior that if gzappend fails, the gzip file is corrupted.
-
- This program was written to illustrate the use of the new Z_BLOCK option of
- zlib 1.2.x's inflate() function. This option returns from inflate() at each
- block boundary to facilitate locating and modifying the last block bit at
- the start of the final deflate block. Also whether using Z_BLOCK or not,
- another required feature of zlib 1.2.x is that inflate() now provides the
- number of unusued bits in the last input byte used. gzappend will not work
- with versions of zlib earlier than 1.2.1.
-
- gzappend first decompresses the gzip file internally, discarding all but
- the last 32K of uncompressed data, and noting the location of the last block
- bit and the number of unused bits in the last byte of the compressed data.
- The gzip trailer containing the CRC-32 and length of the uncompressed data
- is verified. This trailer will be later overwritten.
-
- Then the last block bit is cleared by seeking back in the file and rewriting
- the byte that contains it. Seeking forward, the last byte of the compressed
- data is saved along with the number of unused bits to initialize deflate.
-
- A deflate process is initialized, using the last 32K of the uncompressed
- data from the gzip file to initialize the dictionary. If the total
- uncompressed data was less than 32K, then all of it is used to initialize
- the dictionary. The deflate output bit buffer is also initialized with the
- last bits from the original deflate stream. From here on, the data to
- append is simply compressed using deflate, and written to the gzip file.
- When that is complete, the new CRC-32 and uncompressed length are written
- as the trailer of the gzip file.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include "zlib.h"
-
-#define local static
-#define LGCHUNK 14
-#define CHUNK (1U << LGCHUNK)
-#define DSIZE 32768U
-
-/* print an error message and terminate with extreme prejudice */
-local void bye(char *msg1, char *msg2)
-{
- fprintf(stderr, "gzappend error: %s%s\n", msg1, msg2);
- exit(1);
-}
-
-/* return the greatest common divisor of a and b using Euclid's algorithm,
- modified to be fast when one argument much greater than the other, and
- coded to avoid unnecessary swapping */
-local unsigned gcd(unsigned a, unsigned b)
-{
- unsigned c;
-
- while (a && b)
- if (a > b) {
- c = b;
- while (a - c >= c)
- c <<= 1;
- a -= c;
- }
- else {
- c = a;
- while (b - c >= c)
- c <<= 1;
- b -= c;
- }
- return a + b;
-}
-
-/* rotate list[0..len-1] left by rot positions, in place */
-local void rotate(unsigned char *list, unsigned len, unsigned rot)
-{
- unsigned char tmp;
- unsigned cycles;
- unsigned char *start, *last, *to, *from;
-
- /* normalize rot and handle degenerate cases */
- if (len < 2) return;
- if (rot >= len) rot %= len;
- if (rot == 0) return;
-
- /* pointer to last entry in list */
- last = list + (len - 1);
-
- /* do simple left shift by one */
- if (rot == 1) {
- tmp = *list;
- memcpy(list, list + 1, len - 1);
- *last = tmp;
- return;
- }
-
- /* do simple right shift by one */
- if (rot == len - 1) {
- tmp = *last;
- memmove(list + 1, list, len - 1);
- *list = tmp;
- return;
- }
-
- /* otherwise do rotate as a set of cycles in place */
- cycles = gcd(len, rot); /* number of cycles */
- do {
- start = from = list + cycles; /* start index is arbitrary */
- tmp = *from; /* save entry to be overwritten */
- for (;;) {
- to = from; /* next step in cycle */
- from += rot; /* go right rot positions */
- if (from > last) from -= len; /* (pointer better not wrap) */
- if (from == start) break; /* all but one shifted */
- *to = *from; /* shift left */
- }
- *to = tmp; /* complete the circle */
- } while (--cycles);
-}
-
-/* structure for gzip file read operations */
-typedef struct {
- int fd; /* file descriptor */
- int size; /* 1 << size is bytes in buf */
- unsigned left; /* bytes available at next */
- unsigned char *buf; /* buffer */
- unsigned char *next; /* next byte in buffer */
- char *name; /* file name for error messages */
-} file;
-
-/* reload buffer */
-local int readin(file *in)
-{
- int len;
-
- len = read(in->fd, in->buf, 1 << in->size);
- if (len == -1) bye("error reading ", in->name);
- in->left = (unsigned)len;
- in->next = in->buf;
- return len;
-}
-
-/* read from file in, exit if end-of-file */
-local int readmore(file *in)
-{
- if (readin(in) == 0) bye("unexpected end of ", in->name);
- return 0;
-}
-
-#define read1(in) (in->left == 0 ? readmore(in) : 0, \
- in->left--, *(in->next)++)
-
-/* skip over n bytes of in */
-local void skip(file *in, unsigned n)
-{
- unsigned bypass;
-
- if (n > in->left) {
- n -= in->left;
- bypass = n & ~((1U << in->size) - 1);
- if (bypass) {
- if (lseek(in->fd, (off_t)bypass, SEEK_CUR) == -1)
- bye("seeking ", in->name);
- n -= bypass;
- }
- readmore(in);
- if (n > in->left)
- bye("unexpected end of ", in->name);
- }
- in->left -= n;
- in->next += n;
-}
-
-/* read a four-byte unsigned integer, little-endian, from in */
-unsigned long read4(file *in)
-{
- unsigned long val;
-
- val = read1(in);
- val += (unsigned)read1(in) << 8;
- val += (unsigned long)read1(in) << 16;
- val += (unsigned long)read1(in) << 24;
- return val;
-}
-
-/* skip over gzip header */
-local void gzheader(file *in)
-{
- int flags;
- unsigned n;
-
- if (read1(in) != 31 || read1(in) != 139) bye(in->name, " not a gzip file");
- if (read1(in) != 8) bye("unknown compression method in", in->name);
- flags = read1(in);
- if (flags & 0xe0) bye("unknown header flags set in", in->name);
- skip(in, 6);
- if (flags & 4) {
- n = read1(in);
- n += (unsigned)(read1(in)) << 8;
- skip(in, n);
- }
- if (flags & 8) while (read1(in) != 0) ;
- if (flags & 16) while (read1(in) != 0) ;
- if (flags & 2) skip(in, 2);
-}
-
-/* decompress gzip file "name", return strm with a deflate stream ready to
- continue compression of the data in the gzip file, and return a file
- descriptor pointing to where to write the compressed data -- the deflate
- stream is initialized to compress using level "level" */
-local int gzscan(char *name, z_stream *strm, int level)
-{
- int ret, lastbit, left, full;
- unsigned have;
- unsigned long crc, tot;
- unsigned char *window;
- off_t lastoff, end;
- file gz;
-
- /* open gzip file */
- gz.name = name;
- gz.fd = open(name, O_RDWR, 0);
- if (gz.fd == -1) bye("cannot open ", name);
- gz.buf = malloc(CHUNK);
- if (gz.buf == NULL) bye("out of memory", "");
- gz.size = LGCHUNK;
- gz.left = 0;
-
- /* skip gzip header */
- gzheader(&gz);
-
- /* prepare to decompress */
- window = malloc(DSIZE);
- if (window == NULL) bye("out of memory", "");
- strm->zalloc = Z_NULL;
- strm->zfree = Z_NULL;
- strm->opaque = Z_NULL;
- ret = inflateInit2(strm, -15);
- if (ret != Z_OK) bye("out of memory", " or library mismatch");
-
- /* decompress the deflate stream, saving append information */
- lastbit = 0;
- lastoff = lseek(gz.fd, 0L, SEEK_CUR) - gz.left;
- left = 0;
- strm->avail_in = gz.left;
- strm->next_in = gz.next;
- crc = crc32(0L, Z_NULL, 0);
- have = full = 0;
- do {
- /* if needed, get more input */
- if (strm->avail_in == 0) {
- readmore(&gz);
- strm->avail_in = gz.left;
- strm->next_in = gz.next;
- }
-
- /* set up output to next available section of sliding window */
- strm->avail_out = DSIZE - have;
- strm->next_out = window + have;
-
- /* inflate and check for errors */
- ret = inflate(strm, Z_BLOCK);
- if (ret == Z_STREAM_ERROR) bye("internal stream error!", "");
- if (ret == Z_MEM_ERROR) bye("out of memory", "");
- if (ret == Z_DATA_ERROR)
- bye("invalid compressed data--format violated in", name);
-
- /* update crc and sliding window pointer */
- crc = crc32(crc, window + have, DSIZE - have - strm->avail_out);
- if (strm->avail_out)
- have = DSIZE - strm->avail_out;
- else {
- have = 0;
- full = 1;
- }
-
- /* process end of block */
- if (strm->data_type & 128) {
- if (strm->data_type & 64)
- left = strm->data_type & 0x1f;
- else {
- lastbit = strm->data_type & 0x1f;
- lastoff = lseek(gz.fd, 0L, SEEK_CUR) - strm->avail_in;
- }
- }
- } while (ret != Z_STREAM_END);
- inflateEnd(strm);
- gz.left = strm->avail_in;
- gz.next = strm->next_in;
-
- /* save the location of the end of the compressed data */
- end = lseek(gz.fd, 0L, SEEK_CUR) - gz.left;
-
- /* check gzip trailer and save total for deflate */
- if (crc != read4(&gz))
- bye("invalid compressed data--crc mismatch in ", name);
- tot = strm->total_out;
- if ((tot & 0xffffffffUL) != read4(&gz))
- bye("invalid compressed data--length mismatch in", name);
-
- /* if not at end of file, warn */
- if (gz.left || readin(&gz))
- fprintf(stderr,
- "gzappend warning: junk at end of gzip file overwritten\n");
-
- /* clear last block bit */
- lseek(gz.fd, lastoff - (lastbit != 0), SEEK_SET);
- if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
- *gz.buf = (unsigned char)(*gz.buf ^ (1 << ((8 - lastbit) & 7)));
- lseek(gz.fd, -1L, SEEK_CUR);
- if (write(gz.fd, gz.buf, 1) != 1) bye("writing after seek to ", name);
-
- /* if window wrapped, build dictionary from window by rotating */
- if (full) {
- rotate(window, DSIZE, have);
- have = DSIZE;
- }
-
- /* set up deflate stream with window, crc, total_in, and leftover bits */
- ret = deflateInit2(strm, level, Z_DEFLATED, -15, 8, Z_DEFAULT_STRATEGY);
- if (ret != Z_OK) bye("out of memory", "");
- deflateSetDictionary(strm, window, have);
- strm->adler = crc;
- strm->total_in = tot;
- if (left) {
- lseek(gz.fd, --end, SEEK_SET);
- if (read(gz.fd, gz.buf, 1) != 1) bye("reading after seek on ", name);
- deflatePrime(strm, 8 - left, *gz.buf);
- }
- lseek(gz.fd, end, SEEK_SET);
-
- /* clean up and return */
- free(window);
- free(gz.buf);
- return gz.fd;
-}
-
-/* append file "name" to gzip file gd using deflate stream strm -- if last
- is true, then finish off the deflate stream at the end */
-local void gztack(char *name, int gd, z_stream *strm, int last)
-{
- int fd, len, ret;
- unsigned left;
- unsigned char *in, *out;
-
- /* open file to compress and append */
- fd = 0;
- if (name != NULL) {
- fd = open(name, O_RDONLY, 0);
- if (fd == -1)
- fprintf(stderr, "gzappend warning: %s not found, skipping ...\n",
- name);
- }
-
- /* allocate buffers */
- in = fd == -1 ? NULL : malloc(CHUNK);
- out = malloc(CHUNK);
- if (out == NULL) bye("out of memory", "");
-
- /* compress input file and append to gzip file */
- do {
- /* get more input */
- len = fd == -1 ? 0 : read(fd, in, CHUNK);
- if (len == -1) {
- fprintf(stderr,
- "gzappend warning: error reading %s, skipping rest ...\n",
- name);
- len = 0;
- }
- strm->avail_in = (unsigned)len;
- strm->next_in = in;
- if (len) strm->adler = crc32(strm->adler, in, (unsigned)len);
-
- /* compress and write all available output */
- do {
- strm->avail_out = CHUNK;
- strm->next_out = out;
- ret = deflate(strm, last && len == 0 ? Z_FINISH : Z_NO_FLUSH);
- left = CHUNK - strm->avail_out;
- while (left) {
- len = write(gd, out + CHUNK - strm->avail_out - left, left);
- if (len == -1) bye("writing gzip file", "");
- left -= (unsigned)len;
- }
- } while (strm->avail_out == 0 && ret != Z_STREAM_END);
- } while (len != 0);
-
- /* write trailer after last entry */
- if (last) {
- deflateEnd(strm);
- out[0] = (unsigned char)(strm->adler);
- out[1] = (unsigned char)(strm->adler >> 8);
- out[2] = (unsigned char)(strm->adler >> 16);
- out[3] = (unsigned char)(strm->adler >> 24);
- out[4] = (unsigned char)(strm->total_in);
- out[5] = (unsigned char)(strm->total_in >> 8);
- out[6] = (unsigned char)(strm->total_in >> 16);
- out[7] = (unsigned char)(strm->total_in >> 24);
- len = 8;
- do {
- ret = write(gd, out + 8 - len, len);
- if (ret == -1) bye("writing gzip file", "");
- len -= ret;
- } while (len);
- close(gd);
- }
-
- /* clean up and return */
- free(out);
- if (in != NULL) free(in);
- if (fd > 0) close(fd);
-}
-
-/* process the compression level option if present, scan the gzip file, and
- append the specified files, or append the data from stdin if no other file
- names are provided on the command line -- the gzip file must be writable
- and seekable */
-int main(int argc, char **argv)
-{
- int gd, level;
- z_stream strm;
-
- /* ignore command name */
- argv++;
-
- /* provide usage if no arguments */
- if (*argv == NULL) {
- printf("gzappend 1.1 (4 Nov 2003) Copyright (C) 2003 Mark Adler\n");
- printf(
- "usage: gzappend [-level] file.gz [ addthis [ andthis ... ]]\n");
- return 0;
- }
-
- /* set compression level */
- level = Z_DEFAULT_COMPRESSION;
- if (argv[0][0] == '-') {
- if (argv[0][1] < '0' || argv[0][1] > '9' || argv[0][2] != 0)
- bye("invalid compression level", "");
- level = argv[0][1] - '0';
- if (*++argv == NULL) bye("no gzip file name after options", "");
- }
-
- /* prepare to append to gzip file */
- gd = gzscan(*argv++, &strm, level);
-
- /* append files on command line, or from stdin if none */
- if (*argv == NULL)
- gztack(NULL, gd, &strm, 1);
- else
- do {
- gztack(*argv, gd, &strm, argv[1] == NULL);
- } while (*++argv != NULL);
- return 0;
-}
diff --git a/src/3rdparty/zlib/examples/gzjoin.c b/src/3rdparty/zlib/examples/gzjoin.c
deleted file mode 100644
index 129347c..0000000
--- a/src/3rdparty/zlib/examples/gzjoin.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/* gzjoin -- command to join gzip files into one gzip file
-
- Copyright (C) 2004 Mark Adler, all rights reserved
- version 1.0, 11 Dec 2004
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the author be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Mark Adler madler@alumni.caltech.edu
- */
-
-/*
- * Change history:
- *
- * 1.0 11 Dec 2004 - First version
- * 1.1 12 Jun 2005 - Changed ssize_t to long for portability
- */
-
-/*
- gzjoin takes one or more gzip files on the command line and writes out a
- single gzip file that will uncompress to the concatenation of the
- uncompressed data from the individual gzip files. gzjoin does this without
- having to recompress any of the data and without having to calculate a new
- crc32 for the concatenated uncompressed data. gzjoin does however have to
- decompress all of the input data in order to find the bits in the compressed
- data that need to be modified to concatenate the streams.
-
- gzjoin does not do an integrity check on the input gzip files other than
- checking the gzip header and decompressing the compressed data. They are
- otherwise assumed to be complete and correct.
-
- Each joint between gzip files removes at least 18 bytes of previous trailer
- and subsequent header, and inserts an average of about three bytes to the
- compressed data in order to connect the streams. The output gzip file
- has a minimal ten-byte gzip header with no file name or modification time.
-
- This program was written to illustrate the use of the Z_BLOCK option of
- inflate() and the crc32_combine() function. gzjoin will not compile with
- versions of zlib earlier than 1.2.3.
- */
-
-#include <stdio.h> /* fputs(), fprintf(), fwrite(), putc() */
-#include <stdlib.h> /* exit(), malloc(), free() */
-#include <fcntl.h> /* open() */
-#include <unistd.h> /* close(), read(), lseek() */
-#include "zlib.h"
- /* crc32(), crc32_combine(), inflateInit2(), inflate(), inflateEnd() */
-
-#define local static
-
-/* exit with an error (return a value to allow use in an expression) */
-local int bail(char *why1, char *why2)
-{
- fprintf(stderr, "gzjoin error: %s%s, output incomplete\n", why1, why2);
- exit(1);
- return 0;
-}
-
-/* -- simple buffered file input with access to the buffer -- */
-
-#define CHUNK 32768 /* must be a power of two and fit in unsigned */
-
-/* bin buffered input file type */
-typedef struct {
- char *name; /* name of file for error messages */
- int fd; /* file descriptor */
- unsigned left; /* bytes remaining at next */
- unsigned char *next; /* next byte to read */
- unsigned char *buf; /* allocated buffer of length CHUNK */
-} bin;
-
-/* close a buffered file and free allocated memory */
-local void bclose(bin *in)
-{
- if (in != NULL) {
- if (in->fd != -1)
- close(in->fd);
- if (in->buf != NULL)
- free(in->buf);
- free(in);
- }
-}
-
-/* open a buffered file for input, return a pointer to type bin, or NULL on
- failure */
-local bin *bopen(char *name)
-{
- bin *in;
-
- in = malloc(sizeof(bin));
- if (in == NULL)
- return NULL;
- in->buf = malloc(CHUNK);
- in->fd = open(name, O_RDONLY, 0);
- if (in->buf == NULL || in->fd == -1) {
- bclose(in);
- return NULL;
- }
- in->left = 0;
- in->next = in->buf;
- in->name = name;
- return in;
-}
-
-/* load buffer from file, return -1 on read error, 0 or 1 on success, with
- 1 indicating that end-of-file was reached */
-local int bload(bin *in)
-{
- long len;
-
- if (in == NULL)
- return -1;
- if (in->left != 0)
- return 0;
- in->next = in->buf;
- do {
- len = (long)read(in->fd, in->buf + in->left, CHUNK - in->left);
- if (len < 0)
- return -1;
- in->left += (unsigned)len;
- } while (len != 0 && in->left < CHUNK);
- return len == 0 ? 1 : 0;
-}
-
-/* get a byte from the file, bail if end of file */
-#define bget(in) (in->left ? 0 : bload(in), \
- in->left ? (in->left--, *(in->next)++) : \
- bail("unexpected end of file on ", in->name))
-
-/* get a four-byte little-endian unsigned integer from file */
-local unsigned long bget4(bin *in)
-{
- unsigned long val;
-
- val = bget(in);
- val += (unsigned long)(bget(in)) << 8;
- val += (unsigned long)(bget(in)) << 16;
- val += (unsigned long)(bget(in)) << 24;
- return val;
-}
-
-/* skip bytes in file */
-local void bskip(bin *in, unsigned skip)
-{
- /* check pointer */
- if (in == NULL)
- return;
-
- /* easy case -- skip bytes in buffer */
- if (skip <= in->left) {
- in->left -= skip;
- in->next += skip;
- return;
- }
-
- /* skip what's in buffer, discard buffer contents */
- skip -= in->left;
- in->left = 0;
-
- /* seek past multiples of CHUNK bytes */
- if (skip > CHUNK) {
- unsigned left;
-
- left = skip & (CHUNK - 1);
- if (left == 0) {
- /* exact number of chunks: seek all the way minus one byte to check
- for end-of-file with a read */
- lseek(in->fd, skip - 1, SEEK_CUR);
- if (read(in->fd, in->buf, 1) != 1)
- bail("unexpected end of file on ", in->name);
- return;
- }
-
- /* skip the integral chunks, update skip with remainder */
- lseek(in->fd, skip - left, SEEK_CUR);
- skip = left;
- }
-
- /* read more input and skip remainder */
- bload(in);
- if (skip > in->left)
- bail("unexpected end of file on ", in->name);
- in->left -= skip;
- in->next += skip;
-}
-
-/* -- end of buffered input functions -- */
-
-/* skip the gzip header from file in */
-local void gzhead(bin *in)
-{
- int flags;
-
- /* verify gzip magic header and compression method */
- if (bget(in) != 0x1f || bget(in) != 0x8b || bget(in) != 8)
- bail(in->name, " is not a valid gzip file");
-
- /* get and verify flags */
- flags = bget(in);
- if ((flags & 0xe0) != 0)
- bail("unknown reserved bits set in ", in->name);
-
- /* skip modification time, extra flags, and os */
- bskip(in, 6);
-
- /* skip extra field if present */
- if (flags & 4) {
- unsigned len;
-
- len = bget(in);
- len += (unsigned)(bget(in)) << 8;
- bskip(in, len);
- }
-
- /* skip file name if present */
- if (flags & 8)
- while (bget(in) != 0)
- ;
-
- /* skip comment if present */
- if (flags & 16)
- while (bget(in) != 0)
- ;
-
- /* skip header crc if present */
- if (flags & 2)
- bskip(in, 2);
-}
-
-/* write a four-byte little-endian unsigned integer to out */
-local void put4(unsigned long val, FILE *out)
-{
- putc(val & 0xff, out);
- putc((val >> 8) & 0xff, out);
- putc((val >> 16) & 0xff, out);
- putc((val >> 24) & 0xff, out);
-}
-
-/* Load up zlib stream from buffered input, bail if end of file */
-local void zpull(z_streamp strm, bin *in)
-{
- if (in->left == 0)
- bload(in);
- if (in->left == 0)
- bail("unexpected end of file on ", in->name);
- strm->avail_in = in->left;
- strm->next_in = in->next;
-}
-
-/* Write header for gzip file to out and initialize trailer. */
-local void gzinit(unsigned long *crc, unsigned long *tot, FILE *out)
-{
- fwrite("\x1f\x8b\x08\0\0\0\0\0\0\xff", 1, 10, out);
- *crc = crc32(0L, Z_NULL, 0);
- *tot = 0;
-}
-
-/* Copy the compressed data from name, zeroing the last block bit of the last
- block if clr is true, and adding empty blocks as needed to get to a byte
- boundary. If clr is false, then the last block becomes the last block of
- the output, and the gzip trailer is written. crc and tot maintains the
- crc and length (modulo 2^32) of the output for the trailer. The resulting
- gzip file is written to out. gzinit() must be called before the first call
- of gzcopy() to write the gzip header and to initialize crc and tot. */
-local void gzcopy(char *name, int clr, unsigned long *crc, unsigned long *tot,
- FILE *out)
-{
- int ret; /* return value from zlib functions */
- int pos; /* where the "last block" bit is in byte */
- int last; /* true if processing the last block */
- bin *in; /* buffered input file */
- unsigned char *start; /* start of compressed data in buffer */
- unsigned char *junk; /* buffer for uncompressed data -- discarded */
- z_off_t len; /* length of uncompressed data (support > 4 GB) */
- z_stream strm; /* zlib inflate stream */
-
- /* open gzip file and skip header */
- in = bopen(name);
- if (in == NULL)
- bail("could not open ", name);
- gzhead(in);
-
- /* allocate buffer for uncompressed data and initialize raw inflate
- stream */
- junk = malloc(CHUNK);
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- strm.avail_in = 0;
- strm.next_in = Z_NULL;
- ret = inflateInit2(&strm, -15);
- if (junk == NULL || ret != Z_OK)
- bail("out of memory", "");
-
- /* inflate and copy compressed data, clear last-block bit if requested */
- len = 0;
- zpull(&strm, in);
- start = strm.next_in;
- last = start[0] & 1;
- if (last && clr)
- start[0] &= ~1;
- strm.avail_out = 0;
- for (;;) {
- /* if input used and output done, write used input and get more */
- if (strm.avail_in == 0 && strm.avail_out != 0) {
- fwrite(start, 1, strm.next_in - start, out);
- start = in->buf;
- in->left = 0;
- zpull(&strm, in);
- }
-
- /* decompress -- return early when end-of-block reached */
- strm.avail_out = CHUNK;
- strm.next_out = junk;
- ret = inflate(&strm, Z_BLOCK);
- switch (ret) {
- case Z_MEM_ERROR:
- bail("out of memory", "");
- case Z_DATA_ERROR:
- bail("invalid compressed data in ", in->name);
- }
-
- /* update length of uncompressed data */
- len += CHUNK - strm.avail_out;
-
- /* check for block boundary (only get this when block copied out) */
- if (strm.data_type & 128) {
- /* if that was the last block, then done */
- if (last)
- break;
-
- /* number of unused bits in last byte */
- pos = strm.data_type & 7;
-
- /* find the next last-block bit */
- if (pos != 0) {
- /* next last-block bit is in last used byte */
- pos = 0x100 >> pos;
- last = strm.next_in[-1] & pos;
- if (last && clr)
- strm.next_in[-1] &= ~pos;
- }
- else {
- /* next last-block bit is in next unused byte */
- if (strm.avail_in == 0) {
- /* don't have that byte yet -- get it */
- fwrite(start, 1, strm.next_in - start, out);
- start = in->buf;
- in->left = 0;
- zpull(&strm, in);
- }
- last = strm.next_in[0] & 1;
- if (last && clr)
- strm.next_in[0] &= ~1;
- }
- }
- }
-
- /* update buffer with unused input */
- in->left = strm.avail_in;
- in->next = strm.next_in;
-
- /* copy used input, write empty blocks to get to byte boundary */
- pos = strm.data_type & 7;
- fwrite(start, 1, in->next - start - 1, out);
- last = in->next[-1];
- if (pos == 0 || !clr)
- /* already at byte boundary, or last file: write last byte */
- putc(last, out);
- else {
- /* append empty blocks to last byte */
- last &= ((0x100 >> pos) - 1); /* assure unused bits are zero */
- if (pos & 1) {
- /* odd -- append an empty stored block */
- putc(last, out);
- if (pos == 1)
- putc(0, out); /* two more bits in block header */
- fwrite("\0\0\xff\xff", 1, 4, out);
- }
- else {
- /* even -- append 1, 2, or 3 empty fixed blocks */
- switch (pos) {
- case 6:
- putc(last | 8, out);
- last = 0;
- case 4:
- putc(last | 0x20, out);
- last = 0;
- case 2:
- putc(last | 0x80, out);
- putc(0, out);
- }
- }
- }
-
- /* update crc and tot */
- *crc = crc32_combine(*crc, bget4(in), len);
- *tot += (unsigned long)len;
-
- /* clean up */
- inflateEnd(&strm);
- free(junk);
- bclose(in);
-
- /* write trailer if this is the last gzip file */
- if (!clr) {
- put4(*crc, out);
- put4(*tot, out);
- }
-}
-
-/* join the gzip files on the command line, write result to stdout */
-int main(int argc, char **argv)
-{
- unsigned long crc, tot; /* running crc and total uncompressed length */
-
- /* skip command name */
- argc--;
- argv++;
-
- /* show usage if no arguments */
- if (argc == 0) {
- fputs("gzjoin usage: gzjoin f1.gz [f2.gz [f3.gz ...]] > fjoin.gz\n",
- stderr);
- return 0;
- }
-
- /* join gzip files on command line and write to stdout */
- gzinit(&crc, &tot, stdout);
- while (argc--)
- gzcopy(*argv++, argc, &crc, &tot, stdout);
-
- /* done */
- return 0;
-}
diff --git a/src/3rdparty/zlib/examples/gzlog.c b/src/3rdparty/zlib/examples/gzlog.c
deleted file mode 100644
index f71f817..0000000
--- a/src/3rdparty/zlib/examples/gzlog.c
+++ /dev/null
@@ -1,413 +0,0 @@
-/*
- * gzlog.c
- * Copyright (C) 2004 Mark Adler
- * For conditions of distribution and use, see copyright notice in gzlog.h
- * version 1.0, 26 Nov 2004
- *
- */
-
-#include <string.h> /* memcmp() */
-#include <stdlib.h> /* malloc(), free(), NULL */
-#include <sys/types.h> /* size_t, off_t */
-#include <unistd.h> /* read(), close(), sleep(), ftruncate(), */
- /* lseek() */
-#include <fcntl.h> /* open() */
-#include <sys/file.h> /* flock() */
-#include "zlib.h" /* deflateInit2(), deflate(), deflateEnd() */
-
-#include "gzlog.h" /* interface */
-#define local static
-
-/* log object structure */
-typedef struct {
- int id; /* object identifier */
- int fd; /* log file descriptor */
- off_t extra; /* offset of extra "ap" subfield */
- off_t mark_off; /* offset of marked data */
- off_t last_off; /* offset of last block */
- unsigned long crc; /* uncompressed crc */
- unsigned long len; /* uncompressed length (modulo 2^32) */
- unsigned stored; /* length of current stored block */
-} gz_log;
-
-#define GZLOGID 19334 /* gz_log object identifier */
-
-#define LOCK_RETRY 1 /* retry lock once a second */
-#define LOCK_PATIENCE 1200 /* try about twenty minutes before forcing */
-
-/* acquire a lock on a file */
-local int lock(int fd)
-{
- int patience;
-
- /* try to lock every LOCK_RETRY seconds for LOCK_PATIENCE seconds */
- patience = LOCK_PATIENCE;
- do {
- if (flock(fd, LOCK_EX + LOCK_NB) == 0)
- return 0;
- (void)sleep(LOCK_RETRY);
- patience -= LOCK_RETRY;
- } while (patience > 0);
-
- /* we've run out of patience -- give up */
- return -1;
-}
-
-/* release lock */
-local void unlock(int fd)
-{
- (void)flock(fd, LOCK_UN);
-}
-
-/* release a log object */
-local void log_clean(gz_log *log)
-{
- unlock(log->fd);
- (void)close(log->fd);
- free(log);
-}
-
-/* read an unsigned long from a byte buffer little-endian */
-local unsigned long make_ulg(unsigned char *buf)
-{
- int n;
- unsigned long val;
-
- val = (unsigned long)(*buf++);
- for (n = 8; n < 32; n += 8)
- val += (unsigned long)(*buf++) << n;
- return val;
-}
-
-/* read an off_t from a byte buffer little-endian */
-local off_t make_off(unsigned char *buf)
-{
- int n;
- off_t val;
-
- val = (off_t)(*buf++);
- for (n = 8; n < 64; n += 8)
- val += (off_t)(*buf++) << n;
- return val;
-}
-
-/* write an unsigned long little-endian to byte buffer */
-local void dice_ulg(unsigned long val, unsigned char *buf)
-{
- int n;
-
- for (n = 0; n < 4; n++) {
- *buf++ = val & 0xff;
- val >>= 8;
- }
-}
-
-/* write an off_t little-endian to byte buffer */
-local void dice_off(off_t val, unsigned char *buf)
-{
- int n;
-
- for (n = 0; n < 8; n++) {
- *buf++ = val & 0xff;
- val >>= 8;
- }
-}
-
-/* initial, empty gzip file for appending */
-local char empty_gz[] = {
- 0x1f, 0x8b, /* magic gzip id */
- 8, /* compression method is deflate */
- 4, /* there is an extra field */
- 0, 0, 0, 0, /* no modification time provided */
- 0, 0xff, /* no extra flags, no OS */
- 20, 0, 'a', 'p', 16, 0, /* extra field with "ap" subfield */
- 32, 0, 0, 0, 0, 0, 0, 0, /* offset of uncompressed data */
- 32, 0, 0, 0, 0, 0, 0, 0, /* offset of last block */
- 1, 0, 0, 0xff, 0xff, /* empty stored block (last) */
- 0, 0, 0, 0, /* crc */
- 0, 0, 0, 0 /* uncompressed length */
-};
-
-/* initialize a log object with locking */
-void *gzlog_open(char *path)
-{
- unsigned xlen;
- unsigned char temp[20];
- unsigned sub_len;
- int good;
- gz_log *log;
-
- /* allocate log structure */
- log = malloc(sizeof(gz_log));
- if (log == NULL)
- return NULL;
- log->id = GZLOGID;
-
- /* open file, creating it if necessary, and locking it */
- log->fd = open(path, O_RDWR | O_CREAT, 0600);
- if (log->fd < 0) {
- free(log);
- return NULL;
- }
- if (lock(log->fd)) {
- close(log->fd);
- free(log);
- return NULL;
- }
-
- /* if file is empty, write new gzip stream */
- if (lseek(log->fd, 0, SEEK_END) == 0) {
- if (write(log->fd, empty_gz, sizeof(empty_gz)) != sizeof(empty_gz)) {
- log_clean(log);
- return NULL;
- }
- }
-
- /* check gzip header */
- (void)lseek(log->fd, 0, SEEK_SET);
- if (read(log->fd, temp, 12) != 12 || temp[0] != 0x1f ||
- temp[1] != 0x8b || temp[2] != 8 || (temp[3] & 4) == 0) {
- log_clean(log);
- return NULL;
- }
-
- /* process extra field to find "ap" sub-field */
- xlen = temp[10] + (temp[11] << 8);
- good = 0;
- while (xlen) {
- if (xlen < 4 || read(log->fd, temp, 4) != 4)
- break;
- sub_len = temp[2];
- sub_len += temp[3] << 8;
- xlen -= 4;
- if (memcmp(temp, "ap", 2) == 0 && sub_len == 16) {
- good = 1;
- break;
- }
- if (xlen < sub_len)
- break;
- (void)lseek(log->fd, sub_len, SEEK_CUR);
- xlen -= sub_len;
- }
- if (!good) {
- log_clean(log);
- return NULL;
- }
-
- /* read in "ap" sub-field */
- log->extra = lseek(log->fd, 0, SEEK_CUR);
- if (read(log->fd, temp, 16) != 16) {
- log_clean(log);
- return NULL;
- }
- log->mark_off = make_off(temp);
- log->last_off = make_off(temp + 8);
-
- /* get crc, length of gzip file */
- (void)lseek(log->fd, log->last_off, SEEK_SET);
- if (read(log->fd, temp, 13) != 13 ||
- memcmp(temp, "\001\000\000\377\377", 5) != 0) {
- log_clean(log);
- return NULL;
- }
- log->crc = make_ulg(temp + 5);
- log->len = make_ulg(temp + 9);
-
- /* set up to write over empty last block */
- (void)lseek(log->fd, log->last_off + 5, SEEK_SET);
- log->stored = 0;
- return (void *)log;
-}
-
-/* maximum amount to put in a stored block before starting a new one */
-#define MAX_BLOCK 16384
-
-/* write a block to a log object */
-int gzlog_write(void *obj, char *data, size_t len)
-{
- size_t some;
- unsigned char temp[5];
- gz_log *log;
-
- /* check object */
- log = (gz_log *)obj;
- if (log == NULL || log->id != GZLOGID)
- return 1;
-
- /* write stored blocks until all of the input is written */
- do {
- some = MAX_BLOCK - log->stored;
- if (some > len)
- some = len;
- if (write(log->fd, data, some) != some)
- return 1;
- log->crc = crc32(log->crc, data, some);
- log->len += some;
- len -= some;
- data += some;
- log->stored += some;
-
- /* if the stored block is full, end it and start another */
- if (log->stored == MAX_BLOCK) {
- (void)lseek(log->fd, log->last_off, SEEK_SET);
- temp[0] = 0;
- dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16),
- temp + 1);
- if (write(log->fd, temp, 5) != 5)
- return 1;
- log->last_off = lseek(log->fd, log->stored, SEEK_CUR);
- (void)lseek(log->fd, 5, SEEK_CUR);
- log->stored = 0;
- }
- } while (len);
- return 0;
-}
-
-/* recompress the remaining stored deflate data in place */
-local int recomp(gz_log *log)
-{
- z_stream strm;
- size_t len, max;
- unsigned char *in;
- unsigned char *out;
- unsigned char temp[16];
-
- /* allocate space and read it all in (it's around 1 MB) */
- len = log->last_off - log->mark_off;
- max = len + (len >> 12) + (len >> 14) + 11;
- out = malloc(max);
- if (out == NULL)
- return 1;
- in = malloc(len);
- if (in == NULL) {
- free(out);
- return 1;
- }
- (void)lseek(log->fd, log->mark_off, SEEK_SET);
- if (read(log->fd, in, len) != len) {
- free(in);
- free(out);
- return 1;
- }
-
- /* recompress in memory, decoding stored data as we go */
- /* note: this assumes that unsigned is four bytes or more */
- /* consider not making that assumption */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- if (deflateInit2(&strm, Z_BEST_COMPRESSION, Z_DEFLATED, -15, 8,
- Z_DEFAULT_STRATEGY) != Z_OK) {
- free(in);
- free(out);
- return 1;
- }
- strm.next_in = in;
- strm.avail_out = max;
- strm.next_out = out;
- while (len >= 5) {
- if (strm.next_in[0] != 0)
- break;
- strm.avail_in = strm.next_in[1] + (strm.next_in[2] << 8);
- strm.next_in += 5;
- len -= 5;
- if (strm.avail_in != 0) {
- if (len < strm.avail_in)
- break;
- len -= strm.avail_in;
- (void)deflate(&strm, Z_NO_FLUSH);
- if (strm.avail_in != 0 || strm.avail_out == 0)
- break;
- }
- }
- (void)deflate(&strm, Z_SYNC_FLUSH);
- (void)deflateEnd(&strm);
- free(in);
- if (len != 0 || strm.avail_out == 0) {
- free(out);
- return 1;
- }
-
- /* overwrite stored data with compressed data */
- (void)lseek(log->fd, log->mark_off, SEEK_SET);
- len = max - strm.avail_out;
- if (write(log->fd, out, len) != len) {
- free(out);
- return 1;
- }
- free(out);
-
- /* write last empty block, crc, and length */
- log->mark_off = log->last_off = lseek(log->fd, 0, SEEK_CUR);
- temp[0] = 1;
- dice_ulg(0xffffL << 16, temp + 1);
- dice_ulg(log->crc, temp + 5);
- dice_ulg(log->len, temp + 9);
- if (write(log->fd, temp, 13) != 13)
- return 1;
-
- /* truncate file to discard remaining stored data and old trailer */
- ftruncate(log->fd, lseek(log->fd, 0, SEEK_CUR));
-
- /* update extra field to point to new last empty block */
- (void)lseek(log->fd, log->extra, SEEK_SET);
- dice_off(log->mark_off, temp);
- dice_off(log->last_off, temp + 8);
- if (write(log->fd, temp, 16) != 16)
- return 1;
- return 0;
-}
-
-/* maximum accumulation of stored blocks before compressing */
-#define MAX_STORED 1048576
-
-/* close log object */
-int gzlog_close(void *obj)
-{
- unsigned char temp[8];
- gz_log *log;
-
- /* check object */
- log = (gz_log *)obj;
- if (log == NULL || log->id != GZLOGID)
- return 1;
-
- /* go to start of most recent block being written */
- (void)lseek(log->fd, log->last_off, SEEK_SET);
-
- /* if some stuff was put there, update block */
- if (log->stored) {
- temp[0] = 0;
- dice_ulg(log->stored + ((unsigned long)(~log->stored) << 16),
- temp + 1);
- if (write(log->fd, temp, 5) != 5)
- return 1;
- log->last_off = lseek(log->fd, log->stored, SEEK_CUR);
- }
-
- /* write last block (empty) */
- if (write(log->fd, "\001\000\000\377\377", 5) != 5)
- return 1;
-
- /* write updated crc and uncompressed length */
- dice_ulg(log->crc, temp);
- dice_ulg(log->len, temp + 4);
- if (write(log->fd, temp, 8) != 8)
- return 1;
-
- /* put offset of that last block in gzip extra block */
- (void)lseek(log->fd, log->extra + 8, SEEK_SET);
- dice_off(log->last_off, temp);
- if (write(log->fd, temp, 8) != 8)
- return 1;
-
- /* if more than 1 MB stored, then time to compress it */
- if (log->last_off - log->mark_off > MAX_STORED) {
- if (recomp(log))
- return 1;
- }
-
- /* unlock and close file */
- log_clean(log);
- return 0;
-}
diff --git a/src/3rdparty/zlib/examples/gzlog.h b/src/3rdparty/zlib/examples/gzlog.h
deleted file mode 100644
index a800bd5..0000000
--- a/src/3rdparty/zlib/examples/gzlog.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* gzlog.h
- Copyright (C) 2004 Mark Adler, all rights reserved
- version 1.0, 26 Nov 2004
-
- This software is provided 'as-is', without any express or implied
- warranty. In no event will the author be held liable for any damages
- arising from the use of this software.
-
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
-
- 1. The origin of this software must not be misrepresented; you must not
- claim that you wrote the original software. If you use this software
- in a product, an acknowledgment in the product documentation would be
- appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-
- Mark Adler madler@alumni.caltech.edu
- */
-
-/*
- The gzlog object allows writing short messages to a gzipped log file,
- opening the log file locked for small bursts, and then closing it. The log
- object works by appending stored data to the gzip file until 1 MB has been
- accumulated. At that time, the stored data is compressed, and replaces the
- uncompressed data in the file. The log file is truncated to its new size at
- that time. After closing, the log file is always valid gzip file that can
- decompressed to recover what was written.
-
- A gzip header "extra" field contains two file offsets for appending. The
- first points to just after the last compressed data. The second points to
- the last stored block in the deflate stream, which is empty. All of the
- data between those pointers is uncompressed.
- */
-
-/* Open a gzlog object, creating the log file if it does not exist. Return
- NULL on error. Note that gzlog_open() could take a long time to return if
- there is difficulty in locking the file. */
-void *gzlog_open(char *path);
-
-/* Write to a gzlog object. Return non-zero on error. This function will
- simply write data to the file uncompressed. Compression of the data
- will not occur until gzlog_close() is called. It is expected that
- gzlog_write() is used for a short message, and then gzlog_close() is
- called. If a large amount of data is to be written, then the application
- should write no more than 1 MB at a time with gzlog_write() before
- calling gzlog_close() and then gzlog_open() again. */
-int gzlog_write(void *log, char *data, size_t len);
-
-/* Close a gzlog object. Return non-zero on error. The log file is locked
- until this function is called. This function will compress stored data
- at the end of the gzip file if at least 1 MB has been accumulated. Note
- that the file will not be a valid gzip file until this function completes.
- */
-int gzlog_close(void *log);
diff --git a/src/3rdparty/zlib/examples/zlib_how.html b/src/3rdparty/zlib/examples/zlib_how.html
deleted file mode 100644
index 40998db..0000000
--- a/src/3rdparty/zlib/examples/zlib_how.html
+++ /dev/null
@@ -1,523 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
- "http://www.w3.org/TR/REC-html40/loose.dtd">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
-<title>zlib Usage Example</title>
-<!-- Copyright (c) 2004 Mark Adler. -->
-</head>
-<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#00A000">
-<h2 align="center"> zlib Usage Example </h2>
-We often get questions about how the <tt>deflate()</tt> and <tt>inflate()</tt> functions should be used.
-Users wonder when they should provide more input, when they should use more output,
-what to do with a <tt>Z_BUF_ERROR</tt>, how to make sure the process terminates properly, and
-so on. So for those who have read <tt>zlib.h</tt> (a few times), and
-would like further edification, below is an annotated example in C of simple routines to compress and decompress
-from an input file to an output file using <tt>deflate()</tt> and <tt>inflate()</tt> respectively. The
-annotations are interspersed between lines of the code. So please read between the lines.
-We hope this helps explain some of the intricacies of <em>zlib</em>.
-<p>
-Without further adieu, here is the program <a href="zpipe.c"><tt>zpipe.c</tt></a>:
-<pre><b>
-/* zpipe.c: example of proper use of zlib's inflate() and deflate()
- Not copyrighted -- provided to the public domain
- Version 1.2 9 November 2004 Mark Adler */
-
-/* Version history:
- 1.0 30 Oct 2004 First version
- 1.1 8 Nov 2004 Add void casting for unused return values
- Use switch statement for inflate() return values
- 1.2 9 Nov 2004 Add assertions to document zlib guarantees
- */
-</b></pre><!-- -->
-We now include the header files for the required definitions. From
-<tt>stdio.h</tt> we use <tt>fopen()</tt>, <tt>fread()</tt>, <tt>fwrite()</tt>,
-<tt>feof()</tt>, <tt>ferror()</tt>, and <tt>fclose()</tt> for file i/o, and
-<tt>fputs()</tt> for error messages. From <tt>string.h</tt> we use
-<tt>strcmp()</tt> for command line argument processing.
-From <tt>assert.h</tt> we use the <tt>assert()</tt> macro.
-From <tt>zlib.h</tt>
-we use the basic compression functions <tt>deflateInit()</tt>,
-<tt>deflate()</tt>, and <tt>deflateEnd()</tt>, and the basic decompression
-functions <tt>inflateInit()</tt>, <tt>inflate()</tt>, and
-<tt>inflateEnd()</tt>.
-<pre><b>
-#include &lt;stdio.h&gt;
-#include &lt;string.h&gt;
-#include &lt;assert.h&gt;
-#include "zlib.h"
-</b></pre><!-- -->
-<tt>CHUNK</tt> is simply the buffer size for feeding data to and pulling data
-from the <em>zlib</em> routines. Larger buffer sizes would be more efficient,
-especially for <tt>inflate()</tt>. If the memory is available, buffers sizes
-on the order of 128K or 256K bytes should be used.
-<pre><b>
-#define CHUNK 16384
-</b></pre><!-- -->
-The <tt>def()</tt> routine compresses data from an input file to an output file. The output data
-will be in the <em>zlib</em> format, which is different from the <em>gzip</em> or <em>zip</em>
-formats. The <em>zlib</em> format has a very small header of only two bytes to identify it as
-a <em>zlib</em> stream and to provide decoding information, and a four-byte trailer with a fast
-check value to verify the integrity of the uncompressed data after decoding.
-<pre><b>
-/* Compress from file source to file dest until EOF on source.
- def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
- allocated for processing, Z_STREAM_ERROR if an invalid compression
- level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
- version of the library linked do not match, or Z_ERRNO if there is
- an error reading or writing the files. */
-int def(FILE *source, FILE *dest, int level)
-{
-</b></pre>
-Here are the local variables for <tt>def()</tt>. <tt>ret</tt> will be used for <em>zlib</em>
-return codes. <tt>flush</tt> will keep track of the current flushing state for <tt>deflate()</tt>,
-which is either no flushing, or flush to completion after the end of the input file is reached.
-<tt>have</tt> is the amount of data returned from <tt>deflate()</tt>. The <tt>strm</tt> structure
-is used to pass information to and from the <em>zlib</em> routines, and to maintain the
-<tt>deflate()</tt> state. <tt>in</tt> and <tt>out</tt> are the input and output buffers for
-<tt>deflate()</tt>.
-<pre><b>
- int ret, flush;
- unsigned have;
- z_stream strm;
- char in[CHUNK];
- char out[CHUNK];
-</b></pre><!-- -->
-The first thing we do is to initialize the <em>zlib</em> state for compression using
-<tt>deflateInit()</tt>. This must be done before the first use of <tt>deflate()</tt>.
-The <tt>zalloc</tt>, <tt>zfree</tt>, and <tt>opaque</tt> fields in the <tt>strm</tt>
-structure must be initialized before calling <tt>deflateInit()</tt>. Here they are
-set to the <em>zlib</em> constant <tt>Z_NULL</tt> to request that <em>zlib</em> use
-the default memory allocation routines. An application may also choose to provide
-custom memory allocation routines here. <tt>deflateInit()</tt> will allocate on the
-order of 256K bytes for the internal state.
-(See <a href="zlib_tech.html"><em>zlib Technical Details</em></a>.)
-<p>
-<tt>deflateInit()</tt> is called with a pointer to the structure to be initialized and
-the compression level, which is an integer in the range of -1 to 9. Lower compression
-levels result in faster execution, but less compression. Higher levels result in
-greater compression, but slower execution. The <em>zlib</em> constant Z_DEFAULT_COMPRESSION,
-equal to -1,
-provides a good compromise between compression and speed and is equivalent to level 6.
-Level 0 actually does no compression at all, and in fact expands the data slightly to produce
-the <em>zlib</em> format (it is not a byte-for-byte copy of the input).
-More advanced applications of <em>zlib</em>
-may use <tt>deflateInit2()</tt> here instead. Such an application may want to reduce how
-much memory will be used, at some price in compression. Or it may need to request a
-<em>gzip</em> header and trailer instead of a <em>zlib</em> header and trailer, or raw
-encoding with no header or trailer at all.
-<p>
-We must check the return value of <tt>deflateInit()</tt> against the <em>zlib</em> constant
-<tt>Z_OK</tt> to make sure that it was able to
-allocate memory for the internal state, and that the provided arguments were valid.
-<tt>deflateInit()</tt> will also check that the version of <em>zlib</em> that the <tt>zlib.h</tt>
-file came from matches the version of <em>zlib</em> actually linked with the program. This
-is especially important for environments in which <em>zlib</em> is a shared library.
-<p>
-Note that an application can initialize multiple, independent <em>zlib</em> streams, which can
-operate in parallel. The state information maintained in the structure allows the <em>zlib</em>
-routines to be reentrant.
-<pre><b>
- /* allocate deflate state */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- ret = deflateInit(&amp;strm, level);
- if (ret != Z_OK)
- return ret;
-</b></pre><!-- -->
-With the pleasantries out of the way, now we can get down to business. The outer <tt>do</tt>-loop
-reads all of the input file and exits at the bottom of the loop once end-of-file is reached.
-This loop contains the only call of <tt>deflate()</tt>. So we must make sure that all of the
-input data has been processed and that all of the output data has been generated and consumed
-before we fall out of the loop at the bottom.
-<pre><b>
- /* compress until end of file */
- do {
-</b></pre>
-We start off by reading data from the input file. The number of bytes read is put directly
-into <tt>avail_in</tt>, and a pointer to those bytes is put into <tt>next_in</tt>. We also
-check to see if end-of-file on the input has been reached. If we are at the end of file, then <tt>flush</tt> is set to the
-<em>zlib</em> constant <tt>Z_FINISH</tt>, which is later passed to <tt>deflate()</tt> to
-indicate that this is the last chunk of input data to compress. We need to use <tt>feof()</tt>
-to check for end-of-file as opposed to seeing if fewer than <tt>CHUNK</tt> bytes have been read. The
-reason is that if the input file length is an exact multiple of <tt>CHUNK</tt>, we will miss
-the fact that we got to the end-of-file, and not know to tell <tt>deflate()</tt> to finish
-up the compressed stream. If we are not yet at the end of the input, then the <em>zlib</em>
-constant <tt>Z_NO_FLUSH</tt> will be passed to <tt>deflate</tt> to indicate that we are still
-in the middle of the uncompressed data.
-<p>
-If there is an error in reading from the input file, the process is aborted with
-<tt>deflateEnd()</tt> being called to free the allocated <em>zlib</em> state before returning
-the error. We wouldn't want a memory leak, now would we? <tt>deflateEnd()</tt> can be called
-at any time after the state has been initialized. Once that's done, <tt>deflateInit()</tt> (or
-<tt>deflateInit2()</tt>) would have to be called to start a new compression process. There is
-no point here in checking the <tt>deflateEnd()</tt> return code. The deallocation can't fail.
-<pre><b>
- strm.avail_in = fread(in, 1, CHUNK, source);
- if (ferror(source)) {
- (void)deflateEnd(&amp;strm);
- return Z_ERRNO;
- }
- flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
- strm.next_in = in;
-</b></pre><!-- -->
-The inner <tt>do</tt>-loop passes our chunk of input data to <tt>deflate()</tt>, and then
-keeps calling <tt>deflate()</tt> until it is done producing output. Once there is no more
-new output, <tt>deflate()</tt> is guaranteed to have consumed all of the input, i.e.,
-<tt>avail_in</tt> will be zero.
-<pre><b>
- /* run deflate() on input until output buffer not full, finish
- compression if all of source has been read in */
- do {
-</b></pre>
-Output space is provided to <tt>deflate()</tt> by setting <tt>avail_out</tt> to the number
-of available output bytes and <tt>next_out</tt> to a pointer to that space.
-<pre><b>
- strm.avail_out = CHUNK;
- strm.next_out = out;
-</b></pre>
-Now we call the compression engine itself, <tt>deflate()</tt>. It takes as many of the
-<tt>avail_in</tt> bytes at <tt>next_in</tt> as it can process, and writes as many as
-<tt>avail_out</tt> bytes to <tt>next_out</tt>. Those counters and pointers are then
-updated past the input data consumed and the output data written. It is the amount of
-output space available that may limit how much input is consumed.
-Hence the inner loop to make sure that
-all of the input is consumed by providing more output space each time. Since <tt>avail_in</tt>
-and <tt>next_in</tt> are updated by <tt>deflate()</tt>, we don't have to mess with those
-between <tt>deflate()</tt> calls until it's all used up.
-<p>
-The parameters to <tt>deflate()</tt> are a pointer to the <tt>strm</tt> structure containing
-the input and output information and the internal compression engine state, and a parameter
-indicating whether and how to flush data to the output. Normally <tt>deflate</tt> will consume
-several K bytes of input data before producing any output (except for the header), in order
-to accumulate statistics on the data for optimum compression. It will then put out a burst of
-compressed data, and proceed to consume more input before the next burst. Eventually,
-<tt>deflate()</tt>
-must be told to terminate the stream, complete the compression with provided input data, and
-write out the trailer check value. <tt>deflate()</tt> will continue to compress normally as long
-as the flush parameter is <tt>Z_NO_FLUSH</tt>. Once the <tt>Z_FINISH</tt> parameter is provided,
-<tt>deflate()</tt> will begin to complete the compressed output stream. However depending on how
-much output space is provided, <tt>deflate()</tt> may have to be called several times until it
-has provided the complete compressed stream, even after it has consumed all of the input. The flush
-parameter must continue to be <tt>Z_FINISH</tt> for those subsequent calls.
-<p>
-There are other values of the flush parameter that are used in more advanced applications. You can
-force <tt>deflate()</tt> to produce a burst of output that encodes all of the input data provided
-so far, even if it wouldn't have otherwise, for example to control data latency on a link with
-compressed data. You can also ask that <tt>deflate()</tt> do that as well as erase any history up to
-that point so that what follows can be decompressed independently, for example for random access
-applications. Both requests will degrade compression by an amount depending on how often such
-requests are made.
-<p>
-<tt>deflate()</tt> has a return value that can indicate errors, yet we do not check it here. Why
-not? Well, it turns out that <tt>deflate()</tt> can do no wrong here. Let's go through
-<tt>deflate()</tt>'s return values and dispense with them one by one. The possible values are
-<tt>Z_OK</tt>, <tt>Z_STREAM_END</tt>, <tt>Z_STREAM_ERROR</tt>, or <tt>Z_BUF_ERROR</tt>. <tt>Z_OK</tt>
-is, well, ok. <tt>Z_STREAM_END</tt> is also ok and will be returned for the last call of
-<tt>deflate()</tt>. This is already guaranteed by calling <tt>deflate()</tt> with <tt>Z_FINISH</tt>
-until it has no more output. <tt>Z_STREAM_ERROR</tt> is only possible if the stream is not
-initialized properly, but we did initialize it properly. There is no harm in checking for
-<tt>Z_STREAM_ERROR</tt> here, for example to check for the possibility that some
-other part of the application inadvertently clobbered the memory containing the <em>zlib</em> state.
-<tt>Z_BUF_ERROR</tt> will be explained further below, but
-suffice it to say that this is simply an indication that <tt>deflate()</tt> could not consume
-more input or produce more output. <tt>deflate()</tt> can be called again with more output space
-or more available input, which it will be in this code.
-<pre><b>
- ret = deflate(&amp;strm, flush); /* no bad return value */
- assert(ret != Z_STREAM_ERROR); /* state not clobbered */
-</b></pre>
-Now we compute how much output <tt>deflate()</tt> provided on the last call, which is the
-difference between how much space was provided before the call, and how much output space
-is still available after the call. Then that data, if any, is written to the output file.
-We can then reuse the output buffer for the next call of <tt>deflate()</tt>. Again if there
-is a file i/o error, we call <tt>deflateEnd()</tt> before returning to avoid a memory leak.
-<pre><b>
- have = CHUNK - strm.avail_out;
- if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
- (void)deflateEnd(&amp;strm);
- return Z_ERRNO;
- }
-</b></pre>
-The inner <tt>do</tt>-loop is repeated until the last <tt>deflate()</tt> call fails to fill the
-provided output buffer. Then we know that <tt>deflate()</tt> has done as much as it can with
-the provided input, and that all of that input has been consumed. We can then fall out of this
-loop and reuse the input buffer.
-<p>
-The way we tell that <tt>deflate()</tt> has no more output is by seeing that it did not fill
-the output buffer, leaving <tt>avail_out</tt> greater than zero. However suppose that
-<tt>deflate()</tt> has no more output, but just so happened to exactly fill the output buffer!
-<tt>avail_out</tt> is zero, and we can't tell that <tt>deflate()</tt> has done all it can.
-As far as we know, <tt>deflate()</tt>
-has more output for us. So we call it again. But now <tt>deflate()</tt> produces no output
-at all, and <tt>avail_out</tt> remains unchanged as <tt>CHUNK</tt>. That <tt>deflate()</tt> call
-wasn't able to do anything, either consume input or produce output, and so it returns
-<tt>Z_BUF_ERROR</tt>. (See, I told you I'd cover this later.) However this is not a problem at
-all. Now we finally have the desired indication that <tt>deflate()</tt> is really done,
-and so we drop out of the inner loop to provide more input to <tt>deflate()</tt>.
-<p>
-With <tt>flush</tt> set to <tt>Z_FINISH</tt>, this final set of <tt>deflate()</tt> calls will
-complete the output stream. Once that is done, subsequent calls of <tt>deflate()</tt> would return
-<tt>Z_STREAM_ERROR</tt> if the flush parameter is not <tt>Z_FINISH</tt>, and do no more processing
-until the state is reinitialized.
-<p>
-Some applications of <em>zlib</em> have two loops that call <tt>deflate()</tt>
-instead of the single inner loop we have here. The first loop would call
-without flushing and feed all of the data to <tt>deflate()</tt>. The second loop would call
-<tt>deflate()</tt> with no more
-data and the <tt>Z_FINISH</tt> parameter to complete the process. As you can see from this
-example, that can be avoided by simply keeping track of the current flush state.
-<pre><b>
- } while (strm.avail_out == 0);
- assert(strm.avail_in == 0); /* all input will be used */
-</b></pre><!-- -->
-Now we check to see if we have already processed all of the input file. That information was
-saved in the <tt>flush</tt> variable, so we see if that was set to <tt>Z_FINISH</tt>. If so,
-then we're done and we fall out of the outer loop. We're guaranteed to get <tt>Z_STREAM_END</tt>
-from the last <tt>deflate()</tt> call, since we ran it until the last chunk of input was
-consumed and all of the output was generated.
-<pre><b>
- /* done when last data in file processed */
- } while (flush != Z_FINISH);
- assert(ret == Z_STREAM_END); /* stream will be complete */
-</b></pre><!-- -->
-The process is complete, but we still need to deallocate the state to avoid a memory leak
-(or rather more like a memory hemorrhage if you didn't do this). Then
-finally we can return with a happy return value.
-<pre><b>
- /* clean up and return */
- (void)deflateEnd(&amp;strm);
- return Z_OK;
-}
-</b></pre><!-- -->
-Now we do the same thing for decompression in the <tt>inf()</tt> routine. <tt>inf()</tt>
-decompresses what is hopefully a valid <em>zlib</em> stream from the input file and writes the
-uncompressed data to the output file. Much of the discussion above for <tt>def()</tt>
-applies to <tt>inf()</tt> as well, so the discussion here will focus on the differences between
-the two.
-<pre><b>
-/* Decompress from file source to file dest until stream ends or EOF.
- inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
- allocated for processing, Z_DATA_ERROR if the deflate data is
- invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
- the version of the library linked do not match, or Z_ERRNO if there
- is an error reading or writing the files. */
-int inf(FILE *source, FILE *dest)
-{
-</b></pre>
-The local variables have the same functionality as they do for <tt>def()</tt>. The
-only difference is that there is no <tt>flush</tt> variable, since <tt>inflate()</tt>
-can tell from the <em>zlib</em> stream itself when the stream is complete.
-<pre><b>
- int ret;
- unsigned have;
- z_stream strm;
- char in[CHUNK];
- char out[CHUNK];
-</b></pre><!-- -->
-The initialization of the state is the same, except that there is no compression level,
-of course, and two more elements of the structure are initialized. <tt>avail_in</tt>
-and <tt>next_in</tt> must be initialized before calling <tt>inflateInit()</tt>. This
-is because the application has the option to provide the start of the zlib stream in
-order for <tt>inflateInit()</tt> to have access to information about the compression
-method to aid in memory allocation. In the current implementation of <em>zlib</em>
-(up through versions 1.2.x), the method-dependent memory allocations are deferred to the first call of
-<tt>inflate()</tt> anyway. However those fields must be initialized since later versions
-of <em>zlib</em> that provide more compression methods may take advantage of this interface.
-In any case, no decompression is performed by <tt>inflateInit()</tt>, so the
-<tt>avail_out</tt> and <tt>next_out</tt> fields do not need to be initialized before calling.
-<p>
-Here <tt>avail_in</tt> is set to zero and <tt>next_in</tt> is set to <tt>Z_NULL</tt> to
-indicate that no input data is being provided.
-<pre><b>
- /* allocate inflate state */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- strm.avail_in = 0;
- strm.next_in = Z_NULL;
- ret = inflateInit(&amp;strm);
- if (ret != Z_OK)
- return ret;
-</b></pre><!-- -->
-The outer <tt>do</tt>-loop decompresses input until <tt>inflate()</tt> indicates
-that it has reached the end of the compressed data and has produced all of the uncompressed
-output. This is in contrast to <tt>def()</tt> which processes all of the input file.
-If end-of-file is reached before the compressed data self-terminates, then the compressed
-data is incomplete and an error is returned.
-<pre><b>
- /* decompress until deflate stream ends or end of file */
- do {
-</b></pre>
-We read input data and set the <tt>strm</tt> structure accordingly. If we've reached the
-end of the input file, then we leave the outer loop and report an error, since the
-compressed data is incomplete. Note that we may read more data than is eventually consumed
-by <tt>inflate()</tt>, if the input file continues past the <em>zlib</em> stream.
-For applications where <em>zlib</em> streams are embedded in other data, this routine would
-need to be modified to return the unused data, or at least indicate how much of the input
-data was not used, so the application would know where to pick up after the <em>zlib</em> stream.
-<pre><b>
- strm.avail_in = fread(in, 1, CHUNK, source);
- if (ferror(source)) {
- (void)inflateEnd(&amp;strm);
- return Z_ERRNO;
- }
- if (strm.avail_in == 0)
- break;
- strm.next_in = in;
-</b></pre><!-- -->
-The inner <tt>do</tt>-loop has the same function it did in <tt>def()</tt>, which is to
-keep calling <tt>inflate()</tt> until has generated all of the output it can with the
-provided input.
-<pre><b>
- /* run inflate() on input until output buffer not full */
- do {
-</b></pre>
-Just like in <tt>def()</tt>, the same output space is provided for each call of <tt>inflate()</tt>.
-<pre><b>
- strm.avail_out = CHUNK;
- strm.next_out = out;
-</b></pre>
-Now we run the decompression engine itself. There is no need to adjust the flush parameter, since
-the <em>zlib</em> format is self-terminating. The main difference here is that there are
-return values that we need to pay attention to. <tt>Z_DATA_ERROR</tt>
-indicates that <tt>inflate()</tt> detected an error in the <em>zlib</em> compressed data format,
-which means that either the data is not a <em>zlib</em> stream to begin with, or that the data was
-corrupted somewhere along the way since it was compressed. The other error to be processed is
-<tt>Z_MEM_ERROR</tt>, which can occur since memory allocation is deferred until <tt>inflate()</tt>
-needs it, unlike <tt>deflate()</tt>, whose memory is allocated at the start by <tt>deflateInit()</tt>.
-<p>
-Advanced applications may use
-<tt>deflateSetDictionary()</tt> to prime <tt>deflate()</tt> with a set of likely data to improve the
-first 32K or so of compression. This is noted in the <em>zlib</em> header, so <tt>inflate()</tt>
-requests that that dictionary be provided before it can start to decompress. Without the dictionary,
-correct decompression is not possible. For this routine, we have no idea what the dictionary is,
-so the <tt>Z_NEED_DICT</tt> indication is converted to a <tt>Z_DATA_ERROR</tt>.
-<p>
-<tt>inflate()</tt> can also return <tt>Z_STREAM_ERROR</tt>, which should not be possible here,
-but could be checked for as noted above for <tt>def()</tt>. <tt>Z_BUF_ERROR</tt> does not need to be
-checked for here, for the same reasons noted for <tt>def()</tt>. <tt>Z_STREAM_END</tt> will be
-checked for later.
-<pre><b>
- ret = inflate(&amp;strm, Z_NO_FLUSH);
- assert(ret != Z_STREAM_ERROR); /* state not clobbered */
- switch (ret) {
- case Z_NEED_DICT:
- ret = Z_DATA_ERROR; /* and fall through */
- case Z_DATA_ERROR:
- case Z_MEM_ERROR:
- (void)inflateEnd(&amp;strm);
- return ret;
- }
-</b></pre>
-The output of <tt>inflate()</tt> is handled identically to that of <tt>deflate()</tt>.
-<pre><b>
- have = CHUNK - strm.avail_out;
- if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
- (void)inflateEnd(&amp;strm);
- return Z_ERRNO;
- }
-</b></pre>
-The inner <tt>do</tt>-loop ends when <tt>inflate()</tt> has no more output as indicated
-by not filling the output buffer, just as for <tt>deflate()</tt>. In this case, we cannot
-assert that <tt>strm.avail_in</tt> will be zero, since the deflate stream may end before the file
-does.
-<pre><b>
- } while (strm.avail_out == 0);
-</b></pre><!-- -->
-The outer <tt>do</tt>-loop ends when <tt>inflate()</tt> reports that it has reached the
-end of the input <em>zlib</em> stream, has completed the decompression and integrity
-check, and has provided all of the output. This is indicated by the <tt>inflate()</tt>
-return value <tt>Z_STREAM_END</tt>. The inner loop is guaranteed to leave <tt>ret</tt>
-equal to <tt>Z_STREAM_END</tt> if the last chunk of the input file read contained the end
-of the <em>zlib</em> stream. So if the return value is not <tt>Z_STREAM_END</tt>, the
-loop continues to read more input.
-<pre><b>
- /* done when inflate() says it's done */
- } while (ret != Z_STREAM_END);
-</b></pre><!-- -->
-At this point, decompression successfully completed, or we broke out of the loop due to no
-more data being available from the input file. If the last <tt>inflate()</tt> return value
-is not <tt>Z_STREAM_END</tt>, then the <em>zlib</em> stream was incomplete and a data error
-is returned. Otherwise, we return with a happy return value. Of course, <tt>inflateEnd()</tt>
-is called first to avoid a memory leak.
-<pre><b>
- /* clean up and return */
- (void)inflateEnd(&amp;strm);
- return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
-}
-</b></pre><!-- -->
-That ends the routines that directly use <em>zlib</em>. The following routines make this
-a command-line program by running data through the above routines from <tt>stdin</tt> to
-<tt>stdout</tt>, and handling any errors reported by <tt>def()</tt> or <tt>inf()</tt>.
-<p>
-<tt>zerr()</tt> is used to interpret the possible error codes from <tt>def()</tt>
-and <tt>inf()</tt>, as detailed in their comments above, and print out an error message.
-Note that these are only a subset of the possible return values from <tt>deflate()</tt>
-and <tt>inflate()</tt>.
-<pre><b>
-/* report a zlib or i/o error */
-void zerr(int ret)
-{
- fputs("zpipe: ", stderr);
- switch (ret) {
- case Z_ERRNO:
- if (ferror(stdin))
- fputs("error reading stdin\n", stderr);
- if (ferror(stdout))
- fputs("error writing stdout\n", stderr);
- break;
- case Z_STREAM_ERROR:
- fputs("invalid compression level\n", stderr);
- break;
- case Z_DATA_ERROR:
- fputs("invalid or incomplete deflate data\n", stderr);
- break;
- case Z_MEM_ERROR:
- fputs("out of memory\n", stderr);
- break;
- case Z_VERSION_ERROR:
- fputs("zlib version mismatch!\n", stderr);
- }
-}
-</b></pre><!-- -->
-Here is the <tt>main()</tt> routine used to test <tt>def()</tt> and <tt>inf()</tt>. The
-<tt>zpipe</tt> command is simply a compression pipe from <tt>stdin</tt> to <tt>stdout</tt>, if
-no arguments are given, or it is a decompression pipe if <tt>zpipe -d</tt> is used. If any other
-arguments are provided, no compression or decompression is performed. Instead a usage
-message is displayed. Examples are <tt>zpipe < foo.txt > foo.txt.z</tt> to compress, and
-<tt>zpipe -d < foo.txt.z > foo.txt</tt> to decompress.
-<pre><b>
-/* compress or decompress from stdin to stdout */
-int main(int argc, char **argv)
-{
- int ret;
-
- /* do compression if no arguments */
- if (argc == 1) {
- ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
- if (ret != Z_OK)
- zerr(ret);
- return ret;
- }
-
- /* do decompression if -d specified */
- else if (argc == 2 &amp;&amp; strcmp(argv[1], "-d") == 0) {
- ret = inf(stdin, stdout);
- if (ret != Z_OK)
- zerr(ret);
- return ret;
- }
-
- /* otherwise, report usage */
- else {
- fputs("zpipe usage: zpipe [-d] &lt; source &gt; dest\n", stderr);
- return 1;
- }
-}
-</b></pre>
-<hr>
-<i>Copyright (c) 2004 by Mark Adler<br>Last modified 13 November 2004</i>
-</body>
-</html>
diff --git a/src/3rdparty/zlib/examples/zpipe.c b/src/3rdparty/zlib/examples/zpipe.c
deleted file mode 100644
index 26abb56..0000000
--- a/src/3rdparty/zlib/examples/zpipe.c
+++ /dev/null
@@ -1,191 +0,0 @@
-/* zpipe.c: example of proper use of zlib's inflate() and deflate()
- Not copyrighted -- provided to the public domain
- Version 1.2 9 November 2004 Mark Adler */
-
-/* Version history:
- 1.0 30 Oct 2004 First version
- 1.1 8 Nov 2004 Add void casting for unused return values
- Use switch statement for inflate() return values
- 1.2 9 Nov 2004 Add assertions to document zlib guarantees
- 1.3 6 Apr 2005 Remove incorrect assertion in inf()
- */
-
-#include <stdio.h>
-#include <string.h>
-#include <assert.h>
-#include "zlib.h"
-
-#define CHUNK 16384
-
-/* Compress from file source to file dest until EOF on source.
- def() returns Z_OK on success, Z_MEM_ERROR if memory could not be
- allocated for processing, Z_STREAM_ERROR if an invalid compression
- level is supplied, Z_VERSION_ERROR if the version of zlib.h and the
- version of the library linked do not match, or Z_ERRNO if there is
- an error reading or writing the files. */
-int def(FILE *source, FILE *dest, int level)
-{
- int ret, flush;
- unsigned have;
- z_stream strm;
- char in[CHUNK];
- char out[CHUNK];
-
- /* allocate deflate state */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- ret = deflateInit(&strm, level);
- if (ret != Z_OK)
- return ret;
-
- /* compress until end of file */
- do {
- strm.avail_in = fread(in, 1, CHUNK, source);
- if (ferror(source)) {
- (void)deflateEnd(&strm);
- return Z_ERRNO;
- }
- flush = feof(source) ? Z_FINISH : Z_NO_FLUSH;
- strm.next_in = in;
-
- /* run deflate() on input until output buffer not full, finish
- compression if all of source has been read in */
- do {
- strm.avail_out = CHUNK;
- strm.next_out = out;
- ret = deflate(&strm, flush); /* no bad return value */
- assert(ret != Z_STREAM_ERROR); /* state not clobbered */
- have = CHUNK - strm.avail_out;
- if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
- (void)deflateEnd(&strm);
- return Z_ERRNO;
- }
- } while (strm.avail_out == 0);
- assert(strm.avail_in == 0); /* all input will be used */
-
- /* done when last data in file processed */
- } while (flush != Z_FINISH);
- assert(ret == Z_STREAM_END); /* stream will be complete */
-
- /* clean up and return */
- (void)deflateEnd(&strm);
- return Z_OK;
-}
-
-/* Decompress from file source to file dest until stream ends or EOF.
- inf() returns Z_OK on success, Z_MEM_ERROR if memory could not be
- allocated for processing, Z_DATA_ERROR if the deflate data is
- invalid or incomplete, Z_VERSION_ERROR if the version of zlib.h and
- the version of the library linked do not match, or Z_ERRNO if there
- is an error reading or writing the files. */
-int inf(FILE *source, FILE *dest)
-{
- int ret;
- unsigned have;
- z_stream strm;
- char in[CHUNK];
- char out[CHUNK];
-
- /* allocate inflate state */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- strm.avail_in = 0;
- strm.next_in = Z_NULL;
- ret = inflateInit(&strm);
- if (ret != Z_OK)
- return ret;
-
- /* decompress until deflate stream ends or end of file */
- do {
- strm.avail_in = fread(in, 1, CHUNK, source);
- if (ferror(source)) {
- (void)inflateEnd(&strm);
- return Z_ERRNO;
- }
- if (strm.avail_in == 0)
- break;
- strm.next_in = in;
-
- /* run inflate() on input until output buffer not full */
- do {
- strm.avail_out = CHUNK;
- strm.next_out = out;
- ret = inflate(&strm, Z_NO_FLUSH);
- assert(ret != Z_STREAM_ERROR); /* state not clobbered */
- switch (ret) {
- case Z_NEED_DICT:
- ret = Z_DATA_ERROR; /* and fall through */
- case Z_DATA_ERROR:
- case Z_MEM_ERROR:
- (void)inflateEnd(&strm);
- return ret;
- }
- have = CHUNK - strm.avail_out;
- if (fwrite(out, 1, have, dest) != have || ferror(dest)) {
- (void)inflateEnd(&strm);
- return Z_ERRNO;
- }
- } while (strm.avail_out == 0);
-
- /* done when inflate() says it's done */
- } while (ret != Z_STREAM_END);
-
- /* clean up and return */
- (void)inflateEnd(&strm);
- return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR;
-}
-
-/* report a zlib or i/o error */
-void zerr(int ret)
-{
- fputs("zpipe: ", stderr);
- switch (ret) {
- case Z_ERRNO:
- if (ferror(stdin))
- fputs("error reading stdin\n", stderr);
- if (ferror(stdout))
- fputs("error writing stdout\n", stderr);
- break;
- case Z_STREAM_ERROR:
- fputs("invalid compression level\n", stderr);
- break;
- case Z_DATA_ERROR:
- fputs("invalid or incomplete deflate data\n", stderr);
- break;
- case Z_MEM_ERROR:
- fputs("out of memory\n", stderr);
- break;
- case Z_VERSION_ERROR:
- fputs("zlib version mismatch!\n", stderr);
- }
-}
-
-/* compress or decompress from stdin to stdout */
-int main(int argc, char **argv)
-{
- int ret;
-
- /* do compression if no arguments */
- if (argc == 1) {
- ret = def(stdin, stdout, Z_DEFAULT_COMPRESSION);
- if (ret != Z_OK)
- zerr(ret);
- return ret;
- }
-
- /* do decompression if -d specified */
- else if (argc == 2 && strcmp(argv[1], "-d") == 0) {
- ret = inf(stdin, stdout);
- if (ret != Z_OK)
- zerr(ret);
- return ret;
- }
-
- /* otherwise, report usage */
- else {
- fputs("zpipe usage: zpipe [-d] < source > dest\n", stderr);
- return 1;
- }
-}
diff --git a/src/3rdparty/zlib/examples/zran.c b/src/3rdparty/zlib/examples/zran.c
deleted file mode 100644
index 8c7717e..0000000
--- a/src/3rdparty/zlib/examples/zran.c
+++ /dev/null
@@ -1,404 +0,0 @@
-/* zran.c -- example of zlib/gzip stream indexing and random access
- * Copyright (C) 2005 Mark Adler
- * For conditions of distribution and use, see copyright notice in zlib.h
- Version 1.0 29 May 2005 Mark Adler */
-
-/* Illustrate the use of Z_BLOCK, inflatePrime(), and inflateSetDictionary()
- for random access of a compressed file. A file containing a zlib or gzip
- stream is provided on the command line. The compressed stream is decoded in
- its entirety, and an index built with access points about every SPAN bytes
- in the uncompressed output. The compressed file is left open, and can then
- be read randomly, having to decompress on the average SPAN/2 uncompressed
- bytes before getting to the desired block of data.
-
- An access point can be created at the start of any deflate block, by saving
- the starting file offset and bit of that block, and the 32K bytes of
- uncompressed data that precede that block. Also the uncompressed offset of
- that block is saved to provide a referece for locating a desired starting
- point in the uncompressed stream. build_index() works by decompressing the
- input zlib or gzip stream a block at a time, and at the end of each block
- deciding if enough uncompressed data has gone by to justify the creation of
- a new access point. If so, that point is saved in a data structure that
- grows as needed to accommodate the points.
-
- To use the index, an offset in the uncompressed data is provided, for which
- the latest accees point at or preceding that offset is located in the index.
- The input file is positioned to the specified location in the index, and if
- necessary the first few bits of the compressed data is read from the file.
- inflate is initialized with those bits and the 32K of uncompressed data, and
- the decompression then proceeds until the desired offset in the file is
- reached. Then the decompression continues to read the desired uncompressed
- data from the file.
-
- Another approach would be to generate the index on demand. In that case,
- requests for random access reads from the compressed data would try to use
- the index, but if a read far enough past the end of the index is required,
- then further index entries would be generated and added.
-
- There is some fair bit of overhead to starting inflation for the random
- access, mainly copying the 32K byte dictionary. So if small pieces of the
- file are being accessed, it would make sense to implement a cache to hold
- some lookahead and avoid many calls to extract() for small lengths.
-
- Another way to build an index would be to use inflateCopy(). That would
- not be constrained to have access points at block boundaries, but requires
- more memory per access point, and also cannot be saved to file due to the
- use of pointers in the state. The approach here allows for storage of the
- index in a file.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include "zlib.h"
-
-#define local static
-
-#define SPAN 1048576L /* desired distance between access points */
-#define WINSIZE 32768U /* sliding window size */
-#define CHUNK 16384 /* file input buffer size */
-
-/* access point entry */
-struct point {
- off_t out; /* corresponding offset in uncompressed data */
- off_t in; /* offset in input file of first full byte */
- int bits; /* number of bits (1-7) from byte at in - 1, or 0 */
- unsigned char window[WINSIZE]; /* preceding 32K of uncompressed data */
-};
-
-/* access point list */
-struct access {
- int have; /* number of list entries filled in */
- int size; /* number of list entries allocated */
- struct point *list; /* allocated list */
-};
-
-/* Deallocate an index built by build_index() */
-local void free_index(struct access *index)
-{
- if (index != NULL) {
- free(index->list);
- free(index);
- }
-}
-
-/* Add an entry to the access point list. If out of memory, deallocate the
- existing list and return NULL. */
-local struct access *addpoint(struct access *index, int bits,
- off_t in, off_t out, unsigned left, unsigned char *window)
-{
- struct point *next;
-
- /* if list is empty, create it (start with eight points) */
- if (index == NULL) {
- index = malloc(sizeof(struct access));
- if (index == NULL) return NULL;
- index->list = malloc(sizeof(struct point) << 3);
- if (index->list == NULL) {
- free(index);
- return NULL;
- }
- index->size = 8;
- index->have = 0;
- }
-
- /* if list is full, make it bigger */
- else if (index->have == index->size) {
- index->size <<= 1;
- next = realloc(index->list, sizeof(struct point) * index->size);
- if (next == NULL) {
- free_index(index);
- return NULL;
- }
- index->list = next;
- }
-
- /* fill in entry and increment how many we have */
- next = index->list + index->have;
- next->bits = bits;
- next->in = in;
- next->out = out;
- if (left)
- memcpy(next->window, window + WINSIZE - left, left);
- if (left < WINSIZE)
- memcpy(next->window + left, window, WINSIZE - left);
- index->have++;
-
- /* return list, possibly reallocated */
- return index;
-}
-
-/* Make one entire pass through the compressed stream and build an index, with
- access points about every span bytes of uncompressed output -- span is
- chosen to balance the speed of random access against the memory requirements
- of the list, about 32K bytes per access point. Note that data after the end
- of the first zlib or gzip stream in the file is ignored. build_index()
- returns the number of access points on success (>= 1), Z_MEM_ERROR for out
- of memory, Z_DATA_ERROR for an error in the input file, or Z_ERRNO for a
- file read error. On success, *built points to the resulting index. */
-local int build_index(FILE *in, off_t span, struct access **built)
-{
- int ret;
- off_t totin, totout; /* our own total counters to avoid 4GB limit */
- off_t last; /* totout value of last access point */
- struct access *index; /* access points being generated */
- z_stream strm;
- unsigned char input[CHUNK];
- unsigned char window[WINSIZE];
-
- /* initialize inflate */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- strm.avail_in = 0;
- strm.next_in = Z_NULL;
- ret = inflateInit2(&strm, 47); /* automatic zlib or gzip decoding */
- if (ret != Z_OK)
- return ret;
-
- /* inflate the input, maintain a sliding window, and build an index -- this
- also validates the integrity of the compressed data using the check
- information at the end of the gzip or zlib stream */
- totin = totout = last = 0;
- index = NULL; /* will be allocated by first addpoint() */
- strm.avail_out = 0;
- do {
- /* get some compressed data from input file */
- strm.avail_in = fread(input, 1, CHUNK, in);
- if (ferror(in)) {
- ret = Z_ERRNO;
- goto build_index_error;
- }
- if (strm.avail_in == 0) {
- ret = Z_DATA_ERROR;
- goto build_index_error;
- }
- strm.next_in = input;
-
- /* process all of that, or until end of stream */
- do {
- /* reset sliding window if necessary */
- if (strm.avail_out == 0) {
- strm.avail_out = WINSIZE;
- strm.next_out = window;
- }
-
- /* inflate until out of input, output, or at end of block --
- update the total input and output counters */
- totin += strm.avail_in;
- totout += strm.avail_out;
- ret = inflate(&strm, Z_BLOCK); /* return at end of block */
- totin -= strm.avail_in;
- totout -= strm.avail_out;
- if (ret == Z_NEED_DICT)
- ret = Z_DATA_ERROR;
- if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
- goto build_index_error;
- if (ret == Z_STREAM_END)
- break;
-
- /* if at end of block, consider adding an index entry (note that if
- data_type indicates an end-of-block, then all of the
- uncompressed data from that block has been delivered, and none
- of the compressed data after that block has been consumed,
- except for up to seven bits) -- the totout == 0 provides an
- entry point after the zlib or gzip header, and assures that the
- index always has at least one access point; we avoid creating an
- access point after the last block by checking bit 6 of data_type
- */
- if ((strm.data_type & 128) && !(strm.data_type & 64) &&
- (totout == 0 || totout - last > span)) {
- index = addpoint(index, strm.data_type & 7, totin,
- totout, strm.avail_out, window);
- if (index == NULL) {
- ret = Z_MEM_ERROR;
- goto build_index_error;
- }
- last = totout;
- }
- } while (strm.avail_in != 0);
- } while (ret != Z_STREAM_END);
-
- /* clean up and return index (release unused entries in list) */
- (void)inflateEnd(&strm);
- index = realloc(index, sizeof(struct point) * index->have);
- index->size = index->have;
- *built = index;
- return index->size;
-
- /* return error */
- build_index_error:
- (void)inflateEnd(&strm);
- if (index != NULL)
- free_index(index);
- return ret;
-}
-
-/* Use the index to read len bytes from offset into buf, return bytes read or
- negative for error (Z_DATA_ERROR or Z_MEM_ERROR). If data is requested past
- the end of the uncompressed data, then extract() will return a value less
- than len, indicating how much as actually read into buf. This function
- should not return a data error unless the file was modified since the index
- was generated. extract() may also return Z_ERRNO if there is an error on
- reading or seeking the input file. */
-local int extract(FILE *in, struct access *index, off_t offset,
- unsigned char *buf, int len)
-{
- int ret, skip;
- z_stream strm;
- struct point *here;
- unsigned char input[CHUNK];
- unsigned char discard[WINSIZE];
-
- /* proceed only if something reasonable to do */
- if (len < 0)
- return 0;
-
- /* find where in stream to start */
- here = index->list;
- ret = index->have;
- while (--ret && here[1].out <= offset)
- here++;
-
- /* initialize file and inflate state to start there */
- strm.zalloc = Z_NULL;
- strm.zfree = Z_NULL;
- strm.opaque = Z_NULL;
- strm.avail_in = 0;
- strm.next_in = Z_NULL;
- ret = inflateInit2(&strm, -15); /* raw inflate */
- if (ret != Z_OK)
- return ret;
- ret = fseeko(in, here->in - (here->bits ? 1 : 0), SEEK_SET);
- if (ret == -1)
- goto extract_ret;
- if (here->bits) {
- ret = getc(in);
- if (ret == -1) {
- ret = ferror(in) ? Z_ERRNO : Z_DATA_ERROR;
- goto extract_ret;
- }
- (void)inflatePrime(&strm, here->bits, ret >> (8 - here->bits));
- }
- (void)inflateSetDictionary(&strm, here->window, WINSIZE);
-
- /* skip uncompressed bytes until offset reached, then satisfy request */
- offset -= here->out;
- strm.avail_in = 0;
- skip = 1; /* while skipping to offset */
- do {
- /* define where to put uncompressed data, and how much */
- if (offset == 0 && skip) { /* at offset now */
- strm.avail_out = len;
- strm.next_out = buf;
- skip = 0; /* only do this once */
- }
- if (offset > WINSIZE) { /* skip WINSIZE bytes */
- strm.avail_out = WINSIZE;
- strm.next_out = discard;
- offset -= WINSIZE;
- }
- else if (offset != 0) { /* last skip */
- strm.avail_out = (unsigned)offset;
- strm.next_out = discard;
- offset = 0;
- }
-
- /* uncompress until avail_out filled, or end of stream */
- do {
- if (strm.avail_in == 0) {
- strm.avail_in = fread(input, 1, CHUNK, in);
- if (ferror(in)) {
- ret = Z_ERRNO;
- goto extract_ret;
- }
- if (strm.avail_in == 0) {
- ret = Z_DATA_ERROR;
- goto extract_ret;
- }
- strm.next_in = input;
- }
- ret = inflate(&strm, Z_NO_FLUSH); /* normal inflate */
- if (ret == Z_NEED_DICT)
- ret = Z_DATA_ERROR;
- if (ret == Z_MEM_ERROR || ret == Z_DATA_ERROR)
- goto extract_ret;
- if (ret == Z_STREAM_END)
- break;
- } while (strm.avail_out != 0);
-
- /* if reach end of stream, then don't keep trying to get more */
- if (ret == Z_STREAM_END)
- break;
-
- /* do until offset reached and requested data read, or stream ends */
- } while (skip);
-
- /* compute number of uncompressed bytes read after offset */
- ret = skip ? 0 : len - strm.avail_out;
-
- /* clean up and return bytes read or error */
- extract_ret:
- (void)inflateEnd(&strm);
- return ret;
-}
-
-/* Demonstrate the use of build_index() and extract() by processing the file
- provided on the command line, and the extracting 16K from about 2/3rds of
- the way through the uncompressed output, and writing that to stdout. */
-int main(int argc, char **argv)
-{
- int len;
- off_t offset;
- FILE *in;
- struct access *index;
- unsigned char buf[CHUNK];
-
- /* open input file */
- if (argc != 2) {
- fprintf(stderr, "usage: zran file.gz\n");
- return 1;
- }
- in = fopen(argv[1], "rb");
- if (in == NULL) {
- fprintf(stderr, "zran: could not open %s for reading\n", argv[1]);
- return 1;
- }
-
- /* build index */
- len = build_index(in, SPAN, &index);
- if (len < 0) {
- fclose(in);
- switch (len) {
- case Z_MEM_ERROR:
- fprintf(stderr, "zran: out of memory\n");
- break;
- case Z_DATA_ERROR:
- fprintf(stderr, "zran: compressed data error in %s\n", argv[1]);
- break;
- case Z_ERRNO:
- fprintf(stderr, "zran: read error on %s\n", argv[1]);
- break;
- default:
- fprintf(stderr, "zran: error %d while building index\n", len);
- }
- return 1;
- }
- fprintf(stderr, "zran: built index with %d access points\n", len);
-
- /* use index by reading some bytes from an arbitrary offset */
- offset = (index->list[index->have - 1].out << 1) / 3;
- len = extract(in, index, offset, buf, CHUNK);
- if (len < 0)
- fprintf(stderr, "zran: extraction failed: %s error\n",
- len == Z_MEM_ERROR ? "out of memory" : "input corrupted");
- else {
- fwrite(buf, 1, len, stdout);
- fprintf(stderr, "zran: extracted %d bytes at %llu\n", len, offset);
- }
-
- /* clean up and exit */
- free_index(index);
- fclose(in);
- return 0;
-}
diff --git a/src/3rdparty/zlib/gzclose.c b/src/3rdparty/zlib/gzclose.c
new file mode 100644
index 0000000..caeb99a
--- /dev/null
+++ b/src/3rdparty/zlib/gzclose.c
@@ -0,0 +1,25 @@
+/* gzclose.c -- zlib gzclose() function
+ * Copyright (C) 2004, 2010 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "gzguts.h"
+
+/* gzclose() is in a separate file so that it is linked in only if it is used.
+ That way the other gzclose functions can be used instead to avoid linking in
+ unneeded compression or decompression routines. */
+int ZEXPORT gzclose(file)
+ gzFile file;
+{
+#ifndef NO_GZCOMPRESS
+ gz_statep state;
+
+ if (file == NULL)
+ return Z_STREAM_ERROR;
+ state = (gz_statep)file;
+
+ return state->mode == GZ_READ ? gzclose_r(file) : gzclose_w(file);
+#else
+ return gzclose_r(file);
+#endif
+}
diff --git a/src/3rdparty/zlib/gzguts.h b/src/3rdparty/zlib/gzguts.h
new file mode 100644
index 0000000..347af46
--- /dev/null
+++ b/src/3rdparty/zlib/gzguts.h
@@ -0,0 +1,139 @@
+/* gzguts.h -- zlib internal header definitions for gz* operations
+ * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#ifdef _MSC_VER
+# define _CRT_SECURE_NO_DEPRECATE
+# define _CRT_NONSTDC_NO_DEPRECATE
+#endif
+
+#ifdef _LARGEFILE64_SOURCE
+# ifndef _LARGEFILE_SOURCE
+# define _LARGEFILE_SOURCE 1
+# endif
+# ifdef _FILE_OFFSET_BITS
+# undef _FILE_OFFSET_BITS
+# endif
+#endif
+
+#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+# define ZLIB_INTERNAL
+#endif
+
+#include <stdio.h>
+#include "zlib.h"
+#ifdef STDC
+# include <string.h>
+# include <stdlib.h>
+# include <limits.h>
+#endif
+#if !defined(_WIN32_WCE)
+#include <fcntl.h>
+#endif
+
+#ifdef NO_DEFLATE /* for compatibility with old definition */
+# define NO_GZCOMPRESS
+#endif
+
+#ifdef _MSC_VER
+# include <io.h>
+# define vsnprintf _vsnprintf
+#endif
+
+#ifndef local
+# define local static
+#endif
+/* compile with -Dlocal if your debugger can't find static symbols */
+
+/* gz* functions always use library allocation functions */
+#ifndef STDC
+ extern voidp malloc OF((uInt size));
+ extern void free OF((voidpf ptr));
+#endif
+
+/* get errno and strerror definition */
+#if defined UNDER_CE
+# include <windows.h>
+# define zstrerror() gz_strwinerror((DWORD)GetLastError())
+#else
+# ifdef STDC
+# include <errno.h>
+# define zstrerror() strerror(errno)
+# else
+# define zstrerror() "stdio error (consult errno)"
+# endif
+#endif
+
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+ ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+#endif
+
+/* default i/o buffer size -- double this for output when reading */
+#define GZBUFSIZE 8192
+
+/* gzip modes, also provide a little integrity check on the passed structure */
+#define GZ_NONE 0
+#define GZ_READ 7247
+#define GZ_WRITE 31153
+#define GZ_APPEND 1 /* mode set to GZ_WRITE after the file is opened */
+
+/* values for gz_state how */
+#define LOOK 0 /* look for a gzip header */
+#define COPY 1 /* copy input directly */
+#define GZIP 2 /* decompress a gzip stream */
+
+/* internal gzip file state data structure */
+typedef struct {
+ /* used for both reading and writing */
+ int mode; /* see gzip modes above */
+ int fd; /* file descriptor */
+ char *path; /* path or fd for error messages */
+ z_off64_t pos; /* current position in uncompressed data */
+ unsigned size; /* buffer size, zero if not allocated yet */
+ unsigned want; /* requested buffer size, default is GZBUFSIZE */
+ unsigned char *in; /* input buffer */
+ unsigned char *out; /* output buffer (double-sized when reading) */
+ unsigned char *next; /* next output data to deliver or write */
+ /* just for reading */
+ unsigned have; /* amount of output data unused at next */
+ int eof; /* true if end of input file reached */
+ z_off64_t start; /* where the gzip data started, for rewinding */
+ z_off64_t raw; /* where the raw data started, for seeking */
+ int how; /* 0: get header, 1: copy, 2: decompress */
+ int direct; /* true if last read direct, false if gzip */
+ /* just for writing */
+ int level; /* compression level */
+ int strategy; /* compression strategy */
+ /* seek request */
+ z_off64_t skip; /* amount to skip (already rewound if backwards) */
+ int seek; /* true if seek request pending */
+ /* error information */
+ int err; /* error code */
+ char *msg; /* error message */
+ /* zlib inflate or deflate stream */
+ z_stream strm; /* stream structure in-place (not a pointer) */
+} gz_state;
+typedef gz_state FAR *gz_statep;
+
+/* shared functions */
+void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *));
+#if defined UNDER_CE
+char ZLIB_INTERNAL *gz_strwinerror OF((DWORD error));
+#endif
+
+/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
+ value -- needed when comparing unsigned to z_off64_t, which is signed
+ (possible z_off64_t types off_t, off64_t, and long are all signed) */
+#ifdef INT_MAX
+# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
+#else
+unsigned ZLIB_INTERNAL gz_intmax OF((void));
+# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
+#endif
diff --git a/src/3rdparty/zlib/gzio.c b/src/3rdparty/zlib/gzio.c
deleted file mode 100644
index 25850ad..0000000
--- a/src/3rdparty/zlib/gzio.c
+++ /dev/null
@@ -1,1026 +0,0 @@
-/* gzio.c -- IO on .gz files
- * Copyright (C) 1995-2005 Jean-loup Gailly.
- * For conditions of distribution and use, see copyright notice in zlib.h
- *
- * Compile this file with -DNO_GZCOMPRESS to avoid the compression code.
- */
-
-/* @(#) $Id$ */
-
-#include <stdio.h>
-
-#include "zutil.h"
-
-#ifdef NO_DEFLATE /* for compatibility with old definition */
-# define NO_GZCOMPRESS
-#endif
-
-#ifndef NO_DUMMY_DECL
-struct internal_state {int dummy;}; /* for buggy compilers */
-#endif
-
-#ifndef Z_BUFSIZE
-# ifdef MAXSEG_64K
-# define Z_BUFSIZE 4096 /* minimize memory usage for 16-bit DOS */
-# else
-# define Z_BUFSIZE 16384
-# endif
-#endif
-#ifndef Z_PRINTF_BUFSIZE
-# define Z_PRINTF_BUFSIZE 4096
-#endif
-
-#ifdef __MVS__
-# pragma map (fdopen , "\174\174FDOPEN")
- FILE *fdopen(int, const char *);
-#endif
-
-#ifndef STDC
-extern voidp malloc OF((uInt size));
-extern void free OF((voidpf ptr));
-#endif
-
-#define ALLOC(size) malloc(size)
-#define TRYFREE(p) {if (p) free(p);}
-
-static int const gz_magic[2] = {0x1f, 0x8b}; /* gzip magic header */
-
-/* gzip flag byte */
-#define ASCII_FLAG 0x01 /* bit 0 set: file probably ascii text */
-#define HEAD_CRC 0x02 /* bit 1 set: header CRC present */
-#define EXTRA_FIELD 0x04 /* bit 2 set: extra field present */
-#define ORIG_NAME 0x08 /* bit 3 set: original file name present */
-#define COMMENT 0x10 /* bit 4 set: file comment present */
-#define RESERVED 0xE0 /* bits 5..7: reserved */
-
-typedef struct gz_stream {
- z_stream stream;
- int z_err; /* error code for last stream operation */
- int z_eof; /* set if end of input file */
- FILE *file; /* .gz file */
- Byte *inbuf; /* input buffer */
- Byte *outbuf; /* output buffer */
- uLong crc; /* crc32 of uncompressed data */
- char *msg; /* error message */
- char *path; /* path name for debugging only */
- int transparent; /* 1 if input file is not a .gz file */
- char mode; /* 'w' or 'r' */
- z_off_t start; /* start of compressed data in file (header skipped) */
- z_off_t in; /* bytes into deflate or inflate */
- z_off_t out; /* bytes out of deflate or inflate */
- int back; /* one character push-back */
- int last; /* true if push-back is last character */
-} gz_stream;
-
-
-local gzFile gz_open OF((const char *path, const char *mode, int fd));
-local int do_flush OF((gzFile file, int flush));
-local int get_byte OF((gz_stream *s));
-local void check_header OF((gz_stream *s));
-local int destroy OF((gz_stream *s));
-local void putLong OF((FILE *file, uLong x));
-local uLong getLong OF((gz_stream *s));
-
-/* ===========================================================================
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb"). The file is given either by file descriptor
- or path name (if fd == -1).
- gz_open returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR).
-*/
-local gzFile gz_open (path, mode, fd)
- const char *path;
- const char *mode;
- int fd;
-{
- int err;
- int level = Z_DEFAULT_COMPRESSION; /* compression level */
- int strategy = Z_DEFAULT_STRATEGY; /* compression strategy */
- char *p = (char*)mode;
- gz_stream *s;
- char fmode[80]; /* copy of mode, without the compression level */
- char *m = fmode;
-
- if (!path || !mode) return Z_NULL;
-
- s = (gz_stream *)ALLOC(sizeof(gz_stream));
- if (!s) return Z_NULL;
-
- s->stream.zalloc = (alloc_func)0;
- s->stream.zfree = (free_func)0;
- s->stream.opaque = (voidpf)0;
- s->stream.next_in = s->inbuf = Z_NULL;
- s->stream.next_out = s->outbuf = Z_NULL;
- s->stream.avail_in = s->stream.avail_out = 0;
- s->file = NULL;
- s->z_err = Z_OK;
- s->z_eof = 0;
- s->in = 0;
- s->out = 0;
- s->back = EOF;
- s->crc = crc32(0L, Z_NULL, 0);
- s->msg = NULL;
- s->transparent = 0;
-
- s->path = (char*)ALLOC(strlen(path)+1);
- if (s->path == NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- strcpy(s->path, path); /* do this early for debugging */
-
- s->mode = '\0';
- do {
- if (*p == 'r') s->mode = 'r';
- if (*p == 'w' || *p == 'a') s->mode = 'w';
- if (*p >= '0' && *p <= '9') {
- level = *p - '0';
- } else if (*p == 'f') {
- strategy = Z_FILTERED;
- } else if (*p == 'h') {
- strategy = Z_HUFFMAN_ONLY;
- } else if (*p == 'R') {
- strategy = Z_RLE;
- } else {
- *m++ = *p; /* copy the mode */
- }
- } while (*p++ && m != fmode + sizeof(fmode));
- if (s->mode == '\0') return destroy(s), (gzFile)Z_NULL;
-
- if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
- err = Z_STREAM_ERROR;
-#else
- err = deflateInit2(&(s->stream), level,
- Z_DEFLATED, -MAX_WBITS, DEF_MEM_LEVEL, strategy);
- /* windowBits is passed < 0 to suppress zlib header */
-
- s->stream.next_out = s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
-#endif
- if (err != Z_OK || s->outbuf == Z_NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- } else {
- s->stream.next_in = s->inbuf = (Byte*)ALLOC(Z_BUFSIZE);
-
- err = inflateInit2(&(s->stream), -MAX_WBITS);
- /* windowBits is passed < 0 to tell that there is no zlib header.
- * Note that in this case inflate *requires* an extra "dummy" byte
- * after the compressed stream in order to complete decompression and
- * return Z_STREAM_END. Here the gzip CRC32 ensures that 4 bytes are
- * present after the compressed stream.
- */
- if (err != Z_OK || s->inbuf == Z_NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- }
- s->stream.avail_out = Z_BUFSIZE;
-
- errno = 0;
- s->file = fd < 0 ? F_OPEN(path, fmode) : (FILE*)fdopen(fd, fmode);
-
- if (s->file == NULL) {
- return destroy(s), (gzFile)Z_NULL;
- }
- if (s->mode == 'w') {
- /* Write a very simple .gz header:
- */
- fprintf(s->file, "%c%c%c%c%c%c%c%c%c%c", gz_magic[0], gz_magic[1],
- Z_DEFLATED, 0 /*flags*/, 0,0,0,0 /*time*/, 0 /*xflags*/, OS_CODE);
- s->start = 10L;
- /* We use 10L instead of ftell(s->file) to because ftell causes an
- * fflush on some systems. This version of the library doesn't use
- * start anyway in write mode, so this initialization is not
- * necessary.
- */
- } else {
- check_header(s); /* skip the .gz header */
- s->start = ftell(s->file) - s->stream.avail_in;
- }
-
- return (gzFile)s;
-}
-
-/* ===========================================================================
- Opens a gzip (.gz) file for reading or writing.
-*/
-gzFile Q_ZEXPORT gzopen (path, mode)
- const char *path;
- const char *mode;
-{
- return gz_open (path, mode, -1);
-}
-
-/* ===========================================================================
- Associate a gzFile with the file descriptor fd. fd is not dup'ed here
- to mimic the behavio(u)r of fdopen.
-*/
-gzFile ZEXPORT gzdopen (fd, mode)
- int fd;
- const char *mode;
-{
- char name[46]; /* allow for up to 128-bit integers */
-
- if (fd < 0) return (gzFile)Z_NULL;
- sprintf(name, "<fd:%d>", fd); /* for debugging */
-
- return gz_open (name, mode, fd);
-}
-
-/* ===========================================================================
- * Update the compression level and strategy
- */
-int ZEXPORT gzsetparams (file, level, strategy)
- gzFile file;
- int level;
- int strategy;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
- /* Make room to allow flushing */
- if (s->stream.avail_out == 0) {
-
- s->stream.next_out = s->outbuf;
- if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
- s->z_err = Z_ERRNO;
- }
- s->stream.avail_out = Z_BUFSIZE;
- }
-
- return deflateParams (&(s->stream), level, strategy);
-}
-
-/* ===========================================================================
- Read a byte from a gz_stream; update next_in and avail_in. Return EOF
- for end of file.
- IN assertion: the stream s has been sucessfully opened for reading.
-*/
-local int get_byte(s)
- gz_stream *s;
-{
- if (s->z_eof) return EOF;
- if (s->stream.avail_in == 0) {
- errno = 0;
- s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
- if (s->stream.avail_in == 0) {
- s->z_eof = 1;
- if (ferror(s->file)) s->z_err = Z_ERRNO;
- return EOF;
- }
- s->stream.next_in = s->inbuf;
- }
- s->stream.avail_in--;
- return *(s->stream.next_in)++;
-}
-
-/* ===========================================================================
- Check the gzip header of a gz_stream opened for reading. Set the stream
- mode to transparent if the gzip magic header is not present; set s->err
- to Z_DATA_ERROR if the magic header is present but the rest of the header
- is incorrect.
- IN assertion: the stream s has already been created sucessfully;
- s->stream.avail_in is zero for the first time, but may be non-zero
- for concatenated .gz files.
-*/
-local void check_header(s)
- gz_stream *s;
-{
- int method; /* method byte */
- int flags; /* flags byte */
- uInt len;
- int c;
-
- /* Assure two bytes in the buffer so we can peek ahead -- handle case
- where first byte of header is at the end of the buffer after the last
- gzip segment */
- len = s->stream.avail_in;
- if (len < 2) {
- if (len) s->inbuf[0] = s->stream.next_in[0];
- errno = 0;
- len = (uInt)fread(s->inbuf + len, 1, Z_BUFSIZE >> len, s->file);
- if (len == 0 && ferror(s->file)) s->z_err = Z_ERRNO;
- s->stream.avail_in += len;
- s->stream.next_in = s->inbuf;
- if (s->stream.avail_in < 2) {
- s->transparent = s->stream.avail_in;
- return;
- }
- }
-
- /* Peek ahead to check the gzip magic header */
- if (s->stream.next_in[0] != gz_magic[0] ||
- s->stream.next_in[1] != gz_magic[1]) {
- s->transparent = 1;
- return;
- }
- s->stream.avail_in -= 2;
- s->stream.next_in += 2;
-
- /* Check the rest of the gzip header */
- method = get_byte(s);
- flags = get_byte(s);
- if (method != Z_DEFLATED || (flags & RESERVED) != 0) {
- s->z_err = Z_DATA_ERROR;
- return;
- }
-
- /* Discard time, xflags and OS code: */
- for (len = 0; len < 6; len++) (void)get_byte(s);
-
- if ((flags & EXTRA_FIELD) != 0) { /* skip the extra field */
- len = (uInt)get_byte(s);
- len += ((uInt)get_byte(s))<<8;
- /* len is garbage if EOF but the loop below will quit anyway */
- while (len-- != 0 && get_byte(s) != EOF) ;
- }
- if ((flags & ORIG_NAME) != 0) { /* skip the original file name */
- while ((c = get_byte(s)) != 0 && c != EOF) ;
- }
- if ((flags & COMMENT) != 0) { /* skip the .gz file comment */
- while ((c = get_byte(s)) != 0 && c != EOF) ;
- }
- if ((flags & HEAD_CRC) != 0) { /* skip the header crc */
- for (len = 0; len < 2; len++) (void)get_byte(s);
- }
- s->z_err = s->z_eof ? Z_DATA_ERROR : Z_OK;
-}
-
- /* ===========================================================================
- * Cleanup then free the given gz_stream. Return a zlib error code.
- Try freeing in the reverse order of allocations.
- */
-local int destroy (s)
- gz_stream *s;
-{
- int err = Z_OK;
-
- if (!s) return Z_STREAM_ERROR;
-
- TRYFREE(s->msg);
-
- if (s->stream.state != NULL) {
- if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
- err = Z_STREAM_ERROR;
-#else
- err = deflateEnd(&(s->stream));
-#endif
- } else if (s->mode == 'r') {
- err = inflateEnd(&(s->stream));
- }
- }
- if (s->file != NULL && fclose(s->file)) {
-#ifdef ESPIPE
- if (errno != ESPIPE) /* fclose is broken for pipes in HP/UX */
-#endif
- err = Z_ERRNO;
- }
- if (s->z_err < 0) err = s->z_err;
-
- TRYFREE(s->inbuf);
- TRYFREE(s->outbuf);
- TRYFREE(s->path);
- TRYFREE(s);
- return err;
-}
-
-/* ===========================================================================
- Reads the given number of uncompressed bytes from the compressed file.
- gzread returns the number of bytes actually read (0 for end of file).
-*/
-int Q_ZEXPORT gzread (file, buf, len)
- gzFile file;
- voidp buf;
- unsigned len;
-{
- gz_stream *s = (gz_stream*)file;
- Bytef *start = (Bytef*)buf; /* starting point for crc computation */
- Byte *next_out; /* == stream.next_out but not forced far (for MSDOS) */
-
- if (s == NULL || s->mode != 'r') return Z_STREAM_ERROR;
-
- if (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO) return -1;
- if (s->z_err == Z_STREAM_END) return 0; /* EOF */
-
- next_out = (Byte*)buf;
- s->stream.next_out = (Bytef*)buf;
- s->stream.avail_out = len;
-
- if (s->stream.avail_out && s->back != EOF) {
- *next_out++ = s->back;
- s->stream.next_out++;
- s->stream.avail_out--;
- s->back = EOF;
- s->out++;
- start++;
- if (s->last) {
- s->z_err = Z_STREAM_END;
- return 1;
- }
- }
-
- while (s->stream.avail_out != 0) {
-
- if (s->transparent) {
- /* Copy first the lookahead bytes: */
- uInt n = s->stream.avail_in;
- if (n > s->stream.avail_out) n = s->stream.avail_out;
- if (n > 0) {
- zmemcpy(s->stream.next_out, s->stream.next_in, n);
- next_out += n;
- s->stream.next_out = next_out;
- s->stream.next_in += n;
- s->stream.avail_out -= n;
- s->stream.avail_in -= n;
- }
- if (s->stream.avail_out > 0) {
- s->stream.avail_out -=
- (uInt)fread(next_out, 1, s->stream.avail_out, s->file);
- }
- len -= s->stream.avail_out;
- s->in += len;
- s->out += len;
- if (len == 0) s->z_eof = 1;
- return (int)len;
- }
- if (s->stream.avail_in == 0 && !s->z_eof) {
-
- errno = 0;
- s->stream.avail_in = (uInt)fread(s->inbuf, 1, Z_BUFSIZE, s->file);
- if (s->stream.avail_in == 0) {
- s->z_eof = 1;
- if (ferror(s->file)) {
- s->z_err = Z_ERRNO;
- break;
- }
- }
- s->stream.next_in = s->inbuf;
- }
- s->in += s->stream.avail_in;
- s->out += s->stream.avail_out;
- s->z_err = inflate(&(s->stream), Z_NO_FLUSH);
- s->in -= s->stream.avail_in;
- s->out -= s->stream.avail_out;
-
- if (s->z_err == Z_STREAM_END) {
- /* Check CRC and original size */
- s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
- start = s->stream.next_out;
-
- if (getLong(s) != s->crc) {
- s->z_err = Z_DATA_ERROR;
- } else {
- (void)getLong(s);
- /* The uncompressed length returned by above getlong() may be
- * different from s->out in case of concatenated .gz files.
- * Check for such files:
- */
- check_header(s);
- if (s->z_err == Z_OK) {
- inflateReset(&(s->stream));
- s->crc = crc32(0L, Z_NULL, 0);
- }
- }
- }
- if (s->z_err != Z_OK || s->z_eof) break;
- }
- s->crc = crc32(s->crc, start, (uInt)(s->stream.next_out - start));
-
- if (len == s->stream.avail_out &&
- (s->z_err == Z_DATA_ERROR || s->z_err == Z_ERRNO))
- return -1;
- return (int)(len - s->stream.avail_out);
-}
-
-
-/* ===========================================================================
- Reads one byte from the compressed file. gzgetc returns this byte
- or -1 in case of end of file or error.
-*/
-int ZEXPORT gzgetc(file)
- gzFile file;
-{
- unsigned char c;
-
- return gzread(file, &c, 1) == 1 ? c : -1;
-}
-
-
-/* ===========================================================================
- Push one byte back onto the stream.
-*/
-int ZEXPORT gzungetc(c, file)
- int c;
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'r' || c == EOF || s->back != EOF) return EOF;
- s->back = c;
- s->out--;
- s->last = (s->z_err == Z_STREAM_END);
- if (s->last) s->z_err = Z_OK;
- s->z_eof = 0;
- return c;
-}
-
-
-/* ===========================================================================
- Reads bytes from the compressed file until len-1 characters are
- read, or a newline character is read and transferred to buf, or an
- end-of-file condition is encountered. The string is then terminated
- with a null character.
- gzgets returns buf, or Z_NULL in case of error.
-
- The current implementation is not optimized at all.
-*/
-char * ZEXPORT gzgets(file, buf, len)
- gzFile file;
- char *buf;
- int len;
-{
- char *b = buf;
- if (buf == Z_NULL || len <= 0) return Z_NULL;
-
- while (--len > 0 && gzread(file, buf, 1) == 1 && *buf++ != '\n') ;
- *buf = '\0';
- return b == buf && len > 0 ? Z_NULL : b;
-}
-
-
-#ifndef NO_GZCOMPRESS
-/* ===========================================================================
- Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of bytes actually written (0 in case of error).
-*/
-int ZEXPORT gzwrite (file, buf, len)
- gzFile file;
- voidpc buf;
- unsigned len;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
- s->stream.next_in = (Bytef*)buf;
- s->stream.avail_in = len;
-
- while (s->stream.avail_in != 0) {
-
- if (s->stream.avail_out == 0) {
-
- s->stream.next_out = s->outbuf;
- if (fwrite(s->outbuf, 1, Z_BUFSIZE, s->file) != Z_BUFSIZE) {
- s->z_err = Z_ERRNO;
- break;
- }
- s->stream.avail_out = Z_BUFSIZE;
- }
- s->in += s->stream.avail_in;
- s->out += s->stream.avail_out;
- s->z_err = deflate(&(s->stream), Z_NO_FLUSH);
- s->in -= s->stream.avail_in;
- s->out -= s->stream.avail_out;
- if (s->z_err != Z_OK) break;
- }
- s->crc = crc32(s->crc, (const Bytef *)buf, len);
-
- return (int)(len - s->stream.avail_in);
-}
-
-
-/* ===========================================================================
- Converts, formats, and writes the args to the compressed file under
- control of the format string, as in fprintf. gzprintf returns the number of
- uncompressed bytes actually written (0 in case of error).
-*/
-#ifdef STDC
-#include <stdarg.h>
-
-int Q_ZEXPORT gzprintf (gzFile file, const char *format, /* args */ ...)
-{
- char buf[Z_PRINTF_BUFSIZE];
- va_list va;
- int len;
-
- buf[sizeof(buf) - 1] = 0;
- va_start(va, format);
-#ifdef NO_vsnprintf
-# ifdef HAS_vsprintf_void
- (void)vsprintf(buf, format, va);
- va_end(va);
- for (len = 0; len < sizeof(buf); len++)
- if (buf[len] == 0) break;
-# else
- len = vsprintf(buf, format, va);
- va_end(va);
-# endif
-#else
-# ifdef HAS_vsnprintf_void
- (void)vsnprintf(buf, sizeof(buf), format, va);
- va_end(va);
- len = strlen(buf);
-# else
- len = vsnprintf(buf, sizeof(buf), format, va);
- va_end(va);
-# endif
-#endif
- if (len <= 0 || len >= (int)sizeof(buf) || buf[sizeof(buf) - 1] != 0)
- return 0;
- return gzwrite(file, buf, (unsigned)len);
-}
-#else /* not ANSI C */
-
-int Q_ZEXPORT gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
- gzFile file;
- const char *format;
- int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
- a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
-{
- char buf[Z_PRINTF_BUFSIZE];
- int len;
-
- buf[sizeof(buf) - 1] = 0;
-#ifdef NO_snprintf
-# ifdef HAS_sprintf_void
- sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
- for (len = 0; len < sizeof(buf); len++)
- if (buf[len] == 0) break;
-# else
- len = sprintf(buf, format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-# endif
-#else
-# ifdef HAS_snprintf_void
- snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
- len = strlen(buf);
-# else
- len = snprintf(buf, sizeof(buf), format, a1, a2, a3, a4, a5, a6, a7, a8,
- a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
-# endif
-#endif
- if (len <= 0 || len >= sizeof(buf) || buf[sizeof(buf) - 1] != 0)
- return 0;
- return gzwrite(file, buf, len);
-}
-#endif
-
-/* ===========================================================================
- Writes c, converted to an unsigned char, into the compressed file.
- gzputc returns the value that was written, or -1 in case of error.
-*/
-int ZEXPORT gzputc(file, c)
- gzFile file;
- int c;
-{
- unsigned char cc = (unsigned char) c; /* required for big endian systems */
-
- return gzwrite(file, &cc, 1) == 1 ? (int)cc : -1;
-}
-
-
-/* ===========================================================================
- Writes the given null-terminated string to the compressed file, excluding
- the terminating null character.
- gzputs returns the number of characters written, or -1 in case of error.
-*/
-int ZEXPORT gzputs(file, s)
- gzFile file;
- const char *s;
-{
- return gzwrite(file, (char*)s, (unsigned)strlen(s));
-}
-
-
-/* ===========================================================================
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function.
-*/
-local int do_flush (file, flush)
- gzFile file;
- int flush;
-{
- uInt len;
- int done = 0;
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'w') return Z_STREAM_ERROR;
-
- s->stream.avail_in = 0; /* should be zero already anyway */
-
- for (;;) {
- len = Z_BUFSIZE - s->stream.avail_out;
-
- if (len != 0) {
- if ((uInt)fwrite(s->outbuf, 1, len, s->file) != len) {
- s->z_err = Z_ERRNO;
- return Z_ERRNO;
- }
- s->stream.next_out = s->outbuf;
- s->stream.avail_out = Z_BUFSIZE;
- }
- if (done) break;
- s->out += s->stream.avail_out;
- s->z_err = deflate(&(s->stream), flush);
- s->out -= s->stream.avail_out;
-
- /* Ignore the second of two consecutive flushes: */
- if (len == 0 && s->z_err == Z_BUF_ERROR) s->z_err = Z_OK;
-
- /* deflate has finished flushing only when it hasn't used up
- * all the available space in the output buffer:
- */
- done = (s->stream.avail_out != 0 || s->z_err == Z_STREAM_END);
-
- if (s->z_err != Z_OK && s->z_err != Z_STREAM_END) break;
- }
- return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-
-int ZEXPORT gzflush (file, flush)
- gzFile file;
- int flush;
-{
- gz_stream *s = (gz_stream*)file;
- int err = do_flush (file, flush);
-
- if (err) return err;
- fflush(s->file);
- return s->z_err == Z_STREAM_END ? Z_OK : s->z_err;
-}
-#endif /* NO_GZCOMPRESS */
-
-/* ===========================================================================
- Sets the starting position for the next gzread or gzwrite on the given
- compressed file. The offset represents a number of bytes in the
- gzseek returns the resulting offset location as measured in bytes from
- the beginning of the uncompressed stream, or -1 in case of error.
- SEEK_END is not implemented, returns error.
- In this version of the library, gzseek can be extremely slow.
-*/
-z_off_t ZEXPORT gzseek (file, offset, whence)
- gzFile file;
- z_off_t offset;
- int whence;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || whence == SEEK_END ||
- s->z_err == Z_ERRNO || s->z_err == Z_DATA_ERROR) {
- return -1L;
- }
-
- if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
- return -1L;
-#else
- if (whence == SEEK_SET) {
- offset -= s->in;
- }
- if (offset < 0) return -1L;
-
- /* At this point, offset is the number of zero bytes to write. */
- if (s->inbuf == Z_NULL) {
- s->inbuf = (Byte*)ALLOC(Z_BUFSIZE); /* for seeking */
- if (s->inbuf == Z_NULL) return -1L;
- zmemzero(s->inbuf, Z_BUFSIZE);
- }
- while (offset > 0) {
- uInt size = Z_BUFSIZE;
- if (offset < Z_BUFSIZE) size = (uInt)offset;
-
- size = gzwrite(file, s->inbuf, size);
- if (size == 0) return -1L;
-
- offset -= size;
- }
- return s->in;
-#endif
- }
- /* Rest of function is for reading only */
-
- /* compute absolute position */
- if (whence == SEEK_CUR) {
- offset += s->out;
- }
- if (offset < 0) return -1L;
-
- if (s->transparent) {
- /* map to fseek */
- s->back = EOF;
- s->stream.avail_in = 0;
- s->stream.next_in = s->inbuf;
- if (fseek(s->file, offset, SEEK_SET) < 0) return -1L;
-
- s->in = s->out = offset;
- return offset;
- }
-
- /* For a negative seek, rewind and use positive seek */
- if (offset >= s->out) {
- offset -= s->out;
- } else if (gzrewind(file) < 0) {
- return -1L;
- }
- /* offset is now the number of bytes to skip. */
-
- if (offset != 0 && s->outbuf == Z_NULL) {
- s->outbuf = (Byte*)ALLOC(Z_BUFSIZE);
- if (s->outbuf == Z_NULL) return -1L;
- }
- if (offset && s->back != EOF) {
- s->back = EOF;
- s->out++;
- offset--;
- if (s->last) s->z_err = Z_STREAM_END;
- }
- while (offset > 0) {
- int size = Z_BUFSIZE;
- if (offset < Z_BUFSIZE) size = (int)offset;
-
- size = gzread(file, s->outbuf, (uInt)size);
- if (size <= 0) return -1L;
- offset -= size;
- }
- return s->out;
-}
-
-/* ===========================================================================
- Rewinds input file.
-*/
-int ZEXPORT gzrewind (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'r') return -1;
-
- s->z_err = Z_OK;
- s->z_eof = 0;
- s->back = EOF;
- s->stream.avail_in = 0;
- s->stream.next_in = s->inbuf;
- s->crc = crc32(0L, Z_NULL, 0);
- if (!s->transparent) (void)inflateReset(&s->stream);
- s->in = 0;
- s->out = 0;
- return fseek(s->file, s->start, SEEK_SET);
-}
-
-/* ===========================================================================
- Returns the starting position for the next gzread or gzwrite on the
- given compressed file. This position represents a number of bytes in the
- uncompressed data stream.
-*/
-z_off_t ZEXPORT gztell (file)
- gzFile file;
-{
- return gzseek(file, 0L, SEEK_CUR);
-}
-
-/* ===========================================================================
- Returns 1 when EOF has previously been detected reading the given
- input stream, otherwise zero.
-*/
-int ZEXPORT gzeof (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- /* With concatenated compressed files that can have embedded
- * crc trailers, z_eof is no longer the only/best indicator of EOF
- * on a gz_stream. Handle end-of-stream error explicitly here.
- */
- if (s == NULL || s->mode != 'r') return 0;
- if (s->z_eof) return 1;
- return s->z_err == Z_STREAM_END;
-}
-
-/* ===========================================================================
- Returns 1 if reading and doing so transparently, otherwise zero.
-*/
-int ZEXPORT gzdirect (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL || s->mode != 'r') return 0;
- return s->transparent;
-}
-
-/* ===========================================================================
- Outputs a long in LSB order to the given file
-*/
-local void putLong (file, x)
- FILE *file;
- uLong x;
-{
- int n;
- for (n = 0; n < 4; n++) {
- fputc((int)(x & 0xff), file);
- x >>= 8;
- }
-}
-
-/* ===========================================================================
- Reads a long in LSB order from the given gz_stream. Sets z_err in case
- of error.
-*/
-local uLong getLong (s)
- gz_stream *s;
-{
- uLong x = (uLong)get_byte(s);
- int c;
-
- x += ((uLong)get_byte(s))<<8;
- x += ((uLong)get_byte(s))<<16;
- c = get_byte(s);
- if (c == EOF) s->z_err = Z_DATA_ERROR;
- x += ((uLong)c)<<24;
- return x;
-}
-
-/* ===========================================================================
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state.
-*/
-int Q_ZEXPORT gzclose (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL) return Z_STREAM_ERROR;
-
- if (s->mode == 'w') {
-#ifdef NO_GZCOMPRESS
- return Z_STREAM_ERROR;
-#else
- if (do_flush (file, Z_FINISH) != Z_OK)
- return destroy((gz_stream*)file);
-
- putLong (s->file, s->crc);
- putLong (s->file, (uLong)(s->in & 0xffffffff));
-#endif
- }
- return destroy((gz_stream*)file);
-}
-
-#if defined(STDC) && !defined(_WIN32_WCE)
-# define zstrerror(errnum) strerror(errnum)
-#else
-# define zstrerror(errnum) ""
-#endif
-
-/* ===========================================================================
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
-*/
-const char * ZEXPORT gzerror (file, errnum)
- gzFile file;
- int *errnum;
-{
- char *m;
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL) {
- *errnum = Z_STREAM_ERROR;
- return (const char*)ERR_MSG(Z_STREAM_ERROR);
- }
- *errnum = s->z_err;
- if (*errnum == Z_OK) return (const char*)"";
-
- m = (char*)(*errnum == Z_ERRNO ? zstrerror(errno) : s->stream.msg);
-
- if (m == NULL || *m == '\0') m = (char*)ERR_MSG(s->z_err);
-
- TRYFREE(s->msg);
- s->msg = (char*)ALLOC(strlen(s->path) + strlen(m) + 3);
- if (s->msg == Z_NULL) return (const char*)ERR_MSG(Z_MEM_ERROR);
- strcpy(s->msg, s->path);
- strcat(s->msg, ": ");
- strcat(s->msg, m);
- return (const char*)s->msg;
-}
-
-/* ===========================================================================
- Clear the error and end-of-file flags, and do the same for the real file.
-*/
-void ZEXPORT gzclearerr (file)
- gzFile file;
-{
- gz_stream *s = (gz_stream*)file;
-
- if (s == NULL) return;
- if (s->z_err != Z_STREAM_END) s->z_err = Z_OK;
- s->z_eof = 0;
- clearerr(s->file);
-}
diff --git a/src/3rdparty/zlib/gzlib.c b/src/3rdparty/zlib/gzlib.c
new file mode 100644
index 0000000..603e60e
--- /dev/null
+++ b/src/3rdparty/zlib/gzlib.c
@@ -0,0 +1,537 @@
+/* gzlib.c -- zlib functions common to reading and writing gzip files
+ * Copyright (C) 2004, 2010 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "gzguts.h"
+
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+# define LSEEK lseek64
+#else
+# define LSEEK lseek
+#endif
+
+/* Local functions */
+local void gz_reset OF((gz_statep));
+local gzFile gz_open OF((const char *, int, const char *));
+
+#if defined UNDER_CE
+
+/* Map the Windows error number in ERROR to a locale-dependent error message
+ string and return a pointer to it. Typically, the values for ERROR come
+ from GetLastError.
+
+ The string pointed to shall not be modified by the application, but may be
+ overwritten by a subsequent call to gz_strwinerror
+
+ The gz_strwinerror function does not change the current setting of
+ GetLastError. */
+char ZLIB_INTERNAL *gz_strwinerror (error)
+ DWORD error;
+{
+ static char buf[1024];
+
+ wchar_t *msgbuf;
+ DWORD lasterr = GetLastError();
+ DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
+ | FORMAT_MESSAGE_ALLOCATE_BUFFER,
+ NULL,
+ error,
+ 0, /* Default language */
+ (LPVOID)&msgbuf,
+ 0,
+ NULL);
+ if (chars != 0) {
+ /* If there is an \r\n appended, zap it. */
+ if (chars >= 2
+ && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') {
+ chars -= 2;
+ msgbuf[chars] = 0;
+ }
+
+ if (chars > sizeof (buf) - 1) {
+ chars = sizeof (buf) - 1;
+ msgbuf[chars] = 0;
+ }
+
+ wcstombs(buf, msgbuf, chars + 1);
+ LocalFree(msgbuf);
+ }
+ else {
+ sprintf(buf, "unknown win32 error (%ld)", error);
+ }
+
+ SetLastError(lasterr);
+ return buf;
+}
+
+#endif /* UNDER_CE */
+
+/* Reset gzip file state */
+local void gz_reset(state)
+ gz_statep state;
+{
+ if (state->mode == GZ_READ) { /* for reading ... */
+ state->have = 0; /* no output data available */
+ state->eof = 0; /* not at end of file */
+ state->how = LOOK; /* look for gzip header */
+ state->direct = 1; /* default for empty file */
+ }
+ state->seek = 0; /* no seek request pending */
+ gz_error(state, Z_OK, NULL); /* clear error */
+ state->pos = 0; /* no uncompressed data yet */
+ state->strm.avail_in = 0; /* no input data yet */
+}
+
+/* Open a gzip file either by name or file descriptor. */
+local gzFile gz_open(path, fd, mode)
+ const char *path;
+ int fd;
+ const char *mode;
+{
+ gz_statep state;
+
+ /* allocate gzFile structure to return */
+ state = malloc(sizeof(gz_state));
+ if (state == NULL)
+ return NULL;
+ state->size = 0; /* no buffers allocated yet */
+ state->want = GZBUFSIZE; /* requested buffer size */
+ state->msg = NULL; /* no error message yet */
+
+ /* interpret mode */
+ state->mode = GZ_NONE;
+ state->level = Z_DEFAULT_COMPRESSION;
+ state->strategy = Z_DEFAULT_STRATEGY;
+ while (*mode) {
+ if (*mode >= '0' && *mode <= '9')
+ state->level = *mode - '0';
+ else
+ switch (*mode) {
+ case 'r':
+ state->mode = GZ_READ;
+ break;
+#ifndef NO_GZCOMPRESS
+ case 'w':
+ state->mode = GZ_WRITE;
+ break;
+ case 'a':
+ state->mode = GZ_APPEND;
+ break;
+#endif
+ case '+': /* can't read and write at the same time */
+ free(state);
+ return NULL;
+ case 'b': /* ignore -- will request binary anyway */
+ break;
+ case 'f':
+ state->strategy = Z_FILTERED;
+ break;
+ case 'h':
+ state->strategy = Z_HUFFMAN_ONLY;
+ break;
+ case 'R':
+ state->strategy = Z_RLE;
+ break;
+ case 'F':
+ state->strategy = Z_FIXED;
+ default: /* could consider as an error, but just ignore */
+ ;
+ }
+ mode++;
+ }
+
+ /* must provide an "r", "w", or "a" */
+ if (state->mode == GZ_NONE) {
+ free(state);
+ return NULL;
+ }
+
+ /* save the path name for error messages */
+ state->path = malloc(strlen(path) + 1);
+ if (state->path == NULL) {
+ free(state);
+ return NULL;
+ }
+ strcpy(state->path, path);
+
+ /* open the file with the appropriate mode (or just use fd) */
+ state->fd = fd != -1 ? fd :
+ open(path,
+#ifdef O_LARGEFILE
+ O_LARGEFILE |
+#endif
+#ifdef O_BINARY
+ O_BINARY |
+#endif
+ (state->mode == GZ_READ ?
+ O_RDONLY :
+ (O_WRONLY | O_CREAT | (
+ state->mode == GZ_WRITE ?
+ O_TRUNC :
+ O_APPEND))),
+ 0666);
+ if (state->fd == -1) {
+ free(state->path);
+ free(state);
+ return NULL;
+ }
+ if (state->mode == GZ_APPEND)
+ state->mode = GZ_WRITE; /* simplify later checks */
+
+ /* save the current position for rewinding (only if reading) */
+ if (state->mode == GZ_READ) {
+ state->start = LSEEK(state->fd, 0, SEEK_CUR);
+ if (state->start == -1) state->start = 0;
+ }
+
+ /* initialize stream */
+ gz_reset(state);
+
+ /* return stream */
+ return (gzFile)state;
+}
+
+/* -- see zlib.h -- */
+gzFile ZEXPORT gzopen(path, mode)
+ const char *path;
+ const char *mode;
+{
+ return gz_open(path, -1, mode);
+}
+
+/* -- see zlib.h -- */
+gzFile ZEXPORT gzopen64(path, mode)
+ const char *path;
+ const char *mode;
+{
+ return gz_open(path, -1, mode);
+}
+
+/* -- see zlib.h -- */
+gzFile ZEXPORT gzdopen(fd, mode)
+ int fd;
+ const char *mode;
+{
+ char *path; /* identifier for error messages */
+ gzFile gz;
+
+ if (fd == -1 || (path = malloc(7 + 3 * sizeof(int))) == NULL)
+ return NULL;
+ sprintf(path, "<fd:%d>", fd); /* for debugging */
+ gz = gz_open(path, fd, mode);
+ free(path);
+ return gz;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzbuffer(file, size)
+ gzFile file;
+ unsigned size;
+{
+ gz_statep state;
+
+ /* get internal structure and check integrity */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+ if (state->mode != GZ_READ && state->mode != GZ_WRITE)
+ return -1;
+
+ /* make sure we haven't already allocated memory */
+ if (state->size != 0)
+ return -1;
+
+ /* check and set requested size */
+ if (size == 0)
+ return -1;
+ state->want = size;
+ return 0;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzrewind(file)
+ gzFile file;
+{
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+
+ /* check that we're reading and that there's no error */
+ if (state->mode != GZ_READ || state->err != Z_OK)
+ return -1;
+
+ /* back up and start over */
+ if (LSEEK(state->fd, state->start, SEEK_SET) == -1)
+ return -1;
+ gz_reset(state);
+ return 0;
+}
+
+/* -- see zlib.h -- */
+z_off64_t ZEXPORT gzseek64(file, offset, whence)
+ gzFile file;
+ z_off64_t offset;
+ int whence;
+{
+ unsigned n;
+ z_off64_t ret;
+ gz_statep state;
+
+ /* get internal structure and check integrity */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+ if (state->mode != GZ_READ && state->mode != GZ_WRITE)
+ return -1;
+
+ /* check that there's no error */
+ if (state->err != Z_OK)
+ return -1;
+
+ /* can only seek from start or relative to current position */
+ if (whence != SEEK_SET && whence != SEEK_CUR)
+ return -1;
+
+ /* normalize offset to a SEEK_CUR specification */
+ if (whence == SEEK_SET)
+ offset -= state->pos;
+ else if (state->seek)
+ offset += state->skip;
+ state->seek = 0;
+
+ /* if within raw area while reading, just go there */
+ if (state->mode == GZ_READ && state->how == COPY &&
+ state->pos + offset >= state->raw) {
+ ret = LSEEK(state->fd, offset - state->have, SEEK_CUR);
+ if (ret == -1)
+ return -1;
+ state->have = 0;
+ state->eof = 0;
+ state->seek = 0;
+ gz_error(state, Z_OK, NULL);
+ state->strm.avail_in = 0;
+ state->pos += offset;
+ return state->pos;
+ }
+
+ /* calculate skip amount, rewinding if needed for back seek when reading */
+ if (offset < 0) {
+ if (state->mode != GZ_READ) /* writing -- can't go backwards */
+ return -1;
+ offset += state->pos;
+ if (offset < 0) /* before start of file! */
+ return -1;
+ if (gzrewind(file) == -1) /* rewind, then skip to offset */
+ return -1;
+ }
+
+ /* if reading, skip what's in output buffer (one less gzgetc() check) */
+ if (state->mode == GZ_READ) {
+ n = GT_OFF(state->have) || (z_off64_t)state->have > offset ?
+ (unsigned)offset : state->have;
+ state->have -= n;
+ state->next += n;
+ state->pos += n;
+ offset -= n;
+ }
+
+ /* request skip (if not zero) */
+ if (offset) {
+ state->seek = 1;
+ state->skip = offset;
+ }
+ return state->pos + offset;
+}
+
+/* -- see zlib.h -- */
+z_off_t ZEXPORT gzseek(file, offset, whence)
+ gzFile file;
+ z_off_t offset;
+ int whence;
+{
+ z_off64_t ret;
+
+ ret = gzseek64(file, (z_off64_t)offset, whence);
+ return ret == (z_off_t)ret ? (z_off_t)ret : -1;
+}
+
+/* -- see zlib.h -- */
+z_off64_t ZEXPORT gztell64(file)
+ gzFile file;
+{
+ gz_statep state;
+
+ /* get internal structure and check integrity */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+ if (state->mode != GZ_READ && state->mode != GZ_WRITE)
+ return -1;
+
+ /* return position */
+ return state->pos + (state->seek ? state->skip : 0);
+}
+
+/* -- see zlib.h -- */
+z_off_t ZEXPORT gztell(file)
+ gzFile file;
+{
+ z_off64_t ret;
+
+ ret = gztell64(file);
+ return ret == (z_off_t)ret ? (z_off_t)ret : -1;
+}
+
+/* -- see zlib.h -- */
+z_off64_t ZEXPORT gzoffset64(file)
+ gzFile file;
+{
+ z_off64_t offset;
+ gz_statep state;
+
+ /* get internal structure and check integrity */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+ if (state->mode != GZ_READ && state->mode != GZ_WRITE)
+ return -1;
+
+ /* compute and return effective offset in file */
+ offset = LSEEK(state->fd, 0, SEEK_CUR);
+ if (offset == -1)
+ return -1;
+ if (state->mode == GZ_READ) /* reading */
+ offset -= state->strm.avail_in; /* don't count buffered input */
+ return offset;
+}
+
+/* -- see zlib.h -- */
+z_off_t ZEXPORT gzoffset(file)
+ gzFile file;
+{
+ z_off64_t ret;
+
+ ret = gzoffset64(file);
+ return ret == (z_off_t)ret ? (z_off_t)ret : -1;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzeof(file)
+ gzFile file;
+{
+ gz_statep state;
+
+ /* get internal structure and check integrity */
+ if (file == NULL)
+ return 0;
+ state = (gz_statep)file;
+ if (state->mode != GZ_READ && state->mode != GZ_WRITE)
+ return 0;
+
+ /* return end-of-file state */
+ return state->mode == GZ_READ ?
+ (state->eof && state->strm.avail_in == 0 && state->have == 0) : 0;
+}
+
+/* -- see zlib.h -- */
+const char * ZEXPORT gzerror(file, errnum)
+ gzFile file;
+ int *errnum;
+{
+ gz_statep state;
+
+ /* get internal structure and check integrity */
+ if (file == NULL)
+ return NULL;
+ state = (gz_statep)file;
+ if (state->mode != GZ_READ && state->mode != GZ_WRITE)
+ return NULL;
+
+ /* return error information */
+ if (errnum != NULL)
+ *errnum = state->err;
+ return state->msg == NULL ? "" : state->msg;
+}
+
+/* -- see zlib.h -- */
+void ZEXPORT gzclearerr(file)
+ gzFile file;
+{
+ gz_statep state;
+
+ /* get internal structure and check integrity */
+ if (file == NULL)
+ return;
+ state = (gz_statep)file;
+ if (state->mode != GZ_READ && state->mode != GZ_WRITE)
+ return;
+
+ /* clear error and end-of-file */
+ if (state->mode == GZ_READ)
+ state->eof = 0;
+ gz_error(state, Z_OK, NULL);
+}
+
+/* Create an error message in allocated memory and set state->err and
+ state->msg accordingly. Free any previous error message already there. Do
+ not try to free or allocate space if the error is Z_MEM_ERROR (out of
+ memory). Simply save the error message as a static string. If there is an
+ allocation failure constructing the error message, then convert the error to
+ out of memory. */
+void ZLIB_INTERNAL gz_error(state, err, msg)
+ gz_statep state;
+ int err;
+ const char *msg;
+{
+ /* free previously allocated message and clear */
+ if (state->msg != NULL) {
+ if (state->err != Z_MEM_ERROR)
+ free(state->msg);
+ state->msg = NULL;
+ }
+
+ /* set error code, and if no message, then done */
+ state->err = err;
+ if (msg == NULL)
+ return;
+
+ /* for an out of memory error, save as static string */
+ if (err == Z_MEM_ERROR) {
+ state->msg = (char *)msg;
+ return;
+ }
+
+ /* construct error message with path */
+ if ((state->msg = malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) {
+ state->err = Z_MEM_ERROR;
+ state->msg = (char *)"out of memory";
+ return;
+ }
+ strcpy(state->msg, state->path);
+ strcat(state->msg, ": ");
+ strcat(state->msg, msg);
+ return;
+}
+
+#ifndef INT_MAX
+/* portably return maximum value for an int (when limits.h presumed not
+ available) -- we need to do this to cover cases where 2's complement not
+ used, since C standard permits 1's complement and sign-bit representations,
+ otherwise we could just use ((unsigned)-1) >> 1 */
+unsigned ZLIB_INTERNAL gz_intmax()
+{
+ unsigned p, q;
+
+ p = 1;
+ do {
+ q = p;
+ p <<= 1;
+ p++;
+ } while (p > q);
+ return q >> 1;
+}
+#endif
diff --git a/src/3rdparty/zlib/gzread.c b/src/3rdparty/zlib/gzread.c
new file mode 100644
index 0000000..548201a
--- /dev/null
+++ b/src/3rdparty/zlib/gzread.c
@@ -0,0 +1,653 @@
+/* gzread.c -- zlib functions for reading gzip files
+ * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "gzguts.h"
+
+/* Local functions */
+local int gz_load OF((gz_statep, unsigned char *, unsigned, unsigned *));
+local int gz_avail OF((gz_statep));
+local int gz_next4 OF((gz_statep, unsigned long *));
+local int gz_head OF((gz_statep));
+local int gz_decomp OF((gz_statep));
+local int gz_make OF((gz_statep));
+local int gz_skip OF((gz_statep, z_off64_t));
+
+/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
+ state->fd, and update state->eof, state->err, and state->msg as appropriate.
+ This function needs to loop on read(), since read() is not guaranteed to
+ read the number of bytes requested, depending on the type of descriptor. */
+local int gz_load(state, buf, len, have)
+ gz_statep state;
+ unsigned char *buf;
+ unsigned len;
+ unsigned *have;
+{
+ int ret;
+
+ *have = 0;
+ do {
+ ret = read(state->fd, buf + *have, len - *have);
+ if (ret <= 0)
+ break;
+ *have += ret;
+ } while (*have < len);
+ if (ret < 0) {
+ gz_error(state, Z_ERRNO, zstrerror());
+ return -1;
+ }
+ if (ret == 0)
+ state->eof = 1;
+ return 0;
+}
+
+/* Load up input buffer and set eof flag if last data loaded -- return -1 on
+ error, 0 otherwise. Note that the eof flag is set when the end of the input
+ file is reached, even though there may be unused data in the buffer. Once
+ that data has been used, no more attempts will be made to read the file.
+ gz_avail() assumes that strm->avail_in == 0. */
+local int gz_avail(state)
+ gz_statep state;
+{
+ z_streamp strm = &(state->strm);
+
+ if (state->err != Z_OK)
+ return -1;
+ if (state->eof == 0) {
+ if (gz_load(state, state->in, state->size,
+ (unsigned *)&(strm->avail_in)) == -1)
+ return -1;
+ strm->next_in = state->in;
+ }
+ return 0;
+}
+
+/* Get next byte from input, or -1 if end or error. */
+#define NEXT() ((strm->avail_in == 0 && gz_avail(state) == -1) ? -1 : \
+ (strm->avail_in == 0 ? -1 : \
+ (strm->avail_in--, *(strm->next_in)++)))
+
+/* Get a four-byte little-endian integer and return 0 on success and the value
+ in *ret. Otherwise -1 is returned and *ret is not modified. */
+local int gz_next4(state, ret)
+ gz_statep state;
+ unsigned long *ret;
+{
+ int ch;
+ unsigned long val;
+ z_streamp strm = &(state->strm);
+
+ val = NEXT();
+ val += (unsigned)NEXT() << 8;
+ val += (unsigned long)NEXT() << 16;
+ ch = NEXT();
+ if (ch == -1)
+ return -1;
+ val += (unsigned long)ch << 24;
+ *ret = val;
+ return 0;
+}
+
+/* Look for gzip header, set up for inflate or copy. state->have must be zero.
+ If this is the first time in, allocate required memory. state->how will be
+ left unchanged if there is no more input data available, will be set to COPY
+ if there is no gzip header and direct copying will be performed, or it will
+ be set to GZIP for decompression, and the gzip header will be skipped so
+ that the next available input data is the raw deflate stream. If direct
+ copying, then leftover input data from the input buffer will be copied to
+ the output buffer. In that case, all further file reads will be directly to
+ either the output buffer or a user buffer. If decompressing, the inflate
+ state and the check value will be initialized. gz_head() will return 0 on
+ success or -1 on failure. Failures may include read errors or gzip header
+ errors. */
+local int gz_head(state)
+ gz_statep state;
+{
+ z_streamp strm = &(state->strm);
+ int flags;
+ unsigned len;
+
+ /* allocate read buffers and inflate memory */
+ if (state->size == 0) {
+ /* allocate buffers */
+ state->in = malloc(state->want);
+ state->out = malloc(state->want << 1);
+ if (state->in == NULL || state->out == NULL) {
+ if (state->out != NULL)
+ free(state->out);
+ if (state->in != NULL)
+ free(state->in);
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
+ state->size = state->want;
+
+ /* allocate inflate memory */
+ state->strm.zalloc = Z_NULL;
+ state->strm.zfree = Z_NULL;
+ state->strm.opaque = Z_NULL;
+ state->strm.avail_in = 0;
+ state->strm.next_in = Z_NULL;
+ if (inflateInit2(&(state->strm), -15) != Z_OK) { /* raw inflate */
+ free(state->out);
+ free(state->in);
+ state->size = 0;
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
+ }
+
+ /* get some data in the input buffer */
+ if (strm->avail_in == 0) {
+ if (gz_avail(state) == -1)
+ return -1;
+ if (strm->avail_in == 0)
+ return 0;
+ }
+
+ /* look for the gzip magic header bytes 31 and 139 */
+ if (strm->next_in[0] == 31) {
+ strm->avail_in--;
+ strm->next_in++;
+ if (strm->avail_in == 0 && gz_avail(state) == -1)
+ return -1;
+ if (strm->avail_in && strm->next_in[0] == 139) {
+ /* we have a gzip header, woo hoo! */
+ strm->avail_in--;
+ strm->next_in++;
+
+ /* skip rest of header */
+ if (NEXT() != 8) { /* compression method */
+ gz_error(state, Z_DATA_ERROR, "unknown compression method");
+ return -1;
+ }
+ flags = NEXT();
+ if (flags & 0xe0) { /* reserved flag bits */
+ gz_error(state, Z_DATA_ERROR, "unknown header flags set");
+ return -1;
+ }
+ NEXT(); /* modification time */
+ NEXT();
+ NEXT();
+ NEXT();
+ NEXT(); /* extra flags */
+ NEXT(); /* operating system */
+ if (flags & 4) { /* extra field */
+ len = (unsigned)NEXT();
+ len += (unsigned)NEXT() << 8;
+ while (len--)
+ if (NEXT() < 0)
+ break;
+ }
+ if (flags & 8) /* file name */
+ while (NEXT() > 0)
+ ;
+ if (flags & 16) /* comment */
+ while (NEXT() > 0)
+ ;
+ if (flags & 2) { /* header crc */
+ NEXT();
+ NEXT();
+ }
+ /* an unexpected end of file is not checked for here -- it will be
+ noticed on the first request for uncompressed data */
+
+ /* set up for decompression */
+ inflateReset(strm);
+ strm->adler = crc32(0L, Z_NULL, 0);
+ state->how = GZIP;
+ state->direct = 0;
+ return 0;
+ }
+ else {
+ /* not a gzip file -- save first byte (31) and fall to raw i/o */
+ state->out[0] = 31;
+ state->have = 1;
+ }
+ }
+
+ /* doing raw i/o, save start of raw data for seeking, copy any leftover
+ input to output -- this assumes that the output buffer is larger than
+ the input buffer, which also assures space for gzungetc() */
+ state->raw = state->pos;
+ state->next = state->out;
+ if (strm->avail_in) {
+ memcpy(state->next + state->have, strm->next_in, strm->avail_in);
+ state->have += strm->avail_in;
+ strm->avail_in = 0;
+ }
+ state->how = COPY;
+ state->direct = 1;
+ return 0;
+}
+
+/* Decompress from input to the provided next_out and avail_out in the state.
+ If the end of the compressed data is reached, then verify the gzip trailer
+ check value and length (modulo 2^32). state->have and state->next are set
+ to point to the just decompressed data, and the crc is updated. If the
+ trailer is verified, state->how is reset to LOOK to look for the next gzip
+ stream or raw data, once state->have is depleted. Returns 0 on success, -1
+ on failure. Failures may include invalid compressed data or a failed gzip
+ trailer verification. */
+local int gz_decomp(state)
+ gz_statep state;
+{
+ int ret;
+ unsigned had;
+ unsigned long crc, len;
+ z_streamp strm = &(state->strm);
+
+ /* fill output buffer up to end of deflate stream */
+ had = strm->avail_out;
+ do {
+ /* get more input for inflate() */
+ if (strm->avail_in == 0 && gz_avail(state) == -1)
+ return -1;
+ if (strm->avail_in == 0) {
+ gz_error(state, Z_DATA_ERROR, "unexpected end of file");
+ return -1;
+ }
+
+ /* decompress and handle errors */
+ ret = inflate(strm, Z_NO_FLUSH);
+ if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) {
+ gz_error(state, Z_STREAM_ERROR,
+ "internal error: inflate stream corrupt");
+ return -1;
+ }
+ if (ret == Z_MEM_ERROR) {
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
+ if (ret == Z_DATA_ERROR) { /* deflate stream invalid */
+ gz_error(state, Z_DATA_ERROR,
+ strm->msg == NULL ? "compressed data error" : strm->msg);
+ return -1;
+ }
+ } while (strm->avail_out && ret != Z_STREAM_END);
+
+ /* update available output and crc check value */
+ state->have = had - strm->avail_out;
+ state->next = strm->next_out - state->have;
+ strm->adler = crc32(strm->adler, state->next, state->have);
+
+ /* check gzip trailer if at end of deflate stream */
+ if (ret == Z_STREAM_END) {
+ if (gz_next4(state, &crc) == -1 || gz_next4(state, &len) == -1) {
+ gz_error(state, Z_DATA_ERROR, "unexpected end of file");
+ return -1;
+ }
+ if (crc != strm->adler) {
+ gz_error(state, Z_DATA_ERROR, "incorrect data check");
+ return -1;
+ }
+ if (len != (strm->total_out & 0xffffffffL)) {
+ gz_error(state, Z_DATA_ERROR, "incorrect length check");
+ return -1;
+ }
+ state->how = LOOK; /* ready for next stream, once have is 0 (leave
+ state->direct unchanged to remember how) */
+ }
+
+ /* good decompression */
+ return 0;
+}
+
+/* Make data and put in the output buffer. Assumes that state->have == 0.
+ Data is either copied from the input file or decompressed from the input
+ file depending on state->how. If state->how is LOOK, then a gzip header is
+ looked for (and skipped if found) to determine wither to copy or decompress.
+ Returns -1 on error, otherwise 0. gz_make() will leave state->have as COPY
+ or GZIP unless the end of the input file has been reached and all data has
+ been processed. */
+local int gz_make(state)
+ gz_statep state;
+{
+ z_streamp strm = &(state->strm);
+
+ if (state->how == LOOK) { /* look for gzip header */
+ if (gz_head(state) == -1)
+ return -1;
+ if (state->have) /* got some data from gz_head() */
+ return 0;
+ }
+ if (state->how == COPY) { /* straight copy */
+ if (gz_load(state, state->out, state->size << 1, &(state->have)) == -1)
+ return -1;
+ state->next = state->out;
+ }
+ else if (state->how == GZIP) { /* decompress */
+ strm->avail_out = state->size << 1;
+ strm->next_out = state->out;
+ if (gz_decomp(state) == -1)
+ return -1;
+ }
+ return 0;
+}
+
+/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */
+local int gz_skip(state, len)
+ gz_statep state;
+ z_off64_t len;
+{
+ unsigned n;
+
+ /* skip over len bytes or reach end-of-file, whichever comes first */
+ while (len)
+ /* skip over whatever is in output buffer */
+ if (state->have) {
+ n = GT_OFF(state->have) || (z_off64_t)state->have > len ?
+ (unsigned)len : state->have;
+ state->have -= n;
+ state->next += n;
+ state->pos += n;
+ len -= n;
+ }
+
+ /* output buffer empty -- return if we're at the end of the input */
+ else if (state->eof && state->strm.avail_in == 0)
+ break;
+
+ /* need more data to skip -- load up output buffer */
+ else {
+ /* get more output, looking for header if required */
+ if (gz_make(state) == -1)
+ return -1;
+ }
+ return 0;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzread(file, buf, len)
+ gzFile file;
+ voidp buf;
+ unsigned len;
+{
+ unsigned got, n;
+ gz_statep state;
+ z_streamp strm;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+ strm = &(state->strm);
+
+ /* check that we're reading and that there's no error */
+ if (state->mode != GZ_READ || state->err != Z_OK)
+ return -1;
+
+ /* since an int is returned, make sure len fits in one, otherwise return
+ with an error (this avoids the flaw in the interface) */
+ if ((int)len < 0) {
+ gz_error(state, Z_BUF_ERROR, "requested length does not fit in int");
+ return -1;
+ }
+
+ /* if len is zero, avoid unnecessary operations */
+ if (len == 0)
+ return 0;
+
+ /* process a skip request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_skip(state, state->skip) == -1)
+ return -1;
+ }
+
+ /* get len bytes to buf, or less than len if at the end */
+ got = 0;
+ do {
+ /* first just try copying data from the output buffer */
+ if (state->have) {
+ n = state->have > len ? len : state->have;
+ memcpy(buf, state->next, n);
+ state->next += n;
+ state->have -= n;
+ }
+
+ /* output buffer empty -- return if we're at the end of the input */
+ else if (state->eof && strm->avail_in == 0)
+ break;
+
+ /* need output data -- for small len or new stream load up our output
+ buffer */
+ else if (state->how == LOOK || len < (state->size << 1)) {
+ /* get more output, looking for header if required */
+ if (gz_make(state) == -1)
+ return -1;
+ continue; /* no progress yet -- go back to memcpy() above */
+ /* the copy above assures that we will leave with space in the
+ output buffer, allowing at least one gzungetc() to succeed */
+ }
+
+ /* large len -- read directly into user buffer */
+ else if (state->how == COPY) { /* read directly */
+ if (gz_load(state, buf, len, &n) == -1)
+ return -1;
+ }
+
+ /* large len -- decompress directly into user buffer */
+ else { /* state->how == GZIP */
+ strm->avail_out = len;
+ strm->next_out = buf;
+ if (gz_decomp(state) == -1)
+ return -1;
+ n = state->have;
+ state->have = 0;
+ }
+
+ /* update progress */
+ len -= n;
+ buf = (char *)buf + n;
+ got += n;
+ state->pos += n;
+ } while (len);
+
+ /* return number of bytes read into user buffer (will fit in int) */
+ return (int)got;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzgetc(file)
+ gzFile file;
+{
+ int ret;
+ unsigned char buf[1];
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+
+ /* check that we're reading and that there's no error */
+ if (state->mode != GZ_READ || state->err != Z_OK)
+ return -1;
+
+ /* try output buffer (no need to check for skip request) */
+ if (state->have) {
+ state->have--;
+ state->pos++;
+ return *(state->next)++;
+ }
+
+ /* nothing there -- try gzread() */
+ ret = gzread(file, buf, 1);
+ return ret < 1 ? -1 : buf[0];
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzungetc(c, file)
+ int c;
+ gzFile file;
+{
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+
+ /* check that we're reading and that there's no error */
+ if (state->mode != GZ_READ || state->err != Z_OK)
+ return -1;
+
+ /* process a skip request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_skip(state, state->skip) == -1)
+ return -1;
+ }
+
+ /* can't push EOF */
+ if (c < 0)
+ return -1;
+
+ /* if output buffer empty, put byte at end (allows more pushing) */
+ if (state->have == 0) {
+ state->have = 1;
+ state->next = state->out + (state->size << 1) - 1;
+ state->next[0] = c;
+ state->pos--;
+ return c;
+ }
+
+ /* if no room, give up (must have already done a gzungetc()) */
+ if (state->have == (state->size << 1)) {
+ gz_error(state, Z_BUF_ERROR, "out of room to push characters");
+ return -1;
+ }
+
+ /* slide output data if needed and insert byte before existing data */
+ if (state->next == state->out) {
+ unsigned char *src = state->out + state->have;
+ unsigned char *dest = state->out + (state->size << 1);
+ while (src > state->out)
+ *--dest = *--src;
+ state->next = dest;
+ }
+ state->have++;
+ state->next--;
+ state->next[0] = c;
+ state->pos--;
+ return c;
+}
+
+/* -- see zlib.h -- */
+char * ZEXPORT gzgets(file, buf, len)
+ gzFile file;
+ char *buf;
+ int len;
+{
+ unsigned left, n;
+ char *str;
+ unsigned char *eol;
+ gz_statep state;
+
+ /* check parameters and get internal structure */
+ if (file == NULL || buf == NULL || len < 1)
+ return NULL;
+ state = (gz_statep)file;
+
+ /* check that we're reading and that there's no error */
+ if (state->mode != GZ_READ || state->err != Z_OK)
+ return NULL;
+
+ /* process a skip request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_skip(state, state->skip) == -1)
+ return NULL;
+ }
+
+ /* copy output bytes up to new line or len - 1, whichever comes first --
+ append a terminating zero to the string (we don't check for a zero in
+ the contents, let the user worry about that) */
+ str = buf;
+ left = (unsigned)len - 1;
+ if (left) do {
+ /* assure that something is in the output buffer */
+ if (state->have == 0) {
+ if (gz_make(state) == -1)
+ return NULL; /* error */
+ if (state->have == 0) { /* end of file */
+ if (buf == str) /* got bupkus */
+ return NULL;
+ break; /* got something -- return it */
+ }
+ }
+
+ /* look for end-of-line in current output buffer */
+ n = state->have > left ? left : state->have;
+ eol = memchr(state->next, '\n', n);
+ if (eol != NULL)
+ n = (unsigned)(eol - state->next) + 1;
+
+ /* copy through end-of-line, or remainder if not found */
+ memcpy(buf, state->next, n);
+ state->have -= n;
+ state->next += n;
+ state->pos += n;
+ left -= n;
+ buf += n;
+ } while (left && eol == NULL);
+
+ /* found end-of-line or out of space -- terminate string and return it */
+ buf[0] = 0;
+ return str;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzdirect(file)
+ gzFile file;
+{
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return 0;
+ state = (gz_statep)file;
+
+ /* check that we're reading */
+ if (state->mode != GZ_READ)
+ return 0;
+
+ /* if the state is not known, but we can find out, then do so (this is
+ mainly for right after a gzopen() or gzdopen()) */
+ if (state->how == LOOK && state->have == 0)
+ (void)gz_head(state);
+
+ /* return 1 if reading direct, 0 if decompressing a gzip stream */
+ return state->direct;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzclose_r(file)
+ gzFile file;
+{
+ int ret;
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return Z_STREAM_ERROR;
+ state = (gz_statep)file;
+
+ /* check that we're reading */
+ if (state->mode != GZ_READ)
+ return Z_STREAM_ERROR;
+
+ /* free memory and close file */
+ if (state->size) {
+ inflateEnd(&(state->strm));
+ free(state->out);
+ free(state->in);
+ }
+ gz_error(state, Z_OK, NULL);
+ free(state->path);
+ ret = close(state->fd);
+ free(state);
+ return ret ? Z_ERRNO : Z_OK;
+}
diff --git a/src/3rdparty/zlib/gzwrite.c b/src/3rdparty/zlib/gzwrite.c
new file mode 100644
index 0000000..e8defc6
--- /dev/null
+++ b/src/3rdparty/zlib/gzwrite.c
@@ -0,0 +1,531 @@
+/* gzwrite.c -- zlib functions for writing gzip files
+ * Copyright (C) 2004, 2005, 2010 Mark Adler
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+#include "gzguts.h"
+
+/* Local functions */
+local int gz_init OF((gz_statep));
+local int gz_comp OF((gz_statep, int));
+local int gz_zero OF((gz_statep, z_off64_t));
+
+/* Initialize state for writing a gzip file. Mark initialization by setting
+ state->size to non-zero. Return -1 on failure or 0 on success. */
+local int gz_init(state)
+ gz_statep state;
+{
+ int ret;
+ z_streamp strm = &(state->strm);
+
+ /* allocate input and output buffers */
+ state->in = malloc(state->want);
+ state->out = malloc(state->want);
+ if (state->in == NULL || state->out == NULL) {
+ if (state->out != NULL)
+ free(state->out);
+ if (state->in != NULL)
+ free(state->in);
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
+
+ /* allocate deflate memory, set up for gzip compression */
+ strm->zalloc = Z_NULL;
+ strm->zfree = Z_NULL;
+ strm->opaque = Z_NULL;
+ ret = deflateInit2(strm, state->level, Z_DEFLATED,
+ 15 + 16, 8, state->strategy);
+ if (ret != Z_OK) {
+ free(state->in);
+ gz_error(state, Z_MEM_ERROR, "out of memory");
+ return -1;
+ }
+
+ /* mark state as initialized */
+ state->size = state->want;
+
+ /* initialize write buffer */
+ strm->avail_out = state->size;
+ strm->next_out = state->out;
+ state->next = strm->next_out;
+ return 0;
+}
+
+/* Compress whatever is at avail_in and next_in and write to the output file.
+ Return -1 if there is an error writing to the output file, otherwise 0.
+ flush is assumed to be a valid deflate() flush value. If flush is Z_FINISH,
+ then the deflate() state is reset to start a new gzip stream. */
+local int gz_comp(state, flush)
+ gz_statep state;
+ int flush;
+{
+ int ret, got;
+ unsigned have;
+ z_streamp strm = &(state->strm);
+
+ /* allocate memory if this is the first time through */
+ if (state->size == 0 && gz_init(state) == -1)
+ return -1;
+
+ /* run deflate() on provided input until it produces no more output */
+ ret = Z_OK;
+ do {
+ /* write out current buffer contents if full, or if flushing, but if
+ doing Z_FINISH then don't write until we get to Z_STREAM_END */
+ if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
+ (flush != Z_FINISH || ret == Z_STREAM_END))) {
+ have = (unsigned)(strm->next_out - state->next);
+ if (have && ((got = write(state->fd, state->next, have)) < 0 ||
+ (unsigned)got != have)) {
+ gz_error(state, Z_ERRNO, zstrerror());
+ return -1;
+ }
+ if (strm->avail_out == 0) {
+ strm->avail_out = state->size;
+ strm->next_out = state->out;
+ }
+ state->next = strm->next_out;
+ }
+
+ /* compress */
+ have = strm->avail_out;
+ ret = deflate(strm, flush);
+ if (ret == Z_STREAM_ERROR) {
+ gz_error(state, Z_STREAM_ERROR,
+ "internal error: deflate stream corrupt");
+ return -1;
+ }
+ have -= strm->avail_out;
+ } while (have);
+
+ /* if that completed a deflate stream, allow another to start */
+ if (flush == Z_FINISH)
+ deflateReset(strm);
+
+ /* all done, no errors */
+ return 0;
+}
+
+/* Compress len zeros to output. Return -1 on error, 0 on success. */
+local int gz_zero(state, len)
+ gz_statep state;
+ z_off64_t len;
+{
+ int first;
+ unsigned n;
+ z_streamp strm = &(state->strm);
+
+ /* consume whatever's left in the input buffer */
+ if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
+ return -1;
+
+ /* compress len zeros (len guaranteed > 0) */
+ first = 1;
+ while (len) {
+ n = GT_OFF(state->size) || (z_off64_t)state->size > len ?
+ (unsigned)len : state->size;
+ if (first) {
+ memset(state->in, 0, n);
+ first = 0;
+ }
+ strm->avail_in = n;
+ strm->next_in = state->in;
+ state->pos += n;
+ if (gz_comp(state, Z_NO_FLUSH) == -1)
+ return -1;
+ len -= n;
+ }
+ return 0;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzwrite(file, buf, len)
+ gzFile file;
+ voidpc buf;
+ unsigned len;
+{
+ unsigned put = len;
+ unsigned n;
+ gz_statep state;
+ z_streamp strm;
+
+ /* get internal structure */
+ if (file == NULL)
+ return 0;
+ state = (gz_statep)file;
+ strm = &(state->strm);
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return 0;
+
+ /* since an int is returned, make sure len fits in one, otherwise return
+ with an error (this avoids the flaw in the interface) */
+ if ((int)len < 0) {
+ gz_error(state, Z_BUF_ERROR, "requested length does not fit in int");
+ return 0;
+ }
+
+ /* if len is zero, avoid unnecessary operations */
+ if (len == 0)
+ return 0;
+
+ /* allocate memory if this is the first time through */
+ if (state->size == 0 && gz_init(state) == -1)
+ return 0;
+
+ /* check for seek request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_zero(state, state->skip) == -1)
+ return 0;
+ }
+
+ /* for small len, copy to input buffer, otherwise compress directly */
+ if (len < state->size) {
+ /* copy to input buffer, compress when full */
+ do {
+ if (strm->avail_in == 0)
+ strm->next_in = state->in;
+ n = state->size - strm->avail_in;
+ if (n > len)
+ n = len;
+ memcpy(strm->next_in + strm->avail_in, buf, n);
+ strm->avail_in += n;
+ state->pos += n;
+ buf = (char *)buf + n;
+ len -= n;
+ if (len && gz_comp(state, Z_NO_FLUSH) == -1)
+ return 0;
+ } while (len);
+ }
+ else {
+ /* consume whatever's left in the input buffer */
+ if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
+ return 0;
+
+ /* directly compress user buffer to file */
+ strm->avail_in = len;
+ strm->next_in = (voidp)buf;
+ state->pos += len;
+ if (gz_comp(state, Z_NO_FLUSH) == -1)
+ return 0;
+ }
+
+ /* input was all buffered or compressed (put will fit in int) */
+ return (int)put;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzputc(file, c)
+ gzFile file;
+ int c;
+{
+ unsigned char buf[1];
+ gz_statep state;
+ z_streamp strm;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+ strm = &(state->strm);
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return -1;
+
+ /* check for seek request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_zero(state, state->skip) == -1)
+ return -1;
+ }
+
+ /* try writing to input buffer for speed (state->size == 0 if buffer not
+ initialized) */
+ if (strm->avail_in < state->size) {
+ if (strm->avail_in == 0)
+ strm->next_in = state->in;
+ strm->next_in[strm->avail_in++] = c;
+ state->pos++;
+ return c;
+ }
+
+ /* no room in buffer or not initialized, use gz_write() */
+ buf[0] = c;
+ if (gzwrite(file, buf, 1) != 1)
+ return -1;
+ return c;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzputs(file, str)
+ gzFile file;
+ const char *str;
+{
+ int ret;
+ unsigned len;
+
+ /* write string */
+ len = (unsigned)strlen(str);
+ ret = gzwrite(file, str, len);
+ return ret == 0 && len != 0 ? -1 : ret;
+}
+
+#ifdef STDC
+#include <stdarg.h>
+
+/* -- see zlib.h -- */
+int ZEXPORTVA gzprintf (gzFile file, const char *format, ...)
+{
+ int size, len;
+ gz_statep state;
+ z_streamp strm;
+ va_list va;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+ strm = &(state->strm);
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return 0;
+
+ /* make sure we have some buffer space */
+ if (state->size == 0 && gz_init(state) == -1)
+ return 0;
+
+ /* check for seek request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_zero(state, state->skip) == -1)
+ return 0;
+ }
+
+ /* consume whatever's left in the input buffer */
+ if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
+ return 0;
+
+ /* do the printf() into the input buffer, put length in len */
+ size = (int)(state->size);
+ state->in[size - 1] = 0;
+ va_start(va, format);
+#ifdef NO_vsnprintf
+# ifdef HAS_vsprintf_void
+ (void)vsprintf(state->in, format, va);
+ va_end(va);
+ for (len = 0; len < size; len++)
+ if (state->in[len] == 0) break;
+# else
+ len = vsprintf(state->in, format, va);
+ va_end(va);
+# endif
+#else
+# ifdef HAS_vsnprintf_void
+ (void)vsnprintf(state->in, size, format, va);
+ va_end(va);
+ len = strlen(state->in);
+# else
+ len = vsnprintf((char *)(state->in), size, format, va);
+ va_end(va);
+# endif
+#endif
+
+ /* check that printf() results fit in buffer */
+ if (len <= 0 || len >= (int)size || state->in[size - 1] != 0)
+ return 0;
+
+ /* update buffer and position, defer compression until needed */
+ strm->avail_in = (unsigned)len;
+ strm->next_in = state->in;
+ state->pos += len;
+ return len;
+}
+
+#else /* !STDC */
+
+/* -- see zlib.h -- */
+int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
+ a11, a12, a13, a14, a15, a16, a17, a18, a19, a20)
+ gzFile file;
+ const char *format;
+ int a1, a2, a3, a4, a5, a6, a7, a8, a9, a10,
+ a11, a12, a13, a14, a15, a16, a17, a18, a19, a20;
+{
+ int size, len;
+ gz_statep state;
+ z_streamp strm;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+ strm = &(state->strm);
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return 0;
+
+ /* make sure we have some buffer space */
+ if (state->size == 0 && gz_init(state) == -1)
+ return 0;
+
+ /* check for seek request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_zero(state, state->skip) == -1)
+ return 0;
+ }
+
+ /* consume whatever's left in the input buffer */
+ if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
+ return 0;
+
+ /* do the printf() into the input buffer, put length in len */
+ size = (int)(state->size);
+ state->in[size - 1] = 0;
+#ifdef NO_snprintf
+# ifdef HAS_sprintf_void
+ sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ for (len = 0; len < size; len++)
+ if (state->in[len] == 0) break;
+# else
+ len = sprintf(state->in, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+# endif
+#else
+# ifdef HAS_snprintf_void
+ snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+ len = strlen(state->in);
+# else
+ len = snprintf(state->in, size, format, a1, a2, a3, a4, a5, a6, a7, a8,
+ a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20);
+# endif
+#endif
+
+ /* check that printf() results fit in buffer */
+ if (len <= 0 || len >= (int)size || state->in[size - 1] != 0)
+ return 0;
+
+ /* update buffer and position, defer compression until needed */
+ strm->avail_in = (unsigned)len;
+ strm->next_in = state->in;
+ state->pos += len;
+ return len;
+}
+
+#endif
+
+/* -- see zlib.h -- */
+int ZEXPORT gzflush(file, flush)
+ gzFile file;
+ int flush;
+{
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return -1;
+ state = (gz_statep)file;
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return Z_STREAM_ERROR;
+
+ /* check flush parameter */
+ if (flush < 0 || flush > Z_FINISH)
+ return Z_STREAM_ERROR;
+
+ /* check for seek request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_zero(state, state->skip) == -1)
+ return -1;
+ }
+
+ /* compress remaining data with requested flush */
+ gz_comp(state, flush);
+ return state->err;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzsetparams(file, level, strategy)
+ gzFile file;
+ int level;
+ int strategy;
+{
+ gz_statep state;
+ z_streamp strm;
+
+ /* get internal structure */
+ if (file == NULL)
+ return Z_STREAM_ERROR;
+ state = (gz_statep)file;
+ strm = &(state->strm);
+
+ /* check that we're writing and that there's no error */
+ if (state->mode != GZ_WRITE || state->err != Z_OK)
+ return Z_STREAM_ERROR;
+
+ /* if no change is requested, then do nothing */
+ if (level == state->level && strategy == state->strategy)
+ return Z_OK;
+
+ /* check for seek request */
+ if (state->seek) {
+ state->seek = 0;
+ if (gz_zero(state, state->skip) == -1)
+ return -1;
+ }
+
+ /* change compression parameters for subsequent input */
+ if (state->size) {
+ /* flush previous input with previous parameters before changing */
+ if (strm->avail_in && gz_comp(state, Z_PARTIAL_FLUSH) == -1)
+ return state->err;
+ deflateParams(strm, level, strategy);
+ }
+ state->level = level;
+ state->strategy = strategy;
+ return Z_OK;
+}
+
+/* -- see zlib.h -- */
+int ZEXPORT gzclose_w(file)
+ gzFile file;
+{
+ int ret = 0;
+ gz_statep state;
+
+ /* get internal structure */
+ if (file == NULL)
+ return Z_STREAM_ERROR;
+ state = (gz_statep)file;
+
+ /* check that we're writing */
+ if (state->mode != GZ_WRITE)
+ return Z_STREAM_ERROR;
+
+ /* check for seek request */
+ if (state->seek) {
+ state->seek = 0;
+ ret += gz_zero(state, state->skip);
+ }
+
+ /* flush, free memory, and close file */
+ ret += gz_comp(state, Z_FINISH);
+ (void)deflateEnd(&(state->strm));
+ free(state->out);
+ free(state->in);
+ gz_error(state, Z_OK, NULL);
+ free(state->path);
+ ret += close(state->fd);
+ free(state);
+ return ret ? Z_ERRNO : Z_OK;
+}
diff --git a/src/3rdparty/zlib/infback.c b/src/3rdparty/zlib/infback.c
index 455dbc9..af3a8c9 100644
--- a/src/3rdparty/zlib/infback.c
+++ b/src/3rdparty/zlib/infback.c
@@ -1,5 +1,5 @@
/* infback.c -- inflate using a call-back interface
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2009 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -55,7 +55,7 @@ int stream_size;
state->wbits = windowBits;
state->wsize = 1U << windowBits;
state->window = window;
- state->write = 0;
+ state->wnext = 0;
state->whave = 0;
return Z_OK;
}
@@ -253,7 +253,7 @@ void FAR *out_desc;
unsigned bits; /* bits in bit buffer */
unsigned copy; /* number of stored or match bytes to copy */
unsigned char FAR *from; /* where to copy match bytes from */
- code this; /* current decoding table entry */
+ code here; /* current decoding table entry */
code last; /* parent table entry */
unsigned len; /* length to copy for repeats, bits to drop */
int ret; /* return code */
@@ -389,19 +389,19 @@ void FAR *out_desc;
state->have = 0;
while (state->have < state->nlen + state->ndist) {
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if (this.val < 16) {
- NEEDBITS(this.bits);
- DROPBITS(this.bits);
- state->lens[state->have++] = this.val;
+ if (here.val < 16) {
+ NEEDBITS(here.bits);
+ DROPBITS(here.bits);
+ state->lens[state->have++] = here.val;
}
else {
- if (this.val == 16) {
- NEEDBITS(this.bits + 2);
- DROPBITS(this.bits);
+ if (here.val == 16) {
+ NEEDBITS(here.bits + 2);
+ DROPBITS(here.bits);
if (state->have == 0) {
strm->msg = (char *)"invalid bit length repeat";
state->mode = BAD;
@@ -411,16 +411,16 @@ void FAR *out_desc;
copy = 3 + BITS(2);
DROPBITS(2);
}
- else if (this.val == 17) {
- NEEDBITS(this.bits + 3);
- DROPBITS(this.bits);
+ else if (here.val == 17) {
+ NEEDBITS(here.bits + 3);
+ DROPBITS(here.bits);
len = 0;
copy = 3 + BITS(3);
DROPBITS(3);
}
else {
- NEEDBITS(this.bits + 7);
- DROPBITS(this.bits);
+ NEEDBITS(here.bits + 7);
+ DROPBITS(here.bits);
len = 0;
copy = 11 + BITS(7);
DROPBITS(7);
@@ -438,7 +438,16 @@ void FAR *out_desc;
/* handle error breaks in while */
if (state->mode == BAD) break;
- /* build code tables */
+ /* check for end-of-block code (better have one) */
+ if (state->lens[256] == 0) {
+ strm->msg = (char *)"invalid code -- missing end-of-block";
+ state->mode = BAD;
+ break;
+ }
+
+ /* build code tables -- note: do not change the lenbits or distbits
+ values here (9 and 6) without reading the comments in inftrees.h
+ concerning the ENOUGH constants, which depend on those values */
state->next = state->codes;
state->lencode = (code const FAR *)(state->next);
state->lenbits = 9;
@@ -474,28 +483,28 @@ void FAR *out_desc;
/* get a literal, length, or end-of-block code */
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if (this.op && (this.op & 0xf0) == 0) {
- last = this;
+ if (here.op && (here.op & 0xf0) == 0) {
+ last = here;
for (;;) {
- this = state->lencode[last.val +
+ here = state->lencode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + here.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
}
- DROPBITS(this.bits);
- state->length = (unsigned)this.val;
+ DROPBITS(here.bits);
+ state->length = (unsigned)here.val;
/* process literal */
- if (this.op == 0) {
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ if (here.op == 0) {
+ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
+ "inflate: literal 0x%02x\n", here.val));
ROOM();
*put++ = (unsigned char)(state->length);
left--;
@@ -504,21 +513,21 @@ void FAR *out_desc;
}
/* process end of block */
- if (this.op & 32) {
+ if (here.op & 32) {
Tracevv((stderr, "inflate: end of block\n"));
state->mode = TYPE;
break;
}
/* invalid code */
- if (this.op & 64) {
+ if (here.op & 64) {
strm->msg = (char *)"invalid literal/length code";
state->mode = BAD;
break;
}
/* length code -- get extra bits, if any */
- state->extra = (unsigned)(this.op) & 15;
+ state->extra = (unsigned)(here.op) & 15;
if (state->extra != 0) {
NEEDBITS(state->extra);
state->length += BITS(state->extra);
@@ -528,30 +537,30 @@ void FAR *out_desc;
/* get distance code */
for (;;) {
- this = state->distcode[BITS(state->distbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->distcode[BITS(state->distbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if ((this.op & 0xf0) == 0) {
- last = this;
+ if ((here.op & 0xf0) == 0) {
+ last = here;
for (;;) {
- this = state->distcode[last.val +
+ here = state->distcode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + here.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
}
- DROPBITS(this.bits);
- if (this.op & 64) {
+ DROPBITS(here.bits);
+ if (here.op & 64) {
strm->msg = (char *)"invalid distance code";
state->mode = BAD;
break;
}
- state->offset = (unsigned)this.val;
+ state->offset = (unsigned)here.val;
/* get distance extra bits, if any */
- state->extra = (unsigned)(this.op) & 15;
+ state->extra = (unsigned)(here.op) & 15;
if (state->extra != 0) {
NEEDBITS(state->extra);
state->offset += BITS(state->extra);
diff --git a/src/3rdparty/zlib/inffast.c b/src/3rdparty/zlib/inffast.c
index bbee92e..2f1d60b 100644
--- a/src/3rdparty/zlib/inffast.c
+++ b/src/3rdparty/zlib/inffast.c
@@ -1,5 +1,5 @@
/* inffast.c -- fast decoding
- * Copyright (C) 1995-2004 Mark Adler
+ * Copyright (C) 1995-2008, 2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -64,7 +64,7 @@
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
-void inflate_fast(strm, start)
+void ZLIB_INTERNAL inflate_fast(strm, start)
z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
@@ -79,7 +79,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
#endif
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
- unsigned write; /* window write index */
+ unsigned wnext; /* window write index */
unsigned char FAR *window; /* allocated sliding window, if wsize != 0 */
unsigned long hold; /* local strm->hold */
unsigned bits; /* local strm->bits */
@@ -87,7 +87,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
code const FAR *dcode; /* local strm->distcode */
unsigned lmask; /* mask for first level of length codes */
unsigned dmask; /* mask for first level of distance codes */
- code this; /* retrieved table entry */
+ code here; /* retrieved table entry */
unsigned op; /* code bits, operation, extra bits, or */
/* window position, window bytes to copy */
unsigned len; /* match length, unused bytes */
@@ -106,7 +106,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
#endif
wsize = state->wsize;
whave = state->whave;
- write = state->write;
+ wnext = state->wnext;
window = state->window;
hold = state->hold;
bits = state->bits;
@@ -124,20 +124,20 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
- this = lcode[hold & lmask];
+ here = lcode[hold & lmask];
dolen:
- op = (unsigned)(this.bits);
+ op = (unsigned)(here.bits);
hold >>= op;
bits -= op;
- op = (unsigned)(this.op);
+ op = (unsigned)(here.op);
if (op == 0) { /* literal */
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
- PUP(out) = (unsigned char)(this.val);
+ "inflate: literal 0x%02x\n", here.val));
+ PUP(out) = (unsigned char)(here.val);
}
else if (op & 16) { /* length base */
- len = (unsigned)(this.val);
+ len = (unsigned)(here.val);
op &= 15; /* number of extra bits */
if (op) {
if (bits < op) {
@@ -155,14 +155,14 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
hold += (unsigned long)(PUP(in)) << bits;
bits += 8;
}
- this = dcode[hold & dmask];
+ here = dcode[hold & dmask];
dodist:
- op = (unsigned)(this.bits);
+ op = (unsigned)(here.bits);
hold >>= op;
bits -= op;
- op = (unsigned)(this.op);
+ op = (unsigned)(here.op);
if (op & 16) { /* distance base */
- dist = (unsigned)(this.val);
+ dist = (unsigned)(here.val);
op &= 15; /* number of extra bits */
if (bits < op) {
hold += (unsigned long)(PUP(in)) << bits;
@@ -187,12 +187,34 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
if (dist > op) { /* see if copy from window */
op = dist - op; /* distance back in window */
if (op > whave) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
+ if (state->sane) {
+ strm->msg =
+ (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ if (len <= op - whave) {
+ do {
+ PUP(out) = 0;
+ } while (--len);
+ continue;
+ }
+ len -= op - whave;
+ do {
+ PUP(out) = 0;
+ } while (--op > whave);
+ if (op == 0) {
+ from = out - dist;
+ do {
+ PUP(out) = PUP(from);
+ } while (--len);
+ continue;
+ }
+#endif
}
from = window - OFF;
- if (write == 0) { /* very common case */
+ if (wnext == 0) { /* very common case */
from += wsize - op;
if (op < len) { /* some from window */
len -= op;
@@ -202,17 +224,17 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
from = out - dist; /* rest from output */
}
}
- else if (write < op) { /* wrap around window */
- from += wsize + write - op;
- op -= write;
+ else if (wnext < op) { /* wrap around window */
+ from += wsize + wnext - op;
+ op -= wnext;
if (op < len) { /* some from end of window */
len -= op;
do {
PUP(out) = PUP(from);
} while (--op);
from = window - OFF;
- if (write < len) { /* some from start of window */
- op = write;
+ if (wnext < len) { /* some from start of window */
+ op = wnext;
len -= op;
do {
PUP(out) = PUP(from);
@@ -222,7 +244,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else { /* contiguous in window */
- from += write - op;
+ from += wnext - op;
if (op < len) { /* some from window */
len -= op;
do {
@@ -259,7 +281,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else if ((op & 64) == 0) { /* 2nd level distance code */
- this = dcode[this.val + (hold & ((1U << op) - 1))];
+ here = dcode[here.val + (hold & ((1U << op) - 1))];
goto dodist;
}
else {
@@ -269,7 +291,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
}
}
else if ((op & 64) == 0) { /* 2nd level length code */
- this = lcode[this.val + (hold & ((1U << op) - 1))];
+ here = lcode[here.val + (hold & ((1U << op) - 1))];
goto dolen;
}
else if (op & 32) { /* end-of-block */
@@ -305,7 +327,7 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
inflate_fast() speedups that turned out slower (on a PowerPC G3 750CXe):
- Using bit fields for code structure
- Different op definition to avoid & for extra bits (do & for table bits)
- - Three separate decoding do-loops for direct, window, and write == 0
+ - Three separate decoding do-loops for direct, window, and wnext == 0
- Special case for distance > 1 copies to do overlapped load and store copy
- Explicit branch predictions (based on measured branch probabilities)
- Deferring match copy and interspersed it with decoding subsequent codes
diff --git a/src/3rdparty/zlib/inffast.h b/src/3rdparty/zlib/inffast.h
index 1e88d2d..e5c1aa4 100644
--- a/src/3rdparty/zlib/inffast.h
+++ b/src/3rdparty/zlib/inffast.h
@@ -1,5 +1,5 @@
/* inffast.h -- header to use inffast.c
- * Copyright (C) 1995-2003 Mark Adler
+ * Copyright (C) 1995-2003, 2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -8,4 +8,4 @@
subject to change. Applications should only use zlib.h.
*/
-void inflate_fast OF((z_streamp strm, unsigned start));
+void ZLIB_INTERNAL inflate_fast OF((z_streamp strm, unsigned start));
diff --git a/src/3rdparty/zlib/inflate.c b/src/3rdparty/zlib/inflate.c
index 792fdee..a8431ab 100644
--- a/src/3rdparty/zlib/inflate.c
+++ b/src/3rdparty/zlib/inflate.c
@@ -1,5 +1,5 @@
/* inflate.c -- zlib decompression
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -45,7 +45,7 @@
* - Rearrange window copies in inflate_fast() for speed and simplification
* - Unroll last copy for window match in inflate_fast()
* - Use local copies of window variables in inflate_fast() for speed
- * - Pull out common write == 0 case for speed in inflate_fast()
+ * - Pull out common wnext == 0 case for speed in inflate_fast()
* - Make op and len in inflate_fast() unsigned for consistency
* - Add FAR to lcode and dcode declarations in inflate_fast()
* - Simplified bad distance check in inflate_fast()
@@ -117,28 +117,52 @@ z_streamp strm;
state->head = Z_NULL;
state->wsize = 0;
state->whave = 0;
- state->write = 0;
+ state->wnext = 0;
state->hold = 0;
state->bits = 0;
state->lencode = state->distcode = state->next = state->codes;
+ state->sane = 1;
+ state->back = -1;
Tracev((stderr, "inflate: reset\n"));
return Z_OK;
}
-int ZEXPORT inflatePrime(strm, bits, value)
+int ZEXPORT inflateReset2(strm, windowBits)
z_streamp strm;
-int bits;
-int value;
+int windowBits;
{
+ int wrap;
struct inflate_state FAR *state;
+ /* get the state */
if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
state = (struct inflate_state FAR *)strm->state;
- if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
- value &= (1L << bits) - 1;
- state->hold += value << state->bits;
- state->bits += bits;
- return Z_OK;
+
+ /* extract wrap request from windowBits parameter */
+ if (windowBits < 0) {
+ wrap = 0;
+ windowBits = -windowBits;
+ }
+ else {
+ wrap = (windowBits >> 4) + 1;
+#ifdef GUNZIP
+ if (windowBits < 48)
+ windowBits &= 15;
+#endif
+ }
+
+ /* set number of window bits, free window if different */
+ if (windowBits && (windowBits < 8 || windowBits > 15))
+ return Z_STREAM_ERROR;
+ if (state->window != Z_NULL && state->wbits != (unsigned)windowBits) {
+ ZFREE(strm, state->window);
+ state->window = Z_NULL;
+ }
+
+ /* update state and reset the rest of it */
+ state->wrap = wrap;
+ state->wbits = (unsigned)windowBits;
+ return inflateReset(strm);
}
int ZEXPORT inflateInit2_(strm, windowBits, version, stream_size)
@@ -147,6 +171,7 @@ int windowBits;
const char *version;
int stream_size;
{
+ int ret;
struct inflate_state FAR *state;
if (version == Z_NULL || version[0] != ZLIB_VERSION[0] ||
@@ -164,24 +189,13 @@ int stream_size;
if (state == Z_NULL) return Z_MEM_ERROR;
Tracev((stderr, "inflate: allocated\n"));
strm->state = (struct internal_state FAR *)state;
- if (windowBits < 0) {
- state->wrap = 0;
- windowBits = -windowBits;
- }
- else {
- state->wrap = (windowBits >> 4) + 1;
-#ifdef GUNZIP
- if (windowBits < 48) windowBits &= 15;
-#endif
- }
- if (windowBits < 8 || windowBits > 15) {
+ state->window = Z_NULL;
+ ret = inflateReset2(strm, windowBits);
+ if (ret != Z_OK) {
ZFREE(strm, state);
strm->state = Z_NULL;
- return Z_STREAM_ERROR;
}
- state->wbits = (unsigned)windowBits;
- state->window = Z_NULL;
- return inflateReset(strm);
+ return ret;
}
int ZEXPORT inflateInit_(strm, version, stream_size)
@@ -192,6 +206,27 @@ int stream_size;
return inflateInit2_(strm, DEF_WBITS, version, stream_size);
}
+int ZEXPORT inflatePrime(strm, bits, value)
+z_streamp strm;
+int bits;
+int value;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ if (bits < 0) {
+ state->hold = 0;
+ state->bits = 0;
+ return Z_OK;
+ }
+ if (bits > 16 || state->bits + bits > 32) return Z_STREAM_ERROR;
+ value &= (1L << bits) - 1;
+ state->hold += value << state->bits;
+ state->bits += bits;
+ return Z_OK;
+}
+
/*
Return state with length and distance decoding tables and index sizes set to
fixed code decoding. Normally this returns fixed tables from inffixed.h.
@@ -340,7 +375,7 @@ unsigned out;
/* if window not in use yet, initialize */
if (state->wsize == 0) {
state->wsize = 1U << state->wbits;
- state->write = 0;
+ state->wnext = 0;
state->whave = 0;
}
@@ -348,22 +383,22 @@ unsigned out;
copy = out - strm->avail_out;
if (copy >= state->wsize) {
zmemcpy(state->window, strm->next_out - state->wsize, state->wsize);
- state->write = 0;
+ state->wnext = 0;
state->whave = state->wsize;
}
else {
- dist = state->wsize - state->write;
+ dist = state->wsize - state->wnext;
if (dist > copy) dist = copy;
- zmemcpy(state->window + state->write, strm->next_out - copy, dist);
+ zmemcpy(state->window + state->wnext, strm->next_out - copy, dist);
copy -= dist;
if (copy) {
zmemcpy(state->window, strm->next_out - copy, copy);
- state->write = copy;
+ state->wnext = copy;
state->whave = state->wsize;
}
else {
- state->write += dist;
- if (state->write == state->wsize) state->write = 0;
+ state->wnext += dist;
+ if (state->wnext == state->wsize) state->wnext = 0;
if (state->whave < state->wsize) state->whave += dist;
}
}
@@ -564,7 +599,7 @@ int flush;
unsigned in, out; /* save starting available input and output */
unsigned copy; /* number of stored or match bytes to copy */
unsigned char FAR *from; /* where to copy match bytes from */
- code this; /* current decoding table entry */
+ code here; /* current decoding table entry */
code last; /* parent table entry */
unsigned len; /* length to copy for repeats, bits to drop */
int ret; /* return code */
@@ -619,7 +654,9 @@ int flush;
}
DROPBITS(4);
len = BITS(4) + 8;
- if (len > state->wbits) {
+ if (state->wbits == 0)
+ state->wbits = len;
+ else if (len > state->wbits) {
strm->msg = (char *)"invalid window size";
state->mode = BAD;
break;
@@ -771,7 +808,7 @@ int flush;
strm->adler = state->check = adler32(0L, Z_NULL, 0);
state->mode = TYPE;
case TYPE:
- if (flush == Z_BLOCK) goto inf_leave;
+ if (flush == Z_BLOCK || flush == Z_TREES) goto inf_leave;
case TYPEDO:
if (state->last) {
BYTEBITS();
@@ -791,7 +828,11 @@ int flush;
fixedtables(state);
Tracev((stderr, "inflate: fixed codes block%s\n",
state->last ? " (last)" : ""));
- state->mode = LEN; /* decode codes */
+ state->mode = LEN_; /* decode codes */
+ if (flush == Z_TREES) {
+ DROPBITS(2);
+ goto inf_leave;
+ }
break;
case 2: /* dynamic block */
Tracev((stderr, "inflate: dynamic codes block%s\n",
@@ -816,6 +857,9 @@ int flush;
Tracev((stderr, "inflate: stored length %u\n",
state->length));
INITBITS();
+ state->mode = COPY_;
+ if (flush == Z_TREES) goto inf_leave;
+ case COPY_:
state->mode = COPY;
case COPY:
copy = state->length;
@@ -876,19 +920,19 @@ int flush;
case CODELENS:
while (state->have < state->nlen + state->ndist) {
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if (this.val < 16) {
- NEEDBITS(this.bits);
- DROPBITS(this.bits);
- state->lens[state->have++] = this.val;
+ if (here.val < 16) {
+ NEEDBITS(here.bits);
+ DROPBITS(here.bits);
+ state->lens[state->have++] = here.val;
}
else {
- if (this.val == 16) {
- NEEDBITS(this.bits + 2);
- DROPBITS(this.bits);
+ if (here.val == 16) {
+ NEEDBITS(here.bits + 2);
+ DROPBITS(here.bits);
if (state->have == 0) {
strm->msg = (char *)"invalid bit length repeat";
state->mode = BAD;
@@ -898,16 +942,16 @@ int flush;
copy = 3 + BITS(2);
DROPBITS(2);
}
- else if (this.val == 17) {
- NEEDBITS(this.bits + 3);
- DROPBITS(this.bits);
+ else if (here.val == 17) {
+ NEEDBITS(here.bits + 3);
+ DROPBITS(here.bits);
len = 0;
copy = 3 + BITS(3);
DROPBITS(3);
}
else {
- NEEDBITS(this.bits + 7);
- DROPBITS(this.bits);
+ NEEDBITS(here.bits + 7);
+ DROPBITS(here.bits);
len = 0;
copy = 11 + BITS(7);
DROPBITS(7);
@@ -925,7 +969,16 @@ int flush;
/* handle error breaks in while */
if (state->mode == BAD) break;
- /* build code tables */
+ /* check for end-of-block code (better have one) */
+ if (state->lens[256] == 0) {
+ strm->msg = (char *)"invalid code -- missing end-of-block";
+ state->mode = BAD;
+ break;
+ }
+
+ /* build code tables -- note: do not change the lenbits or distbits
+ values here (9 and 6) without reading the comments in inftrees.h
+ concerning the ENOUGH constants, which depend on those values */
state->next = state->codes;
state->lencode = (code const FAR *)(state->next);
state->lenbits = 9;
@@ -946,88 +999,102 @@ int flush;
break;
}
Tracev((stderr, "inflate: codes ok\n"));
+ state->mode = LEN_;
+ if (flush == Z_TREES) goto inf_leave;
+ case LEN_:
state->mode = LEN;
case LEN:
if (have >= 6 && left >= 258) {
RESTORE();
inflate_fast(strm, out);
LOAD();
+ if (state->mode == TYPE)
+ state->back = -1;
break;
}
+ state->back = 0;
for (;;) {
- this = state->lencode[BITS(state->lenbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->lencode[BITS(state->lenbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if (this.op && (this.op & 0xf0) == 0) {
- last = this;
+ if (here.op && (here.op & 0xf0) == 0) {
+ last = here;
for (;;) {
- this = state->lencode[last.val +
+ here = state->lencode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + here.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
+ state->back += last.bits;
}
- DROPBITS(this.bits);
- state->length = (unsigned)this.val;
- if ((int)(this.op) == 0) {
- Tracevv((stderr, this.val >= 0x20 && this.val < 0x7f ?
+ DROPBITS(here.bits);
+ state->back += here.bits;
+ state->length = (unsigned)here.val;
+ if ((int)(here.op) == 0) {
+ Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ?
"inflate: literal '%c'\n" :
- "inflate: literal 0x%02x\n", this.val));
+ "inflate: literal 0x%02x\n", here.val));
state->mode = LIT;
break;
}
- if (this.op & 32) {
+ if (here.op & 32) {
Tracevv((stderr, "inflate: end of block\n"));
+ state->back = -1;
state->mode = TYPE;
break;
}
- if (this.op & 64) {
+ if (here.op & 64) {
strm->msg = (char *)"invalid literal/length code";
state->mode = BAD;
break;
}
- state->extra = (unsigned)(this.op) & 15;
+ state->extra = (unsigned)(here.op) & 15;
state->mode = LENEXT;
case LENEXT:
if (state->extra) {
NEEDBITS(state->extra);
state->length += BITS(state->extra);
DROPBITS(state->extra);
+ state->back += state->extra;
}
Tracevv((stderr, "inflate: length %u\n", state->length));
+ state->was = state->length;
state->mode = DIST;
case DIST:
for (;;) {
- this = state->distcode[BITS(state->distbits)];
- if ((unsigned)(this.bits) <= bits) break;
+ here = state->distcode[BITS(state->distbits)];
+ if ((unsigned)(here.bits) <= bits) break;
PULLBYTE();
}
- if ((this.op & 0xf0) == 0) {
- last = this;
+ if ((here.op & 0xf0) == 0) {
+ last = here;
for (;;) {
- this = state->distcode[last.val +
+ here = state->distcode[last.val +
(BITS(last.bits + last.op) >> last.bits)];
- if ((unsigned)(last.bits + this.bits) <= bits) break;
+ if ((unsigned)(last.bits + here.bits) <= bits) break;
PULLBYTE();
}
DROPBITS(last.bits);
+ state->back += last.bits;
}
- DROPBITS(this.bits);
- if (this.op & 64) {
+ DROPBITS(here.bits);
+ state->back += here.bits;
+ if (here.op & 64) {
strm->msg = (char *)"invalid distance code";
state->mode = BAD;
break;
}
- state->offset = (unsigned)this.val;
- state->extra = (unsigned)(this.op) & 15;
+ state->offset = (unsigned)here.val;
+ state->extra = (unsigned)(here.op) & 15;
state->mode = DISTEXT;
case DISTEXT:
if (state->extra) {
NEEDBITS(state->extra);
state->offset += BITS(state->extra);
DROPBITS(state->extra);
+ state->back += state->extra;
}
#ifdef INFLATE_STRICT
if (state->offset > state->dmax) {
@@ -1036,11 +1103,6 @@ int flush;
break;
}
#endif
- if (state->offset > state->whave + out - left) {
- strm->msg = (char *)"invalid distance too far back";
- state->mode = BAD;
- break;
- }
Tracevv((stderr, "inflate: distance %u\n", state->offset));
state->mode = MATCH;
case MATCH:
@@ -1048,12 +1110,32 @@ int flush;
copy = out - left;
if (state->offset > copy) { /* copy from window */
copy = state->offset - copy;
- if (copy > state->write) {
- copy -= state->write;
+ if (copy > state->whave) {
+ if (state->sane) {
+ strm->msg = (char *)"invalid distance too far back";
+ state->mode = BAD;
+ break;
+ }
+#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ Trace((stderr, "inflate.c too far\n"));
+ copy -= state->whave;
+ if (copy > state->length) copy = state->length;
+ if (copy > left) copy = left;
+ left -= copy;
+ state->length -= copy;
+ do {
+ *put++ = 0;
+ } while (--copy);
+ if (state->length == 0) state->mode = LEN;
+ break;
+#endif
+ }
+ if (copy > state->wnext) {
+ copy -= state->wnext;
from = state->window + (state->wsize - copy);
}
else
- from = state->window + (state->write - copy);
+ from = state->window + (state->wnext - copy);
if (copy > state->length) copy = state->length;
}
else { /* copy from output */
@@ -1146,7 +1228,8 @@ int flush;
strm->adler = state->check =
UPDATE(state->check, strm->next_out - out, out);
strm->data_type = state->bits + (state->last ? 64 : 0) +
- (state->mode == TYPE ? 128 : 0);
+ (state->mode == TYPE ? 128 : 0) +
+ (state->mode == LEN_ || state->mode == COPY_ ? 256 : 0);
if (((in == 0 && out == 0) || flush == Z_FINISH) && ret == Z_OK)
ret = Z_BUF_ERROR;
return ret;
@@ -1366,3 +1449,32 @@ z_streamp source;
dest->state = (struct internal_state FAR *)copy;
return Z_OK;
}
+
+int ZEXPORT inflateUndermine(strm, subvert)
+z_streamp strm;
+int subvert;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR;
+ state = (struct inflate_state FAR *)strm->state;
+ state->sane = !subvert;
+#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR
+ return Z_OK;
+#else
+ state->sane = 1;
+ return Z_DATA_ERROR;
+#endif
+}
+
+long ZEXPORT inflateMark(strm)
+z_streamp strm;
+{
+ struct inflate_state FAR *state;
+
+ if (strm == Z_NULL || strm->state == Z_NULL) return -1L << 16;
+ state = (struct inflate_state FAR *)strm->state;
+ return ((long)(state->back) << 16) +
+ (state->mode == COPY ? state->length :
+ (state->mode == MATCH ? state->was - state->length : 0));
+}
diff --git a/src/3rdparty/zlib/inflate.h b/src/3rdparty/zlib/inflate.h
index 07bd3e7..95f4986 100644
--- a/src/3rdparty/zlib/inflate.h
+++ b/src/3rdparty/zlib/inflate.h
@@ -1,5 +1,5 @@
/* inflate.h -- internal inflate state definition
- * Copyright (C) 1995-2004 Mark Adler
+ * Copyright (C) 1995-2009 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -32,11 +32,13 @@ typedef enum {
TYPE, /* i: waiting for type bits, including last-flag bit */
TYPEDO, /* i: same, but skip check to exit inflate on new block */
STORED, /* i: waiting for stored size (length and complement) */
+ COPY_, /* i/o: same as COPY below, but only first time in */
COPY, /* i/o: waiting for input or output to copy stored block */
TABLE, /* i: waiting for dynamic block table lengths */
LENLENS, /* i: waiting for code length code lengths */
CODELENS, /* i: waiting for length/lit and distance code lengths */
- LEN, /* i: waiting for length/lit code */
+ LEN_, /* i: same as LEN below, but only first time in */
+ LEN, /* i: waiting for length/lit/eob code */
LENEXT, /* i: waiting for length extra bits */
DIST, /* i: waiting for distance code */
DISTEXT, /* i: waiting for distance extra bits */
@@ -53,19 +55,21 @@ typedef enum {
/*
State transitions between above modes -
- (most modes can go to the BAD or MEM mode -- not shown for clarity)
+ (most modes can go to BAD or MEM on error -- not shown for clarity)
Process header:
- HEAD -> (gzip) or (zlib)
- (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME
- NAME -> COMMENT -> HCRC -> TYPE
+ HEAD -> (gzip) or (zlib) or (raw)
+ (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME -> COMMENT ->
+ HCRC -> TYPE
(zlib) -> DICTID or TYPE
DICTID -> DICT -> TYPE
+ (raw) -> TYPEDO
Read deflate blocks:
- TYPE -> STORED or TABLE or LEN or CHECK
- STORED -> COPY -> TYPE
- TABLE -> LENLENS -> CODELENS -> LEN
- Read deflate codes:
+ TYPE -> TYPEDO -> STORED or TABLE or LEN_ or CHECK
+ STORED -> COPY_ -> COPY -> TYPE
+ TABLE -> LENLENS -> CODELENS -> LEN_
+ LEN_ -> LEN
+ Read deflate codes in fixed or dynamic block:
LEN -> LENEXT or LIT or TYPE
LENEXT -> DIST -> DISTEXT -> MATCH -> LEN
LIT -> LEN
@@ -73,7 +77,7 @@ typedef enum {
CHECK -> LENGTH -> DONE
*/
-/* state maintained between inflate() calls. Approximately 7K bytes. */
+/* state maintained between inflate() calls. Approximately 10K bytes. */
struct inflate_state {
inflate_mode mode; /* current inflate mode */
int last; /* true if processing last block */
@@ -88,7 +92,7 @@ struct inflate_state {
unsigned wbits; /* log base 2 of requested window size */
unsigned wsize; /* window size or zero if not using window */
unsigned whave; /* valid bytes in the window */
- unsigned write; /* window write index */
+ unsigned wnext; /* window write index */
unsigned char FAR *window; /* allocated sliding window, if needed */
/* bit accumulator */
unsigned long hold; /* input bit accumulator */
@@ -112,4 +116,7 @@ struct inflate_state {
unsigned short lens[320]; /* temporary storage for code lengths */
unsigned short work[288]; /* work area for code table building */
code codes[ENOUGH]; /* space for code tables */
+ int sane; /* if false, allow invalid distance too far */
+ int back; /* bits back of last unprocessed length/lit */
+ unsigned was; /* initial length of match */
};
diff --git a/src/3rdparty/zlib/inftrees.c b/src/3rdparty/zlib/inftrees.c
index 8a9c13f..11e9c52 100644
--- a/src/3rdparty/zlib/inftrees.c
+++ b/src/3rdparty/zlib/inftrees.c
@@ -1,5 +1,5 @@
/* inftrees.c -- generate Huffman trees for efficient decoding
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -9,7 +9,7 @@
#define MAXBITS 15
const char inflate_copyright[] =
- " inflate 1.2.3 Copyright 1995-2005 Mark Adler ";
+ " inflate 1.2.5 Copyright 1995-2010 Mark Adler ";
/*
If you use the zlib library in a product, an acknowledgment is welcome
in the documentation of your product. If for some reason you cannot
@@ -29,7 +29,7 @@ const char inflate_copyright[] =
table index bits. It will differ if the request is greater than the
longest code or if it is less than the shortest code.
*/
-int inflate_table(type, lens, codes, table, bits, work)
+int ZLIB_INTERNAL inflate_table(type, lens, codes, table, bits, work)
codetype type;
unsigned short FAR *lens;
unsigned codes;
@@ -50,7 +50,7 @@ unsigned short FAR *work;
unsigned fill; /* index for replicating entries */
unsigned low; /* low bits for current root entry */
unsigned mask; /* mask for low root bits */
- code this; /* table entry for duplication */
+ code here; /* table entry for duplication */
code FAR *next; /* next available space in table */
const unsigned short FAR *base; /* base value table to use */
const unsigned short FAR *extra; /* extra bits table to use */
@@ -62,7 +62,7 @@ unsigned short FAR *work;
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
- 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 201, 196};
+ 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 73, 195};
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
@@ -115,15 +115,15 @@ unsigned short FAR *work;
if (count[max] != 0) break;
if (root > max) root = max;
if (max == 0) { /* no symbols to code at all */
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)1;
- this.val = (unsigned short)0;
- *(*table)++ = this; /* make a table to force an error */
- *(*table)++ = this;
+ here.op = (unsigned char)64; /* invalid code marker */
+ here.bits = (unsigned char)1;
+ here.val = (unsigned short)0;
+ *(*table)++ = here; /* make a table to force an error */
+ *(*table)++ = here;
*bits = 1;
return 0; /* no symbols, but wait for decoding to report error */
}
- for (min = 1; min <= MAXBITS; min++)
+ for (min = 1; min < max; min++)
if (count[min] != 0) break;
if (root < min) root = min;
@@ -166,11 +166,10 @@ unsigned short FAR *work;
entered in the tables.
used keeps track of how many table entries have been allocated from the
- provided *table space. It is checked when a LENS table is being made
- against the space in *table, ENOUGH, minus the maximum space needed by
- the worst case distance code, MAXD. This should never happen, but the
- sufficiency of ENOUGH has not been proven exhaustively, hence the check.
- This assumes that when type == LENS, bits == 9.
+ provided *table space. It is checked for LENS and DIST tables against
+ the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in
+ the initial root table size constants. See the comments in inftrees.h
+ for more information.
sym increments through all symbols, and the loop terminates when
all codes of length max, i.e. all codes, have been processed. This
@@ -209,24 +208,25 @@ unsigned short FAR *work;
mask = used - 1; /* mask for comparing low */
/* check available table space */
- if (type == LENS && used >= ENOUGH - MAXD)
+ if ((type == LENS && used >= ENOUGH_LENS) ||
+ (type == DISTS && used >= ENOUGH_DISTS))
return 1;
/* process all codes and make table entries */
for (;;) {
/* create table entry */
- this.bits = (unsigned char)(len - drop);
+ here.bits = (unsigned char)(len - drop);
if ((int)(work[sym]) < end) {
- this.op = (unsigned char)0;
- this.val = work[sym];
+ here.op = (unsigned char)0;
+ here.val = work[sym];
}
else if ((int)(work[sym]) > end) {
- this.op = (unsigned char)(extra[work[sym]]);
- this.val = base[work[sym]];
+ here.op = (unsigned char)(extra[work[sym]]);
+ here.val = base[work[sym]];
}
else {
- this.op = (unsigned char)(32 + 64); /* end of block */
- this.val = 0;
+ here.op = (unsigned char)(32 + 64); /* end of block */
+ here.val = 0;
}
/* replicate for those indices with low len bits equal to huff */
@@ -235,7 +235,7 @@ unsigned short FAR *work;
min = fill; /* save offset to next table */
do {
fill -= incr;
- next[(huff >> drop) + fill] = this;
+ next[(huff >> drop) + fill] = here;
} while (fill != 0);
/* backwards increment the len-bit code huff */
@@ -277,7 +277,8 @@ unsigned short FAR *work;
/* check for enough space */
used += 1U << curr;
- if (type == LENS && used >= ENOUGH - MAXD)
+ if ((type == LENS && used >= ENOUGH_LENS) ||
+ (type == DISTS && used >= ENOUGH_DISTS))
return 1;
/* point entry in root table to sub-table */
@@ -295,20 +296,20 @@ unsigned short FAR *work;
through high index bits. When the current sub-table is filled, the loop
drops back to the root table to fill in any remaining entries there.
*/
- this.op = (unsigned char)64; /* invalid code marker */
- this.bits = (unsigned char)(len - drop);
- this.val = (unsigned short)0;
+ here.op = (unsigned char)64; /* invalid code marker */
+ here.bits = (unsigned char)(len - drop);
+ here.val = (unsigned short)0;
while (huff != 0) {
/* when done with sub-table, drop back to root table */
if (drop != 0 && (huff & mask) != low) {
drop = 0;
len = root;
next = *table;
- this.bits = (unsigned char)len;
+ here.bits = (unsigned char)len;
}
/* put invalid code marker in table */
- next[huff >> drop] = this;
+ next[huff >> drop] = here;
/* backwards increment the len-bit code huff */
incr = 1U << (len - 1);
diff --git a/src/3rdparty/zlib/inftrees.h b/src/3rdparty/zlib/inftrees.h
index b1104c8..baa53a0 100644
--- a/src/3rdparty/zlib/inftrees.h
+++ b/src/3rdparty/zlib/inftrees.h
@@ -1,5 +1,5 @@
/* inftrees.h -- header to use inftrees.c
- * Copyright (C) 1995-2005 Mark Adler
+ * Copyright (C) 1995-2005, 2010 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -35,21 +35,28 @@ typedef struct {
01000000 - invalid code
*/
-/* Maximum size of dynamic tree. The maximum found in a long but non-
- exhaustive search was 1444 code structures (852 for length/literals
- and 592 for distances, the latter actually the result of an
- exhaustive search). The true maximum is not known, but the value
- below is more than safe. */
-#define ENOUGH 2048
-#define MAXD 592
+/* Maximum size of the dynamic table. The maximum number of code structures is
+ 1444, which is the sum of 852 for literal/length codes and 592 for distance
+ codes. These values were found by exhaustive searches using the program
+ examples/enough.c found in the zlib distribtution. The arguments to that
+ program are the number of symbols, the initial root table size, and the
+ maximum bit length of a code. "enough 286 9 15" for literal/length codes
+ returns returns 852, and "enough 30 6 15" for distance codes returns 592.
+ The initial root table size (9 or 6) is found in the fifth argument of the
+ inflate_table() calls in inflate.c and infback.c. If the root table size is
+ changed, then these maximum sizes would be need to be recalculated and
+ updated. */
+#define ENOUGH_LENS 852
+#define ENOUGH_DISTS 592
+#define ENOUGH (ENOUGH_LENS+ENOUGH_DISTS)
-/* Type of code to build for inftable() */
+/* Type of code to build for inflate_table() */
typedef enum {
CODES,
LENS,
DISTS
} codetype;
-extern int inflate_table OF((codetype type, unsigned short FAR *lens,
+int ZLIB_INTERNAL inflate_table OF((codetype type, unsigned short FAR *lens,
unsigned codes, code FAR * FAR *table,
unsigned FAR *bits, unsigned short FAR *work));
diff --git a/src/3rdparty/zlib/make_vms.com b/src/3rdparty/zlib/make_vms.com
deleted file mode 100644
index c2a1fb5..0000000
--- a/src/3rdparty/zlib/make_vms.com
+++ /dev/null
@@ -1,461 +0,0 @@
-$! make libz under VMS written by
-$! Martin P.J. Zinser
-$! <zinser@zinser.no-ip.info or zinser@sysdev.deutsche-boerse.com>
-$!
-$ on error then goto err_exit
-$!
-$!
-$! Just some general constants...
-$!
-$ true = 1
-$ false = 0
-$ tmpnam = "temp_" + f$getjpi("","pid")
-$ SAY = "WRITE SYS$OUTPUT"
-$!
-$! Setup variables holding "config" information
-$!
-$ Make = ""
-$ name = "Zlib"
-$ version = "?.?.?"
-$ v_string = "ZLIB_VERSION"
-$ v_file = "zlib.h"
-$ ccopt = ""
-$ lopts = ""
-$ linkonly = false
-$ optfile = name + ".opt"
-$ its_decc = false
-$ its_vaxc = false
-$ its_gnuc = false
-$ axp = f$getsyi("HW_MODEL").ge.1024
-$ s_case = false
-$! Check for MMK/MMS
-$!
-$ If F$Search ("Sys$System:MMS.EXE") .nes. "" Then Make = "MMS"
-$ If F$Type (MMK) .eqs. "STRING" Then Make = "MMK"
-$!
-$!
-$ gosub find_version
-$!
-$ gosub check_opts
-$!
-$! Look for the compiler used
-$!
-$ gosub check_compiler
-$ if its_decc
-$ then
-$ ccopt = "/prefix=all" + ccopt
-$ if f$trnlnm("SYS") .eqs. ""
-$ then
-$ if axp
-$ then
-$ define sys sys$library:
-$ else
-$ ccopt = "/decc" + ccopt
-$ define sys decc$library_include:
-$ endif
-$ endif
-$ endif
-$ if its_vaxc .or. its_gnuc
-$ then
-$ if f$trnlnm("SYS").eqs."" then define sys sys$library:
-$ endif
-$!
-$! Build the thing plain or with mms
-$!
-$ write sys$output "Compiling Zlib sources ..."
-$ if make.eqs.""
-$ then
-$ dele example.obj;*,minigzip.obj;*
-$ CALL MAKE adler32.OBJ "CC ''CCOPT' adler32" -
- adler32.c zlib.h zconf.h
-$ CALL MAKE compress.OBJ "CC ''CCOPT' compress" -
- compress.c zlib.h zconf.h
-$ CALL MAKE crc32.OBJ "CC ''CCOPT' crc32" -
- crc32.c zlib.h zconf.h
-$ CALL MAKE deflate.OBJ "CC ''CCOPT' deflate" -
- deflate.c deflate.h zutil.h zlib.h zconf.h
-$ CALL MAKE gzio.OBJ "CC ''CCOPT' gzio" -
- gzio.c zutil.h zlib.h zconf.h
-$ CALL MAKE infback.OBJ "CC ''CCOPT' infback" -
- infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
-$ CALL MAKE inffast.OBJ "CC ''CCOPT' inffast" -
- inffast.c zutil.h zlib.h zconf.h inffast.h
-$ CALL MAKE inflate.OBJ "CC ''CCOPT' inflate" -
- inflate.c zutil.h zlib.h zconf.h infblock.h
-$ CALL MAKE inftrees.OBJ "CC ''CCOPT' inftrees" -
- inftrees.c zutil.h zlib.h zconf.h inftrees.h
-$ CALL MAKE trees.OBJ "CC ''CCOPT' trees" -
- trees.c deflate.h zutil.h zlib.h zconf.h
-$ CALL MAKE uncompr.OBJ "CC ''CCOPT' uncompr" -
- uncompr.c zlib.h zconf.h
-$ CALL MAKE zutil.OBJ "CC ''CCOPT' zutil" -
- zutil.c zutil.h zlib.h zconf.h
-$ write sys$output "Building Zlib ..."
-$ CALL MAKE libz.OLB "lib/crea libz.olb *.obj" *.OBJ
-$ write sys$output "Building example..."
-$ CALL MAKE example.OBJ "CC ''CCOPT' example" -
- example.c zlib.h zconf.h
-$ call make example.exe "LINK example,libz.olb/lib" example.obj libz.olb
-$ if f$search("x11vms:xvmsutils.olb") .nes. ""
-$ then
-$ write sys$output "Building minigzip..."
-$ CALL MAKE minigzip.OBJ "CC ''CCOPT' minigzip" -
- minigzip.c zlib.h zconf.h
-$ call make minigzip.exe -
- "LINK minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib" -
- minigzip.obj libz.olb
-$ endif
-$ else
-$ gosub crea_mms
-$ SAY "Make ''name' ''version' with ''Make' "
-$ 'make'
-$ endif
-$!
-$! Alpha gets a shareable image
-$!
-$ If axp
-$ Then
-$ gosub crea_olist
-$ write sys$output "Creating libzshr.exe"
-$ call anal_obj_axp modules.opt _link.opt
-$ if s_case
-$ then
-$ open/append optf modules.opt
-$ write optf "case_sensitive=YES"
-$ close optf
-$ endif
-$ LINK_'lopts'/SHARE=libzshr.exe modules.opt/opt,_link.opt/opt
-$ endif
-$ write sys$output "Zlib build completed"
-$ exit
-$CC_ERR:
-$ write sys$output "C compiler required to build ''name'"
-$ goto err_exit
-$ERR_EXIT:
-$ set message/facil/ident/sever/text
-$ write sys$output "Exiting..."
-$ exit 2
-$!
-$!
-$MAKE: SUBROUTINE !SUBROUTINE TO CHECK DEPENDENCIES
-$ V = 'F$Verify(0)
-$! P1 = What we are trying to make
-$! P2 = Command to make it
-$! P3 - P8 What it depends on
-$
-$ If F$Search(P1) .Eqs. "" Then Goto Makeit
-$ Time = F$CvTime(F$File(P1,"RDT"))
-$arg=3
-$Loop:
-$ Argument = P'arg
-$ If Argument .Eqs. "" Then Goto Exit
-$ El=0
-$Loop2:
-$ File = F$Element(El," ",Argument)
-$ If File .Eqs. " " Then Goto Endl
-$ AFile = ""
-$Loop3:
-$ OFile = AFile
-$ AFile = F$Search(File)
-$ If AFile .Eqs. "" .Or. AFile .Eqs. OFile Then Goto NextEl
-$ If F$CvTime(F$File(AFile,"RDT")) .Ges. Time Then Goto Makeit
-$ Goto Loop3
-$NextEL:
-$ El = El + 1
-$ Goto Loop2
-$EndL:
-$ arg=arg+1
-$ If arg .Le. 8 Then Goto Loop
-$ Goto Exit
-$
-$Makeit:
-$ VV=F$VERIFY(0)
-$ write sys$output P2
-$ 'P2
-$ VV='F$Verify(VV)
-$Exit:
-$ If V Then Set Verify
-$ENDSUBROUTINE
-$!------------------------------------------------------------------------------
-$!
-$! Check command line options and set symbols accordingly
-$!
-$ CHECK_OPTS:
-$ i = 1
-$ OPT_LOOP:
-$ if i .lt. 9
-$ then
-$ cparm = f$edit(p'i',"upcase")
-$ if cparm .eqs. "DEBUG"
-$ then
-$ ccopt = ccopt + "/noopt/deb"
-$ lopts = lopts + "/deb"
-$ endif
-$ if f$locate("CCOPT=",cparm) .lt. f$length(cparm)
-$ then
-$ start = f$locate("=",cparm) + 1
-$ len = f$length(cparm) - start
-$ ccopt = ccopt + f$extract(start,len,cparm)
-$ if f$locate("AS_IS",f$edit(ccopt,"UPCASE")) .lt. f$length(ccopt) -
- then s_case = true
-$ endif
-$ if cparm .eqs. "LINK" then linkonly = true
-$ if f$locate("LOPTS=",cparm) .lt. f$length(cparm)
-$ then
-$ start = f$locate("=",cparm) + 1
-$ len = f$length(cparm) - start
-$ lopts = lopts + f$extract(start,len,cparm)
-$ endif
-$ if f$locate("CC=",cparm) .lt. f$length(cparm)
-$ then
-$ start = f$locate("=",cparm) + 1
-$ len = f$length(cparm) - start
-$ cc_com = f$extract(start,len,cparm)
- if (cc_com .nes. "DECC") .and. -
- (cc_com .nes. "VAXC") .and. -
- (cc_com .nes. "GNUC")
-$ then
-$ write sys$output "Unsupported compiler choice ''cc_com' ignored"
-$ write sys$output "Use DECC, VAXC, or GNUC instead"
-$ else
-$ if cc_com .eqs. "DECC" then its_decc = true
-$ if cc_com .eqs. "VAXC" then its_vaxc = true
-$ if cc_com .eqs. "GNUC" then its_gnuc = true
-$ endif
-$ endif
-$ if f$locate("MAKE=",cparm) .lt. f$length(cparm)
-$ then
-$ start = f$locate("=",cparm) + 1
-$ len = f$length(cparm) - start
-$ mmks = f$extract(start,len,cparm)
-$ if (mmks .eqs. "MMK") .or. (mmks .eqs. "MMS")
-$ then
-$ make = mmks
-$ else
-$ write sys$output "Unsupported make choice ''mmks' ignored"
-$ write sys$output "Use MMK or MMS instead"
-$ endif
-$ endif
-$ i = i + 1
-$ goto opt_loop
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Look for the compiler used
-$!
-$CHECK_COMPILER:
-$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
-$ then
-$ its_decc = (f$search("SYS$SYSTEM:DECC$COMPILER.EXE") .nes. "")
-$ its_vaxc = .not. its_decc .and. (F$Search("SYS$System:VAXC.Exe") .nes. "")
-$ its_gnuc = .not. (its_decc .or. its_vaxc) .and. (f$trnlnm("gnu_cc") .nes. "")
-$ endif
-$!
-$! Exit if no compiler available
-$!
-$ if (.not. (its_decc .or. its_vaxc .or. its_gnuc))
-$ then goto CC_ERR
-$ else
-$ if its_decc then write sys$output "CC compiler check ... Compaq C"
-$ if its_vaxc then write sys$output "CC compiler check ... VAX C"
-$ if its_gnuc then write sys$output "CC compiler check ... GNU C"
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! If MMS/MMK are available dump out the descrip.mms if required
-$!
-$CREA_MMS:
-$ write sys$output "Creating descrip.mms..."
-$ create descrip.mms
-$ open/append out descrip.mms
-$ copy sys$input: out
-$ deck
-# descrip.mms: MMS description file for building zlib on VMS
-# written by Martin P.J. Zinser
-# <zinser@zinser.no-ip.info or zinser@sysdev.deutsche-boerse.com>
-
-OBJS = adler32.obj, compress.obj, crc32.obj, gzio.obj, uncompr.obj, infback.obj\
- deflate.obj, trees.obj, zutil.obj, inflate.obj, \
- inftrees.obj, inffast.obj
-
-$ eod
-$ write out "CFLAGS=", ccopt
-$ write out "LOPTS=", lopts
-$ copy sys$input: out
-$ deck
-
-all : example.exe minigzip.exe libz.olb
- @ write sys$output " Example applications available"
-
-libz.olb : libz.olb($(OBJS))
- @ write sys$output " libz available"
-
-example.exe : example.obj libz.olb
- link $(LOPTS) example,libz.olb/lib
-
-minigzip.exe : minigzip.obj libz.olb
- link $(LOPTS) minigzip,libz.olb/lib,x11vms:xvmsutils.olb/lib
-
-clean :
- delete *.obj;*,libz.olb;*,*.opt;*,*.exe;*
-
-
-# Other dependencies.
-adler32.obj : adler32.c zutil.h zlib.h zconf.h
-compress.obj : compress.c zlib.h zconf.h
-crc32.obj : crc32.c zutil.h zlib.h zconf.h
-deflate.obj : deflate.c deflate.h zutil.h zlib.h zconf.h
-example.obj : example.c zlib.h zconf.h
-gzio.obj : gzio.c zutil.h zlib.h zconf.h
-inffast.obj : inffast.c zutil.h zlib.h zconf.h inftrees.h inffast.h
-inflate.obj : inflate.c zutil.h zlib.h zconf.h
-inftrees.obj : inftrees.c zutil.h zlib.h zconf.h inftrees.h
-minigzip.obj : minigzip.c zlib.h zconf.h
-trees.obj : trees.c deflate.h zutil.h zlib.h zconf.h
-uncompr.obj : uncompr.c zlib.h zconf.h
-zutil.obj : zutil.c zutil.h zlib.h zconf.h
-infback.obj : infback.c zutil.h inftrees.h inflate.h inffast.h inffixed.h
-$ eod
-$ close out
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Read list of core library sources from makefile.in and create options
-$! needed to build shareable image
-$!
-$CREA_OLIST:
-$ open/read min makefile.in
-$ open/write mod modules.opt
-$ src_check = "OBJS ="
-$MRLOOP:
-$ read/end=mrdone min rec
-$ if (f$extract(0,6,rec) .nes. src_check) then goto mrloop
-$ rec = rec - src_check
-$ gosub extra_filnam
-$ if (f$element(1,"\",rec) .eqs. "\") then goto mrdone
-$MRSLOOP:
-$ read/end=mrdone min rec
-$ gosub extra_filnam
-$ if (f$element(1,"\",rec) .nes. "\") then goto mrsloop
-$MRDONE:
-$ close min
-$ close mod
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Take record extracted in crea_olist and split it into single filenames
-$!
-$EXTRA_FILNAM:
-$ myrec = f$edit(rec - "\", "trim,compress")
-$ i = 0
-$FELOOP:
-$ srcfil = f$element(i," ", myrec)
-$ if (srcfil .nes. " ")
-$ then
-$ write mod f$parse(srcfil,,,"NAME"), ".obj"
-$ i = i + 1
-$ goto feloop
-$ endif
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Find current Zlib version number
-$!
-$FIND_VERSION:
-$ open/read h_in 'v_file'
-$hloop:
-$ read/end=hdone h_in rec
-$ rec = f$edit(rec,"TRIM")
-$ if (f$extract(0,1,rec) .nes. "#") then goto hloop
-$ rec = f$edit(rec - "#", "TRIM")
-$ if f$element(0," ",rec) .nes. "define" then goto hloop
-$ if f$element(1," ",rec) .eqs. v_string
-$ then
-$ version = 'f$element(2," ",rec)'
-$ goto hdone
-$ endif
-$ goto hloop
-$hdone:
-$ close h_in
-$ return
-$!------------------------------------------------------------------------------
-$!
-$! Analyze Object files for OpenVMS AXP to extract Procedure and Data
-$! information to build a symbol vector for a shareable image
-$! All the "brains" of this logic was suggested by Hartmut Becker
-$! (Hartmut.Becker@compaq.com). All the bugs were introduced by me
-$! (zinser@decus.de), so if you do have problem reports please do not
-$! bother Hartmut/HP, but get in touch with me
-$!
-$ ANAL_OBJ_AXP: Subroutine
-$ V = 'F$Verify(0)
-$ SAY := "WRITE_ SYS$OUTPUT"
-$
-$ IF F$SEARCH("''P1'") .EQS. ""
-$ THEN
-$ SAY "ANAL_OBJ_AXP-E-NOSUCHFILE: Error, inputfile ''p1' not available"
-$ goto exit_aa
-$ ENDIF
-$ IF "''P2'" .EQS. ""
-$ THEN
-$ SAY "ANAL_OBJ_AXP: Error, no output file provided"
-$ goto exit_aa
-$ ENDIF
-$
-$ open/read in 'p1
-$ create a.tmp
-$ open/append atmp a.tmp
-$ loop:
-$ read/end=end_loop in line
-$ f= f$search(line)
-$ if f .eqs. ""
-$ then
-$ write sys$output "ANAL_OBJ_AXP-w-nosuchfile, ''line'"
-$ goto loop
-$ endif
-$ define/user sys$output nl:
-$ define/user sys$error nl:
-$ anal/obj/gsd 'f /out=x.tmp
-$ open/read xtmp x.tmp
-$ XLOOP:
-$ read/end=end_xloop xtmp xline
-$ xline = f$edit(xline,"compress")
-$ write atmp xline
-$ goto xloop
-$ END_XLOOP:
-$ close xtmp
-$ goto loop
-$ end_loop:
-$ close in
-$ close atmp
-$ if f$search("a.tmp") .eqs. "" -
- then $ exit
-$ ! all global definitions
-$ search a.tmp "symbol:","EGSY$V_DEF 1","EGSY$V_NORM 1"/out=b.tmp
-$ ! all procedures
-$ search b.tmp "EGSY$V_NORM 1"/wind=(0,1) /out=c.tmp
-$ search c.tmp "symbol:"/out=d.tmp
-$ define/user sys$output nl:
-$ edito/edt/command=sys$input d.tmp
-sub/symbol: "/symbol_vector=(/whole
-sub/"/=PROCEDURE)/whole
-exit
-$ ! all data
-$ search b.tmp "EGSY$V_DEF 1"/wind=(0,1) /out=e.tmp
-$ search e.tmp "symbol:"/out=f.tmp
-$ define/user sys$output nl:
-$ edito/edt/command=sys$input f.tmp
-sub/symbol: "/symbol_vector=(/whole
-sub/"/=DATA)/whole
-exit
-$ sort/nodupl d.tmp,f.tmp 'p2'
-$ delete a.tmp;*,b.tmp;*,c.tmp;*,d.tmp;*,e.tmp;*,f.tmp;*
-$ if f$search("x.tmp") .nes. "" -
- then $ delete x.tmp;*
-$!
-$ EXIT_AA:
-$ if V then set verify
-$ endsubroutine
-$!------------------------------------------------------------------------------
diff --git a/src/3rdparty/zlib/minigzip.c b/src/3rdparty/zlib/minigzip.c
index 4524b96..9825ccc 100644
--- a/src/3rdparty/zlib/minigzip.c
+++ b/src/3rdparty/zlib/minigzip.c
@@ -1,5 +1,5 @@
/* minigzip.c -- simulate gzip using the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2006, 2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -15,8 +15,8 @@
/* @(#) $Id$ */
-#include <stdio.h>
#include "zlib.h"
+#include <stdio.h>
#ifdef STDC
# include <string.h>
@@ -32,6 +32,9 @@
#if defined(MSDOS) || defined(OS2) || defined(WIN32) || defined(__CYGWIN__)
# include <fcntl.h>
# include <io.h>
+# ifdef UNDER_CE
+# include <stdlib.h>
+# endif
# define SET_BINARY_MODE(file) setmode(fileno(file), O_BINARY)
#else
# define SET_BINARY_MODE(file)
@@ -50,9 +53,75 @@
# include <unix.h> /* for fileno */
#endif
+#if !defined(Z_HAVE_UNISTD_H) && !defined(_LARGEFILE64_SOURCE)
#ifndef WIN32 /* unlink already in stdio.h for WIN32 */
extern int unlink OF((const char *));
#endif
+#endif
+
+#if defined(UNDER_CE)
+# include <windows.h>
+# define perror(s) pwinerror(s)
+
+/* Map the Windows error number in ERROR to a locale-dependent error
+ message string and return a pointer to it. Typically, the values
+ for ERROR come from GetLastError.
+
+ The string pointed to shall not be modified by the application,
+ but may be overwritten by a subsequent call to strwinerror
+
+ The strwinerror function does not change the current setting
+ of GetLastError. */
+
+static char *strwinerror (error)
+ DWORD error;
+{
+ static char buf[1024];
+
+ wchar_t *msgbuf;
+ DWORD lasterr = GetLastError();
+ DWORD chars = FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM
+ | FORMAT_MESSAGE_ALLOCATE_BUFFER,
+ NULL,
+ error,
+ 0, /* Default language */
+ (LPVOID)&msgbuf,
+ 0,
+ NULL);
+ if (chars != 0) {
+ /* If there is an \r\n appended, zap it. */
+ if (chars >= 2
+ && msgbuf[chars - 2] == '\r' && msgbuf[chars - 1] == '\n') {
+ chars -= 2;
+ msgbuf[chars] = 0;
+ }
+
+ if (chars > sizeof (buf) - 1) {
+ chars = sizeof (buf) - 1;
+ msgbuf[chars] = 0;
+ }
+
+ wcstombs(buf, msgbuf, chars + 1);
+ LocalFree(msgbuf);
+ }
+ else {
+ sprintf(buf, "unknown win32 error (%ld)", error);
+ }
+
+ SetLastError(lasterr);
+ return buf;
+}
+
+static void pwinerror (s)
+ const char *s;
+{
+ if (s && *s)
+ fprintf(stderr, "%s: %s\n", s, strwinerror(GetLastError ()));
+ else
+ fprintf(stderr, "%s\n", strwinerror(GetLastError ()));
+}
+
+#endif /* UNDER_CE */
#ifndef GZ_SUFFIX
# define GZ_SUFFIX ".gz"
@@ -198,6 +267,11 @@ void file_compress(file, mode)
FILE *in;
gzFile out;
+ if (strlen(file) + strlen(GZ_SUFFIX) >= sizeof(outfile)) {
+ fprintf(stderr, "%s: filename too long\n", prog);
+ exit(1);
+ }
+
strcpy(outfile, file);
strcat(outfile, GZ_SUFFIX);
@@ -227,7 +301,12 @@ void file_uncompress(file)
char *infile, *outfile;
FILE *out;
gzFile in;
- uInt len = (uInt)strlen(file);
+ size_t len = strlen(file);
+
+ if (len + strlen(GZ_SUFFIX) >= sizeof(buf)) {
+ fprintf(stderr, "%s: filename too long\n", prog);
+ exit(1);
+ }
strcpy(buf, file);
@@ -258,7 +337,8 @@ void file_uncompress(file)
/* ===========================================================================
- * Usage: minigzip [-d] [-f] [-h] [-r] [-1 to -9] [files...]
+ * Usage: minigzip [-c] [-d] [-f] [-h] [-r] [-1 to -9] [files...]
+ * -c : write to standard output
* -d : decompress
* -f : compress with Z_FILTERED
* -h : compress with Z_HUFFMAN_ONLY
@@ -270,17 +350,30 @@ int main(argc, argv)
int argc;
char *argv[];
{
+ int copyout = 0;
int uncompr = 0;
gzFile file;
- char outmode[20];
+ char *bname, outmode[20];
strcpy(outmode, "wb6 ");
prog = argv[0];
+ bname = strrchr(argv[0], '/');
+ if (bname)
+ bname++;
+ else
+ bname = argv[0];
argc--, argv++;
+ if (!strcmp(bname, "gunzip"))
+ uncompr = 1;
+ else if (!strcmp(bname, "zcat"))
+ copyout = uncompr = 1;
+
while (argc > 0) {
- if (strcmp(*argv, "-d") == 0)
+ if (strcmp(*argv, "-c") == 0)
+ copyout = 1;
+ else if (strcmp(*argv, "-d") == 0)
uncompr = 1;
else if (strcmp(*argv, "-f") == 0)
outmode[3] = 'f';
@@ -310,11 +403,36 @@ int main(argc, argv)
gz_compress(stdin, file);
}
} else {
+ if (copyout) {
+ SET_BINARY_MODE(stdout);
+ }
do {
if (uncompr) {
- file_uncompress(*argv);
+ if (copyout) {
+ file = gzopen(*argv, "rb");
+ if (file == NULL)
+ fprintf(stderr, "%s: can't gzopen %s\n", prog, *argv);
+ else
+ gz_uncompress(file, stdout);
+ } else {
+ file_uncompress(*argv);
+ }
} else {
- file_compress(*argv, outmode);
+ if (copyout) {
+ FILE * in = fopen(*argv, "rb");
+
+ if (in == NULL) {
+ perror(*argv);
+ } else {
+ file = gzdopen(fileno(stdout), outmode);
+ if (file == NULL) error("can't gzdopen stdout");
+
+ gz_compress(in, file);
+ }
+
+ } else {
+ file_compress(*argv, outmode);
+ }
}
} while (argv++, --argc);
}
diff --git a/src/3rdparty/zlib/projects/README.projects b/src/3rdparty/zlib/projects/README.projects
deleted file mode 100644
index 1c029e4..0000000
--- a/src/3rdparty/zlib/projects/README.projects
+++ /dev/null
@@ -1,41 +0,0 @@
-This directory contains project files for building zlib under various
-Integrated Development Environments (IDE).
-
-If you wish to submit a new project to this directory, you should comply
-to the following requirements. Otherwise (e.g. if you wish to integrate
-a custom piece of code that changes the zlib interface or its behavior),
-please consider submitting the project to the contrib directory.
-
-
-Requirements
-============
-
-- The project must build zlib using the source files from the official
- zlib source distribution, exclusively.
-
-- If the project produces redistributable builds (e.g. shared objects
- or DLL files), these builds must be compatible to those produced by
- makefiles, if such makefiles exist in the zlib distribution.
- In particular, if the project produces a DLL build for the Win32
- platform, this build must comply to the officially-ammended Win32 DLL
- Application Binary Interface (ABI), described in win32/DLL_FAQ.txt.
-
-- The project may provide additional build targets, which depend on
- 3rd-party (unofficially-supported) software, present in the contrib
- directory. For example, it is possible to provide an "ASM build",
- besides the officially-supported build, and have ASM source files
- among its dependencies.
-
-- If there are significant differences between the project files created
- by different versions of an IDE (e.g. Visual C++ 6.0 vs. 7.0), the name
- of the project directory should contain the version number of the IDE
- for which the project is intended (e.g. "visualc6" for Visual C++ 6.0,
- or "visualc7" for Visual C++ 7.0 and 7.1).
-
-
-Current projects
-================
-
-visualc6/ by Simon-Pierre Cadieux <methodex@methodex.ca>
- and Cosmin Truta <cosmint@cs.ubbcluj.ro>
- Project for Microsoft Visual C++ 6.0
diff --git a/src/3rdparty/zlib/projects/visualc6/README.txt b/src/3rdparty/zlib/projects/visualc6/README.txt
deleted file mode 100644
index d0296c2..0000000
--- a/src/3rdparty/zlib/projects/visualc6/README.txt
+++ /dev/null
@@ -1,73 +0,0 @@
-Microsoft Developer Studio Project Files, Format Version 6.00 for zlib.
-
-Copyright (C) 2000-2004 Simon-Pierre Cadieux.
-Copyright (C) 2004 Cosmin Truta.
-For conditions of distribution and use, see copyright notice in zlib.h.
-
-
-This project builds the zlib binaries as follows:
-
-* Win32_DLL_Release\zlib1.dll DLL build
-* Win32_DLL_Debug\zlib1d.dll DLL build (debug version)
-* Win32_DLL_ASM_Release\zlib1.dll DLL build using ASM code
-* Win32_DLL_ASM_Debug\zlib1d.dll DLL build using ASM code (debug version)
-* Win32_LIB_Release\zlib.lib static build
-* Win32_LIB_Debug\zlibd.lib static build (debug version)
-* Win32_LIB_ASM_Release\zlib.lib static build using ASM code
-* Win32_LIB_ASM_Debug\zlibd.lib static build using ASM code (debug version)
-
-
-For more information regarding the DLL builds, please see the DLL FAQ
-in ..\..\win32\DLL_FAQ.txt.
-
-
-To build and test:
-
-1) On the main menu, select "File | Open Workspace".
- Open "zlib.dsw".
-
-2) Select "Build | Set Active Configuration".
- Choose the configuration you wish to build.
-
-3) Select "Build | Clean".
-
-4) Select "Build | Build ... (F7)". Ignore warning messages about
- not being able to find certain include files (e.g. alloc.h).
-
-5) If you built one of the sample programs (example or minigzip),
- select "Build | Execute ... (Ctrl+F5)".
-
-
-To use:
-
-1) Select "Project | Settings (Alt+F7)".
- Make note of the configuration names used in your project.
- Usually, these names are "Win32 Release" and "Win32 Debug".
-
-2) In the Workspace window, select the "FileView" tab.
- Right-click on the root item "Workspace '...'".
- Select "Insert Project into Workspace".
- Switch on the checkbox "Dependency of:", and select the name
- of your project. Open "zlib.dsp".
-
-3) Select "Build | Configurations".
- For each configuration of your project:
- 3.1) Choose the zlib configuration you wish to use.
- 3.2) Click on "Add".
- 3.3) Set the new zlib configuration name to the name used by
- the configuration from the current iteration.
-
-4) Select "Build | Set Active Configuration".
- Choose the configuration you wish to build.
-
-5) Select "Build | Build ... (F7)".
-
-6) If you built an executable program, select
- "Build | Execute ... (Ctrl+F5)".
-
-
-Note:
-
-To build the ASM-enabled code, you need Microsoft Assembler
-(ML.EXE). You can get it by downloading and installing the
-latest Processor Pack for Visual C++ 6.0.
diff --git a/src/3rdparty/zlib/projects/visualc6/example.dsp b/src/3rdparty/zlib/projects/visualc6/example.dsp
deleted file mode 100644
index e072a37..0000000
--- a/src/3rdparty/zlib/projects/visualc6/example.dsp
+++ /dev/null
@@ -1,278 +0,0 @@
-# Microsoft Developer Studio Project File - Name="example" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=example - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "example.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "example.mak" CFG="example - Win32 LIB Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "example - Win32 DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "example - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "example - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "example - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "example - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "example - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "example - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "example___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "example - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "example___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "example___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "example - Win32 DLL Release"
-# Name "example - Win32 DLL Debug"
-# Name "example - Win32 DLL ASM Release"
-# Name "example - Win32 DLL ASM Debug"
-# Name "example - Win32 LIB Release"
-# Name "example - Win32 LIB Debug"
-# Name "example - Win32 LIB ASM Release"
-# Name "example - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\example.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/zlib/projects/visualc6/minigzip.dsp b/src/3rdparty/zlib/projects/visualc6/minigzip.dsp
deleted file mode 100644
index f32024e..0000000
--- a/src/3rdparty/zlib/projects/visualc6/minigzip.dsp
+++ /dev/null
@@ -1,278 +0,0 @@
-# Microsoft Developer Studio Project File - Name="minigzip" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Console Application" 0x0103
-
-CFG=minigzip - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "minigzip.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "minigzip.mak" CFG="minigzip - Win32 LIB Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "minigzip - Win32 DLL Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 DLL ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB ASM Release" (based on "Win32 (x86) Console Application")
-!MESSAGE "minigzip - Win32 LIB ASM Debug" (based on "Win32 (x86) Console Application")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-CPP=cl.exe
-RSC=rc.exe
-
-!IF "$(CFG)" == "minigzip - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "minigzip - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "minigzip - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "minigzip - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
-# ADD LINK32 /nologo /subsystem:console /machine:I386
-
-!ELSEIF "$(CFG)" == "minigzip - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "minigzip___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "minigzip___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
-
-!ENDIF
-
-# Begin Target
-
-# Name "minigzip - Win32 DLL Release"
-# Name "minigzip - Win32 DLL Debug"
-# Name "minigzip - Win32 DLL ASM Release"
-# Name "minigzip - Win32 DLL ASM Debug"
-# Name "minigzip - Win32 LIB Release"
-# Name "minigzip - Win32 LIB Debug"
-# Name "minigzip - Win32 LIB ASM Release"
-# Name "minigzip - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\minigzip.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# End Group
-# End Target
-# End Project
diff --git a/src/3rdparty/zlib/projects/visualc6/zlib.dsp b/src/3rdparty/zlib/projects/visualc6/zlib.dsp
deleted file mode 100644
index 0fe0604..0000000
--- a/src/3rdparty/zlib/projects/visualc6/zlib.dsp
+++ /dev/null
@@ -1,609 +0,0 @@
-# Microsoft Developer Studio Project File - Name="zlib" - Package Owner=<4>
-# Microsoft Developer Studio Generated Build File, Format Version 6.00
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
-# TARGTYPE "Win32 (x86) Static Library" 0x0104
-
-CFG=zlib - Win32 LIB Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE
-!MESSAGE NMAKE /f "zlib.mak".
-!MESSAGE
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
-!MESSAGE NMAKE /f "zlib.mak" CFG="zlib - Win32 LIB Debug"
-!MESSAGE
-!MESSAGE Possible choices for configuration are:
-!MESSAGE
-!MESSAGE "zlib - Win32 DLL Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL ASM Release" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 DLL ASM Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE "zlib - Win32 LIB Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB ASM Release" (based on "Win32 (x86) Static Library")
-!MESSAGE "zlib - Win32 LIB ASM Debug" (based on "Win32 (x86) Static Library")
-!MESSAGE
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-
-!IF "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_DLL_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_Release"
-# PROP Intermediate_Dir "Win32_DLL_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_Release\zlib1.dll"
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_DLL_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_Debug"
-# PROP Intermediate_Dir "Win32_DLL_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_Debug\zlib1d.dll" /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_DLL_ASM_Release"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Release"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
-# ADD LINK32 /nologo /dll /machine:I386 /out:"Win32_DLL_ASM_Release\zlib1.dll"
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_DLL_ASM_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_DLL_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_DLL_ASM_Debug"
-# PROP Intermediate_Dir "Win32_DLL_ASM_Debug"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-MTL=midl.exe
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
-# ADD LINK32 /nologo /dll /debug /machine:I386 /out:"Win32_DLL_ASM_Debug\zlib1d.dll" /pdbtype:sept
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_LIB_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_Release"
-# PROP Intermediate_Dir "Win32_LIB_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_LIB_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_Debug"
-# PROP Intermediate_Dir "Win32_LIB_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_Debug\zlibd.lib"
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Release"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Release"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "Win32_LIB_ASM_Release"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Release"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /FD /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MD /W3 /O2 /D "WIN32" /D "NDEBUG" /D "ASMV" /D "ASMINF" /FD /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "NDEBUG"
-# ADD RSC /l 0x409 /d "NDEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "zlib___Win32_LIB_ASM_Debug"
-# PROP BASE Intermediate_Dir "zlib___Win32_LIB_ASM_Debug"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "Win32_LIB_ASM_Debug"
-# PROP Intermediate_Dir "Win32_LIB_ASM_Debug"
-# PROP Target_Dir ""
-CPP=cl.exe
-# ADD BASE CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /FD /GZ /c
-# SUBTRACT BASE CPP /YX /Yc /Yu
-# ADD CPP /nologo /MDd /W3 /Gm /ZI /Od /D "WIN32" /D "_DEBUG" /D "ASMV" /D "ASMINF" /FD /GZ /c
-# SUBTRACT CPP /YX /Yc /Yu
-RSC=rc.exe
-# ADD BASE RSC /l 0x409 /d "_DEBUG"
-# ADD RSC /l 0x409 /d "_DEBUG"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"Win32_LIB_ASM_Debug\zlibd.lib"
-
-!ENDIF
-
-# Begin Target
-
-# Name "zlib - Win32 DLL Release"
-# Name "zlib - Win32 DLL Debug"
-# Name "zlib - Win32 DLL ASM Release"
-# Name "zlib - Win32 DLL ASM Debug"
-# Name "zlib - Win32 LIB Release"
-# Name "zlib - Win32 LIB Debug"
-# Name "zlib - Win32 LIB ASM Release"
-# Name "zlib - Win32 LIB ASM Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\adler32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\compress.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\crc32.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\deflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\gzio.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\infback.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffast.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inflate.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inftrees.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\trees.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\uncompr.c
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\win32\zlib.def
-
-!IF "$(CFG)" == "zlib - Win32 DLL Release"
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# PROP Exclude_From_Build 1
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zutil.c
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Source File
-
-SOURCE=..\..\crc32.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\deflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffast.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inffixed.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inflate.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\inftrees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\trees.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zconf.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zlib.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\zutil.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# Begin Source File
-
-SOURCE=..\..\win32\zlib1.rc
-# End Source File
-# End Group
-# Begin Group "Assembler Files (Unsupported)"
-
-# PROP Default_Filter "asm;obj;c;cpp;cxx;h;hpp;hxx"
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\gvmat32.asm
-
-!IF "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Release
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Debug
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Release
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Debug
-InputPath=..\..\contrib\masmx86\gvmat32.asm
-InputName=gvmat32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\gvmat32c.c
-
-!IF "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-# ADD CPP /I "..\.."
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# ADD CPP /I "..\.."
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# ADD CPP /I "..\.."
-
-!ENDIF
-
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\contrib\masmx86\inffas32.asm
-
-!IF "$(CFG)" == "zlib - Win32 DLL Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Release
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "zlib - Win32 DLL ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_DLL_ASM_Debug
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Release"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB Debug"
-
-# PROP Exclude_From_Build 1
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Release"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Release
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml.exe /nologo /c /coff /Cx /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ELSEIF "$(CFG)" == "zlib - Win32 LIB ASM Debug"
-
-# Begin Custom Build - Assembling...
-IntDir=.\Win32_LIB_ASM_Debug
-InputPath=..\..\contrib\masmx86\inffas32.asm
-InputName=inffas32
-
-"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
- ml.exe /nologo /c /coff /Cx /Zi /Fo"$(IntDir)\$(InputName).obj" "$(InputPath)"
-
-# End Custom Build
-
-!ENDIF
-
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=.\README.txt
-# End Source File
-# End Target
-# End Project
diff --git a/src/3rdparty/zlib/projects/visualc6/zlib.dsw b/src/3rdparty/zlib/projects/visualc6/zlib.dsw
deleted file mode 100644
index 3a771fc..0000000
--- a/src/3rdparty/zlib/projects/visualc6/zlib.dsw
+++ /dev/null
@@ -1,59 +0,0 @@
-Microsoft Developer Studio Workspace File, Format Version 6.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "example"=.\example.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name zlib
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "minigzip"=.\minigzip.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
- Begin Project Dependency
- Project_Dep_Name zlib
- End Project Dependency
-}}}
-
-###############################################################################
-
-Project: "zlib"=.\zlib.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
diff --git a/src/3rdparty/zlib/treebuild.xml b/src/3rdparty/zlib/treebuild.xml
new file mode 100644
index 0000000..6b8f542
--- /dev/null
+++ b/src/3rdparty/zlib/treebuild.xml
@@ -0,0 +1,116 @@
+<?xml version="1.0" ?>
+<package name="zlib" version="1.2.5">
+ <library name="zlib" dlversion="1.2.5" dlname="z">
+ <property name="description"> zip compression library </property>
+ <property name="include-target-dir" value="$(@PACKAGE/install-includedir)" />
+
+ <!-- fixme: not implemented yet -->
+ <property name="compiler/c/inline" value="yes" />
+
+ <include-file name="zlib.h" scope="public" mode="644" />
+ <include-file name="zconf.h" scope="public" mode="644" />
+
+ <source name="adler32.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ </source>
+ <source name="compress.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ </source>
+ <source name="crc32.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="crc32.h" />
+ </source>
+ <source name="gzclose.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="gzguts.h" />
+ </source>
+ <source name="gzlib.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="gzguts.h" />
+ </source>
+ <source name="gzread.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="gzguts.h" />
+ </source>
+ <source name="gzwrite.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="gzguts.h" />
+ </source>
+ <source name="uncompr.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ </source>
+ <source name="deflate.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="deflate.h" />
+ </source>
+ <source name="trees.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="deflate.h" />
+ <depend name="trees.h" />
+ </source>
+ <source name="zutil.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ </source>
+ <source name="inflate.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="inftrees.h" />
+ <depend name="inflate.h" />
+ <depend name="inffast.h" />
+ </source>
+ <source name="infback.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="inftrees.h" />
+ <depend name="inflate.h" />
+ <depend name="inffast.h" />
+ </source>
+ <source name="inftrees.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="inftrees.h" />
+ </source>
+ <source name="inffast.c">
+ <depend name="zlib.h" />
+ <depend name="zconf.h" />
+ <depend name="zutil.h" />
+ <depend name="inftrees.h" />
+ <depend name="inflate.h" />
+ <depend name="inffast.h" />
+ </source>
+ </library>
+</package>
+
+<!--
+CFLAGS=-O
+#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
+#CFLAGS=-g -DDEBUG
+#CFLAGS=-O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
+# -Wstrict-prototypes -Wmissing-prototypes
+
+# OBJA =
+# to use the asm code: make OBJA=match.o
+#
+match.o: match.S
+ $(CPP) match.S > _match.s
+ $(CC) -c _match.s
+ mv _match.o match.o
+ rm -f _match.s
+-->
diff --git a/src/3rdparty/zlib/trees.c b/src/3rdparty/zlib/trees.c
index 395e4e1..56e9bb1 100644
--- a/src/3rdparty/zlib/trees.c
+++ b/src/3rdparty/zlib/trees.c
@@ -1,5 +1,6 @@
/* trees.c -- output deflated data using Huffman coding
- * Copyright (C) 1995-2005 Jean-loup Gailly
+ * Copyright (C) 1995-2010 Jean-loup Gailly
+ * detect_data_type() function provided freely by Cosmin Truta, 2006
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -152,7 +153,7 @@ local void send_all_trees OF((deflate_state *s, int lcodes, int dcodes,
int blcodes));
local void compress_block OF((deflate_state *s, ct_data *ltree,
ct_data *dtree));
-local void set_data_type OF((deflate_state *s));
+local int detect_data_type OF((deflate_state *s));
local unsigned bi_reverse OF((unsigned value, int length));
local void bi_windup OF((deflate_state *s));
local void bi_flush OF((deflate_state *s));
@@ -203,12 +204,12 @@ local void send_bits(s, value, length)
* unused bits in value.
*/
if (s->bi_valid > (int)Buf_size - length) {
- s->bi_buf |= (value << s->bi_valid);
+ s->bi_buf |= (ush)value << s->bi_valid;
put_short(s, s->bi_buf);
s->bi_buf = (ush)value >> (Buf_size - s->bi_valid);
s->bi_valid += length - Buf_size;
} else {
- s->bi_buf |= value << s->bi_valid;
+ s->bi_buf |= (ush)value << s->bi_valid;
s->bi_valid += length;
}
}
@@ -218,12 +219,12 @@ local void send_bits(s, value, length)
{ int len = length;\
if (s->bi_valid > (int)Buf_size - len) {\
int val = value;\
- s->bi_buf |= (val << s->bi_valid);\
+ s->bi_buf |= (ush)val << s->bi_valid;\
put_short(s, s->bi_buf);\
s->bi_buf = (ush)val >> (Buf_size - s->bi_valid);\
s->bi_valid += len - Buf_size;\
} else {\
- s->bi_buf |= (value) << s->bi_valid;\
+ s->bi_buf |= (ush)(value) << s->bi_valid;\
s->bi_valid += len;\
}\
}
@@ -250,11 +251,13 @@ local void tr_static_init()
if (static_init_done) return;
/* For some embedded targets, global variables are not initialized: */
+#ifdef NO_INIT_GLOBAL_POINTERS
static_l_desc.static_tree = static_ltree;
static_l_desc.extra_bits = extra_lbits;
static_d_desc.static_tree = static_dtree;
static_d_desc.extra_bits = extra_dbits;
static_bl_desc.extra_bits = extra_blbits;
+#endif
/* Initialize the mapping length (0..255) -> length code (0..28) */
length = 0;
@@ -348,13 +351,14 @@ void gen_trees_header()
static_dtree[i].Len, SEPARATOR(i, D_CODES-1, 5));
}
- fprintf(header, "const uch _dist_code[DIST_CODE_LEN] = {\n");
+ fprintf(header, "const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {\n");
for (i = 0; i < DIST_CODE_LEN; i++) {
fprintf(header, "%2u%s", _dist_code[i],
SEPARATOR(i, DIST_CODE_LEN-1, 20));
}
- fprintf(header, "const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
+ fprintf(header,
+ "const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {\n");
for (i = 0; i < MAX_MATCH-MIN_MATCH+1; i++) {
fprintf(header, "%2u%s", _length_code[i],
SEPARATOR(i, MAX_MATCH-MIN_MATCH, 20));
@@ -379,7 +383,7 @@ void gen_trees_header()
/* ===========================================================================
* Initialize the tree data structures for a new zlib stream.
*/
-void _tr_init(s)
+void ZLIB_INTERNAL _tr_init(s)
deflate_state *s;
{
tr_static_init();
@@ -864,13 +868,13 @@ local void send_all_trees(s, lcodes, dcodes, blcodes)
/* ===========================================================================
* Send a stored block
*/
-void _tr_stored_block(s, buf, stored_len, eof)
+void ZLIB_INTERNAL _tr_stored_block(s, buf, stored_len, last)
deflate_state *s;
charf *buf; /* input block */
ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
+ int last; /* one if this is the last block for a file */
{
- send_bits(s, (STORED_BLOCK<<1)+eof, 3); /* send block type */
+ send_bits(s, (STORED_BLOCK<<1)+last, 3); /* send block type */
#ifdef DEBUG
s->compressed_len = (s->compressed_len + 3 + 7) & (ulg)~7L;
s->compressed_len += (stored_len + 4) << 3;
@@ -889,7 +893,7 @@ void _tr_stored_block(s, buf, stored_len, eof)
* To simplify the code, we assume the worst case of last real code encoded
* on one bit only.
*/
-void _tr_align(s)
+void ZLIB_INTERNAL _tr_align(s)
deflate_state *s;
{
send_bits(s, STATIC_TREES<<1, 3);
@@ -918,11 +922,11 @@ void _tr_align(s)
* Determine the best encoding for the current block: dynamic trees, static
* trees or store, and output the encoded block to the zip file.
*/
-void _tr_flush_block(s, buf, stored_len, eof)
+void ZLIB_INTERNAL _tr_flush_block(s, buf, stored_len, last)
deflate_state *s;
charf *buf; /* input block, or NULL if too old */
ulg stored_len; /* length of input block */
- int eof; /* true if this is the last block for a file */
+ int last; /* one if this is the last block for a file */
{
ulg opt_lenb, static_lenb; /* opt_len and static_len in bytes */
int max_blindex = 0; /* index of last bit length code of non zero freq */
@@ -931,8 +935,8 @@ void _tr_flush_block(s, buf, stored_len, eof)
if (s->level > 0) {
/* Check if the file is binary or text */
- if (stored_len > 0 && s->strm->data_type == Z_UNKNOWN)
- set_data_type(s);
+ if (s->strm->data_type == Z_UNKNOWN)
+ s->strm->data_type = detect_data_type(s);
/* Construct the literal and distance trees */
build_tree(s, (tree_desc *)(&(s->l_desc)));
@@ -978,20 +982,20 @@ void _tr_flush_block(s, buf, stored_len, eof)
* successful. If LIT_BUFSIZE <= WSIZE, it is never too late to
* transform a block into a stored block.
*/
- _tr_stored_block(s, buf, stored_len, eof);
+ _tr_stored_block(s, buf, stored_len, last);
#ifdef FORCE_STATIC
} else if (static_lenb >= 0) { /* force static trees */
#else
} else if (s->strategy == Z_FIXED || static_lenb == opt_lenb) {
#endif
- send_bits(s, (STATIC_TREES<<1)+eof, 3);
+ send_bits(s, (STATIC_TREES<<1)+last, 3);
compress_block(s, (ct_data *)static_ltree, (ct_data *)static_dtree);
#ifdef DEBUG
s->compressed_len += 3 + s->static_len;
#endif
} else {
- send_bits(s, (DYN_TREES<<1)+eof, 3);
+ send_bits(s, (DYN_TREES<<1)+last, 3);
send_all_trees(s, s->l_desc.max_code+1, s->d_desc.max_code+1,
max_blindex+1);
compress_block(s, (ct_data *)s->dyn_ltree, (ct_data *)s->dyn_dtree);
@@ -1005,21 +1009,21 @@ void _tr_flush_block(s, buf, stored_len, eof)
*/
init_block(s);
- if (eof) {
+ if (last) {
bi_windup(s);
#ifdef DEBUG
s->compressed_len += 7; /* align on byte boundary */
#endif
}
Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
- s->compressed_len-7*eof));
+ s->compressed_len-7*last));
}
/* ===========================================================================
* Save the match info and tally the frequency counts. Return true if
* the current block must be flushed.
*/
-int _tr_tally (s, dist, lc)
+int ZLIB_INTERNAL _tr_tally (s, dist, lc)
deflate_state *s;
unsigned dist; /* distance of matched string */
unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
@@ -1118,24 +1122,45 @@ local void compress_block(s, ltree, dtree)
}
/* ===========================================================================
- * Set the data type to BINARY or TEXT, using a crude approximation:
- * set it to Z_TEXT if all symbols are either printable characters (33 to 255)
- * or white spaces (9 to 13, or 32); or set it to Z_BINARY otherwise.
+ * Check if the data type is TEXT or BINARY, using the following algorithm:
+ * - TEXT if the two conditions below are satisfied:
+ * a) There are no non-portable control characters belonging to the
+ * "black list" (0..6, 14..25, 28..31).
+ * b) There is at least one printable character belonging to the
+ * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255).
+ * - BINARY otherwise.
+ * - The following partially-portable control characters form a
+ * "gray list" that is ignored in this detection algorithm:
+ * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}).
* IN assertion: the fields Freq of dyn_ltree are set.
*/
-local void set_data_type(s)
+local int detect_data_type(s)
deflate_state *s;
{
+ /* black_mask is the bit mask of black-listed bytes
+ * set bits 0..6, 14..25, and 28..31
+ * 0xf3ffc07f = binary 11110011111111111100000001111111
+ */
+ unsigned long black_mask = 0xf3ffc07fUL;
int n;
- for (n = 0; n < 9; n++)
+ /* Check for non-textual ("black-listed") bytes. */
+ for (n = 0; n <= 31; n++, black_mask >>= 1)
+ if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0))
+ return Z_BINARY;
+
+ /* Check for textual ("white-listed") bytes. */
+ if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
+ || s->dyn_ltree[13].Freq != 0)
+ return Z_TEXT;
+ for (n = 32; n < LITERALS; n++)
if (s->dyn_ltree[n].Freq != 0)
- break;
- if (n == 9)
- for (n = 14; n < 32; n++)
- if (s->dyn_ltree[n].Freq != 0)
- break;
- s->strm->data_type = (n == 32) ? Z_TEXT : Z_BINARY;
+ return Z_TEXT;
+
+ /* There are no "black-listed" or "white-listed" bytes:
+ * this stream either is empty or has tolerated ("gray-listed") bytes only.
+ */
+ return Z_BINARY;
}
/* ===========================================================================
diff --git a/src/3rdparty/zlib/trees.h b/src/3rdparty/zlib/trees.h
index 72facf9..d35639d 100644
--- a/src/3rdparty/zlib/trees.h
+++ b/src/3rdparty/zlib/trees.h
@@ -70,7 +70,7 @@ local const ct_data static_dtree[D_CODES] = {
{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}}
};
-const uch _dist_code[DIST_CODE_LEN] = {
+const uch ZLIB_INTERNAL _dist_code[DIST_CODE_LEN] = {
0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8,
8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10,
10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11,
@@ -99,7 +99,7 @@ const uch _dist_code[DIST_CODE_LEN] = {
29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29
};
-const uch _length_code[MAX_MATCH-MIN_MATCH+1]= {
+const uch ZLIB_INTERNAL _length_code[MAX_MATCH-MIN_MATCH+1]= {
0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12,
13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16,
17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19,
diff --git a/src/3rdparty/zlib/uncompr.c b/src/3rdparty/zlib/uncompr.c
index 9304b9d..ad98be3 100644
--- a/src/3rdparty/zlib/uncompr.c
+++ b/src/3rdparty/zlib/uncompr.c
@@ -1,5 +1,5 @@
/* uncompr.c -- decompress a memory buffer
- * Copyright (C) 1995-2003 Jean-loup Gailly.
+ * Copyright (C) 1995-2003, 2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -16,14 +16,12 @@
been saved previously by the compressor and transmitted to the decompressor
by some mechanism outside the scope of this compression library.)
Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer, or Z_DATA_ERROR if the input data was corrupted.
*/
-int Q_ZEXPORT uncompress (dest, destLen, source, sourceLen)
+int ZEXPORT uncompress (dest, destLen, source, sourceLen)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
diff --git a/src/3rdparty/zlib/win32/DLL_FAQ.txt b/src/3rdparty/zlib/win32/DLL_FAQ.txt
deleted file mode 100644
index fb18e07..0000000
--- a/src/3rdparty/zlib/win32/DLL_FAQ.txt
+++ /dev/null
@@ -1,397 +0,0 @@
-
- Frequently Asked Questions about ZLIB1.DLL
-
-
-This document describes the design, the rationale, and the usage
-of the official DLL build of zlib, named ZLIB1.DLL. If you have
-general questions about zlib, you should see the file "FAQ" found
-in the zlib distribution, or at the following location:
- http://www.gzip.org/zlib/zlib_faq.html
-
-
- 1. What is ZLIB1.DLL, and how can I get it?
-
- - ZLIB1.DLL is the official build of zlib as a DLL.
- (Please remark the character '1' in the name.)
-
- Pointers to a precompiled ZLIB1.DLL can be found in the zlib
- web site at:
- http://www.zlib.org/
-
- Applications that link to ZLIB1.DLL can rely on the following
- specification:
-
- * The exported symbols are exclusively defined in the source
- files "zlib.h" and "zlib.def", found in an official zlib
- source distribution.
- * The symbols are exported by name, not by ordinal.
- * The exported names are undecorated.
- * The calling convention of functions is "C" (CDECL).
- * The ZLIB1.DLL binary is linked to MSVCRT.DLL.
-
- The archive in which ZLIB1.DLL is bundled contains compiled
- test programs that must run with a valid build of ZLIB1.DLL.
- It is recommended to download the prebuilt DLL from the zlib
- web site, instead of building it yourself, to avoid potential
- incompatibilities that could be introduced by your compiler
- and build settings. If you do build the DLL yourself, please
- make sure that it complies with all the above requirements,
- and it runs with the precompiled test programs, bundled with
- the original ZLIB1.DLL distribution.
-
- If, for any reason, you need to build an incompatible DLL,
- please use a different file name.
-
-
- 2. Why did you change the name of the DLL to ZLIB1.DLL?
- What happened to the old ZLIB.DLL?
-
- - The old ZLIB.DLL, built from zlib-1.1.4 or earlier, required
- compilation settings that were incompatible to those used by
- a static build. The DLL settings were supposed to be enabled
- by defining the macro ZLIB_DLL, before including "zlib.h".
- Incorrect handling of this macro was silently accepted at
- build time, resulting in two major problems:
-
- * ZLIB_DLL was missing from the old makefile. When building
- the DLL, not all people added it to the build options. In
- consequence, incompatible incarnations of ZLIB.DLL started
- to circulate around the net.
-
- * When switching from using the static library to using the
- DLL, applications had to define the ZLIB_DLL macro and
- to recompile all the sources that contained calls to zlib
- functions. Failure to do so resulted in creating binaries
- that were unable to run with the official ZLIB.DLL build.
-
- The only possible solution that we could foresee was to make
- a binary-incompatible change in the DLL interface, in order to
- remove the dependency on the ZLIB_DLL macro, and to release
- the new DLL under a different name.
-
- We chose the name ZLIB1.DLL, where '1' indicates the major
- zlib version number. We hope that we will not have to break
- the binary compatibility again, at least not as long as the
- zlib-1.x series will last.
-
- There is still a ZLIB_DLL macro, that can trigger a more
- efficient build and use of the DLL, but compatibility no
- longer dependents on it.
-
-
- 3. Can I build ZLIB.DLL from the new zlib sources, and replace
- an old ZLIB.DLL, that was built from zlib-1.1.4 or earlier?
-
- - In principle, you can do it by assigning calling convention
- keywords to the macros ZEXPORT and ZEXPORTVA. In practice,
- it depends on what you mean by "an old ZLIB.DLL", because the
- old DLL exists in several mutually-incompatible versions.
- You have to find out first what kind of calling convention is
- being used in your particular ZLIB.DLL build, and to use the
- same one in the new build. If you don't know what this is all
- about, you might be better off if you would just leave the old
- DLL intact.
-
-
- 4. Can I compile my application using the new zlib interface, and
- link it to an old ZLIB.DLL, that was built from zlib-1.1.4 or
- earlier?
-
- - The official answer is "no"; the real answer depends again on
- what kind of ZLIB.DLL you have. Even if you are lucky, this
- course of action is unreliable.
-
- If you rebuild your application and you intend to use a newer
- version of zlib (post- 1.1.4), it is strongly recommended to
- link it to the new ZLIB1.DLL.
-
-
- 5. Why are the zlib symbols exported by name, and not by ordinal?
-
- - Although exporting symbols by ordinal is a little faster, it
- is risky. Any single glitch in the maintenance or use of the
- DEF file that contains the ordinals can result in incompatible
- builds and frustrating crashes. Simply put, the benefits of
- exporting symbols by ordinal do not justify the risks.
-
- Technically, it should be possible to maintain ordinals in
- the DEF file, and still export the symbols by name. Ordinals
- exist in every DLL, and even if the dynamic linking performed
- at the DLL startup is searching for names, ordinals serve as
- hints, for a faster name lookup. However, if the DEF file
- contains ordinals, the Microsoft linker automatically builds
- an implib that will cause the executables linked to it to use
- those ordinals, and not the names. It is interesting to
- notice that the GNU linker for Win32 does not suffer from this
- problem.
-
- It is possible to avoid the DEF file if the exported symbols
- are accompanied by a "__declspec(dllexport)" attribute in the
- source files. You can do this in zlib by predefining the
- ZLIB_DLL macro.
-
-
- 6. I see that the ZLIB1.DLL functions use the "C" (CDECL) calling
- convention. Why not use the STDCALL convention?
- STDCALL is the standard convention in Win32, and I need it in
- my Visual Basic project!
-
- (For readability, we use CDECL to refer to the convention
- triggered by the "__cdecl" keyword, STDCALL to refer to
- the convention triggered by "__stdcall", and FASTCALL to
- refer to the convention triggered by "__fastcall".)
-
- - Most of the native Windows API functions (without varargs) use
- indeed the WINAPI convention (which translates to STDCALL in
- Win32), but the standard C functions use CDECL. If a user
- application is intrinsically tied to the Windows API (e.g.
- it calls native Windows API functions such as CreateFile()),
- sometimes it makes sense to decorate its own functions with
- WINAPI. But if ANSI C or POSIX portability is a goal (e.g.
- it calls standard C functions such as fopen()), it is not a
- sound decision to request the inclusion of <windows.h>, or to
- use non-ANSI constructs, for the sole purpose to make the user
- functions STDCALL-able.
-
- The functionality offered by zlib is not in the category of
- "Windows functionality", but is more like "C functionality".
-
- Technically, STDCALL is not bad; in fact, it is slightly
- faster than CDECL, and it works with variable-argument
- functions, just like CDECL. It is unfortunate that, in spite
- of using STDCALL in the Windows API, it is not the default
- convention used by the C compilers that run under Windows.
- The roots of the problem reside deep inside the unsafety of
- the K&R-style function prototypes, where the argument types
- are not specified; but that is another story for another day.
-
- The remaining fact is that CDECL is the default convention.
- Even if an explicit convention is hard-coded into the function
- prototypes inside C headers, problems may appear. The
- necessity to expose the convention in users' callbacks is one
- of these problems.
-
- The calling convention issues are also important when using
- zlib in other programming languages. Some of them, like Ada
- (GNAT) and Fortran (GNU G77), have C bindings implemented
- initially on Unix, and relying on the C calling convention.
- On the other hand, the pre- .NET versions of Microsoft Visual
- Basic require STDCALL, while Borland Delphi prefers, although
- it does not require, FASTCALL.
-
- In fairness to all possible uses of zlib outside the C
- programming language, we choose the default "C" convention.
- Anyone interested in different bindings or conventions is
- encouraged to maintain specialized projects. The "contrib/"
- directory from the zlib distribution already holds a couple
- of foreign bindings, such as Ada, C++, and Delphi.
-
-
- 7. I need a DLL for my Visual Basic project. What can I do?
-
- - Define the ZLIB_WINAPI macro before including "zlib.h", when
- building both the DLL and the user application (except that
- you don't need to define anything when using the DLL in Visual
- Basic). The ZLIB_WINAPI macro will switch on the WINAPI
- (STDCALL) convention. The name of this DLL must be different
- than the official ZLIB1.DLL.
-
- Gilles Vollant has contributed a build named ZLIBWAPI.DLL,
- with the ZLIB_WINAPI macro turned on, and with the minizip
- functionality built in. For more information, please read
- the notes inside "contrib/vstudio/readme.txt", found in the
- zlib distribution.
-
-
- 8. I need to use zlib in my Microsoft .NET project. What can I
- do?
-
- - Henrik Ravn has contributed a .NET wrapper around zlib. Look
- into contrib/dotzlib/, inside the zlib distribution.
-
-
- 9. If my application uses ZLIB1.DLL, should I link it to
- MSVCRT.DLL? Why?
-
- - It is not required, but it is recommended to link your
- application to MSVCRT.DLL, if it uses ZLIB1.DLL.
-
- The executables (.EXE, .DLL, etc.) that are involved in the
- same process and are using the C run-time library (i.e. they
- are calling standard C functions), must link to the same
- library. There are several libraries in the Win32 system:
- CRTDLL.DLL, MSVCRT.DLL, the static C libraries, etc.
- Since ZLIB1.DLL is linked to MSVCRT.DLL, the executables that
- depend on it should also be linked to MSVCRT.DLL.
-
-
-10. Why are you saying that ZLIB1.DLL and my application should
- be linked to the same C run-time (CRT) library? I linked my
- application and my DLLs to different C libraries (e.g. my
- application to a static library, and my DLLs to MSVCRT.DLL),
- and everything works fine.
-
- - If a user library invokes only pure Win32 API (accessible via
- <windows.h> and the related headers), its DLL build will work
- in any context. But if this library invokes standard C API,
- things get more complicated.
-
- There is a single Win32 library in a Win32 system. Every
- function in this library resides in a single DLL module, that
- is safe to call from anywhere. On the other hand, there are
- multiple versions of the C library, and each of them has its
- own separate internal state. Standalone executables and user
- DLLs that call standard C functions must link to a C run-time
- (CRT) library, be it static or shared (DLL). Intermixing
- occurs when an executable (not necessarily standalone) and a
- DLL are linked to different CRTs, and both are running in the
- same process.
-
- Intermixing multiple CRTs is possible, as long as their
- internal states are kept intact. The Microsoft Knowledge Base
- articles KB94248 "HOWTO: Use the C Run-Time" and KB140584
- "HOWTO: Link with the Correct C Run-Time (CRT) Library"
- mention the potential problems raised by intermixing.
-
- If intermixing works for you, it's because your application
- and DLLs are avoiding the corruption of each of the CRTs'
- internal states, maybe by careful design, or maybe by fortune.
-
- Also note that linking ZLIB1.DLL to non-Microsoft CRTs, such
- as those provided by Borland, raises similar problems.
-
-
-11. Why are you linking ZLIB1.DLL to MSVCRT.DLL?
-
- - MSVCRT.DLL exists on every Windows 95 with a new service pack
- installed, or with Microsoft Internet Explorer 4 or later, and
- on all other Windows 4.x or later (Windows 98, Windows NT 4,
- or later). It is freely distributable; if not present in the
- system, it can be downloaded from Microsoft or from other
- software provider for free.
-
- The fact that MSVCRT.DLL does not exist on a virgin Windows 95
- is not so problematic. Windows 95 is scarcely found nowadays,
- Microsoft ended its support a long time ago, and many recent
- applications from various vendors, including Microsoft, do not
- even run on it. Furthermore, no serious user should run
- Windows 95 without a proper update installed.
-
-
-12. Why are you not linking ZLIB1.DLL to
- <<my favorite C run-time library>> ?
-
- - We considered and abandoned the following alternatives:
-
- * Linking ZLIB1.DLL to a static C library (LIBC.LIB, or
- LIBCMT.LIB) is not a good option. People are using the DLL
- mainly to save disk space. If you are linking your program
- to a static C library, you may as well consider linking zlib
- in statically, too.
-
- * Linking ZLIB1.DLL to CRTDLL.DLL looks appealing, because
- CRTDLL.DLL is present on every Win32 installation.
- Unfortunately, it has a series of problems: it does not
- work properly with Microsoft's C++ libraries, it does not
- provide support for 64-bit file offsets, (and so on...),
- and Microsoft discontinued its support a long time ago.
-
- * Linking ZLIB1.DLL to MSVCR70.DLL or MSVCR71.DLL, supplied
- with the Microsoft .NET platform, and Visual C++ 7.0/7.1,
- raises problems related to the status of ZLIB1.DLL as a
- system component. According to the Microsoft Knowledge Base
- article KB326922 "INFO: Redistribution of the Shared C
- Runtime Component in Visual C++ .NET", MSVCR70.DLL and
- MSVCR71.DLL are not supposed to function as system DLLs,
- because they may clash with MSVCRT.DLL. Instead, the
- application's installer is supposed to put these DLLs
- (if needed) in the application's private directory.
- If ZLIB1.DLL depends on a non-system runtime, it cannot
- function as a redistributable system component.
-
- * Linking ZLIB1.DLL to non-Microsoft runtimes, such as
- Borland's, or Cygwin's, raises problems related to the
- reliable presence of these runtimes on Win32 systems.
- It's easier to let the DLL build of zlib up to the people
- who distribute these runtimes, and who may proceed as
- explained in the answer to Question 14.
-
-
-13. If ZLIB1.DLL cannot be linked to MSVCR70.DLL or MSVCR71.DLL,
- how can I build/use ZLIB1.DLL in Microsoft Visual C++ 7.0
- (Visual Studio .NET) or newer?
-
- - Due to the problems explained in the Microsoft Knowledge Base
- article KB326922 (see the previous answer), the C runtime that
- comes with the VC7 environment is no longer considered a
- system component. That is, it should not be assumed that this
- runtime exists, or may be installed in a system directory.
- Since ZLIB1.DLL is supposed to be a system component, it may
- not depend on a non-system component.
-
- In order to link ZLIB1.DLL and your application to MSVCRT.DLL
- in VC7, you need the library of Visual C++ 6.0 or older. If
- you don't have this library at hand, it's probably best not to
- use ZLIB1.DLL.
-
- We are hoping that, in the future, Microsoft will provide a
- way to build applications linked to a proper system runtime,
- from the Visual C++ environment. Until then, you have a
- couple of alternatives, such as linking zlib in statically.
- If your application requires dynamic linking, you may proceed
- as explained in the answer to Question 14.
-
-
-14. I need to link my own DLL build to a CRT different than
- MSVCRT.DLL. What can I do?
-
- - Feel free to rebuild the DLL from the zlib sources, and link
- it the way you want. You should, however, clearly state that
- your build is unofficial. You should give it a different file
- name, and/or install it in a private directory that can be
- accessed by your application only, and is not visible to the
- others (e.g. it's not in the SYSTEM or the SYSTEM32 directory,
- and it's not in the PATH). Otherwise, your build may clash
- with applications that link to the official build.
-
- For example, in Cygwin, zlib is linked to the Cygwin runtime
- CYGWIN1.DLL, and it is distributed under the name CYGZ.DLL.
-
-
-15. May I include additional pieces of code that I find useful,
- link them in ZLIB1.DLL, and export them?
-
- - No. A legitimate build of ZLIB1.DLL must not include code
- that does not originate from the official zlib source code.
- But you can make your own private DLL build, under a different
- file name, as suggested in the previous answer.
-
- For example, zlib is a part of the VCL library, distributed
- with Borland Delphi and C++ Builder. The DLL build of VCL
- is a redistributable file, named VCLxx.DLL.
-
-
-16. May I remove some functionality out of ZLIB1.DLL, by enabling
- macros like NO_GZCOMPRESS or NO_GZIP at compile time?
-
- - No. A legitimate build of ZLIB1.DLL must provide the complete
- zlib functionality, as implemented in the official zlib source
- code. But you can make your own private DLL build, under a
- different file name, as suggested in the previous answer.
-
-
-17. I made my own ZLIB1.DLL build. Can I test it for compliance?
-
- - We prefer that you download the official DLL from the zlib
- web site. If you need something peculiar from this DLL, you
- can send your suggestion to the zlib mailing list.
-
- However, in case you do rebuild the DLL yourself, you can run
- it with the test programs found in the DLL distribution.
- Running these test programs is not a guarantee of compliance,
- but a failure can imply a detected problem.
-
-**
-
-This document is written and maintained by
-Cosmin Truta <cosmint@cs.ubbcluj.ro>
diff --git a/src/3rdparty/zlib/win32/Makefile.bor b/src/3rdparty/zlib/win32/Makefile.bor
deleted file mode 100644
index b802519..0000000
--- a/src/3rdparty/zlib/win32/Makefile.bor
+++ /dev/null
@@ -1,107 +0,0 @@
-# Makefile for zlib
-# Borland C++ for Win32
-#
-# Updated for zlib 1.2.x by Cosmin Truta, 11-Mar-2003
-# Last updated: 28-Aug-2003
-#
-# Usage:
-# make -f win32/Makefile.bor
-# make -f win32/Makefile.bor LOCAL_ZLIB=-DASMV OBJA=match.obj OBJPA=+match.obj
-
-# ------------ Borland C++ ------------
-
-# Optional nonstandard preprocessor flags (e.g. -DMAX_MEM_LEVEL=7)
-# should be added to the environment via "set LOCAL_ZLIB=-DFOO" or
-# added to the declaration of LOC here:
-LOC = $(LOCAL_ZLIB)
-
-CC = bcc32
-AS = bcc32
-LD = bcc32
-AR = tlib
-CFLAGS = -a -d -k- -O2 $(LOC)
-ASFLAGS = $(LOC)
-LDFLAGS = $(LOC)
-
-
-# variables
-ZLIB_LIB = zlib.lib
-
-OBJ1 = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj
-OBJ2 = inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-#OBJA =
-OBJP1 = +adler32.obj+compress.obj+crc32.obj+deflate.obj+gzio.obj+infback.obj
-OBJP2 = +inffast.obj+inflate.obj+inftrees.obj+trees.obj+uncompr.obj+zutil.obj
-#OBJPA=
-
-
-# targets
-all: $(ZLIB_LIB) example.exe minigzip.exe
-
-.c.obj:
- $(CC) -c $(CFLAGS) $<
-
-.asm.obj:
- $(AS) -c $(ASFLAGS) $<
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-
-# For the sake of the old Borland make,
-# the command line is cut to fit in the MS-DOS 128 byte limit:
-$(ZLIB_LIB): $(OBJ1) $(OBJ2) $(OBJA)
- -del $(ZLIB_LIB)
- $(AR) $(ZLIB_LIB) $(OBJP1)
- $(AR) $(ZLIB_LIB) $(OBJP2)
- $(AR) $(ZLIB_LIB) $(OBJPA)
-
-
-# testing
-test: example.exe minigzip.exe
- example
- echo hello world | minigzip | minigzip -d
-
-example.exe: example.obj $(ZLIB_LIB)
- $(LD) $(LDFLAGS) example.obj $(ZLIB_LIB)
-
-minigzip.exe: minigzip.obj $(ZLIB_LIB)
- $(LD) $(LDFLAGS) minigzip.obj $(ZLIB_LIB)
-
-
-# cleanup
-clean:
- -del *.obj
- -del *.lib
- -del *.exe
- -del *.tds
- -del zlib.bak
- -del foo.gz
diff --git a/src/3rdparty/zlib/win32/Makefile.emx b/src/3rdparty/zlib/win32/Makefile.emx
deleted file mode 100644
index 7b08424..0000000
--- a/src/3rdparty/zlib/win32/Makefile.emx
+++ /dev/null
@@ -1,69 +0,0 @@
-# Makefile for zlib. Modified for emx/rsxnt by Chr. Spieler, 6/16/98.
-# Copyright (C) 1995-1998 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-# make -fmakefile.emx; make test -fmakefile.emx
-#
-
-CC=gcc -Zwin32
-
-#CFLAGS=-MMD -O
-#CFLAGS=-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7
-#CFLAGS=-MMD -g -DDEBUG
-CFLAGS=-MMD -O3 $(BUTT) -Wall -Wwrite-strings -Wpointer-arith -Wconversion \
- -Wstrict-prototypes -Wmissing-prototypes
-
-# If cp.exe is available, replace "copy /Y" with "cp -fp" .
-CP=copy /Y
-# If gnu install.exe is available, replace $(CP) with ginstall.
-INSTALL=$(CP)
-# The default value of RM is "rm -f." If "rm.exe" is found, comment out:
-RM=del
-LDLIBS=-L. -lzlib
-LD=$(CC) -s -o
-LDSHARED=$(CC)
-
-INCL=zlib.h zconf.h
-LIBS=zlib.a
-
-AR=ar rcs
-
-prefix=/usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o trees.o \
- zutil.o inflate.o infback.o inftrees.o inffast.o
-
-TEST_OBJS = example.o minigzip.o
-
-all: example.exe minigzip.exe
-
-test: all
- ./example
- echo hello world | .\minigzip | .\minigzip -d
-
-%.o : %.c
- $(CC) $(CFLAGS) -c $< -o $@
-
-zlib.a: $(OBJS)
- $(AR) $@ $(OBJS)
-
-%.exe : %.o $(LIBS)
- $(LD) $@ $< $(LDLIBS)
-
-
-.PHONY : clean
-
-clean:
- $(RM) *.d
- $(RM) *.o
- $(RM) *.exe
- $(RM) zlib.a
- $(RM) foo.gz
-
-DEPS := $(wildcard *.d)
-ifneq ($(DEPS),)
-include $(DEPS)
-endif
diff --git a/src/3rdparty/zlib/win32/Makefile.gcc b/src/3rdparty/zlib/win32/Makefile.gcc
deleted file mode 100644
index 62a8430..0000000
--- a/src/3rdparty/zlib/win32/Makefile.gcc
+++ /dev/null
@@ -1,141 +0,0 @@
-# Makefile for zlib, derived from Makefile.dj2.
-# Modified for mingw32 by C. Spieler, 6/16/98.
-# Updated for zlib 1.2.x by Christian Spieler and Cosmin Truta, Mar-2003.
-# Last updated: 1-Aug-2003.
-# Tested under Cygwin and MinGW.
-
-# Copyright (C) 1995-2003 Jean-loup Gailly.
-# For conditions of distribution and use, see copyright notice in zlib.h
-
-# To compile, or to compile and test, type:
-#
-# make -fmakefile.gcc; make test testdll -fmakefile.gcc
-#
-# To use the asm code, type:
-# cp contrib/asm?86/match.S ./match.S
-# make LOC=-DASMV OBJA=match.o -fmakefile.gcc
-#
-# To install libz.a, zconf.h and zlib.h in the system directories, type:
-#
-# make install -fmakefile.gcc
-
-# Note:
-# If the platform is *not* MinGW (e.g. it is Cygwin or UWIN),
-# the DLL name should be changed from "zlib1.dll".
-
-STATICLIB = libz.a
-SHAREDLIB = zlib1.dll
-IMPLIB = libzdll.a
-
-#LOC = -DASMV
-#LOC = -DDEBUG -g
-
-CC = gcc
-CFLAGS = $(LOC) -O3 -Wall
-
-AS = $(CC)
-ASFLAGS = $(LOC) -Wall
-
-LD = $(CC)
-LDFLAGS = $(LOC) -s
-
-AR = ar
-ARFLAGS = rcs
-
-RC = windres
-RCFLAGS = --define GCC_WINDRES
-
-CP = cp -fp
-# If GNU install is available, replace $(CP) with install.
-INSTALL = $(CP)
-RM = rm -f
-
-prefix = /usr/local
-exec_prefix = $(prefix)
-
-OBJS = adler32.o compress.o crc32.o deflate.o gzio.o infback.o \
- inffast.o inflate.o inftrees.o trees.o uncompr.o zutil.o
-OBJA =
-
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) example minigzip example_d minigzip_d
-
-test: example minigzip
- ./example
- echo hello world | ./minigzip | ./minigzip -d
-
-testdll: example_d minigzip_d
- ./example_d
- echo hello world | ./minigzip_d | ./minigzip_d -d
-
-.c.o:
- $(CC) $(CFLAGS) -c -o $@ $<
-
-.S.o:
- $(AS) $(ASFLAGS) -c -o $@ $<
-
-$(STATICLIB): $(OBJS) $(OBJA)
- $(AR) $(ARFLAGS) $@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlibrc.o
- dllwrap --driver-name $(CC) --def win32/zlib.def \
- --implib $(IMPLIB) -o $@ $(OBJS) $(OBJA) zlibrc.o
- strip $@
-
-example: example.o $(STATICLIB)
- $(LD) $(LDFLAGS) -o $@ example.o $(STATICLIB)
-
-minigzip: minigzip.o $(STATICLIB)
- $(LD) $(LDFLAGS) -o $@ minigzip.o $(STATICLIB)
-
-example_d: example.o $(IMPLIB)
- $(LD) $(LDFLAGS) -o $@ example.o $(IMPLIB)
-
-minigzip_d: minigzip.o $(IMPLIB)
- $(LD) $(LDFLAGS) -o $@ minigzip.o $(IMPLIB)
-
-zlibrc.o: win32/zlib1.rc
- $(RC) $(RCFLAGS) -o $@ win32/zlib1.rc
-
-
-# INCLUDE_PATH and LIBRARY_PATH must be set.
-
-.PHONY: install uninstall clean
-
-install: zlib.h zconf.h $(LIB)
- -@if not exist $(INCLUDE_PATH)/nul mkdir $(INCLUDE_PATH)
- -@if not exist $(LIBRARY_PATH)/nul mkdir $(LIBRARY_PATH)
- -$(INSTALL) zlib.h $(INCLUDE_PATH)
- -$(INSTALL) zconf.h $(INCLUDE_PATH)
- -$(INSTALL) $(STATICLIB) $(LIBRARY_PATH)
- -$(INSTALL) $(IMPLIB) $(LIBRARY_PATH)
-
-uninstall:
- -$(RM) $(INCLUDE_PATH)/zlib.h
- -$(RM) $(INCLUDE_PATH)/zconf.h
- -$(RM) $(LIBRARY_PATH)/$(STATICLIB)
- -$(RM) $(LIBRARY_PATH)/$(IMPLIB)
-
-clean:
- -$(RM) $(STATICLIB)
- -$(RM) $(SHAREDLIB)
- -$(RM) $(IMPLIB)
- -$(RM) *.o
- -$(RM) *.exe
- -$(RM) foo.gz
-
-adler32.o: zlib.h zconf.h
-compress.o: zlib.h zconf.h
-crc32.o: crc32.h zlib.h zconf.h
-deflate.o: deflate.h zutil.h zlib.h zconf.h
-example.o: zlib.h zconf.h
-gzio.o: zutil.h zlib.h zconf.h
-inffast.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inflate.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-infback.o: zutil.h zlib.h zconf.h inftrees.h inflate.h inffast.h
-inftrees.o: zutil.h zlib.h zconf.h inftrees.h
-minigzip.o: zlib.h zconf.h
-trees.o: deflate.h zutil.h zlib.h zconf.h trees.h
-uncompr.o: zlib.h zconf.h
-zutil.o: zutil.h zlib.h zconf.h
diff --git a/src/3rdparty/zlib/win32/Makefile.msc b/src/3rdparty/zlib/win32/Makefile.msc
deleted file mode 100644
index 528ecaa..0000000
--- a/src/3rdparty/zlib/win32/Makefile.msc
+++ /dev/null
@@ -1,126 +0,0 @@
-# Makefile for zlib -- Microsoft (Visual) C
-#
-# Authors:
-# Cosmin Truta, 11-Mar-2003
-# Christian Spieler, 19-Mar-2003
-#
-# Last updated:
-# Cosmin Truta, 27-Aug-2003
-#
-# Usage:
-# nmake -f win32/Makefile.msc (standard build)
-# nmake -f win32/Makefile.msc LOC=-DFOO (nonstandard build)
-# nmake -f win32/Makefile.msc LOC=-DASMV OBJA=match.obj (use ASM code)
-
-
-# optional build flags
-LOC =
-
-
-# variables
-STATICLIB = zlib.lib
-SHAREDLIB = zlib1.dll
-IMPLIB = zdll.lib
-
-CC = cl
-AS = ml
-LD = link
-AR = lib
-RC = rc
-CFLAGS = -nologo -MD -O2 $(LOC)
-ASFLAGS = -coff
-LDFLAGS = -nologo -release
-ARFLAGS = -nologo
-RCFLAGS = /dWIN32 /r
-
-OBJS = adler32.obj compress.obj crc32.obj deflate.obj gzio.obj infback.obj \
- inffast.obj inflate.obj inftrees.obj trees.obj uncompr.obj zutil.obj
-OBJA =
-
-
-# targets
-all: $(STATICLIB) $(SHAREDLIB) $(IMPLIB) \
- example.exe minigzip.exe example_d.exe minigzip_d.exe
-
-$(STATICLIB): $(OBJS) $(OBJA)
- $(AR) $(ARFLAGS) -out:$@ $(OBJS) $(OBJA)
-
-$(IMPLIB): $(SHAREDLIB)
-
-$(SHAREDLIB): win32/zlib.def $(OBJS) $(OBJA) zlib1.res
- $(LD) $(LDFLAGS) -def:win32/zlib.def -dll -implib:$(IMPLIB) \
- -out:$@ $(OBJS) $(OBJA) zlib1.res
-
-example.exe: example.obj $(STATICLIB)
- $(LD) $(LDFLAGS) example.obj $(STATICLIB)
-
-minigzip.exe: minigzip.obj $(STATICLIB)
- $(LD) $(LDFLAGS) minigzip.obj $(STATICLIB)
-
-example_d.exe: example.obj $(IMPLIB)
- $(LD) $(LDFLAGS) -out:$@ example.obj $(IMPLIB)
-
-minigzip_d.exe: minigzip.obj $(IMPLIB)
- $(LD) $(LDFLAGS) -out:$@ minigzip.obj $(IMPLIB)
-
-.c.obj:
- $(CC) -c $(CFLAGS) $<
-
-.asm.obj:
- $(AS) -c $(ASFLAGS) $<
-
-adler32.obj: adler32.c zlib.h zconf.h
-
-compress.obj: compress.c zlib.h zconf.h
-
-crc32.obj: crc32.c zlib.h zconf.h crc32.h
-
-deflate.obj: deflate.c deflate.h zutil.h zlib.h zconf.h
-
-gzio.obj: gzio.c zutil.h zlib.h zconf.h
-
-infback.obj: infback.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inffast.obj: inffast.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h
-
-inflate.obj: inflate.c zutil.h zlib.h zconf.h inftrees.h inflate.h \
- inffast.h inffixed.h
-
-inftrees.obj: inftrees.c zutil.h zlib.h zconf.h inftrees.h
-
-trees.obj: trees.c zutil.h zlib.h zconf.h deflate.h trees.h
-
-uncompr.obj: uncompr.c zlib.h zconf.h
-
-zutil.obj: zutil.c zutil.h zlib.h zconf.h
-
-example.obj: example.c zlib.h zconf.h
-
-minigzip.obj: minigzip.c zlib.h zconf.h
-
-zlib1.res: win32/zlib1.rc
- $(RC) $(RCFLAGS) /fo$@ win32/zlib1.rc
-
-
-# testing
-test: example.exe minigzip.exe
- example
- echo hello world | minigzip | minigzip -d
-
-testdll: example_d.exe minigzip_d.exe
- example_d
- echo hello world | minigzip_d | minigzip_d -d
-
-
-# cleanup
-clean:
- -del $(STATICLIB)
- -del $(SHAREDLIB)
- -del $(IMPLIB)
- -del *.obj
- -del *.res
- -del *.exp
- -del *.exe
- -del foo.gz
diff --git a/src/3rdparty/zlib/win32/VisualC.txt b/src/3rdparty/zlib/win32/VisualC.txt
deleted file mode 100644
index 579a5fc..0000000
--- a/src/3rdparty/zlib/win32/VisualC.txt
+++ /dev/null
@@ -1,3 +0,0 @@
-
-To build zlib using the Microsoft Visual C++ environment,
-use the appropriate project from the projects/ directory.
diff --git a/src/3rdparty/zlib/win32/zlib.def b/src/3rdparty/zlib/win32/zlib.def
deleted file mode 100644
index a47cbc1..0000000
--- a/src/3rdparty/zlib/win32/zlib.def
+++ /dev/null
@@ -1,60 +0,0 @@
-LIBRARY
-; zlib data compression library
-
-EXPORTS
-; basic functions
- zlibVersion
- deflate
- deflateEnd
- inflate
- inflateEnd
-; advanced functions
- deflateSetDictionary
- deflateCopy
- deflateReset
- deflateParams
- deflateBound
- deflatePrime
- inflateSetDictionary
- inflateSync
- inflateCopy
- inflateReset
- inflateBack
- inflateBackEnd
- zlibCompileFlags
-; utility functions
- compress
- compress2
- compressBound
- uncompress
- gzopen
- gzdopen
- gzsetparams
- gzread
- gzwrite
- gzprintf
- gzputs
- gzgets
- gzputc
- gzgetc
- gzungetc
- gzflush
- gzseek
- gzrewind
- gztell
- gzeof
- gzclose
- gzerror
- gzclearerr
-; checksum functions
- adler32
- crc32
-; various hacks, don't look :)
- deflateInit_
- deflateInit2_
- inflateInit_
- inflateInit2_
- inflateBackInit_
- inflateSyncPoint
- get_crc_table
- zError
diff --git a/src/3rdparty/zlib/win32/zlib1.rc b/src/3rdparty/zlib/win32/zlib1.rc
deleted file mode 100644
index 99025c9..0000000
--- a/src/3rdparty/zlib/win32/zlib1.rc
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <windows.h>
-
-#ifdef GCC_WINDRES
-VS_VERSION_INFO VERSIONINFO
-#else
-VS_VERSION_INFO VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
-#endif
- FILEVERSION 1,2,2,0
- PRODUCTVERSION 1,2,2,0
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
-#ifdef _DEBUG
- FILEFLAGS 1
-#else
- FILEFLAGS 0
-#endif
- FILEOS VOS_DOS_WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE 0 // not used
-BEGIN
- BLOCK "StringFileInfo"
- BEGIN
- BLOCK "040904E4"
- //language ID = U.S. English, char set = Windows, Multilingual
- BEGIN
- VALUE "FileDescription", "zlib data compression library\0"
- VALUE "FileVersion", "1.2.3\0"
- VALUE "InternalName", "zlib1.dll\0"
- VALUE "LegalCopyright", "(C) 1995-2004 Jean-loup Gailly & Mark Adler\0"
- VALUE "OriginalFilename", "zlib1.dll\0"
- VALUE "ProductName", "zlib\0"
- VALUE "ProductVersion", "1.2.3\0"
- VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
- END
- END
- BLOCK "VarFileInfo"
- BEGIN
- VALUE "Translation", 0x0409, 1252
- END
-END
diff --git a/src/3rdparty/zlib/zconf.h b/src/3rdparty/zlib/zconf.h
index 03a9431..0105ca4 100644
--- a/src/3rdparty/zlib/zconf.h
+++ b/src/3rdparty/zlib/zconf.h
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -11,52 +11,124 @@
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
*/
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
+#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+# define _dist_code z__dist_code
+# define _length_code z__length_code
+# define _tr_align z__tr_align
+# define _tr_flush_block z__tr_flush_block
+# define _tr_init z__tr_init
+# define _tr_stored_block z__tr_stored_block
+# define _tr_tally z__tr_tally
+# define adler32 z_adler32
+# define adler32_combine z_adler32_combine
+# define adler32_combine64 z_adler32_combine64
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define crc32 z_crc32
+# define crc32_combine z_crc32_combine
+# define crc32_combine64 z_crc32_combine64
# define deflate z_deflate
+# define deflateBound z_deflateBound
+# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
# define deflateInit2_ z_deflateInit2_
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
+# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
-# define deflateBound z_deflateBound
# define deflatePrime z_deflatePrime
+# define deflateReset z_deflateReset
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateSetHeader z_deflateSetHeader
+# define deflateTune z_deflateTune
+# define deflate_copyright z_deflate_copyright
+# define get_crc_table z_get_crc_table
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzgetc z_gzgetc
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# define gzprintf z_gzprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzwrite z_gzwrite
+# define inflate z_inflate
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit_ z_inflateBackInit_
+# define inflateCopy z_inflateCopy
+# define inflateEnd z_inflateEnd
+# define inflateGetHeader z_inflateGetHeader
# define inflateInit2_ z_inflateInit2_
+# define inflateInit_ z_inflateInit_
+# define inflateMark z_inflateMark
+# define inflatePrime z_inflatePrime
+# define inflateReset z_inflateReset
+# define inflateReset2 z_inflateReset2
# define inflateSetDictionary z_inflateSetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
-# define inflateCopy z_inflateCopy
-# define inflateReset z_inflateReset
-# define inflateBack z_inflateBack
-# define inflateBackEnd z_inflateBackEnd
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
+# define inflateUndermine z_inflateUndermine
+# define inflate_copyright z_inflate_copyright
+# define inflate_fast z_inflate_fast
+# define inflate_table z_inflate_table
# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
# define zError z_zError
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# define zlibCompileFlags z_zlibCompileFlags
+# define zlibVersion z_zlibVersion
+/* all zlib typedefs in zlib.h and zconf.h */
+# define Byte z_Byte
+# define Bytef z_Bytef
# define alloc_func z_alloc_func
+# define charf z_charf
# define free_func z_free_func
+# define gzFile z_gzFile
+# define gz_header z_gz_header
+# define gz_headerp z_gz_headerp
# define in_func z_in_func
+# define intf z_intf
# define out_func z_out_func
-# define Byte z_Byte
# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
# define uIntf z_uIntf
+# define uLong z_uLong
# define uLongf z_uLongf
-# define voidpf z_voidpf
# define voidp z_voidp
+# define voidpc z_voidpc
+# define voidpf z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+# define gz_header_s z_gz_header_s
+# define internal_state z_internal_state
+
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
@@ -284,49 +356,73 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
-#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
-# include <sys/types.h> /* for off_t */
-# include <unistd.h> /* for SEEK_* and off_t */
+#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_UNISTD_H
+#endif
+
+#if defined(STDC) && !defined(_WIN32_WCE)
+# include <sys/types.h> /* for off_t */
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if -_LARGEFILE64_SOURCE - -1 == 1
+# undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+# include <unistd.h> /* for SEEK_* and off_t */
# ifdef VMS
-# include <unixio.h> /* for off_t */
+# include <unixio.h> /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
# endif
-# define z_off_t off_t
#endif
+
#ifndef SEEK_SET
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
+
#ifndef z_off_t
# define z_off_t long
#endif
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+# define z_off64_t off64_t
+#else
+# define z_off64_t z_off_t
+#endif
+
#if defined(__OS400__)
# define NO_vsnprintf
#endif
#if defined(__MVS__)
# define NO_vsnprintf
-# ifdef FAR
-# undef FAR
-# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
-# pragma map(deflateInit_,"DEIN")
-# pragma map(deflateInit2_,"DEIN2")
-# pragma map(deflateEnd,"DEEND")
-# pragma map(deflateBound,"DEBND")
-# pragma map(inflateInit_,"ININ")
-# pragma map(inflateInit2_,"ININ2")
-# pragma map(inflateEnd,"INEND")
-# pragma map(inflateSync,"INSY")
-# pragma map(inflateSetDictionary,"INSEDI")
-# pragma map(compressBound,"CMBND")
-# pragma map(inflate_table,"INTABL")
-# pragma map(inflate_fast,"INFA")
-# pragma map(inflate_copyright,"INCOPY")
+ #pragma map(deflateInit_,"DEIN")
+ #pragma map(deflateInit2_,"DEIN2")
+ #pragma map(deflateEnd,"DEEND")
+ #pragma map(deflateBound,"DEBND")
+ #pragma map(inflateInit_,"ININ")
+ #pragma map(inflateInit2_,"ININ2")
+ #pragma map(inflateEnd,"INEND")
+ #pragma map(inflateSync,"INSY")
+ #pragma map(inflateSetDictionary,"INSEDI")
+ #pragma map(compressBound,"CMBND")
+ #pragma map(inflate_table,"INTABL")
+ #pragma map(inflate_fast,"INFA")
+ #pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */
diff --git a/src/3rdparty/zlib/zconf.h.cmakein b/src/3rdparty/zlib/zconf.h.cmakein
new file mode 100644
index 0000000..a2f71b1
--- /dev/null
+++ b/src/3rdparty/zlib/zconf.h.cmakein
@@ -0,0 +1,430 @@
+/* zconf.h -- configuration of the zlib compression library
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
+ * For conditions of distribution and use, see copyright notice in zlib.h
+ */
+
+/* @(#) $Id$ */
+
+#ifndef ZCONF_H
+#define ZCONF_H
+#cmakedefine Z_PREFIX
+#cmakedefine Z_HAVE_UNISTD_H
+
+/*
+ * If you *really* need a unique prefix for all types and library functions,
+ * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
+ */
+#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+# define _dist_code z__dist_code
+# define _length_code z__length_code
+# define _tr_align z__tr_align
+# define _tr_flush_block z__tr_flush_block
+# define _tr_init z__tr_init
+# define _tr_stored_block z__tr_stored_block
+# define _tr_tally z__tr_tally
+# define adler32 z_adler32
+# define adler32_combine z_adler32_combine
+# define adler32_combine64 z_adler32_combine64
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define crc32 z_crc32
+# define crc32_combine z_crc32_combine
+# define crc32_combine64 z_crc32_combine64
+# define deflate z_deflate
+# define deflateBound z_deflateBound
+# define deflateCopy z_deflateCopy
+# define deflateEnd z_deflateEnd
+# define deflateInit2_ z_deflateInit2_
+# define deflateInit_ z_deflateInit_
+# define deflateParams z_deflateParams
+# define deflatePrime z_deflatePrime
+# define deflateReset z_deflateReset
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateSetHeader z_deflateSetHeader
+# define deflateTune z_deflateTune
+# define deflate_copyright z_deflate_copyright
+# define get_crc_table z_get_crc_table
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzgetc z_gzgetc
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# define gzprintf z_gzprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzwrite z_gzwrite
+# define inflate z_inflate
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit_ z_inflateBackInit_
+# define inflateCopy z_inflateCopy
+# define inflateEnd z_inflateEnd
+# define inflateGetHeader z_inflateGetHeader
+# define inflateInit2_ z_inflateInit2_
+# define inflateInit_ z_inflateInit_
+# define inflateMark z_inflateMark
+# define inflatePrime z_inflatePrime
+# define inflateReset z_inflateReset
+# define inflateReset2 z_inflateReset2
+# define inflateSetDictionary z_inflateSetDictionary
+# define inflateSync z_inflateSync
+# define inflateSyncPoint z_inflateSyncPoint
+# define inflateUndermine z_inflateUndermine
+# define inflate_copyright z_inflate_copyright
+# define inflate_fast z_inflate_fast
+# define inflate_table z_inflate_table
+# define uncompress z_uncompress
+# define zError z_zError
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# define zlibCompileFlags z_zlibCompileFlags
+# define zlibVersion z_zlibVersion
+
+/* all zlib typedefs in zlib.h and zconf.h */
+# define Byte z_Byte
+# define Bytef z_Bytef
+# define alloc_func z_alloc_func
+# define charf z_charf
+# define free_func z_free_func
+# define gzFile z_gzFile
+# define gz_header z_gz_header
+# define gz_headerp z_gz_headerp
+# define in_func z_in_func
+# define intf z_intf
+# define out_func z_out_func
+# define uInt z_uInt
+# define uIntf z_uIntf
+# define uLong z_uLong
+# define uLongf z_uLongf
+# define voidp z_voidp
+# define voidpc z_voidpc
+# define voidpf z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+# define gz_header_s z_gz_header_s
+# define internal_state z_internal_state
+
+#endif
+
+#if defined(__MSDOS__) && !defined(MSDOS)
+# define MSDOS
+#endif
+#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2)
+# define OS2
+#endif
+#if defined(_WINDOWS) && !defined(WINDOWS)
+# define WINDOWS
+#endif
+#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__)
+# ifndef WIN32
+# define WIN32
+# endif
+#endif
+#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32)
+# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__)
+# ifndef SYS16BIT
+# define SYS16BIT
+# endif
+# endif
+#endif
+
+/*
+ * Compile with -DMAXSEG_64K if the alloc function cannot allocate more
+ * than 64k bytes at a time (needed on systems with 16-bit int).
+ */
+#ifdef SYS16BIT
+# define MAXSEG_64K
+#endif
+#ifdef MSDOS
+# define UNALIGNED_OK
+#endif
+
+#ifdef __STDC_VERSION__
+# ifndef STDC
+# define STDC
+# endif
+# if __STDC_VERSION__ >= 199901L
+# ifndef STDC99
+# define STDC99
+# endif
+# endif
+#endif
+#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32))
+# define STDC
+#endif
+#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__))
+# define STDC
+#endif
+
+#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */
+# define STDC
+#endif
+
+#ifndef STDC
+# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */
+# define const /* note: need a more gentle solution here */
+# endif
+#endif
+
+/* Some Mac compilers merge all .h files incorrectly: */
+#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__)
+# define NO_DUMMY_DECL
+#endif
+
+/* Maximum value for memLevel in deflateInit2 */
+#ifndef MAX_MEM_LEVEL
+# ifdef MAXSEG_64K
+# define MAX_MEM_LEVEL 8
+# else
+# define MAX_MEM_LEVEL 9
+# endif
+#endif
+
+/* Maximum value for windowBits in deflateInit2 and inflateInit2.
+ * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files
+ * created by gzip. (Files created by minigzip can still be extracted by
+ * gzip.)
+ */
+#ifndef MAX_WBITS
+# define MAX_WBITS 15 /* 32K LZ77 window */
+#endif
+
+/* The memory requirements for deflate are (in bytes):
+ (1 << (windowBits+2)) + (1 << (memLevel+9))
+ that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values)
+ plus a few kilobytes for small objects. For example, if you want to reduce
+ the default memory requirements from 256K to 128K, compile with
+ make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7"
+ Of course this will generally degrade compression (there's no free lunch).
+
+ The memory requirements for inflate are (in bytes) 1 << windowBits
+ that is, 32K for windowBits=15 (default value) plus a few kilobytes
+ for small objects.
+*/
+
+ /* Type declarations */
+
+#ifndef OF /* function prototypes */
+# ifdef STDC
+# define OF(args) args
+# else
+# define OF(args) ()
+# endif
+#endif
+
+/* The following definitions for FAR are needed only for MSDOS mixed
+ * model programming (small or medium model with some far allocations).
+ * This was tested only with MSC; for other MSDOS compilers you may have
+ * to define NO_MEMCPY in zutil.h. If you don't need the mixed model,
+ * just define FAR to be empty.
+ */
+#ifdef SYS16BIT
+# if defined(M_I86SM) || defined(M_I86MM)
+ /* MSC small or medium model */
+# define SMALL_MEDIUM
+# ifdef _MSC_VER
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+# if (defined(__SMALL__) || defined(__MEDIUM__))
+ /* Turbo C small or medium model */
+# define SMALL_MEDIUM
+# ifdef __BORLANDC__
+# define FAR _far
+# else
+# define FAR far
+# endif
+# endif
+#endif
+
+#if defined(WINDOWS) || defined(WIN32)
+ /* If building or using zlib as a DLL, define ZLIB_DLL.
+ * This is not mandatory, but it offers a little performance increase.
+ */
+# ifdef ZLIB_DLL
+# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500))
+# ifdef ZLIB_INTERNAL
+# define ZEXTERN extern __declspec(dllexport)
+# else
+# define ZEXTERN extern __declspec(dllimport)
+# endif
+# endif
+# endif /* ZLIB_DLL */
+ /* If building or using zlib with the WINAPI/WINAPIV calling convention,
+ * define ZLIB_WINAPI.
+ * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI.
+ */
+# ifdef ZLIB_WINAPI
+# ifdef FAR
+# undef FAR
+# endif
+# include <windows.h>
+ /* No need for _export, use ZLIB.DEF instead. */
+ /* For complete Windows compatibility, use WINAPI, not __stdcall. */
+# define ZEXPORT WINAPI
+# ifdef WIN32
+# define ZEXPORTVA WINAPIV
+# else
+# define ZEXPORTVA FAR CDECL
+# endif
+# endif
+#endif
+
+#if defined (__BEOS__)
+# ifdef ZLIB_DLL
+# ifdef ZLIB_INTERNAL
+# define ZEXPORT __declspec(dllexport)
+# define ZEXPORTVA __declspec(dllexport)
+# else
+# define ZEXPORT __declspec(dllimport)
+# define ZEXPORTVA __declspec(dllimport)
+# endif
+# endif
+#endif
+
+#ifndef ZEXTERN
+# define ZEXTERN extern
+#endif
+#ifndef ZEXPORT
+# define ZEXPORT
+#endif
+#ifndef ZEXPORTVA
+# define ZEXPORTVA
+#endif
+
+#ifndef FAR
+# define FAR
+#endif
+
+#if !defined(__MACTYPES__)
+typedef unsigned char Byte; /* 8 bits */
+#endif
+typedef unsigned int uInt; /* 16 bits or more */
+typedef unsigned long uLong; /* 32 bits or more */
+
+#ifdef SMALL_MEDIUM
+ /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
+# define Bytef Byte FAR
+#else
+ typedef Byte FAR Bytef;
+#endif
+typedef char FAR charf;
+typedef int FAR intf;
+typedef uInt FAR uIntf;
+typedef uLong FAR uLongf;
+
+#ifdef STDC
+ typedef void const *voidpc;
+ typedef void FAR *voidpf;
+ typedef void *voidp;
+#else
+ typedef Byte const *voidpc;
+ typedef Byte FAR *voidpf;
+ typedef Byte *voidp;
+#endif
+
+#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef STDC
+# include <sys/types.h> /* for off_t */
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if -_LARGEFILE64_SOURCE - -1 == 1
+# undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+# include <unistd.h> /* for SEEK_* and off_t */
+# ifdef VMS
+# include <unixio.h> /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
+# endif
+#endif
+
+#ifndef SEEK_SET
+# define SEEK_SET 0 /* Seek from beginning of file. */
+# define SEEK_CUR 1 /* Seek from current position. */
+# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
+#endif
+
+#ifndef z_off_t
+# define z_off_t long
+#endif
+
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+# define z_off64_t off64_t
+#else
+# define z_off64_t z_off_t
+#endif
+
+#if defined(__OS400__)
+# define NO_vsnprintf
+#endif
+
+#if defined(__MVS__)
+# define NO_vsnprintf
+#endif
+
+/* MVS linker does not support external names larger than 8 bytes */
+#if defined(__MVS__)
+ #pragma map(deflateInit_,"DEIN")
+ #pragma map(deflateInit2_,"DEIN2")
+ #pragma map(deflateEnd,"DEEND")
+ #pragma map(deflateBound,"DEBND")
+ #pragma map(inflateInit_,"ININ")
+ #pragma map(inflateInit2_,"ININ2")
+ #pragma map(inflateEnd,"INEND")
+ #pragma map(inflateSync,"INSY")
+ #pragma map(inflateSetDictionary,"INSEDI")
+ #pragma map(compressBound,"CMBND")
+ #pragma map(inflate_table,"INTABL")
+ #pragma map(inflate_fast,"INFA")
+ #pragma map(inflate_copyright,"INCOPY")
+#endif
+
+#endif /* ZCONF_H */
diff --git a/src/3rdparty/zlib/zconf.in.h b/src/3rdparty/zlib/zconf.h.in
index 03a9431..02ce56c 100644
--- a/src/3rdparty/zlib/zconf.in.h
+++ b/src/3rdparty/zlib/zconf.h.in
@@ -1,5 +1,5 @@
/* zconf.h -- configuration of the zlib compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -11,52 +11,124 @@
/*
* If you *really* need a unique prefix for all types and library functions,
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
+ * Even better than compiling with -DZ_PREFIX would be to use configure to set
+ * this permanently in zconf.h using "./configure --zprefix".
*/
-#ifdef Z_PREFIX
-# define deflateInit_ z_deflateInit_
+#ifdef Z_PREFIX /* may be set to #if 1 by ./configure */
+
+/* all linked symbols */
+# define _dist_code z__dist_code
+# define _length_code z__length_code
+# define _tr_align z__tr_align
+# define _tr_flush_block z__tr_flush_block
+# define _tr_init z__tr_init
+# define _tr_stored_block z__tr_stored_block
+# define _tr_tally z__tr_tally
+# define adler32 z_adler32
+# define adler32_combine z_adler32_combine
+# define adler32_combine64 z_adler32_combine64
+# define compress z_compress
+# define compress2 z_compress2
+# define compressBound z_compressBound
+# define crc32 z_crc32
+# define crc32_combine z_crc32_combine
+# define crc32_combine64 z_crc32_combine64
# define deflate z_deflate
+# define deflateBound z_deflateBound
+# define deflateCopy z_deflateCopy
# define deflateEnd z_deflateEnd
-# define inflateInit_ z_inflateInit_
-# define inflate z_inflate
-# define inflateEnd z_inflateEnd
# define deflateInit2_ z_deflateInit2_
-# define deflateSetDictionary z_deflateSetDictionary
-# define deflateCopy z_deflateCopy
-# define deflateReset z_deflateReset
+# define deflateInit_ z_deflateInit_
# define deflateParams z_deflateParams
-# define deflateBound z_deflateBound
# define deflatePrime z_deflatePrime
+# define deflateReset z_deflateReset
+# define deflateSetDictionary z_deflateSetDictionary
+# define deflateSetHeader z_deflateSetHeader
+# define deflateTune z_deflateTune
+# define deflate_copyright z_deflate_copyright
+# define get_crc_table z_get_crc_table
+# define gz_error z_gz_error
+# define gz_intmax z_gz_intmax
+# define gz_strwinerror z_gz_strwinerror
+# define gzbuffer z_gzbuffer
+# define gzclearerr z_gzclearerr
+# define gzclose z_gzclose
+# define gzclose_r z_gzclose_r
+# define gzclose_w z_gzclose_w
+# define gzdirect z_gzdirect
+# define gzdopen z_gzdopen
+# define gzeof z_gzeof
+# define gzerror z_gzerror
+# define gzflush z_gzflush
+# define gzgetc z_gzgetc
+# define gzgets z_gzgets
+# define gzoffset z_gzoffset
+# define gzoffset64 z_gzoffset64
+# define gzopen z_gzopen
+# define gzopen64 z_gzopen64
+# define gzprintf z_gzprintf
+# define gzputc z_gzputc
+# define gzputs z_gzputs
+# define gzread z_gzread
+# define gzrewind z_gzrewind
+# define gzseek z_gzseek
+# define gzseek64 z_gzseek64
+# define gzsetparams z_gzsetparams
+# define gztell z_gztell
+# define gztell64 z_gztell64
+# define gzungetc z_gzungetc
+# define gzwrite z_gzwrite
+# define inflate z_inflate
+# define inflateBack z_inflateBack
+# define inflateBackEnd z_inflateBackEnd
+# define inflateBackInit_ z_inflateBackInit_
+# define inflateCopy z_inflateCopy
+# define inflateEnd z_inflateEnd
+# define inflateGetHeader z_inflateGetHeader
# define inflateInit2_ z_inflateInit2_
+# define inflateInit_ z_inflateInit_
+# define inflateMark z_inflateMark
+# define inflatePrime z_inflatePrime
+# define inflateReset z_inflateReset
+# define inflateReset2 z_inflateReset2
# define inflateSetDictionary z_inflateSetDictionary
# define inflateSync z_inflateSync
# define inflateSyncPoint z_inflateSyncPoint
-# define inflateCopy z_inflateCopy
-# define inflateReset z_inflateReset
-# define inflateBack z_inflateBack
-# define inflateBackEnd z_inflateBackEnd
-# define compress z_compress
-# define compress2 z_compress2
-# define compressBound z_compressBound
+# define inflateUndermine z_inflateUndermine
+# define inflate_copyright z_inflate_copyright
+# define inflate_fast z_inflate_fast
+# define inflate_table z_inflate_table
# define uncompress z_uncompress
-# define adler32 z_adler32
-# define crc32 z_crc32
-# define get_crc_table z_get_crc_table
# define zError z_zError
+# define zcalloc z_zcalloc
+# define zcfree z_zcfree
+# define zlibCompileFlags z_zlibCompileFlags
+# define zlibVersion z_zlibVersion
+/* all zlib typedefs in zlib.h and zconf.h */
+# define Byte z_Byte
+# define Bytef z_Bytef
# define alloc_func z_alloc_func
+# define charf z_charf
# define free_func z_free_func
+# define gzFile z_gzFile
+# define gz_header z_gz_header
+# define gz_headerp z_gz_headerp
# define in_func z_in_func
+# define intf z_intf
# define out_func z_out_func
-# define Byte z_Byte
# define uInt z_uInt
-# define uLong z_uLong
-# define Bytef z_Bytef
-# define charf z_charf
-# define intf z_intf
# define uIntf z_uIntf
+# define uLong z_uLong
# define uLongf z_uLongf
-# define voidpf z_voidpf
# define voidp z_voidp
+# define voidpc z_voidpc
+# define voidpf z_voidpf
+
+/* all zlib structs in zlib.h and zconf.h */
+# define gz_header_s z_gz_header_s
+# define internal_state z_internal_state
+
#endif
#if defined(__MSDOS__) && !defined(MSDOS)
@@ -284,49 +356,73 @@ typedef uLong FAR uLongf;
typedef Byte *voidp;
#endif
-#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */
-# include <sys/types.h> /* for off_t */
-# include <unistd.h> /* for SEEK_* and off_t */
+#ifdef HAVE_UNISTD_H /* may be set to #if 1 by ./configure */
+# define Z_HAVE_UNISTD_H
+#endif
+
+#ifdef STDC
+# include <sys/types.h> /* for off_t */
+#endif
+
+/* a little trick to accommodate both "#define _LARGEFILE64_SOURCE" and
+ * "#define _LARGEFILE64_SOURCE 1" as requesting 64-bit operations, (even
+ * though the former does not conform to the LFS document), but considering
+ * both "#undef _LARGEFILE64_SOURCE" and "#define _LARGEFILE64_SOURCE 0" as
+ * equivalently requesting no 64-bit operations
+ */
+#if -_LARGEFILE64_SOURCE - -1 == 1
+# undef _LARGEFILE64_SOURCE
+#endif
+
+#if defined(Z_HAVE_UNISTD_H) || defined(_LARGEFILE64_SOURCE)
+# include <unistd.h> /* for SEEK_* and off_t */
# ifdef VMS
-# include <unixio.h> /* for off_t */
+# include <unixio.h> /* for off_t */
+# endif
+# ifndef z_off_t
+# define z_off_t off_t
# endif
-# define z_off_t off_t
#endif
+
#ifndef SEEK_SET
# define SEEK_SET 0 /* Seek from beginning of file. */
# define SEEK_CUR 1 /* Seek from current position. */
# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */
#endif
+
#ifndef z_off_t
# define z_off_t long
#endif
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+# define z_off64_t off64_t
+#else
+# define z_off64_t z_off_t
+#endif
+
#if defined(__OS400__)
# define NO_vsnprintf
#endif
#if defined(__MVS__)
# define NO_vsnprintf
-# ifdef FAR
-# undef FAR
-# endif
#endif
/* MVS linker does not support external names larger than 8 bytes */
#if defined(__MVS__)
-# pragma map(deflateInit_,"DEIN")
-# pragma map(deflateInit2_,"DEIN2")
-# pragma map(deflateEnd,"DEEND")
-# pragma map(deflateBound,"DEBND")
-# pragma map(inflateInit_,"ININ")
-# pragma map(inflateInit2_,"ININ2")
-# pragma map(inflateEnd,"INEND")
-# pragma map(inflateSync,"INSY")
-# pragma map(inflateSetDictionary,"INSEDI")
-# pragma map(compressBound,"CMBND")
-# pragma map(inflate_table,"INTABL")
-# pragma map(inflate_fast,"INFA")
-# pragma map(inflate_copyright,"INCOPY")
+ #pragma map(deflateInit_,"DEIN")
+ #pragma map(deflateInit2_,"DEIN2")
+ #pragma map(deflateEnd,"DEEND")
+ #pragma map(deflateBound,"DEBND")
+ #pragma map(inflateInit_,"ININ")
+ #pragma map(inflateInit2_,"ININ2")
+ #pragma map(inflateEnd,"INEND")
+ #pragma map(inflateSync,"INSY")
+ #pragma map(inflateSetDictionary,"INSEDI")
+ #pragma map(compressBound,"CMBND")
+ #pragma map(inflate_table,"INTABL")
+ #pragma map(inflate_fast,"INFA")
+ #pragma map(inflate_copyright,"INCOPY")
#endif
#endif /* ZCONF_H */
diff --git a/src/3rdparty/zlib/zlib.3 b/src/3rdparty/zlib/zlib.3
index 90b8162..27adc4c 100644
--- a/src/3rdparty/zlib/zlib.3
+++ b/src/3rdparty/zlib/zlib.3
@@ -1,4 +1,4 @@
-.TH ZLIB 3 "18 July 2005"
+.TH ZLIB 3 "19 Apr 2010"
.SH NAME
zlib \- compression/decompression library
.SH SYNOPSIS
@@ -9,15 +9,15 @@ for full description]
The
.I zlib
library is a general purpose data compression library.
-The code is thread safe.
+The code is thread safe, assuming that the standard library functions
+used are thread safe, such as memory allocation routines.
It provides in-memory compression and decompression functions,
including integrity checks of the uncompressed data.
This version of the library supports only one compression method (deflation)
-but other algorithms will be added later
-and will have the same stream interface.
+but other algorithms may be added later
+with the same stream interface.
.LP
Compression can be done in a single step if the buffers are large enough
-(for example if an input file is mmap'ed),
or can be done by repeated calls of the compression function.
In the latter case,
the application must provide more input and/or consume the output
@@ -30,7 +30,7 @@ with an interface similar to that of stdio.
.LP
The library does not install any signal handler.
The decoder checks the consistency of the compressed data,
-so the library should never crash even in case of corrupted input.
+so the library should never crash even in the case of corrupted input.
.LP
All functions of the compression library are documented in the file
.IR zlib.h .
@@ -38,18 +38,19 @@ The distribution source includes examples of use of the library
in the files
.I example.c
and
-.IR minigzip.c .
+.IR minigzip.c,
+as well as other examples in the
+.IR examples/
+directory.
.LP
Changes to this version are documented in the file
.I ChangeLog
-that accompanies the source,
-and are concerned primarily with bug fixes and portability enhancements.
+that accompanies the source.
.LP
-A Java implementation of
.I zlib
-is available in the Java Development Kit 1.1:
+is available in Java using the java.util.zip package:
.IP
-http://www.javasoft.com/products/JDK/1.1/docs/api/Package-java.util.zip.html
+http://java.sun.com/developer/technicalArticles/Programming/compression/
.LP
A Perl interface to
.IR zlib ,
@@ -57,7 +58,7 @@ written by Paul Marquess (pmqs@cpan.org),
is available at CPAN (Comprehensive Perl Archive Network) sites,
including:
.IP
-http://www.cpan.org/modules/by-module/Compress/
+http://search.cpan.org/~pmqs/IO-Compress-Zlib/
.LP
A Python interface to
.IR zlib ,
@@ -66,14 +67,11 @@ is available in Python 1.5 and later versions:
.IP
http://www.python.org/doc/lib/module-zlib.html
.LP
-A
.I zlib
-binding for
-.IR tcl (1),
-written by Andreas Kupries (a.kupries@westend.com),
-is availlable at:
+is built into
+.IR tcl:
.IP
-http://www.westend.com/~kupries/doc/trf/man/man.html
+http://wiki.tcl.tk/4610
.LP
An experimental package to read and write files in .zip format,
written on top of
@@ -81,40 +79,34 @@ written on top of
by Gilles Vollant (info@winimage.com),
is available at:
.IP
-http://www.winimage.com/zLibDll/unzip.html
+http://www.winimage.com/zLibDll/minizip.html
and also in the
.I contrib/minizip
directory of the main
.I zlib
-web site.
+source distribution.
.SH "SEE ALSO"
The
.I zlib
-web site can be found at either of these locations:
+web site can be found at:
.IP
-http://www.zlib.org
-.br
-http://www.gzip.org/zlib/
+http://zlib.net/
.LP
The data format used by the zlib library is described by RFC
(Request for Comments) 1950 to 1952 in the files:
.IP
-http://www.ietf.org/rfc/rfc1950.txt (concerning zlib format)
+http://www.ietf.org/rfc/rfc1950.txt (for the zlib header and trailer format)
.br
-http://www.ietf.org/rfc/rfc1951.txt (concerning deflate format)
+http://www.ietf.org/rfc/rfc1951.txt (for the deflate compressed data format)
.br
-http://www.ietf.org/rfc/rfc1952.txt (concerning gzip format)
-.LP
-These documents are also available in other formats from:
-.IP
-ftp://ftp.uu.net/graphics/png/documents/zlib/zdoc-index.html
+http://www.ietf.org/rfc/rfc1952.txt (for the gzip header and trailer format)
.LP
-Mark Nelson (markn@ieee.org) wrote an article about
+Mark Nelson wrote an article about
.I zlib
for the Jan. 1997 issue of Dr. Dobb's Journal;
a copy of the article is available at:
.IP
-http://dogma.net/markn/articles/zlibtool/zlibtool.htm
+http://marknelson.us/1997/01/01/zlib-engine/
.SH "REPORTING PROBLEMS"
Before reporting a problem,
please check the
@@ -127,14 +119,14 @@ Please read the
.I zlib
FAQ at:
.IP
-http://www.gzip.org/zlib/zlib_faq.html
+http://zlib.net/zlib_faq.html
.LP
before asking for help.
Send questions and/or comments to zlib@gzip.org,
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
.SH AUTHORS
-Version 1.2.3
-Copyright (C) 1995-2005 Jean-loup Gailly (jloup@gzip.org)
+Version 1.2.5
+Copyright (C) 1995-2010 Jean-loup Gailly (jloup@gzip.org)
and Mark Adler (madler@alumni.caltech.edu).
.LP
This software is provided "as-is,"
diff --git a/src/3rdparty/zlib/zlib.3.pdf b/src/3rdparty/zlib/zlib.3.pdf
new file mode 100644
index 0000000..9f8a2c3
--- /dev/null
+++ b/src/3rdparty/zlib/zlib.3.pdf
Binary files differ
diff --git a/src/3rdparty/zlib/zlib.h b/src/3rdparty/zlib/zlib.h
index bdb9a3d..4069724 100644
--- a/src/3rdparty/zlib/zlib.h
+++ b/src/3rdparty/zlib/zlib.h
@@ -1,7 +1,7 @@
/* zlib.h -- interface of the 'zlib' general purpose compression library
- version 1.2.3, July 18th, 2005
+ version 1.2.5, April 19th, 2010
- Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler
+ Copyright (C) 1995-2010 Jean-loup Gailly and Mark Adler
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@@ -32,57 +32,58 @@
#define ZLIB_H
#include "zconf.h"
+
#include "qconfig.h"
+#if defined(QT_VISIBILITY_AVAILABLE)
+# undef ZEXTERN
+# define ZEXTERN __attribute__((visibility("default")))
+#elif defined(QT_MAKEDLL)
+# undef ZEXTERN
+# define ZEXTERN __declspec(dllexport)
+#endif
#ifdef __cplusplus
extern "C" {
#endif
-#define ZLIB_VERSION "1.2.3"
-#define ZLIB_VERNUM 0x1230
-
-#if defined(QT_VISIBILITY_AVAILABLE)
-# define Q_ZEXPORT __attribute__((visibility("default")))
-#else
-# ifdef QT_MAKEDLL
-# define Q_ZEXPORT __declspec(dllexport)
-# else
-# define Q_ZEXPORT ZEXPORT
-# endif
-#endif
+#define ZLIB_VERSION "1.2.5"
+#define ZLIB_VERNUM 0x1250
+#define ZLIB_VER_MAJOR 1
+#define ZLIB_VER_MINOR 2
+#define ZLIB_VER_REVISION 5
+#define ZLIB_VER_SUBREVISION 0
/*
- The 'zlib' compression library provides in-memory compression and
- decompression functions, including integrity checks of the uncompressed
- data. This version of the library supports only one compression method
- (deflation) but other algorithms will be added later and will have the same
- stream interface.
-
- Compression can be done in a single step if the buffers are large
- enough (for example if an input file is mmap'ed), or can be done by
- repeated calls of the compression function. In the latter case, the
- application must provide more input and/or consume the output
+ The 'zlib' compression library provides in-memory compression and
+ decompression functions, including integrity checks of the uncompressed data.
+ This version of the library supports only one compression method (deflation)
+ but other algorithms will be added later and will have the same stream
+ interface.
+
+ Compression can be done in a single step if the buffers are large enough,
+ or can be done by repeated calls of the compression function. In the latter
+ case, the application must provide more input and/or consume the output
(providing more output space) before each call.
- The compressed data format used by default by the in-memory functions is
+ The compressed data format used by default by the in-memory functions is
the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped
around a deflate stream, which is itself documented in RFC 1951.
- The library also supports reading and writing files in gzip (.gz) format
+ The library also supports reading and writing files in gzip (.gz) format
with an interface similar to that of stdio using the functions that start
with "gz". The gzip format is different from the zlib format. gzip is a
gzip wrapper, documented in RFC 1952, wrapped around a deflate stream.
- This library can optionally read and write gzip streams in memory as well.
+ This library can optionally read and write gzip streams in memory as well.
- The zlib format was designed to be compact and fast for use in memory
+ The zlib format was designed to be compact and fast for use in memory
and on communications channels. The gzip format was designed for single-
file compression on file systems, has a larger header than zlib to maintain
directory information, and uses a different, slower check method than zlib.
- The library does not install any signal handler. The decoder checks
- the consistency of the compressed data, so the library should never
- crash even in case of corrupted input.
+ The library does not install any signal handler. The decoder checks
+ the consistency of the compressed data, so the library should never crash
+ even in case of corrupted input.
*/
typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size));
@@ -137,45 +138,45 @@ typedef struct gz_header_s {
typedef gz_header FAR *gz_headerp;
/*
- The application must update next_in and avail_in when avail_in has
- dropped to zero. It must update next_out and avail_out when avail_out
- has dropped to zero. The application must initialize zalloc, zfree and
- opaque before calling the init function. All other fields are set by the
- compression library and must not be updated by the application.
-
- The opaque value provided by the application will be passed as the first
- parameter for calls of zalloc and zfree. This can be useful for custom
- memory management. The compression library attaches no meaning to the
+ The application must update next_in and avail_in when avail_in has dropped
+ to zero. It must update next_out and avail_out when avail_out has dropped
+ to zero. The application must initialize zalloc, zfree and opaque before
+ calling the init function. All other fields are set by the compression
+ library and must not be updated by the application.
+
+ The opaque value provided by the application will be passed as the first
+ parameter for calls of zalloc and zfree. This can be useful for custom
+ memory management. The compression library attaches no meaning to the
opaque value.
- zalloc must return Z_NULL if there is not enough memory for the object.
+ zalloc must return Z_NULL if there is not enough memory for the object.
If zlib is used in a multi-threaded application, zalloc and zfree must be
thread safe.
- On 16-bit systems, the functions zalloc and zfree must be able to allocate
- exactly 65536 bytes, but will not be required to allocate more than this
- if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS,
- pointers returned by zalloc for objects of exactly 65536 bytes *must*
- have their offset normalized to zero. The default allocation function
- provided by this library ensures this (see zutil.c). To reduce memory
- requirements and avoid any allocation of 64K objects, at the expense of
- compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h).
-
- The fields total_in and total_out can be used for statistics or
- progress reports. After compression, total_in holds the total size of
- the uncompressed data and may be saved for use in the decompressor
- (particularly if the decompressor wants to decompress everything in
- a single step).
+ On 16-bit systems, the functions zalloc and zfree must be able to allocate
+ exactly 65536 bytes, but will not be required to allocate more than this if
+ the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, pointers
+ returned by zalloc for objects of exactly 65536 bytes *must* have their
+ offset normalized to zero. The default allocation function provided by this
+ library ensures this (see zutil.c). To reduce memory requirements and avoid
+ any allocation of 64K objects, at the expense of compression ratio, compile
+ the library with -DMAX_WBITS=14 (see zconf.h).
+
+ The fields total_in and total_out can be used for statistics or progress
+ reports. After compression, total_in holds the total size of the
+ uncompressed data and may be saved for use in the decompressor (particularly
+ if the decompressor wants to decompress everything in a single step).
*/
/* constants */
#define Z_NO_FLUSH 0
-#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */
+#define Z_PARTIAL_FLUSH 1
#define Z_SYNC_FLUSH 2
#define Z_FULL_FLUSH 3
#define Z_FINISH 4
#define Z_BLOCK 5
+#define Z_TREES 6
/* Allowed flush values; see deflate() and inflate() below for details */
#define Z_OK 0
@@ -187,8 +188,8 @@ typedef gz_header FAR *gz_headerp;
#define Z_MEM_ERROR (-4)
#define Z_BUF_ERROR (-5)
#define Z_VERSION_ERROR (-6)
-/* Return codes for the compression/decompression functions. Negative
- * values are errors, positive values are used for special but normal events.
+/* Return codes for the compression/decompression functions. Negative values
+ * are errors, positive values are used for special but normal events.
*/
#define Z_NO_COMPRESSION 0
@@ -218,134 +219,155 @@ typedef gz_header FAR *gz_headerp;
#define zlib_version zlibVersion()
/* for compatibility with versions < 1.0.2 */
+
/* basic functions */
-ZEXTERN Q_ZEXPORT const char * zlibVersion OF((void));
+ZEXTERN const char * ZEXPORT zlibVersion OF((void));
/* The application can compare zlibVersion and ZLIB_VERSION for consistency.
- If the first character differs, the library code actually used is
- not compatible with the zlib.h header file used by the application.
- This check is automatically made by deflateInit and inflateInit.
+ If the first character differs, the library code actually used is not
+ compatible with the zlib.h header file used by the application. This check
+ is automatically made by deflateInit and inflateInit.
*/
/*
ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level));
- Initializes the internal stream state for compression. The fields
- zalloc, zfree and opaque must be initialized before by the caller.
- If zalloc and zfree are set to Z_NULL, deflateInit updates them to
- use default allocation functions.
+ Initializes the internal stream state for compression. The fields
+ zalloc, zfree and opaque must be initialized before by the caller. If
+ zalloc and zfree are set to Z_NULL, deflateInit updates them to use default
+ allocation functions.
The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9:
- 1 gives best speed, 9 gives best compression, 0 gives no compression at
- all (the input data is simply copied a block at a time).
- Z_DEFAULT_COMPRESSION requests a default compromise between speed and
- compression (currently equivalent to level 6).
+ 1 gives best speed, 9 gives best compression, 0 gives no compression at all
+ (the input data is simply copied a block at a time). Z_DEFAULT_COMPRESSION
+ requests a default compromise between speed and compression (currently
+ equivalent to level 6).
- deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not
- enough memory, Z_STREAM_ERROR if level is not a valid compression level,
+ deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if level is not a valid compression level, or
Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible
- with the version assumed by the caller (ZLIB_VERSION).
- msg is set to null if there is no error message. deflateInit does not
- perform any compression: this will be done by deflate().
+ with the version assumed by the caller (ZLIB_VERSION). msg is set to null
+ if there is no error message. deflateInit does not perform any compression:
+ this will be done by deflate().
*/
-ZEXTERN int Q_ZEXPORT deflate OF((z_streamp strm, int flush));
+ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush));
/*
deflate compresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce some
- output latency (reading input without producing any output) except when
+ buffer becomes empty or the output buffer becomes full. It may introduce
+ some output latency (reading input without producing any output) except when
forced to flush.
- The detailed semantics are as follows. deflate performs one or both of the
+ The detailed semantics are as follows. deflate performs one or both of the
following actions:
- Compress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
+ accordingly. If not all input can be processed (because there is not
enough room in the output buffer), next_in and avail_in are updated and
processing will resume at this point for the next call of deflate().
- Provide more output starting at next_out and update next_out and avail_out
- accordingly. This action is forced if the parameter flush is non zero.
+ accordingly. This action is forced if the parameter flush is non zero.
Forcing flush frequently degrades the compression ratio, so this parameter
- should be set only when necessary (in interactive applications).
- Some output may be provided even if flush is not set.
-
- Before the call of deflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating avail_in or avail_out accordingly; avail_out
- should never be zero before the call. The application can consume the
- compressed output when it wants, for example when the output buffer is full
- (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK
- and with zero avail_out, it must be called again after making room in the
- output buffer because there might be more output pending.
+ should be set only when necessary (in interactive applications). Some
+ output may be provided even if flush is not set.
+
+ Before the call of deflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating avail_in or avail_out accordingly; avail_out should
+ never be zero before the call. The application can consume the compressed
+ output when it wants, for example when the output buffer is full (avail_out
+ == 0), or after each call of deflate(). If deflate returns Z_OK and with
+ zero avail_out, it must be called again after making room in the output
+ buffer because there might be more output pending.
Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to
- decide how much data to accumualte before producing output, in order to
+ decide how much data to accumulate before producing output, in order to
maximize compression.
If the parameter flush is set to Z_SYNC_FLUSH, all pending output is
flushed to the output buffer and the output is aligned on a byte boundary, so
- that the decompressor can get all input data available so far. (In particular
- avail_in is zero after the call if enough output space has been provided
- before the call.) Flushing may degrade compression for some compression
- algorithms and so it should be used only when necessary.
+ that the decompressor can get all input data available so far. (In
+ particular avail_in is zero after the call if enough output space has been
+ provided before the call.) Flushing may degrade compression for some
+ compression algorithms and so it should be used only when necessary. This
+ completes the current deflate block and follows it with an empty stored block
+ that is three bits plus filler bits to the next byte, followed by four bytes
+ (00 00 ff ff).
+
+ If flush is set to Z_PARTIAL_FLUSH, all pending output is flushed to the
+ output buffer, but the output is not aligned to a byte boundary. All of the
+ input data so far will be available to the decompressor, as for Z_SYNC_FLUSH.
+ This completes the current deflate block and follows it with an empty fixed
+ codes block that is 10 bits long. This assures that enough bytes are output
+ in order for the decompressor to finish the block before the empty fixed code
+ block.
+
+ If flush is set to Z_BLOCK, a deflate block is completed and emitted, as
+ for Z_SYNC_FLUSH, but the output is not aligned on a byte boundary, and up to
+ seven bits of the current block are held to be written as the next byte after
+ the next deflate block is completed. In this case, the decompressor may not
+ be provided enough bits at this point in order to complete decompression of
+ the data provided so far to the compressor. It may need to wait for the next
+ block to be emitted. This is for advanced applications that need to control
+ the emission of deflate blocks.
If flush is set to Z_FULL_FLUSH, all output is flushed as with
Z_SYNC_FLUSH, and the compression state is reset so that decompression can
restart from this point if previous compressed data has been damaged or if
- random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
+ random access is desired. Using Z_FULL_FLUSH too often can seriously degrade
compression.
If deflate returns with avail_out == 0, this function must be called again
with the same value of the flush parameter and more output space (updated
avail_out), until the flush is complete (deflate returns with non-zero
- avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
+ avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that
avail_out is greater than six to avoid repeated flush markers due to
avail_out == 0 on return.
If the parameter flush is set to Z_FINISH, pending input is processed,
- pending output is flushed and deflate returns with Z_STREAM_END if there
- was enough output space; if deflate returns with Z_OK, this function must be
+ pending output is flushed and deflate returns with Z_STREAM_END if there was
+ enough output space; if deflate returns with Z_OK, this function must be
called again with Z_FINISH and more output space (updated avail_out) but no
- more input data, until it returns with Z_STREAM_END or an error. After
- deflate has returned Z_STREAM_END, the only possible operations on the
- stream are deflateReset or deflateEnd.
+ more input data, until it returns with Z_STREAM_END or an error. After
+ deflate has returned Z_STREAM_END, the only possible operations on the stream
+ are deflateReset or deflateEnd.
Z_FINISH can be used immediately after deflateInit if all the compression
- is to be done in a single step. In this case, avail_out must be at least
- the value returned by deflateBound (see below). If deflate does not return
+ is to be done in a single step. In this case, avail_out must be at least the
+ value returned by deflateBound (see below). If deflate does not return
Z_STREAM_END, then it must be called again as described above.
deflate() sets strm->adler to the adler32 checksum of all input read
so far (that is, total_in bytes).
deflate() may update strm->data_type if it can make a good guess about
- the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
- binary. This field is only for information purposes and does not affect
- the compression algorithm in any manner.
+ the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered
+ binary. This field is only for information purposes and does not affect the
+ compression algorithm in any manner.
deflate() returns Z_OK if some progress has been made (more input
processed or more output produced), Z_STREAM_END if all input has been
consumed and all output has been produced (only when flush is set to
Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example
- if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible
- (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
+ if next_in or next_out was Z_NULL), Z_BUF_ERROR if no progress is possible
+ (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not
fatal, and deflate() can be called again with more input and more output
space to continue compressing.
*/
-ZEXTERN int Q_ZEXPORT deflateEnd OF((z_streamp strm));
+ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm));
/*
All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
+ This function discards any unprocessed input and does not flush any pending
+ output.
deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the
stream state was inconsistent, Z_DATA_ERROR if the stream was freed
- prematurely (some input or output was discarded). In the error case,
- msg may be set but then points to a static string (which must not be
+ prematurely (some input or output was discarded). In the error case, msg
+ may be set but then points to a static string (which must not be
deallocated).
*/
@@ -353,10 +375,10 @@ ZEXTERN int Q_ZEXPORT deflateEnd OF((z_streamp strm));
/*
ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
- Initializes the internal stream state for decompression. The fields
+ Initializes the internal stream state for decompression. The fields
next_in, avail_in, zalloc, zfree and opaque must be initialized before by
- the caller. If next_in is not Z_NULL and avail_in is large enough (the exact
- value depends on the compression method), inflateInit determines the
+ the caller. If next_in is not Z_NULL and avail_in is large enough (the
+ exact value depends on the compression method), inflateInit determines the
compression method from the zlib header and allocates all data structures
accordingly; otherwise the allocation will be deferred to the first call of
inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to
@@ -364,95 +386,108 @@ ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm));
inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough
memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
- version assumed by the caller. msg is set to null if there is no error
- message. inflateInit does not perform any decompression apart from reading
- the zlib header if present: this will be done by inflate(). (So next_in and
- avail_in may be modified, but next_out and avail_out are unchanged.)
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit does not perform any decompression
+ apart from possibly reading the zlib header if present: actual decompression
+ will be done by inflate(). (So next_in and avail_in may be modified, but
+ next_out and avail_out are unused and unchanged.) The current implementation
+ of inflateInit() does not process any header information -- that is deferred
+ until inflate() is called.
*/
-ZEXTERN int Q_ZEXPORT inflate OF((z_streamp strm, int flush));
+ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush));
/*
inflate decompresses as much data as possible, and stops when the input
- buffer becomes empty or the output buffer becomes full. It may introduce
+ buffer becomes empty or the output buffer becomes full. It may introduce
some output latency (reading input without producing any output) except when
forced to flush.
- The detailed semantics are as follows. inflate performs one or both of the
+ The detailed semantics are as follows. inflate performs one or both of the
following actions:
- Decompress more input starting at next_in and update next_in and avail_in
- accordingly. If not all input can be processed (because there is not
- enough room in the output buffer), next_in is updated and processing
- will resume at this point for the next call of inflate().
+ accordingly. If not all input can be processed (because there is not
+ enough room in the output buffer), next_in is updated and processing will
+ resume at this point for the next call of inflate().
- Provide more output starting at next_out and update next_out and avail_out
- accordingly. inflate() provides as much output as possible, until there
- is no more input data or no more space in the output buffer (see below
- about the flush parameter).
-
- Before the call of inflate(), the application should ensure that at least
- one of the actions is possible, by providing more input and/or consuming
- more output, and updating the next_* and avail_* values accordingly.
- The application can consume the uncompressed output when it wants, for
- example when the output buffer is full (avail_out == 0), or after each
- call of inflate(). If inflate returns Z_OK and with zero avail_out, it
- must be called again after making room in the output buffer because there
- might be more output pending.
-
- The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH,
- Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much
- output as possible to the output buffer. Z_BLOCK requests that inflate() stop
- if and when it gets to the next deflate block boundary. When decoding the
- zlib or gzip format, this will cause inflate() to return immediately after
- the header and before the first block. When doing a raw inflate, inflate()
- will go ahead and process the first block, and will return when it gets to
- the end of that block, or when it runs out of data.
+ accordingly. inflate() provides as much output as possible, until there is
+ no more input data or no more space in the output buffer (see below about
+ the flush parameter).
+
+ Before the call of inflate(), the application should ensure that at least
+ one of the actions is possible, by providing more input and/or consuming more
+ output, and updating the next_* and avail_* values accordingly. The
+ application can consume the uncompressed output when it wants, for example
+ when the output buffer is full (avail_out == 0), or after each call of
+ inflate(). If inflate returns Z_OK and with zero avail_out, it must be
+ called again after making room in the output buffer because there might be
+ more output pending.
+
+ The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, Z_FINISH,
+ Z_BLOCK, or Z_TREES. Z_SYNC_FLUSH requests that inflate() flush as much
+ output as possible to the output buffer. Z_BLOCK requests that inflate()
+ stop if and when it gets to the next deflate block boundary. When decoding
+ the zlib or gzip format, this will cause inflate() to return immediately
+ after the header and before the first block. When doing a raw inflate,
+ inflate() will go ahead and process the first block, and will return when it
+ gets to the end of that block, or when it runs out of data.
The Z_BLOCK option assists in appending to or combining deflate streams.
Also to assist in this, on return inflate() will set strm->data_type to the
- number of unused bits in the last byte taken from strm->next_in, plus 64
- if inflate() is currently decoding the last block in the deflate stream,
- plus 128 if inflate() returned immediately after decoding an end-of-block
- code or decoding the complete header up to just before the first byte of the
- deflate stream. The end-of-block will not be indicated until all of the
- uncompressed data from that block has been written to strm->next_out. The
- number of unused bits may in general be greater than seven, except when
- bit 7 of data_type is set, in which case the number of unused bits will be
- less than eight.
+ number of unused bits in the last byte taken from strm->next_in, plus 64 if
+ inflate() is currently decoding the last block in the deflate stream, plus
+ 128 if inflate() returned immediately after decoding an end-of-block code or
+ decoding the complete header up to just before the first byte of the deflate
+ stream. The end-of-block will not be indicated until all of the uncompressed
+ data from that block has been written to strm->next_out. The number of
+ unused bits may in general be greater than seven, except when bit 7 of
+ data_type is set, in which case the number of unused bits will be less than
+ eight. data_type is set as noted here every time inflate() returns for all
+ flush options, and so can be used to determine the amount of currently
+ consumed input in bits.
+
+ The Z_TREES option behaves as Z_BLOCK does, but it also returns when the
+ end of each deflate block header is reached, before any actual data in that
+ block is decoded. This allows the caller to determine the length of the
+ deflate block header for later use in random access within a deflate block.
+ 256 is added to the value of strm->data_type when inflate() returns
+ immediately after reaching the end of the deflate block header.
inflate() should normally be called until it returns Z_STREAM_END or an
- error. However if all decompression is to be performed in a single step
- (a single call of inflate), the parameter flush should be set to
- Z_FINISH. In this case all pending input is processed and all pending
- output is flushed; avail_out must be large enough to hold all the
- uncompressed data. (The size of the uncompressed data may have been saved
- by the compressor for this purpose.) The next operation on this stream must
- be inflateEnd to deallocate the decompression state. The use of Z_FINISH
- is never required, but can be used to inform inflate that a faster approach
- may be used for the single inflate() call.
+ error. However if all decompression is to be performed in a single step (a
+ single call of inflate), the parameter flush should be set to Z_FINISH. In
+ this case all pending input is processed and all pending output is flushed;
+ avail_out must be large enough to hold all the uncompressed data. (The size
+ of the uncompressed data may have been saved by the compressor for this
+ purpose.) The next operation on this stream must be inflateEnd to deallocate
+ the decompression state. The use of Z_FINISH is never required, but can be
+ used to inform inflate that a faster approach may be used for the single
+ inflate() call.
In this implementation, inflate() always flushes as much output as
possible to the output buffer, and always uses the faster approach on the
- first call. So the only effect of the flush parameter in this implementation
+ first call. So the only effect of the flush parameter in this implementation
is on the return value of inflate(), as noted below, or when it returns early
- because Z_BLOCK is used.
+ because Z_BLOCK or Z_TREES is used.
If a preset dictionary is needed after this call (see inflateSetDictionary
below), inflate sets strm->adler to the adler32 checksum of the dictionary
chosen by the compressor and returns Z_NEED_DICT; otherwise it sets
strm->adler to the adler32 checksum of all output produced so far (that is,
total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described
- below. At the end of the stream, inflate() checks that its computed adler32
+ below. At the end of the stream, inflate() checks that its computed adler32
checksum is equal to that saved by the compressor and returns Z_STREAM_END
only if the checksum is correct.
- inflate() will decompress and check either zlib-wrapped or gzip-wrapped
- deflate data. The header type is detected automatically. Any information
- contained in the gzip header is not retained, so applications that need that
- information should instead use raw inflate, see inflateInit2() below, or
- inflateBack() and perform their own processing of the gzip header and
- trailer.
+ inflate() can decompress and check either zlib-wrapped or gzip-wrapped
+ deflate data. The header type is detected automatically, if requested when
+ initializing with inflateInit2(). Any information contained in the gzip
+ header is not retained, so applications that need that information should
+ instead use raw inflate, see inflateInit2() below, or inflateBack() and
+ perform their own processing of the gzip header and trailer.
inflate() returns Z_OK if some progress has been made (more input processed
or more output produced), Z_STREAM_END if the end of the compressed data has
@@ -460,27 +495,28 @@ ZEXTERN int Q_ZEXPORT inflate OF((z_streamp strm, int flush));
preset dictionary is needed at this point, Z_DATA_ERROR if the input data was
corrupted (input stream not conforming to the zlib format or incorrect check
value), Z_STREAM_ERROR if the stream structure was inconsistent (for example
- if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory,
+ next_in or next_out was Z_NULL), Z_MEM_ERROR if there was not enough memory,
Z_BUF_ERROR if no progress is possible or if there was not enough room in the
- output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
+ output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and
inflate() can be called again with more input and more output space to
- continue decompressing. If Z_DATA_ERROR is returned, the application may then
- call inflateSync() to look for a good compression block if a partial recovery
- of the data is desired.
+ continue decompressing. If Z_DATA_ERROR is returned, the application may
+ then call inflateSync() to look for a good compression block if a partial
+ recovery of the data is desired.
*/
-ZEXTERN int Q_ZEXPORT inflateEnd OF((z_streamp strm));
+ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm));
/*
All dynamically allocated data structures for this stream are freed.
- This function discards any unprocessed input and does not flush any
- pending output.
+ This function discards any unprocessed input and does not flush any pending
+ output.
inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state
- was inconsistent. In the error case, msg may be set but then points to a
+ was inconsistent. In the error case, msg may be set but then points to a
static string (which must not be deallocated).
*/
+
/* Advanced functions */
/*
@@ -495,144 +531,146 @@ ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm,
int memLevel,
int strategy));
- This is another version of deflateInit with more compression options. The
- fields next_in, zalloc, zfree and opaque must be initialized before by
- the caller.
+ This is another version of deflateInit with more compression options. The
+ fields next_in, zalloc, zfree and opaque must be initialized before by the
+ caller.
- The method parameter is the compression method. It must be Z_DEFLATED in
+ The method parameter is the compression method. It must be Z_DEFLATED in
this version of the library.
The windowBits parameter is the base two logarithm of the window size
- (the size of the history buffer). It should be in the range 8..15 for this
- version of the library. Larger values of this parameter result in better
- compression at the expense of memory usage. The default value is 15 if
+ (the size of the history buffer). It should be in the range 8..15 for this
+ version of the library. Larger values of this parameter result in better
+ compression at the expense of memory usage. The default value is 15 if
deflateInit is used instead.
- windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
- determines the window size. deflate() will then generate raw deflate data
+ windowBits can also be -8..-15 for raw deflate. In this case, -windowBits
+ determines the window size. deflate() will then generate raw deflate data
with no zlib header or trailer, and will not compute an adler32 check value.
- windowBits can also be greater than 15 for optional gzip encoding. Add
+ windowBits can also be greater than 15 for optional gzip encoding. Add
16 to windowBits to write a simple gzip header and trailer around the
- compressed data instead of a zlib wrapper. The gzip header will have no
- file name, no extra data, no comment, no modification time (set to zero),
- no header crc, and the operating system will be set to 255 (unknown). If a
+ compressed data instead of a zlib wrapper. The gzip header will have no
+ file name, no extra data, no comment, no modification time (set to zero), no
+ header crc, and the operating system will be set to 255 (unknown). If a
gzip stream is being written, strm->adler is a crc32 instead of an adler32.
The memLevel parameter specifies how much memory should be allocated
- for the internal compression state. memLevel=1 uses minimum memory but
- is slow and reduces compression ratio; memLevel=9 uses maximum memory
- for optimal speed. The default value is 8. See zconf.h for total memory
- usage as a function of windowBits and memLevel.
+ for the internal compression state. memLevel=1 uses minimum memory but is
+ slow and reduces compression ratio; memLevel=9 uses maximum memory for
+ optimal speed. The default value is 8. See zconf.h for total memory usage
+ as a function of windowBits and memLevel.
- The strategy parameter is used to tune the compression algorithm. Use the
+ The strategy parameter is used to tune the compression algorithm. Use the
value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a
filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no
string match), or Z_RLE to limit match distances to one (run-length
- encoding). Filtered data consists mostly of small values with a somewhat
- random distribution. In this case, the compression algorithm is tuned to
- compress them better. The effect of Z_FILTERED is to force more Huffman
+ encoding). Filtered data consists mostly of small values with a somewhat
+ random distribution. In this case, the compression algorithm is tuned to
+ compress them better. The effect of Z_FILTERED is to force more Huffman
coding and less string matching; it is somewhat intermediate between
- Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as
- Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy
- parameter only affects the compression ratio but not the correctness of the
- compressed output even if it is not set appropriately. Z_FIXED prevents the
- use of dynamic Huffman codes, allowing for a simpler decoder for special
- applications.
-
- deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid
- method). msg is set to null if there is no error message. deflateInit2 does
- not perform any compression: this will be done by deflate().
+ Z_DEFAULT_STRATEGY and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as
+ fast as Z_HUFFMAN_ONLY, but give better compression for PNG image data. The
+ strategy parameter only affects the compression ratio but not the
+ correctness of the compressed output even if it is not set appropriately.
+ Z_FIXED prevents the use of dynamic Huffman codes, allowing for a simpler
+ decoder for special applications.
+
+ deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
+ memory, Z_STREAM_ERROR if any parameter is invalid (such as an invalid
+ method), or Z_VERSION_ERROR if the zlib library version (zlib_version) is
+ incompatible with the version assumed by the caller (ZLIB_VERSION). msg is
+ set to null if there is no error message. deflateInit2 does not perform any
+ compression: this will be done by deflate().
*/
-ZEXTERN int Q_ZEXPORT deflateSetDictionary OF((z_streamp strm,
+ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm,
const Bytef *dictionary,
uInt dictLength));
/*
Initializes the compression dictionary from the given byte sequence
- without producing any compressed output. This function must be called
- immediately after deflateInit, deflateInit2 or deflateReset, before any
- call of deflate. The compressor and decompressor must use exactly the same
+ without producing any compressed output. This function must be called
+ immediately after deflateInit, deflateInit2 or deflateReset, before any call
+ of deflate. The compressor and decompressor must use exactly the same
dictionary (see inflateSetDictionary).
The dictionary should consist of strings (byte sequences) that are likely
to be encountered later in the data to be compressed, with the most commonly
- used strings preferably put towards the end of the dictionary. Using a
+ used strings preferably put towards the end of the dictionary. Using a
dictionary is most useful when the data to be compressed is short and can be
predicted with good accuracy; the data can then be compressed better than
with the default empty dictionary.
Depending on the size of the compression data structures selected by
deflateInit or deflateInit2, a part of the dictionary may in effect be
- discarded, for example if the dictionary is larger than the window size in
- deflate or deflate2. Thus the strings most likely to be useful should be
- put at the end of the dictionary, not at the front. In addition, the
- current implementation of deflate will use at most the window size minus
- 262 bytes of the provided dictionary.
+ discarded, for example if the dictionary is larger than the window size
+ provided in deflateInit or deflateInit2. Thus the strings most likely to be
+ useful should be put at the end of the dictionary, not at the front. In
+ addition, the current implementation of deflate will use at most the window
+ size minus 262 bytes of the provided dictionary.
Upon return of this function, strm->adler is set to the adler32 value
of the dictionary; the decompressor may later use this value to determine
- which dictionary has been used by the compressor. (The adler32 value
+ which dictionary has been used by the compressor. (The adler32 value
applies to the whole dictionary even if only a subset of the dictionary is
actually used by the compressor.) If a raw deflate was requested, then the
adler32 value is not computed and strm->adler is not set.
deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
inconsistent (for example if deflate has already been called for this stream
- or if the compression method is bsort). deflateSetDictionary does not
+ or if the compression method is bsort). deflateSetDictionary does not
perform any compression: this will be done by deflate().
*/
-ZEXTERN int Q_ZEXPORT deflateCopy OF((z_streamp dest,
+ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest,
z_streamp source));
/*
Sets the destination stream as a complete copy of the source stream.
This function can be useful when several compression strategies will be
tried, for example when there are several ways of pre-processing the input
- data with a filter. The streams that will be discarded should then be freed
+ data with a filter. The streams that will be discarded should then be freed
by calling deflateEnd. Note that deflateCopy duplicates the internal
- compression state which can be quite large, so this strategy is slow and
- can consume lots of memory.
+ compression state which can be quite large, so this strategy is slow and can
+ consume lots of memory.
deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
destination.
*/
-ZEXTERN int Q_ZEXPORT deflateReset OF((z_streamp strm));
+ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm));
/*
This function is equivalent to deflateEnd followed by deflateInit,
- but does not free and reallocate all the internal compression state.
- The stream will keep the same compression level and any other attributes
- that may have been set by deflateInit2.
+ but does not free and reallocate all the internal compression state. The
+ stream will keep the same compression level and any other attributes that
+ may have been set by deflateInit2.
- deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
+ deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
*/
-ZEXTERN int Q_ZEXPORT deflateParams OF((z_streamp strm,
+ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm,
int level,
int strategy));
/*
Dynamically update the compression level and compression strategy. The
interpretation of level and strategy is as in deflateInit2. This can be
used to switch between compression and straight copy of the input data, or
- to switch to a different kind of input data requiring a different
- strategy. If the compression level is changed, the input available so far
- is compressed with the old level (and may be flushed); the new level will
- take effect only at the next call of deflate().
+ to switch to a different kind of input data requiring a different strategy.
+ If the compression level is changed, the input available so far is
+ compressed with the old level (and may be flushed); the new level will take
+ effect only at the next call of deflate().
Before the call of deflateParams, the stream state must be set as for
- a call of deflate(), since the currently available input may have to
- be compressed and flushed. In particular, strm->avail_out must be non-zero.
+ a call of deflate(), since the currently available input may have to be
+ compressed and flushed. In particular, strm->avail_out must be non-zero.
deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source
- stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR
- if strm->avail_out was zero.
+ stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR if
+ strm->avail_out was zero.
*/
ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm,
@@ -656,9 +694,10 @@ ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm,
uLong sourceLen));
/*
deflateBound() returns an upper bound on the compressed size after
- deflation of sourceLen bytes. It must be called after deflateInit()
- or deflateInit2(). This would be used to allocate an output buffer
- for deflation in a single pass, and so would be called before deflate().
+ deflation of sourceLen bytes. It must be called after deflateInit() or
+ deflateInit2(), and after deflateSetHeader(), if used. This would be used
+ to allocate an output buffer for deflation in a single pass, and so would be
+ called before deflate().
*/
ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
@@ -666,21 +705,21 @@ ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm,
int value));
/*
deflatePrime() inserts bits in the deflate output stream. The intent
- is that this function is used to start off the deflate output with the
- bits leftover from a previous deflate stream when appending to it. As such,
- this function can only be used for raw deflate, and must be used before the
- first deflate() call after a deflateInit2() or deflateReset(). bits must be
- less than or equal to 16, and that many of the least significant bits of
- value will be inserted in the output.
-
- deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ is that this function is used to start off the deflate output with the bits
+ leftover from a previous deflate stream when appending to it. As such, this
+ function can only be used for raw deflate, and must be used before the first
+ deflate() call after a deflateInit2() or deflateReset(). bits must be less
+ than or equal to 16, and that many of the least significant bits of value
+ will be inserted in the output.
+
+ deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
*/
ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
gz_headerp head));
/*
- deflateSetHeader() provides gzip header information for when a gzip
+ deflateSetHeader() provides gzip header information for when a gzip
stream is requested by deflateInit2(). deflateSetHeader() may be called
after deflateInit2() or deflateReset() and before the first call of
deflate(). The text, time, os, extra field, name, and comment information
@@ -693,11 +732,11 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
1.3.x) do not support header crc's, and will report that it is a "multi-part
gzip file" and give up.
- If deflateSetHeader is not used, the default gzip header has text false,
+ If deflateSetHeader is not used, the default gzip header has text false,
the time set to zero, and os set to 255, with no extra, name, or comment
fields. The gzip header is returned to the default state by deflateReset().
- deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
*/
@@ -705,52 +744,59 @@ ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm,
ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm,
int windowBits));
- This is another version of inflateInit with an extra parameter. The
+ This is another version of inflateInit with an extra parameter. The
fields next_in, avail_in, zalloc, zfree and opaque must be initialized
before by the caller.
The windowBits parameter is the base two logarithm of the maximum window
size (the size of the history buffer). It should be in the range 8..15 for
- this version of the library. The default value is 15 if inflateInit is used
- instead. windowBits must be greater than or equal to the windowBits value
+ this version of the library. The default value is 15 if inflateInit is used
+ instead. windowBits must be greater than or equal to the windowBits value
provided to deflateInit2() while compressing, or it must be equal to 15 if
- deflateInit2() was not used. If a compressed stream with a larger window
+ deflateInit2() was not used. If a compressed stream with a larger window
size is given as input, inflate() will return with the error code
Z_DATA_ERROR instead of trying to allocate a larger window.
- windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
- determines the window size. inflate() will then process raw deflate data,
+ windowBits can also be zero to request that inflate use the window size in
+ the zlib header of the compressed stream.
+
+ windowBits can also be -8..-15 for raw inflate. In this case, -windowBits
+ determines the window size. inflate() will then process raw deflate data,
not looking for a zlib or gzip header, not generating a check value, and not
- looking for any check values for comparison at the end of the stream. This
+ looking for any check values for comparison at the end of the stream. This
is for use with other formats that use the deflate compressed data format
- such as zip. Those formats provide their own check values. If a custom
+ such as zip. Those formats provide their own check values. If a custom
format is developed using the raw deflate format for compressed data, it is
recommended that a check value such as an adler32 or a crc32 be applied to
the uncompressed data as is done in the zlib, gzip, and zip formats. For
- most applications, the zlib format should be used as is. Note that comments
+ most applications, the zlib format should be used as is. Note that comments
above on the use in deflateInit2() applies to the magnitude of windowBits.
- windowBits can also be greater than 15 for optional gzip decoding. Add
+ windowBits can also be greater than 15 for optional gzip decoding. Add
32 to windowBits to enable zlib and gzip decoding with automatic header
detection, or add 16 to decode only the gzip format (the zlib format will
- return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is
- a crc32 instead of an adler32.
+ return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is a
+ crc32 instead of an adler32.
inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
- memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg
- is set to null if there is no error message. inflateInit2 does not perform
- any decompression apart from reading the zlib header if present: this will
- be done by inflate(). (So next_in and avail_in may be modified, but next_out
- and avail_out are unchanged.)
+ memory, Z_VERSION_ERROR if the zlib library version is incompatible with the
+ version assumed by the caller, or Z_STREAM_ERROR if the parameters are
+ invalid, such as a null pointer to the structure. msg is set to null if
+ there is no error message. inflateInit2 does not perform any decompression
+ apart from possibly reading the zlib header if present: actual decompression
+ will be done by inflate(). (So next_in and avail_in may be modified, but
+ next_out and avail_out are unused and unchanged.) The current implementation
+ of inflateInit2() does not process any header information -- that is
+ deferred until inflate() is called.
*/
-ZEXTERN int Q_ZEXPORT inflateSetDictionary OF((z_streamp strm,
+ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm,
const Bytef *dictionary,
uInt dictLength));
/*
Initializes the decompression dictionary from the given uncompressed byte
- sequence. This function must be called immediately after a call of inflate,
- if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
+ sequence. This function must be called immediately after a call of inflate,
+ if that call returned Z_NEED_DICT. The dictionary chosen by the compressor
can be determined from the adler32 value returned by that call of inflate.
The compressor and decompressor must use exactly the same dictionary (see
deflateSetDictionary). For raw inflate, this function can be called
@@ -759,26 +805,26 @@ ZEXTERN int Q_ZEXPORT inflateSetDictionary OF((z_streamp strm,
dictionary that was used for compression is provided.
inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a
- parameter is invalid (such as NULL dictionary) or the stream state is
+ parameter is invalid (e.g. dictionary being Z_NULL) or the stream state is
inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the
- expected one (incorrect adler32 value). inflateSetDictionary does not
+ expected one (incorrect adler32 value). inflateSetDictionary does not
perform any decompression: this will be done by subsequent calls of
inflate().
*/
-ZEXTERN int Q_ZEXPORT inflateSync OF((z_streamp strm));
+ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm));
/*
- Skips invalid compressed data until a full flush point (see above the
- description of deflate with Z_FULL_FLUSH) can be found, or until all
- available input is skipped. No output is provided.
-
- inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
- if no more input was provided, Z_DATA_ERROR if no flush point has been found,
- or Z_STREAM_ERROR if the stream structure was inconsistent. In the success
- case, the application may save the current current value of total_in which
- indicates where valid compressed data was found. In the error case, the
- application may repeatedly call inflateSync, providing more input each time,
- until success or end of the input data.
+ Skips invalid compressed data until a full flush point (see above the
+ description of deflate with Z_FULL_FLUSH) can be found, or until all
+ available input is skipped. No output is provided.
+
+ inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR
+ if no more input was provided, Z_DATA_ERROR if no flush point has been
+ found, or Z_STREAM_ERROR if the stream structure was inconsistent. In the
+ success case, the application may save the current current value of total_in
+ which indicates where valid compressed data was found. In the error case,
+ the application may repeatedly call inflateSync, providing more input each
+ time, until success or end of the input data.
*/
ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
@@ -793,18 +839,30 @@ ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest,
inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_STREAM_ERROR if the source stream state was inconsistent
- (such as zalloc being NULL). msg is left unchanged in both source and
+ (such as zalloc being Z_NULL). msg is left unchanged in both source and
destination.
*/
-ZEXTERN int Q_ZEXPORT inflateReset OF((z_streamp strm));
+ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm));
/*
This function is equivalent to inflateEnd followed by inflateInit,
- but does not free and reallocate all the internal decompression state.
- The stream will keep attributes that may have been set by inflateInit2.
+ but does not free and reallocate all the internal decompression state. The
+ stream will keep attributes that may have been set by inflateInit2.
+
+ inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL).
+*/
- inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source
- stream state was inconsistent (such as zalloc or state being NULL).
+ZEXTERN int ZEXPORT inflateReset2 OF((z_streamp strm,
+ int windowBits));
+/*
+ This function is the same as inflateReset, but it also permits changing
+ the wrap and window size requests. The windowBits parameter is interpreted
+ the same as it is for inflateInit2.
+
+ inflateReset2 returns Z_OK if success, or Z_STREAM_ERROR if the source
+ stream state was inconsistent (such as zalloc or state being Z_NULL), or if
+ the windowBits parameter is invalid.
*/
ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
@@ -812,54 +870,87 @@ ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm,
int value));
/*
This function inserts bits in the inflate input stream. The intent is
- that this function is used to start inflating at a bit position in the
- middle of a byte. The provided bits will be used before any bytes are used
- from next_in. This function should only be used with raw inflate, and
- should be used before the first inflate() call after inflateInit2() or
- inflateReset(). bits must be less than or equal to 16, and that many of the
- least significant bits of value will be inserted in the input.
-
- inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
+ that this function is used to start inflating at a bit position in the
+ middle of a byte. The provided bits will be used before any bytes are used
+ from next_in. This function should only be used with raw inflate, and
+ should be used before the first inflate() call after inflateInit2() or
+ inflateReset(). bits must be less than or equal to 16, and that many of the
+ least significant bits of value will be inserted in the input.
+
+ If bits is negative, then the input stream bit buffer is emptied. Then
+ inflatePrime() can be called again to put bits in the buffer. This is used
+ to clear out bits leftover after feeding inflate a block description prior
+ to feeding inflate codes.
+
+ inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
*/
+ZEXTERN long ZEXPORT inflateMark OF((z_streamp strm));
+/*
+ This function returns two values, one in the lower 16 bits of the return
+ value, and the other in the remaining upper bits, obtained by shifting the
+ return value down 16 bits. If the upper value is -1 and the lower value is
+ zero, then inflate() is currently decoding information outside of a block.
+ If the upper value is -1 and the lower value is non-zero, then inflate is in
+ the middle of a stored block, with the lower value equaling the number of
+ bytes from the input remaining to copy. If the upper value is not -1, then
+ it is the number of bits back from the current bit position in the input of
+ the code (literal or length/distance pair) currently being processed. In
+ that case the lower value is the number of bytes already emitted for that
+ code.
+
+ A code is being processed if inflate is waiting for more input to complete
+ decoding of the code, or if it has completed decoding but is waiting for
+ more output space to write the literal or match data.
+
+ inflateMark() is used to mark locations in the input data for random
+ access, which may be at bit positions, and to note those cases where the
+ output of a code may span boundaries of random access blocks. The current
+ location in the input stream can be determined from avail_in and data_type
+ as noted in the description for the Z_BLOCK flush parameter for inflate.
+
+ inflateMark returns the value noted above or -1 << 16 if the provided
+ source stream state was inconsistent.
+*/
+
ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm,
gz_headerp head));
/*
- inflateGetHeader() requests that gzip header information be stored in the
+ inflateGetHeader() requests that gzip header information be stored in the
provided gz_header structure. inflateGetHeader() may be called after
inflateInit2() or inflateReset(), and before the first call of inflate().
As inflate() processes the gzip stream, head->done is zero until the header
is completed, at which time head->done is set to one. If a zlib stream is
being decoded, then head->done is set to -1 to indicate that there will be
- no gzip header information forthcoming. Note that Z_BLOCK can be used to
- force inflate() to return immediately after header processing is complete
- and before any actual data is decompressed.
+ no gzip header information forthcoming. Note that Z_BLOCK or Z_TREES can be
+ used to force inflate() to return immediately after header processing is
+ complete and before any actual data is decompressed.
- The text, time, xflags, and os fields are filled in with the gzip header
+ The text, time, xflags, and os fields are filled in with the gzip header
contents. hcrc is set to true if there is a header CRC. (The header CRC
- was valid if done is set to one.) If extra is not Z_NULL, then extra_max
+ was valid if done is set to one.) If extra is not Z_NULL, then extra_max
contains the maximum number of bytes to write to extra. Once done is true,
extra_len contains the actual extra field length, and extra contains the
extra field, or that field truncated if extra_max is less than extra_len.
If name is not Z_NULL, then up to name_max characters are written there,
terminated with a zero unless the length is greater than name_max. If
comment is not Z_NULL, then up to comm_max characters are written there,
- terminated with a zero unless the length is greater than comm_max. When
- any of extra, name, or comment are not Z_NULL and the respective field is
- not present in the header, then that field is set to Z_NULL to signal its
+ terminated with a zero unless the length is greater than comm_max. When any
+ of extra, name, or comment are not Z_NULL and the respective field is not
+ present in the header, then that field is set to Z_NULL to signal its
absence. This allows the use of deflateSetHeader() with the returned
structure to duplicate the header. However if those fields are set to
allocated memory, then the application will need to save those pointers
elsewhere so that they can be eventually freed.
- If inflateGetHeader is not used, then the header information is simply
+ If inflateGetHeader is not used, then the header information is simply
discarded. The header is always checked for validity, including the header
CRC if present. inflateReset() will reset the process to discard the header
information. The application would need to call inflateGetHeader() again to
retrieve the header from the next gzip stream.
- inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
+ inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source
stream state was inconsistent.
*/
@@ -880,9 +971,9 @@ ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits,
See inflateBack() for the usage of these routines.
inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of
- the paramaters are invalid, Z_MEM_ERROR if the internal state could not
- be allocated, or Z_VERSION_ERROR if the version of the library does not
- match the version of the header file.
+ the paramaters are invalid, Z_MEM_ERROR if the internal state could not be
+ allocated, or Z_VERSION_ERROR if the version of the library does not match
+ the version of the header file.
*/
typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *));
@@ -902,15 +993,15 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
inflateBackInit() must be called first to allocate the internal state
and to initialize the state with the user-provided window buffer.
inflateBack() may then be used multiple times to inflate a complete, raw
- deflate stream with each call. inflateBackEnd() is then called to free
- the allocated state.
+ deflate stream with each call. inflateBackEnd() is then called to free the
+ allocated state.
A raw deflate stream is one with no zlib or gzip header or trailer.
This routine would normally be used in a utility that reads zip or gzip
files and writes out uncompressed files. The utility would decode the
- header and process the trailer on its own, hence this routine expects
- only the raw deflate stream to decompress. This is different from the
- normal behavior of inflate(), which expects either a zlib or gzip header and
+ header and process the trailer on its own, hence this routine expects only
+ the raw deflate stream to decompress. This is different from the normal
+ behavior of inflate(), which expects either a zlib or gzip header and
trailer around the deflate stream.
inflateBack() uses two subroutines supplied by the caller that are then
@@ -936,7 +1027,7 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called
immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in
must also be initialized, and then if strm->avail_in is not zero, input will
- initially be taken from strm->next_in[0 .. strm->avail_in - 1].
+ initially be taken from strm->next_in[0 .. strm->avail_in - 1].
The in_desc and out_desc parameters of inflateBack() is passed as the
first parameter of in() and out() respectively when they are called. These
@@ -946,15 +1037,15 @@ ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm,
On return, inflateBack() will set strm->next_in and strm->avail_in to
pass back any unused input that was provided by the last in() call. The
return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR
- if in() or out() returned an error, Z_DATA_ERROR if there was a format
- error in the deflate stream (in which case strm->msg is set to indicate the
- nature of the error), or Z_STREAM_ERROR if the stream was not properly
- initialized. In the case of Z_BUF_ERROR, an input or output error can be
- distinguished using strm->next_in which will be Z_NULL only if in() returned
- an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to
- out() returning non-zero. (in() will always be called before out(), so
- strm->next_in is assured to be defined if out() returns non-zero.) Note
- that inflateBack() cannot return Z_OK.
+ if in() or out() returned an error, Z_DATA_ERROR if there was a format error
+ in the deflate stream (in which case strm->msg is set to indicate the nature
+ of the error), or Z_STREAM_ERROR if the stream was not properly initialized.
+ In the case of Z_BUF_ERROR, an input or output error can be distinguished
+ using strm->next_in which will be Z_NULL only if in() returned an error. If
+ strm->next_in is not Z_NULL, then the Z_BUF_ERROR was due to out() returning
+ non-zero. (in() will always be called before out(), so strm->next_in is
+ assured to be defined if out() returns non-zero.) Note that inflateBack()
+ cannot return Z_OK.
*/
ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm));
@@ -1010,37 +1101,36 @@ ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void));
/* utility functions */
/*
- The following utility functions are implemented on top of the
- basic stream-oriented functions. To simplify the interface, some
- default options are assumed (compression level and memory usage,
- standard memory allocation functions). The source code of these
- utility functions can easily be modified if you need special options.
+ The following utility functions are implemented on top of the basic
+ stream-oriented functions. To simplify the interface, some default options
+ are assumed (compression level and memory usage, standard memory allocation
+ functions). The source code of these utility functions can be modified if
+ you need special options.
*/
-ZEXTERN int Q_ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
+ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
/*
Compresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be at least the value returned
- by compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be at least the value returned by
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
compressed buffer.
- This function can be used to compress a whole file at once if the
- input file is mmap'ed.
+
compress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
buffer.
*/
-ZEXTERN int Q_ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
+ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen,
int level));
/*
- Compresses the source buffer into the destination buffer. The level
+ Compresses the source buffer into the destination buffer. The level
parameter has the same meaning as in deflateInit. sourceLen is the byte
- length of the source buffer. Upon entry, destLen is the total size of the
+ length of the source buffer. Upon entry, destLen is the total size of the
destination buffer, which must be at least the value returned by
- compressBound(sourceLen). Upon exit, destLen is the actual size of the
+ compressBound(sourceLen). Upon exit, destLen is the actual size of the
compressed buffer.
compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough
@@ -1051,22 +1141,20 @@ ZEXTERN int Q_ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen,
ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen));
/*
compressBound() returns an upper bound on the compressed size after
- compress() or compress2() on sourceLen bytes. It would be used before
- a compress() or compress2() call to allocate the destination buffer.
+ compress() or compress2() on sourceLen bytes. It would be used before a
+ compress() or compress2() call to allocate the destination buffer.
*/
-ZEXTERN int Q_ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
+ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
const Bytef *source, uLong sourceLen));
/*
Decompresses the source buffer into the destination buffer. sourceLen is
- the byte length of the source buffer. Upon entry, destLen is the total
- size of the destination buffer, which must be large enough to hold the
- entire uncompressed data. (The size of the uncompressed data must have
- been saved previously by the compressor and transmitted to the decompressor
- by some mechanism outside the scope of this compression library.)
- Upon exit, destLen is the actual size of the compressed buffer.
- This function can be used to decompress a whole file at once if the
- input file is mmap'ed.
+ the byte length of the source buffer. Upon entry, destLen is the total size
+ of the destination buffer, which must be large enough to hold the entire
+ uncompressed data. (The size of the uncompressed data must have been saved
+ previously by the compressor and transmitted to the decompressor by some
+ mechanism outside the scope of this compression library.) Upon exit, destLen
+ is the actual size of the uncompressed buffer.
uncompress returns Z_OK if success, Z_MEM_ERROR if there was not
enough memory, Z_BUF_ERROR if there was not enough room in the output
@@ -1074,207 +1162,329 @@ ZEXTERN int Q_ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen,
*/
-typedef voidp gzFile;
+ /* gzip file access functions */
+
+/*
+ This library supports reading and writing files in gzip (.gz) format with
+ an interface similar to that of stdio, using the functions that start with
+ "gz". The gzip format is different from the zlib format. gzip is a gzip
+ wrapper, documented in RFC 1952, wrapped around a deflate stream.
+*/
+
+typedef voidp gzFile; /* opaque gzip file descriptor */
-ZEXTERN gzFile Q_ZEXPORT gzopen OF((const char *path, const char *mode));
/*
- Opens a gzip (.gz) file for reading or writing. The mode parameter
- is as in fopen ("rb" or "wb") but can also include a compression level
- ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for
- Huffman only compression as in "wb1h", or 'R' for run-length encoding
- as in "wb1R". (See the description of deflateInit2 for more information
- about the strategy parameter.)
+ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode));
+
+ Opens a gzip (.gz) file for reading or writing. The mode parameter is as
+ in fopen ("rb" or "wb") but can also include a compression level ("wb9") or
+ a strategy: 'f' for filtered data as in "wb6f", 'h' for Huffman-only
+ compression as in "wb1h", 'R' for run-length encoding as in "wb1R", or 'F'
+ for fixed code compression as in "wb9F". (See the description of
+ deflateInit2 for more information about the strategy parameter.) Also "a"
+ can be used instead of "w" to request that the gzip stream that will be
+ written be appended to the file. "+" will result in an error, since reading
+ and writing to the same gzip file is not supported.
gzopen can be used to read a file which is not in gzip format; in this
case gzread will directly read from the file without decompression.
- gzopen returns NULL if the file could not be opened or if there was
- insufficient memory to allocate the (de)compression state; errno
- can be checked to distinguish the two cases (if errno is zero, the
- zlib error is Z_MEM_ERROR). */
+ gzopen returns NULL if the file could not be opened, if there was
+ insufficient memory to allocate the gzFile state, or if an invalid mode was
+ specified (an 'r', 'w', or 'a' was not provided, or '+' was provided).
+ errno can be checked to determine if the reason gzopen failed was that the
+ file could not be opened.
+*/
-ZEXTERN gzFile Q_ZEXPORT gzdopen OF((int fd, const char *mode));
+ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode));
/*
- gzdopen() associates a gzFile with the file descriptor fd. File
- descriptors are obtained from calls like open, dup, creat, pipe or
- fileno (in the file has been previously opened with fopen).
- The mode parameter is as in gzopen.
- The next call of gzclose on the returned gzFile will also close the
- file descriptor fd, just like fclose(fdopen(fd), mode) closes the file
- descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode).
- gzdopen returns NULL if there was insufficient memory to allocate
- the (de)compression state.
+ gzdopen associates a gzFile with the file descriptor fd. File descriptors
+ are obtained from calls like open, dup, creat, pipe or fileno (if the file
+ has been previously opened with fopen). The mode parameter is as in gzopen.
+
+ The next call of gzclose on the returned gzFile will also close the file
+ descriptor fd, just like fclose(fdopen(fd, mode)) closes the file descriptor
+ fd. If you want to keep fd open, use fd = dup(fd_keep); gz = gzdopen(fd,
+ mode);. The duplicated descriptor should be saved to avoid a leak, since
+ gzdopen does not close fd if it fails.
+
+ gzdopen returns NULL if there was insufficient memory to allocate the
+ gzFile state, if an invalid mode was specified (an 'r', 'w', or 'a' was not
+ provided, or '+' was provided), or if fd is -1. The file descriptor is not
+ used until the next gz* read, write, seek, or close operation, so gzdopen
+ will not detect if fd is invalid (unless fd is -1).
*/
-ZEXTERN int Q_ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+ZEXTERN int ZEXPORT gzbuffer OF((gzFile file, unsigned size));
/*
- Dynamically update the compression level or strategy. See the description
+ Set the internal buffer size used by this library's functions. The
+ default buffer size is 8192 bytes. This function must be called after
+ gzopen() or gzdopen(), and before any other calls that read or write the
+ file. The buffer memory allocation is always deferred to the first read or
+ write. Two buffers are allocated, either both of the specified size when
+ writing, or one of the specified size and the other twice that size when
+ reading. A larger buffer size of, for example, 64K or 128K bytes will
+ noticeably increase the speed of decompression (reading).
+
+ The new buffer size also affects the maximum length for gzprintf().
+
+ gzbuffer() returns 0 on success, or -1 on failure, such as being called
+ too late.
+*/
+
+ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy));
+/*
+ Dynamically update the compression level or strategy. See the description
of deflateInit2 for the meaning of these parameters.
+
gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not
opened for writing.
*/
-ZEXTERN int Q_ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
+ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len));
/*
- Reads the given number of uncompressed bytes from the compressed file.
- If the input file was not in gzip format, gzread copies the given number
- of bytes into the buffer.
- gzread returns the number of uncompressed bytes actually read (0 for
- end of file, -1 for error). */
+ Reads the given number of uncompressed bytes from the compressed file. If
+ the input file was not in gzip format, gzread copies the given number of
+ bytes into the buffer.
+
+ After reaching the end of a gzip stream in the input, gzread will continue
+ to read, looking for another gzip stream, or failing that, reading the rest
+ of the input file directly without decompression. The entire input file
+ will be read if gzread is called until it returns less than the requested
+ len.
+
+ gzread returns the number of uncompressed bytes actually read, less than
+ len for end of file, or -1 for error.
+*/
-ZEXTERN int Q_ZEXPORT gzwrite OF((gzFile file,
- voidpc buf, unsigned len));
+ZEXTERN int ZEXPORT gzwrite OF((gzFile file,
+ voidpc buf, unsigned len));
/*
Writes the given number of uncompressed bytes into the compressed file.
- gzwrite returns the number of uncompressed bytes actually written
- (0 in case of error).
+ gzwrite returns the number of uncompressed bytes written or 0 in case of
+ error.
*/
-ZEXTERN int Q_ZEXPORT gzprintf OF((gzFile file, const char *format, ...));
+ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...));
/*
- Converts, formats, and writes the args to the compressed file under
- control of the format string, as in fprintf. gzprintf returns the number of
- uncompressed bytes actually written (0 in case of error). The number of
- uncompressed bytes written is limited to 4095. The caller should assure that
- this limit is not exceeded. If it is exceeded, then gzprintf() will return
- return an error (0) with nothing written. In this case, there may also be a
- buffer overflow with unpredictable consequences, which is possible only if
- zlib was compiled with the insecure functions sprintf() or vsprintf()
- because the secure snprintf() or vsnprintf() functions were not available.
+ Converts, formats, and writes the arguments to the compressed file under
+ control of the format string, as in fprintf. gzprintf returns the number of
+ uncompressed bytes actually written, or 0 in case of error. The number of
+ uncompressed bytes written is limited to 8191, or one less than the buffer
+ size given to gzbuffer(). The caller should assure that this limit is not
+ exceeded. If it is exceeded, then gzprintf() will return an error (0) with
+ nothing written. In this case, there may also be a buffer overflow with
+ unpredictable consequences, which is possible only if zlib was compiled with
+ the insecure functions sprintf() or vsprintf() because the secure snprintf()
+ or vsnprintf() functions were not available. This can be determined using
+ zlibCompileFlags().
*/
-ZEXTERN int Q_ZEXPORT gzputs OF((gzFile file, const char *s));
+ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s));
/*
- Writes the given null-terminated string to the compressed file, excluding
+ Writes the given null-terminated string to the compressed file, excluding
the terminating null character.
- gzputs returns the number of characters written, or -1 in case of error.
+
+ gzputs returns the number of characters written, or -1 in case of error.
*/
-ZEXTERN Q_ZEXPORT char * gzgets OF((gzFile file, char *buf, int len));
+ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len));
/*
- Reads bytes from the compressed file until len-1 characters are read, or
- a newline character is read and transferred to buf, or an end-of-file
- condition is encountered. The string is then terminated with a null
- character.
- gzgets returns buf, or Z_NULL in case of error.
+ Reads bytes from the compressed file until len-1 characters are read, or a
+ newline character is read and transferred to buf, or an end-of-file
+ condition is encountered. If any characters are read or if len == 1, the
+ string is terminated with a null character. If no characters are read due
+ to an end-of-file or len < 1, then the buffer is left untouched.
+
+ gzgets returns buf which is a null-terminated string, or it returns NULL
+ for end-of-file or in case of error. If there was an error, the contents at
+ buf are indeterminate.
*/
-ZEXTERN int Q_ZEXPORT gzputc OF((gzFile file, int c));
+ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c));
/*
- Writes c, converted to an unsigned char, into the compressed file.
- gzputc returns the value that was written, or -1 in case of error.
+ Writes c, converted to an unsigned char, into the compressed file. gzputc
+ returns the value that was written, or -1 in case of error.
*/
-ZEXTERN int Q_ZEXPORT gzgetc OF((gzFile file));
+ZEXTERN int ZEXPORT gzgetc OF((gzFile file));
/*
- Reads one byte from the compressed file. gzgetc returns this byte
- or -1 in case of end of file or error.
+ Reads one byte from the compressed file. gzgetc returns this byte or -1
+ in case of end of file or error.
*/
-ZEXTERN int Q_ZEXPORT gzungetc OF((int c, gzFile file));
+ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file));
/*
- Push one character back onto the stream to be read again later.
- Only one character of push-back is allowed. gzungetc() returns the
- character pushed, or -1 on failure. gzungetc() will fail if a
- character has been pushed but not read yet, or if c is -1. The pushed
- character will be discarded if the stream is repositioned with gzseek()
- or gzrewind().
+ Push one character back onto the stream to be read as the first character
+ on the next read. At least one character of push-back is allowed.
+ gzungetc() returns the character pushed, or -1 on failure. gzungetc() will
+ fail if c is -1, and may fail if a character has been pushed but not read
+ yet. If gzungetc is used immediately after gzopen or gzdopen, at least the
+ output buffer size of pushed characters is allowed. (See gzbuffer above.)
+ The pushed character will be discarded if the stream is repositioned with
+ gzseek() or gzrewind().
*/
-ZEXTERN int Q_ZEXPORT gzflush OF((gzFile file, int flush));
+ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush));
/*
- Flushes all pending output into the compressed file. The parameter
- flush is as in the deflate() function. The return value is the zlib
- error number (see function gzerror below). gzflush returns Z_OK if
- the flush parameter is Z_FINISH and all output could be flushed.
- gzflush should be called only when strictly necessary because it can
- degrade compression.
+ Flushes all pending output into the compressed file. The parameter flush
+ is as in the deflate() function. The return value is the zlib error number
+ (see function gzerror below). gzflush is only permitted when writing.
+
+ If the flush parameter is Z_FINISH, the remaining data is written and the
+ gzip stream is completed in the output. If gzwrite() is called again, a new
+ gzip stream will be started in the output. gzread() is able to read such
+ concatented gzip streams.
+
+ gzflush should be called only when strictly necessary because it will
+ degrade compression if called too often.
*/
-ZEXTERN z_off_t Q_ZEXPORT gzseek OF((gzFile file,
- z_off_t offset, int whence));
/*
- Sets the starting position for the next gzread or gzwrite on the
- given compressed file. The offset represents a number of bytes in the
- uncompressed data stream. The whence parameter is defined as in lseek(2);
+ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file,
+ z_off_t offset, int whence));
+
+ Sets the starting position for the next gzread or gzwrite on the given
+ compressed file. The offset represents a number of bytes in the
+ uncompressed data stream. The whence parameter is defined as in lseek(2);
the value SEEK_END is not supported.
+
If the file is opened for reading, this function is emulated but can be
- extremely slow. If the file is opened for writing, only forward seeks are
+ extremely slow. If the file is opened for writing, only forward seeks are
supported; gzseek then compresses a sequence of zeroes up to the new
starting position.
- gzseek returns the resulting offset location as measured in bytes from
+ gzseek returns the resulting offset location as measured in bytes from
the beginning of the uncompressed stream, or -1 in case of error, in
particular if the file is opened for writing and the new starting position
would be before the current position.
*/
-ZEXTERN int Q_ZEXPORT gzrewind OF((gzFile file));
+ZEXTERN int ZEXPORT gzrewind OF((gzFile file));
/*
Rewinds the given file. This function is supported only for reading.
- gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+ gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET)
+*/
+
+/*
+ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file));
+
+ Returns the starting position for the next gzread or gzwrite on the given
+ compressed file. This position represents a number of bytes in the
+ uncompressed data stream, and is zero when starting, even if appending or
+ reading a gzip stream from the middle of a file using gzdopen().
+
+ gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
*/
-ZEXTERN z_off_t Q_ZEXPORT gztell OF((gzFile file));
/*
- Returns the starting position for the next gzread or gzwrite on the
- given compressed file. This position represents a number of bytes in the
- uncompressed data stream.
+ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile file));
- gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR)
+ Returns the current offset in the file being read or written. This offset
+ includes the count of bytes that precede the gzip stream, for example when
+ appending or when using gzdopen() for reading. When reading, the offset
+ does not include as yet unused buffered input. This information can be used
+ for a progress indicator. On error, gzoffset() returns -1.
*/
-ZEXTERN int Q_ZEXPORT gzeof OF((gzFile file));
+ZEXTERN int ZEXPORT gzeof OF((gzFile file));
/*
- Returns 1 when EOF has previously been detected reading the given
- input stream, otherwise zero.
+ Returns true (1) if the end-of-file indicator has been set while reading,
+ false (0) otherwise. Note that the end-of-file indicator is set only if the
+ read tried to go past the end of the input, but came up short. Therefore,
+ just like feof(), gzeof() may return false even if there is no more data to
+ read, in the event that the last read request was for the exact number of
+ bytes remaining in the input file. This will happen if the input file size
+ is an exact multiple of the buffer size.
+
+ If gzeof() returns true, then the read functions will return no more data,
+ unless the end-of-file indicator is reset by gzclearerr() and the input file
+ has grown since the previous end of file was detected.
*/
ZEXTERN int ZEXPORT gzdirect OF((gzFile file));
/*
- Returns 1 if file is being read directly without decompression, otherwise
- zero.
+ Returns true (1) if file is being copied directly while reading, or false
+ (0) if file is a gzip stream being decompressed. This state can change from
+ false to true while reading the input file if the end of a gzip stream is
+ reached, but is followed by data that is not another gzip stream.
+
+ If the input file is empty, gzdirect() will return true, since the input
+ does not contain a gzip stream.
+
+ If gzdirect() is used immediately after gzopen() or gzdopen() it will
+ cause buffers to be allocated to allow reading the file to determine if it
+ is a gzip file. Therefore if gzbuffer() is used, it should be called before
+ gzdirect().
+*/
+
+ZEXTERN int ZEXPORT gzclose OF((gzFile file));
+/*
+ Flushes all pending output if necessary, closes the compressed file and
+ deallocates the (de)compression state. Note that once file is closed, you
+ cannot call gzerror with file, since its structures have been deallocated.
+ gzclose must not be called more than once on the same file, just as free
+ must not be called more than once on the same allocation.
+
+ gzclose will return Z_STREAM_ERROR if file is not valid, Z_ERRNO on a
+ file operation error, or Z_OK on success.
*/
-ZEXTERN int Q_ZEXPORT gzclose OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_r OF((gzFile file));
+ZEXTERN int ZEXPORT gzclose_w OF((gzFile file));
/*
- Flushes all pending output if necessary, closes the compressed file
- and deallocates all the (de)compression state. The return value is the zlib
- error number (see function gzerror below).
+ Same as gzclose(), but gzclose_r() is only for use when reading, and
+ gzclose_w() is only for use when writing or appending. The advantage to
+ using these instead of gzclose() is that they avoid linking in zlib
+ compression or decompression code that is not used when only reading or only
+ writing respectively. If gzclose() is used, then both compression and
+ decompression code will be included the application when linking to a static
+ zlib library.
*/
-ZEXTERN Q_ZEXPORT const char * gzerror OF((gzFile file, int *errnum));
+ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum));
/*
- Returns the error message for the last error which occurred on the
- given compressed file. errnum is set to zlib error number. If an
- error occurred in the file system and not in the compression library,
- errnum is set to Z_ERRNO and the application may consult errno
- to get the exact error code.
+ Returns the error message for the last error which occurred on the given
+ compressed file. errnum is set to zlib error number. If an error occurred
+ in the file system and not in the compression library, errnum is set to
+ Z_ERRNO and the application may consult errno to get the exact error code.
+
+ The application must not modify the returned string. Future calls to
+ this function may invalidate the previously returned string. If file is
+ closed, then the string previously returned by gzerror will no longer be
+ available.
+
+ gzerror() should be used to distinguish errors from end-of-file for those
+ functions above that do not distinguish those cases in their return values.
*/
ZEXTERN void ZEXPORT gzclearerr OF((gzFile file));
/*
- Clears the error and end-of-file flags for file. This is analogous to the
- clearerr() function in stdio. This is useful for continuing to read a gzip
+ Clears the error and end-of-file flags for file. This is analogous to the
+ clearerr() function in stdio. This is useful for continuing to read a gzip
file that is being written concurrently.
*/
+
/* checksum functions */
/*
These functions are not related to compression but are exported
- anyway because they might be useful in applications using the
- compression library.
+ anyway because they might be useful in applications using the compression
+ library.
*/
-ZEXTERN uLong Q_ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
+ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
/*
Update a running Adler-32 checksum with the bytes buf[0..len-1] and
- return the updated checksum. If buf is NULL, this function returns
- the required initial value for the checksum.
- An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
- much faster. Usage example:
+ return the updated checksum. If buf is Z_NULL, this function returns the
+ required initial value for the checksum.
+
+ An Adler-32 checksum is almost as reliable as a CRC32 but can be computed
+ much faster.
+
+ Usage example:
uLong adler = adler32(0L, Z_NULL, 0);
@@ -1284,21 +1494,24 @@ ZEXTERN uLong Q_ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len));
if (adler != original_adler) error();
*/
+/*
ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2,
z_off_t len2));
-/*
+
Combine two Adler-32 checksums into one. For two sequences of bytes, seq1
and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for
each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of
seq1 and seq2 concatenated, requiring only adler1, adler2, and len2.
*/
-ZEXTERN uLong Q_ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
+ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
/*
Update a running CRC-32 with the bytes buf[0..len-1] and return the
- updated CRC-32. If buf is NULL, this function returns the required initial
- value for the for the crc. Pre- and post-conditioning (one's complement) is
- performed within this function so it shouldn't be done by the application.
+ updated CRC-32. If buf is Z_NULL, this function returns the required
+ initial value for the for the crc. Pre- and post-conditioning (one's
+ complement) is performed within this function so it shouldn't be done by the
+ application.
+
Usage example:
uLong crc = crc32(0L, Z_NULL, 0);
@@ -1309,9 +1522,9 @@ ZEXTERN uLong Q_ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len));
if (crc != original_crc) error();
*/
+/*
ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
-/*
Combine two CRC-32 check values into one. For two sequences of bytes,
seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
@@ -1325,15 +1538,15 @@ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2));
/* deflateInit and inflateInit are macros to allow checking the zlib version
* and the compiler's view of z_stream:
*/
-ZEXTERN int Q_ZEXPORT deflateInit_ OF((z_streamp strm, int level,
+ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level,
const char *version, int stream_size));
-ZEXTERN int Q_ZEXPORT inflateInit_ OF((z_streamp strm,
+ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm,
const char *version, int stream_size));
-ZEXTERN int Q_ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
+ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method,
int windowBits, int memLevel,
int strategy, const char *version,
int stream_size));
-ZEXTERN int Q_ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
+ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits,
const char *version, int stream_size));
ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
unsigned char FAR *window,
@@ -1350,16 +1563,57 @@ ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits,
inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
#define inflateBackInit(strm, windowBits, window) \
inflateBackInit_((strm), (windowBits), (window), \
- ZLIB_VERSION, sizeof(z_stream))
+ ZLIB_VERSION, sizeof(z_stream))
+
+/* provide 64-bit offset functions if _LARGEFILE64_SOURCE defined, and/or
+ * change the regular functions to 64 bits if _FILE_OFFSET_BITS is 64 (if
+ * both are true, the application gets the *64 functions, and the regular
+ * functions are changed to 64 bits) -- in case these are set on systems
+ * without large file support, _LFS64_LARGEFILE must also be true
+ */
+#if defined(_LARGEFILE64_SOURCE) && _LFS64_LARGEFILE-0
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off64_t ZEXPORT gzseek64 OF((gzFile, z_off64_t, int));
+ ZEXTERN z_off64_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off64_t ZEXPORT gzoffset64 OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off64_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off64_t));
+#endif
+#if !defined(ZLIB_INTERNAL) && _FILE_OFFSET_BITS-0 == 64 && _LFS64_LARGEFILE-0
+# define gzopen gzopen64
+# define gzseek gzseek64
+# define gztell gztell64
+# define gzoffset gzoffset64
+# define adler32_combine adler32_combine64
+# define crc32_combine crc32_combine64
+# ifdef _LARGEFILE64_SOURCE
+ ZEXTERN gzFile ZEXPORT gzopen64 OF((const char *, const char *));
+ ZEXTERN z_off_t ZEXPORT gzseek64 OF((gzFile, z_off_t, int));
+ ZEXTERN z_off_t ZEXPORT gztell64 OF((gzFile));
+ ZEXTERN z_off_t ZEXPORT gzoffset64 OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+# endif
+#else
+ ZEXTERN gzFile ZEXPORT gzopen OF((const char *, const char *));
+ ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile, z_off_t, int));
+ ZEXTERN z_off_t ZEXPORT gztell OF((gzFile));
+ ZEXTERN z_off_t ZEXPORT gzoffset OF((gzFile));
+ ZEXTERN uLong ZEXPORT adler32_combine OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine OF((uLong, uLong, z_off_t));
+#endif
+/* hack for buggy compilers */
#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL)
- struct internal_state {int dummy;}; /* hack for buggy compilers */
+ struct internal_state {int dummy;};
#endif
-ZEXTERN Q_ZEXPORT const char * zError OF((int));
-ZEXTERN int Q_ZEXPORT inflateSyncPoint OF((z_streamp z));
-ZEXTERN Q_ZEXPORT const uLongf * get_crc_table OF((void));
+/* undocumented functions */
+ZEXTERN const char * ZEXPORT zError OF((int));
+ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp));
+ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void));
+ZEXTERN int ZEXPORT inflateUndermine OF((z_streamp, int));
#ifdef __cplusplus
}
diff --git a/src/3rdparty/zlib/zlib.pc.in b/src/3rdparty/zlib/zlib.pc.in
new file mode 100644
index 0000000..7e5acf9
--- /dev/null
+++ b/src/3rdparty/zlib/zlib.pc.in
@@ -0,0 +1,13 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+sharedlibdir=@sharedlibdir@
+includedir=@includedir@
+
+Name: zlib
+Description: zlib compression library
+Version: @VERSION@
+
+Requires:
+Libs: -L${libdir} -L${sharedlibdir} -lz
+Cflags: -I${includedir}
diff --git a/src/3rdparty/zlib/zutil.c b/src/3rdparty/zlib/zutil.c
index d55f594..898ed34 100644
--- a/src/3rdparty/zlib/zutil.c
+++ b/src/3rdparty/zlib/zutil.c
@@ -1,5 +1,5 @@
/* zutil.c -- target dependent utility functions for the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2005, 2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -34,25 +34,25 @@ uLong ZEXPORT zlibCompileFlags()
uLong flags;
flags = 0;
- switch (sizeof(uInt)) {
+ switch ((int)(sizeof(uInt))) {
case 2: break;
case 4: flags += 1; break;
case 8: flags += 2; break;
default: flags += 3;
}
- switch (sizeof(uLong)) {
+ switch ((int)(sizeof(uLong))) {
case 2: break;
case 4: flags += 1 << 2; break;
case 8: flags += 2 << 2; break;
default: flags += 3 << 2;
}
- switch (sizeof(voidpf)) {
+ switch ((int)(sizeof(voidpf))) {
case 2: break;
case 4: flags += 1 << 4; break;
case 8: flags += 2 << 4; break;
default: flags += 3 << 4;
}
- switch (sizeof(z_off_t)) {
+ switch ((int)(sizeof(z_off_t))) {
case 2: break;
case 4: flags += 1 << 6; break;
case 8: flags += 2 << 6; break;
@@ -117,9 +117,9 @@ uLong ZEXPORT zlibCompileFlags()
# ifndef verbose
# define verbose 0
# endif
-int z_verbose = verbose;
+int ZLIB_INTERNAL z_verbose = verbose;
-void z_error (m)
+void ZLIB_INTERNAL z_error (m)
char *m;
{
fprintf(stderr, "%s\n", m);
@@ -146,7 +146,7 @@ const char * ZEXPORT zError(err)
#ifndef HAVE_MEMCPY
-void zmemcpy(dest, source, len)
+void ZLIB_INTERNAL zmemcpy(dest, source, len)
Bytef* dest;
const Bytef* source;
uInt len;
@@ -157,7 +157,7 @@ void zmemcpy(dest, source, len)
} while (--len != 0);
}
-int zmemcmp(s1, s2, len)
+int ZLIB_INTERNAL zmemcmp(s1, s2, len)
const Bytef* s1;
const Bytef* s2;
uInt len;
@@ -170,7 +170,7 @@ int zmemcmp(s1, s2, len)
return 0;
}
-void zmemzero(dest, len)
+void ZLIB_INTERNAL zmemzero(dest, len)
Bytef* dest;
uInt len;
{
@@ -213,7 +213,7 @@ local ptr_table table[MAX_PTR];
* a protected system like OS/2. Use Microsoft C instead.
*/
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
{
voidpf buf = opaque; /* just to make some compilers happy */
ulg bsize = (ulg)items*size;
@@ -237,7 +237,7 @@ voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
return buf;
}
-void zcfree (voidpf opaque, voidpf ptr)
+void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
{
int n;
if (*(ush*)&ptr != 0) { /* object < 64K */
@@ -272,13 +272,13 @@ void zcfree (voidpf opaque, voidpf ptr)
# define _hfree hfree
#endif
-voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
+voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
{
if (opaque) opaque = 0; /* to make compiler happy */
return _halloc((long)items, size);
}
-void zcfree (voidpf opaque, voidpf ptr)
+void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
{
if (opaque) opaque = 0; /* to make compiler happy */
_hfree(ptr);
@@ -297,7 +297,7 @@ extern voidp calloc OF((uInt items, uInt size));
extern void free OF((voidpf ptr));
#endif
-voidpf zcalloc (opaque, items, size)
+voidpf ZLIB_INTERNAL zcalloc (opaque, items, size)
voidpf opaque;
unsigned items;
unsigned size;
@@ -307,7 +307,7 @@ voidpf zcalloc (opaque, items, size)
(voidpf)calloc(items, size);
}
-void zcfree (opaque, ptr)
+void ZLIB_INTERNAL zcfree (opaque, ptr)
voidpf opaque;
voidpf ptr;
{
diff --git a/src/3rdparty/zlib/zutil.h b/src/3rdparty/zlib/zutil.h
index b7d5eff..258fa88 100644
--- a/src/3rdparty/zlib/zutil.h
+++ b/src/3rdparty/zlib/zutil.h
@@ -1,5 +1,5 @@
/* zutil.h -- internal interface and configuration of the compression library
- * Copyright (C) 1995-2005 Jean-loup Gailly.
+ * Copyright (C) 1995-2010 Jean-loup Gailly.
* For conditions of distribution and use, see copyright notice in zlib.h
*/
@@ -13,31 +13,21 @@
#ifndef ZUTIL_H
#define ZUTIL_H
-#define ZLIB_INTERNAL
+#if ((__GNUC__-0) * 10 + __GNUC_MINOR__-0 >= 33) && !defined(NO_VIZ)
+# define ZLIB_INTERNAL __attribute__((visibility ("hidden")))
+#else
+# define ZLIB_INTERNAL
+#endif
+
#include "zlib.h"
#ifdef STDC
-# ifndef _WIN32_WCE
+# if !(defined(_WIN32_WCE) && defined(_MSC_VER))
# include <stddef.h>
# endif
# include <string.h>
# include <stdlib.h>
#endif
-#ifdef NO_ERRNO_H
-# ifdef _WIN32_WCE
- /* The Microsoft C Run-Time Library for Windows CE doesn't have
- * errno. We define it as a global variable to simplify porting.
- * Its value is always 0 and should not be used. We rename it to
- * avoid conflict with other libraries that use the same workaround.
- */
-# define errno z_errno
-# endif
- extern int errno;
-#else
-# ifndef _WIN32_WCE
-# include <errno.h>
-# endif
-#endif
#ifndef local
# define local static
@@ -89,7 +79,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32))
# define OS_CODE 0x00
# if defined(__TURBOC__) || defined(__BORLANDC__)
-# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
+# if (__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__))
/* Allow compilation with ANSI keywords only enabled */
void _Cdecl farfree( void *block );
void *_Cdecl farmalloc( unsigned long nbytes );
@@ -118,7 +108,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#ifdef OS2
# define OS_CODE 0x06
# ifdef M_I86
- #include <malloc.h>
+# include <malloc.h>
# endif
#endif
@@ -151,7 +141,7 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define fdopen(fd,mode) NULL /* No fdopen() */
#endif
-#if (defined(_MSC_VER) && (_MSC_VER > 600))
+#if (defined(_MSC_VER) && (_MSC_VER > 600)) && !defined __INTERIX
# if defined(_WIN32_WCE)
# define fdopen(fd,mode) NULL /* No fdopen() */
# ifndef _PTRDIFF_T_DEFINED
@@ -163,6 +153,18 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
+#if defined(__BORLANDC__)
+ #pragma warn -8004
+ #pragma warn -8008
+ #pragma warn -8066
+#endif
+
+/* provide prototypes for these when building zlib without LFS */
+#if !defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0
+ ZEXTERN uLong ZEXPORT adler32_combine64 OF((uLong, uLong, z_off_t));
+ ZEXTERN uLong ZEXPORT crc32_combine64 OF((uLong, uLong, z_off_t));
+#endif
+
/* common defaults */
#ifndef OS_CODE
@@ -197,7 +199,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# ifdef WIN32
/* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */
# if !defined(vsnprintf) && !defined(NO_vsnprintf)
-# define vsnprintf _vsnprintf
+# if !defined(_MSC_VER) || ( defined(_MSC_VER) && _MSC_VER < 1500 )
+# define vsnprintf _vsnprintf
+# endif
# endif
# endif
# ifdef __SASC
@@ -232,16 +236,16 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# define zmemzero(dest, len) memset(dest, 0, len)
# endif
#else
- extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
- extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
- extern void zmemzero OF((Bytef* dest, uInt len));
+ void ZLIB_INTERNAL zmemcpy OF((Bytef* dest, const Bytef* source, uInt len));
+ int ZLIB_INTERNAL zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len));
+ void ZLIB_INTERNAL zmemzero OF((Bytef* dest, uInt len));
#endif
/* Diagnostic functions */
#ifdef DEBUG
# include <stdio.h>
- extern int z_verbose;
- extern void z_error OF((char *m));
+ extern int ZLIB_INTERNAL z_verbose;
+ extern void ZLIB_INTERNAL z_error OF((char *m));
# define Assert(cond,msg) {if(!(cond)) z_error(msg);}
# define Trace(x) {if (z_verbose>=0) fprintf x ;}
# define Tracev(x) {if (z_verbose>0) fprintf x ;}
@@ -258,8 +262,9 @@ extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
#endif
-voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size));
-void zcfree OF((voidpf opaque, voidpf ptr));
+voidpf ZLIB_INTERNAL zcalloc OF((voidpf opaque, unsigned items,
+ unsigned size));
+void ZLIB_INTERNAL zcfree OF((voidpf opaque, voidpf ptr));
#define ZALLOC(strm, items, size) \
(*((strm)->zalloc))((strm)->opaque, (items), (size))
diff --git a/src/corelib/animation/qabstractanimation.cpp b/src/corelib/animation/qabstractanimation.cpp
index 2d5cfab..602cf8a 100644
--- a/src/corelib/animation/qabstractanimation.cpp
+++ b/src/corelib/animation/qabstractanimation.cpp
@@ -167,7 +167,7 @@ Q_GLOBAL_STATIC(QThreadStorage<QUnifiedTimer *>, unifiedTimer)
QUnifiedTimer::QUnifiedTimer() :
QObject(), defaultDriver(this), lastTick(0), timingInterval(DEFAULT_TIMER_INTERVAL),
- currentAnimationIdx(0), consistentTiming(false), slowMode(false),
+ currentAnimationIdx(0), insideTick(false), consistentTiming(false), slowMode(false),
slowdownFactor(5.0f), isPauseTimerActive(false), runningLeafAnimations(0)
{
time.invalidate();
@@ -206,6 +206,10 @@ void QUnifiedTimer::ensureTimerUpdate()
void QUnifiedTimer::updateAnimationsTime()
{
+ //setCurrentTime can get this called again while we're the for loop. At least with pauseAnimations
+ if(insideTick)
+ return;
+
qint64 totalElapsed = time.elapsed();
// ignore consistentTiming in case the pause timer is active
int delta = (consistentTiming && !isPauseTimerActive) ?
@@ -223,12 +227,14 @@ void QUnifiedTimer::updateAnimationsTime()
//it might happen in some cases that the time doesn't change because events are delayed
//when the CPU load is high
if (delta) {
+ insideTick = true;
for (currentAnimationIdx = 0; currentAnimationIdx < animations.count(); ++currentAnimationIdx) {
QAbstractAnimation *animation = animations.at(currentAnimationIdx);
int elapsed = QAbstractAnimationPrivate::get(animation)->totalCurrentTime
+ (animation->direction() == QAbstractAnimation::Forward ? delta : -delta);
animation->setCurrentTime(elapsed);
}
+ insideTick = false;
currentAnimationIdx = 0;
}
}
diff --git a/src/corelib/animation/qabstractanimation_p.h b/src/corelib/animation/qabstractanimation_p.h
index 1ab05cd..ba92960 100644
--- a/src/corelib/animation/qabstractanimation_p.h
+++ b/src/corelib/animation/qabstractanimation_p.h
@@ -202,6 +202,7 @@ private:
qint64 lastTick;
int timingInterval;
int currentAnimationIdx;
+ bool insideTick;
bool consistentTiming;
bool slowMode;
diff --git a/src/corelib/concurrent/qfutureinterface.cpp b/src/corelib/concurrent/qfutureinterface.cpp
index 627d0c7..c5bd802 100644
--- a/src/corelib/concurrent/qfutureinterface.cpp
+++ b/src/corelib/concurrent/qfutureinterface.cpp
@@ -219,7 +219,7 @@ QString QFutureInterfaceBase::progressText() const
bool QFutureInterfaceBase::isProgressUpdateNeeded() const
{
QMutexLocker locker(&d->m_mutex);
- return (d->progressTime.elapsed() > (1000 / MaxProgressEmitsPerSecond));
+ return !d->progressTime.isValid() || (d->progressTime.elapsed() > (1000 / MaxProgressEmitsPerSecond));
}
void QFutureInterfaceBase::reportStarted()
diff --git a/src/corelib/global/global.pri b/src/corelib/global/global.pri
index d80706a..68582bf 100644
--- a/src/corelib/global/global.pri
+++ b/src/corelib/global/global.pri
@@ -26,6 +26,9 @@ linux*:!static:!symbian-gcce:!*-armcc* {
}
# Compensate for lack of platform defines in Symbian3 and Symbian4
-symbian: DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_))
+symbian {
+ DEFINES += SYMBIAN_VERSION_$$upper($$replace(SYMBIAN_VERSION,\\.,_)) \
+ S60_VERSION_$$upper($$replace(S60_VERSION,\\.,_))
+}
include(../../../tools/shared/symbian/epocroot.pri)
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 54b9d89..97b4407 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -86,7 +86,6 @@
# include "private/qcore_symbian_p.h"
_LIT(qt_S60Filter, "Series60v?.*.sis");
-_LIT(qt_symbianFilter, "Symbianv*.sis");
_LIT(qt_symbianSystemInstallDir, "z:\\system\\install\\");
#endif
@@ -1203,7 +1202,7 @@ bool qSharedBuild()
\value SV_SF_1 Symbian^1
\value SV_SF_2 Symbian^2
\value SV_SF_3 Symbian^3
- \value SV_SF_4 Symbian^4
+ \value SV_SF_4 \e{This enum value is deprecated.}
\value SV_Unknown An unknown and currently unsupported platform
\sa S60Version, WinVersion, MacVersion
@@ -1221,7 +1220,8 @@ bool qSharedBuild()
\value SV_S60_3_2 S60 3rd Edition Feature Pack 2
\value SV_S60_5_0 S60 5th Edition
\value SV_S60_5_1 S60 5th Edition Feature Pack 1
- \value SV_S60_5_2 S60 5th Edition Feature Pack 2
+ \value SV_S60_5_2 Symbian^3
+ \value SV_S60_5_3 To be determined - FIXME
\value SV_S60_Unknown An unknown and currently unsupported platform
\omitvalue SV_S60_None
@@ -1829,12 +1829,10 @@ const QSysInfo::WinVersion QSysInfo::WindowsVersion = QSysInfo::windowsVersion()
#ifdef Q_OS_SYMBIAN
static QSysInfo::SymbianVersion cachedSymbianVersion = QSysInfo::SymbianVersion(-1);
+static QSysInfo::S60Version cachedS60Version = QSysInfo::S60Version(-1);
-QSysInfo::SymbianVersion QSysInfo::symbianVersion()
+static void symbianInitVersions()
{
- if (cachedSymbianVersion != -1)
- return cachedSymbianVersion;
-
// Use pure Symbian code, because if done using QDir, there will be a call back
// to this method, resulting doing this expensive operation twice before the cache kicks in.
// Pure Symbian code also makes this method ~10x faster, speeding up the application launch.
@@ -1842,21 +1840,8 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion()
TFindFile fileFinder(rfs);
CDir* contents;
- // Check for Symbian4
- TInt err = fileFinder.FindWildByDir(qt_symbianFilter, qt_symbianSystemInstallDir, contents);
- if (err == KErrNone) {
- QScopedPointer<CDir> contentsDeleter(contents);
- err = contents->Sort(EDescending|ESortByName);
- if (err == KErrNone && contents->Count() > 0 && (*contents)[0].iName.Length() >= 9) {
- TInt major = (*contents)[0].iName[8] - '0';
- if (major == 4) {
- return cachedSymbianVersion = SV_SF_4;
- }
- }
- }
-
- // Check for S60 and Symbian3 platforms, which use older .sis naming scheme
- err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
+ // Check for platform version
+ TInt err = fileFinder.FindWildByDir(qt_S60Filter, qt_symbianSystemInstallDir, contents);
if (err == KErrNone) {
QScopedPointer<CDir> contentsDeleter(contents);
err = contents->Sort(EDescending|ESortByName);
@@ -1865,61 +1850,76 @@ QSysInfo::SymbianVersion QSysInfo::symbianVersion()
TInt minor = (*contents)[0].iName[11] - '0';
if (major == 3) {
if (minor == 1) {
- return cachedSymbianVersion = SV_9_2;
+ cachedS60Version = QSysInfo::SV_S60_3_1;
+ cachedSymbianVersion = QSysInfo::SV_9_2;
} else if (minor == 2) {
- return cachedSymbianVersion = SV_9_3;
+ cachedS60Version = QSysInfo::SV_S60_3_2;
+ cachedSymbianVersion = QSysInfo::SV_9_3;
}
} else if (major == 5) {
if (minor == 0) {
- return cachedSymbianVersion = SV_9_4;
- }
- else if (minor == 1) {
- return cachedSymbianVersion = SV_SF_2;
- }
- else if (minor >= 2) {
- return cachedSymbianVersion = SV_SF_3;
+ cachedS60Version = QSysInfo::SV_S60_5_0;
+ cachedSymbianVersion = QSysInfo::SV_9_4;
+ } else if (minor == 1) {
+ cachedS60Version = QSysInfo::SV_S60_5_1;
+ cachedSymbianVersion = QSysInfo::SV_SF_2;
+ } else if (minor == 2) {
+ cachedS60Version = QSysInfo::SV_S60_5_2;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
+ } else if (minor >= 3) {
+ cachedS60Version = QSysInfo::SV_S60_5_3;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
}
}
}
}
# ifdef Q_CC_NOKIAX86
- // Some emulator environments may not contain the version specific .sis files, so
- // simply hardcode the version on those environments. Note that can't use
- // SYMBIAN_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
- // right anyway in case .sis files are not found.
+ if (cachedS60Version == -1) {
+ // Some emulator environments may not contain the version specific .sis files, so
+ // simply hardcode the version on those environments. Note that can't use
+ // S60_VERSION_* defines for S60 3.x/5.0 platforms, as they do not define them
+ // right anyway in case .sis files are not found.
# if defined(__SERIES60_31__)
- return cachedSymbianVersion = SV_9_2;
+ cachedS60Version = QSysInfo::SV_S60_3_1;
+ cachedSymbianVersion = QSysInfo::SV_9_2;
# elif defined(__S60_32__)
- return cachedSymbianVersion = SV_9_3;
+ cachedS60Version = QSysInfo::SV_S60_3_2;
+ cachedSymbianVersion = QSysInfo::SV_9_3;
# elif defined(__S60_50__)
- return cachedSymbianVersion = SV_9_4;
-# elif defined(SYMBIAN_VERSION_SYMBIAN3)
- return cachedSymbianVersion = SV_SF_3;
-# elif defined(SYMBIAN_VERSION_SYMBIAN4)
- return cachedSymbianVersion = SV_SF_4;
+ cachedS60Version = QSysInfo::SV_S60_5_0;
+ cachedSymbianVersion = QSysInfo::SV_9_4;
+# elif defined(S60_VERSION_5_2)
+ cachedS60Version = QSysInfo::SV_S60_5_2;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
+# elif defined(S60_VERSION_5_3)
+ cachedS60Version = QSysInfo::SV_S60_5_3;
+ cachedSymbianVersion = QSysInfo::SV_SF_3;
# endif
+ }
# endif
- //If reaching here, it was not possible to determine the version
- return cachedSymbianVersion = SV_Unknown;
+
+ if (cachedS60Version == -1) {
+ //If reaching here, it was not possible to determine the version
+ cachedS60Version = QSysInfo::SV_S60_Unknown;
+ cachedSymbianVersion = QSysInfo::SV_Unknown;
+ }
+}
+
+QSysInfo::SymbianVersion QSysInfo::symbianVersion()
+{
+ if (cachedSymbianVersion == -1)
+ symbianInitVersions();
+
+ return cachedSymbianVersion;
}
QSysInfo::S60Version QSysInfo::s60Version()
{
- switch (symbianVersion()) {
- case SV_9_2:
- return SV_S60_3_1;
- case SV_9_3:
- return SV_S60_3_2;
- case SV_9_4:
- return SV_S60_5_0;
- case SV_SF_2:
- return SV_S60_5_1;
- case SV_SF_3:
- return SV_S60_5_2;
- default:
- return SV_S60_Unknown;
- }
+ if (cachedS60Version == -1)
+ symbianInitVersions();
+
+ return cachedS60Version;
}
#endif // ifdef Q_OS_SYMBIAN
@@ -2870,6 +2870,40 @@ int qrand()
*/
/*!
+ \macro Q_LIKELY(expr)
+ \relates <QtGlobal>
+ \since 4.8
+
+ \brief Hints the compiler that the enclosed condition is likely to evaluate
+ to \c true.
+
+ Use of this macro can help the compiler to optimize the code.
+
+ Example:
+
+ \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp qlikely
+
+ \sa Q_UNLIKELY()
+*/
+
+/*!
+ \macro Q_UNLIKELY(expr)
+ \relates <QtGlobal>
+ \since 4.8
+
+ \brief Hints the compiler that the enclosed condition is likely to evaluate
+ to \c false.
+
+ Use of this macro can help the compiler to optimize the code.
+
+ Example:
+
+ \snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp qunlikely
+
+ \sa Q_LIKELY()
+*/
+
+/*!
\macro QT_POINTER_SIZE
\relates <QtGlobal>
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index cf63943..6469b46 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -497,6 +497,10 @@ namespace QT_NAMESPACE {}
# define Q_TYPEOF(expr) __typeof__(expr)
# define Q_DECL_ALIGN(n) __attribute__((__aligned__(n)))
# endif
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96)
+# define Q_LIKELY(expr) __builtin_expect(!!(expr), true)
+# define Q_UNLIKELY(expr) __builtin_expect(!!(expr), false)
+# endif
/* GCC 3.1 and GCC 3.2 wrongly define _SB_CTYPE_MACROS on HP-UX */
# if defined(Q_OS_HPUX) && __GNUC__ == 3 && __GNUC_MINOR__ >= 1
# define Q_WRONG_SB_CTYPE_MACROS
@@ -802,6 +806,13 @@ namespace QT_NAMESPACE {}
# undef Q_NO_PACKED_REFERENCE
#endif
+#ifndef Q_LIKELY
+# define Q_LIKELY(x) (x)
+#endif
+#ifndef Q_UNLIKELY
+# define Q_UNLIKELY(x) (x)
+#endif
+
#ifndef Q_CONSTRUCTOR_FUNCTION
# define Q_CONSTRUCTOR_FUNCTION0(AFUNC) \
static const int AFUNC ## __init_variable__ = AFUNC();
@@ -1606,7 +1617,7 @@ public:
SV_SF_1 = SV_9_4,
SV_SF_2 = 40,
SV_SF_3 = 50,
- SV_SF_4 = 60
+ SV_SF_4 = 60 // Deprecated
};
static SymbianVersion symbianVersion();
enum S60Version {
@@ -1615,9 +1626,9 @@ public:
SV_S60_3_1 = SV_9_2,
SV_S60_3_2 = SV_9_3,
SV_S60_5_0 = SV_9_4,
- //versions beyond 5.0 are to be confirmed - it is better to use symbian version
SV_S60_5_1 = SV_SF_2,
- SV_S60_5_2 = SV_SF_3
+ SV_S60_5_2 = SV_SF_3,
+ SV_S60_5_3 = 70
};
static S60Version s60Version();
#endif
@@ -2524,6 +2535,10 @@ QT3_SUPPORT Q_CORE_EXPORT const char *qInstallPathSysconf();
#define Q_SYMBIAN_SUPPORTS_MULTIPLE_SCREENS
#endif
+#ifdef SYMBIAN_GRAPHICS_FIXNATIVEORIENTATION
+#define Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION
+#endif
+
//Symbian does not support data imports from a DLL
#define Q_NO_DATA_RELOCATION
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index bc15514..07a9503 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -242,81 +242,25 @@
/*!
\enum Qt::GlobalColor
- \raw HTML
- <style type="text/css" id="colorstyles">
- #white { background-color: #ffffff; color: #000000 }
- #black { background-color: #000000; color: #ffffff }
- #red { background-color: #ff0000; color: #000000 }
- #darkRed { background-color: #800000; color: #ffffff }
- #green { background-color: #00ff00; color: #000000 }
- #darkGreen { background-color: #008000; color: #ffffff }
- #blue { background-color: #0000ff; color: #ffffff }
- #darkBlue { background-color: #000080; color: #ffffff }
- #cyan { background-color: #00ffff; color: #000000 }
- #darkCyan { background-color: #008080; color: #ffffff }
- #magenta { background-color: #ff00ff; color: #000000 }
- #darkMagenta { background-color: #800080; color: #ffffff }
- #yellow { background-color: #ffff00; color: #000000 }
- #darkYellow { background-color: #808000; color: #ffffff }
- #gray { background-color: #a0a0a4; color: #000000 }
- #darkGray { background-color: #808080; color: #ffffff }
- #lightGray { background-color: #c0c0c0; color: #000000 }
- </style>
- \endraw
-
Qt's predefined QColor objects:
- \value white \raw HTML
- White <tt id="white">(#ffffff)</tt>
- \endraw
- \value black \raw HTML
- Black <tt id="black">(#000000)</tt>
- \endraw
- \value red \raw HTML
- Red <tt id="red">(#ff0000)</tt>
- \endraw
- \value darkRed \raw HTML
- Dark red <tt id="darkRed">(#800000)</tt>
- \endraw
- \value green \raw HTML
- Green <tt id="green">(#00ff00)</tt>
- \endraw
- \value darkGreen \raw HTML
- Dark green <tt id="darkGreen">(#008000)</tt>
- \endraw
- \value blue \raw HTML
- Blue <tt id="blue">(#0000ff)</tt>
- \endraw
- \value darkBlue \raw HTML
- Dark blue <tt id="darkBlue">(#000080)</tt>
- \endraw
- \value cyan \raw HTML
- Cyan <tt id="cyan">(#00ffff)</tt>
- \endraw
- \value darkCyan \raw HTML
- Dark cyan <tt id="darkCyan">(#008080)</tt>
- \endraw
- \value magenta \raw HTML
- Magenta <tt id="magenta">(#ff00ff)</tt>
- \endraw
- \value darkMagenta \raw HTML
- Dark magenta <tt id="darkMagenta">(#800080)</tt>
- \endraw
- \value yellow \raw HTML
- Yellow <tt id="yellow">(#ffff00)</tt>
- \endraw
- \value darkYellow \raw HTML
- Dark yellow <tt id="darkYellow">(#808000)</tt>
- \endraw
- \value gray \raw HTML
- Gray <tt id="gray">(#a0a0a4)</tt>
- \endraw
- \value darkGray \raw HTML
- Dark gray <tt id="darkGray">(#808080)</tt>
- \endraw
- \value lightGray \raw HTML
- Light gray <tt id="lightGray">(#c0c0c0)</tt>
- \endraw
+ \value white \span {id="color-white"} {White (#ffffff) }
+ \value black \span {id="color-black"} {Black (#000000) }
+ \value red \span {id="color-red"} {Red (#ff0000) }
+ \value darkRed \span {id="color-darkRed"} {Dark red (#800000) }
+ \value green \span {id="color-green"} {Green (#00ff00) }
+ \value darkGreen \span {id="color-darkGreen"} {Dark green (#008000) }
+ \value blue \span {id="color-blue"} {Blue (#0000ff) }
+ \value darkBlue \span {id="color-darkBlue"} {Dark blue (#000080) }
+ \value cyan \span {id="color-cyan"} {Cyan (#00ffff) }
+ \value darkCyan \span {id="color-darkCyan"} {Dark cyan (#008080) }
+ \value magenta \span {id="color-magenta"} {Magenta (#ff00ff) }
+ \value darkMagenta \span {id="color-darkMagenta"} {Dark magenta (#800080) }
+ \value yellow \span {id="color-yellow"} {Yellow (#ffff00) }
+ \value darkYellow \span {id="color-darkYellow"} {Dark yellow (#808000) }
+ \value gray \span {id="color-gray"} {Gray (#a0a0a4) }
+ \value darkGray \span {id="color-darkGray"} {Dark gray (#808080) }
+ \value lightGray \span {id="color-lightGray"} {Light gray (#c0c0c0) }
\value transparent a transparent black value (i.e., QColor(0, 0, 0, 0))
\value color0 0 pixel value (for bitmaps)
\value color1 1 pixel value (for bitmaps)
@@ -2882,7 +2826,7 @@
INT_MIN, inclusive. For example, you can define custom priorities
as being relative to each other:
- \snippet doc/src/snippets/code/doc_src_qnamespace.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qnamespace.cpp 1
\sa QCoreApplication::postEvent()
*/
diff --git a/src/corelib/io/qfilesystemwatcher_symbian.cpp b/src/corelib/io/qfilesystemwatcher_symbian.cpp
index 29ec77a..8e8dfe5 100644
--- a/src/corelib/io/qfilesystemwatcher_symbian.cpp
+++ b/src/corelib/io/qfilesystemwatcher_symbian.cpp
@@ -95,7 +95,10 @@ void QNotifyChangeEvent::RunL()
SetActive();
if (!failureCount) {
- QT_TRYCATCH_LEAVING(engine->emitPathChanged(this));
+ int err;
+ QT_TRYCATCH_ERROR(err, engine->emitPathChanged(this));
+ if (err != KErrNone)
+ qWarning("QNotifyChangeEvent::RunL() - emitPathChanged threw exception (Converted error code: %d)", err);
}
}
}
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index 76e8409..8759f8b 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -1628,10 +1628,11 @@ QString QIODevice::errorString() const
\fn qint64 QIODevice::readData(char *data, qint64 maxSize)
Reads up to \a maxSize bytes from the device into \a data, and
- returns the number of bytes read or -1 if an error occurred. If
- there are no bytes to be read, this function should return -1 if
- there can never be more bytes available (for example: socket
- closed, pipe closed, sub-process finished).
+ returns the number of bytes read or -1 if an error occurred.
+
+ If there are no bytes to be read and there can never be more bytes
+ available (examples include socket closed, pipe closed, sub-process
+ finished), this function returns -1.
This function is called by QIODevice. Reimplement this function
when creating a subclass of QIODevice.
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index e11cef9..a45225f 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -221,6 +221,24 @@ QProcessEnvironment QProcessEnvironmentPrivate::fromList(const QStringList &list
return env;
}
+QStringList QProcessEnvironmentPrivate::keys() const
+{
+ QStringList result;
+ QHash<Unit, Unit>::ConstIterator it = hash.constBegin(),
+ end = hash.constEnd();
+ for ( ; it != end; ++it)
+ result << nameToString(it.key());
+ return result;
+}
+
+void QProcessEnvironmentPrivate::insert(const Hash &h)
+{
+ QHash<Unit, Unit>::ConstIterator it = h.constBegin(),
+ end = h.constEnd();
+ for ( ; it != end; ++it)
+ hash.insert(it.key(), it.value());
+}
+
/*!
Creates a new QProcessEnvironment object. This constructor creates an
empty environment. If set on a QProcess, this will cause the current
@@ -396,6 +414,33 @@ QStringList QProcessEnvironment::toStringList() const
return d ? d->toList() : QStringList();
}
+/*!
+ \since 4.8
+
+ Returns a list containing all the variable names in this QProcessEnvironment
+ object.
+*/
+QStringList QProcessEnvironment::keys() const
+{
+ return d ? d->keys() : QStringList();
+}
+
+/*!
+ \overload
+ \since 4.8
+
+ Inserts the contents of \a e in this QProcessEnvironment object. Variables in
+ this object that also exist in \a e will be overwritten.
+*/
+void QProcessEnvironment::insert(const QProcessEnvironment &e)
+{
+ if (!e.d)
+ return;
+
+ // d detaches from null
+ d->insert(e.d->hash);
+}
+
void QProcessPrivate::Channel::clear()
{
switch (type) {
@@ -2082,6 +2127,9 @@ void QProcess::terminate()
On Symbian, this function requires platform security capability
\c PowerMgmt. If absent, the process will panic with KERN-EXEC 46.
+ \note Killing running processes from other processes will typically
+ cause a panic in Symbian due to platform security.
+
\sa {Symbian Platform Security Requirements}
\sa terminate()
*/
diff --git a/src/corelib/io/qprocess.h b/src/corelib/io/qprocess.h
index baa67f7..664992f 100644
--- a/src/corelib/io/qprocess.h
+++ b/src/corelib/io/qprocess.h
@@ -87,6 +87,10 @@ public:
QStringList toStringList() const;
+ QStringList keys() const;
+
+ void insert(const QProcessEnvironment &e);
+
static QProcessEnvironment systemEnvironment();
private:
diff --git a/src/corelib/io/qprocess_p.h b/src/corelib/io/qprocess_p.h
index be4f2a0..7bfcb31 100644
--- a/src/corelib/io/qprocess_p.h
+++ b/src/corelib/io/qprocess_p.h
@@ -94,6 +94,8 @@ public:
static QProcessEnvironment fromList(const QStringList &list);
QStringList toList() const;
+ QStringList keys() const;
+ void insert(const Hash &hash);
};
class QProcessPrivate : public QIODevicePrivate
diff --git a/src/corelib/io/qprocess_symbian.cpp b/src/corelib/io/qprocess_symbian.cpp
index d22d1ed..8a74c7b 100644
--- a/src/corelib/io/qprocess_symbian.cpp
+++ b/src/corelib/io/qprocess_symbian.cpp
@@ -961,16 +961,15 @@ bool QProcessPrivate::waitForFinished(int msecs)
User::WaitForRequest(logonStatus, timerStatus);
QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished() - Wait completed");
- if (timerStatus == KErrNone)
+ if (logonStatus != KRequestPending) {
+ timer.Cancel();
+ User::WaitForRequest(timerStatus);
+ } else {
timeoutOccurred = true;
-
- timer.Cancel();
+ symbianProcess->LogonCancel(logonStatus);
+ User::WaitForRequest(logonStatus);
+ }
timer.Close();
-
- symbianProcess->LogonCancel(logonStatus);
-
- // Eat cancel request completion so that it won't mess up main thread scheduling later
- User::WaitForRequest(logonStatus, timerStatus);
}
} else {
QPROCESS_DEBUG_PRINT("QProcessPrivate::waitForFinished(), qt_rprocess_running returned false");
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index 0435256..cd8c1a3 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -373,7 +373,7 @@ QResourcePrivate::ensureChildren() const
Constructs a QResource pointing to \a file. \a locale is used to
load a specific localization of a resource data.
- \sa QFileInfo, searchPaths(), setFileName(), setLocale()
+ \sa QFileInfo, QDir::searchPaths(), setFileName(), setLocale()
*/
QResource::QResource(const QString &file, const QLocale &locale) : d_ptr(new QResourcePrivate(this))
@@ -418,7 +418,7 @@ QLocale QResource::locale() const
/*!
Sets a QResource to point to \a file. \a file can either be absolute,
in which case it is opened directly, if relative then the file will be
- tried to be found in searchPaths().
+ tried to be found in QDir::searchPaths().
\sa absoluteFilePath()
*/
@@ -446,7 +446,7 @@ QString QResource::fileName() const
/*!
Returns the real path that this QResource represents, if the resource
- was found via the searchPaths() it will be indicated in the path.
+ was found via the QDir::searchPaths() it will be indicated in the path.
\sa fileName()
*/
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 53796be..4c01bde 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -43,6 +43,7 @@
#include <private/qthread_p.h>
#include <qcoreapplication.h>
#include <private/qcoreapplication_p.h>
+#include <qsemaphore.h>
#include <unistd.h>
#include <errno.h>
@@ -654,34 +655,54 @@ class QIdleDetectorThread
{
public:
QIdleDetectorThread()
- : m_state(STATE_RUN), m_stop(false)
+ : m_state(STATE_RUN), m_stop(false), m_running(false)
{
- qt_symbian_throwIfError(m_lock.CreateLocal(0));
+ start();
+ }
+
+ ~QIdleDetectorThread()
+ {
+ stop();
+ }
+
+ void start()
+ {
+ QMutexLocker lock(&m_mutex);
+ if (m_running)
+ return;
+ m_stop = false;
+ m_state = STATE_RUN;
TInt err = m_idleDetectorThread.Create(KNullDesC(), &idleDetectorThreadFunc, 1024, &User::Allocator(), this);
if (err != KErrNone)
- m_lock.Close();
- qt_symbian_throwIfError(err);
+ return; // Fail silently on error. Next kick will try again. Exception might stop the event being processed
m_idleDetectorThread.SetPriority(EPriorityAbsoluteBackgroundNormal);
m_idleDetectorThread.Resume();
+ m_running = true;
+ // get a callback from QCoreApplication destruction to stop this thread
+ qAddPostRoutine(StopIdleDetectorThread);
}
- ~QIdleDetectorThread()
+ void stop()
{
+ QMutexLocker lock(&m_mutex);
+ if (!m_running)
+ return;
// close down the idle thread because if corelib is loaded temporarily, this would leak threads into the host process
m_stop = true;
- m_lock.Signal();
+ m_kick.release();
m_idleDetectorThread.SetPriority(EPriorityNormal);
TRequestStatus s;
m_idleDetectorThread.Logon(s);
User::WaitForRequest(s);
m_idleDetectorThread.Close();
- m_lock.Close();
+ m_running = false;
}
void kick()
{
+ start();
m_state = STATE_KICKED;
- m_lock.Signal();
+ m_kick.release();
}
bool hasRun()
@@ -700,20 +721,29 @@ private:
void IdleLoop()
{
while (!m_stop) {
- m_lock.Wait();
+ m_kick.acquire();
m_state = STATE_RUN;
}
}
+ static void StopIdleDetectorThread();
+
private:
enum IdleStates {STATE_KICKED, STATE_RUN} m_state;
bool m_stop;
+ bool m_running;
RThread m_idleDetectorThread;
- RSemaphore m_lock;
+ QSemaphore m_kick;
+ QMutex m_mutex;
};
Q_GLOBAL_STATIC(QIdleDetectorThread, idleDetectorThread);
+void QIdleDetectorThread::StopIdleDetectorThread()
+{
+ idleDetectorThread()->stop();
+}
+
const int maxBusyTime = 2000; // maximum time we allow idle detector to be blocked before worrying, in milliseconds
const int baseDelay = 1000; // minimum delay time used when backing off to allow idling, in microseconds
#endif
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 4e9e6ca..22b06a5 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -357,10 +357,15 @@ QTranslator::~QTranslator()
}
/*!
- Loads \a filename + \a suffix (".qm" if the \a suffix is
- not specified), which may be an absolute file name or relative
- to \a directory. Returns true if the translation is successfully
- loaded; otherwise returns false.
+
+ Loads \a filename + \a suffix (".qm" if the \a suffix is not
+ specified), which may be an absolute file name or relative to \a
+ directory. Returns true if the translation is successfully loaded;
+ otherwise returns false.
+
+ If \a directory is not specified, the directory of the
+ application's executable is used (i.e., as
+ \l{QCoreApplication::}{applicationDirPath()}).
The previous contents of this translator object are discarded.
diff --git a/src/corelib/plugin/qplugin.qdoc b/src/corelib/plugin/qplugin.qdoc
index 54b2b38..7043fa0 100644
--- a/src/corelib/plugin/qplugin.qdoc
+++ b/src/corelib/plugin/qplugin.qdoc
@@ -51,7 +51,7 @@
If you want to use Q_DECLARE_INTERFACE with interface classes
declared in a namespace then you have to make sure the Q_DECLARE_INTERFACE
is not inside a namespace though. For example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 0
\sa Q_INTERFACES(), Q_EXPORT_PLUGIN2(), {How to Create Qt Plugins}
*/
@@ -82,7 +82,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 1
See the \l{tools/plugandpaint}{Plug & Paint} example for details.
@@ -102,14 +102,14 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qplugin.cpp 2
Static plugins must also be included by the linker when your
application is built. For Qt's predefined plugins,
you can use the \c QTPLUGIN to add
the required plugins to your build. For example:
- \snippet doc/src/snippets/code/doc_src_qplugin.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qplugin.pro 3
\sa {Static Plugins}, {How to Create Qt Plugins}, {Using qmake}
*/
diff --git a/src/corelib/statemachine/qhistorystate.cpp b/src/corelib/statemachine/qhistorystate.cpp
index 350c1a0..7093c32 100644
--- a/src/corelib/statemachine/qhistorystate.cpp
+++ b/src/corelib/statemachine/qhistorystate.cpp
@@ -168,6 +168,9 @@ QAbstractState *QHistoryState::defaultState() const
/*!
Sets this history state's default state to be the given \a state.
\a state must be a sibling of this history state.
+
+ Note that this function does not set \a state as the initial state
+ of its parent.
*/
void QHistoryState::setDefaultState(QAbstractState *state)
{
diff --git a/src/corelib/thread/qmutex_p.h b/src/corelib/thread/qmutex_p.h
index 1a31c87..70860b1 100644
--- a/src/corelib/thread/qmutex_p.h
+++ b/src/corelib/thread/qmutex_p.h
@@ -62,6 +62,10 @@
# include <mach/semaphore.h>
#endif
+#if defined(Q_OS_SYMBIAN)
+# include <e32std.h>
+#endif
+
QT_BEGIN_NAMESPACE
class QMutexPrivate : public QMutexData {
@@ -81,12 +85,14 @@ public:
#if defined(Q_OS_MAC)
semaphore_t mach_semaphore;
-#elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX)
+#elif defined(Q_OS_UNIX) && !defined(Q_OS_LINUX) && !defined(Q_OS_SYMBIAN)
volatile bool wakeup;
pthread_mutex_t mutex;
pthread_cond_t cond;
#elif defined(Q_OS_WIN32) || defined(Q_OS_WINCE)
HANDLE event;
+#elif defined(Q_OS_SYMBIAN)
+ RSemaphore lock;
#endif
};
diff --git a/src/corelib/thread/qmutex_symbian.cpp b/src/corelib/thread/qmutex_symbian.cpp
new file mode 100644
index 0000000..288c576
--- /dev/null
+++ b/src/corelib/thread/qmutex_symbian.cpp
@@ -0,0 +1,101 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformdefs.h"
+#include "qmutex.h"
+
+#ifndef QT_NO_THREAD
+#include "qatomic.h"
+#include "qelapsedtimer.h"
+#include "qthread.h"
+#include "qmutex_p.h"
+
+QT_BEGIN_NAMESPACE
+
+
+QMutexPrivate::QMutexPrivate(QMutex::RecursionMode mode)
+ : QMutexData(mode), maximumSpinTime(MaximumSpinTimeThreshold), averageWaitTime(0), owner(0), count(0)
+{
+ int r = lock.CreateLocal(0);
+ if (r != KErrNone)
+ qWarning("QMutex: failed to create lock, error %d", r);
+ qt_symbian_throwIfError(r);
+}
+
+QMutexPrivate::~QMutexPrivate()
+{
+ lock.Close();
+}
+
+bool QMutexPrivate::wait(int timeout)
+{
+ if (contenders.fetchAndAddAcquire(1) == 0) {
+ // lock acquired without waiting
+ return true;
+ }
+ int r = KErrTimedOut;
+ if (timeout < 0) {
+ lock.Wait();
+ r = KErrNone;
+ } else {
+ // Symbian lock waits are specified in microseconds.
+ // The wait is therefore chunked.
+ // KErrNone indicates success, KErrGeneral and KErrArgument are real fails, anything else is a timeout
+ do {
+ int waitTime = qMin(KMaxTInt / 1000, timeout);
+ timeout -= waitTime;
+ // Symbian undocumented feature - 0us means no timeout! Use a minimum of 1
+ r = lock.Wait(qMax(1, waitTime * 1000));
+ } while (r != KErrNone && r != KErrGeneral && r != KErrArgument && timeout > 0);
+ }
+ bool returnValue = (r == KErrNone);
+ contenders.deref();
+ return returnValue;
+}
+
+void QMutexPrivate::wakeUp()
+{
+ lock.Signal();
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_THREAD
diff --git a/src/corelib/thread/qthread_symbian.cpp b/src/corelib/thread/qthread_symbian.cpp
new file mode 100644
index 0000000..1474b36
--- /dev/null
+++ b/src/corelib/thread/qthread_symbian.cpp
@@ -0,0 +1,599 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qthread.h"
+#include "qplatformdefs.h"
+#include <private/qcoreapplication_p.h>
+#include <private/qeventdispatcher_symbian_p.h>
+#include "qthreadstorage.h"
+#include "qthread_p.h"
+#include <private/qsystemerror_p.h>
+
+#include <sched.h>
+#include <hal.h>
+#include <hal_data.h>
+
+// You only find these enumerations on Symbian^3 onwards, so we need to provide our own
+// to remain compatible with older releases. They won't be called by pre-Sym^3 SDKs.
+
+// HALData::ENumCpus
+#define QT_HALData_ENumCpus 119
+
+QT_BEGIN_NAMESPACE
+
+#ifndef QT_NO_THREAD
+
+enum { ThreadPriorityResetFlag = 0x80000000 };
+
+// Utility functions for getting, setting and clearing thread specific data.
+static QThreadData *get_thread_data()
+{
+ return reinterpret_cast<QThreadData *>(Dll::Tls());
+}
+
+static void set_thread_data(QThreadData *data)
+{
+ qt_symbian_throwIfError(Dll::SetTls(data));
+}
+
+static void clear_thread_data()
+{
+ Dll::FreeTls();
+}
+
+
+static void init_symbian_thread_handle(RThread &thread)
+{
+ thread = RThread();
+ TThreadId threadId = thread.Id();
+ qt_symbian_throwIfError(thread.Open(threadId, EOwnerProcess));
+}
+
+QThreadData *QThreadData::current()
+{
+ QThreadData *data = get_thread_data();
+ if (!data) {
+ void *a;
+ if (QInternal::activateCallbacks(QInternal::AdoptCurrentThread, &a)) {
+ QThread *adopted = static_cast<QThread*>(a);
+ Q_ASSERT(adopted);
+ data = QThreadData::get2(adopted);
+ set_thread_data(data);
+ adopted->d_func()->running = true;
+ adopted->d_func()->finished = false;
+ static_cast<QAdoptedThread *>(adopted)->init();
+ } else {
+ data = new QThreadData;
+ QT_TRY {
+ set_thread_data(data);
+ data->thread = new QAdoptedThread(data);
+ } QT_CATCH(...) {
+ clear_thread_data();
+ data->deref();
+ data = 0;
+ QT_RETHROW;
+ }
+ data->deref();
+ }
+ if (!QCoreApplicationPrivate::theMainThread)
+ QCoreApplicationPrivate::theMainThread = data->thread;
+ }
+ return data;
+}
+
+
+class QCAdoptedThreadMonitor : public CActive
+{
+public:
+ QCAdoptedThreadMonitor(QThread *thread)
+ : CActive(EPriorityStandard), data(QThreadData::get2(thread))
+ {
+ CActiveScheduler::Add(this);
+ data->symbian_thread_handle.Logon(iStatus);
+ SetActive();
+ }
+ ~QCAdoptedThreadMonitor()
+ {
+ Cancel();
+ }
+ void DoCancel()
+ {
+ data->symbian_thread_handle.LogonCancel(iStatus);
+ }
+ void RunL();
+private:
+ QThreadData* data;
+};
+
+class QCAddAdoptedThread : public CActive
+{
+public:
+ QCAddAdoptedThread()
+ : CActive(EPriorityStandard)
+ {
+ CActiveScheduler::Add(this);
+ }
+ void ConstructL()
+ {
+ User::LeaveIfError(monitorThread.Open(RThread().Id()));
+ start();
+ }
+ ~QCAddAdoptedThread()
+ {
+ Cancel();
+ monitorThread.Close();
+ }
+ void DoCancel()
+ {
+ User::RequestComplete(stat, KErrCancel);
+ }
+ void start()
+ {
+ iStatus = KRequestPending;
+ SetActive();
+ stat = &iStatus;
+ }
+ void RunL()
+ {
+ if (iStatus.Int() != KErrNone)
+ return;
+
+ QMutexLocker adoptedThreadMonitorMutexlock(&adoptedThreadMonitorMutex);
+ for (int i=threadsToAdd.size()-1; i>=0; i--) {
+ // Create an active object to monitor the thread
+ new (ELeave) QCAdoptedThreadMonitor(threadsToAdd[i]);
+ count++;
+ threadsToAdd.pop_back();
+ }
+ start();
+ }
+ static void add(QThread *thread)
+ {
+ QMutexLocker adoptedThreadMonitorMutexlock(&adoptedThreadMonitorMutex);
+ if (!adoptedThreadAdder) {
+ RThread monitorThread;
+ qt_symbian_throwIfError(monitorThread.Create(KNullDesC(), &monitorThreadFunc, 1024, &User::Allocator(), 0));
+ TRequestStatus started;
+ monitorThread.Rendezvous(started);
+ monitorThread.Resume();
+ User::WaitForRequest(started);
+ monitorThread.Close();
+ }
+ if (RThread().Id() == adoptedThreadAdder->monitorThread.Id())
+ return;
+ adoptedThreadAdder->threadsToAdd.push_back(thread);
+ if (adoptedThreadAdder->stat) {
+ adoptedThreadAdder->monitorThread.RequestComplete(adoptedThreadAdder->stat, KErrNone);
+ }
+ }
+ static void monitorThreadFuncL()
+ {
+ CActiveScheduler* scheduler = new (ELeave) CActiveScheduler();
+ CleanupStack::PushL(scheduler);
+ CActiveScheduler::Install(scheduler);
+
+ adoptedThreadAdder = new(ELeave) QCAddAdoptedThread();
+ CleanupStack::PushL(adoptedThreadAdder);
+ adoptedThreadAdder->ConstructL();
+ QCAddAdoptedThread *adder = adoptedThreadAdder;
+
+ RThread::Rendezvous(KErrNone);
+ CActiveScheduler::Start();
+
+ CleanupStack::PopAndDestroy(adder);
+ CleanupStack::PopAndDestroy(scheduler);
+ }
+ static int monitorThreadFunc(void *)
+ {
+ _LIT(KMonitorThreadName, "adoptedMonitorThread");
+ RThread::RenameMe(KMonitorThreadName());
+ CTrapCleanup* cleanup = CTrapCleanup::New();
+ TRAPD(ret, monitorThreadFuncL());
+ delete cleanup;
+ return ret;
+ }
+ static void threadDied()
+ {
+ QMutexLocker adoptedThreadMonitorMutexlock(&adoptedThreadMonitorMutex);
+ if (adoptedThreadAdder) {
+ adoptedThreadAdder->count--;
+ if (adoptedThreadAdder->count <= 0 && adoptedThreadAdder->threadsToAdd.size() == 0) {
+ CActiveScheduler::Stop();
+ adoptedThreadAdder = 0;
+ }
+ }
+ }
+
+private:
+ QVector<QThread*> threadsToAdd;
+ RThread monitorThread;
+ static QMutex adoptedThreadMonitorMutex;
+ static QCAddAdoptedThread *adoptedThreadAdder;
+ int count;
+ TRequestStatus *stat;
+};
+
+QMutex QCAddAdoptedThread::adoptedThreadMonitorMutex;
+QCAddAdoptedThread* QCAddAdoptedThread::adoptedThreadAdder = 0;
+
+void QCAdoptedThreadMonitor::RunL()
+{
+ data->deref();
+ QCAddAdoptedThread::threadDied();
+ delete this;
+}
+
+void QAdoptedThread::init()
+{
+ Q_D(QThread);
+ d->thread_id = RThread().Id(); // type operator to TUint
+ init_symbian_thread_handle(d->data->symbian_thread_handle);
+ QCAddAdoptedThread::add(this);
+}
+
+/*
+ QThreadPrivate
+*/
+
+#if defined(Q_C_CALLBACKS)
+extern "C" {
+#endif
+
+typedef void*(*QtThreadCallback)(void*);
+
+#if defined(Q_C_CALLBACKS)
+}
+#endif
+
+#endif // QT_NO_THREAD
+
+void QThreadPrivate::createEventDispatcher(QThreadData *data)
+{
+ data->eventDispatcher = new QEventDispatcherSymbian;
+ data->eventDispatcher->startingUp();
+}
+
+#ifndef QT_NO_THREAD
+
+void *QThreadPrivate::start(void *arg)
+{
+ QThread *thr = reinterpret_cast<QThread *>(arg);
+ QThreadData *data = QThreadData::get2(thr);
+
+ // do we need to reset the thread priority?
+ if (int(thr->d_func()->priority) & ThreadPriorityResetFlag) {
+ thr->setPriority(QThread::Priority(thr->d_func()->priority & ~ThreadPriorityResetFlag));
+ }
+
+ // On symbian, threads other than the main thread are non critical by default
+ // This means a worker thread can crash without crashing the application - to
+ // use this feature, we would need to use RThread::Logon in the main thread
+ // to catch abnormal thread exit and emit the finished signal.
+ // For the sake of cross platform consistency, we set the thread as process critical
+ // - advanced users who want the symbian behaviour can change the critical
+ // attribute of the thread again once the app gains control in run()
+ User::SetCritical(User::EProcessCritical);
+
+ set_thread_data(data);
+
+ {
+ QMutexLocker locker(&thr->d_func()->mutex);
+ data->quitNow = thr->d_func()->exited;
+ }
+
+ // ### TODO: allow the user to create a custom event dispatcher
+ createEventDispatcher(data);
+
+ emit thr->started();
+ thr->run();
+
+ QThreadPrivate::finish(arg);
+
+ return 0;
+}
+
+void QThreadPrivate::finish(void *arg, bool lockAnyway, bool closeNativeHandle)
+{
+ QThread *thr = reinterpret_cast<QThread *>(arg);
+ QThreadPrivate *d = thr->d_func();
+
+ QMutexLocker locker(lockAnyway ? &d->mutex : 0);
+
+ d->isInFinish = true;
+ d->priority = QThread::InheritPriority;
+ bool terminated = d->terminated;
+ void *data = &d->data->tls;
+ locker.unlock();
+ if (terminated)
+ emit thr->terminated();
+ emit thr->finished();
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QThreadStorageData::finish((void **)data);
+ locker.relock();
+ d->terminated = false;
+
+ QAbstractEventDispatcher *eventDispatcher = d->data->eventDispatcher;
+ if (eventDispatcher) {
+ d->data->eventDispatcher = 0;
+ locker.unlock();
+ eventDispatcher->closingDown();
+ delete eventDispatcher;
+ locker.relock();
+ }
+
+ d->thread_id = 0;
+ if (closeNativeHandle)
+ d->data->symbian_thread_handle.Close();
+ d->running = false;
+ d->finished = true;
+
+ d->isInFinish = false;
+ d->thread_done.wakeAll();
+}
+
+
+
+
+/**************************************************************************
+ ** QThread
+ *************************************************************************/
+
+Qt::HANDLE QThread::currentThreadId()
+{
+ return (Qt::HANDLE) (TUint) RThread().Id();
+}
+
+int QThread::idealThreadCount()
+{
+ int cores = 1;
+
+ if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_3) {
+ TInt inumcpus;
+ TInt err;
+ err = HAL::Get((HALData::TAttribute)QT_HALData_ENumCpus, inumcpus);
+ if (err == KErrNone) {
+ cores = qMax(inumcpus, 1);
+ }
+ }
+
+ return cores;
+}
+
+void QThread::yieldCurrentThread()
+{
+ sched_yield();
+}
+
+/* \internal
+ helper function to do thread sleeps
+*/
+static void thread_sleep(unsigned long remaining, unsigned long scale)
+{
+ // maximum Symbian wait is 2^31 microseconds
+ unsigned long maxWait = KMaxTInt / scale;
+ do {
+ unsigned long waitTime = qMin(maxWait, remaining);
+ remaining -= waitTime;
+ User::AfterHighRes(waitTime * scale);
+ } while (remaining);
+}
+
+void QThread::sleep(unsigned long secs)
+{
+ thread_sleep(secs, 1000000ul);
+}
+
+void QThread::msleep(unsigned long msecs)
+{
+ thread_sleep(msecs, 1000ul);
+}
+
+void QThread::usleep(unsigned long usecs)
+{
+ thread_sleep(usecs, 1ul);
+}
+
+TThreadPriority calculateSymbianPriority(QThread::Priority priority)
+ {
+ // Both Qt & Symbian use limited enums; this matches the mapping previously done through conversion to Posix granularity
+ TThreadPriority symPriority;
+ switch (priority)
+ {
+ case QThread::IdlePriority:
+ symPriority = EPriorityMuchLess;
+ break;
+ case QThread::LowestPriority:
+ case QThread::LowPriority:
+ symPriority = EPriorityLess;
+ break;
+ case QThread::NormalPriority:
+ symPriority = EPriorityNormal;
+ break;
+ case QThread::HighPriority:
+ symPriority = EPriorityMore;
+ break;
+ case QThread::HighestPriority:
+ case QThread::TimeCriticalPriority:
+ symPriority = EPriorityMuchMore;
+ break;
+ case QThread::InheritPriority:
+ default:
+ symPriority = RThread().Priority();
+ break;
+ }
+ return symPriority;
+ }
+
+void QThread::start(Priority priority)
+{
+ Q_D(QThread);
+ QMutexLocker locker(&d->mutex);
+
+ if (d->isInFinish)
+ d->thread_done.wait(locker.mutex());
+
+ if (d->running)
+ return;
+
+ d->running = true;
+ d->finished = false;
+ d->terminated = false;
+ d->returnCode = 0;
+ d->exited = false;
+
+ d->priority = priority;
+
+ if (d->stackSize == 0)
+ // The default stack size on Symbian is very small, making even basic
+ // operations like file I/O fail, so we increase it by default.
+ d->stackSize = 0x14000; // Maximum stack size on Symbian.
+
+ int code = d->data->symbian_thread_handle.Create(KNullDesC, (TThreadFunction) QThreadPrivate::start, d->stackSize, NULL, this);
+ if (code == KErrNone) {
+ d->thread_id = d->data->symbian_thread_handle.Id();
+ TThreadPriority symPriority = calculateSymbianPriority(priority);
+ d->data->symbian_thread_handle.SetPriority(symPriority);
+ d->data->symbian_thread_handle.Resume();
+ } else {
+ qWarning("QThread::start: Thread creation error: %s", qPrintable(QSystemError(code, QSystemError::NativeError).toString()));
+
+ d->running = false;
+ d->finished = false;
+ d->thread_id = 0;
+ d->data->symbian_thread_handle.Close();
+ }
+}
+
+void QThread::terminate()
+{
+ Q_D(QThread);
+ QMutexLocker locker(&d->mutex);
+
+ if (!d->thread_id)
+ return;
+
+ if (!d->running)
+ return;
+ if (!d->terminationEnabled) {
+ d->terminatePending = true;
+ return;
+ }
+
+ d->terminated = true;
+ // "false, false" meaning:
+ // 1. lockAnyway = false. Don't lock the mutex because it's already locked
+ // (see above).
+ // 2. closeNativeSymbianHandle = false. We don't want to close the thread handle,
+ // because we need it here to terminate the thread.
+ QThreadPrivate::finish(this, false, false);
+ d->data->symbian_thread_handle.Terminate(KErrNone);
+ d->data->symbian_thread_handle.Close();
+}
+
+bool QThread::wait(unsigned long time)
+{
+ Q_D(QThread);
+ QMutexLocker locker(&d->mutex);
+
+ if (d->thread_id == (TUint) RThread().Id()) {
+ qWarning("QThread::wait: Thread tried to wait on itself");
+ return false;
+ }
+
+ if (d->finished || !d->running)
+ return true;
+
+ while (d->running) {
+ // Check if thread still exists. Needed because kernel will kill it without notification
+ // before global statics are deleted at application exit.
+ if (d->data->symbian_thread_handle.Handle()
+ && d->data->symbian_thread_handle.ExitType() != EExitPending) {
+ // Cannot call finish here as wait is typically called from another thread.
+ // It won't be necessary anyway, as we should never get here under normal operations;
+ // all QThreads are EProcessCritical and therefore cannot normally exit
+ // undetected (i.e. panic) as long as all thread control is via QThread.
+ return true;
+ }
+ if (!d->thread_done.wait(locker.mutex(), time))
+ return false;
+ }
+ return true;
+}
+
+void QThread::setTerminationEnabled(bool enabled)
+{
+ QThread *thr = currentThread();
+ Q_ASSERT_X(thr != 0, "QThread::setTerminationEnabled()",
+ "Current thread was not started with QThread.");
+ QThreadPrivate *d = thr->d_func();
+ QMutexLocker locker(&d->mutex);
+ d->terminationEnabled = enabled;
+ if (enabled && d->terminatePending) {
+ d->terminated = true;
+ // "false" meaning:
+ // - lockAnyway = false. Don't lock the mutex because it's already locked
+ // (see above).
+ QThreadPrivate::finish(thr, false);
+ locker.unlock(); // don't leave the mutex locked!
+ User::Exit(0); // may be some other cleanup required? what if AS or cleanup stack?
+ }
+}
+
+void QThread::setPriority(Priority priority)
+{
+ Q_D(QThread);
+ QMutexLocker locker(&d->mutex);
+ if (!d->running) {
+ qWarning("QThread::setPriority: Cannot set priority, thread is not running");
+ return;
+ }
+
+ d->priority = priority;
+
+ // copied from start() with a few modifications:
+ TThreadPriority symPriority = calculateSymbianPriority(priority);
+ d->data->symbian_thread_handle.SetPriority(symPriority);
+}
+
+#endif // QT_NO_THREAD
+
+QT_END_NAMESPACE
+
diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp
index 787c909..a8c5924 100644
--- a/src/corelib/thread/qthread_unix.cpp
+++ b/src/corelib/thread/qthread_unix.cpp
@@ -48,16 +48,7 @@
# include "../kernel/qeventdispatcher_glib_p.h"
#endif
-#ifdef Q_OS_SYMBIAN
-#include <private/qeventdispatcher_symbian_p.h>
-#else
#include <private/qeventdispatcher_unix_p.h>
-#endif
-
-#ifdef Q_OS_SYMBIAN
-#include <hal.h>
-#include <hal_data.h>
-#endif
#include "qthreadstorage.h"
@@ -68,12 +59,6 @@
#include <sched.h>
#include <errno.h>
-// You only find these enumerations on Symbian^3 onwards, so we need to provide our own
-// to remain compatible with older releases. They won't be called by pre-Sym^3 SDKs.
-
-// HALData::ENumCpus
-#define QT_HALData_ENumCpus 119
-
#ifdef Q_OS_BSD4
#include <sys/sysctl.h>
#endif
@@ -183,57 +168,23 @@ Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key)
// Utility functions for getting, setting and clearing thread specific data.
-// In Symbian, TLS access is significantly faster than pthread_getspecific.
-// However Symbian does not have the thread destruction cleanup functionality
-// that pthread has, so pthread_setspecific is also used.
static QThreadData *get_thread_data()
{
-#ifdef HAVE_TLS
- return currentThreadData;
-#elif defined Q_OS_SYMBIAN
- return reinterpret_cast<QThreadData *>(Dll::Tls());
-#else
pthread_once(&current_thread_data_once, create_current_thread_data_key);
return reinterpret_cast<QThreadData *>(pthread_getspecific(current_thread_data_key));
-#endif
}
static void set_thread_data(QThreadData *data)
{
-#ifdef HAVE_TLS
- currentThreadData = data;
-#elif defined Q_OS_SYMBIAN
- qt_symbian_throwIfError(Dll::SetTls(data));
-#endif
pthread_once(&current_thread_data_once, create_current_thread_data_key);
pthread_setspecific(current_thread_data_key, data);
}
static void clear_thread_data()
{
-#ifdef HAVE_TLS
- currentThreadData = 0;
-#elif defined Q_OS_SYMBIAN
- Dll::FreeTls();
-#endif
pthread_setspecific(current_thread_data_key, 0);
}
-
-#ifdef Q_OS_SYMBIAN
-static void init_symbian_thread_handle(RThread &thread)
-{
- thread = RThread();
- TThreadId threadId = thread.Id();
- thread.Open(threadId);
-
- // Make thread handle accessible process wide
- RThread originalCloser = thread;
- thread.Duplicate(thread, EOwnerProcess);
- originalCloser.Close();
-}
-#endif
-
QThreadData *QThreadData::current()
{
QThreadData *data = get_thread_data();
@@ -273,9 +224,6 @@ void QAdoptedThread::init()
{
Q_D(QThread);
d->thread_id = pthread_self();
-#ifdef Q_OS_SYMBIAN
- init_symbian_thread_handle(d->data->symbian_thread_handle);
-#endif
}
/*
@@ -303,11 +251,7 @@ void QThreadPrivate::createEventDispatcher(QThreadData *data)
data->eventDispatcher = new QEventDispatcherGlib;
else
#endif
-#ifdef Q_OS_SYMBIAN
- data->eventDispatcher = new QEventDispatcherSymbian;
-#else
- data->eventDispatcher = new QEventDispatcherUNIX;
-#endif
+ data->eventDispatcher = new QEventDispatcherUNIX;
data->eventDispatcher->startingUp();
}
@@ -315,11 +259,8 @@ void QThreadPrivate::createEventDispatcher(QThreadData *data)
void *QThreadPrivate::start(void *arg)
{
- // Symbian Open C supports neither thread cancellation nor cleanup_push.
-#ifndef Q_OS_SYMBIAN
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, NULL);
pthread_cleanup_push(QThreadPrivate::finish, arg);
-#endif
QThread *thr = reinterpret_cast<QThread *>(arg);
QThreadData *data = QThreadData::get2(thr);
@@ -358,35 +299,22 @@ void *QThreadPrivate::start(void *arg)
createEventDispatcher(data);
emit thr->started();
-#ifndef Q_OS_SYMBIAN
pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL);
pthread_testcancel();
-#endif
thr->run();
-#ifdef Q_OS_SYMBIAN
- QThreadPrivate::finish(arg);
-#else
pthread_cleanup_pop(1);
-#endif
return 0;
}
-#ifdef Q_OS_SYMBIAN
-void QThreadPrivate::finish(void *arg, bool lockAnyway, bool closeNativeHandle)
-#else
void QThreadPrivate::finish(void *arg)
-#endif
{
QThread *thr = reinterpret_cast<QThread *>(arg);
QThreadPrivate *d = thr->d_func();
-#ifdef Q_OS_SYMBIAN
- QMutexLocker locker(lockAnyway ? &d->mutex : 0);
-#else
QMutexLocker locker(&d->mutex);
-#endif
+
d->isInFinish = true;
d->priority = QThread::InheritPriority;
bool terminated = d->terminated;
@@ -410,10 +338,6 @@ void QThreadPrivate::finish(void *arg)
}
d->thread_id = 0;
-#ifdef Q_OS_SYMBIAN
- if (closeNativeHandle)
- d->data->symbian_thread_handle.Close();
-#endif
d->running = false;
d->finished = true;
@@ -471,21 +395,6 @@ int QThread::idealThreadCount()
#elif defined(Q_OS_INTEGRITY)
// as of aug 2008 Integrity only supports one single core CPU
cores = 1;
-#elif defined(Q_OS_SYMBIAN)
- if (QSysInfo::symbianVersion() >= QSysInfo::SV_SF_3) {
- TInt inumcpus;
- TInt err;
- err = HAL::Get((HALData::TAttribute)QT_HALData_ENumCpus, inumcpus);
- if (err != KErrNone) {
- cores = 1;
- } else if ( inumcpus <= 0 ) {
- cores = 1;
- } else {
- cores = inumcpus;
- }
- } else {
- cores = 1;
- }
#elif defined(Q_OS_VXWORKS)
// VxWorks
# if defined(QT_VXWORKS_HAS_CPUSET)
@@ -626,8 +535,7 @@ void QThread::start(Priority priority)
d->priority = priority;
-#if defined(QT_HAS_THREAD_PRIORITY_SCHEDULING) && !defined(Q_OS_SYMBIAN)
-// ### Need to implement thread sheduling and priorities for symbian os. Implementation removed for now
+#if defined(QT_HAS_THREAD_PRIORITY_SCHEDULING)
switch (priority) {
case InheritPriority:
{
@@ -669,12 +577,6 @@ void QThread::start(Priority priority)
}
#endif // QT_HAS_THREAD_PRIORITY_SCHEDULING
-#ifdef Q_OS_SYMBIAN
- if (d->stackSize == 0)
- // The default stack size on Symbian is very small, making even basic
- // operations like file I/O fail, so we increase it by default.
- d->stackSize = 0x14000; // Maximum stack size on Symbian.
-#endif
if (d->stackSize > 0) {
#if defined(_POSIX_THREAD_ATTR_STACKSIZE) && (_POSIX_THREAD_ATTR_STACKSIZE-0 > 0)
@@ -700,9 +602,7 @@ void QThread::start(Priority priority)
if (code == EPERM) {
// caller does not have permission to set the scheduling
// parameters/policy
-#ifndef Q_OS_SYMBIAN
pthread_attr_setinheritsched(&attr, PTHREAD_INHERIT_SCHED);
-#endif
code =
pthread_create(&d->thread_id, &attr, QThreadPrivate::start, this);
}
@@ -715,9 +615,6 @@ void QThread::start(Priority priority)
d->running = false;
d->finished = false;
d->thread_id = 0;
-#ifdef Q_OS_SYMBIAN
- d->data->symbian_thread_handle.Close();
-#endif
}
}
@@ -729,7 +626,6 @@ void QThread::terminate()
if (!d->thread_id)
return;
-#ifndef Q_OS_SYMBIAN
int code = pthread_cancel(d->thread_id);
if (code) {
qWarning("QThread::start: Thread termination error: %s",
@@ -737,26 +633,6 @@ void QThread::terminate()
} else {
d->terminated = true;
}
-#else
- if (!d->running)
- return;
- if (!d->terminationEnabled) {
- d->terminatePending = true;
- return;
- }
-
- d->terminated = true;
- // "false, false" meaning:
- // 1. lockAnyway = false. Don't lock the mutex because it's already locked
- // (see above).
- // 2. closeNativeSymbianHandle = false. We don't want to close the thread handle,
- // because we need it here to terminate the thread.
- QThreadPrivate::finish(this, false, false);
- d->data->symbian_thread_handle.Terminate(KErrNone);
- d->data->symbian_thread_handle.Close();
-#endif
-
-
}
bool QThread::wait(unsigned long time)
@@ -773,18 +649,6 @@ bool QThread::wait(unsigned long time)
return true;
while (d->running) {
-#ifdef Q_OS_SYMBIAN
- // Check if thread still exists. Needed because kernel will kill it without notification
- // before global statics are deleted at application exit.
- if (d->data->symbian_thread_handle.Handle()
- && d->data->symbian_thread_handle.ExitType() != EExitPending) {
- // Cannot call finish here as wait is typically called from another thread.
- // It won't be necessary anyway, as we should never get here under normal operations;
- // all QThreads are EProcessCritical and therefore cannot normally exit
- // undetected (i.e. panic) as long as all thread control is via QThread.
- return true;
- }
-#endif
if (!d->thread_done.wait(locker.mutex(), time))
return false;
}
@@ -796,25 +660,11 @@ void QThread::setTerminationEnabled(bool enabled)
QThread *thr = currentThread();
Q_ASSERT_X(thr != 0, "QThread::setTerminationEnabled()",
"Current thread was not started with QThread.");
-#ifndef Q_OS_SYMBIAN
+
Q_UNUSED(thr)
pthread_setcancelstate(enabled ? PTHREAD_CANCEL_ENABLE : PTHREAD_CANCEL_DISABLE, NULL);
if (enabled)
pthread_testcancel();
-#else
- QThreadPrivate *d = thr->d_func();
- QMutexLocker locker(&d->mutex);
- d->terminationEnabled = enabled;
- if (enabled && d->terminatePending) {
- d->terminated = true;
- // "false" meaning:
- // - lockAnyway = false. Don't lock the mutex because it's already locked
- // (see above).
- QThreadPrivate::finish(thr, false);
- locker.unlock(); // don't leave the mutex locked!
- pthread_exit(NULL);
- }
-#endif
}
void QThread::setPriority(Priority priority)
diff --git a/src/corelib/thread/qwaitcondition_symbian.cpp b/src/corelib/thread/qwaitcondition_symbian.cpp
new file mode 100644
index 0000000..9967382
--- /dev/null
+++ b/src/corelib/thread/qwaitcondition_symbian.cpp
@@ -0,0 +1,196 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include "qplatformdefs.h"
+#include "qwaitcondition.h"
+#include "qmutex.h"
+#include "qreadwritelock.h"
+#include "qatomic.h"
+#include "qstring.h"
+#include "qelapsedtimer.h"
+
+#include "qmutex_p.h"
+#include "qreadwritelock_p.h"
+
+#ifndef QT_NO_THREAD
+
+QT_BEGIN_NAMESPACE
+
+static void report_error(int err, const char *where, const char *what)
+{
+ if (err != KErrNone)
+ qWarning("%s: %s failure: %d", where, what, err);
+}
+
+class QWaitConditionPrivate {
+public:
+ RMutex mutex;
+ RCondVar cond;
+ int waiters;
+ int wakeups;
+
+ QWaitConditionPrivate()
+ : waiters(0), wakeups(0)
+ {
+ qt_symbian_throwIfError(mutex.CreateLocal());
+ int err = cond.CreateLocal();
+ if (err != KErrNone) {
+ mutex.Close();
+ qt_symbian_throwIfError(err);
+ }
+ }
+
+ ~QWaitConditionPrivate()
+ {
+ cond.Close();
+ mutex.Close();
+ }
+
+ bool wait(unsigned long time)
+ {
+ TInt err = KErrNone;
+ if (time == ULONG_MAX) {
+ // untimed wait, loop because RCondVar::Wait may return before the condition is triggered
+ do {
+ err = cond.Wait(mutex);
+ } while (err == KErrNone && wakeups == 0);
+ } else {
+ unsigned long maxWait = KMaxTInt / 1000;
+ QElapsedTimer waitTimer;
+ do {
+ waitTimer.start();
+ unsigned long waitTime = qMin(maxWait, time);
+ // wait at least 1ms, as 0 means no wait
+ err = cond.TimedWait(mutex, qMax(1ul, waitTime) * 1000);
+ // RCondVar::TimedWait may return before the condition is triggered, update the timeout with actual wait time
+ time -= qMin((unsigned long)waitTimer.elapsed(), waitTime);
+ } while ((err == KErrNone && wakeups == 0) || (err == KErrTimedOut && time > 0));
+ }
+
+ Q_ASSERT_X(waiters > 0, "QWaitCondition::wait", "internal error (waiters)");
+ --waiters;
+ if (err == KErrNone) {
+ Q_ASSERT_X(wakeups > 0, "QWaitCondition::wait", "internal error (wakeups)");
+ --wakeups;
+ }
+
+ mutex.Signal();
+
+ if (err && err != KErrTimedOut)
+ report_error(err, "QWaitCondition::wait()", "cv wait");
+ return err == KErrNone;
+ }
+};
+
+QWaitCondition::QWaitCondition()
+{
+ d = new QWaitConditionPrivate;
+}
+
+QWaitCondition::~QWaitCondition()
+{
+ delete d;
+}
+
+void QWaitCondition::wakeOne()
+{
+ d->mutex.Wait();
+ d->wakeups = qMin(d->wakeups + 1, d->waiters);
+ d->cond.Signal();
+ d->mutex.Signal();
+}
+
+void QWaitCondition::wakeAll()
+{
+ d->mutex.Wait();
+ d->wakeups = d->waiters;
+ d->cond.Broadcast();
+ d->mutex.Signal();
+}
+
+bool QWaitCondition::wait(QMutex *mutex, unsigned long time)
+{
+ if (! mutex)
+ return false;
+ if (mutex->d->recursive) {
+ qWarning("QWaitCondition: cannot wait on recursive mutexes");
+ return false;
+ }
+
+ d->mutex.Wait();
+ ++d->waiters;
+ mutex->unlock();
+
+ bool returnValue = d->wait(time);
+
+ mutex->lock();
+
+ return returnValue;
+}
+
+bool QWaitCondition::wait(QReadWriteLock *readWriteLock, unsigned long time)
+{
+ if (!readWriteLock || readWriteLock->d->accessCount == 0)
+ return false;
+ if (readWriteLock->d->accessCount < -1) {
+ qWarning("QWaitCondition: cannot wait on QReadWriteLocks with recursive lockForWrite()");
+ return false;
+ }
+
+ d->mutex.Wait();
+ ++d->waiters;
+
+ int previousAccessCount = readWriteLock->d->accessCount;
+ readWriteLock->unlock();
+
+ bool returnValue = d->wait(time);
+
+ if (previousAccessCount < 0)
+ readWriteLock->lockForWrite();
+ else
+ readWriteLock->lockForRead();
+
+ return returnValue;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_THREAD
diff --git a/src/corelib/thread/qwaitcondition_unix.cpp b/src/corelib/thread/qwaitcondition_unix.cpp
index f06a158..d0f23b5 100644
--- a/src/corelib/thread/qwaitcondition_unix.cpp
+++ b/src/corelib/thread/qwaitcondition_unix.cpp
@@ -61,8 +61,6 @@ static void report_error(int code, const char *where, const char *what)
qWarning("%s: %s failure: %s", where, what, qPrintable(qt_error_string(code)));
}
-
-
class QWaitConditionPrivate {
public:
pthread_mutex_t mutex;
diff --git a/src/corelib/thread/thread.pri b/src/corelib/thread/thread.pri
index 90583bb..592ab16 100644
--- a/src/corelib/thread/thread.pri
+++ b/src/corelib/thread/thread.pri
@@ -4,11 +4,11 @@
HEADERS += thread/qmutex.h \
thread/qreadwritelock.h \
thread/qsemaphore.h \
- thread/qthread.h \
- thread/qthreadstorage.h \
- thread/qwaitcondition.h \
- thread/qatomic.h
-
+ thread/qthread.h \
+ thread/qthreadstorage.h \
+ thread/qwaitcondition.h \
+ thread/qatomic.h
+
# private headers
HEADERS += thread/qmutex_p.h \
thread/qmutexpool_p.h \
@@ -19,14 +19,18 @@ HEADERS += thread/qmutex_p.h \
SOURCES += thread/qatomic.cpp \
thread/qmutex.cpp \
thread/qreadwritelock.cpp \
- thread/qmutexpool.cpp \
- thread/qsemaphore.cpp \
- thread/qthread.cpp \
- thread/qthreadstorage.cpp
+ thread/qmutexpool.cpp \
+ thread/qsemaphore.cpp \
+ thread/qthread.cpp \
+ thread/qthreadstorage.cpp
-unix:SOURCES += thread/qmutex_unix.cpp \
- thread/qthread_unix.cpp \
- thread/qwaitcondition_unix.cpp
+unix:!symbian:SOURCES += thread/qmutex_unix.cpp \
+ thread/qthread_unix.cpp \
+ thread/qwaitcondition_unix.cpp
+
+symbian:SOURCES += thread/qmutex_symbian.cpp \
+ thread/qthread_symbian.cpp \
+ thread/qwaitcondition_symbian.cpp
win32:SOURCES += thread/qmutex_win.cpp \
thread/qthread_win.cpp \
diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc
index 34918a3..a9b7ddc 100644
--- a/src/corelib/tools/qalgorithms.qdoc
+++ b/src/corelib/tools/qalgorithms.qdoc
@@ -60,14 +60,14 @@
a particular value. If you need that functionality, you can use
qFill():
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 0
qFill() takes a begin iterator, an end iterator, and a value.
In the example above, we pass \c list.begin() and \c list.end()
as the begin and end iterators, but this doesn't have to be
the case:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 1
Different algorithms can have different requirements for the
iterators they accept. For example, qFill() accepts two
@@ -98,13 +98,13 @@
name_table array and return the corresponding Unicode value from
the \c value_table if the entity is recognized:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 2
This kind of code is for advanced users only; for most
applications, a QMap- or QHash-based approach would work just as
well:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 3
\section1 Types of Iterators
@@ -185,7 +185,7 @@
position \a begin2 + 1; and so on.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 4
\sa qCopyBackward(), {input iterators}, {output iterators}
*/
@@ -201,7 +201,7 @@
at position \a end2 - 2; and so on.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 5
\sa qCopy(), {bidirectional iterators}
*/
@@ -214,7 +214,7 @@
items compare equal; otherwise returns false.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 6
This function requires the item type (in the example above,
QString) to implement \c operator==().
@@ -228,7 +228,7 @@
Fills the range [\a begin, \a end) with \a value.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 7
\sa qCopy(), {forward iterators}
*/
@@ -249,7 +249,7 @@
value isn't found.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 8
This function requires the item type (in the example above,
QString) to implement \c operator==().
@@ -278,7 +278,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 9
This function requires the item type (in the example above,
\c int) to implement \c operator==().
@@ -302,7 +302,7 @@ of \a value in the variable passed as a reference in argument \a n.
Exchanges the values of variables \a var1 and \a var2.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 10
*/
/*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end)
@@ -312,7 +312,7 @@ of \a value in the variable passed as a reference in argument \a n.
using the quicksort algorithm.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 11
The sort algorithm is efficient on large data sets. It operates
in \l {linear-logarithmic time}, O(\e{n} log \e{n}).
@@ -338,13 +338,13 @@ of \a value in the variable passed as a reference in argument \a n.
For example, here's how to sort the strings in a QStringList
in case-insensitive alphabetical order:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 12
To sort values in reverse order, pass
\l{qGreater()}{qGreater<T>()} as the \a lessThan parameter. For
example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 13
If neither of the two items is "less than" the other, the items are
taken to be equal. It is then undefined which one of the two
@@ -356,7 +356,7 @@ of \a value in the variable passed as a reference in argument \a n.
following code shows how to sort a list of strings case
insensitively using QMap:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 14
\sa QMap
*/
@@ -382,7 +382,7 @@ of \a value in the variable passed as a reference in argument \a n.
property is often useful when sorting user-visible data.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 15
The sort algorithm is efficient on large data sets. It operates
in \l {linear-logarithmic time}, O(\e{n} log \e{n}).
@@ -405,7 +405,7 @@ of \a value in the variable passed as a reference in argument \a n.
For example, here's how to sort the strings in a QStringList
in case-insensitive alphabetical order:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 16
Note that earlier versions of Qt allowed using a lessThan function that took its
arguments by non-const reference. From 4.3 and on this is no longer possible,
@@ -415,7 +415,7 @@ of \a value in the variable passed as a reference in argument \a n.
\l{qGreater()}{qGreater<T>()} as the \a lessThan parameter. For
example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 17
If neither of the two items is "less than" the other, the items are
taken to be equal. The item that appeared before the other in the
@@ -444,7 +444,7 @@ of \a value in the variable passed as a reference in argument \a n.
ascending order; see qSort().
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 18
This function requires the item type (in the example above,
\c{int}) to implement \c operator<().
@@ -452,7 +452,7 @@ of \a value in the variable passed as a reference in argument \a n.
qLowerBound() can be used in conjunction with qUpperBound() to
iterate over all occurrences of the same value:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 19
\sa qUpperBound(), qBinaryFind()
*/
@@ -494,7 +494,7 @@ of \a value in the variable passed as a reference in argument \a n.
ascending order; see qSort().
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 20
This function requires the item type (in the example above,
\c{int}) to implement \c operator<().
@@ -502,7 +502,7 @@ of \a value in the variable passed as a reference in argument \a n.
qUpperBound() can be used in conjunction with qLowerBound() to
iterate over all occurrences of the same value:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 21
\sa qLowerBound(), qBinaryFind()
*/
@@ -545,7 +545,7 @@ of \a value in the variable passed as a reference in argument \a n.
finer control.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 22
This function requires the item type (in the example above,
QString) to implement \c operator<().
@@ -587,7 +587,7 @@ of \a value in the variable passed as a reference in argument \a n.
example, \c{QWidget *}).
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 23
Notice that qDeleteAll() doesn't remove the items from the
container; it merely calls \c delete on them. In the example
@@ -618,7 +618,7 @@ of \a value in the variable passed as a reference in argument \a n.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 24
\sa {qGreater()}{qGreater<T>()}
*/
@@ -631,7 +631,7 @@ of \a value in the variable passed as a reference in argument \a n.
Example:
- \snippet doc/src/snippets/code/doc_src_qalgorithms.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qalgorithms.cpp 25
\sa {qLess()}{qLess<T>()}
*/
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index 4799abd..1c9b654 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1387,7 +1387,7 @@ QByteArray::QByteArray(int size, Qt::Initialization)
If \a size is less than the current size, bytes are removed from
the end.
- \sa size()
+ \sa size(), truncate()
*/
void QByteArray::resize(int size)
diff --git a/src/corelib/tools/qcache.qdoc b/src/corelib/tools/qcache.qdoc
index 991238b..9e12c92 100644
--- a/src/corelib/tools/qcache.qdoc
+++ b/src/corelib/tools/qcache.qdoc
@@ -39,11 +39,11 @@
definition of a cache that stores objects of type Employee
associated with an integer key:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 0
Here's how to insert an object in the cache:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 1
The advantage of using QCache over some other key-based data
structure (such as QMap or QHash) is that QCache automatically
@@ -59,7 +59,7 @@
By default, QCache's maxCost() is 100. You can specify a
different value in the QCache constructor:
- \snippet doc/src/snippets/code/doc_src_qcache.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qcache.cpp 2
Each time you call insert(), you can specify a cost as third
argument (after the key and a pointer to the object to insert).
diff --git a/src/corelib/tools/qiterator.qdoc b/src/corelib/tools/qiterator.qdoc
index d651343..6830442 100644
--- a/src/corelib/tools/qiterator.qdoc
+++ b/src/corelib/tools/qiterator.qdoc
@@ -50,7 +50,7 @@
the list (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 0
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -65,7 +65,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 1
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -98,7 +98,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 2
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -113,7 +113,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 3
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -150,7 +150,7 @@
of the vector (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 4
The next() function returns the next item in the vector and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -165,7 +165,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 5
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -197,7 +197,7 @@
the first item). Here's how to iterate over all the elements
sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 6
The next() function returns the next item in the set and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -212,7 +212,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 7
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -251,7 +251,7 @@
of the list (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 8
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -266,7 +266,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 9
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -277,7 +277,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 10
The example traverses a list, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -312,7 +312,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 11
The next() function returns the next item in the list and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -327,7 +327,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 12
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -338,7 +338,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 13
The example traverses a list, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -378,7 +378,7 @@
beginning of the list (before the first item). Here's how to
iterate over all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 14
The next() function returns the next item in the vector and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -393,7 +393,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 15
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop.
@@ -404,7 +404,7 @@
insert().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 16
The example traverses a vector, replacing negative numbers with
their absolute values, and eliminating zeroes.
@@ -440,7 +440,7 @@
of the set (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 17
The next() function returns the next item in the set and
advances the iterator. Unlike STL-style iterators, Java-style
@@ -455,7 +455,7 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 18
If you want to remove items as you iterate over the set, use
remove().
@@ -755,7 +755,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 19
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 19
\sa insert(), setValue()
*/
@@ -766,7 +766,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 20
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 20
\sa insert(), setValue()
*/
@@ -777,7 +777,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 21
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 21
\sa insert(), setValue()
*/
@@ -788,7 +788,7 @@
traversal functions (next(), previous(), findNext(), findPrevious()).
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 22
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 22
\sa value()
*/
@@ -802,7 +802,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 23
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 23
\sa value(), remove(), insert()
*/
@@ -816,7 +816,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 24
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 24
\sa value(), remove(), insert()
*/
@@ -830,7 +830,7 @@
findPrevious().
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 25
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 25
\sa value(), remove(), insert()
*/
@@ -889,7 +889,7 @@
the map (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 26
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 26
The next() function returns the next item in the map and
advances the iterator. The key() and value() functions return the
@@ -906,12 +906,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 27
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 27
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 28
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 28
Multiple iterators can be used on the same map. If the map is
modified while a QMapIterator is active, the QMapIterator will
@@ -941,7 +941,7 @@
the hash (before the first item). Here's how to iterate over all
the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 29
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 29
The next() function returns the next item in the hash and
advances the iterator. The key() and value() functions return the
@@ -958,12 +958,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 30
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 30
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 31
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 31
Multiple iterators can be used on the same hash. If the hash is
modified while a QHashIterator is active, the QHashIterator will
@@ -994,7 +994,7 @@
of the map (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 32
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 32
The next() function returns the next item in the map and
advances the iterator. The key() and value() functions return the
@@ -1011,12 +1011,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 33
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 33
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 34
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 34
If you want to remove items as you iterate over the map, use
remove(). If you want to modify the value of an item, use
@@ -1024,7 +1024,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 35
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 35
The example removes all (key, value) pairs where the key and the
value are the same.
@@ -1059,7 +1059,7 @@
of the hash (before the first item). Here's how to iterate over
all the elements sequentially:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 36
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 36
The next() function returns the next item in the hash and
advances the iterator. The key() and value() functions return the
@@ -1076,12 +1076,12 @@
Here's how to iterate over the elements in reverse order:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 37
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 37
If you want to find all occurrences of a particular value, use
findNext() or findPrevious() in a loop. For example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 38
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 38
If you want to remove items as you iterate over the hash, use
remove(). If you want to modify the value of an item, use
@@ -1089,7 +1089,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qiterator.qdoc 39
+ \snippet doc/src/snippets/code/doc_src_qiterator.cpp 39
The example removes all (key, value) pairs where the key and the
value are the same.
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index c548663..9e13fcc 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -1087,7 +1087,7 @@ void QMapData::dump()
\overload
- The prefix -- operator (\c{--i}) makes the preceding item
+ The postfix -- operator (\c{i--}) makes the preceding item
current and returns an iterator pointing to the previously
current item.
*/
diff --git a/src/corelib/tools/qpair.qdoc b/src/corelib/tools/qpair.qdoc
index b900c4f..925100d 100644
--- a/src/corelib/tools/qpair.qdoc
+++ b/src/corelib/tools/qpair.qdoc
@@ -40,12 +40,12 @@
Here's an example of a QPair that stores one QString and one \c
double value:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 0
The components are accessible as public data members called \l
first and \l second. For example:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 1
QPair's template data types (T1 and T2) must be \l{assignable
data types}. You cannot, for example, store a QWidget as a value;
@@ -186,7 +186,7 @@
Returns a QPair\<T1, T2\> that contains \a value1 and \a value2.
Example:
- \snippet doc/src/snippets/code/doc_src_qpair.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qpair.cpp 2
This is equivalent to QPair<T1, T2>(\a value1, \a value2), but
usually requires less typing.
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index 30880d5..8748fd9 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -40,19 +40,19 @@
Here's an example QSet with QString values:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 0
To insert a value into the set, use insert():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 1
Another way to insert items into the set is to use operator<<():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 2
To test whether an item belongs to the set or not, use contains():
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 3
If you want to navigate through all the values stored in a QSet,
you can use an iterator. QSet supports both \l{Java-style
@@ -60,18 +60,18 @@
iterators} (QSet::iterator and QSet::const_iterator). Here's how
to iterate over a QSet<QWidget *> using a Java-style iterator:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 4
Here's the same code, but using an STL-style iterator:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 5
QSet is unordered, so an iterator's sequence cannot be assumed to
be predictable. If ordering by key is required, use a QMap.
To navigate through a QSet, you can also use \l{foreach}:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 6
Items can be removed from the set using remove(). There is also a
clear() function that removes all items.
@@ -194,7 +194,7 @@
This function is useful for code that needs to build a huge set
and wants to avoid repeated reallocation. For example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 7
Ideally, \a size should be slightly more than the maximum number
of elements expected in the set. \a size doesn't have to be prime,
@@ -610,18 +610,18 @@
start iterating. Here's a typical loop that prints all the items
stored in a set:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 8
Here's a loop that removes certain items (all those that start
with 'J') from a set while iterating:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 9
STL-style iterators can be used as arguments to \l{generic
algorithms}. For example, here's how to find an item in the set
using the qFind() algorithm:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 10
Multiple iterators can be used on the same set. However, you may
not attempt to modify the container while iterating on it.
@@ -653,13 +653,13 @@
start iterating. Here's a typical loop that prints all the items
stored in a set:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 11
STL-style iterators can be used as arguments to \l{generic
algorithms}. For example, here's how to find an item in the set
using the qFind() algorithm:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 12
Multiple iterators can be used on the same set. However, you may
not attempt to modify the container while iterating on it.
@@ -893,7 +893,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 13
\sa fromList(), QList::fromSet(), qSort()
*/
@@ -918,7 +918,7 @@
Example:
- \snippet doc/src/snippets/code/doc_src_qset.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qset.cpp 14
\sa toList(), QList::toSet()
*/
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp
index c2bb094..34bc406 100644
--- a/src/corelib/tools/qtextboundaryfinder.cpp
+++ b/src/corelib/tools/qtextboundaryfinder.cpp
@@ -457,33 +457,23 @@ QTextBoundaryFinder::BoundaryReasons QTextBoundaryFinder::boundaryReasons() cons
return NotAtBoundary;
return StartWord;
}
- if (pos >= length - 1) {
+ if (pos == length) {
if (d->attributes[length-1].whiteSpace)
return NotAtBoundary;
return EndWord;
}
- BoundaryReasons answer;
- const bool nextIsSpace = d->attributes[pos + 1].whiteSpace;
+ const bool nextIsSpace = d->attributes[pos].whiteSpace;
const bool prevIsSpace = d->attributes[pos - 1].whiteSpace;
- if (d->attributes[pos].whiteSpace)
- answer = EndWord;
- else if (!prevIsSpace) {
- answer = StartWord;
- answer |= EndWord;
- }
-
- if (prevIsSpace)
- answer |= StartWord;
- if (nextIsSpace)
- answer |= EndWord;
- if (answer == 0) {
- answer = StartWord;
- answer |= EndWord;
- }
-
- return answer;
+ if (prevIsSpace && !nextIsSpace)
+ return StartWord;
+ else if (!prevIsSpace && nextIsSpace)
+ return EndWord;
+ else if (!prevIsSpace && !nextIsSpace)
+ return BoundaryReasons(StartWord | EndWord);
+ else
+ return NotAtBoundary;
}
QT_END_NAMESPACE
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index 957bca7..3c80c1c 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -35,12 +35,12 @@
The C++ language doesn't support variable-length arrays on the stack.
For example, the following code won't compile:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 0
The alternative is to allocate the array on the heap (with
\c{new}):
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 1
However, if myfunc() is called very frequently from the
application's inner loop, heap allocation can be a major source
@@ -53,7 +53,7 @@
it is much faster than heap allocation.
Example:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 2
In the example above, QVarLengthArray will preallocate 1024
elements on the stack and use them unless \c{n + 1} is greater
@@ -223,7 +223,7 @@
be used to access and modify the items in the array.
Example:
- \snippet doc/src/snippets/code/doc_src_qvarlengtharray.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qvarlengtharray.cpp 3
The pointer remains valid as long as the array isn't reallocated.
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 8f37e90..45a03a0 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -300,7 +300,7 @@ void QDeclarativeBorderImage::load()
}
if (d->url.isEmpty()) {
- d->pix.clear();
+ d->pix.clear(this);
d->status = Null;
setImplicitWidth(0);
setImplicitHeight(0);
@@ -340,6 +340,7 @@ void QDeclarativeBorderImage::load()
options |= QDeclarativePixmap::Asynchronous;
if (d->cache)
options |= QDeclarativePixmap::Cache;
+ d->pix.clear(this);
d->pix.load(qmlEngine(this), d->url, options);
if (d->pix.isLoading()) {
@@ -472,6 +473,7 @@ void QDeclarativeBorderImage::setGridScaledImage(const QDeclarativeGridScaledIma
options |= QDeclarativePixmap::Asynchronous;
if (d->cache)
options |= QDeclarativePixmap::Cache;
+ d->pix.clear(this);
d->pix.load(qmlEngine(this), d->sciurl, options);
if (d->pix.isLoading()) {
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index bfebff6..566d025 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -399,7 +399,7 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage flickable.gif
\enddiv
@@ -1318,7 +1318,9 @@ void QDeclarativeFlickable::resizeContent(qreal w, qreal h, QPointF center)
Q_D(QDeclarativeFlickable);
if (w != d->hData.viewSize) {
qreal oldSize = d->hData.viewSize;
- setContentWidth(w);
+ d->hData.viewSize = w;
+ d->contentItem->setWidth(w);
+ emit contentWidthChanged();
if (center.x() != 0) {
qreal pos = center.x() * w / oldSize;
setContentX(contentX() + pos - center.x());
@@ -1326,12 +1328,15 @@ void QDeclarativeFlickable::resizeContent(qreal w, qreal h, QPointF center)
}
if (h != d->vData.viewSize) {
qreal oldSize = d->vData.viewSize;
- setContentHeight(h);
+ d->vData.viewSize = h;
+ d->contentItem->setHeight(h);
+ emit contentHeightChanged();
if (center.y() != 0) {
qreal pos = center.y() * h / oldSize;
setContentY(contentY() + pos - center.y());
}
}
+ d->updateBeginningEnd();
}
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
index 5fda758..d23374b 100644
--- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp
@@ -86,13 +86,13 @@ public:
The following example shows a Flipable item that flips whenever it is
clicked, rotating about the y-axis.
- This flipable item has a \c flipped boolean property that is toggled
- whenever the MouseArea within the flipable is clicked. When
- \c flipped is true, the item changes to the "back" state; in this
+ This flipable item has a \c flipped boolean property that is toggled
+ whenever the MouseArea within the flipable is clicked. When
+ \c flipped is true, the item changes to the "back" state; in this
state, the \c angle of the \l Rotation item is changed to 180
degrees to produce the flipping effect. When \c flipped is false, the
- item reverts to the default state, in which the \c angle value is 0.
-
+ item reverts to the default state, in which the \c angle value is 0.
+
\snippet doc/src/snippets/declarative/flipable/flipable.qml 0
\image flipable.gif
@@ -103,8 +103,8 @@ public:
its old and new values.
See \l {QML States} for details on state changes and the default
- state, and \l {QML Animation} for more information on how animations
- work within transitions.
+ state, and \l {QML Animation and Transitions} for more information on how
+ animations work within transitions.
\sa {declarative/ui-components/flipable}{Flipable example}
*/
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 0cbe1ac..ce47d88 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -197,6 +197,7 @@ public:
if (q->isComponentComplete()) {
clear();
updateGrid();
+ setPosition(0);
q->refill();
updateCurrent(currentIndex);
}
@@ -689,7 +690,6 @@ void QDeclarativeGridViewPrivate::updateGrid()
q->setContentHeight(endPosition() - startPosition());
else
q->setContentWidth(lastPosition() - originPosition());
- setPosition(0);
}
}
@@ -1246,7 +1246,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0
- \div {float-right}
+ \div {class="float-right"}
\inlineimage gridview-simple.png
\enddiv
@@ -1262,7 +1262,7 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\codeline
\snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple
- \div {float-right}
+ \div {class="float-right"}
\inlineimage gridview-highlight.png
\enddiv
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index ed5d5fc..a62d3d2 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -377,6 +377,9 @@ qreal QDeclarativeImage::paintedHeight() const
If the source is a non-scalable image (eg. JPEG), the loaded image will
be no greater than this property specifies. For some formats (currently only JPEG),
the whole image will never actually be loaded into memory.
+
+ Since QtQuick 1.1 the sourceSize can be cleared to the natural size of the image
+ by setting sourceSize to \c undefined.
\note \e {Changing this property dynamically causes the image source to be reloaded,
potentially even from the network, if it is not in the disk cache.}
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
index 2de3ba0..daebac4 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
@@ -133,6 +133,18 @@ QSize QDeclarativeImageBase::sourceSize() const
return QSize(width != -1 ? width : d->pix.width(), height != -1 ? height : d->pix.height());
}
+void QDeclarativeImageBase::resetSourceSize()
+{
+ Q_D(QDeclarativeImageBase);
+ if (!d->explicitSourceSize)
+ return;
+ d->explicitSourceSize = false;
+ d->sourcesize = QSize();
+ emit sourceSizeChanged();
+ if (isComponentComplete())
+ load();
+}
+
bool QDeclarativeImageBase::cache() const
{
Q_D(const QDeclarativeImageBase);
@@ -176,7 +188,7 @@ void QDeclarativeImageBase::load()
Q_D(QDeclarativeImageBase);
if (d->url.isEmpty()) {
- d->pix.clear();
+ d->pix.clear(this);
d->status = Null;
d->progress = 0.0;
setImplicitWidth(0);
@@ -191,6 +203,7 @@ void QDeclarativeImageBase::load()
options |= QDeclarativePixmap::Asynchronous;
if (d->cache)
options |= QDeclarativePixmap::Cache;
+ d->pix.clear(this);
d->pix.load(qmlEngine(this), d->url, d->explicitSourceSize ? sourceSize() : QSize(), options);
if (d->pix.isLoading()) {
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
index abee25d..1763bba 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h
@@ -59,7 +59,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeImageBase : public QDeclarativeImplicitSizeI
Q_PROPERTY(qreal progress READ progress NOTIFY progressChanged)
Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged)
Q_PROPERTY(bool cache READ cache WRITE setCache NOTIFY cacheChanged REVISION 1)
- Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize NOTIFY sourceSizeChanged)
+ Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize RESET resetSourceSize NOTIFY sourceSizeChanged)
Q_PROPERTY(bool mirror READ mirror WRITE setMirror NOTIFY mirrorChanged REVISION 1)
public:
@@ -80,6 +80,7 @@ public:
virtual void setSourceSize(const QSize&);
QSize sourceSize() const;
+ void resetSourceSize();
virtual void setMirror(bool mirror);
bool mirror() const;
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 4af91ce..6602dda 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -2747,7 +2747,7 @@ QDeclarativeListProperty<QDeclarativeState> QDeclarativeItemPrivate::states()
}
\endqml
- \sa {qdeclarativeanimation.html#transitions}{QML Transitions}
+ \sa {QML Animation and Transitions}{Transitions}
*/
@@ -3455,7 +3455,7 @@ qreal QDeclarativeItem::implicitHeight() const
Setting the implicit size is useful for defining components that have a preferred size
based on their content, for example:
- \code
+ \qml
// Label.qml
import QtQuick 1.1
@@ -3472,7 +3472,7 @@ qreal QDeclarativeItem::implicitHeight() const
anchors.verticalCenter: parent.verticalCenter
}
}
- \endcode
+ \endqml
\bold Note: using implicitWidth of Text or TextEdit and setting the width explicitly
incurs a performance penalty as the text must be laid out twice.
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index da11b00..f5145d0 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -216,7 +216,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage qml-mousearea-snippet.png
\enddiv
@@ -315,7 +315,7 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
The \e accepted property of the MouseEvent parameter is ignored in this handler.
- \sa onCanceled()
+ \sa onCanceled
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativepincharea.cpp b/src/declarative/graphicsitems/qdeclarativepincharea.cpp
index b09cb72..b5e13cb 100644
--- a/src/declarative/graphicsitems/qdeclarativepincharea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepincharea.cpp
@@ -138,6 +138,14 @@ QT_BEGIN_NAMESPACE
ignored.
*/
+/*!
+ \qmlproperty int PinchEvent::pointCount
+
+ Holds the number of points currently touched. The PinchArea will not react
+ until two touch points have initited a gesture, but will remain active until
+ all touch points have been released.
+*/
+
QDeclarativePinch::QDeclarativePinch()
: m_target(0), m_minScale(1.0), m_maxScale(1.0)
, m_minRotation(0.0), m_maxRotation(0.0)
@@ -295,7 +303,7 @@ bool QDeclarativePinchArea::event(QEvent *event)
void QDeclarativePinchArea::updatePinch()
{
Q_D(QDeclarativePinchArea);
- if (d->touchPoints.count() != 2) {
+ if (d->touchPoints.count() == 0) {
if (d->inPinch) {
d->stealMouse = false;
setKeepMouseGrab(false);
@@ -308,127 +316,141 @@ void QDeclarativePinchArea::updatePinch()
pe.setPreviousScale(d->pinchLastScale);
pe.setStartPoint1(mapFromScene(d->sceneStartPoint1));
pe.setStartPoint2(mapFromScene(d->sceneStartPoint2));
- pe.setPoint1(d->lastPoint1);
- pe.setPoint2(d->lastPoint2);
+ pe.setPoint1(mapFromScene(d->lastPoint1));
+ pe.setPoint2(mapFromScene(d->lastPoint2));
emit pinchFinished(&pe);
d->pinchStartDist = 0;
+ d->pinchActivated = false;
if (d->pinch && d->pinch->target())
d->pinch->setActive(false);
}
return;
}
- if (d->touchPoints.at(0).state() & Qt::TouchPointPressed
- || d->touchPoints.at(1).state() & Qt::TouchPointPressed) {
- d->sceneStartPoint1 = d->touchPoints.at(0).scenePos();
- d->sceneStartPoint2 = d->touchPoints.at(1).scenePos();
+ QTouchEvent::TouchPoint touchPoint1 = d->touchPoints.at(0);
+ QTouchEvent::TouchPoint touchPoint2 = d->touchPoints.at(d->touchPoints. count() >= 2 ? 1 : 0);
+ if (d->touchPoints.count() == 2
+ && (touchPoint1.state() & Qt::TouchPointPressed || touchPoint2.state() & Qt::TouchPointPressed)) {
+ d->id1 = touchPoint1.id();
+ d->sceneStartPoint1 = touchPoint1.scenePos();
+ d->sceneStartPoint2 = touchPoint2.scenePos();
d->inPinch = false;
d->pinchRejected = false;
- } else if (!d->pinchRejected){
- QDeclarativeItem *grabber = scene() ? qobject_cast<QDeclarativeItem*>(scene()->mouseGrabberItem()) : 0;
- if (grabber == this || !grabber || !grabber->keepMouseGrab()) {
- const int dragThreshold = QApplication::startDragDistance();
- QPointF p1 = d->touchPoints.at(0).scenePos();
- QPointF p2 = d->touchPoints.at(1).scenePos();
- qreal dx = p1.x() - p2.x();
- qreal dy = p1.y() - p2.y();
- qreal dist = sqrt(dx*dx + dy*dy);
- QPointF sceneCenter = (p1 + p2)/2;
- qreal angle = QLineF(p1, p2).angle();
- if (angle > 180)
- angle -= 360;
- if (!d->inPinch) {
- if (qAbs(p1.x()-d->sceneStartPoint1.x()) > dragThreshold
- || qAbs(p1.y()-d->sceneStartPoint1.y()) > dragThreshold
- || qAbs(p2.x()-d->sceneStartPoint2.x()) > dragThreshold
- || qAbs(p2.y()-d->sceneStartPoint2.y()) > dragThreshold) {
- d->sceneStartCenter = sceneCenter;
- d->sceneLastCenter = sceneCenter;
- d->pinchStartCenter = mapFromScene(sceneCenter);
- d->pinchStartDist = dist;
- d->pinchStartAngle = angle;
- d->pinchLastScale = 1.0;
- d->pinchLastAngle = angle;
- d->pinchRotation = 0.0;
- d->lastPoint1 = d->touchPoints.at(0).pos();
- d->lastPoint2 = d->touchPoints.at(1).pos();
- QDeclarativePinchEvent pe(d->pinchStartCenter, 1.0, angle, 0.0);
- pe.setStartCenter(d->pinchStartCenter);
- pe.setPreviousCenter(d->pinchStartCenter);
- pe.setPreviousAngle(d->pinchLastAngle);
- pe.setPreviousScale(d->pinchLastScale);
- pe.setStartPoint1(mapFromScene(d->sceneStartPoint1));
- pe.setStartPoint2(mapFromScene(d->sceneStartPoint2));
- pe.setPoint1(d->lastPoint1);
- pe.setPoint2(d->lastPoint2);
- emit pinchStarted(&pe);
- if (pe.accepted()) {
- d->inPinch = true;
- d->stealMouse = true;
- QGraphicsScene *s = scene();
- if (s && s->mouseGrabberItem() != this)
- grabMouse();
- setKeepMouseGrab(true);
- if (d->pinch && d->pinch->target()) {
- d->pinchStartPos = pinch()->target()->pos();
- d->pinchStartScale = d->pinch->target()->scale();
- d->pinchStartRotation = d->pinch->target()->rotation();
- d->pinch->setActive(true);
- }
- } else {
- d->pinchRejected = true;
- }
- }
- } else if (d->pinchStartDist > 0) {
- qreal scale = dist / d->pinchStartDist;
- qreal da = d->pinchLastAngle - angle;
- if (da > 180)
- da -= 360;
- else if (da < -180)
- da += 360;
- d->pinchRotation += da;
- QPointF pinchCenter = mapFromScene(sceneCenter);
- QDeclarativePinchEvent pe(pinchCenter, scale, angle, d->pinchRotation);
+ d->pinchActivated = true;
+ } else if (d->pinchActivated && !d->pinchRejected) {
+ const int dragThreshold = QApplication::startDragDistance();
+ QPointF p1 = touchPoint1.scenePos();
+ QPointF p2 = touchPoint2.scenePos();
+ qreal dx = p1.x() - p2.x();
+ qreal dy = p1.y() - p2.y();
+ qreal dist = sqrt(dx*dx + dy*dy);
+ QPointF sceneCenter = (p1 + p2)/2;
+ qreal angle = QLineF(p1, p2).angle();
+ if (d->touchPoints.count() == 1) {
+ // If we only have one point then just move the center
+ if (d->id1 == touchPoint1.id())
+ sceneCenter = d->sceneLastCenter + touchPoint1.scenePos() - d->lastPoint1;
+ else
+ sceneCenter = d->sceneLastCenter + touchPoint2.scenePos() - d->lastPoint2;
+ angle = d->pinchLastAngle;
+ }
+ d->id1 = touchPoint1.id();
+ if (angle > 180)
+ angle -= 360;
+ if (!d->inPinch) {
+ if (d->touchPoints.count() >= 2
+ && (qAbs(p1.x()-d->sceneStartPoint1.x()) > dragThreshold
+ || qAbs(p1.y()-d->sceneStartPoint1.y()) > dragThreshold
+ || qAbs(p2.x()-d->sceneStartPoint2.x()) > dragThreshold
+ || qAbs(p2.y()-d->sceneStartPoint2.y()) > dragThreshold)) {
+ d->sceneStartCenter = sceneCenter;
+ d->sceneLastCenter = sceneCenter;
+ d->pinchStartCenter = mapFromScene(sceneCenter);
+ d->pinchStartDist = dist;
+ d->pinchStartAngle = angle;
+ d->pinchLastScale = 1.0;
+ d->pinchLastAngle = angle;
+ d->pinchRotation = 0.0;
+ d->lastPoint1 = p1;
+ d->lastPoint2 = p2;
+ QDeclarativePinchEvent pe(d->pinchStartCenter, 1.0, angle, 0.0);
pe.setStartCenter(d->pinchStartCenter);
- pe.setPreviousCenter(mapFromScene(d->sceneLastCenter));
+ pe.setPreviousCenter(d->pinchStartCenter);
pe.setPreviousAngle(d->pinchLastAngle);
pe.setPreviousScale(d->pinchLastScale);
pe.setStartPoint1(mapFromScene(d->sceneStartPoint1));
pe.setStartPoint2(mapFromScene(d->sceneStartPoint2));
- pe.setPoint1(d->touchPoints.at(0).pos());
- pe.setPoint2(d->touchPoints.at(1).pos());
- d->pinchLastScale = scale;
- d->sceneLastCenter = sceneCenter;
- d->pinchLastAngle = angle;
- d->lastPoint1 = d->touchPoints.at(0).pos();
- d->lastPoint2 = d->touchPoints.at(1).pos();
- emit pinchUpdated(&pe);
- if (d->pinch && d->pinch->target()) {
- qreal s = d->pinchStartScale * scale;
- s = qMin(qMax(pinch()->minimumScale(),s), pinch()->maximumScale());
- pinch()->target()->setScale(s);
- QPointF pos = sceneCenter - d->sceneStartCenter + d->pinchStartPos;
- if (pinch()->axis() & QDeclarativePinch::XAxis) {
- qreal x = pos.x();
- if (x < pinch()->xmin())
- x = pinch()->xmin();
- else if (x > pinch()->xmax())
- x = pinch()->xmax();
- pinch()->target()->setX(x);
- }
- if (pinch()->axis() & QDeclarativePinch::YAxis) {
- qreal y = pos.y();
- if (y < pinch()->ymin())
- y = pinch()->ymin();
- else if (y > pinch()->ymax())
- y = pinch()->ymax();
- pinch()->target()->setY(y);
- }
- if (d->pinchStartRotation >= pinch()->minimumRotation()
- && d->pinchStartRotation <= pinch()->maximumRotation()) {
- qreal r = d->pinchRotation + d->pinchStartRotation;
- r = qMin(qMax(pinch()->minimumRotation(),r), pinch()->maximumRotation());
- pinch()->target()->setRotation(r);
+ pe.setPoint1(mapFromScene(d->lastPoint1));
+ pe.setPoint2(mapFromScene(d->lastPoint2));
+ pe.setPointCount(d->touchPoints.count());
+ emit pinchStarted(&pe);
+ if (pe.accepted()) {
+ d->inPinch = true;
+ d->stealMouse = true;
+ QGraphicsScene *s = scene();
+ if (s && s->mouseGrabberItem() != this)
+ grabMouse();
+ setKeepMouseGrab(true);
+ if (d->pinch && d->pinch->target()) {
+ d->pinchStartPos = pinch()->target()->pos();
+ d->pinchStartScale = d->pinch->target()->scale();
+ d->pinchStartRotation = d->pinch->target()->rotation();
+ d->pinch->setActive(true);
}
+ } else {
+ d->pinchRejected = true;
+ }
+ }
+ } else if (d->pinchStartDist > 0) {
+ qreal scale = dist ? dist / d->pinchStartDist : d->pinchLastScale;
+ qreal da = d->pinchLastAngle - angle;
+ if (da > 180)
+ da -= 360;
+ else if (da < -180)
+ da += 360;
+ d->pinchRotation += da;
+ QPointF pinchCenter = mapFromScene(sceneCenter);
+ QDeclarativePinchEvent pe(pinchCenter, scale, angle, d->pinchRotation);
+ pe.setStartCenter(d->pinchStartCenter);
+ pe.setPreviousCenter(mapFromScene(d->sceneLastCenter));
+ pe.setPreviousAngle(d->pinchLastAngle);
+ pe.setPreviousScale(d->pinchLastScale);
+ pe.setStartPoint1(mapFromScene(d->sceneStartPoint1));
+ pe.setStartPoint2(mapFromScene(d->sceneStartPoint2));
+ pe.setPoint1(touchPoint1.pos());
+ pe.setPoint2(touchPoint2.pos());
+ pe.setPointCount(d->touchPoints.count());
+ d->pinchLastScale = scale;
+ d->sceneLastCenter = sceneCenter;
+ d->pinchLastAngle = angle;
+ d->lastPoint1 = touchPoint1.scenePos();
+ d->lastPoint2 = touchPoint2.scenePos();
+ emit pinchUpdated(&pe);
+ if (d->pinch && d->pinch->target()) {
+ qreal s = d->pinchStartScale * scale;
+ s = qMin(qMax(pinch()->minimumScale(),s), pinch()->maximumScale());
+ pinch()->target()->setScale(s);
+ QPointF pos = sceneCenter - d->sceneStartCenter + d->pinchStartPos;
+ if (pinch()->axis() & QDeclarativePinch::XAxis) {
+ qreal x = pos.x();
+ if (x < pinch()->xmin())
+ x = pinch()->xmin();
+ else if (x > pinch()->xmax())
+ x = pinch()->xmax();
+ pinch()->target()->setX(x);
+ }
+ if (pinch()->axis() & QDeclarativePinch::YAxis) {
+ qreal y = pos.y();
+ if (y < pinch()->ymin())
+ y = pinch()->ymin();
+ else if (y > pinch()->ymax())
+ y = pinch()->ymax();
+ pinch()->target()->setY(y);
+ }
+ if (d->pinchStartRotation >= pinch()->minimumRotation()
+ && d->pinchStartRotation <= pinch()->maximumRotation()) {
+ qreal r = d->pinchRotation + d->pinchStartRotation;
+ r = qMin(qMax(pinch()->minimumRotation(),r), pinch()->maximumRotation());
+ pinch()->target()->setRotation(r);
}
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p.h
index 5d06db0..09682c3 100644
--- a/src/declarative/graphicsitems/qdeclarativepincharea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepincharea_p.h
@@ -203,11 +203,13 @@ class Q_AUTOTEST_EXPORT QDeclarativePinchEvent : public QObject
Q_PROPERTY(QPointF startPoint1 READ startPoint1)
Q_PROPERTY(QPointF point2 READ point2)
Q_PROPERTY(QPointF startPoint2 READ startPoint2)
+ Q_PROPERTY(int pointCount READ pointCount)
Q_PROPERTY(bool accepted READ accepted WRITE setAccepted)
public:
QDeclarativePinchEvent(QPointF c, qreal s, qreal a, qreal r)
- : QObject(), m_center(c), m_scale(s), m_angle(a), m_rotation(r), m_accepted(true) {}
+ : QObject(), m_center(c), m_scale(s), m_angle(a), m_rotation(r)
+ , m_pointCount(0), m_accepted(true) {}
QPointF center() const { return m_center; }
QPointF startCenter() const { return m_startCenter; }
@@ -229,6 +231,8 @@ public:
void setPoint2(QPointF p) { m_point2 = p; }
QPointF startPoint2() const { return m_startPoint2; }
void setStartPoint2(QPointF p) { m_startPoint2 = p; }
+ int pointCount() const { return m_pointCount; }
+ void setPointCount(int count) { m_pointCount = count; }
bool accepted() const { return m_accepted; }
void setAccepted(bool a) { m_accepted = a; }
@@ -246,6 +250,7 @@ private:
QPointF m_point2;
QPointF m_startPoint1;
QPointF m_startPoint2;
+ int m_pointCount;
bool m_accepted;
};
diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
index 2769987..a66c396 100644
--- a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h
@@ -68,7 +68,8 @@ class QDeclarativePinchAreaPrivate : public QDeclarativeItemPrivate
public:
QDeclarativePinchAreaPrivate()
: absorb(true), stealMouse(false), inPinch(false)
- , pinchRejected(false), pinch(0), pinchStartDist(0), pinchStartScale(1.0)
+ , pinchRejected(false), pinchActivated(false)
+ , pinch(0), pinchStartDist(0), pinchStartScale(1.0)
, pinchLastScale(1.0), pinchStartRotation(0.0), pinchStartAngle(0.0)
, pinchLastAngle(0.0), pinchRotation(0.0)
{
@@ -88,6 +89,7 @@ public:
bool stealMouse : 1;
bool inPinch : 1;
bool pinchRejected : 1;
+ bool pinchActivated : 1;
QDeclarativePinch *pinch;
QPointF sceneStartPoint1;
QPointF sceneStartPoint2;
@@ -105,6 +107,7 @@ public:
QPointF sceneLastCenter;
QPointF pinchStartPos;
QList<QTouchEvent::TouchPoint> touchPoints;
+ int id1;
};
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativepositioners.cpp b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
index 8a9bdb3..e76fc03 100644
--- a/src/declarative/graphicsitems/qdeclarativepositioners.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepositioners.cpp
@@ -609,6 +609,11 @@ void QDeclarativeRow::setLayoutDirection(Qt::LayoutDirection layoutDirection)
QDeclarativeBasePositionerPrivate *d = static_cast<QDeclarativeBasePositionerPrivate* >(QDeclarativeBasePositionerPrivate::get(this));
if (d->layoutDirection != layoutDirection) {
d->layoutDirection = layoutDirection;
+ // For RTL layout the positioning changes when the width changes.
+ if (d->layoutDirection == Qt::RightToLeft)
+ d->addItemChangeListener(d, QDeclarativeItemPrivate::Geometry);
+ else
+ d->removeItemChangeListener(d, QDeclarativeItemPrivate::Geometry);
prePositioning();
emit layoutDirectionChanged();
emit effectiveLayoutDirectionChanged();
@@ -907,6 +912,11 @@ void QDeclarativeGrid::setLayoutDirection(Qt::LayoutDirection layoutDirection)
QDeclarativeBasePositionerPrivate *d = static_cast<QDeclarativeBasePositionerPrivate*>(QDeclarativeBasePositionerPrivate::get(this));
if (d->layoutDirection != layoutDirection) {
d->layoutDirection = layoutDirection;
+ // For RTL layout the positioning changes when the width changes.
+ if (d->layoutDirection == Qt::RightToLeft)
+ d->addItemChangeListener(d, QDeclarativeItemPrivate::Geometry);
+ else
+ d->removeItemChangeListener(d, QDeclarativeItemPrivate::Geometry);
prePositioning();
emit layoutDirectionChanged();
emit effectiveLayoutDirectionChanged();
diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
index 8f59073..b3235ef 100644
--- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp
@@ -134,7 +134,7 @@ void QDeclarativeGradientStop::updateGradient()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage qml-gradient.png
\enddiv
@@ -220,7 +220,7 @@ void QDeclarativeGradient::doUpdate()
\section1 Example Usage
- \div {float-right}
+ \div {class="float-right"}
\inlineimage declarative-rect.png
\enddiv
@@ -272,7 +272,7 @@ void QDeclarativeRectangle::doUpdate()
rectangle (as documented for QRect rendering). This can cause unintended effects if
\c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item:
- \div {float-right}
+ \div {class="float-right"}
\inlineimage rect-border-width.png
\enddiv
@@ -296,7 +296,7 @@ QDeclarativePen *QDeclarativeRectangle::border()
This property allows for the construction of simple vertical gradients.
Other gradients may by formed by adding rotation to the rectangle.
- \div {float-left}
+ \div {class="float-left"}
\inlineimage declarative-rect_gradient.png
\enddiv
@@ -364,7 +364,7 @@ void QDeclarativeRectangle::setRadius(qreal radius)
The default color is white.
- \div {float-right}
+ \div {class="float-right"}
\inlineimage rect-color.png
\enddiv
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index af18c90..e1c2107 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -555,8 +555,10 @@ QRect QDeclarativeTextInput::cursorRectangle() const
{
Q_D(const QDeclarativeTextInput);
QRect r = d->control->cursorRect();
- r.setHeight(r.height()-1); // Make consistent with TextEdit (QLineControl inexplicably adds 1)
- r.moveLeft(r.x() - d->hscroll);
+ // Scroll and make consistent with TextEdit
+ // QLineControl inexplicably adds 1 to the height and horizontal padding
+ // for unicode direction markers.
+ r.adjust(5 - d->hscroll, 0, -4 - d->hscroll, -1);
return r;
}
diff --git a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
index 31819f5..987aa23 100644
--- a/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextlayout.cpp
@@ -63,9 +63,6 @@ public:
QVector<QChar> chars;
};
-Q_GUI_EXPORT extern int qt_defaultDpiX();
-Q_GUI_EXPORT extern int qt_defaultDpiY();
-
namespace {
class DrawTextItemRecorder: public QPaintEngine
{
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index a8082f8..97ce059 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -839,7 +839,8 @@ void QDeclarativeVisualDataModel::setDelegate(QDeclarativeComponent *delegate)
QML only operates on list data. \c rootIndex allows the children of
any node in a QAbstractItemModel to be provided by this model.
- This property only affects models of type QAbstractItemModel.
+ This property only affects models of type QAbstractItemModel that
+ are hierarchical (e.g, a tree model).
For example, here is a simple interactive file system browser.
When a directory name is clicked, the view's \c rootIndex is set to the
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index fc393d1..c284307 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -137,7 +137,7 @@ class QByteArray;
}
\endcode
- \sa {Using QML in C++ Applications}, {Integrating QML with existing Qt UI code}
+ \sa {Using QML Bindings in C++ Applications}, {Integrating QML Code with Existing Qt UI Code}
*/
/*!
diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp
index dc6b085..7637b72 100644
--- a/src/declarative/qml/qdeclarativecontext.cpp
+++ b/src/declarative/qml/qdeclarativecontext.cpp
@@ -72,10 +72,10 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
Contexts allow data to be exposed to the QML components instantiated by the
QML engine.
- Each QDeclarativeContext contains a set of properties, distinct from its QObject
- properties, that allow data to be explicitly bound to a context by name. The
- context properties are defined and updated by calling
- QDeclarativeContext::setContextProperty(). The following example shows a Qt model
+ Each QDeclarativeContext contains a set of properties, distinct from its QObject
+ properties, that allow data to be explicitly bound to a context by name. The
+ context properties are defined and updated by calling
+ QDeclarativeContext::setContextProperty(). The following example shows a Qt model
being bound to a context and then accessed from a QML file.
\code
@@ -97,8 +97,8 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
To simplify binding and maintaining larger data sets, a context object can be set
on a QDeclarativeContext. All the properties of the context object are available
by name in the context, as though they were all individually added through calls
- to QDeclarativeContext::setContextProperty(). Changes to the property's values are
- detected through the property's notify signal. Setting a context object is both
+ to QDeclarativeContext::setContextProperty(). Changes to the property's values are
+ detected through the property's notify signal. Setting a context object is both
faster and easier than manually adding and maintaing context property values.
The following example has the same effect as the previous one, but it uses a context
@@ -121,7 +121,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
component.create(context);
\endcode
- All properties added explicitly by QDeclarativeContext::setContextProperty() take
+ All properties added explicitly by QDeclarativeContext::setContextProperty() take
precedence over the context object's properties.
\section2 The Context Hierarchy
@@ -147,8 +147,8 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
context2->setContextProperty("b", 15);
\endcode
- While QML objects instantiated in a context are not strictly owned by that
- context, their bindings are. If a context is destroyed, the property bindings of
+ While QML objects instantiated in a context are not strictly owned by that
+ context, their bindings are. If a context is destroyed, the property bindings of
outstanding QML objects will stop evaluating.
\warning Setting the context object or adding new context properties after an object
@@ -156,7 +156,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate()
to reevaluate). Thus whenever possible you should complete "setup" of the context
before using it to create any objects.
- \sa {Using QML in C++ Applications}
+ \sa {Using QML Bindings in C++ Applications}
*/
/*! \internal */
@@ -223,7 +223,7 @@ QDeclarativeContext::~QDeclarativeContext()
/*!
Returns whether the context is valid.
- To be valid, a context must have a engine, and it's contextObject(), if any,
+ To be valid, a context must have a engine, and it's contextObject(), if any,
must not have been deleted.
*/
bool QDeclarativeContext::isValid() const
@@ -384,7 +384,7 @@ QVariant QDeclarativeContext::contextProperty(const QString &name) const
if (data->contextObject) {
QObject *obj = data->contextObject;
QDeclarativePropertyCache::Data local;
- QDeclarativePropertyCache::Data *property =
+ QDeclarativePropertyCache::Data *property =
QDeclarativePropertyCache::property(data->engine, obj, name, local);
if (property) value = obj->metaObject()->property(property->coreIndex).read(obj);
@@ -461,7 +461,7 @@ QUrl QDeclarativeContext::baseUrl() const
{
Q_D(const QDeclarativeContext);
const QDeclarativeContextData* data = d->data;
- while (data && data->url.isEmpty())
+ while (data && data->url.isEmpty())
data = data->parent;
if (data)
@@ -515,7 +515,7 @@ QDeclarativeContextData::QDeclarativeContextData(QDeclarativeContext *ctxt)
void QDeclarativeContextData::invalidate()
{
- while (childContexts)
+ while (childContexts)
childContexts->invalidate();
while (componentAttached) {
@@ -570,7 +570,7 @@ void QDeclarativeContextData::clearContext()
void QDeclarativeContextData::destroy()
{
- if (linkedContext)
+ if (linkedContext)
linkedContext->destroy();
if (engine) invalidate();
@@ -626,9 +626,9 @@ void QDeclarativeContextData::setParent(QDeclarativeContextData *p)
}
}
-/*
-Refreshes all expressions that could possibly depend on this context. Refreshing flushes all
-context-tree dependent caches in the expressions, and should occur every time the context tree
+/*
+Refreshes all expressions that could possibly depend on this context. Refreshing flushes all
+context-tree dependent caches in the expressions, and should occur every time the context tree
*structure* (not values) changes.
*/
void QDeclarativeContextData::refreshExpressions()
@@ -656,7 +656,7 @@ void QDeclarativeContextData::addObject(QObject *o)
data->outerContext = this;
data->nextContextObject = contextObjects;
- if (data->nextContextObject)
+ if (data->nextContextObject)
data->nextContextObject->prevContextObject = &data->nextContextObject;
data->prevContextObject = &contextObjects;
contextObjects = data;
@@ -664,7 +664,7 @@ void QDeclarativeContextData::addObject(QObject *o)
void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object::ScriptBlock &script)
{
- if (!engine)
+ if (!engine)
return;
QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine);
@@ -684,7 +684,7 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object
scriptContext->pushScope(enginePriv->contextClass->newUrlContext(url));
scriptContext->pushScope(enginePriv->globalClass->staticGlobalObject());
-
+
QScriptValue scope = QScriptDeclarativeClass::newStaticScopeObject(scriptEngine);
scriptContext->pushScope(scope);
@@ -752,7 +752,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const
for (int i=0; i<idValueCount; i++) {
if (idValues[i] == obj)
return propertyNames->findId(i);
- }
+ }
if (linkedContext)
return linkedContext->findObjectId(obj);
@@ -761,7 +761,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const
QDeclarativeContext *QDeclarativeContextData::asQDeclarativeContext()
{
- if (!publicContext)
+ if (!publicContext)
publicContext = new QDeclarativeContext(this);
return publicContext;
}
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index b7a02f1..9fde18c 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -2117,7 +2117,7 @@ QVariant QDeclarativeEnginePrivate::scriptValueToVariant(const QScriptValue &val
The newly added \a path will be first in the importPathList().
- \sa setImportPathList(), \l {QML Modules}
+ \sa setImportPathList(), {QML Modules}
*/
void QDeclarativeEngine::addImportPath(const QString& path)
{
diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp
index 36cdde9..26f3996 100644
--- a/src/declarative/qml/qdeclarativetypeloader.cpp
+++ b/src/declarative/qml/qdeclarativetypeloader.cpp
@@ -629,7 +629,18 @@ QDeclarativeTypeLoader::~QDeclarativeTypeLoader()
}
/*!
-Return a QDeclarativeTypeData for \a url. The QDeclarativeTypeData may be cached.
+\enum QDeclarativeTypeLoader::Option
+
+This enum defines the options that control the way type data is handled.
+
+\value None The default value, indicating that no other options
+ are enabled.
+\value PreserveParser The parser used to handle the type data is preserved
+ after the data has been parsed.
+*/
+
+/*!
+Returns a QDeclarativeTypeData for the specified \a url. The QDeclarativeTypeData may be cached.
*/
QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QUrl &url)
{
@@ -650,8 +661,10 @@ QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QUrl &url)
}
/*!
-Return a QDeclarativeTypeData for \a data with the provided base \a url. The
+Returns a QDeclarativeTypeData for the given \a data with the provided base \a url. The
QDeclarativeTypeData will not be cached.
+
+The specified \a options control how the loader handles type data.
*/
QDeclarativeTypeData *QDeclarativeTypeLoader::get(const QByteArray &data, const QUrl &url, Options options)
{
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
index 0f884b6..5b83b4e 100644
--- a/src/declarative/qml/qdeclarativevaluetype.cpp
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -42,13 +42,12 @@
#include "private/qdeclarativevaluetype_p.h"
#include "private/qdeclarativemetatype_p.h"
+#include "private/qfont_p.h"
#include <QtCore/qdebug.h>
QT_BEGIN_NAMESPACE
-Q_GUI_EXPORT int qt_defaultDpi();
-
template<typename T>
int qmlRegisterValueTypeEnums(const char *uri, int versionMajor, int versionMinor, const char *qmlName)
{
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index dc6d524..b3bf84b 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass Animation QDeclarativeAbstractAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\brief The Animation element is the base of all QML animations.
@@ -554,7 +554,7 @@ void QDeclarativeAbstractAnimation::timelineComplete()
/*!
\qmlclass PauseAnimation QDeclarativePauseAnimation
- \ingroup qml-animation-transition
+ \ingroup qml-animation-transition
\since 4.7
\inherits Animation
\brief The PauseAnimation element provides a pause for an animation.
@@ -571,7 +571,7 @@ void QDeclarativeAbstractAnimation::timelineComplete()
}
\endcode
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativePauseAnimation::QDeclarativePauseAnimation(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePauseAnimationPrivate), parent)
@@ -630,27 +630,27 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
\inherits PropertyAnimation
\brief The ColorAnimation element animates changes in color values.
- ColorAnimation is a specialized PropertyAnimation that defines an
+ ColorAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a color value changes.
- Here is a ColorAnimation applied to the \c color property of a \l Rectangle
- as a property value source. It animates the \c color property's value from
+ Here is a ColorAnimation applied to the \c color property of a \l Rectangle
+ as a property value source. It animates the \c color property's value from
its current value to a value of "red", over 1000 milliseconds:
\snippet doc/src/snippets/declarative/coloranimation.qml 0
Like any other animation element, a ColorAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
-
- For convenience, when a ColorAnimation is used in a \l Transition, it will
- animate any \c color properties that have been modified during the state
- change. If a \l{PropertyAnimation::}{property} or
- \l{PropertyAnimation::}{properties} are explicitly set for the animation,
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
+
+ For convenience, when a ColorAnimation is used in a \l Transition, it will
+ animate any \c color properties that have been modified during the state
+ change. If a \l{PropertyAnimation::}{property} or
+ \l{PropertyAnimation::}{properties} are explicitly set for the animation,
then those are used instead.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeColorAnimation::QDeclarativeColorAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -686,10 +686,10 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation()
If the ColorAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QColor QDeclarativeColorAnimation::from() const
{
@@ -712,7 +712,7 @@ void QDeclarativeColorAnimation::setFrom(const QColor &f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QColor QDeclarativeColorAnimation::to() const
{
@@ -868,7 +868,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\inherits Animation
\brief The PropertyAction element allows immediate property changes during animation.
- PropertyAction is used to specify an immediate property change during an
+ PropertyAction is used to specify an immediate property change during an
animation. The property change is not animated.
It is useful for setting non-animated property values during an animation.
@@ -879,9 +879,9 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\snippet doc/src/snippets/declarative/propertyaction.qml standalone
- PropertyAction is also useful for setting the exact point at which a property
- change should occur during a \l Transition. For example, if PropertyChanges
- was used in a \l State to rotate an item around a particular
+ PropertyAction is also useful for setting the exact point at which a property
+ change should occur during a \l Transition. For example, if PropertyChanges
+ was used in a \l State to rotate an item around a particular
\l {Item::}{transformOrigin}, it might be implemented like this:
\snippet doc/src/snippets/declarative/propertyaction.qml transition
@@ -893,13 +893,13 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
before the RotationAnimation begins:
\snippet doc/src/snippets/declarative/propertyaction-sequential.qml sequential
-
+
This immediately sets the \c transformOrigin property to the value defined
- in the end state of the \l Transition (i.e. the value defined in the
+ in the end state of the \l Transition (i.e. the value defined in the
PropertyAction object) so that the rotation animation begins with the
correct transform origin.
- \sa {QML Animation}, QtDeclarative
+ \sa {QML Animation and Transitions}, QtDeclarative
*/
QDeclarativePropertyAction::QDeclarativePropertyAction(QObject *parent)
: QDeclarativeAbstractAnimation(*(new QDeclarativePropertyActionPrivate), parent)
@@ -1129,25 +1129,25 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
\inherits PropertyAnimation
\brief The NumberAnimation element animates changes in qreal-type values.
- NumberAnimation is a specialized PropertyAnimation that defines an
+ NumberAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a numerical value changes.
- Here is a NumberAnimation applied to the \c x property of a \l Rectangle
- as a property value source. It animates the \c x value from its current
+ Here is a NumberAnimation applied to the \c x property of a \l Rectangle
+ as a property value source. It animates the \c x value from its current
value to a value of 50, over 1000 milliseconds:
\snippet doc/src/snippets/declarative/numberanimation.qml 0
Like any other animation element, a NumberAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
Note that NumberAnimation may not animate smoothly if there are irregular
changes in the number value that it is tracking. If this is the case, use
SmoothedAnimation instead.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -1193,10 +1193,10 @@ void QDeclarativeNumberAnimation::init()
If the NumberAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeNumberAnimation::from() const
@@ -1219,7 +1219,7 @@ void QDeclarativeNumberAnimation::setFrom(qreal f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeNumberAnimation::to() const
{
@@ -1241,15 +1241,15 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
\inherits PropertyAnimation
\brief The Vector3dAnimation element animates changes in QVector3d values.
- Vector3dAnimation is a specialized PropertyAnimation that defines an
+ Vector3dAnimation is a specialized PropertyAnimation that defines an
animation to be applied when a Vector3d value changes.
Like any other animation element, a Vector3dAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent)
: QDeclarativePropertyAnimation(parent)
@@ -1270,10 +1270,10 @@ QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation()
If the Vector3dAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVector3D QDeclarativeVector3dAnimation::from() const
{
@@ -1295,7 +1295,7 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVector3D QDeclarativeVector3dAnimation::to() const
{
@@ -1318,7 +1318,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
\brief The RotationAnimation element animates changes in rotation values.
RotationAnimation is a specialized PropertyAnimation that gives control
- over the direction of rotation during an animation.
+ over the direction of rotation during an animation.
By default, it rotates in the direction
of the numerical change; a rotation from 0 to 240 will rotate 240 degrees
@@ -1334,7 +1334,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
Notice the RotationAnimation did not need to set a \l target
value. As a convenience, when used in a transition, RotationAnimation will rotate all
properties named "rotation" or "angle". You can override this by providing
- your own properties via \l {PropertyAnimation::properties}{properties} or
+ your own properties via \l {PropertyAnimation::properties}{properties} or
\l {PropertyAnimation::property}{property}.
Also, note the \l Rectangle will be rotated around its default
@@ -1344,11 +1344,11 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
PropertyAction documentation for more details.
Like any other animation element, a RotationAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress)
{
@@ -1421,10 +1421,10 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation()
If the RotationAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeRotationAnimation::from() const
{
@@ -1446,7 +1446,7 @@ void QDeclarativeRotationAnimation::setFrom(qreal f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
qreal QDeclarativeRotationAnimation::to() const
{
@@ -1572,15 +1572,15 @@ QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeAnimationGro
if this is the preferred behavior.
Like any other animation element, a SequentialAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \note Once an animation has been grouped into a SequentialAnimation or
+ \note Once an animation has been grouped into a SequentialAnimation or
ParallelAnimation, it cannot be individually started and stopped; the
SequentialAnimation or ParallelAnimation must be started and stopped as a group.
-
- \sa ParallelAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+
+ \sa ParallelAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeSequentialAnimation::QDeclarativeSequentialAnimation(QObject *parent) :
@@ -1642,15 +1642,15 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio
\snippet doc/src/snippets/declarative/parallelanimation.qml 0
Like any other animation element, a ParallelAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \note Once an animation has been grouped into a SequentialAnimation or
+ \note Once an animation has been grouped into a SequentialAnimation or
ParallelAnimation, it cannot be individually started and stopped; the
SequentialAnimation or ParallelAnimation must be started and stopped as a group.
- \sa SequentialAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa SequentialAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) :
QDeclarativeAnimationGroup(parent)
@@ -1745,14 +1745,14 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
\inherits Animation
\brief The PropertyAnimation element animates changes in property values.
- PropertyAnimation provides a way to animate changes to a property's value.
+ PropertyAnimation provides a way to animate changes to a property's value.
It can be used to define animations in a number of ways:
-
+
\list
\o In a \l Transition
- For example, to animate any objects that have changed their \c x or \c y properties
+ For example, to animate any objects that have changed their \c x or \c y properties
as a result of a state change, using an \c InOutQuad easing curve:
\snippet doc/src/snippets/declarative/propertyanimation.qml transition
@@ -1792,12 +1792,12 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
Depending on how the animation is used, the set of properties normally used will be
different. For more information see the individual property documentation, as well
- as the \l{QML Animation} introduction.
+ as the \l{QML Animation and Transitions} introduction.
Note that PropertyAnimation inherits the abstract \l Animation element.
This includes additional properties and methods for controlling the animation.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativePropertyAnimation::QDeclarativePropertyAnimation(QObject *parent)
@@ -1857,10 +1857,10 @@ void QDeclarativePropertyAnimation::setDuration(int duration)
If the PropertyAnimation is defined within a \l Transition or \l Behavior,
this value defaults to the value defined in the starting state of the
- \l Transition, or the current value of the property at the moment the
+ \l Transition, or the current value of the property at the moment the
\l Behavior is triggered.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVariant QDeclarativePropertyAnimation::from() const
{
@@ -1887,7 +1887,7 @@ void QDeclarativePropertyAnimation::setFrom(const QVariant &f)
\l Transition, or the value of the property change that triggered the
\l Behavior.
- \sa {QML Animation}
+ \sa {QML Animation and Transitions}
*/
QVariant QDeclarativePropertyAnimation::to() const
{
@@ -2254,7 +2254,7 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop)
As seen in the above example, properties is specified as a comma-separated string of property names to animate.
- \sa exclude, {QML Animation}
+ \sa exclude, {QML Animation and Transitions}
*/
QDeclarativeListProperty<QObject> QDeclarativePropertyAnimation::targets()
{
@@ -2437,7 +2437,7 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
ParentAnimation is used to animate a parent change for an \l Item.
For example, the following ParentChange changes \c blueRect to become
- a child of \c redRect when it is clicked. The inclusion of the
+ a child of \c redRect when it is clicked. The inclusion of the
ParentAnimation, which defines a NumberAnimation to be applied during
the transition, ensures the item animates smoothly as it moves to
its new parent:
@@ -2452,17 +2452,17 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
to animate the parent change via another item that does not have clipping
enabled. Such an item can be set using the \l via property.
- For convenience, when a ParentAnimation is used in a \l Transition, it will
- animate any ParentChange that has occurred during the state change.
+ For convenience, when a ParentAnimation is used in a \l Transition, it will
+ animate any ParentChange that has occurred during the state change.
This can be overridden by setting a specific target item using the
\l target property.
Like any other animation element, a ParentAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeParentAnimation::QDeclarativeParentAnimation(QObject *parent)
: QDeclarativeAnimationGroup(*(new QDeclarativeParentAnimationPrivate), parent)
@@ -2765,6 +2765,8 @@ void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions,
d->endAction->setAnimAction(d->via ? viaData : data, QActionAnimation::DeleteWhenStopped);
d->startAction->setAnimAction(d->via ? data : 0, QActionAnimation::DeleteWhenStopped);
}
+ if (!d->via)
+ delete viaData;
} else {
delete data;
delete viaData;
@@ -2793,23 +2795,23 @@ QAbstractAnimation *QDeclarativeParentAnimation::qtAnimation()
\inherits Animation
\brief The AnchorAnimation element animates changes in anchor values.
- AnchorAnimation is used to animate an anchor change.
+ AnchorAnimation is used to animate an anchor change.
In the following snippet we animate the addition of a right anchor to a \l Rectangle:
\snippet doc/src/snippets/declarative/anchoranimation.qml 0
- For convenience, when an AnchorAnimation is used in a \l Transition, it will
- animate any AnchorChanges that have occurred during the state change.
+ For convenience, when an AnchorAnimation is used in a \l Transition, it will
+ animate any AnchorChanges that have occurred during the state change.
This can be overridden by setting a specific target item using the
\l target property.
Like any other animation element, an AnchorAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa {QML Animation}, AnchorChanges
+ \sa {QML Animation and Transitions}, AnchorChanges
*/
QDeclarativeAnchorAnimation::QDeclarativeAnchorAnimation(QObject *parent)
diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp
index e584476..41f8fe5 100644
--- a/src/declarative/util/qdeclarativebehavior.cpp
+++ b/src/declarative/util/qdeclarativebehavior.cpp
@@ -76,7 +76,7 @@ public:
\since 4.7
\brief The Behavior element allows you to specify a default animation for a property change.
- A Behavior defines the default animation to be applied whenever a
+ A Behavior defines the default animation to be applied whenever a
particular property value changes.
For example, the following Behavior defines a NumberAnimation to be run
@@ -93,7 +93,7 @@ public:
Behavior, the \l Transition animation overrides the Behavior for that
state change.
- \sa {QML Animation}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative
+ \sa {QML Animation and Transitions}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative
*/
@@ -205,7 +205,7 @@ void QDeclarativeBehavior::write(const QVariant &value)
d->animation->qtAnimation()->start();
d->blockRunningChanged = false;
if (!after.contains(d->property))
- QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
+ QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding);
}
void QDeclarativeBehavior::setTarget(const QDeclarativeProperty &property)
diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp
index 5a66aab..83a7d83 100644
--- a/src/declarative/util/qdeclarativeconnections.cpp
+++ b/src/declarative/util/qdeclarativeconnections.cpp
@@ -117,6 +117,8 @@ public:
id: area
}
// ...
+ \endqml
+ \qml
Connections {
target: area
onClicked: foo(parameters)
diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp
index 80b52fd..fb77ec3 100644
--- a/src/declarative/util/qdeclarativelistmodel.cpp
+++ b/src/declarative/util/qdeclarativelistmodel.cpp
@@ -108,7 +108,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
The following example shows a ListModel containing three elements, with the roles
"name" and "cost".
- \div {float-right}
+ \div {class="float-right"}
\inlineimage listmodel.png
\enddiv
@@ -133,7 +133,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
The delegate displays all the fruit attributes:
- \div {float-right}
+ \div {class="float-right"}
\inlineimage listmodel-nested.png
\enddiv
@@ -143,7 +143,7 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM
\section1 Modifying List Models
The content of a ListModel may be created and modified using the clear(),
- append(), set() and setProperty() methods. For example:
+ append(), set(), insert() and setProperty() methods. For example:
\snippet doc/src/snippets/declarative/listmodel-modify.qml delegate
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index 5190eab..9221d78 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -426,7 +426,8 @@ void QDeclarativePixmapReader::processJobs()
replies.remove(reply);
reply->close();
}
- delete job;
+ // deleteLater, since not owned by this thread
+ job->deleteLater();
}
cancelled.clear();
}
diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp
index 9bcb263..b03630d 100644
--- a/src/declarative/util/qdeclarativepropertychanges.cpp
+++ b/src/declarative/util/qdeclarativepropertychanges.cpp
@@ -118,12 +118,13 @@ QT_BEGIN_NAMESPACE
\section2 Immediate property changes in transitions
- When \l Transitions are used to animate state changes, they animate
- properties from their values in the current state to those defined in the
- new state (as defined by PropertyChanges objects). However,
- it is sometimes desirable to set a property value \e immediately during a
- \l Transition, without animation; in these cases, the PropertyAction
- element can be used to force an immediate property change.
+ When \l{QML Animation and Transitions}{Transitions} are used to animate
+ state changes, they animate properties from their values in the current
+ state to those defined in the new state (as defined by PropertyChanges
+ objects). However, it is sometimes desirable to set a property value
+ \e immediately during a \l Transition, without animation; in these cases,
+ the PropertyAction element can be used to force an immediate property
+ change.
See the PropertyAction documentation for more details.
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp
index e2f6e3c..9def5b4 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation.cpp
+++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp
@@ -257,8 +257,8 @@ void QSmoothedAnimation::init()
A SmoothedAnimation animates a property's value to a set target value
using an ease in/out quad easing curve. When the target value changes,
- the easing curves used to animate between the old and new target values
- are smoothly spliced together to create a smooth movement to the new
+ the easing curves used to animate between the old and new target values
+ are smoothly spliced together to create a smooth movement to the new
target value that maintains the current velocity.
The follow example shows one \l Rectangle tracking the position of another
@@ -288,11 +288,11 @@ void QSmoothedAnimation::init()
of 0.5 will take 2000 ms to complete.
Like any other animation element, a SmoothedAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa SpringAnimation, NumberAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ \sa SpringAnimation, NumberAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeSmoothedAnimation::QDeclarativeSmoothedAnimation(QObject *parent)
diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp
index 1212a1c..bb58b0a 100644
--- a/src/declarative/util/qdeclarativespringanimation.cpp
+++ b/src/declarative/util/qdeclarativespringanimation.cpp
@@ -246,19 +246,19 @@ void QDeclarativeSpringAnimationPrivate::updateMode()
You can also limit the maximum \l velocity of the animation.
- The following \l Rectangle moves to the position of the mouse using a
+ The following \l Rectangle moves to the position of the mouse using a
SpringAnimation when the mouse is clicked. The use of the \l Behavior
- on the \c x and \c y values indicates that whenever these values are
+ on the \c x and \c y values indicates that whenever these values are
changed, a SpringAnimation should be applied.
\snippet doc/src/snippets/declarative/springanimation.qml 0
Like any other animation element, a SpringAnimation can be applied in a
- number of ways, including transitions, behaviors and property value
- sources. The \l {QML Animation} documentation shows a variety of methods
- for creating animations.
+ number of ways, including transitions, behaviors and property value
+ sources. The \l {QML Animation and Transitions} documentation shows a
+ variety of methods for creating animations.
- \sa SmoothedAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
+ \sa SmoothedAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
*/
QDeclarativeSpringAnimation::QDeclarativeSpringAnimation(QObject *parent)
@@ -299,7 +299,7 @@ void QDeclarativeSpringAnimation::setVelocity(qreal velocity)
This property describes how strongly the target is pulled towards the
source. The default value is 0 (that is, the spring-like motion is disabled).
-
+
The useful value range is 0 - 5.0.
When this property is set and the \l velocity value is greater than 0,
@@ -394,9 +394,9 @@ void QDeclarativeSpringAnimation::setModulus(qreal modulus)
\qmlproperty real SpringAnimation::mass
This property holds the "mass" of the property being moved.
- The value is 1.0 by default.
-
- A greater mass causes slower movement and a greater spring-like
+ The value is 1.0 by default.
+
+ A greater mass causes slower movement and a greater spring-like
motion when an item comes to rest.
*/
qreal QDeclarativeSpringAnimation::mass() const
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index 5a4e2b1..5718e29 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -152,14 +152,14 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
Notice the default state is referred to using an empty string ("").
- States are commonly used together with \l {Transitions} to provide
+ States are commonly used together with \l{QML Animation and Transitions}{Transitions} to provide
animations when state changes occur.
\note Setting the state of an object from within another state of the same object is
not allowed.
\sa {declarative/animation/states}{states example}, {qmlstates}{States},
- {qdeclarativeanimation.html#transitions}{QML Transitions}, QtDeclarative
+ {QML Animation and Transitions}{Transitions}, QtDeclarative
*/
QDeclarativeState::QDeclarativeState(QObject *parent)
: QObject(*(new QDeclarativeStatePrivate), parent)
diff --git a/src/declarative/util/qdeclarativestategroup.cpp b/src/declarative/util/qdeclarativestategroup.cpp
index f1d0997..6459bf9 100644
--- a/src/declarative/util/qdeclarativestategroup.cpp
+++ b/src/declarative/util/qdeclarativestategroup.cpp
@@ -88,7 +88,7 @@ public:
/*!
\qmlclass StateGroup QDeclarativeStateGroup
- \ingroup qml-state-elements
+ \ingroup qml-state-elements
\since 4.7
\brief The StateGroup element provides state support for non-Item elements.
@@ -113,7 +113,7 @@ public:
}
\endqml
- \sa {qmlstate}{States} {Transitions}, {QtDeclarative}
+ \sa {qmlstate}{States} {QML Animation and Transitions}{Transitions}, {QtDeclarative}
*/
QDeclarativeStateGroup::QDeclarativeStateGroup(QObject *parent)
@@ -213,7 +213,7 @@ void QDeclarativeStateGroupPrivate::clear_states(QDeclarativeListProperty<QDecla
}
\endqml
- \sa {Transitions}
+ \sa {QML Animation and Transitions}{Transitions}
*/
QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeStateGroup::transitionsProperty()
{
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 063ec3e..1a574b8 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -60,24 +60,24 @@ QT_BEGIN_NAMESPACE
A Transition defines the animations to be applied when a \l State change occurs.
For example, the following \l Rectangle has two states: the default state, and
- an added "moved" state. In the "moved state, the rectangle's position changes
+ an added "moved" state. In the "moved state, the rectangle's position changes
to (50, 50). The added Transition specifies that when the rectangle
changes between the default and the "moved" state, any changes
to the \c x and \c y properties should be animated, using an \c Easing.InOutQuad.
\snippet doc/src/snippets/declarative/transition.qml 0
- Notice the example does not require \l{PropertyAnimation::}{to} and
+ Notice the example does not require \l{PropertyAnimation::}{to} and
\l{PropertyAnimation::}{from} values for the NumberAnimation. As a convenience,
these properties are automatically set to the values of \c x and \c y before
and after the state change; the \c from values are provided by
the current values of \c x and \c y, and the \c to values are provided by
- the PropertyChanges object. If you wish, you can provide \l{PropertyAnimation::}{to} and
+ the PropertyChanges object. If you wish, you can provide \l{PropertyAnimation::}{to} and
\l{PropertyAnimation::}{from} values anyway to override the default values.
- By default, a Transition's animations are applied for any state change in the
- parent item. The Transition \l {Transition::}{from} and \l {Transition::}{to}
- values can be set to restrict the animations to only be applied when changing
+ By default, a Transition's animations are applied for any state change in the
+ parent item. The Transition \l {Transition::}{from} and \l {Transition::}{to}
+ values can be set to restrict the animations to only be applied when changing
from one particular state to another.
To define multiple transitions, specify \l Item::transitions as a list:
@@ -92,7 +92,7 @@ QT_BEGIN_NAMESPACE
\l Behavior, the Transition animation overrides the \l Behavior for that
state change.
- \sa {QML Animation}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative}
+ \sa {QML Animation and Transitions}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative}
*/
//ParallelAnimationWrapper allows us to do a "callback" when the animation finishes, rather than connecting
@@ -111,8 +111,8 @@ class QDeclarativeTransitionPrivate : public QObjectPrivate
{
Q_DECLARE_PUBLIC(QDeclarativeTransition)
public:
- QDeclarativeTransitionPrivate()
- : fromState(QLatin1String("*")), toState(QLatin1String("*")),
+ QDeclarativeTransitionPrivate()
+ : fromState(QLatin1String("*")), toState(QLatin1String("*")),
reversed(false), reversible(false), endState(0)
{
group.trans = this;
@@ -249,7 +249,7 @@ void QDeclarativeTransition::setFromState(const QString &f)
is reversed, and it is not necessary to set this property to reverse
the transition.
- However, if a SequentialAnimation is used, or if the \l from or \l to
+ However, if a SequentialAnimation is used, or if the \l from or \l to
properties have been set, this property will need to be set to reverse
a transition when a state change is reverted. For example, the following
transition applies a sequential animation when the mouse is pressed,
@@ -257,7 +257,7 @@ void QDeclarativeTransition::setFromState(const QString &f)
\snippet doc/src/snippets/declarative/transition-reversible.qml 0
- If the transition did not set the \c to and \c reversible values, then
+ If the transition did not set the \c to and \c reversible values, then
on the mouse release, the transition would play the PropertyAnimation
before the ColorAnimation instead of reversing the sequence.
*/
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 1b50a56..e24f80f 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -72,7 +72,6 @@
QT_BEGIN_NAMESPACE
DEFINE_BOOL_CONFIG_OPTION(frameRateDebug, QML_SHOW_FRAMERATE)
-extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
class QDeclarativeScene : public QGraphicsScene
{
@@ -194,9 +193,9 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
\since 4.7
\brief The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface.
- QDeclarativeItem objects can be placed on a standard QGraphicsScene and
- displayed with QGraphicsView. QDeclarativeView is a QGraphicsView subclass
- provided as a convenience for displaying QML files, and connecting between
+ QDeclarativeItem objects can be placed on a standard QGraphicsScene and
+ displayed with QGraphicsView. QDeclarativeView is a QGraphicsView subclass
+ provided as a convenience for displaying QML files, and connecting between
QML and C++ Qt objects.
QDeclarativeView provides:
@@ -236,7 +235,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
If you're using your own QGraphicsScene-based scene with QDeclarativeView, remember to
enable scene's sticky focus mode and to set itemIndexMethod to QGraphicsScene::NoIndex.
- \sa {Integrating QML with existing Qt UI code}, {Using QML in C++ Applications}
+ \sa {Integrating QML Code with Existing Qt UI Code}, {Using QML Bindings in C++ Applications}
*/
@@ -250,7 +249,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem,
/*!
\fn QDeclarativeView::QDeclarativeView(QWidget *parent)
-
+
Constructs a QDeclarativeView with the given \a parent.
*/
QDeclarativeView::QDeclarativeView(QWidget *parent)
@@ -704,17 +703,10 @@ void QDeclarativeView::paintEvent(QPaintEvent *event)
QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Painting);
int time = 0;
- if (frameRateDebug())
+ if (frameRateDebug())
time = d->frameTimer.restart();
-#ifdef Q_WS_MAC
- bool oldSmooth = qt_applefontsmoothing_enabled;
- qt_applefontsmoothing_enabled = false;
-#endif
QGraphicsView::paintEvent(event);
-#ifdef Q_WS_MAC
- qt_applefontsmoothing_enabled = oldSmooth;
-#endif
QDeclarativeDebugTrace::endRange(QDeclarativeDebugTrace::Painting);
diff --git a/src/gui/dialogs/qabstractprintdialog.cpp b/src/gui/dialogs/qabstractprintdialog.cpp
index 3317018..ef46697 100644
--- a/src/gui/dialogs/qabstractprintdialog.cpp
+++ b/src/gui/dialogs/qabstractprintdialog.cpp
@@ -381,19 +381,11 @@ void QAbstractPrintDialogPrivate::setPrinter(QPrinter *newPrinter)
If the dialog is accepted by the user, the QPrinter object is
correctly configured for printing.
- \raw HTML
- <table align="center">
- <tr><td>
- \endraw
- \inlineimage plastique-printdialog.png
- \raw HTML
- </td><td>
- \endraw
- \inlineimage plastique-printdialog-properties.png
- \raw HTML
- </td></tr>
- </table>
- \endraw
+ \table
+ \row
+ \o \inlineimage plastique-printdialog.png
+ \o \inlineimage plastique-printdialog-properties.png
+ \endtable
The printer dialog (shown above in Plastique style) enables access to common
printing properties. On X11 platforms that use the CUPS printing system, the
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index 09bb56c..d6dbcf6 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -1536,10 +1536,12 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
/*!
\since 4.2
- Opens an information message box with the specified \a title and
- \a text. The standard \a buttons are added to the message box. \a
- defaultButton specifies the button used when \key Enter is
- pressed. \a defaultButton must refer to a button that was given in \a buttons.
+ Opens an information message box with the given \a title and
+ \a text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box.
+ \a defaultButton specifies the button used when \key Enter is pressed.
+ \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
chooses a suitable default automatically.
@@ -1547,9 +1549,13 @@ static QMessageBox::StandardButton showNewMessageBox(QWidget *parent,
\key Esc was pressed instead, the \l{Default and Escape Keys}
{escape button} is returned.
- The message box is an \l{Qt::ApplicationModal} {application modal}
+ The message box is an \l{Qt::ApplicationModal}{application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa question(), warning(), critical()
*/
QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QString &title,
@@ -1564,8 +1570,10 @@ QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QStr
/*!
\since 4.2
- Opens a question message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a question message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1578,6 +1586,10 @@ QMessageBox::StandardButton QMessageBox::information(QWidget *parent, const QStr
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa information(), warning(), critical()
*/
QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString &title,
@@ -1590,8 +1602,10 @@ QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString
/*!
\since 4.2
- Opens a warning message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a warning message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1604,6 +1618,10 @@ QMessageBox::StandardButton QMessageBox::question(QWidget *parent, const QString
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
+
\sa question(), information(), critical()
*/
QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString &title,
@@ -1616,8 +1634,10 @@ QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString
/*!
\since 4.2
- Opens a critical message box with the specified \a title and \a
- text. The standard \a buttons are added to the message box. \a
+ Opens a critical message box with the given \a title and \a
+ text in front of the specified \a parent widget.
+
+ The standard \a buttons are added to the message box. \a
defaultButton specifies the button used when \key Enter is
pressed. \a defaultButton must refer to a button that was given in \a buttons.
If \a defaultButton is QMessageBox::NoButton, QMessageBox
@@ -1630,9 +1650,9 @@ QMessageBox::StandardButton QMessageBox::warning(QWidget *parent, const QString
The message box is an \l{Qt::ApplicationModal} {application modal}
dialog box.
- \warning Do not delete \a parent during the execution of the dialog.
- If you want to do this, you should create the dialog
- yourself using one of the QMessageBox constructors.
+ \warning Do not delete \a parent during the execution of the dialog.
+ If you want to do this, you should create the dialog
+ yourself using one of the QMessageBox constructors.
\sa question(), warning(), information()
*/
diff --git a/src/gui/egl/qegl_x11.cpp b/src/gui/egl/qegl_x11.cpp
index fb9ee9d..bf79ec7 100644
--- a/src/gui/egl/qegl_x11.cpp
+++ b/src/gui/egl/qegl_x11.cpp
@@ -330,10 +330,8 @@ void qt_set_winid_on_widget(QWidget* w, Qt::HANDLE id)
// NOTE: The X11 version of createSurface will re-create the native drawable if it's visual doesn't
// match the one for the passed in EGLConfig
-EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEglProperties *unusedProperties)
+EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEglProperties *properties)
{
- Q_UNUSED(unusedProperties);
-
int devType = device->devType();
if (devType == QInternal::Pbuffer) {
@@ -417,7 +415,12 @@ EGLSurface QEgl::createSurface(QPaintDevice *device, EGLConfig config, const QEg
// At this point, the widget's window should be created and have the correct visual. Now we
// just need to create the EGL surface for it:
- EGLSurface surf = eglCreateWindowSurface(QEgl::display(), config, (EGLNativeWindowType)widget->winId(), 0);
+ const int *props;
+ if (properties)
+ props = properties->properties();
+ else
+ props = 0;
+ EGLSurface surf = eglCreateWindowSurface(QEgl::display(), config, (EGLNativeWindowType)widget->winId(), props);
if (surf == EGL_NO_SURFACE)
qWarning("QEglContext::createSurface(): Unable to create EGL surface, error = 0x%x", eglGetError());
return surf;
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
index e207ed1..90561fd 100644
--- a/src/gui/embedded/qscreen_qws.cpp
+++ b/src/gui/embedded/qscreen_qws.cpp
@@ -64,7 +64,6 @@ QT_BEGIN_NAMESPACE
// #define QT_USE_MEMCPY_DUFF
#ifndef QT_NO_QWS_CURSOR
-bool qt_sw_cursor=false;
Q_GUI_EXPORT QScreenCursor * qt_screencursor = 0;
#endif
Q_GUI_EXPORT QScreen * qt_screen = 0;
@@ -119,8 +118,6 @@ ClearCacheFunc QScreen::clearCacheFunc = 0;
Returns a pointer to the application's unique screen cursor.
*/
-extern bool qws_sw_cursor;
-
/*!
Constructs a screen cursor
*/
diff --git a/src/gui/embedded/qscreen_qws.h b/src/gui/embedded/qscreen_qws.h
index 17ffbbb..85c775e 100644
--- a/src/gui/embedded/qscreen_qws.h
+++ b/src/gui/embedded/qscreen_qws.h
@@ -130,7 +130,7 @@ const int SourcePixmap=1;
class QScreenCursor;
extern QScreenCursor *qt_screencursor;
-extern bool qt_sw_cursor;
+extern bool qws_sw_cursor;
class Q_GUI_EXPORT QScreenCursor
{
@@ -145,7 +145,7 @@ public:
bool supportsAlphaCursor() const { return supportsAlpha; }
- static bool enabled() { return qt_sw_cursor; }
+ static bool enabled() { return qws_sw_cursor; }
QRect boundingRect() const { return QRect(pos - hotspot, size); }
QImage image() const { return cursor; }
diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
index 014b61b..9bb5424 100644
--- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp
@@ -56,7 +56,7 @@
Items that are anchored are automatically added to the layout, and if items
are removed, all their anchors will be automatically removed.
- \div {float-left}
+ \div {class="float-left"}
\inlineimage simpleanchorlayout-example.png Using an anchor layout to align simple colored widgets.
\enddiv
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 0af36ac..e342783 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -579,19 +579,21 @@
QGraphicsItem pointer). The return value is unused; you cannot adjust
anything in this notification.
- \value ItemSceneChange The item is moved to a new scene. This notification
- is also sent when the item is added to its initial scene, and when it is
- removed. The value argument is the new scene (i.e., a QGraphicsScene
+ \value ItemSceneChange The item is moved to a new scene. This notification is
+ also sent when the item is added to its initial scene, and when it is removed.
+ The item's scene() is the old scene (or 0 if the item has not been added to a
+ scene yet). The value argument is the new scene (i.e., a QGraphicsScene
pointer), or a null pointer if the item is removed from a scene. Do not
- override this change by passing this item to QGraphicsScene::addItem() as
- this notification is delivered; instead, you can return the new scene from
+ override this change by passing this item to QGraphicsScene::addItem() as this
+ notification is delivered; instead, you can return the new scene from
itemChange(). Use this feature with caution; objecting to a scene change can
quickly lead to unwanted recursion.
- \value ItemSceneHasChanged The item's scene has changed. The value
- argument is the new scene (i.e., a pointer to a QGraphicsScene). Do not
- call setScene() in itemChange() as this notification is delivered. The
- return value is ignored.
+ \value ItemSceneHasChanged The item's scene has changed. The item's scene() is
+ the new scene. This notification is also sent when the item is added to its
+ initial scene, and when it is removed.The value argument is the new scene
+ (i.e., a pointer to a QGraphicsScene). Do not call setScene() in itemChange()
+ as this notification is delivered. The return value is ignored.
\value ItemCursorChange The item's cursor changes. The value argument is
the new cursor (i.e., a QCursor). Do not call setCursor() in itemChange()
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 7932a73..faa29e5 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4948,6 +4948,19 @@ void QGraphicsScenePrivate::draw(QGraphicsItem *item, QPainter *painter, const Q
if (painterStateProtection || restorePainterClip)
painter->restore();
+
+ static int drawRect = qgetenv("QT_DRAW_SCENE_ITEM_RECTS").toInt();
+ if (drawRect) {
+ QPen oldPen = painter->pen();
+ QBrush oldBrush = painter->brush();
+ quintptr ptr = reinterpret_cast<quintptr>(item);
+ const QColor color = QColor::fromHsv(ptr % 255, 255, 255);
+ painter->setPen(color);
+ painter->setBrush(Qt::NoBrush);
+ painter->drawRect(adjustedItemBoundingRect(item));
+ painter->setPen(oldPen);
+ painter->setBrush(oldBrush);
+ }
}
// Draw children in front
diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp
index 06df788..513c41f 100644
--- a/src/gui/graphicsview/qgraphicstransform.cpp
+++ b/src/gui/graphicsview/qgraphicstransform.cpp
@@ -92,6 +92,7 @@
#include "qgraphicstransform_p.h"
#include <QDebug>
#include <QtCore/qmath.h>
+#include <QtCore/qnumeric.h>
#ifndef QT_NO_GRAPHICSVIEW
QT_BEGIN_NAMESPACE
@@ -467,6 +468,7 @@ void QGraphicsRotation::setOrigin(const QVector3D &point)
item will be rotated counter-clockwise. Normally the rotation angle will be
in the range (-360, 360), but you can also provide numbers outside of this
range (e.g., a angle of 370 degrees gives the same result as 10 degrees).
+ Setting the angle to NaN results in no rotation.
\sa origin
*/
@@ -570,7 +572,7 @@ void QGraphicsRotation::applyTo(QMatrix4x4 *matrix) const
{
Q_D(const QGraphicsRotation);
- if (d->angle == 0. || d->axis.isNull())
+ if (d->angle == 0. || d->axis.isNull() || qIsNaN(d->angle))
return;
matrix->translate(d->origin);
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 0e2750d..488a36a 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -2497,7 +2497,7 @@ QVariant QGraphicsView::inputMethodQuery(Qt::InputMethodQuery query) const
else if (value.type() == QVariant::PointF)
value = mapFromScene(value.toPointF());
else if (value.type() == QVariant::Rect)
- value = mapFromScene(value.toRect()).boundingRect();
+ value = d->mapRectFromScene(value.toRect()).toRect();
else if (value.type() == QVariant::Point)
value = mapFromScene(value.toPoint());
return value;
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 158f9ab..7182062 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -972,12 +972,15 @@ QString QIcon::themeName()
Returns the QIcon corresponding to \a name in the current
icon theme. If no such icon is found in the current theme
- \a fallback is return instead.
+ \a fallback is returned instead.
- The lastest version of the freedesktop icon specification and naming
- spesification can be obtained here:
- http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
- http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html
+ The latest version of the freedesktop icon specification and naming
+ specification can be obtained here:
+
+ \list
+ \o \l{http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html}
+ \o \l{http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html}
+ \endlist
To fetch an icon from the current icon theme:
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index d992dd5..50b372e 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -65,6 +65,7 @@
#include <private/qpaintengine_raster_p.h>
#include <private/qimage_p.h>
+#include <private/qfont_p.h>
QT_BEGIN_NAMESPACE
@@ -119,9 +120,6 @@ const QVector<QRgb> *qt_image_colortable(const QImage &image)
return &image.d->colortable;
}
-Q_GUI_EXPORT extern int qt_defaultDpiX();
-Q_GUI_EXPORT extern int qt_defaultDpiY();
-
QBasicAtomicInt qimage_serial_number = Q_BASIC_ATOMIC_INITIALIZER(1);
QImageData::QImageData()
@@ -797,6 +795,8 @@ QImage::QImage()
Constructs an image with the given \a width, \a height and \a
format.
+ A \l{isNull()}{null} image will be returned if memory cannot be allocated.
+
\warning This will create a QImage with uninitialized data. Call
fill() to fill the image with an appropriate pixel value before
drawing onto it with QPainter.
@@ -810,6 +810,8 @@ QImage::QImage(int width, int height, Format format)
/*!
Constructs an image with the given \a size and \a format.
+ A \l{isNull()}{null} image is returned if memory cannot be allocated.
+
\warning This will create a QImage with uninitialized data. Call
fill() to fill the image with an appropriate pixel value before
drawing onto it with QPainter.
diff --git a/src/gui/image/qpaintengine_pic.cpp b/src/gui/image/qpaintengine_pic.cpp
index a8683b5..6f0979a 100644
--- a/src/gui/image/qpaintengine_pic.cpp
+++ b/src/gui/image/qpaintengine_pic.cpp
@@ -477,8 +477,6 @@ void QPicturePaintEngine::drawImage(const QRectF &r, const QImage &image, const
writeCmdLength(pos, r, false);
}
-Q_GUI_EXPORT extern int qt_defaultDpi();
-
void QPicturePaintEngine::drawTextItem(const QPointF &p , const QTextItem &ti)
{
Q_D(QPicturePaintEngine);
diff --git a/src/gui/image/qpicture.cpp b/src/gui/image/qpicture.cpp
index 053d1fc..3f38c0c 100644
--- a/src/gui/image/qpicture.cpp
+++ b/src/gui/image/qpicture.cpp
@@ -46,6 +46,7 @@
#include <private/qfactoryloader_p.h>
#include <private/qpaintengine_pic_p.h>
+#include <private/qfont_p.h>
#include "qdatastream.h"
#include "qfile.h"
@@ -108,8 +109,6 @@ void qt_format_text(const QFont &fnt, const QRectF &_r,
const char *qt_mfhdr_tag = "QPIC"; // header tag
static const quint16 mfhdr_maj = 11; // major version #
static const quint16 mfhdr_min = 0; // minor version #
-Q_GUI_EXPORT extern int qt_defaultDpiX();
-Q_GUI_EXPORT extern int qt_defaultDpiY();
/*!
Constructs an empty picture.
diff --git a/src/gui/image/qpixmap_blitter.cpp b/src/gui/image/qpixmap_blitter.cpp
index 26d3b87..e2cd745 100644
--- a/src/gui/image/qpixmap_blitter.cpp
+++ b/src/gui/image/qpixmap_blitter.cpp
@@ -49,6 +49,7 @@
#include <private/qblittable_p.h>
#include <private/qdrawhelper_p.h>
+#include <private/qfont_p.h>
#ifndef QT_NO_BLITTABLE
QT_BEGIN_NAMESPACE
@@ -104,8 +105,6 @@ void QBlittablePixmapData::resize(int width, int height)
h = height;
is_null = (w <= 0 || h <= 0);
}
-Q_GUI_EXPORT extern int qt_defaultDpiX();
-Q_GUI_EXPORT extern int qt_defaultDpiY();
int QBlittablePixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
diff --git a/src/gui/image/qpixmap_raster.cpp b/src/gui/image/qpixmap_raster.cpp
index a5f42c1..0a4d921 100644
--- a/src/gui/image/qpixmap_raster.cpp
+++ b/src/gui/image/qpixmap_raster.cpp
@@ -41,6 +41,8 @@
#include "qpixmap.h"
+#include <private/qfont_p.h>
+
#include "qpixmap_raster_p.h"
#include "qnativeimage_p.h"
#include "qimage_p.h"
@@ -346,9 +348,6 @@ QPaintEngine* QRasterPixmapData::paintEngine() const
return image.paintEngine();
}
-Q_GUI_EXPORT extern int qt_defaultDpiX();
-Q_GUI_EXPORT extern int qt_defaultDpiY();
-
int QRasterPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
QImageData *d = image.d;
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index 32d8dd7..c8aa003 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -46,6 +46,7 @@
#include <private/qgraphicssystem_p.h>
#include <private/qt_s60_p.h>
#include <private/qpaintengine_s60_p.h>
+#include <private/qfont_p.h>
#include "qpixmap.h"
#include "qpixmap_raster_p.h"
@@ -601,9 +602,6 @@ bool QS60PixmapData::scroll(int dx, int dy, const QRect &rect)
return res;
}
-Q_GUI_EXPORT int qt_defaultDpiX();
-Q_GUI_EXPORT int qt_defaultDpiY();
-
int QS60PixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
if (!cfbsBitmap)
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index d88c437..c2a8b00 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -219,6 +219,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, float scre
png_colorp palette = 0;
int num_palette;
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, 0, 0, 0);
+ png_set_interlace_handling(png_ptr);
if (color_type == PNG_COLOR_TYPE_GRAY) {
// Black & White or 8-bit grayscale
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 41abe95..2c70ade 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -416,7 +416,8 @@ void QCoeFepInputContext::resetSplitViewWidget(bool keepInputWidget)
int index = gv->scene()->focusItem()->toGraphicsObject()->metaObject()->indexOfSignal(signal.right(signal.length() - 1));
if (index != -1)
disconnect(gv->scene()->focusItem()->toGraphicsObject(), SIGNAL(cursorPositionChanged()), this, SLOT(translateInputWidget()));
- QGraphicsItem *rootItem;
+
+ QGraphicsItem *rootItem = 0;
foreach (QGraphicsItem *item, gv->scene()->items()) {
if (!item->parentItem()) {
rootItem = item;
@@ -828,7 +829,7 @@ void QCoeFepInputContext::translateInputWidget()
return;
// Fetch root item (i.e. graphicsitem with no parent)
- QGraphicsItem *rootItem;
+ QGraphicsItem *rootItem = 0;
foreach (QGraphicsItem *item, gv->scene()->items()) {
if (!item->parentItem()) {
rootItem = item;
diff --git a/src/gui/inputmethod/qinputcontext.cpp b/src/gui/inputmethod/qinputcontext.cpp
index 063aefd..f083e51 100644
--- a/src/gui/inputmethod/qinputcontext.cpp
+++ b/src/gui/inputmethod/qinputcontext.cpp
@@ -355,9 +355,10 @@ void QInputContext::widgetDestroyed(QWidget *widget)
in complex input method. In the case, call QInputContext::reset()
to ensure proper termination of inputting.
- You must not send any QInputMethodEvent except empty InputMethodEnd event using
- QInputContext::reset() at reimplemented reset(). It will break
- input state consistency.
+ In a reimplementation of reset(), you must not send any
+ QInputMethodEvent containing preedit text. You can only commit
+ string and attributes; otherwise, you risk breaking input state
+ consistency.
*/
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index d6d9536..471c199 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -643,8 +643,12 @@ int QHeaderView::sectionSize(int logicalIndex) const
}
/*!
- Returns the section position of the given \a logicalIndex, or -1 if the
- section is hidden.
+
+ Returns the section position of the given \a logicalIndex, or -1
+ if the section is hidden. The position is measured in pixels from
+ the first visible item's top-left corner to the top-left corner of
+ the item with \a logicalIndex. The measurement is along the x-axis
+ for horizontal headers and along the y-axis for vertical headers.
\sa sectionViewportPosition()
*/
diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp
index 94e3b76..61a935f 100644
--- a/src/gui/itemviews/qlistwidget.cpp
+++ b/src/gui/itemviews/qlistwidget.cpp
@@ -1500,7 +1500,9 @@ void QListWidget::setCurrentRow(int row, QItemSelectionModel::SelectionFlags com
}
/*!
- Returns a pointer to the item at the coordinates \a p.
+ Returns a pointer to the item at the coordinates \a p. The coordinates
+ are relative to the list widget's \l{QAbstractScrollArea::}{viewport()}.
+
*/
QListWidgetItem *QListWidget::itemAt(const QPoint &p) const
{
@@ -1514,6 +1516,9 @@ QListWidgetItem *QListWidget::itemAt(const QPoint &p) const
\overload
Returns a pointer to the item at the coordinates (\a x, \a y).
+ The coordinates are relative to the list widget's
+ \l{QAbstractScrollArea::}{viewport()}.
+
*/
diff --git a/src/gui/itemviews/qtreewidget.cpp b/src/gui/itemviews/qtreewidget.cpp
index 4db29d6..2ea9a43 100644
--- a/src/gui/itemviews/qtreewidget.cpp
+++ b/src/gui/itemviews/qtreewidget.cpp
@@ -2830,7 +2830,8 @@ void QTreeWidget::setCurrentItem(QTreeWidgetItem *item, int column,
/*!
- Returns a pointer to the item at the coordinates \a p.
+ Returns a pointer to the item at the coordinates \a p. The coordinates
+ are relative to the tree widget's \l{QAbstractScrollArea::}{viewport()}.
\sa visualItemRect()
*/
@@ -2844,7 +2845,8 @@ QTreeWidgetItem *QTreeWidget::itemAt(const QPoint &p) const
\fn QTreeWidgetItem *QTreeWidget::itemAt(int x, int y) const
\overload
- Returns a pointer to the item at the coordinates (\a x, \a y).
+ Returns a pointer to the item at the coordinates (\a x, \a y). The coordinates
+ are relative to the tree widget's \l{QAbstractScrollArea::}{viewport()}.
*/
/*!
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 3d642d0..769b136 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1271,15 +1271,36 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowIcon_sys(true);
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
- // If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
- QWidget *const window = qwidget->window();
- if (!window->parentWidget()) { // Only top level native windows have control over cba/status pane
- const bool decorationsVisible = !(window->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
- const bool statusPaneVisibility = decorationsVisible;
- const bool isFullscreen = window->windowState() & Qt::WindowFullScreen;
- const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint;
- const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaVisibilityHint));
- S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
+ if (qwidget->isWindow()) {
+ QWidget *const window = qwidget->window();
+ QWidget *parentWindow = window->parentWidget();
+ if (parentWindow) {
+ while (parentWindow->parentWidget())
+ parentWindow = parentWindow->parentWidget();
+ } else {
+ parentWindow = window;
+ }
+
+ const bool parentDecorationsVisible = !(parentWindow->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool parentIsFullscreen = parentWindow->windowState() & Qt::WindowFullScreen;
+ const bool parentCbaVisibilityHint = parentWindow->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ bool buttonGroupVisibility = (parentDecorationsVisible || (parentIsFullscreen && parentCbaVisibilityHint));
+
+ // For non-toplevel normal and maximized windows, show cba if window has softkey
+ // actions even if topmost parent is not showing cba. Do the same for fullscreen
+ // windows that request it.
+ if (!buttonGroupVisibility
+ && window->parentWidget()
+ && !(window->windowState() & Qt::WindowMinimized)
+ && ((window->windowFlags() & Qt::WindowSoftkeysVisibleHint) || !(window->windowState() & Qt::WindowFullScreen))) {
+ for (int i = 0; i < window->actions().size(); ++i) {
+ if (window->actions().at(i)->softKeyRole() != QAction::NoSoftKey) {
+ buttonGroupVisibility = true;
+ break;
+ }
+ }
+ }
+ S60->setStatusPaneAndButtonGroupVisibility(parentDecorationsVisible, buttonGroupVisibility);
}
#endif
} else if (QApplication::activeWindow() == qwidget->window()) {
@@ -1455,6 +1476,35 @@ bool QSymbianControl::isControlActive()
return IsActivated() ? true : false;
}
+void QSymbianControl::ensureFixNativeOrientation()
+{
+#if defined(Q_SYMBIAN_SUPPORTS_FIXNATIVEORIENTATION)
+ // Call FixNativeOrientation() for fullscreen QDeclarativeViews that
+ // have a locked orientation matching the native orientation of the device.
+ // This avoids unnecessary window rotation on wserv level.
+ if (!qwidget->isWindow() || qwidget->windowType() == Qt::Desktop
+ || !qwidget->inherits("QDeclarativeView")
+ || S60->screenNumberForWidget(qwidget) > 0)
+ return;
+ const bool isFullScreen = qwidget->windowState().testFlag(Qt::WindowFullScreen);
+ const bool isFixed = qwidget->d_func()->fixNativeOrientationCalled;
+ const bool matchesNative = qwidget->testAttribute(
+ S60->nativeOrientationIsPortrait ? Qt::WA_LockPortraitOrientation
+ : Qt::WA_LockLandscapeOrientation);
+ if (isFullScreen && matchesNative) {
+ if (!isFixed) {
+ Window().FixNativeOrientation();
+ qwidget->d_func()->fixNativeOrientationCalled = true;
+ }
+ } else if (isFixed) {
+ qwidget->d_func()->fixNativeOrientationCalled = false;
+ qwidget->hide();
+ qwidget->d_func()->create_sys(0, false, true);
+ qwidget->show();
+ }
+#endif
+}
+
/*!
\typedef QApplication::QS60MainApplicationFactory
\since 4.6
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 54e7e3e..b5e5d18 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -254,7 +254,10 @@ static int qCocoaViewCount = 0;
qt_mac_retain_graphics_context(context);
// We use a different graphics system.
- if (QApplicationPrivate::graphicsSystem() != 0) {
+ //
+ // Widgets that are set to paint on screen, specifically QGLWidget,
+ // requires the native engine to execute in order to be drawn.
+ if (QApplicationPrivate::graphicsSystem() != 0 && !qwidget->testAttribute(Qt::WA_PaintOnScreen)) {
// Raster engine.
if (QApplicationPrivate::graphics_system_name == QLatin1String("raster")) {
@@ -334,12 +337,6 @@ static int qCocoaViewCount = 0;
qwidget->update(qwidget->rect());
qwidgetprivate->syncBackingStore(qwidget->rect());
}
-
- // Since we don't want to use the native engine, we must exit, however
- // widgets that are set to paint on screen, specifically QGLWidget,
- // requires the following code to execute in order to be drawn.
- if (!qwidget->testAttribute(Qt::WA_PaintOnScreen))
- return;
}
// Native engine.
diff --git a/src/gui/kernel/qkeymapper_s60.cpp b/src/gui/kernel/qkeymapper_s60.cpp
index bcf32a5..08cfae0 100644
--- a/src/gui/kernel/qkeymapper_s60.cpp
+++ b/src/gui/kernel/qkeymapper_s60.cpp
@@ -69,8 +69,17 @@ void QKeyMapperPrivate::clearMappings()
QString QKeyMapperPrivate::translateKeyEvent(int keySym, Qt::KeyboardModifiers /* modifiers */)
{
- if (keySym >= Qt::Key_Escape)
- return QString();
+ if (keySym >= Qt::Key_Escape) {
+ switch (keySym) {
+ case Qt::Key_Tab:
+ return QString(QChar('\t'));
+ case Qt::Key_Return: // fall through
+ case Qt::Key_Enter:
+ return QString(QChar('\r'));
+ default:
+ return QString();
+ }
+ }
// Symbian doesn't actually use modifiers, but gives us the character code directly.
diff --git a/src/gui/kernel/qsoftkeymanager.cpp b/src/gui/kernel/qsoftkeymanager.cpp
index 1b26933..204efe9 100644
--- a/src/gui/kernel/qsoftkeymanager.cpp
+++ b/src/gui/kernel/qsoftkeymanager.cpp
@@ -50,6 +50,10 @@
#include "private/qsoftkeymanager_s60_p.h"
#endif
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+#include "private/qt_s60_p.h"
+#endif
+
#ifndef QT_NO_SOFTKEYMANAGER
QT_BEGIN_NAMESPACE
@@ -101,6 +105,30 @@ QSoftKeyManager::QSoftKeyManager() :
QAction *QSoftKeyManager::createAction(StandardSoftKey standardKey, QWidget *actionWidget)
{
QAction *action = new QAction(standardSoftKeyText(standardKey), actionWidget);
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ int key = 0;
+ switch (standardKey) {
+ case OkSoftKey:
+ key = EAknSoftkeyOk;
+ break;
+ case SelectSoftKey:
+ key = EAknSoftkeySelect;
+ break;
+ case DoneSoftKey:
+ key = EAknSoftkeyDone;
+ break;
+ case MenuSoftKey:
+ key = EAknSoftkeyOptions;
+ break;
+ case CancelSoftKey:
+ key = EAknSoftkeyCancel;
+ break;
+ default:
+ break;
+ };
+ if (key != 0)
+ QSoftKeyManager::instance()->d_func()->softKeyCommandActions.insert(action, key);
+#endif
QAction::SoftKeyRole softKeyRole = QAction::NoSoftKey;
switch (standardKey) {
case MenuSoftKey: // FALL-THROUGH
@@ -143,6 +171,9 @@ void QSoftKeyManager::cleanupHash(QObject *obj)
Q_D(QSoftKeyManager);
QAction *action = qobject_cast<QAction*>(obj);
d->keyedActions.remove(action);
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ d->softKeyCommandActions.remove(action);
+#endif
}
void QSoftKeyManager::sendKeyEvent()
diff --git a/src/gui/kernel/qsoftkeymanager_common_p.h b/src/gui/kernel/qsoftkeymanager_common_p.h
index 27d8ee9..02ae697 100644
--- a/src/gui/kernel/qsoftkeymanager_common_p.h
+++ b/src/gui/kernel/qsoftkeymanager_common_p.h
@@ -72,6 +72,9 @@ protected:
QMultiHash<int, QAction*> requestedSoftKeyActions;
QWidget *initialSoftKeySource;
bool pendingUpdate;
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ QHash<QAction*, int> softKeyCommandActions;
+#endif
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qsoftkeymanager_s60.cpp b/src/gui/kernel/qsoftkeymanager_s60.cpp
index 3496297..79ed91a 100644
--- a/src/gui/kernel/qsoftkeymanager_s60.cpp
+++ b/src/gui/kernel/qsoftkeymanager_s60.cpp
@@ -113,12 +113,20 @@ void QSoftKeyManagerPrivateS60::ensureCbaVisibilityAndResponsiviness(CEikButtonG
void QSoftKeyManagerPrivateS60::clearSoftkeys(CEikButtonGroupContainer &cba)
{
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ QT_TRAP_THROWING(
+ //EAknSoftkeyEmpty is used, because using -1 adds softkeys without actions on Symbian3
+ cba.SetCommandL(0, EAknSoftkeyEmpty, KNullDesC);
+ cba.SetCommandL(2, EAknSoftkeyEmpty, KNullDesC);
+ );
+#else
QT_TRAP_THROWING(
//Using -1 instead of EAknSoftkeyEmpty to avoid flickering.
cba.SetCommandL(0, -1, KNullDesC);
// TODO: Should we clear also middle SK?
cba.SetCommandL(2, -1, KNullDesC);
);
+#endif
realSoftKeyActions.clear();
}
@@ -290,6 +298,10 @@ bool QSoftKeyManagerPrivateS60::setSoftkey(CEikButtonGroupContainer &cba,
QString text = softkeyText(*action);
TPtrC nativeText = qt_QString2TPtrC(text);
int command = S60_COMMAND_START + position;
+#ifdef SYMBIAN_VERSION_SYMBIAN3
+ if (softKeyCommandActions.contains(action))
+ command = softKeyCommandActions.value(action);
+#endif
setNativeSoftkey(cba, position, command, nativeText);
const bool dimmed = !action->isEnabled() && !QSoftKeyManager::isForceEnabledInSofkeys(action);
cba.DimCommand(command, dimmed);
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 3bb27c3..102c0ca 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -189,6 +189,8 @@ public:
int screenHeightInPixelsForScreen[qt_symbian_max_screens];
int screenWidthInTwipsForScreen[qt_symbian_max_screens];
int screenHeightInTwipsForScreen[qt_symbian_max_screens];
+
+ bool nativeOrientationIsPortrait;
};
Q_AUTOTEST_EXPORT QS60Data* qGlobalS60Data();
@@ -233,6 +235,8 @@ public:
bool isControlActive();
+ void ensureFixNativeOrientation();
+
#ifdef Q_WS_S60
void FadeBehindPopup(bool fade){ popupFader.FadeBehindPopup( this, this, fade); }
void HandleStatusPaneSizeChange();
@@ -327,9 +331,11 @@ inline QS60Data::QS60Data()
inline void QS60Data::updateScreenSize()
{
+ CWsScreenDevice *dev = S60->screenDevice();
+ int screenModeCount = dev->NumScreenModes();
+ int mode = dev->CurrentScreenMode();
TPixelsTwipsAndRotation params;
- int mode = S60->screenDevice()->CurrentScreenMode();
- S60->screenDevice()->GetScreenModeSizeAndRotation(mode, params);
+ dev->GetScreenModeSizeAndRotation(mode, params);
S60->screenWidthInPixels = params.iPixelSize.iWidth;
S60->screenHeightInPixels = params.iPixelSize.iHeight;
S60->screenWidthInTwips = params.iTwipsSize.iWidth;
@@ -352,6 +358,21 @@ inline void QS60Data::updateScreenSize()
S60->screenWidthInTwipsForScreen[i] = params.iTwipsSize.iWidth;
S60->screenHeightInTwipsForScreen[i] = params.iTwipsSize.iHeight;
}
+
+ // Look for a screen mode with rotation 0
+ // in order to decide what the native orientation is.
+ int nativeScreenWidthInPixels = 0;
+ int nativeScreenHeightInPixels = 0;
+ for (mode = 0; mode < screenModeCount; ++mode) {
+ TPixelsAndRotation sizeAndRotation;
+ dev->GetScreenModeSizeAndRotation(mode, sizeAndRotation);
+ if (sizeAndRotation.iRotation == CFbsBitGc::EGraphicsOrientationNormal) {
+ nativeScreenWidthInPixels = sizeAndRotation.iPixelSize.iWidth;
+ nativeScreenHeightInPixels = sizeAndRotation.iPixelSize.iHeight;
+ break;
+ }
+ }
+ S60->nativeOrientationIsPortrait = nativeScreenWidthInPixels <= nativeScreenHeightInPixels;
}
inline RWsSession& QS60Data::wsSession()
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 4b7349b..3cc3e65 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -312,6 +312,7 @@ QWidgetPrivate::QWidgetPrivate(int version)
, qd_hd(0)
#elif defined(Q_OS_SYMBIAN)
, symbianScreenNumber(0)
+ , fixNativeOrientationCalled(false)
#endif
{
if (!qApp) {
@@ -10970,6 +10971,9 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
}
QT_TRAP_THROWING(appUi->SetOrientationL(s60orientation));
S60->orientationSet = true;
+ QSymbianControl *window = static_cast<QSymbianControl *>(internalWinId());
+ if (window)
+ window->ensureFixNativeOrientation();
#endif
break;
}
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index e5a2c35..919f8bc 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -908,6 +908,7 @@ public:
static QWidget *mouseGrabber;
static QWidget *keyboardGrabber;
int symbianScreenNumber; // only valid for desktop widget and top-levels
+ bool fixNativeOrientationCalled;
void s60UpdateIsOpaque();
void reparentChildren();
void registerTouchWindow();
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index b031936..c74c7eb 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -278,6 +278,8 @@ void QWidgetPrivate::setGeometry_sys(int x, int y, int w, int h, bool isMove)
q->internalWinId()->SetRect(TRect(TPoint(x, y), TSize(w, h)));
topData()->normalGeometry = data.crect;
}
+ QSymbianControl *window = static_cast<QSymbianControl *>(q->internalWinId());
+ window->ensureFixNativeOrientation();
} else {
data.crect.setRect(x, y, w, h);
@@ -1208,17 +1210,41 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
}
#ifdef Q_WS_S60
- bool decorationsVisible(false);
- if (!parentWidget()) { // Only top level native windows have control over cba/status pane
- // Hide window decoration when switching to fullscreen / minimized otherwise show decoration.
- // The window decoration visibility has to be changed before doing actual window state
- // change since in that order the availableGeometry will return directly the right size and
- // we will avoid unnecessary redraws
- decorationsVisible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
- const bool statusPaneVisibility = decorationsVisible;
- const bool buttonGroupVisibility = (decorationsVisible || (isFullscreen && cbaRequested));
- S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
+ // Hide window decoration when switching to fullscreen / minimized otherwise show decoration.
+ // The window decoration visibility has to be changed before doing actual window state
+ // change since in that order the availableGeometry will return directly the right size and
+ // we will avoid unnecessary redraws
+ Qt::WindowStates comparisonState = newstate;
+ QWidget *parentWindow = parentWidget();
+ if (parentWindow) {
+ while (parentWindow->parentWidget())
+ parentWindow = parentWindow->parentWidget();
+ comparisonState = parentWindow->windowState();
+ } else {
+ parentWindow = this;
+ }
+
+ const bool decorationsVisible = !(comparisonState & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool parentIsFullscreen = comparisonState & Qt::WindowFullScreen;
+ const bool parentCbaVisibilityHint = parentWindow->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ bool buttonGroupVisibility = (decorationsVisible || (parentIsFullscreen && parentCbaVisibilityHint));
+
+ // For non-toplevel normal and maximized windows, show cba if window has softkey
+ // actions even if topmost parent is not showing cba. Do the same for fullscreen
+ // windows that request it.
+ if (!buttonGroupVisibility
+ && parentWidget()
+ && !(newstate & Qt::WindowMinimized)
+ && ((windowFlags() & Qt::WindowSoftkeysVisibleHint) || !(newstate & Qt::WindowFullScreen))) {
+ for (int i = 0; i < actions().size(); ++i) {
+ if (actions().at(i)->softKeyRole() != QAction::NoSoftKey) {
+ buttonGroupVisibility = true;
+ break;
+ }
+ }
}
+ S60->setStatusPaneAndButtonGroupVisibility(decorationsVisible, buttonGroupVisibility);
+
#endif // Q_WS_S60
// Ensure the initial size is valid, since we store it as normalGeometry below.
@@ -1277,6 +1303,12 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
if (newstate & Qt::WindowActive)
activateWindow();
+ if (isWindow()) {
+ // Now that the new state is set, fix the display memory layout, if needed.
+ QSymbianControl *window = static_cast<QSymbianControl *>(effectiveWinId());
+ window->ensureFixNativeOrientation();
+ }
+
QWindowStateChangeEvent e(oldstate);
QApplication::sendEvent(this, &e);
}
@@ -1423,7 +1455,8 @@ void QWidget::activateWindow()
if (tlw->isVisible()) {
window()->createWinId();
QSymbianControl *id = static_cast<QSymbianControl *>(tlw->internalWinId());
- id->setFocusSafely(true);
+ if (!id->IsFocused())
+ id->setFocusSafely(true);
}
}
diff --git a/src/gui/painting/qbackingstore.cpp b/src/gui/painting/qbackingstore.cpp
index e5d8abc..42c1c35 100644
--- a/src/gui/painting/qbackingstore.cpp
+++ b/src/gui/painting/qbackingstore.cpp
@@ -588,7 +588,7 @@ void QWidgetBackingStore::markDirty(const QRegion &rgn, QWidget *widget, bool up
return;
}
- if (!windowSurface->hasPartialUpdateSupport()) {
+ if (!windowSurface->hasFeature(QWindowSurface::PartialUpdates)) {
fullUpdatePending = true;
sendUpdateRequest(tlw, updateImmediately);
return;
@@ -683,7 +683,7 @@ void QWidgetBackingStore::markDirty(const QRect &rect, QWidget *widget, bool upd
return;
}
- if (!windowSurface->hasPartialUpdateSupport()) {
+ if (!windowSurface->hasFeature(QWindowSurface::PartialUpdates)) {
fullUpdatePending = true;
sendUpdateRequest(tlw, updateImmediately);
return;
@@ -1143,9 +1143,9 @@ void QWidgetBackingStore::sync(QWidget *exposedWidget, const QRegion &exposedReg
return;
}
- // If there's no partial update support we always need
+ // If there's no preserved contents support we always need
// to do a full repaint before flushing
- if (!windowSurface->hasPartialUpdateSupport())
+ if (!windowSurface->hasFeature(QWindowSurface::PreservedContents))
fullUpdatePending = true;
// Nothing to repaint.
diff --git a/src/gui/painting/qbackingstore_p.h b/src/gui/painting/qbackingstore_p.h
index 39bf66c..05f4bfc 100644
--- a/src/gui/painting/qbackingstore_p.h
+++ b/src/gui/painting/qbackingstore_p.h
@@ -262,8 +262,7 @@ private:
}
inline bool hasStaticContents() const
- { return !staticWidgets.isEmpty() && windowSurface->hasStaticContentsSupport()
- && windowSurface->hasPartialUpdateSupport(); }
+ { return !staticWidgets.isEmpty() && windowSurface->hasFeature(QWindowSurface::StaticContents); }
friend QRegion qt_dirtyRegion(QWidget *);
friend class QWidgetPrivate;
diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp
index 46a6f81..d1dd7ef 100644
--- a/src/gui/painting/qgraphicssystem_runtime.cpp
+++ b/src/gui/painting/qgraphicssystem_runtime.cpp
@@ -319,14 +319,9 @@ QPoint QRuntimeWindowSurface::offset(const QWidget *widget) const
return m_windowSurface->offset(widget);
}
-bool QRuntimeWindowSurface::hasStaticContentsSupport() const
+QWindowSurface::WindowSurfaceFeatures QRuntimeWindowSurface::features() const
{
- return m_windowSurface->hasStaticContentsSupport();
-}
-
-bool QRuntimeWindowSurface::hasPartialUpdateSupport() const
-{
- return m_windowSurface->hasPartialUpdateSupport();
+ return m_windowSurface->features();
}
QRuntimeGraphicsSystem::QRuntimeGraphicsSystem()
diff --git a/src/gui/painting/qgraphicssystem_runtime_p.h b/src/gui/painting/qgraphicssystem_runtime_p.h
index 998fa98..26d3777 100644
--- a/src/gui/painting/qgraphicssystem_runtime_p.h
+++ b/src/gui/painting/qgraphicssystem_runtime_p.h
@@ -129,8 +129,7 @@ public:
virtual QPoint offset(const QWidget *widget) const;
- virtual bool hasStaticContentsSupport() const;
- virtual bool hasPartialUpdateSupport() const;
+ virtual WindowSurfaceFeatures features() const;
QScopedPointer<QWindowSurface> m_windowSurface;
QScopedPointer<QWindowSurface> m_pendingWindowSurface;
diff --git a/src/gui/painting/qpaintbuffer.cpp b/src/gui/painting/qpaintbuffer.cpp
index fac356c..dd4b3db 100644
--- a/src/gui/painting/qpaintbuffer.cpp
+++ b/src/gui/painting/qpaintbuffer.cpp
@@ -54,8 +54,6 @@
QT_BEGIN_NAMESPACE
-Q_GUI_EXPORT extern int qt_defaultDpiX();
-Q_GUI_EXPORT extern int qt_defaultDpiY();
extern void qt_format_text(const QFont &font,
const QRectF &_r, int tf, const QTextOption *option, const QString& str, QRectF *brect,
int tabstops, int* tabarray, int tabarraylen,
diff --git a/src/gui/painting/qpaintengine_alpha.cpp b/src/gui/painting/qpaintengine_alpha.cpp
index 339a002..171850d 100644
--- a/src/gui/painting/qpaintengine_alpha.cpp
+++ b/src/gui/painting/qpaintengine_alpha.cpp
@@ -46,6 +46,7 @@
#include "private/qpaintengine_alpha_p.h"
#include "private/qpicture_p.h"
+#include "private/qfont_p.h"
#include "QtGui/qpicture.h"
QT_BEGIN_NAMESPACE
@@ -93,9 +94,6 @@ bool QAlphaPaintEngine::begin(QPaintDevice *pdev)
return true;
}
-Q_GUI_EXPORT extern int qt_defaultDpiX();
-Q_GUI_EXPORT extern int qt_defaultDpiY();
-
bool QAlphaPaintEngine::end()
{
Q_D(QAlphaPaintEngine);
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
index 2f35dcd..8aab7c7 100644
--- a/src/gui/painting/qpaintengine_mac.cpp
+++ b/src/gui/painting/qpaintengine_mac.cpp
@@ -972,7 +972,7 @@ void QCoreGraphicsPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, co
return;
bool differentSize = (QRectF(0, 0, pm.width(), pm.height()) != sr), doRestore = false;
- CGRect rect = CGRectMake(qRound(r.x()), qRound(r.y()), qRound(r.width()), qRound(r.height()));
+ CGRect rect = CGRectMake(r.x(), r.y(), r.width(), r.height());
QCFType<CGImageRef> image;
bool isBitmap = (pm.depth() == 1);
if (isBitmap) {
diff --git a/src/gui/painting/qpaintengine_mac_p.h b/src/gui/painting/qpaintengine_mac_p.h
index 5c459ee..3e71d6c 100644
--- a/src/gui/painting/qpaintengine_mac_p.h
+++ b/src/gui/painting/qpaintengine_mac_p.h
@@ -57,15 +57,12 @@
#include "private/qt_mac_p.h"
#include "private/qpaintengine_p.h"
#include "private/qpolygonclipper_p.h"
+#include "private/qfont_p.h"
#include "QtCore/qhash.h"
typedef struct CGColorSpace *CGColorSpaceRef;
QT_BEGIN_NAMESPACE
-extern int qt_defaultDpi();
-extern int qt_defaultDpiX();
-extern int qt_defaultDpiY();
-
class QCoreGraphicsPaintEnginePrivate;
class QCoreGraphicsPaintEngine : public QPaintEngine
{
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 64ef549..50d65e6 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -6468,7 +6468,8 @@ static void drawTextItemDecoration(QPainter *painter, const QPointF &pos, const
const qreal underlineOffset = fe->underlinePosition().toReal();
// deliberately ceil the offset to avoid the underline coming too close to
// the text above it.
- const qreal underlinePos = pos.y() + qCeil(underlineOffset);
+ const qreal aliasedCoordinateDelta = 0.5 - 0.015625;
+ const qreal underlinePos = pos.y() + qCeil(underlineOffset) - aliasedCoordinateDelta;
if (underlineStyle == QTextCharFormat::SpellCheckUnderline) {
underlineStyle = QTextCharFormat::UnderlineStyle(QApplication::style()->styleHint(QStyle::SH_SpellCheckUnderlineStyle));
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 49f1a5f..2058040 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1897,39 +1897,39 @@ static bool qt_painterpath_isect_line_rect(qreal x1, qreal y1, qreal x2, qreal y
return false;
}
-static bool qt_isect_curve_horizontal(const QBezier &bezier, qreal y, qreal x1, qreal x2)
+static bool qt_isect_curve_horizontal(const QBezier &bezier, qreal y, qreal x1, qreal x2, int depth = 0)
{
QRectF bounds = bezier.bounds();
if (y >= bounds.top() && y < bounds.bottom()
&& bounds.right() >= x1 && bounds.left() < x2) {
const qreal lower_bound = qreal(.01);
- if (bounds.width() < lower_bound && bounds.height() < lower_bound)
+ if (depth == 32 || bounds.width() < lower_bound && bounds.height() < lower_bound)
return true;
QBezier first_half, second_half;
bezier.split(&first_half, &second_half);
- if (qt_isect_curve_horizontal(first_half, y, x1, x2)
- || qt_isect_curve_horizontal(second_half, y, x1, x2))
+ if (qt_isect_curve_horizontal(first_half, y, x1, x2, depth + 1)
+ || qt_isect_curve_horizontal(second_half, y, x1, x2, depth + 1))
return true;
}
return false;
}
-static bool qt_isect_curve_vertical(const QBezier &bezier, qreal x, qreal y1, qreal y2)
+static bool qt_isect_curve_vertical(const QBezier &bezier, qreal x, qreal y1, qreal y2, int depth = 0)
{
QRectF bounds = bezier.bounds();
if (x >= bounds.left() && x < bounds.right()
&& bounds.bottom() >= y1 && bounds.top() < y2) {
const qreal lower_bound = qreal(.01);
- if (bounds.width() < lower_bound && bounds.height() < lower_bound)
+ if (depth == 32 || bounds.width() < lower_bound && bounds.height() < lower_bound)
return true;
QBezier first_half, second_half;
bezier.split(&first_half, &second_half);
- if (qt_isect_curve_vertical(first_half, x, y1, y2)
- || qt_isect_curve_vertical(second_half, x, y1, y2))
+ if (qt_isect_curve_vertical(first_half, x, y1, y2, depth + 1)
+ || qt_isect_curve_vertical(second_half, x, y1, y2, depth + 1))
return true;
}
return false;
diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp
index bc30038..0271a39 100644
--- a/src/gui/painting/qpdf.cpp
+++ b/src/gui/painting/qpdf.cpp
@@ -47,6 +47,7 @@
#include "private/qcups_p.h"
#include "qprinterinfo.h"
#include <qnumeric.h>
+#include "private/qfont_p.h"
#ifdef Q_OS_UNIX
#include "private/qcore_unix_p.h" // overrides QT_OPEN
@@ -54,8 +55,6 @@
QT_BEGIN_NAMESPACE
-Q_GUI_EXPORT extern int qt_defaultDpi();
-
#ifndef QT_NO_PRINTER
extern QSizeF qt_paperSizeToQSizeF(QPrinter::PaperSize size);
diff --git a/src/gui/painting/qprintengine_mac.mm b/src/gui/painting/qprintengine_mac.mm
index ec842a9..1dce303 100644
--- a/src/gui/painting/qprintengine_mac.mm
+++ b/src/gui/painting/qprintengine_mac.mm
@@ -49,7 +49,6 @@
QT_BEGIN_NAMESPACE
extern QSizeF qt_paperSizeToQSizeF(QPrinter::PaperSize size);
-extern int qt_defaultDpi();
QMacPrintEngine::QMacPrintEngine(QPrinter::PrinterMode mode) : QPaintEngine(*(new QMacPrintEnginePrivate))
{
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 727852d..53f025f 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -168,7 +168,7 @@ bool QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const
continue;
if (listItemCoordinates.contains(GlyphAndSubPixelPosition(glyph, subPixelPosition)))
continue;
- glyph_metrics_t metrics = fontEngine->alphaMapBoundingBox(glyph, m_transform, format);
+ glyph_metrics_t metrics = fontEngine->alphaMapBoundingBox(glyph, subPixelPosition, m_transform, format);
#ifdef CACHE_DEBUG
printf("(%4x): w=%.2f, h=%.2f, xoff=%.2f, yoff=%.2f, x=%.2f, y=%.2f\n",
diff --git a/src/gui/painting/qwindowsurface.cpp b/src/gui/painting/qwindowsurface.cpp
index 9b71818..0fb9bf7 100644
--- a/src/gui/painting/qwindowsurface.cpp
+++ b/src/gui/painting/qwindowsurface.cpp
@@ -307,11 +307,6 @@ QPoint QWindowSurface::offset(const QWidget *widget) const
window surface.
*/
-bool QWindowSurface::hasStaticContentsSupport() const
-{
- return false;
-}
-
void QWindowSurface::setStaticContents(const QRegion &region)
{
d_ptr->staticContents = region;
@@ -324,12 +319,12 @@ QRegion QWindowSurface::staticContents() const
bool QWindowSurface::hasStaticContents() const
{
- return hasStaticContentsSupport() && !d_ptr->staticContents.isEmpty();
+ return hasFeature(QWindowSurface::StaticContents) && !d_ptr->staticContents.isEmpty();
}
-bool QWindowSurface::hasPartialUpdateSupport() const
+QWindowSurface::WindowSurfaceFeatures QWindowSurface::features() const
{
- return true;
+ return PartialUpdates | PreservedContents;
}
#ifdef Q_WS_QPA
diff --git a/src/gui/painting/qwindowsurface_p.h b/src/gui/painting/qwindowsurface_p.h
index 4a2775f..a3fea67 100644
--- a/src/gui/painting/qwindowsurface_p.h
+++ b/src/gui/painting/qwindowsurface_p.h
@@ -68,6 +68,14 @@ class QPlatformWindow;
class Q_GUI_EXPORT QWindowSurface
{
public:
+ enum WindowSurfaceFeature {
+ PartialUpdates = 0x00000001, // Supports doing partial updates.
+ PreservedContents = 0x00000002, // Supports doing flush without first doing a repaint.
+ StaticContents = 0x00000004, // Supports having static content regions when being resized.
+ AllFeatures = 0xffffffff // For convenience
+ };
+ Q_DECLARE_FLAGS(WindowSurfaceFeatures, WindowSurfaceFeature)
+
QWindowSurface(QWidget *window, bool setDefaultSurface = true);
virtual ~QWindowSurface();
@@ -100,8 +108,8 @@ public:
virtual QPoint offset(const QWidget *widget) const;
inline QRect rect(const QWidget *widget) const;
- virtual bool hasStaticContentsSupport() const;
- virtual bool hasPartialUpdateSupport() const;
+ bool hasFeature(WindowSurfaceFeature feature) const;
+ virtual WindowSurfaceFeatures features() const;
void setStaticContents(const QRegion &region);
QRegion staticContents() const;
@@ -113,11 +121,18 @@ private:
QWindowSurfacePrivate *d_ptr;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QWindowSurface::WindowSurfaceFeatures)
+
inline QRect QWindowSurface::rect(const QWidget *widget) const
{
return widget->rect().translated(offset(widget));
}
+inline bool QWindowSurface::hasFeature(WindowSurfaceFeature feature) const
+{
+ return (features() & feature) != 0;
+}
+
QT_END_NAMESPACE
#endif // QWINDOWSURFACE_P_H
diff --git a/src/gui/painting/qwindowsurface_raster.cpp b/src/gui/painting/qwindowsurface_raster.cpp
index a5c45c0..9860841 100644
--- a/src/gui/painting/qwindowsurface_raster.cpp
+++ b/src/gui/painting/qwindowsurface_raster.cpp
@@ -410,12 +410,11 @@ bool QRasterWindowSurface::scroll(const QRegion &area, int dx, int dy)
#endif
}
-bool QRasterWindowSurface::hasStaticContentsSupport() const
+QWindowSurface::WindowSurfaceFeatures QRasterWindowSurface::features() const
{
- return true;
+ return QWindowSurface::AllFeatures;
}
-
void QRasterWindowSurface::prepareBuffer(QImage::Format format, QWidget *widget)
{
Q_D(QRasterWindowSurface);
diff --git a/src/gui/painting/qwindowsurface_raster_p.h b/src/gui/painting/qwindowsurface_raster_p.h
index 669511d..06abcd3 100644
--- a/src/gui/painting/qwindowsurface_raster_p.h
+++ b/src/gui/painting/qwindowsurface_raster_p.h
@@ -109,7 +109,7 @@ public:
void beginPaint(const QRegion &rgn);
void setGeometry(const QRect &rect);
bool scroll(const QRegion &area, int dx, int dy);
- bool hasStaticContentsSupport() const;
+ WindowSurfaceFeatures features() const;
#ifdef QT_MAC_USE_COCOA
CGContextRef imageContext();
diff --git a/src/gui/painting/qwindowsurface_s60.cpp b/src/gui/painting/qwindowsurface_s60.cpp
index 4fa25cb..9fa01ed 100644
--- a/src/gui/painting/qwindowsurface_s60.cpp
+++ b/src/gui/painting/qwindowsurface_s60.cpp
@@ -239,9 +239,9 @@ void QS60WindowSurface::setGeometry(const QRect& rect)
QWindowSurface::setGeometry(rect);
}
-bool QS60WindowSurface::hasStaticContentsSupport() const
+QWindowSurface::WindowSurfaceFeatures QS60WindowSurface::features() const
{
- return true;
+ return QWindowSurface::AllFeatures;
}
CFbsBitmap* QS60WindowSurface::symbianBitmap() const
diff --git a/src/gui/painting/qwindowsurface_s60_p.h b/src/gui/painting/qwindowsurface_s60_p.h
index f730c87..25018d8 100644
--- a/src/gui/painting/qwindowsurface_s60_p.h
+++ b/src/gui/painting/qwindowsurface_s60_p.h
@@ -79,7 +79,7 @@ public:
void setGeometry(const QRect &rect);
- bool hasStaticContentsSupport() const;
+ WindowSurfaceFeatures features() const;
CFbsBitmap *symbianBitmap() const;
diff --git a/src/gui/painting/qwindowsurface_x11.cpp b/src/gui/painting/qwindowsurface_x11.cpp
index ab4f53e..deb83b4 100644
--- a/src/gui/painting/qwindowsurface_x11.cpp
+++ b/src/gui/painting/qwindowsurface_x11.cpp
@@ -250,13 +250,16 @@ QPixmap QX11WindowSurface::grabWidget(const QWidget *widget,
return px;
}
-bool QX11WindowSurface::hasStaticContentsSupport() const
+QWindowSurface::WindowSurfaceFeatures QX11WindowSurface::features() const
{
+ WindowSurfaceFeatures features = QWindowSurface::PartialUpdates | QWindowSurface::PreservedContents;
#ifndef QT_NO_XRENDER
- return !d_ptr->translucentBackground;
+ if (!d_ptr->translucentBackground)
+ features |= QWindowSurface::StaticContents;
#else
- return true;
+ features |= QWindowSurface::StaticContents;
#endif
+ return features;
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qwindowsurface_x11_p.h b/src/gui/painting/qwindowsurface_x11_p.h
index d5179dd..df76f98 100644
--- a/src/gui/painting/qwindowsurface_x11_p.h
+++ b/src/gui/painting/qwindowsurface_x11_p.h
@@ -80,7 +80,8 @@ public:
bool scroll(const QRegion &area, int dx, int dy);
QPixmap grabWidget(const QWidget *widget,
const QRect& rectangle = QRect()) const;
- bool hasStaticContentsSupport() const;
+ WindowSurfaceFeatures features() const;
+
private:
QX11WindowSurfacePrivate *d_ptr;
GC gc;
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index ac897b5..680e007 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -77,14 +77,12 @@
#include "private/qcombobox_p.h"
#include "private/qwidget_p.h"
#include "private/qapplication_p.h"
+#include "private/qfont_p.h"
#if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN)
QT_BEGIN_NAMESPACE
-// from text/qfont.cpp
-extern Q_GUI_EXPORT int qt_defaultDpiY();
-
const QS60StylePrivate::SkinElementFlags QS60StylePrivate::KDefaultSkinElementFlags =
SkinElementFlags(SF_PointNorth | SF_StateEnabled);
@@ -107,8 +105,8 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = {
// *** generated pixel metrics ***
{5,0,-909,0,0,2,0,2,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106},
{5,0,-909,0,0,1,0,2,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106},
-{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
-{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
+{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,11,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
+{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,13,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135},
{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106},
{9,0,-909,0,0,2,0,5,-1,34,99,76,51,51,25,352,-909,-909,-909,29,25,7,0,0,43,34,42,76,7,7,2,-909,-909,0,9,14,0,23,39,30,30,37,37,9,391,40,0,-909,-909,-909,-909,0,0,29,2,-909,0,0,-909,29,-909,-909,-909,-909,115,37,96,48,96,19,19,9,1,25,-909,9,101,24,9,0,7,7,7,16,7,7,-909,3,-909,-909,-909,-909,9,9,3,1,184}
// *** End of generated data ***
@@ -1743,16 +1741,26 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QStyleOptionMenuItem optionMenuItem = *menuItem;
bool drawSubMenuIndicator = false;
+ bool drawSeparator = false;
switch(menuItem->menuItemType) {
- case QStyleOptionMenuItem::Scroller:
case QStyleOptionMenuItem::Separator:
- return; // no separators or scrollers in S60 menus
+ drawSeparator = true;
+ break;
+ case QStyleOptionMenuItem::Scroller:
+ return; // no scrollers in S60 menus
case QStyleOptionMenuItem::SubMenu:
drawSubMenuIndicator = true;
break;
default:
break;
}
+ if (drawSeparator) {
+ painter->save();
+ painter->setPen(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 10, 0));
+ painter->drawLine(optionMenuItem.rect.topLeft(), optionMenuItem.rect.bottomRight());
+ painter->restore();
+ return;
+ }
const bool enabled = optionMenuItem.state & State_Enabled;
const bool checkable = optionMenuItem.checkType != QStyleOptionMenuItem::NotCheckable;
bool ignoreCheckMark = false;
@@ -1856,20 +1864,26 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
//In Sym^3, native menu items have "lines" between them
if (QS60StylePrivate::isSingleClickUi()) {
- const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0);
- const int spacing = QS60StylePrivate::pixelMetric(PM_FrameCornerWidth);
- //native platform sets each color byte to same value for "line 16" which just defines alpha for
- //menuitem lines; lets use first byte "red".
- QColor lineColor = optionMenuItem.palette.text().color();
- if (lineColorAlpha.isValid())
- lineColor.setAlpha(lineColorAlpha.red());
- painter->save();
- painter->setPen(lineColor);
-
- const int lineStartX = optionMenuItem.rect.left() + (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) + spacing;
- const int lineEndX = optionMenuItem.rect.right() - (QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - 2) - spacing;
- painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom()));
- painter->restore();
+ int diff = widget->geometry().bottom() - optionMenuItem.rect.bottom();
+ if (const QComboBox *cb = qobject_cast<const QComboBox*>(widget))
+ diff = cb->view()->geometry().bottom() - optionMenuItem.rect.bottom();
+
+ // Skip drawing the horizontal line for the last menu item.
+ if (diff > optionMenuItem.rect.height()) {
+ const QColor lineColorAlpha = QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 15, 0);
+ //native platform sets each color byte to same value for "line 16" which just defines alpha for
+ //menuitem lines; lets use first byte "red".
+ QColor lineColor = optionMenuItem.palette.text().color();
+ if (lineColorAlpha.isValid())
+ lineColor.setAlpha(lineColorAlpha.red());
+ painter->save();
+ painter->setPen(lineColor);
+ const int horizontalMargin = 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth) - QS60StylePrivate::pixelMetric(PM_DefaultFrameWidth);
+ const int lineStartX = optionMenuItem.rect.left() + horizontalMargin;
+ const int lineEndX = optionMenuItem.rect.right() - horizontalMargin;
+ painter->drawLine(QPoint(lineStartX, optionMenuItem.rect.bottom()), QPoint(lineEndX, optionMenuItem.rect.bottom()));
+ painter->restore();
+ }
}
if (!enabled)
painter->restore();
@@ -2264,13 +2278,16 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
#endif //QT_NO_MENU
) {
//Need extra check since dialogs have their own theme background
- if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) &&
- QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window))
- //todo: for combobox listviews, the background should include area for menu scrollers,
- //but this produces drawing issues as we need to turn clipping off.
- QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, option->rect, flags);
- else
+ if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget)
+ && QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window)) {
+ const bool comboMenu = qobject_cast<const QComboBoxListView *>(widget);
+ // Add margin area to the background, to avoid background being cut for first and last item.
+ const int verticalMenuAdjustment = comboMenu ? QS60StylePrivate::pixelMetric(PM_MenuVMargin) : 0;
+ const QRect adjustedMenuRect = option->rect.adjusted(0, -verticalMenuAdjustment, 0, verticalMenuAdjustment);
+ QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, adjustedMenuRect, flags);
+ } else {
commonStyleDraws = true;
+ }
}
break;
case PE_FrameWindow:
@@ -2538,17 +2555,16 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
tb->sizePolicy().horizontalPolicy() == QSizePolicy::Maximum) && tb->orientation() == Qt::Horizontal;
if (parentCanGrowHorizontally) {
- int visibleButtons = 0;
+ int buttons = 0;
//Make the auto-stretch to happen only for horizontal orientation
if (tb && tb->orientation() == Qt::Horizontal) {
QList<QAction*> actionList = tb->actions();
for (int i = 0; i < actionList.count(); i++) {
- if (actionList.at(i)->isVisible())
- visibleButtons++;
+ buttons++;
}
}
- if (widget->parentWidget() && visibleButtons > 0) {
+ if (widget->parentWidget() && buttons > 0) {
QWidget *w = const_cast<QWidget *>(widget);
int toolBarMaxWidth = 0;
int totalMargin = 0;
@@ -2571,7 +2587,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
toolBarMaxWidth -= totalMargin;
//ensure that buttons are side-by-side and not on top of each other
- const int toolButtonWidth = (toolBarMaxWidth / visibleButtons)
+ const int toolButtonWidth = (toolBarMaxWidth / buttons)
- pixelMetric(QStyle::PM_ToolBarItemSpacing)
- pixelMetric(QStyle::PM_ToolBarItemMargin)
//toolbar frame needs to be reduced again, since QToolBarLayout adds it for each toolbar action
@@ -2604,10 +2620,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz += QSize(2 * f->lineWidth, 4 * f->lineWidth);
break;
case CT_TabBarTab: {
- const QSize naviPaneSize = QS60StylePrivate::naviPaneSize();
sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
- if (naviPaneSize.height() > sz.height())
- sz.setHeight(naviPaneSize.height());
// Adjust beginning tabbar item size, if scrollbuttons are used. This is to ensure that the
// tabbar item content fits, since scrollbuttons are making beginning tabbar item smaller.
int scrollButtonSize = 0;
@@ -2627,7 +2640,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case CT_ItemViewItem:
if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
if (menuItem->menuItemType == QStyleOptionMenuItem::Separator) {
- sz = QSize();
+ sz = QSize(menuItem->rect.width() - 2 * pixelMetric(PM_MenuHMargin) - 2 * QS60StylePrivate::pixelMetric(PM_FrameCornerWidth), 1);
break;
}
}
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index 3628b27..e146a4e 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -562,8 +562,6 @@ public:
void handleSkinChange();
#endif // Q_WS_S60
- static QSize naviPaneSize();
-
//Checks that the current brush is transparent or has BrushStyle NoBrush,
//so that theme graphic background can be drawn.
static bool canDrawThemeBackground(const QBrush &backgroundBrush, const QWidget *widget);
diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp
index 64d2ad2..6a7158c 100644
--- a/src/gui/styles/qs60style_s60.cpp
+++ b/src/gui/styles/qs60style_s60.cpp
@@ -158,7 +158,6 @@ public:
static bool disabledPartGraphic(QS60StyleEnums::SkinParts &part);
static bool disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame);
static QPixmap generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part, const QSize &size, QS60StylePrivate::SkinElementFlags flags);
- static QSize naviPaneSize();
static TAknsItemID partSpecificThemeId(int part);
static QVariant themeDefinition(QS60StyleEnums::ThemeDefinitions definition, QS60StyleEnums::SkinParts part);
@@ -1478,23 +1477,6 @@ void QS60StylePrivate::handleSkinChange()
#endif
}
-QSize QS60StylePrivate::naviPaneSize()
-{
- return QS60StyleModeSpecifics::naviPaneSize();
-}
-
-QSize QS60StyleModeSpecifics::naviPaneSize()
-{
- CAknNavigationControlContainer* naviContainer;
- if (S60->statusPane()) {
- TRAPD(err, naviContainer = static_cast<CAknNavigationControlContainer*>
- (S60->statusPane()->ControlL(TUid::Uid(EEikStatusPaneUidNavi))));
- if (err==KErrNone)
- return QSize(naviContainer->Size().iWidth, naviContainer->Size().iHeight);
- }
- return QSize(0,0);
-}
-
int QS60StylePrivate::currentAnimationFrame(QS60StyleEnums::SkinParts part)
{
QS60StyleAnimation *animation = animationDefinition(part);
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 7223c6b..a5aeac3 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -318,11 +318,6 @@ QPixmap QS60StylePrivate::backgroundTexture(bool /*skipCreation*/)
return *m_background;
}
-QSize QS60StylePrivate::naviPaneSize()
-{
- return QSize(0, 0);
-}
-
bool QS60StylePrivate::isTouchSupported()
{
#ifdef QT_KEYPAD_NAVIGATION
diff --git a/src/gui/text/qfont_p.h b/src/gui/text/qfont_p.h
index c1a5048..43dca81 100644
--- a/src/gui/text/qfont_p.h
+++ b/src/gui/text/qfont_p.h
@@ -281,6 +281,10 @@ public:
int timer_id;
};
+Q_GUI_EXPORT int qt_defaultDpiX();
+Q_GUI_EXPORT int qt_defaultDpiY();
+Q_GUI_EXPORT int qt_defaultDpi();
+
QT_END_NAMESPACE
#endif // QFONT_P_H
diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp
index cbe0423..94f21b8 100644
--- a/src/gui/text/qfontdatabase.cpp
+++ b/src/gui/text/qfontdatabase.cpp
@@ -89,8 +89,6 @@ QT_BEGIN_NAMESPACE
#define SMOOTH_SCALABLE 0xffff
-Q_GUI_EXPORT extern int qt_defaultDpiY(); // in qfont.cpp
-
bool qt_enable_test_font = false;
Q_AUTOTEST_EXPORT void qt_setQtEnableTestFont(bool value)
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 08eb6bb..ffdaaa7 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -791,106 +791,6 @@ int QFontEngineFT::loadFlags(QGlyphSet *set, GlyphFormat format, int flags,
return load_flags;
}
-QFontEngineFT::Glyph *QFontEngineFT::loadGlyphMetrics(QGlyphSet *set, uint glyph, GlyphFormat format) const
-{
- Glyph *g = set->getGlyph(glyph);
- if (g && g->format == format)
- return g;
-
- bool hsubpixel = false;
- int vfactor = 1;
- int load_flags = loadFlags(set, format, 0, hsubpixel, vfactor);
-
- // apply our matrix to this, but note that the metrics will not be affected by this.
- FT_Face face = lockFace();
- FT_Matrix matrix = this->matrix;
- FT_Matrix_Multiply(&set->transformationMatrix, &matrix);
- FT_Set_Transform(face, &matrix, 0);
- freetype->matrix = matrix;
-
- bool transform = matrix.xx != 0x10000 || matrix.yy != 0x10000 || matrix.xy != 0 || matrix.yx != 0;
- if (transform)
- load_flags |= FT_LOAD_NO_BITMAP;
-
- FT_Error err = FT_Load_Glyph(face, glyph, load_flags);
- if (err && (load_flags & FT_LOAD_NO_BITMAP)) {
- load_flags &= ~FT_LOAD_NO_BITMAP;
- err = FT_Load_Glyph(face, glyph, load_flags);
- }
- if (err == FT_Err_Too_Few_Arguments) {
- // this is an error in the bytecode interpreter, just try to run without it
- load_flags |= FT_LOAD_FORCE_AUTOHINT;
- err = FT_Load_Glyph(face, glyph, load_flags);
- }
- if (err != FT_Err_Ok)
- qWarning("load glyph failed err=%x face=%p, glyph=%d", err, face, glyph);
-
- unlockFace();
- if (set->outline_drawing)
- return 0;
-
- if (!g) {
- g = new Glyph;
- g->uploadedToServer = false;
- g->data = 0;
- }
-
- FT_GlyphSlot slot = face->glyph;
- if (embolden) Q_FT_GLYPHSLOT_EMBOLDEN(slot);
- int left = slot->metrics.horiBearingX;
- int right = slot->metrics.horiBearingX + slot->metrics.width;
- int top = slot->metrics.horiBearingY;
- int bottom = slot->metrics.horiBearingY - slot->metrics.height;
- if(transform && slot->format != FT_GLYPH_FORMAT_BITMAP) { // freetype doesn't apply the transformation on the metrics
- int l, r, t, b;
- FT_Vector vector;
- vector.x = left;
- vector.y = top;
- FT_Vector_Transform(&vector, &matrix);
- l = r = vector.x;
- t = b = vector.y;
- vector.x = right;
- vector.y = top;
- FT_Vector_Transform(&vector, &matrix);
- if (l > vector.x) l = vector.x;
- if (r < vector.x) r = vector.x;
- if (t < vector.y) t = vector.y;
- if (b > vector.y) b = vector.y;
- vector.x = right;
- vector.y = bottom;
- FT_Vector_Transform(&vector, &matrix);
- if (l > vector.x) l = vector.x;
- if (r < vector.x) r = vector.x;
- if (t < vector.y) t = vector.y;
- if (b > vector.y) b = vector.y;
- vector.x = left;
- vector.y = bottom;
- FT_Vector_Transform(&vector, &matrix);
- if (l > vector.x) l = vector.x;
- if (r < vector.x) r = vector.x;
- if (t < vector.y) t = vector.y;
- if (b > vector.y) b = vector.y;
- left = l;
- right = r;
- top = t;
- bottom = b;
- }
- left = FLOOR(left);
- right = CEIL(right);
- bottom = FLOOR(bottom);
- top = CEIL(top);
-
- g->linearAdvance = face->glyph->linearHoriAdvance >> 10;
- g->width = TRUNC(right-left);
- g->height = TRUNC(top-bottom);
- g->x = TRUNC(left);
- g->y = TRUNC(top);
- g->advance = TRUNC(ROUND(face->glyph->advance.x));
- g->format = Format_None;
-
- return g;
-}
-
QFontEngineFT::Glyph *QFontEngineFT::loadGlyph(QGlyphSet *set, uint glyph,
QFixed subPixelPosition,
GlyphFormat format,
@@ -1792,10 +1692,10 @@ glyph_metrics_t QFontEngineFT::boundingBox(glyph_t glyph)
glyph_metrics_t QFontEngineFT::boundingBox(glyph_t glyph, const QTransform &matrix)
{
- return alphaMapBoundingBox(glyph, matrix, QFontEngine::Format_None);
+ return alphaMapBoundingBox(glyph, 0, matrix, QFontEngine::Format_None);
}
-glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, const QTransform &matrix, QFontEngine::GlyphFormat format)
+glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, QFixed subPixelPosition, const QTransform &matrix, QFontEngine::GlyphFormat format)
{
FT_Face face = 0;
glyph_metrics_t overall;
@@ -1842,7 +1742,10 @@ glyph_metrics_t QFontEngineFT::alphaMapBoundingBox(glyph_t glyph, const QTransfo
Glyph * g = glyphSet->getGlyph(glyph);
if (!g || g->format != format) {
face = lockFace();
- g = loadGlyphMetrics(glyphSet, glyph, format);
+ FT_Matrix m = this->matrix;
+ FT_Matrix_Multiply(&glyphSet->transformationMatrix, &m);
+ freetype->matrix = m;
+ g = loadGlyph(glyphSet, glyph, subPixelPosition, format);
}
if (g) {
diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h
index fc3ac82..451d26e 100644
--- a/src/gui/text/qfontengine_ft_p.h
+++ b/src/gui/text/qfontengine_ft_p.h
@@ -257,7 +257,9 @@ private:
virtual QImage alphaMapForGlyph(glyph_t g) { return alphaMapForGlyph(g, 0); }
virtual QImage alphaMapForGlyph(glyph_t, QFixed);
virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t);
- virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QTransform &matrix,
+ virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph,
+ QFixed subPixelPosition,
+ const QTransform &matrix,
QFontEngine::GlyphFormat format);
virtual void removeGlyphFromCache(glyph_t glyph);
@@ -333,7 +335,6 @@ protected:
bool embeddedbitmap;
private:
- QFontEngineFT::Glyph *loadGlyphMetrics(QGlyphSet *set, uint glyph, GlyphFormat format) const;
int loadFlags(QGlyphSet *set, GlyphFormat format, int flags, bool &hsubpixel, int &vfactor) const;
GlyphFormat defaultFormat;
diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h
index f501141..7b29993 100644
--- a/src/gui/text/qfontengine_p.h
+++ b/src/gui/text/qfontengine_p.h
@@ -203,7 +203,7 @@ public:
virtual QImage alphaMapForGlyph(glyph_t, QFixed subPixelPosition, const QTransform &t);
virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t);
- virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, const QTransform &matrix, GlyphFormat /*format*/)
+ virtual glyph_metrics_t alphaMapBoundingBox(glyph_t glyph, QFixed /*subPixelPosition*/, const QTransform &matrix, GlyphFormat /*format*/)
{
return boundingBox(glyph, matrix);
}
diff --git a/src/gui/text/qfontmetrics.cpp b/src/gui/text/qfontmetrics.cpp
index 5cd85fb..2ec245e 100644
--- a/src/gui/text/qfontmetrics.cpp
+++ b/src/gui/text/qfontmetrics.cpp
@@ -63,7 +63,6 @@ extern void qt_format_text(const QFont& font, const QRectF &_r,
int tf, const QString &text, QRectF *brect,
int tabStops, int *tabArray, int tabArrayLen,
QPainter *painter);
-Q_GUI_EXPORT extern int qt_defaultDpi();
/*****************************************************************************
QFontMetrics member functions
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 452b60a..1cfb4b6 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -420,9 +420,6 @@ QStaticTextPrivate *QStaticTextPrivate::get(const QStaticText *q)
return q->data.data();
}
-Q_GUI_EXPORT extern int qt_defaultDpiX();
-Q_GUI_EXPORT extern int qt_defaultDpiY();
-
namespace {
class DrawTextItemRecorder: public QPaintEngine
diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
index b7a2697..66ce64b 100644
--- a/src/gui/text/qtextcontrol.cpp
+++ b/src/gui/text/qtextcontrol.cpp
@@ -1552,7 +1552,7 @@ void QTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton button, con
extendBlockwiseSelection(cursorPos);
else if (selectedWordOnDoubleClick.hasSelection())
extendWordwiseSelection(cursorPos, pos.x());
- else if (wordSelectionEnabled)
+ else if (!wordSelectionEnabled)
setCursorPosition(cursorPos, QTextCursor::KeepAnchor);
} else {
diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp
index be67279..6dbd755 100644
--- a/src/gui/text/qtextdocument.cpp
+++ b/src/gui/text/qtextdocument.cpp
@@ -60,6 +60,7 @@
#include <qdir.h>
#include <qapplication.h>
#include "qtextcontrol_p.h"
+#include "qfont_p.h"
#include "private/qtextedit_p.h"
#include "private/qdataurl_p.h"
@@ -1671,8 +1672,6 @@ static void printPage(int index, QPainter *painter, const QTextDocument *doc, co
painter->restore();
}
-Q_GUI_EXPORT extern int qt_defaultDpi();
-
/*!
Prints the document to the given \a printer. The QPrinter must be
set up before being used with this function.
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 684de00..ce157be 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -75,8 +75,6 @@
QT_BEGIN_NAMESPACE
-Q_GUI_EXPORT extern int qt_defaultDpi();
-
// ################ should probably add frameFormatChange notification!
struct QTextLayoutStruct;
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 6aa333c..08d0eca 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -856,8 +856,6 @@ void QTextEngine::shapeLine(const QScriptLine &line)
}
}
-Q_GUI_EXPORT extern int qt_defaultDpiY(); // in qfont.cpp
-
void QTextEngine::shapeText(int item) const
{
Q_ASSERT(item < layoutData->items.size());
@@ -2611,8 +2609,6 @@ void QTextEngine::splitItem(int item, int pos) const
// qDebug("split at position %d itempos=%d", pos, item);
}
-Q_GUI_EXPORT extern int qt_defaultDpiY();
-
QFixed QTextEngine::calculateTabWidth(int item, QFixed x) const
{
const QScriptItem &si = layoutData->items[item];
diff --git a/src/gui/text/qtextimagehandler.cpp b/src/gui/text/qtextimagehandler.cpp
index a6d085a..bbff79c 100644
--- a/src/gui/text/qtextimagehandler.cpp
+++ b/src/gui/text/qtextimagehandler.cpp
@@ -123,7 +123,6 @@ static QSize getPixmapSize(QTextDocument *doc, const QTextImageFormat &format)
qreal scale = 1.0;
QPaintDevice *pdev = doc->documentLayout()->paintDevice();
if (pdev) {
- Q_GUI_EXPORT extern int qt_defaultDpi();
if (pm.isNull())
pm = getPixmap(doc, format);
if (!pm.isNull())
@@ -191,7 +190,6 @@ static QSize getImageSize(QTextDocument *doc, const QTextImageFormat &format)
qreal scale = 1.0;
QPaintDevice *pdev = doc->documentLayout()->paintDevice();
if (pdev) {
- extern int qt_defaultDpi();
if (image.isNull())
image = getImage(doc, format);
if (!image.isNull())
diff --git a/src/gui/text/qtextodfwriter.cpp b/src/gui/text/qtextodfwriter.cpp
index c2e47f3..c5ea0cf 100644
--- a/src/gui/text/qtextodfwriter.cpp
+++ b/src/gui/text/qtextodfwriter.cpp
@@ -124,6 +124,7 @@ public:
manifestWriter.writeNamespace(manifestNS, QString::fromLatin1("manifest"));
manifestWriter.writeStartDocument();
manifestWriter.writeStartElement(manifestNS, QString::fromLatin1("manifest"));
+ manifestWriter.writeAttribute(manifestNS, QString::fromLatin1("version"), QString::fromLatin1("1.2"));
addFile(QString::fromLatin1("/"), QString::fromLatin1("application/vnd.oasis.opendocument.text"));
addFile(QString::fromLatin1("content.xml"), QString::fromLatin1("text/xml"));
}
@@ -786,6 +787,7 @@ bool QTextOdfWriter::writeAll()
writer.writeNamespace(svgNS, QString::fromLatin1("svg"));
writer.writeStartDocument();
writer.writeStartElement(officeNS, QString::fromLatin1("document-content"));
+ writer.writeAttribute(officeNS, QString::fromLatin1("version"), QString::fromLatin1("1.2"));
// add fragments. (for character formats)
QTextDocumentPrivate::FragmentIterator fragIt = m_document->docHandle()->begin();
diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index f948af9..dabfec0 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -511,7 +511,7 @@ QAbstractScrollArea::QAbstractScrollArea(QAbstractScrollAreaPrivate &dd, QWidget
/*!
Constructs a viewport.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
*/
QAbstractScrollArea::QAbstractScrollArea(QWidget *parent)
:QFrame(*new QAbstractScrollAreaPrivate, parent)
diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp
index cb36398..2570496 100644
--- a/src/gui/widgets/qabstractslider.cpp
+++ b/src/gui/widgets/qabstractslider.cpp
@@ -265,7 +265,7 @@ void QAbstractSliderPrivate::setSteps(int single, int page)
/*!
Constructs an abstract slider.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
The \l minimum defaults to 0, the \l maximum to 99, with a \l
singleStep size of 1 and a \l pageStep size of 10, and an initial
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index d63ccfb..5f00afa 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -947,7 +947,10 @@ QComboBox::QComboBox(bool rw, QWidget *parent, const char *name)
to set and get item data (e.g., setItemData() and itemText()). You
can also set a new model and view (with setModel() and setView()).
For the text and icon in the combobox label, the data in the model
- that has the Qt::DisplayRole and Qt::DecorationRole is used.
+ that has the Qt::DisplayRole and Qt::DecorationRole is used. Note
+ that you cannot alter the \l{QAbstractItemView::}{SelectionMode}
+ of the view(), e.g., by using
+ \l{QAbstractItemView::}{setSelectionMode()}.
\image qstyle-comboboxes.png Comboboxes in the different built-in styles.
@@ -2360,7 +2363,12 @@ void QComboBox::showPopup()
initStyleOption(&opt);
QRect listRect(style->subControlRect(QStyle::CC_ComboBox, &opt,
QStyle::SC_ComboBoxListBoxPopup, this));
+#ifndef Q_WS_S60
QRect screen = d->popupGeometry(QApplication::desktop()->screenNumber(this));
+#else
+ QRect screen = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
+#endif
+
QPoint below = mapToGlobal(listRect.bottomLeft());
int belowHeight = screen.bottom() - below.y();
QPoint above = mapToGlobal(listRect.topLeft());
@@ -2465,12 +2473,7 @@ void QComboBox::showPopup()
// available screen geometry.This may override the vertical position, but it is more
// important to show as much as possible of the popup.
const int height = !boundToScreen ? listRect.height() : qMin(listRect.height(), screen.height());
-#ifdef Q_WS_S60
- //popup needs to be stretched with screen minimum dimension
- listRect.setHeight(qMin(screen.height(), screen.width()));
-#else
listRect.setHeight(height);
-#endif
if (boundToScreen) {
if (listRect.top() < screen.top())
@@ -2488,18 +2491,10 @@ void QComboBox::showPopup()
listRect.setWidth(listRect.height());
//by default popup is centered on screen in landscape
listRect.moveCenter(screen.center());
- if (staConTopRect.IsEmpty()) {
- TRect cbaRect = TRect();
- AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, cbaRect);
- AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
- switch (cbaLocation) {
- case AknLayoutUtils::EAknCbaLocationRight:
- listRect.setRight(screen.right());
- break;
- case AknLayoutUtils::EAknCbaLocationLeft:
- listRect.setLeft(screen.left());
- break;
- }
+ if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) {
+ // landscape without stacon, menu should be at the right
+ (opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
+ listRect.setLeft(screen.left());
}
}
#endif
@@ -2718,7 +2713,7 @@ void QComboBox::changeEvent(QEvent *e)
initStyleOption(&opt);
if (style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, this)) {
- const QRect screen = d->popupGeometry(QApplication::desktop()->screenNumber(this));
+ QRect screen = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
QRect listRect(style()->subControlRect(QStyle::CC_ComboBox, &opt,
QStyle::SC_ComboBoxListBoxPopup, this));
@@ -2733,13 +2728,14 @@ void QComboBox::changeEvent(QEvent *e)
listRect.setWidth(listRect.height());
//by default popup is centered on screen in landscape
listRect.moveCenter(screen.center());
- if (staConTopRect.IsEmpty()) {
+ if (staConTopRect.IsEmpty() && AknLayoutUtils::CbaLocation() != AknLayoutUtils::EAknCbaLocationBottom) {
// landscape without stacon, menu should be at the right
(opt.direction == Qt::LeftToRight) ? listRect.setRight(screen.right()) :
listRect.setLeft(screen.left());
}
- d->container->setGeometry(listRect);
}
+
+ d->container->setGeometry(listRect);
}
}
#endif
@@ -2772,6 +2768,10 @@ void QComboBox::changeEvent(QEvent *e)
void QComboBox::resizeEvent(QResizeEvent *)
{
Q_D(QComboBox);
+#ifdef Q_WS_S60
+ if (d->viewContainer() && d->viewContainer()->isVisible())
+ showPopup();
+#endif
d->updateLineEditGeometry();
}
diff --git a/src/gui/widgets/qmenu.cpp b/src/gui/widgets/qmenu.cpp
index c09b5a4..b12e5c5 100644
--- a/src/gui/widgets/qmenu.cpp
+++ b/src/gui/widgets/qmenu.cpp
@@ -1247,37 +1247,15 @@ void QMenu::initStyleOption(QStyleOptionMenuItem *option, const QAction *action)
response to button presses; these are just like context menus
except for how they are invoked.
- \raw HTML
- <table align="center" cellpadding="0">
- <tr>
- <td>
- \endraw
- \inlineimage plastique-menu.png
- \raw HTML
- </td>
- <td>
- \endraw
- \inlineimage windowsxp-menu.png
- \raw HTML
- </td>
- <td>
- \endraw
- \inlineimage macintosh-menu.png
- \raw HTML
- </td>
-
- </tr>
- <tr>
- <td colspan="3">
- \endraw
- A menu shown in \l{Plastique Style Widget Gallery}{Plastique widget style},
+ \table 100%
+ \row
+ \o \inlineimage plastique-menu.png
+ \o \inlineimage windowsxp-menu.png
+ \o \inlineimage macintosh-menu.png
+ \endtable
+ \caption Fig. A menu shown in \l{Plastique Style Widget Gallery}{Plastique widget style},
\l{Windows XP Style Widget Gallery}{Windows XP widget style},
and \l{Macintosh Style Widget Gallery}{Macintosh widget style}.
- \raw HTML
- </td>
- </tr>
- </table>
- \endraw
\section1 Actions
diff --git a/src/gui/widgets/qscrollbar.cpp b/src/gui/widgets/qscrollbar.cpp
index c895b1b..87738a0 100644
--- a/src/gui/widgets/qscrollbar.cpp
+++ b/src/gui/widgets/qscrollbar.cpp
@@ -330,7 +330,7 @@ void QScrollBar::initStyleOption(QStyleOptionSlider *option) const
/*!
Constructs a vertical scroll bar.
- The \a parent arguments is sent to the QWidget constructor.
+ The \a parent argument is sent to the QWidget constructor.
The \l {QAbstractSlider::minimum} {minimum} defaults to 0, the
\l {QAbstractSlider::maximum} {maximum} to 99, with a
diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp
index 964a6e1..ca8fc37 100644
--- a/src/gui/widgets/qsplitter.cpp
+++ b/src/gui/widgets/qsplitter.cpp
@@ -1016,7 +1016,7 @@ QSplitterLayoutStruct *QSplitterPrivate::insertWidget(int index, QWidget *w)
/*!
Constructs a horizontal splitter with the \a parent
- arguments is passed on to the QFrame constructor.
+ argument passed on to the QFrame constructor.
\sa setOrientation()
*/
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index c2a2e98..aae6a01 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -136,7 +136,7 @@ public:
GestureArea is an invisible item: it is never painted.
- \sa MouseArea, {declarative/touchinteraction/gestures}{Gestures example}
+ \sa MouseArea
*/
/*!
diff --git a/src/network/access/qftp.cpp b/src/network/access/qftp.cpp
index ccc20e6..69e59d1 100644
--- a/src/network/access/qftp.cpp
+++ b/src/network/access/qftp.cpp
@@ -363,9 +363,9 @@ qint64 QFtpDTP::read(char *data, qint64 maxlen)
if (socket && socket->state() == QTcpSocket::ConnectedState) {
read = socket->read(data, maxlen);
} else {
- read = bytesFromSocket.size();
+ read = qMin(maxlen, qint64(bytesFromSocket.size()));
memcpy(data, bytesFromSocket.data(), read);
- bytesFromSocket.clear();
+ bytesFromSocket.remove(0, read);
}
bytesDone += read;
diff --git a/src/network/access/qhttpthreaddelegate.cpp b/src/network/access/qhttpthreaddelegate.cpp
index 81410a4..16fd9bb 100644
--- a/src/network/access/qhttpthreaddelegate.cpp
+++ b/src/network/access/qhttpthreaddelegate.cpp
@@ -78,6 +78,11 @@ static QNetworkReply::NetworkError statusCodeFromHttp(int httpStatusCode, const
code = QNetworkReply::ProxyAuthenticationRequiredError;
break;
+ case 418: // I'm a teapot
+ code = QNetworkReply::ProtocolInvalidOperationError;
+ break;
+
+
default:
if (httpStatusCode > 500) {
// some kind of server error
diff --git a/src/network/socket/qlocalsocket_win.cpp b/src/network/socket/qlocalsocket_win.cpp
index 9d21fde..14f5af8 100644
--- a/src/network/socket/qlocalsocket_win.cpp
+++ b/src/network/socket/qlocalsocket_win.cpp
@@ -79,6 +79,11 @@ void QLocalSocketPrivate::setErrorString(const QString &function)
errorString = QLocalSocket::tr("%1: Invalid name").arg(function);
state = QLocalSocket::UnconnectedState;
break;
+ case ERROR_ACCESS_DENIED:
+ error = QLocalSocket::SocketAccessError;
+ errorString = QLocalSocket::tr("%1: Access denied").arg(function);
+ state = QLocalSocket::UnconnectedState;
+ break;
default:
error = QLocalSocket::UnknownSocketError;
errorString = QLocalSocket::tr("%1: Unknown error %2").arg(function).arg(windowsError);
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 618ac79..a5cdf01 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -219,17 +219,19 @@ bool QSslCertificate::isNull() const
Returns true if this certificate is valid; otherwise returns
false.
- Note: Currently, this function only checks that the current
+ Note: Currently, this function checks that the current
data-time is within the date-time range during which the
- certificate is considered valid. No other checks are
- currently performed.
+ certificate is considered valid, and checks that the
+ certificate is not in a blacklist of fraudulent certificates.
\sa isNull()
*/
bool QSslCertificate::isValid() const
{
const QDateTime currentTime = QDateTime::currentDateTime();
- return currentTime >= d->notValidBefore && currentTime <= d->notValidAfter;
+ return currentTime >= d->notValidBefore &&
+ currentTime <= d->notValidAfter &&
+ ! QSslCertificatePrivate::isBlacklisted(*this);
}
/*!
@@ -798,6 +800,30 @@ QList<QSslCertificate> QSslCertificatePrivate::certificatesFromDer(const QByteAr
return certificates;
}
+// These certificates are known to be fraudulent and were created during the comodo
+// compromise. See http://www.comodo.com/Comodo-Fraud-Incident-2011-03-23.html
+static const char *certificate_blacklist[] = {
+ "04:7e:cb:e9:fc:a5:5f:7b:d0:9e:ae:36:e1:0c:ae:1e",
+ "f5:c8:6a:f3:61:62:f1:3a:64:f5:4f:6d:c9:58:7c:06",
+ "d7:55:8f:da:f5:f1:10:5b:b2:13:28:2b:70:77:29:a3",
+ "39:2a:43:4f:0e:07:df:1f:8a:a3:05:de:34:e0:c2:29",
+ "3e:75:ce:d4:6b:69:30:21:21:88:30:ae:86:a8:2a:71",
+ "e9:02:8b:95:78:e4:15:dc:1a:71:0a:2b:88:15:44:47",
+ "92:39:d5:34:8f:40:d1:69:5a:74:54:70:e1:f2:3f:43",
+ "b0:b7:13:3e:d0:96:f9:b5:6f:ae:91:c8:74:bd:3a:c0",
+ "d8:f3:5f:4e:b7:87:2b:2d:ab:06:92:e3:15:38:2f:b0",
+ 0
+};
+
+bool QSslCertificatePrivate::isBlacklisted(const QSslCertificate &certificate)
+{
+ for (int a = 0; certificate_blacklist[a] != 0; a++) {
+ if (certificate.serialNumber() == certificate_blacklist[a])
+ return true;
+ }
+ return false;
+}
+
#ifndef QT_NO_DEBUG_STREAM
QDebug operator<<(QDebug debug, const QSslCertificate &certificate)
{
diff --git a/src/network/ssl/qsslcertificate_p.h b/src/network/ssl/qsslcertificate_p.h
index cdceb0f..1ce33d3 100644
--- a/src/network/ssl/qsslcertificate_p.h
+++ b/src/network/ssl/qsslcertificate_p.h
@@ -96,6 +96,7 @@ public:
static QSslCertificate QSslCertificate_from_X509(X509 *x509);
static QList<QSslCertificate> certificatesFromPem(const QByteArray &pem, int count = -1);
static QList<QSslCertificate> certificatesFromDer(const QByteArray &der, int count = -1);
+ static bool isBlacklisted(const QSslCertificate &certificate);
friend class QSslSocketBackendPrivate;
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index d6967fe..1abb295 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -1238,6 +1238,13 @@ bool QSslSocketBackendPrivate::startHandshake()
X509 *x509 = q_SSL_get_peer_certificate(ssl);
configuration.peerCertificate = QSslCertificatePrivate::QSslCertificate_from_X509(x509);
q_X509_free(x509);
+ if (QSslCertificatePrivate::isBlacklisted(configuration.peerCertificate)) {
+ q->setErrorString(QSslSocket::tr("The peer certificate is blacklisted"));
+ q->setSocketError(QAbstractSocket::SslHandshakeFailedError);
+ emit q->error(QAbstractSocket::SslHandshakeFailedError);
+ plainSocket->disconnectFromHost();
+ return false;
+ }
// Start translating errors.
QList<QSslError> errors;
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index 6678522..18c684f 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -98,6 +98,10 @@ extern Q_GUI_EXPORT bool qt_cleartype_enabled;
extern bool qt_applefontsmoothing_enabled;
#endif
+#if !defined(QT_MAX_CACHED_GLYPH_SIZE)
+# define QT_MAX_CACHED_GLYPH_SIZE 64
+#endif
+
Q_GUI_EXPORT QImage qt_imageForBrush(int brushStyle, bool invert);
////////////////////////////////// Private Methods //////////////////////////////////////////
@@ -536,27 +540,32 @@ void QGL2PaintEngineEx::beginNativePainting()
glDisableVertexAttribArray(i);
#ifndef QT_OPENGL_ES_2
- // be nice to people who mix OpenGL 1.x code with QPainter commands
- // by setting modelview and projection matrices to mirror the GL 1
- // paint engine
- const QTransform& mtx = state()->matrix;
-
- float mv_matrix[4][4] =
+ const QGLFormat &fmt = d->device->format();
+ if (fmt.majorVersion() < 3 || (fmt.majorVersion() == 3 && fmt.minorVersion() < 1)
+ || fmt.profile() == QGLFormat::CompatibilityProfile)
{
- { float(mtx.m11()), float(mtx.m12()), 0, float(mtx.m13()) },
- { float(mtx.m21()), float(mtx.m22()), 0, float(mtx.m23()) },
- { 0, 0, 1, 0 },
- { float(mtx.dx()), float(mtx.dy()), 0, float(mtx.m33()) }
- };
+ // be nice to people who mix OpenGL 1.x code with QPainter commands
+ // by setting modelview and projection matrices to mirror the GL 1
+ // paint engine
+ const QTransform& mtx = state()->matrix;
- const QSize sz = d->device->size();
+ float mv_matrix[4][4] =
+ {
+ { float(mtx.m11()), float(mtx.m12()), 0, float(mtx.m13()) },
+ { float(mtx.m21()), float(mtx.m22()), 0, float(mtx.m23()) },
+ { 0, 0, 1, 0 },
+ { float(mtx.dx()), float(mtx.dy()), 0, float(mtx.m33()) }
+ };
- glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0, sz.width(), sz.height(), 0, -999999, 999999);
+ const QSize sz = d->device->size();
- glMatrixMode(GL_MODELVIEW);
- glLoadMatrixf(&mv_matrix[0][0]);
+ glMatrixMode(GL_PROJECTION);
+ glLoadIdentity();
+ glOrtho(0, sz.width(), sz.height(), 0, -999999, 999999);
+
+ glMatrixMode(GL_MODELVIEW);
+ glLoadMatrixf(&mv_matrix[0][0]);
+ }
#else
Q_UNUSED(ctx);
#endif
@@ -587,7 +596,9 @@ void QGL2PaintEngineExPrivate::resetGLState()
ctx->d_func()->setVertexAttribArrayEnabled(QT_VERTEX_COORDS_ATTR, false);
ctx->d_func()->setVertexAttribArrayEnabled(QT_OPACITY_ATTR, false);
#ifndef QT_OPENGL_ES_2
- glColor4f(1.0f, 1.0f, 1.0f, 1.0f); // color may have been changed by glVertexAttrib()
+ // gl_Color, corresponding to vertex attribute 3, may have been changed
+ float color[] = { 1.0f, 1.0f, 1.0f, 1.0f };
+ glVertexAttrib4fv(3, color);
#endif
}
@@ -1473,7 +1484,8 @@ void QGL2PaintEngineEx::drawTextItem(const QPointF &p, const QTextItem &textItem
// don't try to cache huge fonts or vastly transformed fonts
const qreal pixelSize = ti.fontEngine->fontDef.pixelSize;
- if (pixelSize * pixelSize * qAbs(det) >= 64 * 64 || det < 0.25f || det > 4.f)
+ if (pixelSize * pixelSize * qAbs(det) >= QT_MAX_CACHED_GLYPH_SIZE * QT_MAX_CACHED_GLYPH_SIZE ||
+ det < 0.25f || det > 4.f)
drawCached = false;
QFontEngineGlyphCache::Type glyphType = ti.fontEngine->glyphFormat >= 0
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 4698a5c..b3b459d 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -69,6 +69,7 @@
#if !defined(QT_OPENGL_ES_1)
#include "gl2paintengineex/qpaintengineex_opengl2_p.h"
+#include <private/qwindowsurface_gl_p.h>
#endif
#ifndef QT_OPENGL_ES_2
@@ -90,7 +91,6 @@
#include <private/qpixmapdata_p.h>
#include <private/qpixmapdata_gl_p.h>
#include <private/qglpixelbuffer_p.h>
-#include <private/qwindowsurface_gl_p.h>
#include <private/qimagepixmapcleanuphooks_p.h>
#include "qcolormap.h"
#include "qfile.h"
@@ -5359,12 +5359,69 @@ QGLWidget::QGLWidget(QGLContext *context, QWidget *parent,
#endif // QT3_SUPPORT
+typedef GLubyte * (*qt_glGetStringi)(GLenum, GLuint);
+
+#ifndef GL_NUM_EXTENSIONS
+#define GL_NUM_EXTENSIONS 0x821D
+#endif
+
+QGLExtensionMatcher::QGLExtensionMatcher(const char *str)
+{
+ init(str);
+}
+
+QGLExtensionMatcher::QGLExtensionMatcher()
+{
+ const char *extensionStr = reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS));
+
+ if (extensionStr) {
+ init(extensionStr);
+ } else {
+ // clear error state
+ while (glGetError()) {}
+
+ const QGLContext *ctx = QGLContext::currentContext();
+ if (ctx) {
+ qt_glGetStringi glGetStringi = (qt_glGetStringi)ctx->getProcAddress(QLatin1String("glGetStringi"));
+
+ GLint numExtensions;
+ glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions);
+
+ for (int i = 0; i < numExtensions; ++i) {
+ const char *str = reinterpret_cast<const char *>(glGetStringi(GL_EXTENSIONS, i));
+
+ m_offsets << m_extensions.size();
+
+ while (*str != 0)
+ m_extensions.append(*str++);
+ m_extensions.append(' ');
+ }
+ }
+ }
+}
+
+void QGLExtensionMatcher::init(const char *str)
+{
+ m_extensions = str;
+
+ // make sure extension string ends with a space
+ if (!m_extensions.endsWith(' '))
+ m_extensions.append(' ');
+
+ int index = 0;
+ int next = 0;
+ while ((next = m_extensions.indexOf(' ', index)) >= 0) {
+ m_offsets << index;
+ index = next + 1;
+ }
+}
+
/*
Returns the GL extensions for the current context.
*/
QGLExtensions::Extensions QGLExtensions::currentContextExtensions()
{
- QGLExtensionMatcher extensions(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
+ QGLExtensionMatcher extensions;
Extensions glExtensions;
if (extensions.match("GL_ARB_texture_rectangle"))
diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp
index d6b2d3b..ef36eb9 100644
--- a/src/opengl/qgl_egl.cpp
+++ b/src/opengl/qgl_egl.cpp
@@ -52,6 +52,8 @@
QT_BEGIN_NAMESPACE
+QEglProperties *QGLContextPrivate::extraWindowSurfaceCreationProps = NULL;
+
void qt_eglproperties_set_glformat(QEglProperties& eglProperties, const QGLFormat& glFormat)
{
int redSize = glFormat.redBufferSize();
@@ -309,6 +311,11 @@ void QGLContextPrivate::swapRegion(const QRegion &region)
eglContext->swapBuffersRegion2NOK(eglSurfaceForDevice(), &region);
}
+void QGLContextPrivate::setExtraWindowSurfaceCreationProps(QEglProperties *props)
+{
+ extraWindowSurfaceCreationProps = props;
+}
+
void QGLWidget::setMouseTracking(bool enable)
{
QWidget::setMouseTracking(enable);
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h
index b2261a2..50d13c9 100644
--- a/src/opengl/qgl_p.h
+++ b/src/opengl/qgl_p.h
@@ -369,11 +369,14 @@ public:
EGLSurface eglSurface;
void destroyEglSurfaceForDevice();
EGLSurface eglSurfaceForDevice() const;
+ static QEglProperties *extraWindowSurfaceCreationProps;
+ static void setExtraWindowSurfaceCreationProps(QEglProperties *props);
#endif
#if defined(Q_WS_QPA)
QPlatformGLContext *platformContext;
void setupSharing();
+
#elif defined(Q_WS_X11) || defined(Q_WS_MAC)
void* cx;
#endif
@@ -849,46 +852,32 @@ private:
};
-// This class can be used to match GL extensions without doing any mallocs. The
-// class assumes that the GL extension string ends with a space character,
-// which it should do on all conformant platforms. Create the object and pass
-// in a pointer to the extension string, then call match() on each extension
-// that should be matched. The match() function takes the extension name
-// *without* the terminating space character as input.
-
class QGLExtensionMatcher
{
public:
- QGLExtensionMatcher(const char *str)
- : gl_extensions(str), gl_extensions_length(qstrlen(str))
- {}
+ QGLExtensionMatcher(const char *str);
+ QGLExtensionMatcher();
- bool match(const char *str) {
+ bool match(const char *str) const {
int str_length = qstrlen(str);
- const char *extensions = gl_extensions;
- int extensions_length = gl_extensions_length;
-
- while (1) {
- // the total length that needs to be matched is the str_length +
- // the space character that terminates the extension name
- if (extensions_length < str_length + 1)
- return false;
- if (qstrncmp(extensions, str, str_length) == 0 && extensions[str_length] == ' ')
- return true;
- int split_pos = 0;
- while (split_pos < extensions_length && extensions[split_pos] != ' ')
- ++split_pos;
- ++split_pos; // added for the terminating space character
- extensions += split_pos;
- extensions_length -= split_pos;
+ Q_ASSERT(str);
+ Q_ASSERT(str_length > 0);
+ Q_ASSERT(str[str_length-1] != ' ');
+
+ for (int i = 0; i < m_offsets.size(); ++i) {
+ const char *extension = m_extensions.constData() + m_offsets.at(i);
+ if (qstrncmp(extension, str, str_length) == 0 && extension[str_length] == ' ')
+ return true;
}
return false;
}
private:
- const char *gl_extensions;
- int gl_extensions_length;
+ void init(const char *str);
+
+ QByteArray m_extensions;
+ QVector<int> m_offsets;
};
diff --git a/src/opengl/qgl_symbian.cpp b/src/opengl/qgl_symbian.cpp
index 7caaabd..1b41db4 100644
--- a/src/opengl/qgl_symbian.cpp
+++ b/src/opengl/qgl_symbian.cpp
@@ -48,6 +48,7 @@
#include <private/qgl_p.h>
#include <private/qpaintengine_opengl_p.h>
#include <private/qwidget_p.h> // to access QWExtra
+#include <private/qnativeimagehandleprovider_p.h>
#include "qgl_egl_p.h"
#include "qpixmapdata_gl_p.h"
#include "qgltexturepool_p.h"
@@ -411,6 +412,11 @@ void QGLPixmapData::fromNativeType(void* pixmap, NativeType type)
m_hasAlpha = m_source.hasAlphaChannel();
m_hasFillColor = false;
m_dirty = true;
+ } else if (type == QPixmapData::NativeImageHandleProvider && pixmap) {
+ destroyTexture();
+ nativeImageHandleProvider = static_cast<QNativeImageHandleProvider *>(pixmap);
+ // Cannot defer the retrieval, we need at least the size right away.
+ createFromNativeImageHandleProvider();
}
}
@@ -425,4 +431,42 @@ void* QGLPixmapData::toNativeType(NativeType type)
return 0;
}
+bool QGLPixmapData::initFromNativeImageHandle(void *handle, const QString &type)
+{
+ if (type == QLatin1String("RSgImage")) {
+ fromNativeType(handle, QPixmapData::SgImage);
+ return true;
+ } else if (type == QLatin1String("CFbsBitmap")) {
+ fromNativeType(handle, QPixmapData::FbsBitmap);
+ return true;
+ }
+ return false;
+}
+
+void QGLPixmapData::createFromNativeImageHandleProvider()
+{
+ void *handle = 0;
+ QString type;
+ nativeImageHandleProvider->get(&handle, &type);
+ if (handle) {
+ if (initFromNativeImageHandle(handle, type)) {
+ nativeImageHandle = handle;
+ nativeImageType = type;
+ } else {
+ qWarning("QGLPixmapData: Unknown native image type '%s'", qPrintable(type));
+ }
+ } else {
+ qWarning("QGLPixmapData: Native handle is null");
+ }
+}
+
+void QGLPixmapData::releaseNativeImageHandle()
+{
+ if (nativeImageHandleProvider && nativeImageHandle) {
+ nativeImageHandleProvider->release(nativeImageHandle, nativeImageType);
+ nativeImageHandle = 0;
+ nativeImageType = QString();
+ }
+}
+
QT_END_NAMESPACE
diff --git a/src/opengl/qgl_x11egl.cpp b/src/opengl/qgl_x11egl.cpp
index 93f17ae..5755067 100644
--- a/src/opengl/qgl_x11egl.cpp
+++ b/src/opengl/qgl_x11egl.cpp
@@ -232,7 +232,8 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
if (devType == QInternal::Widget) {
if (d->eglSurface != EGL_NO_SURFACE)
eglDestroySurface(d->eglContext->display(), d->eglSurface);
- d->eglSurface = QEgl::createSurface(device(), d->eglContext->config());
+ // extraWindowSurfaceCreationProps default to NULL unless were specifically set before
+ d->eglSurface = QEgl::createSurface(device(), d->eglContext->config(), d->extraWindowSurfaceCreationProps);
XFlush(X11->display);
setWindowCreated(true);
}
diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp
index cda1c79..8eda222 100644
--- a/src/opengl/qglframebufferobject.cpp
+++ b/src/opengl/qglframebufferobject.cpp
@@ -44,6 +44,7 @@
#include <qdebug.h>
#include <private/qgl_p.h>
+#include <private/qfont_p.h>
#if !defined(QT_OPENGL_ES_1)
#include <private/qpaintengineex_opengl2_p.h>
#endif
@@ -1216,9 +1217,6 @@ void QGLFramebufferObject::drawTexture(const QPointF &point, QMacCompatGLuint te
}
#endif
-Q_GUI_EXPORT int qt_defaultDpiX();
-Q_GUI_EXPORT int qt_defaultDpiY();
-
/*! \reimp */
int QGLFramebufferObject::metric(PaintDeviceMetric metric) const
{
diff --git a/src/opengl/qglfunctions.cpp b/src/opengl/qglfunctions.cpp
index 29e32ff..be8219a 100644
--- a/src/opengl/qglfunctions.cpp
+++ b/src/opengl/qglfunctions.cpp
@@ -229,7 +229,7 @@ static int qt_gl_resolve_features()
QGLFunctions::Buffers |
QGLFunctions::CompressedTextures |
QGLFunctions::Multisample;
- QGLExtensionMatcher extensions(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
+ QGLExtensionMatcher extensions;
if (extensions.match("GL_OES_framebuffer_object"))
features |= QGLFunctions::Framebuffers;
if (extensions.match("GL_OES_blend_equation_separate"))
@@ -244,7 +244,7 @@ static int qt_gl_resolve_features()
#else
int features = 0;
QGLFormat::OpenGLVersionFlags versions = QGLFormat::openGLVersionFlags();
- QGLExtensionMatcher extensions(reinterpret_cast<const char *>(glGetString(GL_EXTENSIONS)));
+ QGLExtensionMatcher extensions;
// Recognize features by extension name.
if (extensions.match("GL_ARB_multitexture"))
diff --git a/src/opengl/qglpaintdevice.cpp b/src/opengl/qglpaintdevice.cpp
index 7d0eb5b..61d8f26 100644
--- a/src/opengl/qglpaintdevice.cpp
+++ b/src/opengl/qglpaintdevice.cpp
@@ -43,13 +43,13 @@
#include <private/qgl_p.h>
#include <private/qglpixelbuffer_p.h>
#include <private/qglframebufferobject_p.h>
-#include <private/qwindowsurface_gl_p.h>
#ifdef Q_WS_X11
#include <private/qpixmapdata_x11gl_p.h>
#endif
#if !defined(QT_OPENGL_ES_1)
#include <private/qpixmapdata_gl_p.h>
+#include <private/qwindowsurface_gl_p.h>
#endif
QT_BEGIN_NAMESPACE
diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp
index ec6ac4c..3278596 100644
--- a/src/opengl/qglpixelbuffer.cpp
+++ b/src/opengl/qglpixelbuffer.cpp
@@ -98,6 +98,7 @@
#include <qglpixelbuffer.h>
#include <private/qglpixelbuffer_p.h>
+#include <private/qfont_p.h>
#include <qimage.h>
#ifndef QT_OPENGL_ES_2
@@ -424,9 +425,6 @@ QPaintEngine *QGLPixelBuffer::paintEngine() const
#endif
}
-Q_GUI_EXPORT int qt_defaultDpiX();
-Q_GUI_EXPORT int qt_defaultDpiY();
-
/*! \reimp */
int QGLPixelBuffer::metric(PaintDeviceMetric metric) const
{
diff --git a/src/opengl/qpixmapdata_gl.cpp b/src/opengl/qpixmapdata_gl.cpp
index db9f8c8..45722d1 100644
--- a/src/opengl/qpixmapdata_gl.cpp
+++ b/src/opengl/qpixmapdata_gl.cpp
@@ -49,6 +49,7 @@
#include <private/qgl_p.h>
#include <private/qdrawhelper_p.h>
#include <private/qimage_p.h>
+#include <private/qfont_p.h>
#include <private/qpaintengineex_opengl2_p.h>
@@ -790,9 +791,6 @@ QGLTexture* QGLPixmapData::texture() const
return &m_texture;
}
-Q_GUI_EXPORT int qt_defaultDpiX();
-Q_GUI_EXPORT int qt_defaultDpiY();
-
int QGLPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
if (w == 0)
diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h
index 41740dd..8855c20 100644
--- a/src/opengl/qpixmapdata_gl_p.h
+++ b/src/opengl/qpixmapdata_gl_p.h
@@ -76,6 +76,10 @@ void qt_gl_unregister_pixmap(QGLPixmapData *pd);
void qt_gl_hibernate_pixmaps();
#endif
+#ifdef Q_OS_SYMBIAN
+class QNativeImageHandleProvider;
+#endif
+
class QGLFramebufferObjectPool
{
public:
@@ -160,6 +164,9 @@ public:
QImage::Format idealFormat(QImage &image, Qt::ImageConversionFlags flags);
void* toNativeType(NativeType type);
void fromNativeType(void* pixmap, NativeType type);
+ bool initFromNativeImageHandle(void *handle, const QString &type);
+ void createFromNativeImageHandleProvider();
+ void releaseNativeImageHandle();
#endif
private:
@@ -191,6 +198,9 @@ private:
mutable QGLContext *m_ctx;
#ifdef Q_OS_SYMBIAN
mutable QVolatileImage m_source;
+ mutable QNativeImageHandleProvider *nativeImageHandleProvider;
+ void *nativeImageHandle;
+ QString nativeImageType;
#else
mutable QImage m_source;
#endif
diff --git a/src/opengl/qpixmapdata_poolgl.cpp b/src/opengl/qpixmapdata_poolgl.cpp
index 64de29e..8310b42 100644
--- a/src/opengl/qpixmapdata_poolgl.cpp
+++ b/src/opengl/qpixmapdata_poolgl.cpp
@@ -49,6 +49,8 @@
#include <private/qgl_p.h>
#include <private/qdrawhelper_p.h>
#include <private/qimage_p.h>
+#include <private/qnativeimagehandleprovider_p.h>
+#include <private/qfont_p.h>
#include <private/qpaintengineex_opengl2_p.h>
@@ -254,6 +256,8 @@ QGLPixmapData::QGLPixmapData(PixelType type)
, m_renderFbo(0)
, m_engine(0)
, m_ctx(0)
+ , nativeImageHandleProvider(0)
+ , nativeImageHandle(0)
, m_dirty(false)
, m_hasFillColor(false)
, m_hasAlpha(false)
@@ -292,6 +296,8 @@ void QGLPixmapData::destroyTexture()
}
m_texture.id = 0;
inTexturePool = false;
+
+ releaseNativeImageHandle();
}
QPixmapData *QGLPixmapData::createCompatiblePixmapData() const
@@ -342,6 +348,9 @@ void QGLPixmapData::ensureCreated() const
m_dirty = false;
+ if (nativeImageHandleProvider && !nativeImageHandle)
+ const_cast<QGLPixmapData *>(this)->createFromNativeImageHandleProvider();
+
QGLShareContextScope ctx(qt_gl_share_widget()->context());
m_ctx = ctx;
@@ -860,9 +869,16 @@ void QGLPixmapData::detachTextureFromPool()
void QGLPixmapData::hibernate()
{
- // If the texture was imported (e.g, from an SgImage under Symbian),
- // then we cannot copy it back to main memory for storage.
- if (m_texture.id && m_source.isNull())
+ // If the image was imported (e.g, from an SgImage under Symbian), then
+ // skip the hibernation, there is no sense in copying it back to main
+ // memory because the data is most likely shared between several processes.
+ bool skipHibernate = (m_texture.id && m_source.isNull());
+#if defined(Q_OS_SYMBIAN)
+ // However we have to proceed normally if the image was retrieved via
+ // a handle provider.
+ skipHibernate &= !nativeImageHandleProvider;
+#endif
+ if (skipHibernate)
return;
forceToImage();
@@ -877,9 +893,6 @@ void QGLPixmapData::reclaimTexture()
destroyTexture();
}
-Q_GUI_EXPORT int qt_defaultDpiX();
-Q_GUI_EXPORT int qt_defaultDpiY();
-
int QGLPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
if (w == 0)
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index eae1c9b..77f6103 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -338,7 +338,7 @@ struct QGLWindowSurfacePrivate
QGLWindowSurfaceGLPaintDevice glDevice;
QGLWindowSurface* q_ptr;
- bool partialUpdateSupport;
+ bool swap_region_support;
};
QGLFormat QGLWindowSurface::surfaceFormat;
@@ -391,7 +391,7 @@ QGLWindowSurface::QGLWindowSurface(QWidget *window)
d_ptr->q_ptr = this;
d_ptr->geometry_updated = false;
d_ptr->did_paint = false;
- d_ptr->partialUpdateSupport = false;
+ d_ptr->swap_region_support = false;
}
QGLWindowSurface::~QGLWindowSurface()
@@ -491,22 +491,17 @@ void QGLWindowSurface::hijackWindow(QWidget *widget)
if (haveNOKSwapRegion)
qDebug() << "Found EGL_NOK_swap_region2 extension. Using partial updates.";
}
- bool swapBehaviourPreserved = (ctx->d_func()->eglContext->configAttrib(EGL_SWAP_BEHAVIOR) != EGL_BUFFER_PRESERVED)
- || (ctx->d_func()->eglContext->configAttrib(EGL_SURFACE_TYPE)&EGL_SWAP_BEHAVIOR_PRESERVED_BIT);
+
+ d_ptr->destructive_swap_buffers = true;
if (ctx->d_func()->eglContext->configAttrib(EGL_SURFACE_TYPE)&EGL_SWAP_BEHAVIOR_PRESERVED_BIT) {
EGLint swapBehavior;
if (eglQuerySurface(ctx->d_func()->eglContext->display(), ctx->d_func()->eglSurface
, EGL_SWAP_BEHAVIOR, &swapBehavior)) {
- swapBehaviourPreserved = (swapBehavior == EGL_BUFFER_PRESERVED);
+ d_ptr->destructive_swap_buffers = (swapBehavior != EGL_BUFFER_PRESERVED);
}
}
- if (!swapBehaviourPreserved && !haveNOKSwapRegion)
- d_ptr->partialUpdateSupport = false; // Force full-screen updates
- else
- d_ptr->partialUpdateSupport = true;
-#else
- d_ptr->partialUpdateSupport = false;
+ d_ptr->swap_region_support = haveNOKSwapRegion;
#endif
widgetPrivate->extraData()->glContext = ctx;
@@ -622,7 +617,7 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
// mistake to call swapBuffers if nothing was painted unless
// EGL_BUFFER_PRESERVED is set. This check protects the flush func from
// being executed if it's for nothing.
- if (!hasPartialUpdateSupport() && !d_ptr->did_paint)
+ if (!d_ptr->destructive_swap_buffers && !d_ptr->did_paint)
return;
QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget();
@@ -698,12 +693,12 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
}
#endif
bool doingPartialUpdate = false;
- if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AutomaticSwap)
- doingPartialUpdate = hasPartialUpdateSupport() && br.width() * br.height() < parent->geometry().width() * parent->geometry().height() * 0.2;
- else if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AlwaysFullSwap)
- doingPartialUpdate = false;
- else if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AlwaysPartialSwap)
- doingPartialUpdate = hasPartialUpdateSupport();
+ if (d_ptr->swap_region_support) {
+ if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AutomaticSwap)
+ doingPartialUpdate = br.width() * br.height() < parent->geometry().width() * parent->geometry().height() * 0.2;
+ else if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AlwaysPartialSwap)
+ doingPartialUpdate = true;
+ }
QGLContext *ctx = reinterpret_cast<QGLContext *>(parent->d_func()->extraData()->glContext);
if (widget != window()) {
@@ -922,7 +917,7 @@ void QGLWindowSurface::updateGeometry() {
ctx->d_func()->eglContext->config());
eglGetError(); // Clear error state.
- if (hasPartialUpdateSupport()) {
+ if (!d_ptr->destructive_swap_buffers) {
eglSurfaceAttrib(ctx->d_func()->eglContext->display(),
ctx->d_func()->eglSurface,
EGL_SWAP_BEHAVIOR, EGL_BUFFER_PRESERVED);
@@ -1166,12 +1161,15 @@ QImage *QGLWindowSurface::buffer(const QWidget *widget)
return &d_ptr->buffers.last();
}
-bool QGLWindowSurface::hasPartialUpdateSupport() const
+QWindowSurface::WindowSurfaceFeatures QGLWindowSurface::features() const
{
- return d_ptr->partialUpdateSupport;
+ WindowSurfaceFeatures features = 0;
+ if (!d_ptr->destructive_swap_buffers || d_ptr->swap_region_support)
+ features |= PartialUpdates;
+ if (!d_ptr->destructive_swap_buffers)
+ features |= PreservedContents;
+ return features;
}
-
-
QT_END_NAMESPACE
diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h
index e1689bf..4ad8339 100644
--- a/src/opengl/qwindowsurface_gl_p.h
+++ b/src/opengl/qwindowsurface_gl_p.h
@@ -108,7 +108,7 @@ public:
QImage *buffer(const QWidget *widget);
- bool hasPartialUpdateSupport() const;
+ WindowSurfaceFeatures features() const;
QGLContext *context() const;
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 570adfd..3c2b5fd 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -77,9 +77,6 @@ static const qreal aliasedCoordinateDelta = 0.5 - 0.015625;
#if !defined(QVG_NO_DRAW_GLYPHS)
-Q_GUI_EXPORT int qt_defaultDpiX();
-Q_GUI_EXPORT int qt_defaultDpiY();
-
class QVGPaintEnginePrivate;
typedef QHash<QFontEngine*, QVGFontGlyphCache*> QVGFontCache;
diff --git a/src/openvg/qpixmapdata_vg.cpp b/src/openvg/qpixmapdata_vg.cpp
index 3f67c79..ea93748 100644
--- a/src/openvg/qpixmapdata_vg.cpp
+++ b/src/openvg/qpixmapdata_vg.cpp
@@ -51,6 +51,7 @@
#include <QImageReader>
#include <QtGui/private/qimage_p.h>
#include <QtGui/private/qnativeimagehandleprovider_p.h>
+#include <QtGui/private/qfont_p.h>
QT_BEGIN_NAMESPACE
@@ -458,7 +459,7 @@ void QVGPixmapData::hibernate()
if (skipHibernate)
return;
- forceToImage();
+ forceToImage(false); // no readback allowed here
destroyImageAndContext();
}
@@ -470,9 +471,6 @@ void QVGPixmapData::reclaimImages()
destroyImages();
}
-Q_GUI_EXPORT int qt_defaultDpiX();
-Q_GUI_EXPORT int qt_defaultDpiY();
-
int QVGPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
{
switch (metric) {
@@ -502,12 +500,13 @@ int QVGPixmapData::metric(QPaintDevice::PaintDeviceMetric metric) const
// Ensures that the pixmap is backed by some valid data and forces the data to
// be re-uploaded to the VGImage when toVGImage() is called next time.
-void QVGPixmapData::forceToImage()
+void QVGPixmapData::forceToImage(bool allowReadback)
{
if (!isValid())
return;
- ensureReadback(false);
+ if (allowReadback)
+ ensureReadback(false);
if (source.isNull())
source = QVolatileImage(w, h, sourceFormat());
diff --git a/src/openvg/qpixmapdata_vg_p.h b/src/openvg/qpixmapdata_vg_p.h
index 15ff889..c284596 100644
--- a/src/openvg/qpixmapdata_vg_p.h
+++ b/src/openvg/qpixmapdata_vg_p.h
@@ -188,7 +188,7 @@ protected:
QString nativeImageType;
#endif
- void forceToImage();
+ void forceToImage(bool allowReadback = true);
QImage::Format sourceFormat() const;
QImage::Format idealFormat(QImage *image, Qt::ImageConversionFlags flags) const;
void updateSerial();
diff --git a/src/openvg/qwindowsurface_vg.cpp b/src/openvg/qwindowsurface_vg.cpp
index 6f99de4..eedfea5 100644
--- a/src/openvg/qwindowsurface_vg.cpp
+++ b/src/openvg/qwindowsurface_vg.cpp
@@ -119,9 +119,12 @@ QPaintEngine *QVGWindowSurface::paintEngine() const
return d_ptr->paintEngine();
}
-bool QVGWindowSurface::hasStaticContentsSupport() const
+QWindowSurface::WindowSurfaceFeatures QVGWindowSurface::features() const
{
- d_ptr->supportsStaticContents();
+ WindowSurfaceFeatures features = PartialUpdates | PreservedContents;
+ if (d_ptr->supportsStaticContents())
+ features |= StaticContents;
+ return features;
}
int QVGWindowSurface::metric(PaintDeviceMetric met) const
diff --git a/src/openvg/qwindowsurface_vg_p.h b/src/openvg/qwindowsurface_vg_p.h
index 2d6b4f9..d63d077 100644
--- a/src/openvg/qwindowsurface_vg_p.h
+++ b/src/openvg/qwindowsurface_vg_p.h
@@ -78,7 +78,7 @@ public:
QPaintEngine *paintEngine() const;
- bool hasStaticContentsSupport() const;
+ WindowSurfaceFeatures features() const;
protected:
int metric(PaintDeviceMetric metric) const;
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index dc74c4e..6d6fb02 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -1025,11 +1025,10 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m
case QPainter::CompositionMode_DestinationOut:
surface->SetPorterDuff(surface, DSPD_DST_OUT);
break;
-#if (Q_DIRECTFB_VERSION >= 0x010209)
case QPainter::CompositionMode_Destination:
- surface->SetPorterDuff(surface, DSPD_DST);
+ surface->SetSrcBlendFunction(surface, DSBF_ZERO);
+ surface->SetDstBlendFunction(surface, DSBF_ONE);
break;
-#endif
#if (Q_DIRECTFB_VERSION >= 0x010000)
case QPainter::CompositionMode_SourceAtop:
surface->SetPorterDuff(surface, DSPD_SRC_ATOP);
diff --git a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c
index 8a1fddf..f861838 100644
--- a/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c
+++ b/src/plugins/gfxdrivers/powervr/QWSWSEGL/pvrqwswsegl.c
@@ -39,7 +39,7 @@
**
****************************************************************************/
-#include <GLES/egltypes.h>
+#include <GLES/eglplatform.h>
#include <wsegl.h>
#include <pvr2d.h>
#include <string.h>
@@ -202,7 +202,8 @@ static WSEGLError wseglDeleteDrawable(WSEGLDrawableHandle _drawable)
PvrQwsDrawable *drawable = (PvrQwsDrawable *)_drawable;
if (!drawable || drawable->type == PvrQwsScreen)
return WSEGL_SUCCESS;
- pvrQwsFreeBuffers(drawable);
+ if (pvrQwsDisplay.numFlipBuffers == 0)
+ pvrQwsFreeBuffers(drawable);
if (pvrQwsReleaseWindow(drawable))
pvrQwsDestroyDrawable(drawable);
return WSEGL_SUCCESS;
diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
index c904c3c..fdb72de 100644
--- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp
@@ -170,7 +170,7 @@ bool QMeeGoGraphicsSystemSwitchHandler::eventFilter(QObject *object, QEvent *eve
if (visibleWidgets() == 0)
QMeeGoGraphicsSystem::switchToRaster();
} else {
- if (visibleWidgets() == 1)
+ if (visibleWidgets() > 0)
QMeeGoGraphicsSystem::switchToMeeGo();
}
}
@@ -217,7 +217,7 @@ QPixmapData *QMeeGoGraphicsSystem::createPixmapData(QPixmapData *origin)
// and if the pixmap pointer matches our mapping...
// create a shared image instead with the given handle.
- if (origin->classId() == QPixmapData::RasterClass) {
+ if (!origin->isNull() && origin->classId() == QPixmapData::RasterClass) {
QRasterPixmapData *rasterClass = static_cast <QRasterPixmapData *> (origin);
void *rawResource = static_cast <void *> (rasterClass->buffer()->data_ptr()->data);
diff --git a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
index 0970b89..b6ba7ec 100644
--- a/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
+++ b/src/plugins/graphicssystems/meego/qmeegolivepixmapdata.cpp
@@ -194,6 +194,8 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
void *data = 0;
int pitch = 0;
+ int surfaceWidth = 0;
+ int surfaceHeight = 0;
EGLSurface surface = 0;
QImage::Format format;
lockedImage = QImage();
@@ -206,9 +208,11 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_POINTER_KHR, (EGLint*) &data);
eglQuerySurface(QEgl::display(), surface, EGL_BITMAP_PITCH_KHR, (EGLint*) &pitch);
+ eglQuerySurface(QEgl::display(), surface, EGL_WIDTH, (EGLint*) &surfaceWidth);
+ eglQuerySurface(QEgl::display(), surface, EGL_HEIGHT, (EGLint*) &surfaceHeight);
// Ok, here we know we just support those two formats. Real solution would be:
- // uqery also the format.
+ // query also the format.
if (backingX11Pixmap->depth() > 16)
format = QImage::Format_ARGB32_Premultiplied;
else
@@ -219,6 +223,12 @@ QImage* QMeeGoLivePixmapData::lock(EGLSyncKHR fenceSync)
return &lockedImage;
}
+ if (width() != surfaceWidth || height() != surfaceHeight) {
+ qWarning("Live texture dimensions don't match!");
+ QMeeGoExtensions::eglUnlockSurfaceKHR(QEgl::display(), surface);
+ return &lockedImage;
+ }
+
lockedImage = QImage((uchar *) data, width(), height(), pitch, format);
return &lockedImage;
}
diff --git a/src/plugins/s60/3_2/3_2.pro b/src/plugins/s60/3_2/3_2.pro
index 0524866..b104c05 100644
--- a/src/plugins/s60/3_2/3_2.pro
+++ b/src/plugins/s60/3_2/3_2.pro
@@ -16,6 +16,7 @@ contains(S60_VERSION, 3.1) {
LIBS += -lDirectoryLocalizer
}
LIBS += -lefsrv
+ LIBS += -lnumberconversion
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
}
diff --git a/src/plugins/s60/5_0/5_0.pro b/src/plugins/s60/5_0/5_0.pro
index 00aea1b..b037215 100644
--- a/src/plugins/s60/5_0/5_0.pro
+++ b/src/plugins/s60/5_0/5_0.pro
@@ -16,6 +16,7 @@ contains(S60_VERSION, 3.1) {
LIBS += -lDirectoryLocalizer
}
LIBS += -lefsrv
+ LIBS += -lnumberconversion
INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE
}
diff --git a/src/plugins/s60/src/qlocale_3_2.cpp b/src/plugins/s60/src/qlocale_3_2.cpp
index 8c0edd2..ecbf46c 100644
--- a/src/plugins/s60/src/qlocale_3_2.cpp
+++ b/src/plugins/s60/src/qlocale_3_2.cpp
@@ -42,6 +42,7 @@
#include <exception>
#include <e32std.h>
#include <e32base.h>
+#include <numberconversion.h>
EXPORT_C TPtrC defaultGetLongDateFormatSpec(TExtendedLocale& locale)
{
@@ -61,4 +62,5 @@ EXPORT_C TPtrC defaultGetTimeFormatSpec(TExtendedLocale& locale)
EXPORT_C void defaultFormatL(TTime& time, TDes& des, const TDesC& format, const TLocale& locale)
{
time.FormatL(des, format, locale);
+ NumberConversion::ConvertDigits(des, locale.DigitType());
}
diff --git a/src/qt3support/tools/q3asciidict.qdoc b/src/qt3support/tools/q3asciidict.qdoc
index e744633..c276682 100644
--- a/src/qt3support/tools/q3asciidict.qdoc
+++ b/src/qt3support/tools/q3asciidict.qdoc
@@ -43,7 +43,7 @@
performace as a Q3AsciiDict.
Example:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 0
In this example we use a dictionary to keep track of the line
edits we're using. We insert each line edit into the dictionary
with a unique name and then access the line edits via the
@@ -164,7 +164,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -295,7 +295,7 @@
iterator that operates on Q3AsciiDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3asciidict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3asciidict.cpp 2
In the example we insert some line edits into a dictionary, then
iterate over the dictionary printing the strings associated with
those line edits.
diff --git a/src/qt3support/tools/q3dict.qdoc b/src/qt3support/tools/q3dict.qdoc
index 6b221f1..8fcbba4 100644
--- a/src/qt3support/tools/q3dict.qdoc
+++ b/src/qt3support/tools/q3dict.qdoc
@@ -192,7 +192,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3dict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3dict.cpp 0
If there are two or more items with equal keys, then the last item
that was inserted will be replaced.
@@ -326,7 +326,7 @@
point to the next item in the (arbitrary) traversal order.
Example:
- \snippet doc/src/snippets/code/doc_src_q3dict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3dict.cpp 1
In the example we insert some pointers to line edits into a
dictionary, then iterate over the dictionary printing the strings
associated with the line edits.
diff --git a/src/qt3support/tools/q3intdict.qdoc b/src/qt3support/tools/q3intdict.qdoc
index 684fc63..f108f30 100644
--- a/src/qt3support/tools/q3intdict.qdoc
+++ b/src/qt3support/tools/q3intdict.qdoc
@@ -39,7 +39,7 @@
pointer. Dictionaries provide very fast insertion and lookup.
Example:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 0
See Q3Dict for full details, including the choice of dictionary
size, and how deletions are handled.
@@ -145,7 +145,7 @@
\a item may not be 0.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -270,7 +270,7 @@
iterator that operates on Q3IntDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3intdict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3intdict.cpp 2
Note that the traversal order is arbitrary; you are not guaranteed the
order shown above.
diff --git a/src/qt3support/tools/q3memarray.qdoc b/src/qt3support/tools/q3memarray.qdoc
index f05f433..5d6f9b2 100644
--- a/src/qt3support/tools/q3memarray.qdoc
+++ b/src/qt3support/tools/q3memarray.qdoc
@@ -51,7 +51,7 @@
and less copying of data.
Example:
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 0
Program output:
\snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 1
@@ -63,7 +63,7 @@
the remaining bytes will typically be uninitialized, this can
cause find() etc. to fail to find the element. Example:
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 2
To work around this, make sure that you use a struct where
sizeof() returns the same as the sum of the sizes of the members
@@ -352,10 +352,10 @@
allocating memory or copying data.
Example I (intended use):
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 3
Example II (you don't want to do this):
- \snippet doc/src/snippets/code/doc_src_q3memarray.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3memarray.cpp 4
\warning If you do not call resetRawData(), Q3MemArray will attempt
to deallocate or reallocate the raw data, which might not be too
diff --git a/src/qt3support/tools/q3ptrdict.qdoc b/src/qt3support/tools/q3ptrdict.qdoc
index 8831a55..21dcdfd 100644
--- a/src/qt3support/tools/q3ptrdict.qdoc
+++ b/src/qt3support/tools/q3ptrdict.qdoc
@@ -39,7 +39,7 @@
pointer. Dictionaries provide very fast insertion and lookup.
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 0
In this example we use a dictionary to add an extra property (a
char*) to the line edits we're using.
@@ -147,7 +147,7 @@
\a item may not be 0.
Equivalent to
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 1
If there are two or more items with equal keys, then the most
recently inserted item will be replaced.
@@ -272,7 +272,7 @@
iterator that operates on Q3PtrDict\<X\> (dictionary of X*).
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrdict.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3ptrdict.cpp 2
In the example we insert some line edits into a dictionary,
associating a string with each. We then iterate over the
dictionary printing the associated strings.
diff --git a/src/qt3support/tools/q3ptrlist.qdoc b/src/qt3support/tools/q3ptrlist.qdoc
index 13e478e..e19d6bf 100644
--- a/src/qt3support/tools/q3ptrlist.qdoc
+++ b/src/qt3support/tools/q3ptrlist.qdoc
@@ -54,10 +54,10 @@
\target example
Example:
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 0
The output is
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 1
Q3PtrList has several member functions for traversing the list, but
using a Q3PtrListIterator can be more practical. Multiple list
@@ -353,7 +353,7 @@
auto-deletion\endlink is enabled.
Equivalent to:
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 2
The item after the removed item becomes the new current list item
if the removed item is not the last item in the list. If the last
@@ -785,10 +785,10 @@
but it uses Q3PtrListIterator. The class Employee is
defined there.
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 3
The output is
- \snippet doc/src/snippets/code/doc_src_q3ptrlist.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3ptrlist.cpp 4
Using a list iterator is a more robust way of traversing the list
than using the Q3PtrList member functions \link Q3PtrList::first()
diff --git a/src/qt3support/tools/q3valuelist.qdoc b/src/qt3support/tools/q3valuelist.qdoc
index 99f1634..a5ebf60 100644
--- a/src/qt3support/tools/q3valuelist.qdoc
+++ b/src/qt3support/tools/q3valuelist.qdoc
@@ -71,7 +71,7 @@
prefer to use the STL-compatible functions.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 0
Notice that the latest changes to Mary's salary did not affect the
@@ -99,7 +99,7 @@
(your application will crash or do unpredictable things). Use
last() and first() with caution, for example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 1
Because Q3ValueList is value-based there is no need to be careful
about deleting items in the list. The list holds its own copies
@@ -352,7 +352,7 @@
Use the end() function instead. For example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 2
*/
@@ -364,7 +364,7 @@
Use the end() function instead. For example:
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 3
*/
@@ -443,7 +443,7 @@
iterator.
Example (see Q3ValueList for the complete code):
- \snippet doc/src/snippets/code/doc_src_q3valuelist.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3valuelist.cpp 4
Q3ValueList is highly optimized for performance and memory usage.
This means that you must be careful: Q3ValueList does not know
diff --git a/src/qt3support/tools/q3valuestack.qdoc b/src/qt3support/tools/q3valuestack.qdoc
index 4ad0d7d..6c2c57b 100644
--- a/src/qt3support/tools/q3valuestack.qdoc
+++ b/src/qt3support/tools/q3valuestack.qdoc
@@ -44,7 +44,7 @@
without removing it.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuestack.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuestack.cpp 0
Q3ValueStack is a specialized Q3ValueList provided for convenience.
All of Q3ValueList's functionality also applies to Q3PtrStack, for
diff --git a/src/qt3support/tools/q3valuevector.qdoc b/src/qt3support/tools/q3valuevector.qdoc
index 58bd8e3..960bbac 100644
--- a/src/qt3support/tools/q3valuevector.qdoc
+++ b/src/qt3support/tools/q3valuevector.qdoc
@@ -70,10 +70,10 @@
objects it contains.
Example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 0
Program output:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 1
As you can see, the most recent change to Joe's salary did not
affect the value in the vector because the vector created a copy
@@ -102,13 +102,13 @@
an element that does not exist (your application will probably
crash). For example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 2
Whenever inserting, removing or referencing elements in a vector,
always make sure you are referring to valid positions. For
example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 3
The iterators provided by vector are random access iterators,
therefore you can use them with many generic algorithms, for
@@ -127,7 +127,7 @@
application will crash or do unpredictable things). Use back() and
front() with caution, for example:
- \snippet doc/src/snippets/code/doc_src_q3valuevector.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_q3valuevector.cpp 4
Because Q3ValueVector manages memory dynamically, it is recommended
that you contruct a vector with an initial size. Inserting and
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index 5579e5a..9111b7c 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -4486,127 +4486,203 @@ EXPORTS
?objectNameChanged@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4485 NONAME ; void (*QAbstractDeclarativeData::objectNameChanged)(class QAbstractDeclarativeData *, class QObject *)
?queueDeferredActiveObjectsCompletion@QEventDispatcherSymbian@@QAEXXZ @ 4486 NONAME ; void QEventDispatcherSymbian::queueDeferredActiveObjectsCompletion(void)
?reactivateDeferredActiveObjects@QEventDispatcherSymbian@@UAEXXZ @ 4487 NONAME ; void QEventDispatcherSymbian::reactivateDeferredActiveObjects(void)
- ?contains@QString@@QBE?AVQBool@@ABVQStringRef@@W4CaseSensitivity@Qt@@@Z @ 4488 NONAME ; class QBool QString::contains(class QStringRef const &, enum Qt::CaseSensitivity) const
- ?swap@QRegExp@@QAEXAAV1@@Z @ 4489 NONAME ; void QRegExp::swap(class QRegExp &)
- ?indexOf@QStringRef@@QBEHABVQString@@HW4CaseSensitivity@Qt@@@Z @ 4490 NONAME ; int QStringRef::indexOf(class QString const &, int, enum Qt::CaseSensitivity) const
- ?indexOf@QStringRef@@QBEHABV1@HW4CaseSensitivity@Qt@@@Z @ 4491 NONAME ; int QStringRef::indexOf(class QStringRef const &, int, enum Qt::CaseSensitivity) const
- ?count@QString@@QBEHABVQStringRef@@W4CaseSensitivity@Qt@@@Z @ 4492 NONAME ; int QString::count(class QStringRef const &, enum Qt::CaseSensitivity) const
- ?swap@QString@@QAEXAAV1@@Z @ 4493 NONAME ; void QString::swap(class QString &)
- ?trUtf8@QAnimationDriver@@SA?AVQString@@PBD0H@Z @ 4494 NONAME ; class QString QAnimationDriver::trUtf8(char const *, char const *, int)
- ?startsWith@QStringRef@@QBE_NVQChar@@W4CaseSensitivity@Qt@@@Z @ 4495 NONAME ; bool QStringRef::startsWith(class QChar, enum Qt::CaseSensitivity) const
- ?setNativeKey@QSharedMemory@@QAEXABVQString@@@Z @ 4496 NONAME ; void QSharedMemory::setNativeKey(class QString const &)
- ??0QAnimationDriver@@IAE@AAVQAnimationDriverPrivate@@PAVQObject@@@Z @ 4497 NONAME ; QAnimationDriver::QAnimationDriver(class QAnimationDriverPrivate &, class QObject *)
- ?timerEvent@QUnifiedTimer@@MAEXPAVQTimerEvent@@@Z @ 4498 NONAME ; void QUnifiedTimer::timerEvent(class QTimerEvent *)
- ?registerAnimation@QUnifiedTimer@@SAXPAVQAbstractAnimation@@_N@Z @ 4499 NONAME ; void QUnifiedTimer::registerAnimation(class QAbstractAnimation *, bool)
- ?startsWith@QStringRef@@QBE_NABV1@W4CaseSensitivity@Qt@@@Z @ 4500 NONAME ; bool QStringRef::startsWith(class QStringRef const &, enum Qt::CaseSensitivity) const
- ?contains@QStringRef@@QBE?AVQBool@@ABV1@W4CaseSensitivity@Qt@@@Z @ 4501 NONAME ; class QBool QStringRef::contains(class QStringRef const &, enum Qt::CaseSensitivity) const
- ?startsWith@QStringRef@@QBE_NVQLatin1String@@W4CaseSensitivity@Qt@@@Z @ 4502 NONAME ; bool QStringRef::startsWith(class QLatin1String, enum Qt::CaseSensitivity) const
- ?cast@QMetaObject@@QBEPBVQObject@@PBV2@@Z @ 4503 NONAME ; class QObject const * QMetaObject::cast(class QObject const *) const
- ?ensureTimerUpdate@QUnifiedTimer@@SAXXZ @ 4504 NONAME ; void QUnifiedTimer::ensureTimerUpdate(void)
- ?contains@QStringRef@@QBE?AVQBool@@VQLatin1String@@W4CaseSensitivity@Qt@@@Z @ 4505 NONAME ; class QBool QStringRef::contains(class QLatin1String, enum Qt::CaseSensitivity) const
- ?d_func@QAnimationDriver@@ABEPBVQAnimationDriverPrivate@@XZ @ 4506 NONAME ; class QAnimationDriverPrivate const * QAnimationDriver::d_func(void) const
- ?swap@QVariant@@QAEXAAV1@@Z @ 4507 NONAME ; void QVariant::swap(class QVariant &)
- ?lastIndexOf@QStringRef@@QBEHABV1@HW4CaseSensitivity@Qt@@@Z @ 4508 NONAME ; int QStringRef::lastIndexOf(class QStringRef const &, int, enum Qt::CaseSensitivity) const
- ?indexOf@QStringRef@@QBEHVQLatin1String@@HW4CaseSensitivity@Qt@@@Z @ 4509 NONAME ; int QStringRef::indexOf(class QLatin1String, int, enum Qt::CaseSensitivity) const
- ?senderSignalIndex@QObject@@IBEHXZ @ 4510 NONAME ; int QObject::senderSignalIndex(void) const
- ?toUtf8@QStringRef@@QBE?AVQByteArray@@XZ @ 4511 NONAME ; class QByteArray QStringRef::toUtf8(void) const
- ?startsWith@QString@@QBE_NABVQStringRef@@W4CaseSensitivity@Qt@@@Z @ 4512 NONAME ; bool QString::startsWith(class QStringRef const &, enum Qt::CaseSensitivity) const
- ?unlockInternal@QMutex@@AAEXXZ @ 4513 NONAME ; void QMutex::unlockInternal(void)
- ?updateAnimationsTime@QUnifiedTimer@@QAEXXZ @ 4514 NONAME ; void QUnifiedTimer::updateAnimationsTime(void)
- ?swap@QBitArray@@QAEXAAV1@@Z @ 4515 NONAME ; void QBitArray::swap(class QBitArray &)
- ?nativeKey@QSharedMemory@@QBE?AVQString@@XZ @ 4516 NONAME ; class QString QSharedMemory::nativeKey(void) const
- ?connect@QObject@@SA_NPBV1@ABVQMetaMethod@@01W4ConnectionType@Qt@@@Z @ 4517 NONAME ; bool QObject::connect(class QObject const *, class QMetaMethod const &, class QObject const *, class QMetaMethod const &, enum Qt::ConnectionType)
- ?registerRunningAnimation@QUnifiedTimer@@AAEXPAVQAbstractAnimation@@@Z @ 4518 NONAME ; void QUnifiedTimer::registerRunningAnimation(class QAbstractAnimation *)
- ?disconnect@QObject@@SA_NPBV1@ABVQMetaMethod@@01@Z @ 4519 NONAME ; bool QObject::disconnect(class QObject const *, class QMetaMethod const &, class QObject const *, class QMetaMethod const &)
- ?installAnimationDriver@QUnifiedTimer@@QAEXPAVQAnimationDriver@@@Z @ 4520 NONAME ; void QUnifiedTimer::installAnimationDriver(class QAnimationDriver *)
- ?startsWith@QStringRef@@QBE_NABVQString@@W4CaseSensitivity@Qt@@@Z @ 4521 NONAME ; bool QStringRef::startsWith(class QString const &, enum Qt::CaseSensitivity) const
- ?contains@QStringRef@@QBE?AVQBool@@VQChar@@W4CaseSensitivity@Qt@@@Z @ 4522 NONAME ; class QBool QStringRef::contains(class QChar, enum Qt::CaseSensitivity) const
- ?unregisterAnimation@QUnifiedTimer@@SAXPAVQAbstractAnimation@@@Z @ 4523 NONAME ; void QUnifiedTimer::unregisterAnimation(class QAbstractAnimation *)
- ?qt_metacast@QAnimationDriver@@UAEPAXPBD@Z @ 4524 NONAME ; void * QAnimationDriver::qt_metacast(char const *)
- ?count@QStringRef@@QBEHABVQString@@W4CaseSensitivity@Qt@@@Z @ 4525 NONAME ; int QStringRef::count(class QString const &, enum Qt::CaseSensitivity) const
- ?endsWith@QStringRef@@QBE_NVQChar@@W4CaseSensitivity@Qt@@@Z @ 4526 NONAME ; bool QStringRef::endsWith(class QChar, enum Qt::CaseSensitivity) const
- ??0QUnifiedTimer@@AAE@XZ @ 4527 NONAME ; QUnifiedTimer::QUnifiedTimer(void)
- ??0QCoreApplicationPrivate@@QAE@AAHPAPADI@Z @ 4528 NONAME ; QCoreApplicationPrivate::QCoreApplicationPrivate(int &, char * *, unsigned int)
- ??0QCoreApplication@@QAE@AAHPAPADH@Z @ 4529 NONAME ; QCoreApplication::QCoreApplication(int &, char * *, int)
- ??0QAnimationDriver@@QAE@PAVQObject@@@Z @ 4530 NONAME ; QAnimationDriver::QAnimationDriver(class QObject *)
- ?lastIndexOf@QStringRef@@QBEHVQLatin1String@@HW4CaseSensitivity@Qt@@@Z @ 4531 NONAME ; int QStringRef::lastIndexOf(class QLatin1String, int, enum Qt::CaseSensitivity) const
- ??0QAnimationDriverPrivate@@QAE@XZ @ 4532 NONAME ; QAnimationDriverPrivate::QAnimationDriverPrivate(void)
- ?endsWith@QString@@QBE_NABVQStringRef@@W4CaseSensitivity@Qt@@@Z @ 4533 NONAME ; bool QString::endsWith(class QStringRef const &, enum Qt::CaseSensitivity) const
- ?trUtf8@QAnimationDriver@@SA?AVQString@@PBD0@Z @ 4534 NONAME ; class QString QAnimationDriver::trUtf8(char const *, char const *)
- ?install@QAnimationDriver@@QAEXXZ @ 4535 NONAME ; void QAnimationDriver::install(void)
- ?qt_metacall@QAnimationDriver@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4536 NONAME ; int QAnimationDriver::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?endsWith@QStringRef@@QBE_NABVQString@@W4CaseSensitivity@Qt@@@Z @ 4537 NONAME ; bool QStringRef::endsWith(class QString const &, enum Qt::CaseSensitivity) const
- ?lockInline@QMutex@@QAEXXZ @ 4538 NONAME ; void QMutex::lockInline(void)
- ?endsWith@QStringRef@@QBE_NABV1@W4CaseSensitivity@Qt@@@Z @ 4539 NONAME ; bool QStringRef::endsWith(class QStringRef const &, enum Qt::CaseSensitivity) const
- ??_EQUnifiedTimer@@UAE@I@Z @ 4540 NONAME ; QUnifiedTimer::~QUnifiedTimer(unsigned int)
- ?setTimingInterval@QUnifiedTimer@@QAEXH@Z @ 4541 NONAME ; void QUnifiedTimer::setTimingInterval(int)
- ?closestPauseAnimationTimeToFinish@QUnifiedTimer@@AAEHXZ @ 4542 NONAME ; int QUnifiedTimer::closestPauseAnimationTimeToFinish(void)
- ??0QXmlStreamAttributes@@QAE@XZ @ 4543 NONAME ; QXmlStreamAttributes::QXmlStreamAttributes(void)
- ?lastIndexOf@QString@@QBEHABVQStringRef@@HW4CaseSensitivity@Qt@@@Z @ 4544 NONAME ; int QString::lastIndexOf(class QStringRef const &, int, enum Qt::CaseSensitivity) const
- ??1QAnimationDriverPrivate@@UAE@XZ @ 4545 NONAME ; QAnimationDriverPrivate::~QAnimationDriverPrivate(void)
- ?swap@QUrl@@QAEXAAV1@@Z @ 4546 NONAME ; void QUrl::swap(class QUrl &)
- ??_EQAnimationDriverPrivate@@UAE@I@Z @ 4547 NONAME ; QAnimationDriverPrivate::~QAnimationDriverPrivate(unsigned int)
- ??_EQAnimationDriver@@UAE@I@Z @ 4548 NONAME ; QAnimationDriver::~QAnimationDriver(unsigned int)
- ?instance@QUnifiedTimer@@SAPAV1@_N@Z @ 4549 NONAME ; class QUnifiedTimer * QUnifiedTimer::instance(bool)
- ?setSlowdownFactor@QUnifiedTimer@@QAEXM@Z @ 4550 NONAME ; void QUnifiedTimer::setSlowdownFactor(float)
- ?isRunning@QAnimationDriver@@QBE_NXZ @ 4551 NONAME ; bool QAnimationDriver::isRunning(void) const
- ?count@QStringRef@@QBEHABV1@W4CaseSensitivity@Qt@@@Z @ 4552 NONAME ; int QStringRef::count(class QStringRef const &, enum Qt::CaseSensitivity) const
- ?contains@QStringRef@@QBE?AVQBool@@ABVQString@@W4CaseSensitivity@Qt@@@Z @ 4553 NONAME ; class QBool QStringRef::contains(class QString const &, enum Qt::CaseSensitivity) const
- ?tryLockInline@QMutex@@QAE_NXZ @ 4554 NONAME ; bool QMutex::tryLockInline(void)
- ?lastIndexOf@QStringRef@@QBEHABVQString@@HW4CaseSensitivity@Qt@@@Z @ 4555 NONAME ; int QStringRef::lastIndexOf(class QString const &, int, enum Qt::CaseSensitivity) const
- ?lockInternal@QMutex@@AAEXXZ @ 4556 NONAME ; void QMutex::lockInternal(void)
- ?toLocal8Bit@QStringRef@@QBE?AVQByteArray@@XZ @ 4557 NONAME ; class QByteArray QStringRef::toLocal8Bit(void) const
- ?indexOf@QStringRef@@QBEHVQChar@@HW4CaseSensitivity@Qt@@@Z @ 4558 NONAME ; int QStringRef::indexOf(class QChar, int, enum Qt::CaseSensitivity) const
- ?toUcs4@QStringRef@@QBE?AV?$QVector@I@@XZ @ 4559 NONAME ; class QVector<unsigned int> QStringRef::toUcs4(void) const
- ?staticMetaObject@QAnimationDriver@@2UQMetaObject@@B @ 4560 NONAME ; struct QMetaObject const QAnimationDriver::staticMetaObject
- ?unregisterRunningAnimation@QUnifiedTimer@@AAEXPAVQAbstractAnimation@@@Z @ 4561 NONAME ; void QUnifiedTimer::unregisterRunningAnimation(class QAbstractAnimation *)
- ?isLocalFile@QUrl@@QBE_NXZ @ 4562 NONAME ; bool QUrl::isLocalFile(void) const
- ?swap@QByteArray@@QAEXAAV1@@Z @ 4563 NONAME ; void QByteArray::swap(class QByteArray &)
- ?tr@QAnimationDriver@@SA?AVQString@@PBD0H@Z @ 4564 NONAME ; class QString QAnimationDriver::tr(char const *, char const *, int)
- ?toLatin1@QStringRef@@QBE?AVQByteArray@@XZ @ 4565 NONAME ; class QByteArray QStringRef::toLatin1(void) const
- ??1QAnimationDriver@@UAE@XZ @ 4566 NONAME ; QAnimationDriver::~QAnimationDriver(void)
- ?tr@QAnimationDriver@@SA?AVQString@@PBD0@Z @ 4567 NONAME ; class QString QAnimationDriver::tr(char const *, char const *)
- ?waitForDone@QThreadPool@@QAE_NH@Z @ 4568 NONAME ; bool QThreadPool::waitForDone(int)
- ?endsWith@QStringRef@@QBE_NVQLatin1String@@W4CaseSensitivity@Qt@@@Z @ 4569 NONAME ; bool QStringRef::endsWith(class QLatin1String, enum Qt::CaseSensitivity) const
- ?stop@QAnimationDriver@@AAEXXZ @ 4570 NONAME ; void QAnimationDriver::stop(void)
- ?getStaticMetaObject@QAnimationDriver@@SAABUQMetaObject@@XZ @ 4571 NONAME ; struct QMetaObject const & QAnimationDriver::getStaticMetaObject(void)
- ?metaObject@QAnimationDriver@@UBEPBUQMetaObject@@XZ @ 4572 NONAME ; struct QMetaObject const * QAnimationDriver::metaObject(void) const
- ?d_func@QAnimationDriver@@AAEPAVQAnimationDriverPrivate@@XZ @ 4573 NONAME ; class QAnimationDriverPrivate * QAnimationDriver::d_func(void)
- ?app_compile_version@QCoreApplicationPrivate@@2HA @ 4574 NONAME ; int QCoreApplicationPrivate::app_compile_version
- ?restartAnimationTimer@QUnifiedTimer@@QAEXXZ @ 4575 NONAME ; void QUnifiedTimer::restartAnimationTimer(void)
- ?count@QStringRef@@QBEHVQChar@@W4CaseSensitivity@Qt@@@Z @ 4576 NONAME ; int QStringRef::count(class QChar, enum Qt::CaseSensitivity) const
- ?toAscii@QStringRef@@QBE?AVQByteArray@@XZ @ 4577 NONAME ; class QByteArray QStringRef::toAscii(void) const
- ?setConsistentTiming@QUnifiedTimer@@QAEX_N@Z @ 4578 NONAME ; void QUnifiedTimer::setConsistentTiming(bool)
- ??1QUnifiedTimer@@UAE@XZ @ 4579 NONAME ; QUnifiedTimer::~QUnifiedTimer(void)
- ?setSlowModeEnabled@QUnifiedTimer@@QAEX_N@Z @ 4580 NONAME ; void QUnifiedTimer::setSlowModeEnabled(bool)
- ?updateAnimationTimer@QUnifiedTimer@@SAXXZ @ 4581 NONAME ; void QUnifiedTimer::updateAnimationTimer(void)
- ?indexOf@QString@@QBEHABVQStringRef@@HW4CaseSensitivity@Qt@@@Z @ 4582 NONAME ; int QString::indexOf(class QStringRef const &, int, enum Qt::CaseSensitivity) const
- ?lastIndexOf@QStringRef@@QBEHVQChar@@HW4CaseSensitivity@Qt@@@Z @ 4583 NONAME ; int QStringRef::lastIndexOf(class QChar, int, enum Qt::CaseSensitivity) const
- ?advance@QAnimationDriver@@QAEXXZ @ 4584 NONAME ; void QAnimationDriver::advance(void)
- ?start@QAnimationDriver@@AAEXXZ @ 4585 NONAME ; void QAnimationDriver::start(void)
- ?unlockInline@QMutex@@QAEXXZ @ 4586 NONAME ; void QMutex::unlockInline(void)
- ??0QSystemError@@QAE@HW4ErrorScope@0@@Z @ 4587 NONAME ; QSystemError::QSystemError(int, enum QSystemError::ErrorScope)
- ??0QSystemError@@QAE@XZ @ 4588 NONAME ; QSystemError::QSystemError(void)
- ?error@QSystemError@@QAEHXZ @ 4589 NONAME ; int QSystemError::error(void)
- ?scope@QSystemError@@QAE?AW4ErrorScope@1@XZ @ 4590 NONAME ; enum QSystemError::ErrorScope QSystemError::scope(void)
- ?toString@QSystemError@@QAE?AVQString@@XZ @ 4591 NONAME ; class QString QSystemError::toString(void)
- ??0QFileInfo@@QAE@PAVQFileInfoPrivate@@@Z @ 4592 NONAME ; QFileInfo::QFileInfo(class QFileInfoPrivate *)
- ?currentUnicodeVersion@QChar@@SA?AW4UnicodeVersion@1@XZ @ 4593 NONAME ; enum QChar::UnicodeVersion QChar::currentUnicodeVersion(void)
- ?open@QFSFileEngine@@QAE_NV?$QFlags@W4OpenModeFlag@QIODevice@@@@ABVRFile@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4594 NONAME ; bool QFSFileEngine::open(class QFlags<enum QIODevice::OpenModeFlag>, class RFile const &, class QFlags<enum QFile::FileHandleFlag>)
- ?open@QFSFileEngine@@QAE_NV?$QFlags@W4OpenModeFlag@QIODevice@@@@HV?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4595 NONAME ; bool QFSFileEngine::open(class QFlags<enum QIODevice::OpenModeFlag>, int, class QFlags<enum QFile::FileHandleFlag>)
- ?open@QFSFileEngine@@QAE_NV?$QFlags@W4OpenModeFlag@QIODevice@@@@PAU__sFILE@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4596 NONAME ; bool QFSFileEngine::open(class QFlags<enum QIODevice::OpenModeFlag>, struct __sFILE *, class QFlags<enum QFile::FileHandleFlag>)
- ?open@QFile@@QAE_NABVRFile@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4597 NONAME ; bool QFile::open(class RFile const &, class QFlags<enum QIODevice::OpenModeFlag>, class QFlags<enum QFile::FileHandleFlag>)
- ?open@QFile@@QAE_NHV?$QFlags@W4OpenModeFlag@QIODevice@@@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4598 NONAME ; bool QFile::open(int, class QFlags<enum QIODevice::OpenModeFlag>, class QFlags<enum QFile::FileHandleFlag>)
- ?open@QFile@@QAE_NPAU__sFILE@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4599 NONAME ; bool QFile::open(struct __sFILE *, class QFlags<enum QIODevice::OpenModeFlag>, class QFlags<enum QFile::FileHandleFlag>)
- ?symbianCommandLine@QCoreApplicationPrivate@@SAPAVCApaCommandLine@@XZ @ 4600 NONAME ; class CApaCommandLine * QCoreApplicationPrivate::symbianCommandLine(void)
- ?nsecsElapsed@QElapsedTimer@@QBE_JXZ @ 4601 NONAME ; long long QElapsedTimer::nsecsElapsed(void) const
- ??XQPoint@@QAEAAV0@N@Z @ 4602 NONAME ; class QPoint & QPoint::operator*=(double)
- ??XQPoint@@QAEAAV0@H@Z @ 4603 NONAME ; class QPoint & QPoint::operator*=(int)
- ?hasError@QXmlStreamWriter@@QBE_NXZ @ 4604 NONAME ; bool QXmlStreamWriter::hasError(void) const
- ?revision@QMetaProperty@@QBEHXZ @ 4605 NONAME ; int QMetaProperty::revision(void) const
- ?revision@QMetaMethod@@QBEHXZ @ 4606 NONAME ; int QMetaMethod::revision(void) const
- ?started@QAnimationDriver@@MAEXXZ @ 4607 NONAME ; void QAnimationDriver::started(void)
- ?stopped@QAnimationDriver@@MAEXXZ @ 4608 NONAME ; void QAnimationDriver::stopped(void)
- ?isResetDisabled@QNonContiguousByteDevice@@QAE_NXZ @ 4609 NONAME ; bool QNonContiguousByteDevice::isResetDisabled(void)
- ?create@QNonContiguousByteDeviceFactory@@SAPAVQNonContiguousByteDevice@@V?$QSharedPointer@VQRingBuffer@@@@@Z @ 4610 NONAME ; class QNonContiguousByteDevice * QNonContiguousByteDeviceFactory::create(class QSharedPointer<class QRingBuffer>)
+ ?symbianCommandLine@QCoreApplicationPrivate@@SAPAVCApaCommandLine@@XZ @ 4488 NONAME ; class CApaCommandLine * QCoreApplicationPrivate::symbianCommandLine(void)
+ ?revision@QMetaProperty@@QBEHXZ @ 4489 NONAME ; int QMetaProperty::revision(void) const
+ ?revision@QMetaMethod@@QBEHXZ @ 4490 NONAME ; int QMetaMethod::revision(void) const
+ adler32_combine @ 4491 NONAME
+ adler32_combine64 @ 4492 NONAME
+ compressBound @ 4493 NONAME
+ crc32_combine @ 4494 NONAME
+ crc32_combine64 @ 4495 NONAME
+ deflateBound @ 4496 NONAME
+ deflatePrime @ 4497 NONAME
+ deflateSetHeader @ 4498 NONAME
+ deflateTune @ 4499 NONAME
+ gzbuffer @ 4500 NONAME
+ gzclearerr @ 4501 NONAME
+ gzclose_r @ 4502 NONAME
+ gzclose_w @ 4503 NONAME
+ gzdirect @ 4504 NONAME
+ gzoffset @ 4505 NONAME
+ gzoffset64 @ 4506 NONAME
+ gzopen64 @ 4507 NONAME
+ gzseek64 @ 4508 NONAME
+ gztell64 @ 4509 NONAME
+ gzungetc @ 4510 NONAME
+ inflateBack @ 4511 NONAME
+ inflateBackEnd @ 4512 NONAME
+ inflateBackInit_ @ 4513 NONAME
+ inflateCopy @ 4514 NONAME
+ inflateGetHeader @ 4515 NONAME
+ inflateMark @ 4516 NONAME
+ inflatePrime @ 4517 NONAME
+ inflateReset2 @ 4518 NONAME
+ inflateUndermine @ 4519 NONAME
+ zlibCompileFlags @ 4520 NONAME
+ ??_EQDateTime@@QAE@I@Z @ 4521 NONAME ; QDateTime::~QDateTime(unsigned int)
+ ??4QDate@@QAEAAV0@ABV0@@Z @ 4522 NONAME ; class QDate & QDate::operator=(class QDate const &)
+ ??4QSizeF@@QAEAAV0@ABV0@@Z @ 4523 NONAME ; class QSizeF & QSizeF::operator=(class QSizeF const &)
+ ??0QSize@@QAE@ABV0@@Z @ 4524 NONAME ; QSize::QSize(class QSize const &)
+ ?contains@QString@@QBE?AVQBool@@ABVQStringRef@@W4CaseSensitivity@Qt@@@Z @ 4525 NONAME ; class QBool QString::contains(class QStringRef const &, enum Qt::CaseSensitivity) const
+ ?swap@QRegExp@@QAEXAAV1@@Z @ 4526 NONAME ; void QRegExp::swap(class QRegExp &)
+ ?indexOf@QStringRef@@QBEHABVQString@@HW4CaseSensitivity@Qt@@@Z @ 4527 NONAME ; int QStringRef::indexOf(class QString const &, int, enum Qt::CaseSensitivity) const
+ ?indexOf@QStringRef@@QBEHABV1@HW4CaseSensitivity@Qt@@@Z @ 4528 NONAME ; int QStringRef::indexOf(class QStringRef const &, int, enum Qt::CaseSensitivity) const
+ ?count@QString@@QBEHABVQStringRef@@W4CaseSensitivity@Qt@@@Z @ 4529 NONAME ; int QString::count(class QStringRef const &, enum Qt::CaseSensitivity) const
+ ?swap@QString@@QAEXAAV1@@Z @ 4530 NONAME ; void QString::swap(class QString &)
+ ?trUtf8@QAnimationDriver@@SA?AVQString@@PBD0H@Z @ 4531 NONAME ; class QString QAnimationDriver::trUtf8(char const *, char const *, int)
+ ?startsWith@QStringRef@@QBE_NVQChar@@W4CaseSensitivity@Qt@@@Z @ 4532 NONAME ; bool QStringRef::startsWith(class QChar, enum Qt::CaseSensitivity) const
+ ?setNativeKey@QSharedMemory@@QAEXABVQString@@@Z @ 4533 NONAME ; void QSharedMemory::setNativeKey(class QString const &)
+ ??0QAnimationDriver@@IAE@AAVQAnimationDriverPrivate@@PAVQObject@@@Z @ 4534 NONAME ; QAnimationDriver::QAnimationDriver(class QAnimationDriverPrivate &, class QObject *)
+ ?timerEvent@QUnifiedTimer@@MAEXPAVQTimerEvent@@@Z @ 4535 NONAME ; void QUnifiedTimer::timerEvent(class QTimerEvent *)
+ ?currentUnicodeVersion@QChar@@SA?AW4UnicodeVersion@1@XZ @ 4536 NONAME ; enum QChar::UnicodeVersion QChar::currentUnicodeVersion(void)
+ ?registerAnimation@QUnifiedTimer@@SAXPAVQAbstractAnimation@@_N@Z @ 4537 NONAME ; void QUnifiedTimer::registerAnimation(class QAbstractAnimation *, bool)
+ ?startsWith@QStringRef@@QBE_NABV1@W4CaseSensitivity@Qt@@@Z @ 4538 NONAME ; bool QStringRef::startsWith(class QStringRef const &, enum Qt::CaseSensitivity) const
+ ?contains@QStringRef@@QBE?AVQBool@@ABV1@W4CaseSensitivity@Qt@@@Z @ 4539 NONAME ; class QBool QStringRef::contains(class QStringRef const &, enum Qt::CaseSensitivity) const
+ ??0QEvent@@QAE@ABV0@@Z @ 4540 NONAME ; QEvent::QEvent(class QEvent const &)
+ ?open@QFSFileEngine@@QAE_NV?$QFlags@W4OpenModeFlag@QIODevice@@@@HV?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4541 NONAME ; bool QFSFileEngine::open(class QFlags<enum QIODevice::OpenModeFlag>, int, class QFlags<enum QFile::FileHandleFlag>)
+ ?startsWith@QStringRef@@QBE_NVQLatin1String@@W4CaseSensitivity@Qt@@@Z @ 4542 NONAME ; bool QStringRef::startsWith(class QLatin1String, enum Qt::CaseSensitivity) const
+ ?cast@QMetaObject@@QBEPBVQObject@@PBV2@@Z @ 4543 NONAME ; class QObject const * QMetaObject::cast(class QObject const *) const
+ ?ensureTimerUpdate@QUnifiedTimer@@SAXXZ @ 4544 NONAME ; void QUnifiedTimer::ensureTimerUpdate(void)
+ ?contains@QStringRef@@QBE?AVQBool@@VQLatin1String@@W4CaseSensitivity@Qt@@@Z @ 4545 NONAME ; class QBool QStringRef::contains(class QLatin1String, enum Qt::CaseSensitivity) const
+ ??0QTextCodecFactoryInterface@@QAE@XZ @ 4546 NONAME ; QTextCodecFactoryInterface::QTextCodecFactoryInterface(void)
+ ?d_func@QAnimationDriver@@ABEPBVQAnimationDriverPrivate@@XZ @ 4547 NONAME ; class QAnimationDriverPrivate const * QAnimationDriver::d_func(void) const
+ ?swap@QVariant@@QAEXAAV1@@Z @ 4548 NONAME ; void QVariant::swap(class QVariant &)
+ ??0QPointF@@QAE@ABV0@@Z @ 4549 NONAME ; QPointF::QPointF(class QPointF const &)
+ ?lastIndexOf@QStringRef@@QBEHABV1@HW4CaseSensitivity@Qt@@@Z @ 4550 NONAME ; int QStringRef::lastIndexOf(class QStringRef const &, int, enum Qt::CaseSensitivity) const
+ ??_EQUrl@@QAE@I@Z @ 4551 NONAME ; QUrl::~QUrl(unsigned int)
+ ?stopped@QAnimationDriver@@MAEXXZ @ 4552 NONAME ; void QAnimationDriver::stopped(void)
+ ?indexOf@QStringRef@@QBEHVQLatin1String@@HW4CaseSensitivity@Qt@@@Z @ 4553 NONAME ; int QStringRef::indexOf(class QLatin1String, int, enum Qt::CaseSensitivity) const
+ ?senderSignalIndex@QObject@@IBEHXZ @ 4554 NONAME ; int QObject::senderSignalIndex(void) const
+ ?nsecsElapsed@QElapsedTimer@@QBE_JXZ @ 4555 NONAME ; long long QElapsedTimer::nsecsElapsed(void) const
+ ??0QGenericArgument@@QAE@ABV0@@Z @ 4556 NONAME ; QGenericArgument::QGenericArgument(class QGenericArgument const &)
+ ?isResetDisabled@QNonContiguousByteDevice@@QAE_NXZ @ 4557 NONAME ; bool QNonContiguousByteDevice::isResetDisabled(void)
+ ??_EQVariant@@QAE@I@Z @ 4558 NONAME ; QVariant::~QVariant(unsigned int)
+ ?toUtf8@QStringRef@@QBE?AVQByteArray@@XZ @ 4559 NONAME ; class QByteArray QStringRef::toUtf8(void) const
+ ?startsWith@QString@@QBE_NABVQStringRef@@W4CaseSensitivity@Qt@@@Z @ 4560 NONAME ; bool QString::startsWith(class QStringRef const &, enum Qt::CaseSensitivity) const
+ ?unlockInternal@QMutex@@AAEXXZ @ 4561 NONAME ; void QMutex::unlockInternal(void)
+ ??XQPoint@@QAEAAV0@N@Z @ 4562 NONAME ; class QPoint & QPoint::operator*=(double)
+ ?updateAnimationsTime@QUnifiedTimer@@QAEXXZ @ 4563 NONAME ; void QUnifiedTimer::updateAnimationsTime(void)
+ ??0QSystemError@@QAE@HW4ErrorScope@0@@Z @ 4564 NONAME ; QSystemError::QSystemError(int, enum QSystemError::ErrorScope)
+ ??4QLineF@@QAEAAV0@ABV0@@Z @ 4565 NONAME ; class QLineF & QLineF::operator=(class QLineF const &)
+ ?swap@QBitArray@@QAEXAAV1@@Z @ 4566 NONAME ; void QBitArray::swap(class QBitArray &)
+ ?nativeKey@QSharedMemory@@QBE?AVQString@@XZ @ 4567 NONAME ; class QString QSharedMemory::nativeKey(void) const
+ ?connect@QObject@@SA_NPBV1@ABVQMetaMethod@@01W4ConnectionType@Qt@@@Z @ 4568 NONAME ; bool QObject::connect(class QObject const *, class QMetaMethod const &, class QObject const *, class QMetaMethod const &, enum Qt::ConnectionType)
+ ?registerRunningAnimation@QUnifiedTimer@@AAEXPAVQAbstractAnimation@@@Z @ 4569 NONAME ; void QUnifiedTimer::registerRunningAnimation(class QAbstractAnimation *)
+ ??0QXmlStreamAttributes@@QAE@ABV0@@Z @ 4570 NONAME ; QXmlStreamAttributes::QXmlStreamAttributes(class QXmlStreamAttributes const &)
+ ?disconnect@QObject@@SA_NPBV1@ABVQMetaMethod@@01@Z @ 4571 NONAME ; bool QObject::disconnect(class QObject const *, class QMetaMethod const &, class QObject const *, class QMetaMethod const &)
+ ?installAnimationDriver@QUnifiedTimer@@QAEXPAVQAnimationDriver@@@Z @ 4572 NONAME ; void QUnifiedTimer::installAnimationDriver(class QAnimationDriver *)
+ ?startsWith@QStringRef@@QBE_NABVQString@@W4CaseSensitivity@Qt@@@Z @ 4573 NONAME ; bool QStringRef::startsWith(class QString const &, enum Qt::CaseSensitivity) const
+ ?contains@QStringRef@@QBE?AVQBool@@VQChar@@W4CaseSensitivity@Qt@@@Z @ 4574 NONAME ; class QBool QStringRef::contains(class QChar, enum Qt::CaseSensitivity) const
+ ?unregisterAnimation@QUnifiedTimer@@SAXPAVQAbstractAnimation@@@Z @ 4575 NONAME ; void QUnifiedTimer::unregisterAnimation(class QAbstractAnimation *)
+ ?open@QFile@@QAE_NHV?$QFlags@W4OpenModeFlag@QIODevice@@@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4576 NONAME ; bool QFile::open(int, class QFlags<enum QIODevice::OpenModeFlag>, class QFlags<enum QFile::FileHandleFlag>)
+ ?qt_metacast@QAnimationDriver@@UAEPAXPBD@Z @ 4577 NONAME ; void * QAnimationDriver::qt_metacast(char const *)
+ ?count@QStringRef@@QBEHABVQString@@W4CaseSensitivity@Qt@@@Z @ 4578 NONAME ; int QStringRef::count(class QString const &, enum Qt::CaseSensitivity) const
+ ??0QMetaEnum@@QAE@ABV0@@Z @ 4579 NONAME ; QMetaEnum::QMetaEnum(class QMetaEnum const &)
+ ??4QUuid@@QAEAAU0@ABU0@@Z @ 4580 NONAME ; struct QUuid & QUuid::operator=(struct QUuid const &)
+ ?endsWith@QStringRef@@QBE_NVQChar@@W4CaseSensitivity@Qt@@@Z @ 4581 NONAME ; bool QStringRef::endsWith(class QChar, enum Qt::CaseSensitivity) const
+ ??0QUnifiedTimer@@AAE@XZ @ 4582 NONAME ; QUnifiedTimer::QUnifiedTimer(void)
+ ?open@QFSFileEngine@@QAE_NV?$QFlags@W4OpenModeFlag@QIODevice@@@@PAU__sFILE@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4583 NONAME ; bool QFSFileEngine::open(class QFlags<enum QIODevice::OpenModeFlag>, struct __sFILE *, class QFlags<enum QFile::FileHandleFlag>)
+ ??0CQtActiveScheduler@@QAE@XZ @ 4584 NONAME ; CQtActiveScheduler::CQtActiveScheduler(void)
+ ??0QCoreApplicationPrivate@@QAE@AAHPAPADI@Z @ 4585 NONAME ; QCoreApplicationPrivate::QCoreApplicationPrivate(int &, char * *, unsigned int)
+ ??0QCoreApplication@@QAE@AAHPAPADH@Z @ 4586 NONAME ; QCoreApplication::QCoreApplication(int &, char * *, int)
+ ??0QAnimationDriver@@QAE@PAVQObject@@@Z @ 4587 NONAME ; QAnimationDriver::QAnimationDriver(class QObject *)
+ ?lastIndexOf@QStringRef@@QBEHVQLatin1String@@HW4CaseSensitivity@Qt@@@Z @ 4588 NONAME ; int QStringRef::lastIndexOf(class QLatin1String, int, enum Qt::CaseSensitivity) const
+ ??0QAnimationDriverPrivate@@QAE@XZ @ 4589 NONAME ; QAnimationDriverPrivate::QAnimationDriverPrivate(void)
+ ??XQPoint@@QAEAAV0@H@Z @ 4590 NONAME ; class QPoint & QPoint::operator*=(int)
+ ?endsWith@QString@@QBE_NABVQStringRef@@W4CaseSensitivity@Qt@@@Z @ 4591 NONAME ; bool QString::endsWith(class QStringRef const &, enum Qt::CaseSensitivity) const
+ ??0QSizeF@@QAE@ABV0@@Z @ 4592 NONAME ; QSizeF::QSizeF(class QSizeF const &)
+ ?trUtf8@QAnimationDriver@@SA?AVQString@@PBD0@Z @ 4593 NONAME ; class QString QAnimationDriver::trUtf8(char const *, char const *)
+ ?install@QAnimationDriver@@QAEXXZ @ 4594 NONAME ; void QAnimationDriver::install(void)
+ ?qt_metacall@QAnimationDriver@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4595 NONAME ; int QAnimationDriver::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??4QMetaEnum@@QAEAAV0@ABV0@@Z @ 4596 NONAME ; class QMetaEnum & QMetaEnum::operator=(class QMetaEnum const &)
+ ?endsWith@QStringRef@@QBE_NABVQString@@W4CaseSensitivity@Qt@@@Z @ 4597 NONAME ; bool QStringRef::endsWith(class QString const &, enum Qt::CaseSensitivity) const
+ ??4QRect@@QAEAAV0@ABV0@@Z @ 4598 NONAME ; class QRect & QRect::operator=(class QRect const &)
+ ?lockInline@QMutex@@QAEXXZ @ 4599 NONAME ; void QMutex::lockInline(void)
+ ??_EQMutexPool@@QAE@I@Z @ 4600 NONAME ; QMutexPool::~QMutexPool(unsigned int)
+ ??0QMetaClassInfo@@QAE@ABV0@@Z @ 4601 NONAME ; QMetaClassInfo::QMetaClassInfo(class QMetaClassInfo const &)
+ ??0QDate@@QAE@ABV0@@Z @ 4602 NONAME ; QDate::QDate(class QDate const &)
+ ?hasError@QXmlStreamWriter@@QBE_NXZ @ 4603 NONAME ; bool QXmlStreamWriter::hasError(void) const
+ ??_EQTextDecoder@@QAE@I@Z @ 4604 NONAME ; QTextDecoder::~QTextDecoder(unsigned int)
+ ?endsWith@QStringRef@@QBE_NABV1@W4CaseSensitivity@Qt@@@Z @ 4605 NONAME ; bool QStringRef::endsWith(class QStringRef const &, enum Qt::CaseSensitivity) const
+ ??_EQUnifiedTimer@@UAE@I@Z @ 4606 NONAME ; QUnifiedTimer::~QUnifiedTimer(unsigned int)
+ ??_EQMutex@@QAE@I@Z @ 4607 NONAME ; QMutex::~QMutex(unsigned int)
+ ??0QTimerEvent@@QAE@ABV0@@Z @ 4608 NONAME ; QTimerEvent::QTimerEvent(class QTimerEvent const &)
+ ?setTimingInterval@QUnifiedTimer@@QAEXH@Z @ 4609 NONAME ; void QUnifiedTimer::setTimingInterval(int)
+ ?closestPauseAnimationTimeToFinish@QUnifiedTimer@@AAEHXZ @ 4610 NONAME ; int QUnifiedTimer::closestPauseAnimationTimeToFinish(void)
+ ??0QXmlStreamAttributes@@QAE@XZ @ 4611 NONAME ; QXmlStreamAttributes::QXmlStreamAttributes(void)
+ ??_EConverterState@QTextCodec@@QAE@I@Z @ 4612 NONAME ; QTextCodec::ConverterState::~ConverterState(unsigned int)
+ ??4QTime@@QAEAAV0@ABV0@@Z @ 4613 NONAME ; class QTime & QTime::operator=(class QTime const &)
+ ??0QMetaMethod@@QAE@ABV0@@Z @ 4614 NONAME ; QMetaMethod::QMetaMethod(class QMetaMethod const &)
+ ?lastIndexOf@QString@@QBEHABVQStringRef@@HW4CaseSensitivity@Qt@@@Z @ 4615 NONAME ; int QString::lastIndexOf(class QStringRef const &, int, enum Qt::CaseSensitivity) const
+ ??_EQTextEncoder@@QAE@I@Z @ 4616 NONAME ; QTextEncoder::~QTextEncoder(unsigned int)
+ ??1QAnimationDriverPrivate@@UAE@XZ @ 4617 NONAME ; QAnimationDriverPrivate::~QAnimationDriverPrivate(void)
+ ?swap@QUrl@@QAEXAAV1@@Z @ 4618 NONAME ; void QUrl::swap(class QUrl &)
+ ??_EQAnimationDriverPrivate@@UAE@I@Z @ 4619 NONAME ; QAnimationDriverPrivate::~QAnimationDriverPrivate(unsigned int)
+ ??_EQFileInfo@@QAE@I@Z @ 4620 NONAME ; QFileInfo::~QFileInfo(unsigned int)
+ ??_EQAnimationDriver@@UAE@I@Z @ 4621 NONAME ; QAnimationDriver::~QAnimationDriver(unsigned int)
+ ?instance@QUnifiedTimer@@SAPAV1@_N@Z @ 4622 NONAME ; class QUnifiedTimer * QUnifiedTimer::instance(bool)
+ ?setSlowdownFactor@QUnifiedTimer@@QAEXM@Z @ 4623 NONAME ; void QUnifiedTimer::setSlowdownFactor(float)
+ ?isRunning@QAnimationDriver@@QBE_NXZ @ 4624 NONAME ; bool QAnimationDriver::isRunning(void) const
+ ??4QRectF@@QAEAAV0@ABV0@@Z @ 4625 NONAME ; class QRectF & QRectF::operator=(class QRectF const &)
+ ?open@QFSFileEngine@@QAE_NV?$QFlags@W4OpenModeFlag@QIODevice@@@@ABVRFile@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4626 NONAME ; bool QFSFileEngine::open(class QFlags<enum QIODevice::OpenModeFlag>, class RFile const &, class QFlags<enum QFile::FileHandleFlag>)
+ ??4QXmlStreamStringRef@@QAEAAV0@ABV0@@Z @ 4627 NONAME ; class QXmlStreamStringRef & QXmlStreamStringRef::operator=(class QXmlStreamStringRef const &)
+ ?open@QFile@@QAE_NABVRFile@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4628 NONAME ; bool QFile::open(class RFile const &, class QFlags<enum QIODevice::OpenModeFlag>, class QFlags<enum QFile::FileHandleFlag>)
+ ??4QBasicAtomicInt@@QAEAAV0@ABV0@@Z @ 4629 NONAME ; class QBasicAtomicInt & QBasicAtomicInt::operator=(class QBasicAtomicInt const &)
+ ?count@QStringRef@@QBEHABV1@W4CaseSensitivity@Qt@@@Z @ 4630 NONAME ; int QStringRef::count(class QStringRef const &, enum Qt::CaseSensitivity) const
+ ?contains@QStringRef@@QBE?AVQBool@@ABVQString@@W4CaseSensitivity@Qt@@@Z @ 4631 NONAME ; class QBool QStringRef::contains(class QString const &, enum Qt::CaseSensitivity) const
+ ?tryLockInline@QMutex@@QAE_NXZ @ 4632 NONAME ; bool QMutex::tryLockInline(void)
+ ?lastIndexOf@QStringRef@@QBEHABVQString@@HW4CaseSensitivity@Qt@@@Z @ 4633 NONAME ; int QStringRef::lastIndexOf(class QString const &, int, enum Qt::CaseSensitivity) const
+ ?lockInternal@QMutex@@AAEXXZ @ 4634 NONAME ; void QMutex::lockInternal(void)
+ ?scope@QSystemError@@QAE?AW4ErrorScope@1@XZ @ 4635 NONAME ; enum QSystemError::ErrorScope QSystemError::scope(void)
+ ??_EQEasingCurve@@QAE@I@Z @ 4636 NONAME ; QEasingCurve::~QEasingCurve(unsigned int)
+ ?toString@QSystemError@@QAE?AVQString@@XZ @ 4637 NONAME ; class QString QSystemError::toString(void)
+ ?toLocal8Bit@QStringRef@@QBE?AVQByteArray@@XZ @ 4638 NONAME ; class QByteArray QStringRef::toLocal8Bit(void) const
+ ?indexOf@QStringRef@@QBEHVQChar@@HW4CaseSensitivity@Qt@@@Z @ 4639 NONAME ; int QStringRef::indexOf(class QChar, int, enum Qt::CaseSensitivity) const
+ ?toUcs4@QStringRef@@QBE?AV?$QVector@I@@XZ @ 4640 NONAME ; class QVector<unsigned int> QStringRef::toUcs4(void) const
+ ?staticMetaObject@QAnimationDriver@@2UQMetaObject@@B @ 4641 NONAME ; struct QMetaObject const QAnimationDriver::staticMetaObject
+ ?unregisterRunningAnimation@QUnifiedTimer@@AAEXPAVQAbstractAnimation@@@Z @ 4642 NONAME ; void QUnifiedTimer::unregisterRunningAnimation(class QAbstractAnimation *)
+ ?isLocalFile@QUrl@@QBE_NXZ @ 4643 NONAME ; bool QUrl::isLocalFile(void) const
+ ?swap@QByteArray@@QAEXAAV1@@Z @ 4644 NONAME ; void QByteArray::swap(class QByteArray &)
+ ?tr@QAnimationDriver@@SA?AVQString@@PBD0H@Z @ 4645 NONAME ; class QString QAnimationDriver::tr(char const *, char const *, int)
+ ?toLatin1@QStringRef@@QBE?AVQByteArray@@XZ @ 4646 NONAME ; class QByteArray QStringRef::toLatin1(void) const
+ ??1QAnimationDriver@@UAE@XZ @ 4647 NONAME ; QAnimationDriver::~QAnimationDriver(void)
+ ??_EQReadWriteLock@@QAE@I@Z @ 4648 NONAME ; QReadWriteLock::~QReadWriteLock(unsigned int)
+ ??0QFactoryInterface@@QAE@XZ @ 4649 NONAME ; QFactoryInterface::QFactoryInterface(void)
+ ??4QLine@@QAEAAV0@ABV0@@Z @ 4650 NONAME ; class QLine & QLine::operator=(class QLine const &)
+ ?tr@QAnimationDriver@@SA?AVQString@@PBD0@Z @ 4651 NONAME ; class QString QAnimationDriver::tr(char const *, char const *)
+ ?waitForDone@QThreadPool@@QAE_NH@Z @ 4652 NONAME ; bool QThreadPool::waitForDone(int)
+ ??0QMetaProperty@@QAE@ABV0@@Z @ 4653 NONAME ; QMetaProperty::QMetaProperty(class QMetaProperty const &)
+ ??0QSystemError@@QAE@XZ @ 4654 NONAME ; QSystemError::QSystemError(void)
+ ?endsWith@QStringRef@@QBE_NVQLatin1String@@W4CaseSensitivity@Qt@@@Z @ 4655 NONAME ; bool QStringRef::endsWith(class QLatin1String, enum Qt::CaseSensitivity) const
+ ??_EQBitArray@@QAE@I@Z @ 4656 NONAME ; QBitArray::~QBitArray(unsigned int)
+ ??0QTime@@QAE@ABV0@@Z @ 4657 NONAME ; QTime::QTime(class QTime const &)
+ ?stop@QAnimationDriver@@AAEXXZ @ 4658 NONAME ; void QAnimationDriver::stop(void)
+ ??4QPoint@@QAEAAV0@ABV0@@Z @ 4659 NONAME ; class QPoint & QPoint::operator=(class QPoint const &)
+ ??4QSize@@QAEAAV0@ABV0@@Z @ 4660 NONAME ; class QSize & QSize::operator=(class QSize const &)
+ ?getStaticMetaObject@QAnimationDriver@@SAABUQMetaObject@@XZ @ 4661 NONAME ; struct QMetaObject const & QAnimationDriver::getStaticMetaObject(void)
+ ?metaObject@QAnimationDriver@@UBEPBUQMetaObject@@XZ @ 4662 NONAME ; struct QMetaObject const * QAnimationDriver::metaObject(void) const
+ ??0QPoint@@QAE@ABV0@@Z @ 4663 NONAME ; QPoint::QPoint(class QPoint const &)
+ ?d_func@QAnimationDriver@@AAEPAVQAnimationDriverPrivate@@XZ @ 4664 NONAME ; class QAnimationDriverPrivate * QAnimationDriver::d_func(void)
+ ??0QFileInfo@@QAE@PAVQFileInfoPrivate@@@Z @ 4665 NONAME ; QFileInfo::QFileInfo(class QFileInfoPrivate *)
+ ?app_compile_version@QCoreApplicationPrivate@@2HA @ 4666 NONAME ; int QCoreApplicationPrivate::app_compile_version
+ ?create@QNonContiguousByteDeviceFactory@@SAPAVQNonContiguousByteDevice@@V?$QSharedPointer@VQRingBuffer@@@@@Z @ 4667 NONAME ; class QNonContiguousByteDevice * QNonContiguousByteDeviceFactory::create(class QSharedPointer<class QRingBuffer>)
+ ??4QPointF@@QAEAAV0@ABV0@@Z @ 4668 NONAME ; class QPointF & QPointF::operator=(class QPointF const &)
+ ?restartAnimationTimer@QUnifiedTimer@@QAEXXZ @ 4669 NONAME ; void QUnifiedTimer::restartAnimationTimer(void)
+ ??_EQRegExp@@QAE@I@Z @ 4670 NONAME ; QRegExp::~QRegExp(unsigned int)
+ ?count@QStringRef@@QBEHVQChar@@W4CaseSensitivity@Qt@@@Z @ 4671 NONAME ; int QStringRef::count(class QChar, enum Qt::CaseSensitivity) const
+ ?open@QFile@@QAE_NPAU__sFILE@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@V?$QFlags@W4FileHandleFlag@QFile@@@@@Z @ 4672 NONAME ; bool QFile::open(struct __sFILE *, class QFlags<enum QIODevice::OpenModeFlag>, class QFlags<enum QFile::FileHandleFlag>)
+ ?toAscii@QStringRef@@QBE?AVQByteArray@@XZ @ 4673 NONAME ; class QByteArray QStringRef::toAscii(void) const
+ ?setConsistentTiming@QUnifiedTimer@@QAEX_N@Z @ 4674 NONAME ; void QUnifiedTimer::setConsistentTiming(bool)
+ ?started@QAnimationDriver@@MAEXXZ @ 4675 NONAME ; void QAnimationDriver::started(void)
+ ??4QLocalePrivate@@QAEAAU0@ABU0@@Z @ 4676 NONAME ; struct QLocalePrivate & QLocalePrivate::operator=(struct QLocalePrivate const &)
+ ??1QUnifiedTimer@@UAE@XZ @ 4677 NONAME ; QUnifiedTimer::~QUnifiedTimer(void)
+ ?setSlowModeEnabled@QUnifiedTimer@@QAEX_N@Z @ 4678 NONAME ; void QUnifiedTimer::setSlowModeEnabled(bool)
+ ?updateAnimationTimer@QUnifiedTimer@@SAXXZ @ 4679 NONAME ; void QUnifiedTimer::updateAnimationTimer(void)
+ ?error@QSystemError@@QAEHXZ @ 4680 NONAME ; int QSystemError::error(void)
+ ?indexOf@QString@@QBEHABVQStringRef@@HW4CaseSensitivity@Qt@@@Z @ 4681 NONAME ; int QString::indexOf(class QStringRef const &, int, enum Qt::CaseSensitivity) const
+ ?lastIndexOf@QStringRef@@QBEHVQChar@@HW4CaseSensitivity@Qt@@@Z @ 4682 NONAME ; int QStringRef::lastIndexOf(class QChar, int, enum Qt::CaseSensitivity) const
+ ?advance@QAnimationDriver@@QAEXXZ @ 4683 NONAME ; void QAnimationDriver::advance(void)
+ ?start@QAnimationDriver@@AAEXXZ @ 4684 NONAME ; void QAnimationDriver::start(void)
+ ?unlockInline@QMutex@@QAEXXZ @ 4685 NONAME ; void QMutex::unlockInline(void)
+ ??4QSystemError@@QAEAAV0@ABV0@@Z @ 4686 NONAME ; class QSystemError & QSystemError::operator=(class QSystemError const &)
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 8f56e20..45472f5 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -5028,7 +5028,7 @@ EXPORTS
?hasSelection@QItemSelectionModel@@QBE_NXZ @ 5027 NONAME ; bool QItemSelectionModel::hasSelection(void) const
?hasSelection@QTextCursor@@QBE_NXZ @ 5028 NONAME ; bool QTextCursor::hasSelection(void) const
?hasStaticContents@QWindowSurface@@IBE_NXZ @ 5029 NONAME ; bool QWindowSurface::hasStaticContents(void) const
- ?hasStaticContentsSupport@QWindowSurface@@UBE_NXZ @ 5030 NONAME ; bool QWindowSurface::hasStaticContentsSupport(void) const
+ ?hasStaticContentsSupport@QWindowSurface@@UBE_NXZ @ 5030 NONAME ABSENT ; bool QWindowSurface::hasStaticContentsSupport(void) const
?hasThemeIcon@QIcon@@SA_NABVQString@@@Z @ 5031 NONAME ; bool QIcon::hasThemeIcon(class QString const &)
?hasTracking@QAbstractSlider@@QBE_NXZ @ 5032 NONAME ; bool QAbstractSlider::hasTracking(void) const
?hasTranslateOnlySceneTransform@QGraphicsItemPrivate@@QAE_NXZ @ 5033 NONAME ; bool QGraphicsItemPrivate::hasTranslateOnlySceneTransform(void)
@@ -12853,7 +12853,7 @@ EXPORTS
?updateAll@QGraphicsViewPrivate@@QAEXXZ @ 12852 NONAME ; void QGraphicsViewPrivate::updateAll(void)
?updateMicroFocus@QGraphicsItem@@IAEXXZ @ 12853 NONAME ; void QGraphicsItem::updateMicroFocus(void)
?populate@QTextureGlyphCache@@QAEXPAVQFontEngine@@HPBIPBUQFixedPoint@@@Z @ 12854 NONAME ABSENT ; void QTextureGlyphCache::populate(class QFontEngine *, int, unsigned int const *, struct QFixedPoint const *)
- ?hasPartialUpdateSupport@QWindowSurface@@UBE_NXZ @ 12855 NONAME ; bool QWindowSurface::hasPartialUpdateSupport(void) const
+ ?hasPartialUpdateSupport@QWindowSurface@@UBE_NXZ @ 12855 NONAME ABSENT ; bool QWindowSurface::hasPartialUpdateSupport(void) const
?scroll@QRuntimePixmapData@@UAE_NHHABVQRect@@@Z @ 12856 NONAME ; bool QRuntimePixmapData::scroll(int, int, class QRect const &)
?qt_draw_glyphs@@YAXPAVQPainter@@PBIPBVQPointF@@H@Z @ 12857 NONAME ; void qt_draw_glyphs(class QPainter *, unsigned int const *, class QPointF const *, int)
?nativeDisplay@QEgl@@YAHXZ @ 12858 NONAME ; int QEgl::nativeDisplay(void)
@@ -12981,394 +12981,615 @@ EXPORTS
?depth@QVolatileImage@@QBEHXZ @ 12980 NONAME ; int QVolatileImage::depth(void) const
?releaseCachedResources@QGraphicsSystem@@UAEXXZ @ 12981 NONAME ; void QGraphicsSystem::releaseCachedResources(void)
?qt_s60_setPartialScreenInputMode@@YAX_N@Z @ 12982 NONAME ; void qt_s60_setPartialScreenInputMode(bool)
- ?clipEnabledChanged@QBlitterPaintEngine@@UAEXXZ @ 12983 NONAME ; void QBlitterPaintEngine::clipEnabledChanged(void)
- ?supportsSubPixelPositions@QFontEngine@@UBE_NXZ @ 12984 NONAME ; bool QFontEngine::supportsSubPixelPositions(void) const
- ??_EQScrollerProperties@@UAE@I@Z @ 12985 NONAME ; QScrollerProperties::~QScrollerProperties(unsigned int)
- ??_EQFontPrivate@@QAE@I@Z @ 12986 NONAME ABSENT ; QFontPrivate::~QFontPrivate(unsigned int)
- ??0QMimeSource@@QAE@XZ @ 12987 NONAME ABSENT ; QMimeSource::QMimeSource(void)
- ??0QStyleFactoryInterface@@QAE@XZ @ 12988 NONAME ABSENT ; QStyleFactoryInterface::QStyleFactoryInterface(void)
- ?d_func@QScrollEvent@@AAEPAVQScrollEventPrivate@@XZ @ 12989 NONAME ; class QScrollEventPrivate * QScrollEvent::d_func(void)
- ??0QFileOpenEvent@@QAE@ABV0@@Z @ 12990 NONAME ABSENT ; QFileOpenEvent::QFileOpenEvent(class QFileOpenEvent const &)
- ??4QStyleOptionViewItemV2@@QAEAAV0@ABV0@@Z @ 12991 NONAME ABSENT ; class QStyleOptionViewItemV2 & QStyleOptionViewItemV2::operator=(class QStyleOptionViewItemV2 const &)
- ?heightForWidth@QTabWidget@@UBEHH@Z @ 12992 NONAME ; int QTabWidget::heightForWidth(int) const
- ??1QFlickGesture@@UAE@XZ @ 12993 NONAME ; QFlickGesture::~QFlickGesture(void)
- ??0QRasterWindowSurface@@QAE@PAVQWidget@@_N@Z @ 12994 NONAME ; QRasterWindowSurface::QRasterWindowSurface(class QWidget *, bool)
- ?brushChanged@QBlitterPaintEngine@@UAEXXZ @ 12995 NONAME ; void QBlitterPaintEngine::brushChanged(void)
- ?clip@QBlitterPaintEngine@@UAEXABVQRect@@W4ClipOperation@Qt@@@Z @ 12996 NONAME ; void QBlitterPaintEngine::clip(class QRect const &, enum Qt::ClipOperation)
- ?detach@QGlyphs@@AAEXXZ @ 12997 NONAME ; void QGlyphs::detach(void)
- ?trUtf8@QInternalMimeData@@SA?AVQString@@PBD0@Z @ 12998 NONAME ; class QString QInternalMimeData::trUtf8(char const *, char const *)
- ??0QShowEvent@@QAE@ABV0@@Z @ 12999 NONAME ABSENT ; QShowEvent::QShowEvent(class QShowEvent const &)
- ??0QMouseEvent@@QAE@ABV0@@Z @ 13000 NONAME ABSENT ; QMouseEvent::QMouseEvent(class QMouseEvent const &)
- ?setHintingPreference@QFont@@QAEXW4HintingPreference@1@@Z @ 13001 NONAME ; void QFont::setHintingPreference(enum QFont::HintingPreference)
- ??0QActionEvent@@QAE@ABV0@@Z @ 13002 NONAME ABSENT ; QActionEvent::QActionEvent(class QActionEvent const &)
- ??0QTouchEvent@@QAE@ABV0@@Z @ 13003 NONAME ABSENT ; QTouchEvent::QTouchEvent(class QTouchEvent const &)
- ?capabilities@QBlittable@@QBE?AV?$QFlags@W4Capability@QBlittable@@@@XZ @ 13004 NONAME ; class QFlags<enum QBlittable::Capability> QBlittable::capabilities(void) const
- ?setContentPosRange@QScrollPrepareEvent@@QAEXABVQRectF@@@Z @ 13005 NONAME ; void QScrollPrepareEvent::setContentPosRange(class QRectF const &)
- ??_EQImageData@@QAE@I@Z @ 13006 NONAME ABSENT ; QImageData::~QImageData(unsigned int)
- ?swap@QBrush@@QAEXAAV1@@Z @ 13007 NONAME ; void QBrush::swap(class QBrush &)
- ?trUtf8@QFlickGesture@@SA?AVQString@@PBD0H@Z @ 13008 NONAME ; class QString QFlickGesture::trUtf8(char const *, char const *, int)
- ?fontHintingPreference@QTextCharFormat@@QBE?AW4HintingPreference@QFont@@XZ @ 13009 NONAME ; enum QFont::HintingPreference QTextCharFormat::fontHintingPreference(void) const
- ?swap@QPixmap@@QAEXAAV1@@Z @ 13010 NONAME ; void QPixmap::swap(class QPixmap &)
- ??0QBlitterPaintEngine@@QAE@PAVQBlittablePixmapData@@@Z @ 13011 NONAME ; QBlitterPaintEngine::QBlitterPaintEngine(class QBlittablePixmapData *)
- ?numberPrefix@QTextListFormat@@QBE?AVQString@@XZ @ 13012 NONAME ; class QString QTextListFormat::numberPrefix(void) const
- ?setSnapPositionsX@QScroller@@QAEXMM@Z @ 13013 NONAME ; void QScroller::setSnapPositionsX(float, float)
- ?scroller@QScroller@@SAPBV1@PBVQObject@@@Z @ 13014 NONAME ; class QScroller const * QScroller::scroller(class QObject const *)
- ?qt_metacall@QScroller@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13015 NONAME ; int QScroller::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?tr@QFlickGesture@@SA?AVQString@@PBD0@Z @ 13016 NONAME ; class QString QFlickGesture::tr(char const *, char const *)
- ??4QBezier@@QAEAAV0@ABV0@@Z @ 13017 NONAME ABSENT ; class QBezier & QBezier::operator=(class QBezier const &)
- ?setScrollerProperties@QScroller@@QAEXABVQScrollerProperties@@@Z @ 13018 NONAME ; void QScroller::setScrollerProperties(class QScrollerProperties const &)
- ??0QIconEngineV2@@QAE@XZ @ 13019 NONAME ABSENT ; QIconEngineV2::QIconEngineV2(void)
- ??4iterator@QTextBlock@@QAEAAV01@ABV01@@Z @ 13020 NONAME ABSENT ; class QTextBlock::iterator & QTextBlock::iterator::operator=(class QTextBlock::iterator const &)
- ??MQItemSelectionRange@@QBE_NABV0@@Z @ 13021 NONAME ; bool QItemSelectionRange::operator<(class QItemSelectionRange const &) const
- ?setWidthForHeight@QSizePolicy@@QAEX_N@Z @ 13022 NONAME ; void QSizePolicy::setWidthForHeight(bool)
- ?qt_fontdata_from_index@@YA?AVQByteArray@@H@Z @ 13023 NONAME ; class QByteArray qt_fontdata_from_index(int)
- ??0QIconEngineV2@@QAE@ABV0@@Z @ 13024 NONAME ABSENT ; QIconEngineV2::QIconEngineV2(class QIconEngineV2 const &)
- ?swap@QImage@@QAEXAAV1@@Z @ 13025 NONAME ; void QImage::swap(class QImage &)
- ??0QIconEngineFactoryInterfaceV2@@QAE@XZ @ 13026 NONAME ABSENT ; QIconEngineFactoryInterfaceV2::QIconEngineFactoryInterfaceV2(void)
- ??0QScroller@@AAE@PAVQObject@@@Z @ 13027 NONAME ; QScroller::QScroller(class QObject *)
- ?compositionModeChanged@QBlitterPaintEngine@@UAEXXZ @ 13028 NONAME ; void QBlitterPaintEngine::compositionModeChanged(void)
- ?contentPosRange@QScrollPrepareEvent@@QBE?AVQRectF@@XZ @ 13029 NONAME ; class QRectF QScrollPrepareEvent::contentPosRange(void) const
- ?grabGesture@QScroller@@SA?AW4GestureType@Qt@@PAVQObject@@W4ScrollerGestureType@1@@Z @ 13030 NONAME ; enum Qt::GestureType QScroller::grabGesture(class QObject *, enum QScroller::ScrollerGestureType)
- ??_EQFlickGesture@@UAE@I@Z @ 13031 NONAME ; QFlickGesture::~QFlickGesture(unsigned int)
- ?drawRects@QBlitterPaintEngine@@UAEXPBVQRectF@@H@Z @ 13032 NONAME ; void QBlitterPaintEngine::drawRects(class QRectF const *, int)
- ??4QTextLine@@QAEAAV0@ABV0@@Z @ 13033 NONAME ABSENT ; class QTextLine & QTextLine::operator=(class QTextLine const &)
- ??0QToolBarChangeEvent@@QAE@ABV0@@Z @ 13034 NONAME ABSENT ; QToolBarChangeEvent::QToolBarChangeEvent(class QToolBarChangeEvent const &)
- ??1QBlitterPaintEngine@@UAE@XZ @ 13035 NONAME ; QBlitterPaintEngine::~QBlitterPaintEngine(void)
- ?markRasterOverlay@QBlittablePixmapData@@QAEXPBVQRectF@@H@Z @ 13036 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QRectF const *, int)
- ??0QResizeEvent@@QAE@ABV0@@Z @ 13037 NONAME ABSENT ; QResizeEvent::QResizeEvent(class QResizeEvent const &)
- ??0QIconEngineFactoryInterface@@QAE@XZ @ 13038 NONAME ABSENT ; QIconEngineFactoryInterface::QIconEngineFactoryInterface(void)
- ?drawTextItem@QBlitterPaintEngine@@UAEXABVQPointF@@ABVQTextItem@@@Z @ 13039 NONAME ; void QBlitterPaintEngine::drawTextItem(class QPointF const &, class QTextItem const &)
- ??0QPictureFormatInterface@@QAE@XZ @ 13040 NONAME ABSENT ; QPictureFormatInterface::QPictureFormatInterface(void)
- ?trUtf8@QFlickGesture@@SA?AVQString@@PBD0@Z @ 13041 NONAME ; class QString QFlickGesture::trUtf8(char const *, char const *)
- ?stop@QScroller@@QAEXXZ @ 13042 NONAME ; void QScroller::stop(void)
- ?retrieveData@QInternalMimeData@@MBE?AVQVariant@@ABVQString@@W4Type@2@@Z @ 13043 NONAME ; class QVariant QInternalMimeData::retrieveData(class QString const &, enum QVariant::Type) const
- ??8QGlyphs@@QBE_NABV0@@Z @ 13044 NONAME ; bool QGlyphs::operator==(class QGlyphs const &) const
- ?drawImage@QBlitterPaintEngine@@UAEXABVQRectF@@ABVQImage@@0V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 13045 NONAME ; void QBlitterPaintEngine::drawImage(class QRectF const &, class QImage const &, class QRectF const &, class QFlags<enum Qt::ImageConversionFlag>)
- ?contentPos@QScrollEvent@@QBE?AVQPointF@@XZ @ 13046 NONAME ; class QPointF QScrollEvent::contentPos(void) const
- ?mimeTypes@QAbstractProxyModel@@UBE?AVQStringList@@XZ @ 13047 NONAME ; class QStringList QAbstractProxyModel::mimeTypes(void) const
- ?createState@QBlitterPaintEngine@@UBEPAVQPainterState@@PAV2@@Z @ 13048 NONAME ; class QPainterState * QBlitterPaintEngine::createState(class QPainterState *) const
- ?removeItem@QGraphicsGridLayout@@QAEXPAVQGraphicsLayoutItem@@@Z @ 13049 NONAME ; void QGraphicsGridLayout::removeItem(class QGraphicsLayoutItem *)
- ?clipBoundingRect@QPainter@@QBE?AVQRectF@@XZ @ 13050 NONAME ; class QRectF QPainter::clipBoundingRect(void) const
- ?formats@QInternalMimeData@@UBE?AVQStringList@@XZ @ 13051 NONAME ; class QStringList QInternalMimeData::formats(void) const
- ?stateChanged@QScroller@@IAEXW4State@1@@Z @ 13052 NONAME ; void QScroller::stateChanged(enum QScroller::State)
- ?raster@QBlitterPaintEngine@@ABEPAVQRasterPaintEngine@@XZ @ 13053 NONAME ; class QRasterPaintEngine * QBlitterPaintEngine::raster(void) const
- ?sort@QAbstractProxyModel@@UAEXHW4SortOrder@Qt@@@Z @ 13054 NONAME ; void QAbstractProxyModel::sort(int, enum Qt::SortOrder)
- ?d_func@QBlittable@@AAEPAVQBlittablePrivate@@XZ @ 13055 NONAME ; class QBlittablePrivate * QBlittable::d_func(void)
- ?setDefaultScrollerProperties@QScrollerProperties@@SAXABV1@@Z @ 13056 NONAME ; void QScrollerProperties::setDefaultScrollerProperties(class QScrollerProperties const &)
- ??_EQPolygon@@QAE@I@Z @ 13057 NONAME ABSENT ; QPolygon::~QPolygon(unsigned int)
- ?type@QBlitterPaintEngine@@UBE?AW4Type@QPaintEngine@@XZ @ 13058 NONAME ; enum QPaintEngine::Type QBlitterPaintEngine::type(void) const
- ?qt_metacast@QScroller@@UAEPAXPBD@Z @ 13059 NONAME ; void * QScroller::qt_metacast(char const *)
- ??_EQImageReader@@QAE@I@Z @ 13060 NONAME ABSENT ; QImageReader::~QImageReader(unsigned int)
- ?buddy@QAbstractProxyModel@@UBE?AVQModelIndex@@ABV2@@Z @ 13061 NONAME ; class QModelIndex QAbstractProxyModel::buddy(class QModelIndex const &) const
- ?tr@QScroller@@SA?AVQString@@PBD0H@Z @ 13062 NONAME ; class QString QScroller::tr(char const *, char const *, int)
- ?fill@QImage@@QAEXABVQColor@@@Z @ 13063 NONAME ; void QImage::fill(class QColor const &)
- ?scrollMetric@QScrollerProperties@@QBE?AVQVariant@@W4ScrollMetric@1@@Z @ 13064 NONAME ; class QVariant QScrollerProperties::scrollMetric(enum QScrollerProperties::ScrollMetric) const
- ?fill@QImage@@QAEXW4GlobalColor@Qt@@@Z @ 13065 NONAME ; void QImage::fill(enum Qt::GlobalColor)
- ??4QStyleOptionGraphicsItem@@QAEAAV0@ABV0@@Z @ 13066 NONAME ABSENT ; class QStyleOptionGraphicsItem & QStyleOptionGraphicsItem::operator=(class QStyleOptionGraphicsItem const &)
- ?canFetchMore@QAbstractProxyModel@@UBE_NABVQModelIndex@@@Z @ 13067 NONAME ; bool QAbstractProxyModel::canFetchMore(class QModelIndex const &) const
- ??4QStyleOptionProgressBarV2@@QAEAAV0@ABV0@@Z @ 13068 NONAME ABSENT ; class QStyleOptionProgressBarV2 & QStyleOptionProgressBarV2::operator=(class QStyleOptionProgressBarV2 const &)
- ??1QScroller@@EAE@XZ @ 13069 NONAME ; QScroller::~QScroller(void)
- ?setFont@QGlyphs@@QAEXABVQFont@@@Z @ 13070 NONAME ; void QGlyphs::setFont(class QFont const &)
- ?startPos@QScrollPrepareEvent@@QBE?AVQPointF@@XZ @ 13071 NONAME ; class QPointF QScrollPrepareEvent::startPos(void) const
- ?resize@QBlittablePixmapData@@UAEXHH@Z @ 13072 NONAME ; void QBlittablePixmapData::resize(int, int)
- ?setTabsClosable@QMdiArea@@QAEX_N@Z @ 13073 NONAME ; void QMdiArea::setTabsClosable(bool)
- ?ensureVisible@QScroller@@QAEXABVQRectF@@MM@Z @ 13074 NONAME ; void QScroller::ensureVisible(class QRectF const &, float, float)
- ?getText@QInputDialog@@SA?AVQString@@PAVQWidget@@ABV2@1W4EchoMode@QLineEdit@@1PA_NV?$QFlags@W4WindowType@Qt@@@@V?$QFlags@W4InputMethodHint@Qt@@@@@Z @ 13075 NONAME ; class QString QInputDialog::getText(class QWidget *, class QString const &, class QString const &, enum QLineEdit::EchoMode, class QString const &, bool *, class QFlags<enum Qt::WindowType>, class QFlags<enum Qt::InputMethodHint>)
- ?hasWidthForHeight@QSizePolicy@@QBE_NXZ @ 13076 NONAME ; bool QSizePolicy::hasWidthForHeight(void) const
- ?transformChanged@QBlitterPaintEngine@@UAEXXZ @ 13077 NONAME ; void QBlitterPaintEngine::transformChanged(void)
- ??0QDragEnterEvent@@QAE@ABV0@@Z @ 13078 NONAME ABSENT ; QDragEnterEvent::QDragEnterEvent(class QDragEnterEvent const &)
- ??0QBlittablePixmapData@@QAE@XZ @ 13079 NONAME ; QBlittablePixmapData::QBlittablePixmapData(void)
- ??_EKey@QPixmapCache@@QAE@I@Z @ 13080 NONAME ABSENT ; QPixmapCache::Key::~Key(unsigned int)
- ??_EQCursor@@QAE@I@Z @ 13081 NONAME ABSENT ; QCursor::~QCursor(unsigned int)
- ?size@QBlittable@@QBE?AVQSize@@XZ @ 13082 NONAME ; class QSize QBlittable::size(void) const
- ??0QShortcutEvent@@QAE@ABV0@@Z @ 13083 NONAME ABSENT ; QShortcutEvent::QShortcutEvent(class QShortcutEvent const &)
- ?setBlittable@QBlittablePixmapData@@QAEXPAVQBlittable@@@Z @ 13084 NONAME ; void QBlittablePixmapData::setBlittable(class QBlittable *)
- ?opacityChanged@QBlitterPaintEngine@@UAEXXZ @ 13085 NONAME ; void QBlitterPaintEngine::opacityChanged(void)
- ?tr@QFlickGesture@@SA?AVQString@@PBD0H@Z @ 13086 NONAME ; class QString QFlickGesture::tr(char const *, char const *, int)
- ??_EQTextCursor@@QAE@I@Z @ 13087 NONAME ABSENT ; QTextCursor::~QTextCursor(unsigned int)
- ?createExplicitFontWithName@QFontEngine@@IBE?AVQFont@@ABVQString@@@Z @ 13088 NONAME ; class QFont QFontEngine::createExplicitFontWithName(class QString const &) const
- ?setState@QBlitterPaintEngine@@UAEXPAVQPainterState@@@Z @ 13089 NONAME ; void QBlitterPaintEngine::setState(class QPainterState *)
- ?clip@QBlitterPaintEngine@@UAEXABVQRegion@@W4ClipOperation@Qt@@@Z @ 13090 NONAME ; void QBlitterPaintEngine::clip(class QRegion const &, enum Qt::ClipOperation)
- ?subPixelPositionForX@QTextureGlyphCache@@QBE?AUQFixed@@U2@@Z @ 13091 NONAME ; struct QFixed QTextureGlyphCache::subPixelPositionForX(struct QFixed) const
- ?hasAlphaChannel@QBlittablePixmapData@@UBE_NXZ @ 13092 NONAME ; bool QBlittablePixmapData::hasAlphaChannel(void) const
- ?setSnapPositionsX@QScroller@@QAEXABV?$QList@M@@@Z @ 13093 NONAME ; void QScroller::setSnapPositionsX(class QList<float> const &)
- ?numberSuffix@QTextListFormat@@QBE?AVQString@@XZ @ 13094 NONAME ; class QString QTextListFormat::numberSuffix(void) const
- ??HQGlyphs@@ABE?AV0@ABV0@@Z @ 13095 NONAME ; class QGlyphs QGlyphs::operator+(class QGlyphs const &) const
- ??0QGradient@@QAE@ABV0@@Z @ 13096 NONAME ABSENT ; QGradient::QGradient(class QGradient const &)
- ?tabsMovable@QMdiArea@@QBE_NXZ @ 13097 NONAME ; bool QMdiArea::tabsMovable(void) const
- ??4QInputMethodEvent@@QAEAAV0@ABV0@@Z @ 13098 NONAME ABSENT ; class QInputMethodEvent & QInputMethodEvent::operator=(class QInputMethodEvent const &)
- ?contentPos@QScrollPrepareEvent@@QBE?AVQPointF@@XZ @ 13099 NONAME ; class QPointF QScrollPrepareEvent::contentPos(void) const
- ?getStaticMetaObject@QScroller@@SAABUQMetaObject@@XZ @ 13100 NONAME ; struct QMetaObject const & QScroller::getStaticMetaObject(void)
- ?end@QBlitterPaintEngine@@UAE_NXZ @ 13101 NONAME ; bool QBlitterPaintEngine::end(void)
- ??1QScrollerProperties@@UAE@XZ @ 13102 NONAME ; QScrollerProperties::~QScrollerProperties(void)
- ??0QFlickGesture@@QAE@PAVQObject@@W4MouseButton@Qt@@0@Z @ 13103 NONAME ; QFlickGesture::QFlickGesture(class QObject *, enum Qt::MouseButton, class QObject *)
- ?fill@QBlitterPaintEngine@@UAEXABVQVectorPath@@ABVQBrush@@@Z @ 13104 NONAME ; void QBlitterPaintEngine::fill(class QVectorPath const &, class QBrush const &)
- ?drawPixmap@QBlitterPaintEngine@@UAEXABVQRectF@@ABVQPixmap@@0@Z @ 13105 NONAME ; void QBlitterPaintEngine::drawPixmap(class QRectF const &, class QPixmap const &, class QRectF const &)
- ??0QVector2D@@QAE@ABV0@@Z @ 13106 NONAME ABSENT ; QVector2D::QVector2D(class QVector2D const &)
- ?setSnapPositionsY@QScroller@@QAEXABV?$QList@M@@@Z @ 13107 NONAME ; void QScroller::setSnapPositionsY(class QList<float> const &)
- ??4QStyleOptionFocusRect@@QAEAAV0@ABV0@@Z @ 13108 NONAME ABSENT ; class QStyleOptionFocusRect & QStyleOptionFocusRect::operator=(class QStyleOptionFocusRect const &)
- ??_EQPen@@QAE@I@Z @ 13109 NONAME ABSENT ; QPen::~QPen(unsigned int)
- ??_EQKeySequence@@QAE@I@Z @ 13110 NONAME ABSENT ; QKeySequence::~QKeySequence(unsigned int)
- ?tr@QInternalMimeData@@SA?AVQString@@PBD0H@Z @ 13111 NONAME ; class QString QInternalMimeData::tr(char const *, char const *, int)
- ?velocity@QScroller@@QBE?AVQPointF@@XZ @ 13112 NONAME ; class QPointF QScroller::velocity(void) const
- ?glyphIndexes@QGlyphs@@QBE?AV?$QVector@I@@XZ @ 13113 NONAME ; class QVector<unsigned int> QGlyphs::glyphIndexes(void) const
- ?get@QFontPrivate@@SAPAV1@ABVQFont@@@Z @ 13114 NONAME ; class QFontPrivate * QFontPrivate::get(class QFont const &)
- ?setScrollMetric@QScrollerProperties@@QAEXW4ScrollMetric@1@ABVQVariant@@@Z @ 13115 NONAME ; void QScrollerProperties::setScrollMetric(enum QScrollerProperties::ScrollMetric, class QVariant const &)
- ??4QGradient@@QAEAAV0@ABV0@@Z @ 13116 NONAME ABSENT ; class QGradient & QGradient::operator=(class QGradient const &)
- ??0QScrollEvent@@QAE@ABVQPointF@@0W4ScrollState@0@@Z @ 13117 NONAME ; QScrollEvent::QScrollEvent(class QPointF const &, class QPointF const &, enum QScrollEvent::ScrollState)
- ?d_func@QFlickGesture@@AAEPAVQFlickGesturePrivate@@XZ @ 13118 NONAME ; class QFlickGesturePrivate * QFlickGesture::d_func(void)
- ?scrollState@QScrollEvent@@QBE?AW4ScrollState@1@XZ @ 13119 NONAME ; enum QScrollEvent::ScrollState QScrollEvent::scrollState(void) const
- ??0QTextTableFormat@@QAE@ABV0@@Z @ 13120 NONAME ABSENT ; QTextTableFormat::QTextTableFormat(class QTextTableFormat const &)
- ??_EQImagePixmapCleanupHooks@@QAE@I@Z @ 13121 NONAME ABSENT ; QImagePixmapCleanupHooks::~QImagePixmapCleanupHooks(unsigned int)
- ?fetchMore@QAbstractProxyModel@@UAEXABVQModelIndex@@@Z @ 13122 NONAME ; void QAbstractProxyModel::fetchMore(class QModelIndex const &)
- ?glyphs@QTextLine@@ABE?AV?$QList@VQGlyphs@@@@HH@Z @ 13123 NONAME ; class QList<class QGlyphs> QTextLine::glyphs(int, int) const
- ?getStaticMetaObject@QFlickGesture@@SAABUQMetaObject@@XZ @ 13124 NONAME ; struct QMetaObject const & QFlickGesture::getStaticMetaObject(void)
- ?setViewportSize@QScrollPrepareEvent@@QAEXABVQSizeF@@@Z @ 13125 NONAME ; void QScrollPrepareEvent::setViewportSize(class QSizeF const &)
- ??0QStatusTipEvent@@QAE@ABV0@@Z @ 13126 NONAME ABSENT ; QStatusTipEvent::QStatusTipEvent(class QStatusTipEvent const &)
- ??0Value@QCss@@QAE@ABU01@@Z @ 13127 NONAME ABSENT ; QCss::Value::Value(struct QCss::Value const &)
- ?d_func@QScrollPrepareEvent@@AAEPAVQScrollPrepareEventPrivate@@XZ @ 13128 NONAME ; class QScrollPrepareEventPrivate * QScrollPrepareEvent::d_func(void)
- ?overshootDistance@QScrollEvent@@QBE?AVQPointF@@XZ @ 13129 NONAME ; class QPointF QScrollEvent::overshootDistance(void) const
- ?resolveFontFamilyAlias@QFontDatabase@@CA?AVQString@@ABV2@@Z @ 13130 NONAME ; class QString QFontDatabase::resolveFontFamilyAlias(class QString const &)
- ?alphaRGBMapForGlyph@QFontEngine@@UAE?AVQImage@@IUQFixed@@HABVQTransform@@@Z @ 13131 NONAME ; class QImage QFontEngine::alphaRGBMapForGlyph(unsigned int, struct QFixed, int, class QTransform const &)
- ??4QSizePolicy@@QAEAAV0@ABV0@@Z @ 13132 NONAME ABSENT ; class QSizePolicy & QSizePolicy::operator=(class QSizePolicy const &)
- ?swap@QBitmap@@QAEXAAV1@@Z @ 13133 NONAME ; void QBitmap::swap(class QBitmap &)
- ?hasFormat@QInternalMimeData@@UBE_NABVQString@@@Z @ 13134 NONAME ; bool QInternalMimeData::hasFormat(class QString const &) const
- ?renderDataHelper@QInternalMimeData@@SA?AVQByteArray@@ABVQString@@PBVQMimeData@@@Z @ 13135 NONAME ; class QByteArray QInternalMimeData::renderDataHelper(class QString const &, class QMimeData const *)
- ??_ETouchPoint@QTouchEvent@@QAE@I@Z @ 13136 NONAME ABSENT ; QTouchEvent::TouchPoint::~TouchPoint(unsigned int)
- ??0QWindowSurface@@QAE@PAVQWidget@@_N@Z @ 13137 NONAME ; QWindowSurface::QWindowSurface(class QWidget *, bool)
- ?fill@QBlittablePixmapData@@UAEXABVQColor@@@Z @ 13138 NONAME ; void QBlittablePixmapData::fill(class QColor const &)
- ?metric@QBlittablePixmapData@@UBEHW4PaintDeviceMetric@QPaintDevice@@@Z @ 13139 NONAME ; int QBlittablePixmapData::metric(enum QPaintDevice::PaintDeviceMetric) const
- ??4QItemSelection@@QAEAAV0@ABV0@@Z @ 13140 NONAME ABSENT ; class QItemSelection & QItemSelection::operator=(class QItemSelection const &)
- ?fillRect@QBlitterPaintEngine@@UAEXABVQRectF@@ABVQColor@@@Z @ 13141 NONAME ; void QBlitterPaintEngine::fillRect(class QRectF const &, class QColor const &)
- ??4QStyleOptionQ3ListView@@QAEAAV0@ABV0@@Z @ 13142 NONAME ABSENT ; class QStyleOptionQ3ListView & QStyleOptionQ3ListView::operator=(class QStyleOptionQ3ListView const &)
- ??6@YA?AVQDebug@@V0@PBVQSymbianEvent@@@Z @ 13143 NONAME ; class QDebug operator<<(class QDebug, class QSymbianEvent const *)
- ??0QSizePolicy@@QAE@ABV0@@Z @ 13144 NONAME ABSENT ; QSizePolicy::QSizePolicy(class QSizePolicy const &)
- ?ProcessCommandParametersL@QS60MainAppUi@@UAEHW4TApaCommand@@AAV?$TBuf@$0BAA@@@ABVTDesC8@@@Z @ 13145 NONAME ; int QS60MainAppUi::ProcessCommandParametersL(enum TApaCommand, class TBuf<256> &, class TDesC8 const &)
- ?scrollerProperties@QScroller@@QBE?AVQScrollerProperties@@XZ @ 13146 NONAME ; class QScrollerProperties QScroller::scrollerProperties(void) const
- ??_EQBlittablePixmapData@@UAE@I@Z @ 13147 NONAME ; QBlittablePixmapData::~QBlittablePixmapData(unsigned int)
- ?mimeData@QAbstractProxyModel@@UBEPAVQMimeData@@ABV?$QList@VQModelIndex@@@@@Z @ 13148 NONAME ; class QMimeData * QAbstractProxyModel::mimeData(class QList<class QModelIndex> const &) const
- ??4QStyleOptionFrameV2@@QAEAAV0@ABV0@@Z @ 13149 NONAME ABSENT ; class QStyleOptionFrameV2 & QStyleOptionFrameV2::operator=(class QStyleOptionFrameV2 const &)
- ??_EQScroller@@UAE@I@Z @ 13150 NONAME ; QScroller::~QScroller(unsigned int)
- ??1QScrollPrepareEvent@@UAE@XZ @ 13151 NONAME ; QScrollPrepareEvent::~QScrollPrepareEvent(void)
- ??4QVector3D@@QAEAAV0@ABV0@@Z @ 13152 NONAME ABSENT ; class QVector3D & QVector3D::operator=(class QVector3D const &)
- ?setTabsMovable@QMdiArea@@QAEX_N@Z @ 13153 NONAME ; void QMdiArea::setTabsMovable(bool)
- ?minimumSizeHint@QRadioButton@@UBE?AVQSize@@XZ @ 13154 NONAME ; class QSize QRadioButton::minimumSizeHint(void) const
- ??4QStyleOptionQ3DockWindow@@QAEAAV0@ABV0@@Z @ 13155 NONAME ABSENT ; class QStyleOptionQ3DockWindow & QStyleOptionQ3DockWindow::operator=(class QStyleOptionQ3DockWindow const &)
- ?qt_metacast@QFlickGesture@@UAEPAXPBD@Z @ 13156 NONAME ; void * QFlickGesture::qt_metacast(char const *)
- ??_EQFont@@QAE@I@Z @ 13157 NONAME ABSENT ; QFont::~QFont(unsigned int)
- ?setPositions@QGlyphs@@QAEXABV?$QVector@VQPointF@@@@@Z @ 13158 NONAME ; void QGlyphs::setPositions(class QVector<class QPointF> const &)
- ??4QStyleOptionDockWidget@@QAEAAV0@ABV0@@Z @ 13159 NONAME ABSENT ; class QStyleOptionDockWidget & QStyleOptionDockWidget::operator=(class QStyleOptionDockWidget const &)
- ??0QPainterState@@QAE@ABV0@@Z @ 13160 NONAME ABSENT ; QPainterState::QPainterState(class QPainterState const &)
- ??4QStyleOptionFrame@@QAEAAV0@ABV0@@Z @ 13161 NONAME ABSENT ; class QStyleOptionFrame & QStyleOptionFrame::operator=(class QStyleOptionFrame const &)
- ?drawRects@QBlitterPaintEngine@@UAEXPBVQRect@@H@Z @ 13162 NONAME ; void QBlitterPaintEngine::drawRects(class QRect const *, int)
- ?fillInPendingGlyphs@QTextureGlyphCache@@QAEXXZ @ 13163 NONAME ; void QTextureGlyphCache::fillInPendingGlyphs(void)
- ?metaObject@QFlickGesture@@UBEPBUQMetaObject@@XZ @ 13164 NONAME ; struct QMetaObject const * QFlickGesture::metaObject(void) const
- ?renderHintsChanged@QBlitterPaintEngine@@UAEXXZ @ 13165 NONAME ; void QBlitterPaintEngine::renderHintsChanged(void)
- ?supportedDropActions@QAbstractProxyModel@@UBE?AV?$QFlags@W4DropAction@Qt@@@@XZ @ 13166 NONAME ; class QFlags<enum Qt::DropAction> QAbstractProxyModel::supportedDropActions(void) const
- ?hasStaticContentsSupport@QRasterWindowSurface@@UBE_NXZ @ 13167 NONAME ; bool QRasterWindowSurface::hasStaticContentsSupport(void) const
- ?fillRect@QBlitterPaintEngine@@UAEXABVQRectF@@ABVQBrush@@@Z @ 13168 NONAME ; void QBlitterPaintEngine::fillRect(class QRectF const &, class QBrush const &)
- ?setGlyphIndexes@QGlyphs@@QAEXABV?$QVector@I@@@Z @ 13169 NONAME ; void QGlyphs::setGlyphIndexes(class QVector<unsigned int> const &)
- ?alphaMapBoundingBox@QFontEngine@@UAE?AUglyph_metrics_t@@IABVQTransform@@W4GlyphFormat@1@@Z @ 13170 NONAME ; struct glyph_metrics_t QFontEngine::alphaMapBoundingBox(unsigned int, class QTransform const &, enum QFontEngine::GlyphFormat)
- ?resendPrepareEvent@QScroller@@QAEXXZ @ 13171 NONAME ; void QScroller::resendPrepareEvent(void)
- ??4QTextLength@@QAEAAV0@ABV0@@Z @ 13172 NONAME ABSENT ; class QTextLength & QTextLength::operator=(class QTextLength const &)
- ??0QHelpEvent@@QAE@ABV0@@Z @ 13173 NONAME ABSENT ; QHelpEvent::QHelpEvent(class QHelpEvent const &)
- ??0QContextMenuEvent@@QAE@ABV0@@Z @ 13174 NONAME ABSENT ; QContextMenuEvent::QContextMenuEvent(class QContextMenuEvent const &)
- ?d_func@QBlittable@@ABEPBVQBlittablePrivate@@XZ @ 13175 NONAME ; class QBlittablePrivate const * QBlittable::d_func(void) const
- ?state@QBlitterPaintEngine@@QBEPBVQPainterState@@XZ @ 13176 NONAME ; class QPainterState const * QBlitterPaintEngine::state(void) const
- ??0QScrollPrepareEvent@@QAE@ABVQPointF@@@Z @ 13177 NONAME ; QScrollPrepareEvent::QScrollPrepareEvent(class QPointF const &)
- ??0QWhatsThisClickedEvent@@QAE@ABV0@@Z @ 13178 NONAME ABSENT ; QWhatsThisClickedEvent::QWhatsThisClickedEvent(class QWhatsThisClickedEvent const &)
- ??4QStyleOptionTab@@QAEAAV0@ABV0@@Z @ 13179 NONAME ABSENT ; class QStyleOptionTab & QStyleOptionTab::operator=(class QStyleOptionTab const &)
- ??0QTabletEvent@@QAE@ABV0@@Z @ 13180 NONAME ABSENT ; QTabletEvent::QTabletEvent(class QTabletEvent const &)
- ?scrollTo@QScroller@@QAEXABVQPointF@@H@Z @ 13181 NONAME ; void QScroller::scrollTo(class QPointF const &, int)
- ?ungrabGesture@QScroller@@SAXPAVQObject@@@Z @ 13182 NONAME ; void QScroller::ungrabGesture(class QObject *)
- ??4QItemSelectionRange@@QAEAAV0@ABV0@@Z @ 13183 NONAME ABSENT ; class QItemSelectionRange & QItemSelectionRange::operator=(class QItemSelectionRange const &)
- ?clear@QGlyphs@@QAEXXZ @ 13184 NONAME ; void QGlyphs::clear(void)
- ??_EQStyleOptionViewItemV4@@QAE@I@Z @ 13185 NONAME ABSENT ; QStyleOptionViewItemV4::~QStyleOptionViewItemV4(unsigned int)
- ??1QBlittablePixmapData@@UAE@XZ @ 13186 NONAME ; QBlittablePixmapData::~QBlittablePixmapData(void)
- ?formatsHelper@QInternalMimeData@@SA?AVQStringList@@PBVQMimeData@@@Z @ 13187 NONAME ; class QStringList QInternalMimeData::formatsHelper(class QMimeData const *)
- ?qt_metacast@QInternalMimeData@@UAEPAXPBD@Z @ 13188 NONAME ; void * QInternalMimeData::qt_metacast(char const *)
- ?font@QGlyphs@@QBE?AVQFont@@XZ @ 13189 NONAME ; class QFont QGlyphs::font(void) const
- ?paintEngine@QBlittablePixmapData@@UBEPAVQPaintEngine@@XZ @ 13190 NONAME ; class QPaintEngine * QBlittablePixmapData::paintEngine(void) const
- ?unsetDefaultScrollerProperties@QScrollerProperties@@SAXXZ @ 13191 NONAME ; void QScrollerProperties::unsetDefaultScrollerProperties(void)
- ?hasChildren@QAbstractProxyModel@@UBE_NABVQModelIndex@@@Z @ 13192 NONAME ; bool QAbstractProxyModel::hasChildren(class QModelIndex const &) const
- ?swap@QPen@@QAEXAAV1@@Z @ 13193 NONAME ; void QPen::swap(class QPen &)
- ?span@QAbstractProxyModel@@UBE?AVQSize@@ABVQModelIndex@@@Z @ 13194 NONAME ; class QSize QAbstractProxyModel::span(class QModelIndex const &) const
- ??4QEglProperties@@QAEAAV0@ABV0@@Z @ 13195 NONAME ABSENT ; class QEglProperties & QEglProperties::operator=(class QEglProperties const &)
- ??0QHoverEvent@@QAE@ABV0@@Z @ 13196 NONAME ABSENT ; QHoverEvent::QHoverEvent(class QHoverEvent const &)
- ??0QPaintEngineState@@QAE@XZ @ 13197 NONAME ABSENT ; QPaintEngineState::QPaintEngineState(void)
- ?setSnapPositionsY@QScroller@@QAEXMM@Z @ 13198 NONAME ; void QScroller::setSnapPositionsY(float, float)
- ?d_func@QScrollPrepareEvent@@ABEPBVQScrollPrepareEventPrivate@@XZ @ 13199 NONAME ; class QScrollPrepareEventPrivate const * QScrollPrepareEvent::d_func(void) const
- ?textureMapForGlyph@QTextureGlyphCache@@QBE?AVQImage@@IUQFixed@@@Z @ 13200 NONAME ; class QImage QTextureGlyphCache::textureMapForGlyph(unsigned int, struct QFixed) const
- ??0QKeyEvent@@QAE@ABV0@@Z @ 13201 NONAME ABSENT ; QKeyEvent::QKeyEvent(class QKeyEvent const &)
- ??0QIconEngine@@QAE@ABV0@@Z @ 13202 NONAME ABSENT ; QIconEngine::QIconEngine(class QIconEngine const &)
- ??4QStyleOptionToolBoxV2@@QAEAAV0@ABV0@@Z @ 13203 NONAME ABSENT ; class QStyleOptionToolBoxV2 & QStyleOptionToolBoxV2::operator=(class QStyleOptionToolBoxV2 const &)
- ?qt_metacall@QInternalMimeData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13204 NONAME ; int QInternalMimeData::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?lineHeightType@QTextBlockFormat@@QBEHXZ @ 13205 NONAME ; int QTextBlockFormat::lineHeightType(void) const
- ?hintingPreference@QFont@@QBE?AW4HintingPreference@1@XZ @ 13206 NONAME ; enum QFont::HintingPreference QFont::hintingPreference(void) const
- ??0QGlyphs@@QAE@XZ @ 13207 NONAME ; QGlyphs::QGlyphs(void)
- ?trUtf8@QInternalMimeData@@SA?AVQString@@PBD0H@Z @ 13208 NONAME ; class QString QInternalMimeData::trUtf8(char const *, char const *, int)
- ??0QImageIOHandlerFactoryInterface@@QAE@XZ @ 13209 NONAME ABSENT ; QImageIOHandlerFactoryInterface::QImageIOHandlerFactoryInterface(void)
- ??_EQRegion@@QAE@I@Z @ 13210 NONAME ABSENT ; QRegion::~QRegion(unsigned int)
- ?begin@QBlitterPaintEngine@@UAE_NPAVQPaintDevice@@@Z @ 13211 NONAME ; bool QBlitterPaintEngine::begin(class QPaintDevice *)
- ?inFontUcs4@QFontMetricsF@@QBE_NI@Z @ 13212 NONAME ; bool QFontMetricsF::inFontUcs4(unsigned int) const
- ?viewportSize@QScrollPrepareEvent@@QBE?AVQSizeF@@XZ @ 13213 NONAME ; class QSizeF QScrollPrepareEvent::viewportSize(void) const
- ?markRasterOverlay@QBlittablePixmapData@@QAEXABVQRectF@@@Z @ 13214 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QRectF const &)
- ?d_func@QBlitterPaintEngine@@AAEPAVQBlitterPaintEnginePrivate@@XZ @ 13215 NONAME ; class QBlitterPaintEnginePrivate * QBlitterPaintEngine::d_func(void)
- ?setNumberPrefix@QTextListFormat@@QAEXABVQString@@@Z @ 13216 NONAME ; void QTextListFormat::setNumberPrefix(class QString const &)
- ?lineHeight@QTextBlockFormat@@QBEMMM@Z @ 13217 NONAME ; float QTextBlockFormat::lineHeight(float, float) const
- ??4QStyleOptionComplex@@QAEAAV0@ABV0@@Z @ 13218 NONAME ABSENT ; class QStyleOptionComplex & QStyleOptionComplex::operator=(class QStyleOptionComplex const &)
- ?getItem@QInputDialog@@SA?AVQString@@PAVQWidget@@ABV2@1ABVQStringList@@H_NPA_NV?$QFlags@W4WindowType@Qt@@@@V?$QFlags@W4InputMethodHint@Qt@@@@@Z @ 13219 NONAME ; class QString QInputDialog::getItem(class QWidget *, class QString const &, class QString const &, class QStringList const &, int, bool, bool *, class QFlags<enum Qt::WindowType>, class QFlags<enum Qt::InputMethodHint>)
- ??_EFileInfo@QZipReader@@QAE@I@Z @ 13220 NONAME ABSENT ; QZipReader::FileInfo::~FileInfo(unsigned int)
- ?qGamma_correct_back_to_linear_cs@@YAXPAVQImage@@@Z @ 13221 NONAME ; void qGamma_correct_back_to_linear_cs(class QImage *)
- ??0QBitmap@@QAE@ABV0@@Z @ 13222 NONAME ABSENT ; QBitmap::QBitmap(class QBitmap const &)
- ?clip@QBlitterPaintEngine@@UAEXABVQVectorPath@@W4ClipOperation@Qt@@@Z @ 13223 NONAME ; void QBlitterPaintEngine::clip(class QVectorPath const &, enum Qt::ClipOperation)
- ??1QScrollEvent@@UAE@XZ @ 13224 NONAME ; QScrollEvent::~QScrollEvent(void)
- ?state@QScroller@@QBE?AW4State@1@XZ @ 13225 NONAME ; enum QScroller::State QScroller::state(void) const
- ?positions@QGlyphs@@QBE?AV?$QVector@VQPointF@@@@XZ @ 13226 NONAME ; class QVector<class QPointF> QGlyphs::positions(void) const
- ?tr@QScroller@@SA?AVQString@@PBD0@Z @ 13227 NONAME ; class QString QScroller::tr(char const *, char const *)
- ?canReadData@QInternalMimeData@@SA_NABVQString@@@Z @ 13228 NONAME ; bool QInternalMimeData::canReadData(class QString const &)
- ?glyphs@QTextLayout@@QBE?AV?$QList@VQGlyphs@@@@XZ @ 13229 NONAME ; class QList<class QGlyphs> QTextLayout::glyphs(void) const
- ??_EQTextFormat@@QAE@I@Z @ 13230 NONAME ABSENT ; QTextFormat::~QTextFormat(unsigned int)
- ??4QStyleOptionTabWidgetFrame@@QAEAAV0@ABV0@@Z @ 13231 NONAME ABSENT ; class QStyleOptionTabWidgetFrame & QStyleOptionTabWidgetFrame::operator=(class QStyleOptionTabWidgetFrame const &)
- ?trUtf8@QScroller@@SA?AVQString@@PBD0H@Z @ 13232 NONAME ; class QString QScroller::trUtf8(char const *, char const *, int)
- ?d_func@QFlickGesture@@ABEPBVQFlickGesturePrivate@@XZ @ 13233 NONAME ; class QFlickGesturePrivate const * QFlickGesture::d_func(void) const
- ??4QMouseEvent@@QAEAAV0@ABV0@@Z @ 13234 NONAME ABSENT ; class QMouseEvent & QMouseEvent::operator=(class QMouseEvent const &)
- ??_EQPainter@@QAE@I@Z @ 13235 NONAME ABSENT ; QPainter::~QPainter(unsigned int)
- ??4QStyleOptionTabBarBaseV2@@QAEAAV0@ABV0@@Z @ 13236 NONAME ABSENT ; class QStyleOptionTabBarBaseV2 & QStyleOptionTabBarBaseV2::operator=(class QStyleOptionTabBarBaseV2 const &)
- ??4QInputEvent@@QAEAAV0@ABV0@@Z @ 13237 NONAME ABSENT ; class QInputEvent & QInputEvent::operator=(class QInputEvent const &)
- ?hasScroller@QScroller@@SA_NPAVQObject@@@Z @ 13238 NONAME ; bool QScroller::hasScroller(class QObject *)
- ?alphaMapForGlyph@QFontEngine@@UAE?AVQImage@@IUQFixed@@ABVQTransform@@@Z @ 13239 NONAME ; class QImage QFontEngine::alphaMapForGlyph(unsigned int, struct QFixed, class QTransform const &)
- ??_EQPainterPath@@QAE@I@Z @ 13240 NONAME ABSENT ; QPainterPath::~QPainterPath(unsigned int)
- ??_EQGlyphs@@QAE@I@Z @ 13241 NONAME ABSENT ; QGlyphs::~QGlyphs(unsigned int)
- ?fromImage@QBlittablePixmapData@@UAEXABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 13242 NONAME ; void QBlittablePixmapData::fromImage(class QImage const &, class QFlags<enum Qt::ImageConversionFlag>)
- ??0QInternalMimeData@@QAE@XZ @ 13243 NONAME ; QInternalMimeData::QInternalMimeData(void)
- ??_EQScrollEvent@@UAE@I@Z @ 13244 NONAME ; QScrollEvent::~QScrollEvent(unsigned int)
- ??4QGlyphs@@QAEAAV0@ABV0@@Z @ 13245 NONAME ; class QGlyphs & QGlyphs::operator=(class QGlyphs const &)
- ??4QQuaternion@@QAEAAV0@ABV0@@Z @ 13246 NONAME ABSENT ; class QQuaternion & QQuaternion::operator=(class QQuaternion const &)
- ??4Symbol@QCss@@QAEAAU01@ABU01@@Z @ 13247 NONAME ABSENT ; struct QCss::Symbol & QCss::Symbol::operator=(struct QCss::Symbol const &)
- ??0QBlittable@@QAE@ABVQSize@@V?$QFlags@W4Capability@QBlittable@@@@@Z @ 13248 NONAME ; QBlittable::QBlittable(class QSize const &, class QFlags<enum QBlittable::Capability>)
- ??0QIconDragEvent@@QAE@ABV0@@Z @ 13249 NONAME ABSENT ; QIconDragEvent::QIconDragEvent(class QIconDragEvent const &)
- ?scroller@QScroller@@SAPAV1@PAVQObject@@@Z @ 13250 NONAME ; class QScroller * QScroller::scroller(class QObject *)
- ??4QScrollerProperties@@QAEAAV0@ABV0@@Z @ 13251 NONAME ; class QScrollerProperties & QScrollerProperties::operator=(class QScrollerProperties const &)
- ?d_func@QScroller@@AAEPAVQScrollerPrivate@@XZ @ 13252 NONAME ; class QScrollerPrivate * QScroller::d_func(void)
- ?scrollerPropertiesChanged@QScroller@@IAEXABVQScrollerProperties@@@Z @ 13253 NONAME ; void QScroller::scrollerPropertiesChanged(class QScrollerProperties const &)
- ?markRasterOverlay@QBlittablePixmapData@@QAEXPBVQRect@@H@Z @ 13254 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QRect const *, int)
- ?tabsClosable@QMdiArea@@QBE_NXZ @ 13255 NONAME ; bool QMdiArea::tabsClosable(void) const
- ?canStartScrollingAt@QAbstractScrollAreaPrivate@@QAE_NABVQPoint@@@Z @ 13256 NONAME ; bool QAbstractScrollAreaPrivate::canStartScrollingAt(class QPoint const &)
- ??0QScrollerProperties@@QAE@XZ @ 13257 NONAME ; QScrollerProperties::QScrollerProperties(void)
- ?setLineHeight@QTextBlockFormat@@QAEXMH@Z @ 13258 NONAME ; void QTextBlockFormat::setLineHeight(float, int)
- ?calculateSubPixelPositionCount@QTextureGlyphCache@@IBEHI@Z @ 13259 NONAME ; int QTextureGlyphCache::calculateSubPixelPositionCount(unsigned int) const
- ??0QTextImageFormat@@QAE@ABV0@@Z @ 13260 NONAME ABSENT ; QTextImageFormat::QTextImageFormat(class QTextImageFormat const &)
- ??0QMoveEvent@@QAE@ABV0@@Z @ 13261 NONAME ABSENT ; QMoveEvent::QMoveEvent(class QMoveEvent const &)
- ?glyphs@QTextFragment@@QBE?AV?$QList@VQGlyphs@@@@XZ @ 13262 NONAME ; class QList<class QGlyphs> QTextFragment::glyphs(void) const
- ??0QInputContextFactoryInterface@@QAE@XZ @ 13263 NONAME ABSENT ; QInputContextFactoryInterface::QInputContextFactoryInterface(void)
- ??0QTextFrameFormat@@QAE@ABV0@@Z @ 13264 NONAME ABSENT ; QTextFrameFormat::QTextFrameFormat(class QTextFrameFormat const &)
- ?resetInternalData@QAbstractProxyModel@@IAEXXZ @ 13265 NONAME ; void QAbstractProxyModel::resetInternalData(void)
- ??0Symbol@QCss@@QAE@ABU01@@Z @ 13266 NONAME ABSENT ; QCss::Symbol::Symbol(struct QCss::Symbol const &)
- ?markRasterOverlay@QBlittablePixmapData@@QAEXABVQVectorPath@@@Z @ 13267 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QVectorPath const &)
- ??4QStyleOptionFrameV3@@QAEAAV0@ABV0@@Z @ 13268 NONAME ABSENT ; class QStyleOptionFrameV3 & QStyleOptionFrameV3::operator=(class QStyleOptionFrameV3 const &)
- ?scrollTo@QScroller@@QAEXABVQPointF@@@Z @ 13269 NONAME ; void QScroller::scrollTo(class QPointF const &)
- ??0QGraphicsSystem@@QAE@XZ @ 13270 NONAME ABSENT ; QGraphicsSystem::QGraphicsSystem(void)
- ??4QStyleOptionViewItem@@QAEAAV0@ABV0@@Z @ 13271 NONAME ABSENT ; class QStyleOptionViewItem & QStyleOptionViewItem::operator=(class QStyleOptionViewItem const &)
- ??4QStyleOptionProgressBar@@QAEAAV0@ABV0@@Z @ 13272 NONAME ABSENT ; class QStyleOptionProgressBar & QStyleOptionProgressBar::operator=(class QStyleOptionProgressBar const &)
- ?clip@QBlitterPaintEngine@@QAEPBVQClipData@@XZ @ 13273 NONAME ; class QClipData const * QBlitterPaintEngine::clip(void)
- ?d_func@QScroller@@ABEPBVQScrollerPrivate@@XZ @ 13274 NONAME ; class QScrollerPrivate const * QScroller::d_func(void) const
- ?setNumberSuffix@QTextListFormat@@QAEXABVQString@@@Z @ 13275 NONAME ; void QTextListFormat::setNumberSuffix(class QString const &)
- ?swap@QPicture@@QAEXAAV1@@Z @ 13276 NONAME ; void QPicture::swap(class QPicture &)
- ?swap@QPainterPath@@QAEXAAV1@@Z @ 13277 NONAME ; void QPainterPath::swap(class QPainterPath &)
- ??4QStyleOptionRubberBand@@QAEAAV0@ABV0@@Z @ 13278 NONAME ABSENT ; class QStyleOptionRubberBand & QStyleOptionRubberBand::operator=(class QStyleOptionRubberBand const &)
- ?minimumSizeHint@QCheckBox@@UBE?AVQSize@@XZ @ 13279 NONAME ; class QSize QCheckBox::minimumSizeHint(void) const
- ?createExplicitFont@QFontEngine@@UBE?AVQFont@@XZ @ 13280 NONAME ; class QFont QFontEngine::createExplicitFont(void) const
- ?alphaMapForGlyph@QFontEngine@@UAE?AVQImage@@IUQFixed@@@Z @ 13281 NONAME ; class QImage QFontEngine::alphaMapForGlyph(unsigned int, struct QFixed)
- ?fillTexture@QImageTextureGlyphCache@@UAEXABUCoord@QTextureGlyphCache@@IUQFixed@@@Z @ 13282 NONAME ; void QImageTextureGlyphCache::fillTexture(struct QTextureGlyphCache::Coord const &, unsigned int, struct QFixed)
- ?swap@QIcon@@QAEXAAV1@@Z @ 13283 NONAME ; void QIcon::swap(class QIcon &)
- ?unmarkRasterOverlay@QBlittablePixmapData@@QAEXABVQRectF@@@Z @ 13284 NONAME ; void QBlittablePixmapData::unmarkRasterOverlay(class QRectF const &)
- ??0QDragResponseEvent@@QAE@ABV0@@Z @ 13285 NONAME ABSENT ; QDragResponseEvent::QDragResponseEvent(class QDragResponseEvent const &)
- ??0QIconEngine@@QAE@XZ @ 13286 NONAME ABSENT ; QIconEngine::QIconEngine(void)
- ?brushOriginChanged@QBlitterPaintEngine@@UAEXXZ @ 13287 NONAME ; void QBlitterPaintEngine::brushOriginChanged(void)
- ?openFile@QFileOpenEvent@@QBE_NAAVQFile@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z @ 13288 NONAME ; bool QFileOpenEvent::openFile(class QFile &, class QFlags<enum QIODevice::OpenModeFlag>) const
- ??_EQBrush@@QAE@I@Z @ 13289 NONAME ABSENT ; QBrush::~QBrush(unsigned int)
- ??0QApplicationPrivate@@QAE@AAHPAPADW4Type@QApplication@@H@Z @ 13290 NONAME ; QApplicationPrivate::QApplicationPrivate(int &, char * *, enum QApplication::Type, int)
- ?handleInput@QScroller@@QAE_NW4Input@1@ABVQPointF@@_J@Z @ 13291 NONAME ; bool QScroller::handleInput(enum QScroller::Input, class QPointF const &, long long)
- ??8QScrollerProperties@@QBE_NABV0@@Z @ 13292 NONAME ; bool QScrollerProperties::operator==(class QScrollerProperties const &) const
- ?inFontUcs4@QFontMetrics@@QBE_NI@Z @ 13293 NONAME ; bool QFontMetrics::inFontUcs4(unsigned int) const
- ??_EQTableWidgetSelectionRange@@QAE@I@Z @ 13294 NONAME ABSENT ; QTableWidgetSelectionRange::~QTableWidgetSelectionRange(unsigned int)
- ??4QStyleOptionTabBarBase@@QAEAAV0@ABV0@@Z @ 13295 NONAME ABSENT ; class QStyleOptionTabBarBase & QStyleOptionTabBarBase::operator=(class QStyleOptionTabBarBase const &)
- ??0QTextObjectInterface@@QAE@XZ @ 13296 NONAME ABSENT ; QTextObjectInterface::QTextObjectInterface(void)
- ?unlock@QBlittable@@QAEXXZ @ 13297 NONAME ; void QBlittable::unlock(void)
- ?metaObject@QScroller@@UBEPBUQMetaObject@@XZ @ 13298 NONAME ; struct QMetaObject const * QScroller::metaObject(void) const
- ?d_func@QScrollEvent@@ABEPBVQScrollEventPrivate@@XZ @ 13299 NONAME ; class QScrollEventPrivate const * QScrollEvent::d_func(void) const
- ?swap@QRegion@@QAEXAAV1@@Z @ 13300 NONAME ; void QRegion::swap(class QRegion &)
- ??0QHideEvent@@QAE@ABV0@@Z @ 13301 NONAME ABSENT ; QHideEvent::QHideEvent(class QHideEvent const &)
- ?ensureVisible@QScroller@@QAEXABVQRectF@@MMH@Z @ 13302 NONAME ; void QScroller::ensureVisible(class QRectF const &, float, float, int)
- ?qt_metacall@QFlickGesture@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13303 NONAME ; int QFlickGesture::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?setItemData@QAbstractProxyModel@@UAE_NABVQModelIndex@@ABV?$QMap@HVQVariant@@@@@Z @ 13304 NONAME ; bool QAbstractProxyModel::setItemData(class QModelIndex const &, class QMap<int, class QVariant> const &)
- ?getStaticMetaObject@QInternalMimeData@@SAABUQMetaObject@@XZ @ 13305 NONAME ; struct QMetaObject const & QInternalMimeData::getStaticMetaObject(void)
- ?swap@QPolygonF@@QAEXAAV1@@Z @ 13306 NONAME ; void QPolygonF::swap(class QPolygonF &)
- ?swap@QPolygon@@QAEXAAV1@@Z @ 13307 NONAME ; void QPolygon::swap(class QPolygon &)
- ??_EQScrollPrepareEvent@@UAE@I@Z @ 13308 NONAME ; QScrollPrepareEvent::~QScrollPrepareEvent(unsigned int)
- ?d_func@QBlitterPaintEngine@@ABEPBVQBlitterPaintEnginePrivate@@XZ @ 13309 NONAME ; class QBlitterPaintEnginePrivate const * QBlitterPaintEngine::d_func(void) const
- ?pixelPerMeter@QScroller@@QBE?AVQPointF@@XZ @ 13310 NONAME ; class QPointF QScroller::pixelPerMeter(void) const
- ?target@QScroller@@QBEPAVQObject@@XZ @ 13311 NONAME ; class QObject * QScroller::target(void) const
- ?swap@QKeySequence@@QAEXAAV1@@Z @ 13312 NONAME ; void QKeySequence::swap(class QKeySequence &)
- ??1QGlyphs@@QAE@XZ @ 13313 NONAME ; QGlyphs::~QGlyphs(void)
- ?lineHeight@QTextBlockFormat@@QBEMXZ @ 13314 NONAME ; float QTextBlockFormat::lineHeight(void) const
- ?stroke@QBlitterPaintEngine@@UAEXABVQVectorPath@@ABVQPen@@@Z @ 13315 NONAME ; void QBlitterPaintEngine::stroke(class QVectorPath const &, class QPen const &)
- ?tr@QInternalMimeData@@SA?AVQString@@PBD0@Z @ 13316 NONAME ; class QString QInternalMimeData::tr(char const *, char const *)
- ??9QGlyphs@@QBE_NABV0@@Z @ 13317 NONAME ; bool QGlyphs::operator!=(class QGlyphs const &) const
- ??1QBlittable@@UAE@XZ @ 13318 NONAME ; QBlittable::~QBlittable(void)
- ??_EQBlitterPaintEngine@@UAE@I@Z @ 13319 NONAME ; QBlitterPaintEngine::~QBlitterPaintEngine(unsigned int)
- ??0QCloseEvent@@QAE@ABV0@@Z @ 13320 NONAME ABSENT ; QCloseEvent::QCloseEvent(class QCloseEvent const &)
- ?grabbedGesture@QScroller@@SA?AW4GestureType@Qt@@PAVQObject@@@Z @ 13321 NONAME ; enum Qt::GestureType QScroller::grabbedGesture(class QObject *)
- ?buffer@QBlittablePixmapData@@UAEPAVQImage@@XZ @ 13322 NONAME ; class QImage * QBlittablePixmapData::buffer(void)
- ??0QTextFrameLayoutData@@QAE@XZ @ 13323 NONAME ABSENT ; QTextFrameLayoutData::QTextFrameLayoutData(void)
- ?staticMetaObject@QFlickGesture@@2UQMetaObject@@B @ 13324 NONAME ; struct QMetaObject const QFlickGesture::staticMetaObject
- ?finalPosition@QScroller@@QBE?AVQPointF@@XZ @ 13325 NONAME ; class QPointF QScroller::finalPosition(void) const
- ??4QStyleOptionTabWidgetFrameV2@@QAEAAV0@ABV0@@Z @ 13326 NONAME ABSENT ; class QStyleOptionTabWidgetFrameV2 & QStyleOptionTabWidgetFrameV2::operator=(class QStyleOptionTabWidgetFrameV2 const &)
- ?drawStaticTextItem@QBlitterPaintEngine@@UAEXPAVQStaticTextItem@@@Z @ 13327 NONAME ; void QBlitterPaintEngine::drawStaticTextItem(class QStaticTextItem *)
- ??0QGlyphs@@QAE@ABV0@@Z @ 13328 NONAME ; QGlyphs::QGlyphs(class QGlyphs const &)
- ?lock@QBlittable@@QAEPAVQImage@@XZ @ 13329 NONAME ; class QImage * QBlittable::lock(void)
- ?setFontHintingPreference@QTextCharFormat@@QAEXW4HintingPreference@QFont@@@Z @ 13330 NONAME ; void QTextCharFormat::setFontHintingPreference(enum QFont::HintingPreference)
- ??4QStyleOptionTabV2@@QAEAAV0@ABV0@@Z @ 13331 NONAME ABSENT ; class QStyleOptionTabV2 & QStyleOptionTabV2::operator=(class QStyleOptionTabV2 const &)
- ??_EQInternalMimeData@@UAE@I@Z @ 13332 NONAME ; QInternalMimeData::~QInternalMimeData(unsigned int)
- ??4QTextListFormat@@QAEAAV0@ABV0@@Z @ 13333 NONAME ABSENT ; class QTextListFormat & QTextListFormat::operator=(class QTextListFormat const &)
- ??_EQPalette@@QAE@I@Z @ 13334 NONAME ABSENT ; QPalette::~QPalette(unsigned int)
- ??0QFocusEvent@@QAE@ABV0@@Z @ 13335 NONAME ABSENT ; QFocusEvent::QFocusEvent(class QFocusEvent const &)
- ??4QStyleOptionQ3ListViewItem@@QAEAAV0@ABV0@@Z @ 13336 NONAME ABSENT ; class QStyleOptionQ3ListViewItem & QStyleOptionQ3ListViewItem::operator=(class QStyleOptionQ3ListViewItem const &)
- ?markRasterOverlay@QBlittablePixmapData@@QAEXABVQPointF@@ABVQTextItem@@@Z @ 13337 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QPointF const &, class QTextItem const &)
- ?trUtf8@QScroller@@SA?AVQString@@PBD0@Z @ 13338 NONAME ; class QString QScroller::trUtf8(char const *, char const *)
- ??_EQIcon@@QAE@I@Z @ 13339 NONAME ABSENT ; QIcon::~QIcon(unsigned int)
- ??YQGlyphs@@AAEAAV0@ABV0@@Z @ 13340 NONAME ; class QGlyphs & QGlyphs::operator+=(class QGlyphs const &)
- ??9QScrollerProperties@@QBE_NABV0@@Z @ 13341 NONAME ; bool QScrollerProperties::operator!=(class QScrollerProperties const &) const
- ??0QTextListFormat@@QAE@ABV0@@Z @ 13342 NONAME ABSENT ; QTextListFormat::QTextListFormat(class QTextListFormat const &)
- ?drawEllipse@QBlitterPaintEngine@@UAEXABVQRectF@@@Z @ 13343 NONAME ; void QBlitterPaintEngine::drawEllipse(class QRectF const &)
- ??0QGuiPlatformPluginInterface@@QAE@XZ @ 13344 NONAME ABSENT ; QGuiPlatformPluginInterface::QGuiPlatformPluginInterface(void)
- ??_EQTextLayout@@QAE@I@Z @ 13345 NONAME ABSENT ; QTextLayout::~QTextLayout(unsigned int)
- ??0QWheelEvent@@QAE@ABV0@@Z @ 13346 NONAME ABSENT ; QWheelEvent::QWheelEvent(class QWheelEvent const &)
- ?blittable@QBlittablePixmapData@@QBEPAVQBlittable@@XZ @ 13347 NONAME ; class QBlittable * QBlittablePixmapData::blittable(void) const
- ?resizeCache@QTextureGlyphCache@@QAEXHH@Z @ 13348 NONAME ; void QTextureGlyphCache::resizeCache(int, int)
- ??0QScrollerProperties@@QAE@ABV0@@Z @ 13349 NONAME ; QScrollerProperties::QScrollerProperties(class QScrollerProperties const &)
- ??0QWindowStateChangeEvent@@QAE@ABV0@@Z @ 13350 NONAME ABSENT ; QWindowStateChangeEvent::QWindowStateChangeEvent(class QWindowStateChangeEvent const &)
- ?metaObject@QInternalMimeData@@UBEPBUQMetaObject@@XZ @ 13351 NONAME ; struct QMetaObject const * QInternalMimeData::metaObject(void) const
- ?setContentPos@QScrollPrepareEvent@@QAEXABVQPointF@@@Z @ 13352 NONAME ; void QScrollPrepareEvent::setContentPos(class QPointF const &)
- ??_EQTextEngine@@QAE@I@Z @ 13353 NONAME ABSENT ; QTextEngine::~QTextEngine(unsigned int)
- ??4QStyleOptionTitleBar@@QAEAAV0@ABV0@@Z @ 13354 NONAME ABSENT ; class QStyleOptionTitleBar & QStyleOptionTitleBar::operator=(class QStyleOptionTitleBar const &)
- ??4Value@QCss@@QAEAAU01@ABU01@@Z @ 13355 NONAME ABSENT ; struct QCss::Value & QCss::Value::operator=(struct QCss::Value const &)
- ?staticMetaObject@QScroller@@2UQMetaObject@@B @ 13356 NONAME ; struct QMetaObject const QScroller::staticMetaObject
- ?hasFormatHelper@QInternalMimeData@@SA_NABVQString@@PBVQMimeData@@@Z @ 13357 NONAME ; bool QInternalMimeData::hasFormatHelper(class QString const &, class QMimeData const *)
- ?state@QBlitterPaintEngine@@QAEPAVQPainterState@@XZ @ 13358 NONAME ; class QPainterState * QBlitterPaintEngine::state(void)
- ?penChanged@QBlitterPaintEngine@@UAEXXZ @ 13359 NONAME ; void QBlitterPaintEngine::penChanged(void)
- ??0QFileOpenEvent@@QAE@ABVRFile@@@Z @ 13360 NONAME ; QFileOpenEvent::QFileOpenEvent(class RFile const &)
- ?hasHeightForWidth@QWidgetPrivate@@UBE_NXZ @ 13361 NONAME ; bool QWidgetPrivate::hasHeightForWidth(void) const
- ??0QDragLeaveEvent@@QAE@ABV0@@Z @ 13362 NONAME ABSENT ; QDragLeaveEvent::QDragLeaveEvent(class QDragLeaveEvent const &)
- ?toImage@QBlittablePixmapData@@UBE?AVQImage@@XZ @ 13363 NONAME ; class QImage QBlittablePixmapData::toImage(void) const
- ??_EQBlittable@@UAE@I@Z @ 13364 NONAME ; QBlittable::~QBlittable(unsigned int)
- ??4QBitmap@@QAEAAV0@ABV0@@Z @ 13365 NONAME ABSENT ; class QBitmap & QBitmap::operator=(class QBitmap const &)
- ??1QInternalMimeData@@UAE@XZ @ 13366 NONAME ; QInternalMimeData::~QInternalMimeData(void)
- ??0QItemSelection@@QAE@ABV0@@Z @ 13367 NONAME ABSENT ; QItemSelection::QItemSelection(class QItemSelection const &)
- ?qt_addBitmapToPath@@YAXMMPBEHHHPAVQPainterPath@@@Z @ 13368 NONAME ; void qt_addBitmapToPath(float, float, unsigned char const *, int, int, int, class QPainterPath *)
- ?staticMetaObject@QInternalMimeData@@2UQMetaObject@@B @ 13369 NONAME ; struct QMetaObject const QInternalMimeData::staticMetaObject
- ?activeScrollers@QScroller@@SA?AV?$QList@PAVQScroller@@@@XZ @ 13370 NONAME ; class QList<class QScroller *> QScroller::activeScrollers(void)
- ?drawGlyphs@QPainter@@QAEXABVQPointF@@ABVQGlyphs@@@Z @ 13371 NONAME ; void QPainter::drawGlyphs(class QPointF const &, class QGlyphs const &)
- ??4QTextFrameFormat@@QAEAAV0@ABV0@@Z @ 13372 NONAME ABSENT ; class QTextFrameFormat & QTextFrameFormat::operator=(class QTextFrameFormat const &)
+ png_access_version_number @ 12983 NONAME
+ png_benign_error @ 12984 NONAME
+ png_build_grayscale_palette @ 12985 NONAME
+ png_calloc @ 12986 NONAME
+ png_chunk_benign_error @ 12987 NONAME
+ png_chunk_error @ 12988 NONAME
+ png_chunk_warning @ 12989 NONAME
+ png_convert_from_struct_tm @ 12990 NONAME
+ png_convert_from_time_t @ 12991 NONAME
+ png_convert_to_rfc1123 @ 12992 NONAME
+ png_create_info_struct @ 12993 NONAME
+ png_create_read_struct @ 12994 NONAME
+ png_create_read_struct_2 @ 12995 NONAME
+ png_create_write_struct @ 12996 NONAME
+ png_create_write_struct_2 @ 12997 NONAME
+ png_data_freer @ 12998 NONAME
+ png_destroy_info_struct @ 12999 NONAME
+ png_destroy_read_struct @ 13000 NONAME
+ png_destroy_write_struct @ 13001 NONAME
+ png_error @ 13002 NONAME
+ png_free @ 13003 NONAME
+ png_free_data @ 13004 NONAME
+ png_free_default @ 13005 NONAME
+ png_get_IHDR @ 13006 NONAME
+ png_get_PLTE @ 13007 NONAME
+ png_get_bKGD @ 13008 NONAME
+ png_get_bit_depth @ 13009 NONAME
+ png_get_cHRM @ 13010 NONAME
+ png_get_cHRM_fixed @ 13011 NONAME
+ png_get_channels @ 13012 NONAME
+ png_get_chunk_cache_max @ 13013 NONAME
+ png_get_chunk_malloc_max @ 13014 NONAME
+ png_get_color_type @ 13015 NONAME
+ png_get_compression_buffer_size @ 13016 NONAME
+ png_get_compression_type @ 13017 NONAME
+ png_get_copyright @ 13018 NONAME
+ png_get_current_pass_number @ 13019 NONAME
+ png_get_current_row_number @ 13020 NONAME
+ png_get_error_ptr @ 13021 NONAME
+ png_get_filter_type @ 13022 NONAME
+ png_get_gAMA @ 13023 NONAME
+ png_get_gAMA_fixed @ 13024 NONAME
+ png_get_hIST @ 13025 NONAME
+ png_get_header_ver @ 13026 NONAME
+ png_get_header_version @ 13027 NONAME
+ png_get_iCCP @ 13028 NONAME
+ png_get_image_height @ 13029 NONAME
+ png_get_image_width @ 13030 NONAME
+ png_get_int_32 @ 13031 NONAME
+ png_get_interlace_type @ 13032 NONAME
+ png_get_io_chunk_name @ 13033 NONAME
+ png_get_io_chunk_type @ 13034 NONAME
+ png_get_io_ptr @ 13035 NONAME
+ png_get_io_state @ 13036 NONAME
+ png_get_libpng_ver @ 13037 NONAME
+ png_get_mem_ptr @ 13038 NONAME
+ png_get_oFFs @ 13039 NONAME
+ png_get_pCAL @ 13040 NONAME
+ png_get_pHYs @ 13041 NONAME
+ png_get_pHYs_dpi @ 13042 NONAME
+ png_get_pixel_aspect_ratio @ 13043 NONAME
+ png_get_pixel_aspect_ratio_fixed @ 13044 NONAME
+ png_get_pixels_per_inch @ 13045 NONAME
+ png_get_pixels_per_meter @ 13046 NONAME
+ png_get_progressive_ptr @ 13047 NONAME
+ png_get_rgb_to_gray_status @ 13048 NONAME
+ png_get_rowbytes @ 13049 NONAME
+ png_get_rows @ 13050 NONAME
+ png_get_sBIT @ 13051 NONAME
+ png_get_sCAL @ 13052 NONAME
+ png_get_sCAL_fixed @ 13053 NONAME
+ png_get_sCAL_s @ 13054 NONAME
+ png_get_sPLT @ 13055 NONAME
+ png_get_sRGB @ 13056 NONAME
+ png_get_signature @ 13057 NONAME
+ png_get_tIME @ 13058 NONAME
+ png_get_tRNS @ 13059 NONAME
+ png_get_text @ 13060 NONAME
+ png_get_uint_16 @ 13061 NONAME
+ png_get_uint_31 @ 13062 NONAME
+ png_get_uint_32 @ 13063 NONAME
+ png_get_unknown_chunks @ 13064 NONAME
+ png_get_user_chunk_ptr @ 13065 NONAME
+ png_get_user_height_max @ 13066 NONAME
+ png_get_user_transform_ptr @ 13067 NONAME
+ png_get_user_width_max @ 13068 NONAME
+ png_get_valid @ 13069 NONAME
+ png_get_x_offset_inches @ 13070 NONAME
+ png_get_x_offset_inches_fixed @ 13071 NONAME
+ png_get_x_offset_microns @ 13072 NONAME
+ png_get_x_offset_pixels @ 13073 NONAME
+ png_get_x_pixels_per_inch @ 13074 NONAME
+ png_get_x_pixels_per_meter @ 13075 NONAME
+ png_get_y_offset_inches @ 13076 NONAME
+ png_get_y_offset_inches_fixed @ 13077 NONAME
+ png_get_y_offset_microns @ 13078 NONAME
+ png_get_y_offset_pixels @ 13079 NONAME
+ png_get_y_pixels_per_inch @ 13080 NONAME
+ png_get_y_pixels_per_meter @ 13081 NONAME
+ png_handle_as_unknown @ 13082 NONAME
+ png_info_init_3 @ 13083 NONAME
+ png_init_io @ 13084 NONAME
+ png_longjmp @ 13085 NONAME
+ png_malloc @ 13086 NONAME
+ png_malloc_default @ 13087 NONAME
+ png_malloc_warn @ 13088 NONAME
+ png_permit_mng_features @ 13089 NONAME
+ png_process_data @ 13090 NONAME
+ png_process_data_pause @ 13091 NONAME
+ png_process_data_skip @ 13092 NONAME
+ png_progressive_combine_row @ 13093 NONAME
+ png_read_end @ 13094 NONAME
+ png_read_image @ 13095 NONAME
+ png_read_info @ 13096 NONAME
+ png_read_png @ 13097 NONAME
+ png_read_row @ 13098 NONAME
+ png_read_rows @ 13099 NONAME
+ png_read_update_info @ 13100 NONAME
+ png_reset_zstream @ 13101 NONAME
+ png_save_int_32 @ 13102 NONAME
+ png_save_uint_16 @ 13103 NONAME
+ png_save_uint_32 @ 13104 NONAME
+ png_set_IHDR @ 13105 NONAME
+ png_set_PLTE @ 13106 NONAME
+ png_set_add_alpha @ 13107 NONAME
+ png_set_bKGD @ 13108 NONAME
+ png_set_background @ 13109 NONAME
+ png_set_background_fixed @ 13110 NONAME
+ png_set_benign_errors @ 13111 NONAME
+ png_set_bgr @ 13112 NONAME
+ png_set_cHRM @ 13113 NONAME
+ png_set_cHRM_fixed @ 13114 NONAME
+ png_set_chunk_cache_max @ 13115 NONAME
+ png_set_chunk_malloc_max @ 13116 NONAME
+ png_set_compression_buffer_size @ 13117 NONAME
+ png_set_compression_level @ 13118 NONAME
+ png_set_compression_mem_level @ 13119 NONAME
+ png_set_compression_method @ 13120 NONAME
+ png_set_compression_strategy @ 13121 NONAME
+ png_set_compression_window_bits @ 13122 NONAME
+ png_set_crc_action @ 13123 NONAME
+ png_set_error_fn @ 13124 NONAME
+ png_set_expand @ 13125 NONAME
+ png_set_expand_gray_1_2_4_to_8 @ 13126 NONAME
+ png_set_filler @ 13127 NONAME
+ png_set_filter @ 13128 NONAME
+ png_set_filter_heuristics @ 13129 NONAME
+ png_set_filter_heuristics_fixed @ 13130 NONAME
+ png_set_flush @ 13131 NONAME
+ png_set_gAMA @ 13132 NONAME
+ png_set_gAMA_fixed @ 13133 NONAME
+ png_set_gamma @ 13134 NONAME
+ png_set_gamma_fixed @ 13135 NONAME
+ png_set_gray_to_rgb @ 13136 NONAME
+ png_set_hIST @ 13137 NONAME
+ png_set_iCCP @ 13138 NONAME
+ png_set_interlace_handling @ 13139 NONAME
+ png_set_invalid @ 13140 NONAME
+ png_set_invert_alpha @ 13141 NONAME
+ png_set_invert_mono @ 13142 NONAME
+ png_set_keep_unknown_chunks @ 13143 NONAME
+ png_set_longjmp_fn @ 13144 NONAME
+ png_set_mem_fn @ 13145 NONAME
+ png_set_oFFs @ 13146 NONAME
+ png_set_pCAL @ 13147 NONAME
+ png_set_pHYs @ 13148 NONAME
+ png_set_packing @ 13149 NONAME
+ png_set_packswap @ 13150 NONAME
+ png_set_palette_to_rgb @ 13151 NONAME
+ png_set_progressive_read_fn @ 13152 NONAME
+ png_set_quantize @ 13153 NONAME
+ png_set_read_fn @ 13154 NONAME
+ png_set_read_status_fn @ 13155 NONAME
+ png_set_read_user_chunk_fn @ 13156 NONAME
+ png_set_read_user_transform_fn @ 13157 NONAME
+ png_set_rgb_to_gray @ 13158 NONAME
+ png_set_rgb_to_gray_fixed @ 13159 NONAME
+ png_set_rows @ 13160 NONAME
+ png_set_sBIT @ 13161 NONAME
+ png_set_sCAL @ 13162 NONAME
+ png_set_sCAL_fixed @ 13163 NONAME
+ png_set_sCAL_s @ 13164 NONAME
+ png_set_sPLT @ 13165 NONAME
+ png_set_sRGB @ 13166 NONAME
+ png_set_sRGB_gAMA_and_cHRM @ 13167 NONAME
+ png_set_shift @ 13168 NONAME
+ png_set_sig_bytes @ 13169 NONAME
+ png_set_strip_16 @ 13170 NONAME
+ png_set_strip_alpha @ 13171 NONAME
+ png_set_swap @ 13172 NONAME
+ png_set_swap_alpha @ 13173 NONAME
+ png_set_tIME @ 13174 NONAME
+ png_set_tRNS @ 13175 NONAME
+ png_set_tRNS_to_alpha @ 13176 NONAME
+ png_set_text @ 13177 NONAME
+ png_set_unknown_chunk_location @ 13178 NONAME
+ png_set_unknown_chunks @ 13179 NONAME
+ png_set_user_limits @ 13180 NONAME
+ png_set_user_transform_info @ 13181 NONAME
+ png_set_write_fn @ 13182 NONAME
+ png_set_write_status_fn @ 13183 NONAME
+ png_set_write_user_transform_fn @ 13184 NONAME
+ png_sig_cmp @ 13185 NONAME
+ png_start_read_image @ 13186 NONAME
+ png_warning @ 13187 NONAME
+ png_write_chunk @ 13188 NONAME
+ png_write_chunk_data @ 13189 NONAME
+ png_write_chunk_end @ 13190 NONAME
+ png_write_chunk_start @ 13191 NONAME
+ png_write_end @ 13192 NONAME
+ png_write_flush @ 13193 NONAME
+ png_write_image @ 13194 NONAME
+ png_write_info @ 13195 NONAME
+ png_write_info_before_PLTE @ 13196 NONAME
+ png_write_png @ 13197 NONAME
+ png_write_row @ 13198 NONAME
+ png_write_rows @ 13199 NONAME
+ png_write_sig @ 13200 NONAME
+ ?clipEnabledChanged@QBlitterPaintEngine@@UAEXXZ @ 13201 NONAME ; void QBlitterPaintEngine::clipEnabledChanged(void)
+ ?supportsSubPixelPositions@QFontEngine@@UBE_NXZ @ 13202 NONAME ; bool QFontEngine::supportsSubPixelPositions(void) const
+ ??_EQScrollerProperties@@UAE@I@Z @ 13203 NONAME ; QScrollerProperties::~QScrollerProperties(unsigned int)
+ ??_EQFontPrivate@@QAE@I@Z @ 13204 NONAME ; QFontPrivate::~QFontPrivate(unsigned int)
+ ??0QMimeSource@@QAE@XZ @ 13205 NONAME ; QMimeSource::QMimeSource(void)
+ ??0QStyleFactoryInterface@@QAE@XZ @ 13206 NONAME ; QStyleFactoryInterface::QStyleFactoryInterface(void)
+ ?d_func@QScrollEvent@@AAEPAVQScrollEventPrivate@@XZ @ 13207 NONAME ; class QScrollEventPrivate * QScrollEvent::d_func(void)
+ ??0QFileOpenEvent@@QAE@ABV0@@Z @ 13208 NONAME ; QFileOpenEvent::QFileOpenEvent(class QFileOpenEvent const &)
+ ??4QStyleOptionViewItemV2@@QAEAAV0@ABV0@@Z @ 13209 NONAME ; class QStyleOptionViewItemV2 & QStyleOptionViewItemV2::operator=(class QStyleOptionViewItemV2 const &)
+ ?heightForWidth@QTabWidget@@UBEHH@Z @ 13210 NONAME ; int QTabWidget::heightForWidth(int) const
+ ??1QFlickGesture@@UAE@XZ @ 13211 NONAME ; QFlickGesture::~QFlickGesture(void)
+ ??0QRasterWindowSurface@@QAE@PAVQWidget@@_N@Z @ 13212 NONAME ; QRasterWindowSurface::QRasterWindowSurface(class QWidget *, bool)
+ ?brushChanged@QBlitterPaintEngine@@UAEXXZ @ 13213 NONAME ; void QBlitterPaintEngine::brushChanged(void)
+ ?clip@QBlitterPaintEngine@@UAEXABVQRect@@W4ClipOperation@Qt@@@Z @ 13214 NONAME ; void QBlitterPaintEngine::clip(class QRect const &, enum Qt::ClipOperation)
+ ?detach@QGlyphs@@AAEXXZ @ 13215 NONAME ; void QGlyphs::detach(void)
+ ?trUtf8@QInternalMimeData@@SA?AVQString@@PBD0@Z @ 13216 NONAME ; class QString QInternalMimeData::trUtf8(char const *, char const *)
+ ??0QShowEvent@@QAE@ABV0@@Z @ 13217 NONAME ; QShowEvent::QShowEvent(class QShowEvent const &)
+ ??0QMouseEvent@@QAE@ABV0@@Z @ 13218 NONAME ; QMouseEvent::QMouseEvent(class QMouseEvent const &)
+ ?setHintingPreference@QFont@@QAEXW4HintingPreference@1@@Z @ 13219 NONAME ; void QFont::setHintingPreference(enum QFont::HintingPreference)
+ ??0QActionEvent@@QAE@ABV0@@Z @ 13220 NONAME ; QActionEvent::QActionEvent(class QActionEvent const &)
+ ??0QTouchEvent@@QAE@ABV0@@Z @ 13221 NONAME ; QTouchEvent::QTouchEvent(class QTouchEvent const &)
+ ?capabilities@QBlittable@@QBE?AV?$QFlags@W4Capability@QBlittable@@@@XZ @ 13222 NONAME ; class QFlags<enum QBlittable::Capability> QBlittable::capabilities(void) const
+ ?setContentPosRange@QScrollPrepareEvent@@QAEXABVQRectF@@@Z @ 13223 NONAME ; void QScrollPrepareEvent::setContentPosRange(class QRectF const &)
+ ??_EQImageData@@QAE@I@Z @ 13224 NONAME ; QImageData::~QImageData(unsigned int)
+ ?swap@QBrush@@QAEXAAV1@@Z @ 13225 NONAME ; void QBrush::swap(class QBrush &)
+ ?trUtf8@QFlickGesture@@SA?AVQString@@PBD0H@Z @ 13226 NONAME ; class QString QFlickGesture::trUtf8(char const *, char const *, int)
+ ?fontHintingPreference@QTextCharFormat@@QBE?AW4HintingPreference@QFont@@XZ @ 13227 NONAME ; enum QFont::HintingPreference QTextCharFormat::fontHintingPreference(void) const
+ ?swap@QPixmap@@QAEXAAV1@@Z @ 13228 NONAME ; void QPixmap::swap(class QPixmap &)
+ ??0QBlitterPaintEngine@@QAE@PAVQBlittablePixmapData@@@Z @ 13229 NONAME ; QBlitterPaintEngine::QBlitterPaintEngine(class QBlittablePixmapData *)
+ ?numberPrefix@QTextListFormat@@QBE?AVQString@@XZ @ 13230 NONAME ; class QString QTextListFormat::numberPrefix(void) const
+ ?setSnapPositionsX@QScroller@@QAEXMM@Z @ 13231 NONAME ; void QScroller::setSnapPositionsX(float, float)
+ ?scroller@QScroller@@SAPBV1@PBVQObject@@@Z @ 13232 NONAME ; class QScroller const * QScroller::scroller(class QObject const *)
+ ?qt_metacall@QScroller@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13233 NONAME ; int QScroller::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?tr@QFlickGesture@@SA?AVQString@@PBD0@Z @ 13234 NONAME ; class QString QFlickGesture::tr(char const *, char const *)
+ ??4QBezier@@QAEAAV0@ABV0@@Z @ 13235 NONAME ; class QBezier & QBezier::operator=(class QBezier const &)
+ ?setScrollerProperties@QScroller@@QAEXABVQScrollerProperties@@@Z @ 13236 NONAME ; void QScroller::setScrollerProperties(class QScrollerProperties const &)
+ ??0QIconEngineV2@@QAE@XZ @ 13237 NONAME ; QIconEngineV2::QIconEngineV2(void)
+ ??4iterator@QTextBlock@@QAEAAV01@ABV01@@Z @ 13238 NONAME ; class QTextBlock::iterator & QTextBlock::iterator::operator=(class QTextBlock::iterator const &)
+ ??MQItemSelectionRange@@QBE_NABV0@@Z @ 13239 NONAME ; bool QItemSelectionRange::operator<(class QItemSelectionRange const &) const
+ ?setWidthForHeight@QSizePolicy@@QAEX_N@Z @ 13240 NONAME ; void QSizePolicy::setWidthForHeight(bool)
+ ?qt_fontdata_from_index@@YA?AVQByteArray@@H@Z @ 13241 NONAME ; class QByteArray qt_fontdata_from_index(int)
+ ??0QIconEngineV2@@QAE@ABV0@@Z @ 13242 NONAME ; QIconEngineV2::QIconEngineV2(class QIconEngineV2 const &)
+ ?swap@QImage@@QAEXAAV1@@Z @ 13243 NONAME ; void QImage::swap(class QImage &)
+ ??0QIconEngineFactoryInterfaceV2@@QAE@XZ @ 13244 NONAME ; QIconEngineFactoryInterfaceV2::QIconEngineFactoryInterfaceV2(void)
+ ??0QScroller@@AAE@PAVQObject@@@Z @ 13245 NONAME ; QScroller::QScroller(class QObject *)
+ ?compositionModeChanged@QBlitterPaintEngine@@UAEXXZ @ 13246 NONAME ; void QBlitterPaintEngine::compositionModeChanged(void)
+ ?contentPosRange@QScrollPrepareEvent@@QBE?AVQRectF@@XZ @ 13247 NONAME ; class QRectF QScrollPrepareEvent::contentPosRange(void) const
+ ?grabGesture@QScroller@@SA?AW4GestureType@Qt@@PAVQObject@@W4ScrollerGestureType@1@@Z @ 13248 NONAME ; enum Qt::GestureType QScroller::grabGesture(class QObject *, enum QScroller::ScrollerGestureType)
+ ??_EQFlickGesture@@UAE@I@Z @ 13249 NONAME ; QFlickGesture::~QFlickGesture(unsigned int)
+ ?drawRects@QBlitterPaintEngine@@UAEXPBVQRectF@@H@Z @ 13250 NONAME ; void QBlitterPaintEngine::drawRects(class QRectF const *, int)
+ ??4QTextLine@@QAEAAV0@ABV0@@Z @ 13251 NONAME ; class QTextLine & QTextLine::operator=(class QTextLine const &)
+ ??0QToolBarChangeEvent@@QAE@ABV0@@Z @ 13252 NONAME ; QToolBarChangeEvent::QToolBarChangeEvent(class QToolBarChangeEvent const &)
+ ??1QBlitterPaintEngine@@UAE@XZ @ 13253 NONAME ; QBlitterPaintEngine::~QBlitterPaintEngine(void)
+ ?markRasterOverlay@QBlittablePixmapData@@QAEXPBVQRectF@@H@Z @ 13254 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QRectF const *, int)
+ ??0QResizeEvent@@QAE@ABV0@@Z @ 13255 NONAME ; QResizeEvent::QResizeEvent(class QResizeEvent const &)
+ ??0QIconEngineFactoryInterface@@QAE@XZ @ 13256 NONAME ; QIconEngineFactoryInterface::QIconEngineFactoryInterface(void)
+ ?drawTextItem@QBlitterPaintEngine@@UAEXABVQPointF@@ABVQTextItem@@@Z @ 13257 NONAME ; void QBlitterPaintEngine::drawTextItem(class QPointF const &, class QTextItem const &)
+ ??0QPictureFormatInterface@@QAE@XZ @ 13258 NONAME ; QPictureFormatInterface::QPictureFormatInterface(void)
+ ?trUtf8@QFlickGesture@@SA?AVQString@@PBD0@Z @ 13259 NONAME ; class QString QFlickGesture::trUtf8(char const *, char const *)
+ ?stop@QScroller@@QAEXXZ @ 13260 NONAME ; void QScroller::stop(void)
+ ?retrieveData@QInternalMimeData@@MBE?AVQVariant@@ABVQString@@W4Type@2@@Z @ 13261 NONAME ; class QVariant QInternalMimeData::retrieveData(class QString const &, enum QVariant::Type) const
+ ??8QGlyphs@@QBE_NABV0@@Z @ 13262 NONAME ; bool QGlyphs::operator==(class QGlyphs const &) const
+ ?drawImage@QBlitterPaintEngine@@UAEXABVQRectF@@ABVQImage@@0V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 13263 NONAME ; void QBlitterPaintEngine::drawImage(class QRectF const &, class QImage const &, class QRectF const &, class QFlags<enum Qt::ImageConversionFlag>)
+ ?contentPos@QScrollEvent@@QBE?AVQPointF@@XZ @ 13264 NONAME ; class QPointF QScrollEvent::contentPos(void) const
+ ?mimeTypes@QAbstractProxyModel@@UBE?AVQStringList@@XZ @ 13265 NONAME ; class QStringList QAbstractProxyModel::mimeTypes(void) const
+ ?createState@QBlitterPaintEngine@@UBEPAVQPainterState@@PAV2@@Z @ 13266 NONAME ; class QPainterState * QBlitterPaintEngine::createState(class QPainterState *) const
+ ?removeItem@QGraphicsGridLayout@@QAEXPAVQGraphicsLayoutItem@@@Z @ 13267 NONAME ; void QGraphicsGridLayout::removeItem(class QGraphicsLayoutItem *)
+ ?clipBoundingRect@QPainter@@QBE?AVQRectF@@XZ @ 13268 NONAME ; class QRectF QPainter::clipBoundingRect(void) const
+ ?formats@QInternalMimeData@@UBE?AVQStringList@@XZ @ 13269 NONAME ; class QStringList QInternalMimeData::formats(void) const
+ ?stateChanged@QScroller@@IAEXW4State@1@@Z @ 13270 NONAME ; void QScroller::stateChanged(enum QScroller::State)
+ ?raster@QBlitterPaintEngine@@ABEPAVQRasterPaintEngine@@XZ @ 13271 NONAME ; class QRasterPaintEngine * QBlitterPaintEngine::raster(void) const
+ ?sort@QAbstractProxyModel@@UAEXHW4SortOrder@Qt@@@Z @ 13272 NONAME ; void QAbstractProxyModel::sort(int, enum Qt::SortOrder)
+ ?d_func@QBlittable@@AAEPAVQBlittablePrivate@@XZ @ 13273 NONAME ; class QBlittablePrivate * QBlittable::d_func(void)
+ ?setDefaultScrollerProperties@QScrollerProperties@@SAXABV1@@Z @ 13274 NONAME ; void QScrollerProperties::setDefaultScrollerProperties(class QScrollerProperties const &)
+ ??_EQPolygon@@QAE@I@Z @ 13275 NONAME ; QPolygon::~QPolygon(unsigned int)
+ ?type@QBlitterPaintEngine@@UBE?AW4Type@QPaintEngine@@XZ @ 13276 NONAME ; enum QPaintEngine::Type QBlitterPaintEngine::type(void) const
+ ?qt_metacast@QScroller@@UAEPAXPBD@Z @ 13277 NONAME ; void * QScroller::qt_metacast(char const *)
+ ??_EQImageReader@@QAE@I@Z @ 13278 NONAME ; QImageReader::~QImageReader(unsigned int)
+ ?buddy@QAbstractProxyModel@@UBE?AVQModelIndex@@ABV2@@Z @ 13279 NONAME ; class QModelIndex QAbstractProxyModel::buddy(class QModelIndex const &) const
+ ?tr@QScroller@@SA?AVQString@@PBD0H@Z @ 13280 NONAME ; class QString QScroller::tr(char const *, char const *, int)
+ ?fill@QImage@@QAEXABVQColor@@@Z @ 13281 NONAME ; void QImage::fill(class QColor const &)
+ ?scrollMetric@QScrollerProperties@@QBE?AVQVariant@@W4ScrollMetric@1@@Z @ 13282 NONAME ; class QVariant QScrollerProperties::scrollMetric(enum QScrollerProperties::ScrollMetric) const
+ ?fill@QImage@@QAEXW4GlobalColor@Qt@@@Z @ 13283 NONAME ; void QImage::fill(enum Qt::GlobalColor)
+ ??4QStyleOptionGraphicsItem@@QAEAAV0@ABV0@@Z @ 13284 NONAME ; class QStyleOptionGraphicsItem & QStyleOptionGraphicsItem::operator=(class QStyleOptionGraphicsItem const &)
+ ?canFetchMore@QAbstractProxyModel@@UBE_NABVQModelIndex@@@Z @ 13285 NONAME ; bool QAbstractProxyModel::canFetchMore(class QModelIndex const &) const
+ ??4QStyleOptionProgressBarV2@@QAEAAV0@ABV0@@Z @ 13286 NONAME ; class QStyleOptionProgressBarV2 & QStyleOptionProgressBarV2::operator=(class QStyleOptionProgressBarV2 const &)
+ ??1QScroller@@EAE@XZ @ 13287 NONAME ; QScroller::~QScroller(void)
+ ?setFont@QGlyphs@@QAEXABVQFont@@@Z @ 13288 NONAME ; void QGlyphs::setFont(class QFont const &)
+ ?startPos@QScrollPrepareEvent@@QBE?AVQPointF@@XZ @ 13289 NONAME ; class QPointF QScrollPrepareEvent::startPos(void) const
+ ?resize@QBlittablePixmapData@@UAEXHH@Z @ 13290 NONAME ; void QBlittablePixmapData::resize(int, int)
+ ?setTabsClosable@QMdiArea@@QAEX_N@Z @ 13291 NONAME ; void QMdiArea::setTabsClosable(bool)
+ ?ensureVisible@QScroller@@QAEXABVQRectF@@MM@Z @ 13292 NONAME ; void QScroller::ensureVisible(class QRectF const &, float, float)
+ ?getText@QInputDialog@@SA?AVQString@@PAVQWidget@@ABV2@1W4EchoMode@QLineEdit@@1PA_NV?$QFlags@W4WindowType@Qt@@@@V?$QFlags@W4InputMethodHint@Qt@@@@@Z @ 13293 NONAME ; class QString QInputDialog::getText(class QWidget *, class QString const &, class QString const &, enum QLineEdit::EchoMode, class QString const &, bool *, class QFlags<enum Qt::WindowType>, class QFlags<enum Qt::InputMethodHint>)
+ ?hasWidthForHeight@QSizePolicy@@QBE_NXZ @ 13294 NONAME ; bool QSizePolicy::hasWidthForHeight(void) const
+ ?transformChanged@QBlitterPaintEngine@@UAEXXZ @ 13295 NONAME ; void QBlitterPaintEngine::transformChanged(void)
+ ??0QDragEnterEvent@@QAE@ABV0@@Z @ 13296 NONAME ; QDragEnterEvent::QDragEnterEvent(class QDragEnterEvent const &)
+ ??0QBlittablePixmapData@@QAE@XZ @ 13297 NONAME ; QBlittablePixmapData::QBlittablePixmapData(void)
+ ??_EKey@QPixmapCache@@QAE@I@Z @ 13298 NONAME ; QPixmapCache::Key::~Key(unsigned int)
+ ??_EQCursor@@QAE@I@Z @ 13299 NONAME ; QCursor::~QCursor(unsigned int)
+ ?size@QBlittable@@QBE?AVQSize@@XZ @ 13300 NONAME ; class QSize QBlittable::size(void) const
+ ??0QShortcutEvent@@QAE@ABV0@@Z @ 13301 NONAME ; QShortcutEvent::QShortcutEvent(class QShortcutEvent const &)
+ ?setBlittable@QBlittablePixmapData@@QAEXPAVQBlittable@@@Z @ 13302 NONAME ; void QBlittablePixmapData::setBlittable(class QBlittable *)
+ ?opacityChanged@QBlitterPaintEngine@@UAEXXZ @ 13303 NONAME ; void QBlitterPaintEngine::opacityChanged(void)
+ ?tr@QFlickGesture@@SA?AVQString@@PBD0H@Z @ 13304 NONAME ; class QString QFlickGesture::tr(char const *, char const *, int)
+ ??_EQTextCursor@@QAE@I@Z @ 13305 NONAME ; QTextCursor::~QTextCursor(unsigned int)
+ ?createExplicitFontWithName@QFontEngine@@IBE?AVQFont@@ABVQString@@@Z @ 13306 NONAME ; class QFont QFontEngine::createExplicitFontWithName(class QString const &) const
+ ?setState@QBlitterPaintEngine@@UAEXPAVQPainterState@@@Z @ 13307 NONAME ; void QBlitterPaintEngine::setState(class QPainterState *)
+ ?clip@QBlitterPaintEngine@@UAEXABVQRegion@@W4ClipOperation@Qt@@@Z @ 13308 NONAME ; void QBlitterPaintEngine::clip(class QRegion const &, enum Qt::ClipOperation)
+ ?subPixelPositionForX@QTextureGlyphCache@@QBE?AUQFixed@@U2@@Z @ 13309 NONAME ; struct QFixed QTextureGlyphCache::subPixelPositionForX(struct QFixed) const
+ ?hasAlphaChannel@QBlittablePixmapData@@UBE_NXZ @ 13310 NONAME ; bool QBlittablePixmapData::hasAlphaChannel(void) const
+ ?setSnapPositionsX@QScroller@@QAEXABV?$QList@M@@@Z @ 13311 NONAME ; void QScroller::setSnapPositionsX(class QList<float> const &)
+ ?numberSuffix@QTextListFormat@@QBE?AVQString@@XZ @ 13312 NONAME ; class QString QTextListFormat::numberSuffix(void) const
+ ??HQGlyphs@@ABE?AV0@ABV0@@Z @ 13313 NONAME ; class QGlyphs QGlyphs::operator+(class QGlyphs const &) const
+ ??0QGradient@@QAE@ABV0@@Z @ 13314 NONAME ; QGradient::QGradient(class QGradient const &)
+ ?tabsMovable@QMdiArea@@QBE_NXZ @ 13315 NONAME ; bool QMdiArea::tabsMovable(void) const
+ ??4QInputMethodEvent@@QAEAAV0@ABV0@@Z @ 13316 NONAME ; class QInputMethodEvent & QInputMethodEvent::operator=(class QInputMethodEvent const &)
+ ?contentPos@QScrollPrepareEvent@@QBE?AVQPointF@@XZ @ 13317 NONAME ; class QPointF QScrollPrepareEvent::contentPos(void) const
+ ?getStaticMetaObject@QScroller@@SAABUQMetaObject@@XZ @ 13318 NONAME ; struct QMetaObject const & QScroller::getStaticMetaObject(void)
+ ?end@QBlitterPaintEngine@@UAE_NXZ @ 13319 NONAME ; bool QBlitterPaintEngine::end(void)
+ ??1QScrollerProperties@@UAE@XZ @ 13320 NONAME ; QScrollerProperties::~QScrollerProperties(void)
+ ??0QFlickGesture@@QAE@PAVQObject@@W4MouseButton@Qt@@0@Z @ 13321 NONAME ; QFlickGesture::QFlickGesture(class QObject *, enum Qt::MouseButton, class QObject *)
+ ?fill@QBlitterPaintEngine@@UAEXABVQVectorPath@@ABVQBrush@@@Z @ 13322 NONAME ; void QBlitterPaintEngine::fill(class QVectorPath const &, class QBrush const &)
+ ?drawPixmap@QBlitterPaintEngine@@UAEXABVQRectF@@ABVQPixmap@@0@Z @ 13323 NONAME ; void QBlitterPaintEngine::drawPixmap(class QRectF const &, class QPixmap const &, class QRectF const &)
+ ??0QVector2D@@QAE@ABV0@@Z @ 13324 NONAME ; QVector2D::QVector2D(class QVector2D const &)
+ ?setSnapPositionsY@QScroller@@QAEXABV?$QList@M@@@Z @ 13325 NONAME ; void QScroller::setSnapPositionsY(class QList<float> const &)
+ ??4QStyleOptionFocusRect@@QAEAAV0@ABV0@@Z @ 13326 NONAME ; class QStyleOptionFocusRect & QStyleOptionFocusRect::operator=(class QStyleOptionFocusRect const &)
+ ??_EQPen@@QAE@I@Z @ 13327 NONAME ; QPen::~QPen(unsigned int)
+ ??_EQKeySequence@@QAE@I@Z @ 13328 NONAME ; QKeySequence::~QKeySequence(unsigned int)
+ ?tr@QInternalMimeData@@SA?AVQString@@PBD0H@Z @ 13329 NONAME ; class QString QInternalMimeData::tr(char const *, char const *, int)
+ ?velocity@QScroller@@QBE?AVQPointF@@XZ @ 13330 NONAME ; class QPointF QScroller::velocity(void) const
+ ?glyphIndexes@QGlyphs@@QBE?AV?$QVector@I@@XZ @ 13331 NONAME ; class QVector<unsigned int> QGlyphs::glyphIndexes(void) const
+ ?get@QFontPrivate@@SAPAV1@ABVQFont@@@Z @ 13332 NONAME ; class QFontPrivate * QFontPrivate::get(class QFont const &)
+ ?setScrollMetric@QScrollerProperties@@QAEXW4ScrollMetric@1@ABVQVariant@@@Z @ 13333 NONAME ; void QScrollerProperties::setScrollMetric(enum QScrollerProperties::ScrollMetric, class QVariant const &)
+ ??4QGradient@@QAEAAV0@ABV0@@Z @ 13334 NONAME ; class QGradient & QGradient::operator=(class QGradient const &)
+ ??0QScrollEvent@@QAE@ABVQPointF@@0W4ScrollState@0@@Z @ 13335 NONAME ; QScrollEvent::QScrollEvent(class QPointF const &, class QPointF const &, enum QScrollEvent::ScrollState)
+ ?d_func@QFlickGesture@@AAEPAVQFlickGesturePrivate@@XZ @ 13336 NONAME ; class QFlickGesturePrivate * QFlickGesture::d_func(void)
+ ?scrollState@QScrollEvent@@QBE?AW4ScrollState@1@XZ @ 13337 NONAME ; enum QScrollEvent::ScrollState QScrollEvent::scrollState(void) const
+ ??0QTextTableFormat@@QAE@ABV0@@Z @ 13338 NONAME ; QTextTableFormat::QTextTableFormat(class QTextTableFormat const &)
+ ??_EQImagePixmapCleanupHooks@@QAE@I@Z @ 13339 NONAME ; QImagePixmapCleanupHooks::~QImagePixmapCleanupHooks(unsigned int)
+ ?fetchMore@QAbstractProxyModel@@UAEXABVQModelIndex@@@Z @ 13340 NONAME ; void QAbstractProxyModel::fetchMore(class QModelIndex const &)
+ ?glyphs@QTextLine@@ABE?AV?$QList@VQGlyphs@@@@HH@Z @ 13341 NONAME ; class QList<class QGlyphs> QTextLine::glyphs(int, int) const
+ ?getStaticMetaObject@QFlickGesture@@SAABUQMetaObject@@XZ @ 13342 NONAME ; struct QMetaObject const & QFlickGesture::getStaticMetaObject(void)
+ ?setViewportSize@QScrollPrepareEvent@@QAEXABVQSizeF@@@Z @ 13343 NONAME ; void QScrollPrepareEvent::setViewportSize(class QSizeF const &)
+ ??0QStatusTipEvent@@QAE@ABV0@@Z @ 13344 NONAME ; QStatusTipEvent::QStatusTipEvent(class QStatusTipEvent const &)
+ ??0Value@QCss@@QAE@ABU01@@Z @ 13345 NONAME ; QCss::Value::Value(struct QCss::Value const &)
+ ?d_func@QScrollPrepareEvent@@AAEPAVQScrollPrepareEventPrivate@@XZ @ 13346 NONAME ; class QScrollPrepareEventPrivate * QScrollPrepareEvent::d_func(void)
+ ?overshootDistance@QScrollEvent@@QBE?AVQPointF@@XZ @ 13347 NONAME ; class QPointF QScrollEvent::overshootDistance(void) const
+ ?resolveFontFamilyAlias@QFontDatabase@@CA?AVQString@@ABV2@@Z @ 13348 NONAME ; class QString QFontDatabase::resolveFontFamilyAlias(class QString const &)
+ ?alphaRGBMapForGlyph@QFontEngine@@UAE?AVQImage@@IUQFixed@@HABVQTransform@@@Z @ 13349 NONAME ; class QImage QFontEngine::alphaRGBMapForGlyph(unsigned int, struct QFixed, int, class QTransform const &)
+ ??4QSizePolicy@@QAEAAV0@ABV0@@Z @ 13350 NONAME ; class QSizePolicy & QSizePolicy::operator=(class QSizePolicy const &)
+ ?swap@QBitmap@@QAEXAAV1@@Z @ 13351 NONAME ; void QBitmap::swap(class QBitmap &)
+ ?hasFormat@QInternalMimeData@@UBE_NABVQString@@@Z @ 13352 NONAME ; bool QInternalMimeData::hasFormat(class QString const &) const
+ ?renderDataHelper@QInternalMimeData@@SA?AVQByteArray@@ABVQString@@PBVQMimeData@@@Z @ 13353 NONAME ; class QByteArray QInternalMimeData::renderDataHelper(class QString const &, class QMimeData const *)
+ ??_ETouchPoint@QTouchEvent@@QAE@I@Z @ 13354 NONAME ; QTouchEvent::TouchPoint::~TouchPoint(unsigned int)
+ ??0QWindowSurface@@QAE@PAVQWidget@@_N@Z @ 13355 NONAME ; QWindowSurface::QWindowSurface(class QWidget *, bool)
+ ?fill@QBlittablePixmapData@@UAEXABVQColor@@@Z @ 13356 NONAME ; void QBlittablePixmapData::fill(class QColor const &)
+ ?metric@QBlittablePixmapData@@UBEHW4PaintDeviceMetric@QPaintDevice@@@Z @ 13357 NONAME ; int QBlittablePixmapData::metric(enum QPaintDevice::PaintDeviceMetric) const
+ ??4QItemSelection@@QAEAAV0@ABV0@@Z @ 13358 NONAME ; class QItemSelection & QItemSelection::operator=(class QItemSelection const &)
+ ?fillRect@QBlitterPaintEngine@@UAEXABVQRectF@@ABVQColor@@@Z @ 13359 NONAME ; void QBlitterPaintEngine::fillRect(class QRectF const &, class QColor const &)
+ ??4QStyleOptionQ3ListView@@QAEAAV0@ABV0@@Z @ 13360 NONAME ; class QStyleOptionQ3ListView & QStyleOptionQ3ListView::operator=(class QStyleOptionQ3ListView const &)
+ ??6@YA?AVQDebug@@V0@PBVQSymbianEvent@@@Z @ 13361 NONAME ; class QDebug operator<<(class QDebug, class QSymbianEvent const *)
+ ??0QSizePolicy@@QAE@ABV0@@Z @ 13362 NONAME ; QSizePolicy::QSizePolicy(class QSizePolicy const &)
+ ?ProcessCommandParametersL@QS60MainAppUi@@UAEHW4TApaCommand@@AAV?$TBuf@$0BAA@@@ABVTDesC8@@@Z @ 13363 NONAME ; int QS60MainAppUi::ProcessCommandParametersL(enum TApaCommand, class TBuf<256> &, class TDesC8 const &)
+ ?scrollerProperties@QScroller@@QBE?AVQScrollerProperties@@XZ @ 13364 NONAME ; class QScrollerProperties QScroller::scrollerProperties(void) const
+ ??_EQBlittablePixmapData@@UAE@I@Z @ 13365 NONAME ; QBlittablePixmapData::~QBlittablePixmapData(unsigned int)
+ ?mimeData@QAbstractProxyModel@@UBEPAVQMimeData@@ABV?$QList@VQModelIndex@@@@@Z @ 13366 NONAME ; class QMimeData * QAbstractProxyModel::mimeData(class QList<class QModelIndex> const &) const
+ ??4QStyleOptionFrameV2@@QAEAAV0@ABV0@@Z @ 13367 NONAME ; class QStyleOptionFrameV2 & QStyleOptionFrameV2::operator=(class QStyleOptionFrameV2 const &)
+ ??_EQScroller@@UAE@I@Z @ 13368 NONAME ; QScroller::~QScroller(unsigned int)
+ ??1QScrollPrepareEvent@@UAE@XZ @ 13369 NONAME ; QScrollPrepareEvent::~QScrollPrepareEvent(void)
+ ??4QVector3D@@QAEAAV0@ABV0@@Z @ 13370 NONAME ; class QVector3D & QVector3D::operator=(class QVector3D const &)
+ ?setTabsMovable@QMdiArea@@QAEX_N@Z @ 13371 NONAME ; void QMdiArea::setTabsMovable(bool)
+ ?minimumSizeHint@QRadioButton@@UBE?AVQSize@@XZ @ 13372 NONAME ; class QSize QRadioButton::minimumSizeHint(void) const
+ ??4QStyleOptionQ3DockWindow@@QAEAAV0@ABV0@@Z @ 13373 NONAME ; class QStyleOptionQ3DockWindow & QStyleOptionQ3DockWindow::operator=(class QStyleOptionQ3DockWindow const &)
+ ?qt_metacast@QFlickGesture@@UAEPAXPBD@Z @ 13374 NONAME ; void * QFlickGesture::qt_metacast(char const *)
+ ??_EQFont@@QAE@I@Z @ 13375 NONAME ; QFont::~QFont(unsigned int)
+ ?setPositions@QGlyphs@@QAEXABV?$QVector@VQPointF@@@@@Z @ 13376 NONAME ; void QGlyphs::setPositions(class QVector<class QPointF> const &)
+ ??4QStyleOptionDockWidget@@QAEAAV0@ABV0@@Z @ 13377 NONAME ; class QStyleOptionDockWidget & QStyleOptionDockWidget::operator=(class QStyleOptionDockWidget const &)
+ ??0QPainterState@@QAE@ABV0@@Z @ 13378 NONAME ; QPainterState::QPainterState(class QPainterState const &)
+ ??4QStyleOptionFrame@@QAEAAV0@ABV0@@Z @ 13379 NONAME ; class QStyleOptionFrame & QStyleOptionFrame::operator=(class QStyleOptionFrame const &)
+ ?drawRects@QBlitterPaintEngine@@UAEXPBVQRect@@H@Z @ 13380 NONAME ; void QBlitterPaintEngine::drawRects(class QRect const *, int)
+ ?fillInPendingGlyphs@QTextureGlyphCache@@QAEXXZ @ 13381 NONAME ; void QTextureGlyphCache::fillInPendingGlyphs(void)
+ ?metaObject@QFlickGesture@@UBEPBUQMetaObject@@XZ @ 13382 NONAME ; struct QMetaObject const * QFlickGesture::metaObject(void) const
+ ?renderHintsChanged@QBlitterPaintEngine@@UAEXXZ @ 13383 NONAME ; void QBlitterPaintEngine::renderHintsChanged(void)
+ ?supportedDropActions@QAbstractProxyModel@@UBE?AV?$QFlags@W4DropAction@Qt@@@@XZ @ 13384 NONAME ; class QFlags<enum Qt::DropAction> QAbstractProxyModel::supportedDropActions(void) const
+ ?fillRect@QBlitterPaintEngine@@UAEXABVQRectF@@ABVQBrush@@@Z @ 13385 NONAME ; void QBlitterPaintEngine::fillRect(class QRectF const &, class QBrush const &)
+ ?setGlyphIndexes@QGlyphs@@QAEXABV?$QVector@I@@@Z @ 13386 NONAME ; void QGlyphs::setGlyphIndexes(class QVector<unsigned int> const &)
+ ?alphaMapBoundingBox@QFontEngine@@UAE?AUglyph_metrics_t@@IABVQTransform@@W4GlyphFormat@1@@Z @ 13387 NONAME ; struct glyph_metrics_t QFontEngine::alphaMapBoundingBox(unsigned int, class QTransform const &, enum QFontEngine::GlyphFormat)
+ ?resendPrepareEvent@QScroller@@QAEXXZ @ 13388 NONAME ; void QScroller::resendPrepareEvent(void)
+ ??4QTextLength@@QAEAAV0@ABV0@@Z @ 13389 NONAME ; class QTextLength & QTextLength::operator=(class QTextLength const &)
+ ??0QHelpEvent@@QAE@ABV0@@Z @ 13390 NONAME ; QHelpEvent::QHelpEvent(class QHelpEvent const &)
+ ??0QContextMenuEvent@@QAE@ABV0@@Z @ 13391 NONAME ; QContextMenuEvent::QContextMenuEvent(class QContextMenuEvent const &)
+ ?d_func@QBlittable@@ABEPBVQBlittablePrivate@@XZ @ 13392 NONAME ; class QBlittablePrivate const * QBlittable::d_func(void) const
+ ?state@QBlitterPaintEngine@@QBEPBVQPainterState@@XZ @ 13393 NONAME ; class QPainterState const * QBlitterPaintEngine::state(void) const
+ ??0QScrollPrepareEvent@@QAE@ABVQPointF@@@Z @ 13394 NONAME ; QScrollPrepareEvent::QScrollPrepareEvent(class QPointF const &)
+ ??0QWhatsThisClickedEvent@@QAE@ABV0@@Z @ 13395 NONAME ; QWhatsThisClickedEvent::QWhatsThisClickedEvent(class QWhatsThisClickedEvent const &)
+ ??4QStyleOptionTab@@QAEAAV0@ABV0@@Z @ 13396 NONAME ; class QStyleOptionTab & QStyleOptionTab::operator=(class QStyleOptionTab const &)
+ ??0QTabletEvent@@QAE@ABV0@@Z @ 13397 NONAME ; QTabletEvent::QTabletEvent(class QTabletEvent const &)
+ ?scrollTo@QScroller@@QAEXABVQPointF@@H@Z @ 13398 NONAME ; void QScroller::scrollTo(class QPointF const &, int)
+ ?ungrabGesture@QScroller@@SAXPAVQObject@@@Z @ 13399 NONAME ; void QScroller::ungrabGesture(class QObject *)
+ ??4QItemSelectionRange@@QAEAAV0@ABV0@@Z @ 13400 NONAME ; class QItemSelectionRange & QItemSelectionRange::operator=(class QItemSelectionRange const &)
+ ?clear@QGlyphs@@QAEXXZ @ 13401 NONAME ; void QGlyphs::clear(void)
+ ??_EQStyleOptionViewItemV4@@QAE@I@Z @ 13402 NONAME ; QStyleOptionViewItemV4::~QStyleOptionViewItemV4(unsigned int)
+ ??1QBlittablePixmapData@@UAE@XZ @ 13403 NONAME ; QBlittablePixmapData::~QBlittablePixmapData(void)
+ ?formatsHelper@QInternalMimeData@@SA?AVQStringList@@PBVQMimeData@@@Z @ 13404 NONAME ; class QStringList QInternalMimeData::formatsHelper(class QMimeData const *)
+ ?qt_metacast@QInternalMimeData@@UAEPAXPBD@Z @ 13405 NONAME ; void * QInternalMimeData::qt_metacast(char const *)
+ ?font@QGlyphs@@QBE?AVQFont@@XZ @ 13406 NONAME ; class QFont QGlyphs::font(void) const
+ ?paintEngine@QBlittablePixmapData@@UBEPAVQPaintEngine@@XZ @ 13407 NONAME ; class QPaintEngine * QBlittablePixmapData::paintEngine(void) const
+ ?unsetDefaultScrollerProperties@QScrollerProperties@@SAXXZ @ 13408 NONAME ; void QScrollerProperties::unsetDefaultScrollerProperties(void)
+ ?hasChildren@QAbstractProxyModel@@UBE_NABVQModelIndex@@@Z @ 13409 NONAME ; bool QAbstractProxyModel::hasChildren(class QModelIndex const &) const
+ ?swap@QPen@@QAEXAAV1@@Z @ 13410 NONAME ; void QPen::swap(class QPen &)
+ ?span@QAbstractProxyModel@@UBE?AVQSize@@ABVQModelIndex@@@Z @ 13411 NONAME ; class QSize QAbstractProxyModel::span(class QModelIndex const &) const
+ ??4QEglProperties@@QAEAAV0@ABV0@@Z @ 13412 NONAME ; class QEglProperties & QEglProperties::operator=(class QEglProperties const &)
+ ??0QHoverEvent@@QAE@ABV0@@Z @ 13413 NONAME ; QHoverEvent::QHoverEvent(class QHoverEvent const &)
+ ??0QPaintEngineState@@QAE@XZ @ 13414 NONAME ; QPaintEngineState::QPaintEngineState(void)
+ ?setSnapPositionsY@QScroller@@QAEXMM@Z @ 13415 NONAME ; void QScroller::setSnapPositionsY(float, float)
+ ?d_func@QScrollPrepareEvent@@ABEPBVQScrollPrepareEventPrivate@@XZ @ 13416 NONAME ; class QScrollPrepareEventPrivate const * QScrollPrepareEvent::d_func(void) const
+ ?textureMapForGlyph@QTextureGlyphCache@@QBE?AVQImage@@IUQFixed@@@Z @ 13417 NONAME ; class QImage QTextureGlyphCache::textureMapForGlyph(unsigned int, struct QFixed) const
+ ??0QKeyEvent@@QAE@ABV0@@Z @ 13418 NONAME ; QKeyEvent::QKeyEvent(class QKeyEvent const &)
+ ??0QIconEngine@@QAE@ABV0@@Z @ 13419 NONAME ; QIconEngine::QIconEngine(class QIconEngine const &)
+ ??4QStyleOptionToolBoxV2@@QAEAAV0@ABV0@@Z @ 13420 NONAME ; class QStyleOptionToolBoxV2 & QStyleOptionToolBoxV2::operator=(class QStyleOptionToolBoxV2 const &)
+ ?qt_metacall@QInternalMimeData@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13421 NONAME ; int QInternalMimeData::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?lineHeightType@QTextBlockFormat@@QBEHXZ @ 13422 NONAME ; int QTextBlockFormat::lineHeightType(void) const
+ ?hintingPreference@QFont@@QBE?AW4HintingPreference@1@XZ @ 13423 NONAME ; enum QFont::HintingPreference QFont::hintingPreference(void) const
+ ??0QGlyphs@@QAE@XZ @ 13424 NONAME ; QGlyphs::QGlyphs(void)
+ ?trUtf8@QInternalMimeData@@SA?AVQString@@PBD0H@Z @ 13425 NONAME ; class QString QInternalMimeData::trUtf8(char const *, char const *, int)
+ ??0QImageIOHandlerFactoryInterface@@QAE@XZ @ 13426 NONAME ; QImageIOHandlerFactoryInterface::QImageIOHandlerFactoryInterface(void)
+ ??_EQRegion@@QAE@I@Z @ 13427 NONAME ; QRegion::~QRegion(unsigned int)
+ ?begin@QBlitterPaintEngine@@UAE_NPAVQPaintDevice@@@Z @ 13428 NONAME ; bool QBlitterPaintEngine::begin(class QPaintDevice *)
+ ?inFontUcs4@QFontMetricsF@@QBE_NI@Z @ 13429 NONAME ; bool QFontMetricsF::inFontUcs4(unsigned int) const
+ ?viewportSize@QScrollPrepareEvent@@QBE?AVQSizeF@@XZ @ 13430 NONAME ; class QSizeF QScrollPrepareEvent::viewportSize(void) const
+ ?markRasterOverlay@QBlittablePixmapData@@QAEXABVQRectF@@@Z @ 13431 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QRectF const &)
+ ?d_func@QBlitterPaintEngine@@AAEPAVQBlitterPaintEnginePrivate@@XZ @ 13432 NONAME ; class QBlitterPaintEnginePrivate * QBlitterPaintEngine::d_func(void)
+ ?setNumberPrefix@QTextListFormat@@QAEXABVQString@@@Z @ 13433 NONAME ; void QTextListFormat::setNumberPrefix(class QString const &)
+ ?lineHeight@QTextBlockFormat@@QBEMMM@Z @ 13434 NONAME ; float QTextBlockFormat::lineHeight(float, float) const
+ ??4QStyleOptionComplex@@QAEAAV0@ABV0@@Z @ 13435 NONAME ; class QStyleOptionComplex & QStyleOptionComplex::operator=(class QStyleOptionComplex const &)
+ ?getItem@QInputDialog@@SA?AVQString@@PAVQWidget@@ABV2@1ABVQStringList@@H_NPA_NV?$QFlags@W4WindowType@Qt@@@@V?$QFlags@W4InputMethodHint@Qt@@@@@Z @ 13436 NONAME ; class QString QInputDialog::getItem(class QWidget *, class QString const &, class QString const &, class QStringList const &, int, bool, bool *, class QFlags<enum Qt::WindowType>, class QFlags<enum Qt::InputMethodHint>)
+ ??_EFileInfo@QZipReader@@QAE@I@Z @ 13437 NONAME ; QZipReader::FileInfo::~FileInfo(unsigned int)
+ ?hasFeature@QWindowSurface@@QBE_NW4WindowSurfaceFeature@1@@Z @ 13438 NONAME ; bool QWindowSurface::hasFeature(enum QWindowSurface::WindowSurfaceFeature) const
+ ?qGamma_correct_back_to_linear_cs@@YAXPAVQImage@@@Z @ 13439 NONAME ; void qGamma_correct_back_to_linear_cs(class QImage *)
+ ??0QBitmap@@QAE@ABV0@@Z @ 13440 NONAME ; QBitmap::QBitmap(class QBitmap const &)
+ ?clip@QBlitterPaintEngine@@UAEXABVQVectorPath@@W4ClipOperation@Qt@@@Z @ 13441 NONAME ; void QBlitterPaintEngine::clip(class QVectorPath const &, enum Qt::ClipOperation)
+ ??1QScrollEvent@@UAE@XZ @ 13442 NONAME ; QScrollEvent::~QScrollEvent(void)
+ ?state@QScroller@@QBE?AW4State@1@XZ @ 13443 NONAME ; enum QScroller::State QScroller::state(void) const
+ ?positions@QGlyphs@@QBE?AV?$QVector@VQPointF@@@@XZ @ 13444 NONAME ; class QVector<class QPointF> QGlyphs::positions(void) const
+ ?tr@QScroller@@SA?AVQString@@PBD0@Z @ 13445 NONAME ; class QString QScroller::tr(char const *, char const *)
+ ?canReadData@QInternalMimeData@@SA_NABVQString@@@Z @ 13446 NONAME ; bool QInternalMimeData::canReadData(class QString const &)
+ ?glyphs@QTextLayout@@QBE?AV?$QList@VQGlyphs@@@@XZ @ 13447 NONAME ; class QList<class QGlyphs> QTextLayout::glyphs(void) const
+ ?leadingSpaceWidth@QTextEngine@@QAE?AUQFixed@@ABUQScriptLine@@@Z @ 13448 NONAME ; struct QFixed QTextEngine::leadingSpaceWidth(struct QScriptLine const &)
+ ??_EQTextFormat@@QAE@I@Z @ 13449 NONAME ; QTextFormat::~QTextFormat(unsigned int)
+ ??4QStyleOptionTabWidgetFrame@@QAEAAV0@ABV0@@Z @ 13450 NONAME ; class QStyleOptionTabWidgetFrame & QStyleOptionTabWidgetFrame::operator=(class QStyleOptionTabWidgetFrame const &)
+ ?trUtf8@QScroller@@SA?AVQString@@PBD0H@Z @ 13451 NONAME ; class QString QScroller::trUtf8(char const *, char const *, int)
+ ?d_func@QFlickGesture@@ABEPBVQFlickGesturePrivate@@XZ @ 13452 NONAME ; class QFlickGesturePrivate const * QFlickGesture::d_func(void) const
+ ??4QMouseEvent@@QAEAAV0@ABV0@@Z @ 13453 NONAME ; class QMouseEvent & QMouseEvent::operator=(class QMouseEvent const &)
+ ??_EQPainter@@QAE@I@Z @ 13454 NONAME ; QPainter::~QPainter(unsigned int)
+ ??4QStyleOptionTabBarBaseV2@@QAEAAV0@ABV0@@Z @ 13455 NONAME ; class QStyleOptionTabBarBaseV2 & QStyleOptionTabBarBaseV2::operator=(class QStyleOptionTabBarBaseV2 const &)
+ ??4QInputEvent@@QAEAAV0@ABV0@@Z @ 13456 NONAME ; class QInputEvent & QInputEvent::operator=(class QInputEvent const &)
+ ?hasScroller@QScroller@@SA_NPAVQObject@@@Z @ 13457 NONAME ; bool QScroller::hasScroller(class QObject *)
+ ?alphaMapForGlyph@QFontEngine@@UAE?AVQImage@@IUQFixed@@ABVQTransform@@@Z @ 13458 NONAME ; class QImage QFontEngine::alphaMapForGlyph(unsigned int, struct QFixed, class QTransform const &)
+ ??_EQPainterPath@@QAE@I@Z @ 13459 NONAME ; QPainterPath::~QPainterPath(unsigned int)
+ ??_EQGlyphs@@QAE@I@Z @ 13460 NONAME ; QGlyphs::~QGlyphs(unsigned int)
+ ?fromImage@QBlittablePixmapData@@UAEXABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 13461 NONAME ; void QBlittablePixmapData::fromImage(class QImage const &, class QFlags<enum Qt::ImageConversionFlag>)
+ ??0QInternalMimeData@@QAE@XZ @ 13462 NONAME ; QInternalMimeData::QInternalMimeData(void)
+ ??_EQScrollEvent@@UAE@I@Z @ 13463 NONAME ; QScrollEvent::~QScrollEvent(unsigned int)
+ ?features@QRasterWindowSurface@@UBE?AV?$QFlags@W4WindowSurfaceFeature@QWindowSurface@@@@XZ @ 13464 NONAME ; class QFlags<enum QWindowSurface::WindowSurfaceFeature> QRasterWindowSurface::features(void) const
+ ??4QGlyphs@@QAEAAV0@ABV0@@Z @ 13465 NONAME ; class QGlyphs & QGlyphs::operator=(class QGlyphs const &)
+ ??4QQuaternion@@QAEAAV0@ABV0@@Z @ 13466 NONAME ; class QQuaternion & QQuaternion::operator=(class QQuaternion const &)
+ ??4Symbol@QCss@@QAEAAU01@ABU01@@Z @ 13467 NONAME ; struct QCss::Symbol & QCss::Symbol::operator=(struct QCss::Symbol const &)
+ ??0QBlittable@@QAE@ABVQSize@@V?$QFlags@W4Capability@QBlittable@@@@@Z @ 13468 NONAME ; QBlittable::QBlittable(class QSize const &, class QFlags<enum QBlittable::Capability>)
+ ??0QIconDragEvent@@QAE@ABV0@@Z @ 13469 NONAME ; QIconDragEvent::QIconDragEvent(class QIconDragEvent const &)
+ ?scroller@QScroller@@SAPAV1@PAVQObject@@@Z @ 13470 NONAME ; class QScroller * QScroller::scroller(class QObject *)
+ ??4QScrollerProperties@@QAEAAV0@ABV0@@Z @ 13471 NONAME ; class QScrollerProperties & QScrollerProperties::operator=(class QScrollerProperties const &)
+ ?d_func@QScroller@@AAEPAVQScrollerPrivate@@XZ @ 13472 NONAME ; class QScrollerPrivate * QScroller::d_func(void)
+ ?scrollerPropertiesChanged@QScroller@@IAEXABVQScrollerProperties@@@Z @ 13473 NONAME ; void QScroller::scrollerPropertiesChanged(class QScrollerProperties const &)
+ ?markRasterOverlay@QBlittablePixmapData@@QAEXPBVQRect@@H@Z @ 13474 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QRect const *, int)
+ ?tabsClosable@QMdiArea@@QBE_NXZ @ 13475 NONAME ; bool QMdiArea::tabsClosable(void) const
+ ?canStartScrollingAt@QAbstractScrollAreaPrivate@@QAE_NABVQPoint@@@Z @ 13476 NONAME ; bool QAbstractScrollAreaPrivate::canStartScrollingAt(class QPoint const &)
+ ??0QScrollerProperties@@QAE@XZ @ 13477 NONAME ; QScrollerProperties::QScrollerProperties(void)
+ ?setLineHeight@QTextBlockFormat@@QAEXMH@Z @ 13478 NONAME ; void QTextBlockFormat::setLineHeight(float, int)
+ ?calculateSubPixelPositionCount@QTextureGlyphCache@@IBEHI@Z @ 13479 NONAME ; int QTextureGlyphCache::calculateSubPixelPositionCount(unsigned int) const
+ ??0QTextImageFormat@@QAE@ABV0@@Z @ 13480 NONAME ; QTextImageFormat::QTextImageFormat(class QTextImageFormat const &)
+ ??0QMoveEvent@@QAE@ABV0@@Z @ 13481 NONAME ; QMoveEvent::QMoveEvent(class QMoveEvent const &)
+ ?glyphs@QTextFragment@@QBE?AV?$QList@VQGlyphs@@@@XZ @ 13482 NONAME ; class QList<class QGlyphs> QTextFragment::glyphs(void) const
+ ??0QInputContextFactoryInterface@@QAE@XZ @ 13483 NONAME ; QInputContextFactoryInterface::QInputContextFactoryInterface(void)
+ ??0QTextFrameFormat@@QAE@ABV0@@Z @ 13484 NONAME ; QTextFrameFormat::QTextFrameFormat(class QTextFrameFormat const &)
+ ?resetInternalData@QAbstractProxyModel@@IAEXXZ @ 13485 NONAME ; void QAbstractProxyModel::resetInternalData(void)
+ ??0Symbol@QCss@@QAE@ABU01@@Z @ 13486 NONAME ; QCss::Symbol::Symbol(struct QCss::Symbol const &)
+ ?features@QWindowSurface@@UBE?AV?$QFlags@W4WindowSurfaceFeature@QWindowSurface@@@@XZ @ 13487 NONAME ; class QFlags<enum QWindowSurface::WindowSurfaceFeature> QWindowSurface::features(void) const
+ ?markRasterOverlay@QBlittablePixmapData@@QAEXABVQVectorPath@@@Z @ 13488 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QVectorPath const &)
+ ??4QStyleOptionFrameV3@@QAEAAV0@ABV0@@Z @ 13489 NONAME ; class QStyleOptionFrameV3 & QStyleOptionFrameV3::operator=(class QStyleOptionFrameV3 const &)
+ ?scrollTo@QScroller@@QAEXABVQPointF@@@Z @ 13490 NONAME ; void QScroller::scrollTo(class QPointF const &)
+ ??0QGraphicsSystem@@QAE@XZ @ 13491 NONAME ; QGraphicsSystem::QGraphicsSystem(void)
+ ??4QStyleOptionViewItem@@QAEAAV0@ABV0@@Z @ 13492 NONAME ; class QStyleOptionViewItem & QStyleOptionViewItem::operator=(class QStyleOptionViewItem const &)
+ ??4QStyleOptionProgressBar@@QAEAAV0@ABV0@@Z @ 13493 NONAME ; class QStyleOptionProgressBar & QStyleOptionProgressBar::operator=(class QStyleOptionProgressBar const &)
+ ?clip@QBlitterPaintEngine@@QAEPBVQClipData@@XZ @ 13494 NONAME ; class QClipData const * QBlitterPaintEngine::clip(void)
+ ?d_func@QScroller@@ABEPBVQScrollerPrivate@@XZ @ 13495 NONAME ; class QScrollerPrivate const * QScroller::d_func(void) const
+ ?setNumberSuffix@QTextListFormat@@QAEXABVQString@@@Z @ 13496 NONAME ; void QTextListFormat::setNumberSuffix(class QString const &)
+ ?swap@QPicture@@QAEXAAV1@@Z @ 13497 NONAME ; void QPicture::swap(class QPicture &)
+ ?swap@QPainterPath@@QAEXAAV1@@Z @ 13498 NONAME ; void QPainterPath::swap(class QPainterPath &)
+ ??4QStyleOptionRubberBand@@QAEAAV0@ABV0@@Z @ 13499 NONAME ; class QStyleOptionRubberBand & QStyleOptionRubberBand::operator=(class QStyleOptionRubberBand const &)
+ ?minimumSizeHint@QCheckBox@@UBE?AVQSize@@XZ @ 13500 NONAME ; class QSize QCheckBox::minimumSizeHint(void) const
+ ?createExplicitFont@QFontEngine@@UBE?AVQFont@@XZ @ 13501 NONAME ; class QFont QFontEngine::createExplicitFont(void) const
+ ?alphaMapForGlyph@QFontEngine@@UAE?AVQImage@@IUQFixed@@@Z @ 13502 NONAME ; class QImage QFontEngine::alphaMapForGlyph(unsigned int, struct QFixed)
+ ?fillTexture@QImageTextureGlyphCache@@UAEXABUCoord@QTextureGlyphCache@@IUQFixed@@@Z @ 13503 NONAME ; void QImageTextureGlyphCache::fillTexture(struct QTextureGlyphCache::Coord const &, unsigned int, struct QFixed)
+ ?swap@QIcon@@QAEXAAV1@@Z @ 13504 NONAME ; void QIcon::swap(class QIcon &)
+ ?unmarkRasterOverlay@QBlittablePixmapData@@QAEXABVQRectF@@@Z @ 13505 NONAME ; void QBlittablePixmapData::unmarkRasterOverlay(class QRectF const &)
+ ??0QDragResponseEvent@@QAE@ABV0@@Z @ 13506 NONAME ; QDragResponseEvent::QDragResponseEvent(class QDragResponseEvent const &)
+ ??0QIconEngine@@QAE@XZ @ 13507 NONAME ; QIconEngine::QIconEngine(void)
+ ?brushOriginChanged@QBlitterPaintEngine@@UAEXXZ @ 13508 NONAME ; void QBlitterPaintEngine::brushOriginChanged(void)
+ ?openFile@QFileOpenEvent@@QBE_NAAVQFile@@V?$QFlags@W4OpenModeFlag@QIODevice@@@@@Z @ 13509 NONAME ; bool QFileOpenEvent::openFile(class QFile &, class QFlags<enum QIODevice::OpenModeFlag>) const
+ ??_EQBrush@@QAE@I@Z @ 13510 NONAME ; QBrush::~QBrush(unsigned int)
+ ??0QApplicationPrivate@@QAE@AAHPAPADW4Type@QApplication@@H@Z @ 13511 NONAME ; QApplicationPrivate::QApplicationPrivate(int &, char * *, enum QApplication::Type, int)
+ ?handleInput@QScroller@@QAE_NW4Input@1@ABVQPointF@@_J@Z @ 13512 NONAME ; bool QScroller::handleInput(enum QScroller::Input, class QPointF const &, long long)
+ ??8QScrollerProperties@@QBE_NABV0@@Z @ 13513 NONAME ; bool QScrollerProperties::operator==(class QScrollerProperties const &) const
+ ?inFontUcs4@QFontMetrics@@QBE_NI@Z @ 13514 NONAME ; bool QFontMetrics::inFontUcs4(unsigned int) const
+ ??_EQTableWidgetSelectionRange@@QAE@I@Z @ 13515 NONAME ; QTableWidgetSelectionRange::~QTableWidgetSelectionRange(unsigned int)
+ ??4QStyleOptionTabBarBase@@QAEAAV0@ABV0@@Z @ 13516 NONAME ; class QStyleOptionTabBarBase & QStyleOptionTabBarBase::operator=(class QStyleOptionTabBarBase const &)
+ ??0QTextObjectInterface@@QAE@XZ @ 13517 NONAME ; QTextObjectInterface::QTextObjectInterface(void)
+ ?unlock@QBlittable@@QAEXXZ @ 13518 NONAME ; void QBlittable::unlock(void)
+ ?metaObject@QScroller@@UBEPBUQMetaObject@@XZ @ 13519 NONAME ; struct QMetaObject const * QScroller::metaObject(void) const
+ ?d_func@QScrollEvent@@ABEPBVQScrollEventPrivate@@XZ @ 13520 NONAME ; class QScrollEventPrivate const * QScrollEvent::d_func(void) const
+ ?swap@QRegion@@QAEXAAV1@@Z @ 13521 NONAME ; void QRegion::swap(class QRegion &)
+ ??0QHideEvent@@QAE@ABV0@@Z @ 13522 NONAME ; QHideEvent::QHideEvent(class QHideEvent const &)
+ ?ensureVisible@QScroller@@QAEXABVQRectF@@MMH@Z @ 13523 NONAME ; void QScroller::ensureVisible(class QRectF const &, float, float, int)
+ ?qt_metacall@QFlickGesture@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 13524 NONAME ; int QFlickGesture::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?setItemData@QAbstractProxyModel@@UAE_NABVQModelIndex@@ABV?$QMap@HVQVariant@@@@@Z @ 13525 NONAME ; bool QAbstractProxyModel::setItemData(class QModelIndex const &, class QMap<int, class QVariant> const &)
+ ?getStaticMetaObject@QInternalMimeData@@SAABUQMetaObject@@XZ @ 13526 NONAME ; struct QMetaObject const & QInternalMimeData::getStaticMetaObject(void)
+ ?swap@QPolygonF@@QAEXAAV1@@Z @ 13527 NONAME ; void QPolygonF::swap(class QPolygonF &)
+ ?swap@QPolygon@@QAEXAAV1@@Z @ 13528 NONAME ; void QPolygon::swap(class QPolygon &)
+ ??_EQScrollPrepareEvent@@UAE@I@Z @ 13529 NONAME ; QScrollPrepareEvent::~QScrollPrepareEvent(unsigned int)
+ ?d_func@QBlitterPaintEngine@@ABEPBVQBlitterPaintEnginePrivate@@XZ @ 13530 NONAME ; class QBlitterPaintEnginePrivate const * QBlitterPaintEngine::d_func(void) const
+ ?pixelPerMeter@QScroller@@QBE?AVQPointF@@XZ @ 13531 NONAME ; class QPointF QScroller::pixelPerMeter(void) const
+ ?target@QScroller@@QBEPAVQObject@@XZ @ 13532 NONAME ; class QObject * QScroller::target(void) const
+ ?swap@QKeySequence@@QAEXAAV1@@Z @ 13533 NONAME ; void QKeySequence::swap(class QKeySequence &)
+ ??1QGlyphs@@QAE@XZ @ 13534 NONAME ; QGlyphs::~QGlyphs(void)
+ ?lineHeight@QTextBlockFormat@@QBEMXZ @ 13535 NONAME ; float QTextBlockFormat::lineHeight(void) const
+ ?stroke@QBlitterPaintEngine@@UAEXABVQVectorPath@@ABVQPen@@@Z @ 13536 NONAME ; void QBlitterPaintEngine::stroke(class QVectorPath const &, class QPen const &)
+ ?tr@QInternalMimeData@@SA?AVQString@@PBD0@Z @ 13537 NONAME ; class QString QInternalMimeData::tr(char const *, char const *)
+ ??9QGlyphs@@QBE_NABV0@@Z @ 13538 NONAME ; bool QGlyphs::operator!=(class QGlyphs const &) const
+ ??1QBlittable@@UAE@XZ @ 13539 NONAME ; QBlittable::~QBlittable(void)
+ ??_EQBlitterPaintEngine@@UAE@I@Z @ 13540 NONAME ; QBlitterPaintEngine::~QBlitterPaintEngine(unsigned int)
+ ??0QCloseEvent@@QAE@ABV0@@Z @ 13541 NONAME ; QCloseEvent::QCloseEvent(class QCloseEvent const &)
+ ?grabbedGesture@QScroller@@SA?AW4GestureType@Qt@@PAVQObject@@@Z @ 13542 NONAME ; enum Qt::GestureType QScroller::grabbedGesture(class QObject *)
+ ?buffer@QBlittablePixmapData@@UAEPAVQImage@@XZ @ 13543 NONAME ; class QImage * QBlittablePixmapData::buffer(void)
+ ??0QTextFrameLayoutData@@QAE@XZ @ 13544 NONAME ; QTextFrameLayoutData::QTextFrameLayoutData(void)
+ ?staticMetaObject@QFlickGesture@@2UQMetaObject@@B @ 13545 NONAME ; struct QMetaObject const QFlickGesture::staticMetaObject
+ ?finalPosition@QScroller@@QBE?AVQPointF@@XZ @ 13546 NONAME ; class QPointF QScroller::finalPosition(void) const
+ ??4QStyleOptionTabWidgetFrameV2@@QAEAAV0@ABV0@@Z @ 13547 NONAME ; class QStyleOptionTabWidgetFrameV2 & QStyleOptionTabWidgetFrameV2::operator=(class QStyleOptionTabWidgetFrameV2 const &)
+ ?drawStaticTextItem@QBlitterPaintEngine@@UAEXPAVQStaticTextItem@@@Z @ 13548 NONAME ; void QBlitterPaintEngine::drawStaticTextItem(class QStaticTextItem *)
+ ??0QGlyphs@@QAE@ABV0@@Z @ 13549 NONAME ; QGlyphs::QGlyphs(class QGlyphs const &)
+ ?lock@QBlittable@@QAEPAVQImage@@XZ @ 13550 NONAME ; class QImage * QBlittable::lock(void)
+ ?setFontHintingPreference@QTextCharFormat@@QAEXW4HintingPreference@QFont@@@Z @ 13551 NONAME ; void QTextCharFormat::setFontHintingPreference(enum QFont::HintingPreference)
+ ??4QStyleOptionTabV2@@QAEAAV0@ABV0@@Z @ 13552 NONAME ; class QStyleOptionTabV2 & QStyleOptionTabV2::operator=(class QStyleOptionTabV2 const &)
+ ??_EQInternalMimeData@@UAE@I@Z @ 13553 NONAME ; QInternalMimeData::~QInternalMimeData(unsigned int)
+ ??4QTextListFormat@@QAEAAV0@ABV0@@Z @ 13554 NONAME ; class QTextListFormat & QTextListFormat::operator=(class QTextListFormat const &)
+ ??_EQPalette@@QAE@I@Z @ 13555 NONAME ; QPalette::~QPalette(unsigned int)
+ ??0QFocusEvent@@QAE@ABV0@@Z @ 13556 NONAME ; QFocusEvent::QFocusEvent(class QFocusEvent const &)
+ ??4QStyleOptionQ3ListViewItem@@QAEAAV0@ABV0@@Z @ 13557 NONAME ; class QStyleOptionQ3ListViewItem & QStyleOptionQ3ListViewItem::operator=(class QStyleOptionQ3ListViewItem const &)
+ ?markRasterOverlay@QBlittablePixmapData@@QAEXABVQPointF@@ABVQTextItem@@@Z @ 13558 NONAME ; void QBlittablePixmapData::markRasterOverlay(class QPointF const &, class QTextItem const &)
+ ?trUtf8@QScroller@@SA?AVQString@@PBD0@Z @ 13559 NONAME ; class QString QScroller::trUtf8(char const *, char const *)
+ ??_EQIcon@@QAE@I@Z @ 13560 NONAME ; QIcon::~QIcon(unsigned int)
+ ??YQGlyphs@@AAEAAV0@ABV0@@Z @ 13561 NONAME ; class QGlyphs & QGlyphs::operator+=(class QGlyphs const &)
+ ??9QScrollerProperties@@QBE_NABV0@@Z @ 13562 NONAME ; bool QScrollerProperties::operator!=(class QScrollerProperties const &) const
+ ??0QTextListFormat@@QAE@ABV0@@Z @ 13563 NONAME ; QTextListFormat::QTextListFormat(class QTextListFormat const &)
+ ?drawEllipse@QBlitterPaintEngine@@UAEXABVQRectF@@@Z @ 13564 NONAME ; void QBlitterPaintEngine::drawEllipse(class QRectF const &)
+ ??0QGuiPlatformPluginInterface@@QAE@XZ @ 13565 NONAME ; QGuiPlatformPluginInterface::QGuiPlatformPluginInterface(void)
+ ??_EQTextLayout@@QAE@I@Z @ 13566 NONAME ; QTextLayout::~QTextLayout(unsigned int)
+ ??0QWheelEvent@@QAE@ABV0@@Z @ 13567 NONAME ; QWheelEvent::QWheelEvent(class QWheelEvent const &)
+ ?blittable@QBlittablePixmapData@@QBEPAVQBlittable@@XZ @ 13568 NONAME ; class QBlittable * QBlittablePixmapData::blittable(void) const
+ ?resizeCache@QTextureGlyphCache@@QAEXHH@Z @ 13569 NONAME ; void QTextureGlyphCache::resizeCache(int, int)
+ ??0QScrollerProperties@@QAE@ABV0@@Z @ 13570 NONAME ; QScrollerProperties::QScrollerProperties(class QScrollerProperties const &)
+ ??0QWindowStateChangeEvent@@QAE@ABV0@@Z @ 13571 NONAME ; QWindowStateChangeEvent::QWindowStateChangeEvent(class QWindowStateChangeEvent const &)
+ ?metaObject@QInternalMimeData@@UBEPBUQMetaObject@@XZ @ 13572 NONAME ; struct QMetaObject const * QInternalMimeData::metaObject(void) const
+ ?setContentPos@QScrollPrepareEvent@@QAEXABVQPointF@@@Z @ 13573 NONAME ; void QScrollPrepareEvent::setContentPos(class QPointF const &)
+ ??_EQTextEngine@@QAE@I@Z @ 13574 NONAME ; QTextEngine::~QTextEngine(unsigned int)
+ ??4QStyleOptionTitleBar@@QAEAAV0@ABV0@@Z @ 13575 NONAME ; class QStyleOptionTitleBar & QStyleOptionTitleBar::operator=(class QStyleOptionTitleBar const &)
+ ??4Value@QCss@@QAEAAU01@ABU01@@Z @ 13576 NONAME ; struct QCss::Value & QCss::Value::operator=(struct QCss::Value const &)
+ ?staticMetaObject@QScroller@@2UQMetaObject@@B @ 13577 NONAME ; struct QMetaObject const QScroller::staticMetaObject
+ ?hasFormatHelper@QInternalMimeData@@SA_NABVQString@@PBVQMimeData@@@Z @ 13578 NONAME ; bool QInternalMimeData::hasFormatHelper(class QString const &, class QMimeData const *)
+ ?state@QBlitterPaintEngine@@QAEPAVQPainterState@@XZ @ 13579 NONAME ; class QPainterState * QBlitterPaintEngine::state(void)
+ ?penChanged@QBlitterPaintEngine@@UAEXXZ @ 13580 NONAME ; void QBlitterPaintEngine::penChanged(void)
+ ??0QFileOpenEvent@@QAE@ABVRFile@@@Z @ 13581 NONAME ; QFileOpenEvent::QFileOpenEvent(class RFile const &)
+ ?hasHeightForWidth@QWidgetPrivate@@UBE_NXZ @ 13582 NONAME ; bool QWidgetPrivate::hasHeightForWidth(void) const
+ ??0QDragLeaveEvent@@QAE@ABV0@@Z @ 13583 NONAME ; QDragLeaveEvent::QDragLeaveEvent(class QDragLeaveEvent const &)
+ ?toImage@QBlittablePixmapData@@UBE?AVQImage@@XZ @ 13584 NONAME ; class QImage QBlittablePixmapData::toImage(void) const
+ ??_EQBlittable@@UAE@I@Z @ 13585 NONAME ; QBlittable::~QBlittable(unsigned int)
+ ??4QBitmap@@QAEAAV0@ABV0@@Z @ 13586 NONAME ; class QBitmap & QBitmap::operator=(class QBitmap const &)
+ ??1QInternalMimeData@@UAE@XZ @ 13587 NONAME ; QInternalMimeData::~QInternalMimeData(void)
+ ??0QItemSelection@@QAE@ABV0@@Z @ 13588 NONAME ; QItemSelection::QItemSelection(class QItemSelection const &)
+ ?qt_addBitmapToPath@@YAXMMPBEHHHPAVQPainterPath@@@Z @ 13589 NONAME ; void qt_addBitmapToPath(float, float, unsigned char const *, int, int, int, class QPainterPath *)
+ ?staticMetaObject@QInternalMimeData@@2UQMetaObject@@B @ 13590 NONAME ; struct QMetaObject const QInternalMimeData::staticMetaObject
+ ?activeScrollers@QScroller@@SA?AV?$QList@PAVQScroller@@@@XZ @ 13591 NONAME ; class QList<class QScroller *> QScroller::activeScrollers(void)
+ ?drawGlyphs@QPainter@@QAEXABVQPointF@@ABVQGlyphs@@@Z @ 13592 NONAME ; void QPainter::drawGlyphs(class QPointF const &, class QGlyphs const &)
+ ??4QTextFrameFormat@@QAEAAV0@ABV0@@Z @ 13593 NONAME ; class QTextFrameFormat & QTextFrameFormat::operator=(class QTextFrameFormat const &)
diff --git a/src/s60installs/bwins/QtOpenGLu.def b/src/s60installs/bwins/QtOpenGLu.def
index d16ff06..f1db022 100644
--- a/src/s60installs/bwins/QtOpenGLu.def
+++ b/src/s60installs/bwins/QtOpenGLu.def
@@ -703,134 +703,161 @@ EXPORTS
?maxTextureWidth@QGLTextureGlyphCache@@UBEHXZ @ 702 NONAME ; int QGLTextureGlyphCache::maxTextureWidth(void) const
?filterMode@QGLTextureGlyphCache@@QBE?AW4FilterMode@1@XZ @ 703 NONAME ; enum QGLTextureGlyphCache::FilterMode QGLTextureGlyphCache::filterMode(void) const
?setFilterMode@QGLTextureGlyphCache@@QAEXW4FilterMode@1@@Z @ 704 NONAME ; void QGLTextureGlyphCache::setFilterMode(enum QGLTextureGlyphCache::FilterMode)
- ?glVertexAttrib3f@QGLFunctions@@QAEXIMMM@Z @ 705 NONAME ; void QGLFunctions::glVertexAttrib3f(unsigned int, float, float, float)
- ?glVertexAttrib1fv@QGLFunctions@@QAEXIPBM@Z @ 706 NONAME ; void QGLFunctions::glVertexAttrib1fv(unsigned int, float const *)
- ?glIsBuffer@QGLFunctions@@QAEEI@Z @ 707 NONAME ; unsigned char QGLFunctions::glIsBuffer(unsigned int)
- ?glGetActiveAttrib@QGLFunctions@@QAEXIIHPAH0PAIPAD@Z @ 708 NONAME ; void QGLFunctions::glGetActiveAttrib(unsigned int, unsigned int, int, int *, int *, unsigned int *, char *)
- ?glBindFramebuffer@QGLFunctions@@QAEXII@Z @ 709 NONAME ; void QGLFunctions::glBindFramebuffer(unsigned int, unsigned int)
- ?glBufferData@QGLFunctions@@QAEXIHPBXI@Z @ 710 NONAME ; void QGLFunctions::glBufferData(unsigned int, int, void const *, unsigned int)
- ?glValidateProgram@QGLFunctions@@QAEXI@Z @ 711 NONAME ; void QGLFunctions::glValidateProgram(unsigned int)
- ?glUniform1f@QGLFunctions@@QAEXHM@Z @ 712 NONAME ; void QGLFunctions::glUniform1f(int, float)
- ?glDetachShader@QGLFunctions@@QAEXII@Z @ 713 NONAME ; void QGLFunctions::glDetachShader(unsigned int, unsigned int)
- ?glDeleteProgram@QGLFunctions@@QAEXI@Z @ 714 NONAME ; void QGLFunctions::glDeleteProgram(unsigned int)
- ??_EQGLContextResourceBase@@UAE@I@Z @ 715 NONAME ; QGLContextResourceBase::~QGLContextResourceBase(unsigned int)
- ?glUniform2f@QGLFunctions@@QAEXHMM@Z @ 716 NONAME ; void QGLFunctions::glUniform2f(int, float, float)
- ?glIsProgram@QGLFunctions@@QAEEI@Z @ 717 NONAME ; unsigned char QGLFunctions::glIsProgram(unsigned int)
- ?openGLFeatures@QGLFunctions@@QBE?AV?$QFlags@W4OpenGLFeature@QGLFunctions@@@@XZ @ 718 NONAME ; class QFlags<enum QGLFunctions::OpenGLFeature> QGLFunctions::openGLFeatures(void) const
- ?toNativeType@QGLPixmapData@@UAEPAXW4NativeType@QPixmapData@@@Z @ 719 NONAME ; void * QGLPixmapData::toNativeType(enum QPixmapData::NativeType)
- ?glReleaseShaderCompiler@QGLFunctions@@QAEXXZ @ 720 NONAME ; void QGLFunctions::glReleaseShaderCompiler(void)
- ??0QGLTextureGlyphCache@@QAE@PBVQGLContext@@W4Type@QFontEngineGlyphCache@@ABVQTransform@@@Z @ 721 NONAME ; QGLTextureGlyphCache::QGLTextureGlyphCache(class QGLContext const *, enum QFontEngineGlyphCache::Type, class QTransform const &)
- ?context@QGLTextureGlyphCache@@QBEPBVQGLContext@@XZ @ 722 NONAME ; class QGLContext const * QGLTextureGlyphCache::context(void) const
- ?glGenRenderbuffers@QGLFunctions@@QAEXHPAI@Z @ 723 NONAME ; void QGLFunctions::glGenRenderbuffers(int, unsigned int *)
- ?glBindBuffer@QGLFunctions@@QAEXII@Z @ 724 NONAME ; void QGLFunctions::glBindBuffer(unsigned int, unsigned int)
- ?glUniformMatrix3fv@QGLFunctions@@QAEXHHEPBM@Z @ 725 NONAME ; void QGLFunctions::glUniformMatrix3fv(int, int, unsigned char, float const *)
- ?glGenerateMipmap@QGLFunctions@@QAEXI@Z @ 726 NONAME ; void QGLFunctions::glGenerateMipmap(unsigned int)
- ?hasOpenGLFeature@QGLFunctions@@QBE_NW4OpenGLFeature@1@@Z @ 727 NONAME ; bool QGLFunctions::hasOpenGLFeature(enum QGLFunctions::OpenGLFeature) const
- ?glGetAttachedShaders@QGLFunctions@@QAEXIHPAHPAI@Z @ 728 NONAME ; void QGLFunctions::glGetAttachedShaders(unsigned int, int, int *, unsigned int *)
- ?glDeleteShader@QGLFunctions@@QAEXI@Z @ 729 NONAME ; void QGLFunctions::glDeleteShader(unsigned int)
- ?glLinkProgram@QGLFunctions@@QAEXI@Z @ 730 NONAME ; void QGLFunctions::glLinkProgram(unsigned int)
- ?glUseProgram@QGLFunctions@@QAEXI@Z @ 731 NONAME ; void QGLFunctions::glUseProgram(unsigned int)
- ??0QGLFunctions@@QAE@PBVQGLContext@@@Z @ 732 NONAME ; QGLFunctions::QGLFunctions(class QGLContext const *)
- ?glGetBufferParameteriv@QGLFunctions@@QAEXIIPAH@Z @ 733 NONAME ; void QGLFunctions::glGetBufferParameteriv(unsigned int, unsigned int, int *)
- ?glGenBuffers@QGLFunctions@@QAEXHPAI@Z @ 734 NONAME ; void QGLFunctions::glGenBuffers(int, unsigned int *)
- ?glGetShaderiv@QGLFunctions@@QAEXIIPAH@Z @ 735 NONAME ; void QGLFunctions::glGetShaderiv(unsigned int, unsigned int, int *)
- ?fillTexture@QGLTextureGlyphCache@@UAEXABUCoord@QTextureGlyphCache@@IUQFixed@@@Z @ 736 NONAME ; void QGLTextureGlyphCache::fillTexture(struct QTextureGlyphCache::Coord const &, unsigned int, struct QFixed)
- ?glUniform2fv@QGLFunctions@@QAEXHHPBM@Z @ 737 NONAME ; void QGLFunctions::glUniform2fv(int, int, float const *)
- ?fromNativeType@QGLPixmapData@@UAEXPAXW4NativeType@QPixmapData@@@Z @ 738 NONAME ; void QGLPixmapData::fromNativeType(void *, enum QPixmapData::NativeType)
- ??0QGLContextGroupResourceBase@@QAE@XZ @ 739 NONAME ; QGLContextGroupResourceBase::QGLContextGroupResourceBase(void)
- ?glGetFramebufferAttachmentParameteriv@QGLFunctions@@QAEXIIIPAH@Z @ 740 NONAME ; void QGLFunctions::glGetFramebufferAttachmentParameteriv(unsigned int, unsigned int, unsigned int, int *)
- ?cleanup@QGLContextGroupResourceBase@@QAEXPBVQGLContext@@PAX@Z @ 741 NONAME ; void QGLContextGroupResourceBase::cleanup(class QGLContext const *, void *)
- ?glUniform2iv@QGLFunctions@@QAEXHHPBH@Z @ 742 NONAME ; void QGLFunctions::glUniform2iv(int, int, int const *)
- ?glCompileShader@QGLFunctions@@QAEXI@Z @ 743 NONAME ; void QGLFunctions::glCompileShader(unsigned int)
- ?isFlipped@QGLPaintDevice@@UBE_NXZ @ 744 NONAME ; bool QGLPaintDevice::isFlipped(void) const
- ?glGetProgramiv@QGLFunctions@@QAEXIIPAH@Z @ 745 NONAME ; void QGLFunctions::glGetProgramiv(unsigned int, unsigned int, int *)
- ?glClearDepthf@QGLFunctions@@QAEXM@Z @ 746 NONAME ; void QGLFunctions::glClearDepthf(float)
- ?glIsFramebuffer@QGLFunctions@@QAEEI@Z @ 747 NONAME ; unsigned char QGLFunctions::glIsFramebuffer(unsigned int)
- ?glUniform4f@QGLFunctions@@QAEXHMMMM@Z @ 748 NONAME ; void QGLFunctions::glUniform4f(int, float, float, float, float)
- ?glUniform3f@QGLFunctions@@QAEXHMMM@Z @ 749 NONAME ; void QGLFunctions::glUniform3f(int, float, float, float)
- ?glDeleteRenderbuffers@QGLFunctions@@QAEXHPBI@Z @ 750 NONAME ; void QGLFunctions::glDeleteRenderbuffers(int, unsigned int const *)
- ?glVertexAttrib1f@QGLFunctions@@QAEXIM@Z @ 751 NONAME ; void QGLFunctions::glVertexAttrib1f(unsigned int, float)
- ?glVertexAttrib4f@QGLFunctions@@QAEXIMMMM@Z @ 752 NONAME ; void QGLFunctions::glVertexAttrib4f(unsigned int, float, float, float, float)
- ?glSampleCoverage@QGLFunctions@@QAEXME@Z @ 753 NONAME ; void QGLFunctions::glSampleCoverage(float, unsigned char)
- ?glGetActiveUniform@QGLFunctions@@QAEXIIHPAH0PAIPAD@Z @ 754 NONAME ; void QGLFunctions::glGetActiveUniform(unsigned int, unsigned int, int, int *, int *, unsigned int *, char *)
- ??_EQGLContextGroupResourceBase@@UAE@I@Z @ 755 NONAME ; QGLContextGroupResourceBase::~QGLContextGroupResourceBase(unsigned int)
- ?glStencilOpSeparate@QGLFunctions@@QAEXIIII@Z @ 756 NONAME ; void QGLFunctions::glStencilOpSeparate(unsigned int, unsigned int, unsigned int, unsigned int)
- ?glCheckFramebufferStatus@QGLFunctions@@QAEII@Z @ 757 NONAME ; unsigned int QGLFunctions::glCheckFramebufferStatus(unsigned int)
- ?glDepthRangef@QGLFunctions@@QAEXMM@Z @ 758 NONAME ; void QGLFunctions::glDepthRangef(float, float)
- ??1QGLFunctions@@QAE@XZ @ 759 NONAME ; QGLFunctions::~QGLFunctions(void)
- ?glStencilMaskSeparate@QGLFunctions@@QAEXII@Z @ 760 NONAME ; void QGLFunctions::glStencilMaskSeparate(unsigned int, unsigned int)
- ?glBlendColor@QGLFunctions@@QAEXMMMM@Z @ 761 NONAME ; void QGLFunctions::glBlendColor(float, float, float, float)
- ?glUniform1fv@QGLFunctions@@QAEXHHPBM@Z @ 762 NONAME ; void QGLFunctions::glUniform1fv(int, int, float const *)
- ??1QGLContextResourceBase@@UAE@XZ @ 763 NONAME ; QGLContextResourceBase::~QGLContextResourceBase(void)
- ?glCreateProgram@QGLFunctions@@QAEIXZ @ 764 NONAME ; unsigned int QGLFunctions::glCreateProgram(void)
- ?glVertexAttrib2f@QGLFunctions@@QAEXIMM@Z @ 765 NONAME ; void QGLFunctions::glVertexAttrib2f(unsigned int, float, float)
- ?glUniformMatrix2fv@QGLFunctions@@QAEXHHEPBM@Z @ 766 NONAME ; void QGLFunctions::glUniformMatrix2fv(int, int, unsigned char, float const *)
- ?glBufferSubData@QGLFunctions@@QAEXIHHPBX@Z @ 767 NONAME ; void QGLFunctions::glBufferSubData(unsigned int, int, int, void const *)
- ?glUniform1iv@QGLFunctions@@QAEXHHPBH@Z @ 768 NONAME ; void QGLFunctions::glUniform1iv(int, int, int const *)
- ?qt_resolve_buffer_extensions@@YA_NPAVQGLContext@@@Z @ 769 NONAME ; bool qt_resolve_buffer_extensions(class QGLContext *)
- ?glUniform1i@QGLFunctions@@QAEXHH@Z @ 770 NONAME ; void QGLFunctions::glUniform1i(int, int)
- ?glVertexAttrib4fv@QGLFunctions@@QAEXIPBM@Z @ 771 NONAME ; void QGLFunctions::glVertexAttrib4fv(unsigned int, float const *)
- ?glDeleteFramebuffers@QGLFunctions@@QAEXHPBI@Z @ 772 NONAME ; void QGLFunctions::glDeleteFramebuffers(int, unsigned int const *)
- ?glGetVertexAttribfv@QGLFunctions@@QAEXIIPAM@Z @ 773 NONAME ; void QGLFunctions::glGetVertexAttribfv(unsigned int, unsigned int, float *)
- ?glGetProgramInfoLog@QGLFunctions@@QAEXIHPAHPAD@Z @ 774 NONAME ; void QGLFunctions::glGetProgramInfoLog(unsigned int, int, int *, char *)
- ?glGetShaderInfoLog@QGLFunctions@@QAEXIHPAHPAD@Z @ 775 NONAME ; void QGLFunctions::glGetShaderInfoLog(unsigned int, int, int *, char *)
- ?glEnableVertexAttribArray@QGLFunctions@@QAEXI@Z @ 776 NONAME ; void QGLFunctions::glEnableVertexAttribArray(unsigned int)
- ?glGetVertexAttribiv@QGLFunctions@@QAEXIIPAH@Z @ 777 NONAME ; void QGLFunctions::glGetVertexAttribiv(unsigned int, unsigned int, int *)
- ?swapBehavior@QGLWindowSurface@@2W4SwapMode@1@A @ 778 NONAME ; enum QGLWindowSurface::SwapMode QGLWindowSurface::swapBehavior
- ?glCompressedTexImage2D@QGLFunctions@@QAEXIHIHHHHPBX@Z @ 779 NONAME ; void QGLFunctions::glCompressedTexImage2D(unsigned int, int, unsigned int, int, int, int, int, void const *)
- ?glGetAttribLocation@QGLFunctions@@QAEHIPBD@Z @ 780 NONAME ; int QGLFunctions::glGetAttribLocation(unsigned int, char const *)
- ?glActiveTexture@QGLFunctions@@QAEXI@Z @ 781 NONAME ; void QGLFunctions::glActiveTexture(unsigned int)
- ?glUniform4fv@QGLFunctions@@QAEXHHPBM@Z @ 782 NONAME ; void QGLFunctions::glUniform4fv(int, int, float const *)
- ?glCreateShader@QGLFunctions@@QAEII@Z @ 783 NONAME ; unsigned int QGLFunctions::glCreateShader(unsigned int)
- ?glAttachShader@QGLFunctions@@QAEXII@Z @ 784 NONAME ; void QGLFunctions::glAttachShader(unsigned int, unsigned int)
- ?glRenderbufferStorage@QGLFunctions@@QAEXIIHH@Z @ 785 NONAME ; void QGLFunctions::glRenderbufferStorage(unsigned int, unsigned int, int, int)
- ?glVertexAttribPointer@QGLFunctions@@QAEXIHIEHPBX@Z @ 786 NONAME ; void QGLFunctions::glVertexAttribPointer(unsigned int, int, unsigned int, unsigned char, int, void const *)
- ?glUniform4iv@QGLFunctions@@QAEXHHPBH@Z @ 787 NONAME ; void QGLFunctions::glUniform4iv(int, int, int const *)
- ?glDisableVertexAttribArray@QGLFunctions@@QAEXI@Z @ 788 NONAME ; void QGLFunctions::glDisableVertexAttribArray(unsigned int)
- ?glIsShader@QGLFunctions@@QAEEI@Z @ 789 NONAME ; unsigned char QGLFunctions::glIsShader(unsigned int)
- ?glShaderBinary@QGLFunctions@@QAEXHPBIIPBXH@Z @ 790 NONAME ; void QGLFunctions::glShaderBinary(int, unsigned int const *, unsigned int, void const *, int)
- ?glGenFramebuffers@QGLFunctions@@QAEXHPAI@Z @ 791 NONAME ; void QGLFunctions::glGenFramebuffers(int, unsigned int *)
- ?glVertexAttrib3fv@QGLFunctions@@QAEXIPBM@Z @ 792 NONAME ; void QGLFunctions::glVertexAttrib3fv(unsigned int, float const *)
- ?glGetVertexAttribPointerv@QGLFunctions@@QAEXIIPAPAX@Z @ 793 NONAME ; void QGLFunctions::glGetVertexAttribPointerv(unsigned int, unsigned int, void * *)
- ?glUniformMatrix4fv@QGLFunctions@@QAEXHHEPBM@Z @ 794 NONAME ; void QGLFunctions::glUniformMatrix4fv(int, int, unsigned char, float const *)
- ?setContext@QGLTextureGlyphCache@@QAEXPBVQGLContext@@@Z @ 795 NONAME ; void QGLTextureGlyphCache::setContext(class QGLContext const *)
- ?glDeleteBuffers@QGLFunctions@@QAEXHPBI@Z @ 796 NONAME ; void QGLFunctions::glDeleteBuffers(int, unsigned int const *)
- ?glBindRenderbuffer@QGLFunctions@@QAEXII@Z @ 797 NONAME ; void QGLFunctions::glBindRenderbuffer(unsigned int, unsigned int)
- ?glStencilFuncSeparate@QGLFunctions@@QAEXIIHI@Z @ 798 NONAME ; void QGLFunctions::glStencilFuncSeparate(unsigned int, unsigned int, int, unsigned int)
- ?createPixmapForImage@QGLPixmapData@@AAEXAAVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@_N@Z @ 799 NONAME ; void QGLPixmapData::createPixmapForImage(class QImage &, class QFlags<enum Qt::ImageConversionFlag>, bool)
- ?glGetUniformLocation@QGLFunctions@@QAEHIPBD@Z @ 800 NONAME ; int QGLFunctions::glGetUniformLocation(unsigned int, char const *)
- ?glGetRenderbufferParameteriv@QGLFunctions@@QAEXIIPAH@Z @ 801 NONAME ; void QGLFunctions::glGetRenderbufferParameteriv(unsigned int, unsigned int, int *)
- ?glBindAttribLocation@QGLFunctions@@QAEXIIPBD@Z @ 802 NONAME ; void QGLFunctions::glBindAttribLocation(unsigned int, unsigned int, char const *)
- ?glGetShaderSource@QGLFunctions@@QAEXIHPAHPAD@Z @ 803 NONAME ; void QGLFunctions::glGetShaderSource(unsigned int, int, int *, char *)
- ?setMipmap@QGLFramebufferObjectFormat@@QAEX_N@Z @ 804 NONAME ; void QGLFramebufferObjectFormat::setMipmap(bool)
- ??1QGLContextGroupResourceBase@@UAE@XZ @ 805 NONAME ; QGLContextGroupResourceBase::~QGLContextGroupResourceBase(void)
- ?glFramebufferTexture2D@QGLFunctions@@QAEXIIIIH@Z @ 806 NONAME ; void QGLFunctions::glFramebufferTexture2D(unsigned int, unsigned int, unsigned int, unsigned int, int)
- ?glBlendEquationSeparate@QGLFunctions@@QAEXII@Z @ 807 NONAME ; void QGLFunctions::glBlendEquationSeparate(unsigned int, unsigned int)
- ?insert@QGLContextResourceBase@@QAEXPBVQGLContext@@PAX@Z @ 808 NONAME ; void QGLContextResourceBase::insert(class QGLContext const *, void *)
- ?glUniform2i@QGLFunctions@@QAEXHHH@Z @ 809 NONAME ; void QGLFunctions::glUniform2i(int, int, int)
- ?glGetUniformfv@QGLFunctions@@QAEXIHPAM@Z @ 810 NONAME ; void QGLFunctions::glGetUniformfv(unsigned int, int, float *)
- ?glUniform3i@QGLFunctions@@QAEXHHHH@Z @ 811 NONAME ; void QGLFunctions::glUniform3i(int, int, int, int)
- ?glIsRenderbuffer@QGLFunctions@@QAEEI@Z @ 812 NONAME ; unsigned char QGLFunctions::glIsRenderbuffer(unsigned int)
- ?initializeGLFunctions@QGLFunctions@@QAEXPBVQGLContext@@@Z @ 813 NONAME ; void QGLFunctions::initializeGLFunctions(class QGLContext const *)
- ??0QGLFunctions@@QAE@XZ @ 814 NONAME ; QGLFunctions::QGLFunctions(void)
- ?glVertexAttrib2fv@QGLFunctions@@QAEXIPBM@Z @ 815 NONAME ; void QGLFunctions::glVertexAttrib2fv(unsigned int, float const *)
- ?isInitialized@QGLFunctions@@CA_NPBUQGLFunctionsPrivate@@@Z @ 816 NONAME ; bool QGLFunctions::isInitialized(struct QGLFunctionsPrivate const *)
- ?glGetUniformiv@QGLFunctions@@QAEXIHPAH@Z @ 817 NONAME ; void QGLFunctions::glGetUniformiv(unsigned int, int, int *)
- ?glBlendEquation@QGLFunctions@@QAEXI@Z @ 818 NONAME ; void QGLFunctions::glBlendEquation(unsigned int)
- ?glFramebufferRenderbuffer@QGLFunctions@@QAEXIIII@Z @ 819 NONAME ; void QGLFunctions::glFramebufferRenderbuffer(unsigned int, unsigned int, unsigned int, unsigned int)
- ?glUniform4i@QGLFunctions@@QAEXHHHHH@Z @ 820 NONAME ; void QGLFunctions::glUniform4i(int, int, int, int, int)
- ?glUniform3fv@QGLFunctions@@QAEXHHPBM@Z @ 821 NONAME ; void QGLFunctions::glUniform3fv(int, int, float const *)
- ?value@QGLContextResourceBase@@QAEPAXPBVQGLContext@@@Z @ 822 NONAME ; void * QGLContextResourceBase::value(class QGLContext const *)
- ?glBlendFuncSeparate@QGLFunctions@@QAEXIIII@Z @ 823 NONAME ; void QGLFunctions::glBlendFuncSeparate(unsigned int, unsigned int, unsigned int, unsigned int)
- ?glCompressedTexSubImage2D@QGLFunctions@@QAEXIHHHHHIHPBX@Z @ 824 NONAME ; void QGLFunctions::glCompressedTexSubImage2D(unsigned int, int, int, int, int, int, unsigned int, int, void const *)
- ?freeResource@QGLTextureGlyphCache@@UAEXPAX@Z @ 825 NONAME ; void QGLTextureGlyphCache::freeResource(void *)
- ?value@QGLContextGroupResourceBase@@QAEPAXPBVQGLContext@@@Z @ 826 NONAME ; void * QGLContextGroupResourceBase::value(class QGLContext const *)
- ?glUniform3iv@QGLFunctions@@QAEXHHPBH@Z @ 827 NONAME ; void QGLFunctions::glUniform3iv(int, int, int const *)
- ?mipmap@QGLFramebufferObjectFormat@@QBE_NXZ @ 828 NONAME ; bool QGLFramebufferObjectFormat::mipmap(void) const
- ?serialNumber@QGLTextureGlyphCache@@QBEHXZ @ 829 NONAME ; int QGLTextureGlyphCache::serialNumber(void) const
- ?fromImageReader@QGLPixmapData@@UAEXPAVQImageReader@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 830 NONAME ; void QGLPixmapData::fromImageReader(class QImageReader *, class QFlags<enum Qt::ImageConversionFlag>)
- ?qt_extensionFuncs@QGLContextPrivate@@2UQGLExtensionFuncs@@A @ 831 NONAME ; struct QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs
- ?glShaderSource@QGLFunctions@@QAEXIHPAPBDPBH@Z @ 832 NONAME ; void QGLFunctions::glShaderSource(unsigned int, int, char const * *, int const *)
- ?glGetShaderPrecisionFormat@QGLFunctions@@QAEXIIPAH0@Z @ 833 NONAME ; void QGLFunctions::glGetShaderPrecisionFormat(unsigned int, unsigned int, int *, int *)
- ?insert@QGLContextGroupResourceBase@@QAEXPBVQGLContext@@PAX@Z @ 834 NONAME ; void QGLContextGroupResourceBase::insert(class QGLContext const *, void *)
+ ?toNativeType@QGLPixmapData@@UAEPAXW4NativeType@QPixmapData@@@Z @ 705 NONAME ; void * QGLPixmapData::toNativeType(enum QPixmapData::NativeType)
+ ?fromNativeType@QGLPixmapData@@UAEXPAXW4NativeType@QPixmapData@@@Z @ 706 NONAME ; void QGLPixmapData::fromNativeType(void *, enum QPixmapData::NativeType)
+ ?clear@QGLTextureGlyphCache@@QAEXXZ @ 707 NONAME ; void QGLTextureGlyphCache::clear(void)
+ ?context@QGLTextureGlyphCache@@QBEPAVQGLContext@@XZ @ 708 NONAME ABSENT ; class QGLContext * QGLTextureGlyphCache::context(void) const
+ ?swapBehavior@QGLWindowSurface@@2W4SwapMode@1@A @ 709 NONAME ; enum QGLWindowSurface::SwapMode QGLWindowSurface::swapBehavior
+ ?createPixmapForImage@QGLPixmapData@@AAEXAAVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@_N@Z @ 710 NONAME ; void QGLPixmapData::createPixmapForImage(class QImage &, class QFlags<enum Qt::ImageConversionFlag>, bool)
+ ?fromImageReader@QGLPixmapData@@UAEXPAVQImageReader@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 711 NONAME ; void QGLPixmapData::fromImageReader(class QImageReader *, class QFlags<enum Qt::ImageConversionFlag>)
+ ?setContext@QGLTextureGlyphCache@@QAEXPAVQGLContext@@@Z @ 712 NONAME ABSENT ; void QGLTextureGlyphCache::setContext(class QGLContext *)
+ ?hibernate@QGLPixmapData@@QAEXXZ @ 713 NONAME ; void QGLPixmapData::hibernate(void)
+ ?detachTextureFromPool@QGLPixmapData@@QAEXXZ @ 714 NONAME ; void QGLPixmapData::detachTextureFromPool(void)
+ ?reclaimTexture@QGLPixmapData@@QAEXXZ @ 715 NONAME ; void QGLPixmapData::reclaimTexture(void)
+ ?destroyTexture@QGLPixmapData@@QAEXXZ @ 716 NONAME ; void QGLPixmapData::destroyTexture(void)
+ ?releaseCachedResources@QGLGraphicsSystem@@UAEXXZ @ 717 NONAME ; void QGLGraphicsSystem::releaseCachedResources(void)
+ ?serialNumber@QGLTextureGlyphCache@@QBEHXZ @ 718 NONAME ; int QGLTextureGlyphCache::serialNumber(void) const
+ ?forceToImage@QGLPixmapData@@QAEXXZ @ 719 NONAME ; void QGLPixmapData::forceToImage(void)
+ ?idealFormat@QGLPixmapData@@QAE?AW4Format@QImage@@AAV3@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 720 NONAME ; enum QImage::Format QGLPixmapData::idealFormat(class QImage &, class QFlags<enum Qt::ImageConversionFlag>)
+ ?releaseNativeImageHandle@QGLPixmapData@@QAEXXZ @ 721 NONAME ; void QGLPixmapData::releaseNativeImageHandle(void)
+ ?createFromNativeImageHandleProvider@QGLPixmapData@@QAEXXZ @ 722 NONAME ; void QGLPixmapData::createFromNativeImageHandleProvider(void)
+ ?initFromNativeImageHandle@QGLPixmapData@@QAE_NPAXABVQString@@@Z @ 723 NONAME ; bool QGLPixmapData::initFromNativeImageHandle(void *, class QString const &)
+ ?glVertexAttrib3f@QGLFunctions@@QAEXIMMM@Z @ 724 NONAME ; void QGLFunctions::glVertexAttrib3f(unsigned int, float, float, float)
+ ?glVertexAttrib1fv@QGLFunctions@@QAEXIPBM@Z @ 725 NONAME ; void QGLFunctions::glVertexAttrib1fv(unsigned int, float const *)
+ ?glIsBuffer@QGLFunctions@@QAEEI@Z @ 726 NONAME ; unsigned char QGLFunctions::glIsBuffer(unsigned int)
+ ?glGetActiveAttrib@QGLFunctions@@QAEXIIHPAH0PAIPAD@Z @ 727 NONAME ; void QGLFunctions::glGetActiveAttrib(unsigned int, unsigned int, int, int *, int *, unsigned int *, char *)
+ ?glBindFramebuffer@QGLFunctions@@QAEXII@Z @ 728 NONAME ; void QGLFunctions::glBindFramebuffer(unsigned int, unsigned int)
+ ?glBufferData@QGLFunctions@@QAEXIHPBXI@Z @ 729 NONAME ; void QGLFunctions::glBufferData(unsigned int, int, void const *, unsigned int)
+ ?glValidateProgram@QGLFunctions@@QAEXI@Z @ 730 NONAME ; void QGLFunctions::glValidateProgram(unsigned int)
+ ?glUniform1f@QGLFunctions@@QAEXHM@Z @ 731 NONAME ; void QGLFunctions::glUniform1f(int, float)
+ ?glDetachShader@QGLFunctions@@QAEXII@Z @ 732 NONAME ; void QGLFunctions::glDetachShader(unsigned int, unsigned int)
+ ?glDeleteProgram@QGLFunctions@@QAEXI@Z @ 733 NONAME ; void QGLFunctions::glDeleteProgram(unsigned int)
+ ??_EQGLContextResourceBase@@UAE@I@Z @ 734 NONAME ; QGLContextResourceBase::~QGLContextResourceBase(unsigned int)
+ ?glUniform2f@QGLFunctions@@QAEXHMM@Z @ 735 NONAME ; void QGLFunctions::glUniform2f(int, float, float)
+ ?glIsProgram@QGLFunctions@@QAEEI@Z @ 736 NONAME ; unsigned char QGLFunctions::glIsProgram(unsigned int)
+ ?openGLFeatures@QGLFunctions@@QBE?AV?$QFlags@W4OpenGLFeature@QGLFunctions@@@@XZ @ 737 NONAME ; class QFlags<enum QGLFunctions::OpenGLFeature> QGLFunctions::openGLFeatures(void) const
+ ?glReleaseShaderCompiler@QGLFunctions@@QAEXXZ @ 738 NONAME ; void QGLFunctions::glReleaseShaderCompiler(void)
+ ??0QGLTextureGlyphCache@@QAE@PBVQGLContext@@W4Type@QFontEngineGlyphCache@@ABVQTransform@@@Z @ 739 NONAME ; QGLTextureGlyphCache::QGLTextureGlyphCache(class QGLContext const *, enum QFontEngineGlyphCache::Type, class QTransform const &)
+ ?context@QGLTextureGlyphCache@@QBEPBVQGLContext@@XZ @ 740 NONAME ; class QGLContext const * QGLTextureGlyphCache::context(void) const
+ ?glGenRenderbuffers@QGLFunctions@@QAEXHPAI@Z @ 741 NONAME ; void QGLFunctions::glGenRenderbuffers(int, unsigned int *)
+ ?glBindBuffer@QGLFunctions@@QAEXII@Z @ 742 NONAME ; void QGLFunctions::glBindBuffer(unsigned int, unsigned int)
+ ?glUniformMatrix3fv@QGLFunctions@@QAEXHHEPBM@Z @ 743 NONAME ; void QGLFunctions::glUniformMatrix3fv(int, int, unsigned char, float const *)
+ ?glGenerateMipmap@QGLFunctions@@QAEXI@Z @ 744 NONAME ; void QGLFunctions::glGenerateMipmap(unsigned int)
+ ?hasOpenGLFeature@QGLFunctions@@QBE_NW4OpenGLFeature@1@@Z @ 745 NONAME ; bool QGLFunctions::hasOpenGLFeature(enum QGLFunctions::OpenGLFeature) const
+ ?glGetAttachedShaders@QGLFunctions@@QAEXIHPAHPAI@Z @ 746 NONAME ; void QGLFunctions::glGetAttachedShaders(unsigned int, int, int *, unsigned int *)
+ ?glDeleteShader@QGLFunctions@@QAEXI@Z @ 747 NONAME ; void QGLFunctions::glDeleteShader(unsigned int)
+ ?simpleProgram@QGLEngineSharedShaders@@QAEPAVQGLShaderProgram@@XZ @ 748 NONAME ; class QGLShaderProgram * QGLEngineSharedShaders::simpleProgram(void)
+ ?blitProgram@QGLEngineSharedShaders@@QAEPAVQGLShaderProgram@@XZ @ 749 NONAME ; class QGLShaderProgram * QGLEngineSharedShaders::blitProgram(void)
+ ?glLinkProgram@QGLFunctions@@QAEXI@Z @ 750 NONAME ; void QGLFunctions::glLinkProgram(unsigned int)
+ ?glUseProgram@QGLFunctions@@QAEXI@Z @ 751 NONAME ; void QGLFunctions::glUseProgram(unsigned int)
+ ??0QGLFunctions@@QAE@PBVQGLContext@@@Z @ 752 NONAME ; QGLFunctions::QGLFunctions(class QGLContext const *)
+ ?glGetBufferParameteriv@QGLFunctions@@QAEXIIPAH@Z @ 753 NONAME ; void QGLFunctions::glGetBufferParameteriv(unsigned int, unsigned int, int *)
+ ?glGenBuffers@QGLFunctions@@QAEXHPAI@Z @ 754 NONAME ; void QGLFunctions::glGenBuffers(int, unsigned int *)
+ ?glGetShaderiv@QGLFunctions@@QAEXIIPAH@Z @ 755 NONAME ; void QGLFunctions::glGetShaderiv(unsigned int, unsigned int, int *)
+ ?fillTexture@QGLTextureGlyphCache@@UAEXABUCoord@QTextureGlyphCache@@IUQFixed@@@Z @ 756 NONAME ; void QGLTextureGlyphCache::fillTexture(struct QTextureGlyphCache::Coord const &, unsigned int, struct QFixed)
+ ?glUniform2fv@QGLFunctions@@QAEXHHPBM@Z @ 757 NONAME ; void QGLFunctions::glUniform2fv(int, int, float const *)
+ ??0QGLContextGroupResourceBase@@QAE@XZ @ 758 NONAME ; QGLContextGroupResourceBase::QGLContextGroupResourceBase(void)
+ ?glGetFramebufferAttachmentParameteriv@QGLFunctions@@QAEXIIIPAH@Z @ 759 NONAME ; void QGLFunctions::glGetFramebufferAttachmentParameteriv(unsigned int, unsigned int, unsigned int, int *)
+ ??0QGLEngineSharedShaders@@QAE@PBVQGLContext@@@Z @ 760 NONAME ; QGLEngineSharedShaders::QGLEngineSharedShaders(class QGLContext const *)
+ ?cleanup@QGLContextGroupResourceBase@@QAEXPBVQGLContext@@PAX@Z @ 761 NONAME ; void QGLContextGroupResourceBase::cleanup(class QGLContext const *, void *)
+ ?glUniform2iv@QGLFunctions@@QAEXHHPBH@Z @ 762 NONAME ; void QGLFunctions::glUniform2iv(int, int, int const *)
+ ?glCompileShader@QGLFunctions@@QAEXI@Z @ 763 NONAME ; void QGLFunctions::glCompileShader(unsigned int)
+ ?qShaderSnippets@QGLEngineSharedShaders@@0PAPBDA @ 764 NONAME ; char const * * QGLEngineSharedShaders::qShaderSnippets
+ ?isFlipped@QGLPaintDevice@@UBE_NXZ @ 765 NONAME ; bool QGLPaintDevice::isFlipped(void) const
+ ?shadersForContext@QGLEngineSharedShaders@@SAPAV1@PBVQGLContext@@@Z @ 766 NONAME ; class QGLEngineSharedShaders * QGLEngineSharedShaders::shadersForContext(class QGLContext const *)
+ ?cleanupCustomStage@QGLEngineSharedShaders@@QAEXPAVQGLCustomShaderStage@@@Z @ 767 NONAME ; void QGLEngineSharedShaders::cleanupCustomStage(class QGLCustomShaderStage *)
+ ?glGetProgramiv@QGLFunctions@@QAEXIIPAH@Z @ 768 NONAME ; void QGLFunctions::glGetProgramiv(unsigned int, unsigned int, int *)
+ ?glClearDepthf@QGLFunctions@@QAEXM@Z @ 769 NONAME ; void QGLFunctions::glClearDepthf(float)
+ ?glIsFramebuffer@QGLFunctions@@QAEEI@Z @ 770 NONAME ; unsigned char QGLFunctions::glIsFramebuffer(unsigned int)
+ ?getStaticMetaObject@QGLEngineSharedShaders@@SAABUQMetaObject@@XZ @ 771 NONAME ; struct QMetaObject const & QGLEngineSharedShaders::getStaticMetaObject(void)
+ ?glUniform4f@QGLFunctions@@QAEXHMMMM@Z @ 772 NONAME ; void QGLFunctions::glUniform4f(int, float, float, float, float)
+ ?glUniform3f@QGLFunctions@@QAEXHMMM@Z @ 773 NONAME ; void QGLFunctions::glUniform3f(int, float, float, float)
+ ??1QGLEngineSharedShaders@@QAE@XZ @ 774 NONAME ; QGLEngineSharedShaders::~QGLEngineSharedShaders(void)
+ ?glDeleteRenderbuffers@QGLFunctions@@QAEXHPBI@Z @ 775 NONAME ; void QGLFunctions::glDeleteRenderbuffers(int, unsigned int const *)
+ ?glVertexAttrib1f@QGLFunctions@@QAEXIM@Z @ 776 NONAME ; void QGLFunctions::glVertexAttrib1f(unsigned int, float)
+ ?glVertexAttrib4f@QGLFunctions@@QAEXIMMMM@Z @ 777 NONAME ; void QGLFunctions::glVertexAttrib4f(unsigned int, float, float, float, float)
+ ?glSampleCoverage@QGLFunctions@@QAEXME@Z @ 778 NONAME ; void QGLFunctions::glSampleCoverage(float, unsigned char)
+ ?glGetActiveUniform@QGLFunctions@@QAEXIIHPAH0PAIPAD@Z @ 779 NONAME ; void QGLFunctions::glGetActiveUniform(unsigned int, unsigned int, int, int *, int *, unsigned int *, char *)
+ ??_EQGLContextGroupResourceBase@@UAE@I@Z @ 780 NONAME ; QGLContextGroupResourceBase::~QGLContextGroupResourceBase(unsigned int)
+ ?findProgramInCache@QGLEngineSharedShaders@@QAEPAVQGLEngineShaderProg@@ABV2@@Z @ 781 NONAME ; class QGLEngineShaderProg * QGLEngineSharedShaders::findProgramInCache(class QGLEngineShaderProg const &)
+ ?glStencilOpSeparate@QGLFunctions@@QAEXIIII@Z @ 782 NONAME ; void QGLFunctions::glStencilOpSeparate(unsigned int, unsigned int, unsigned int, unsigned int)
+ ?glCheckFramebufferStatus@QGLFunctions@@QAEII@Z @ 783 NONAME ; unsigned int QGLFunctions::glCheckFramebufferStatus(unsigned int)
+ ?glDepthRangef@QGLFunctions@@QAEXMM@Z @ 784 NONAME ; void QGLFunctions::glDepthRangef(float, float)
+ ??1QGLFunctions@@QAE@XZ @ 785 NONAME ; QGLFunctions::~QGLFunctions(void)
+ ?glStencilMaskSeparate@QGLFunctions@@QAEXII@Z @ 786 NONAME ; void QGLFunctions::glStencilMaskSeparate(unsigned int, unsigned int)
+ ?glBlendColor@QGLFunctions@@QAEXMMMM@Z @ 787 NONAME ; void QGLFunctions::glBlendColor(float, float, float, float)
+ ?glUniform1fv@QGLFunctions@@QAEXHHPBM@Z @ 788 NONAME ; void QGLFunctions::glUniform1fv(int, int, float const *)
+ ??1QGLContextResourceBase@@UAE@XZ @ 789 NONAME ; QGLContextResourceBase::~QGLContextResourceBase(void)
+ ?glCreateProgram@QGLFunctions@@QAEIXZ @ 790 NONAME ; unsigned int QGLFunctions::glCreateProgram(void)
+ ?glVertexAttrib2f@QGLFunctions@@QAEXIMM@Z @ 791 NONAME ; void QGLFunctions::glVertexAttrib2f(unsigned int, float, float)
+ ?glUniformMatrix2fv@QGLFunctions@@QAEXHHEPBM@Z @ 792 NONAME ; void QGLFunctions::glUniformMatrix2fv(int, int, unsigned char, float const *)
+ ?glBufferSubData@QGLFunctions@@QAEXIHHPBX@Z @ 793 NONAME ; void QGLFunctions::glBufferSubData(unsigned int, int, int, void const *)
+ ?glUniform1iv@QGLFunctions@@QAEXHHPBH@Z @ 794 NONAME ; void QGLFunctions::glUniform1iv(int, int, int const *)
+ ?qt_resolve_buffer_extensions@@YA_NPAVQGLContext@@@Z @ 795 NONAME ; bool qt_resolve_buffer_extensions(class QGLContext *)
+ ?glUniform1i@QGLFunctions@@QAEXHH@Z @ 796 NONAME ; void QGLFunctions::glUniform1i(int, int)
+ ?glVertexAttrib4fv@QGLFunctions@@QAEXIPBM@Z @ 797 NONAME ; void QGLFunctions::glVertexAttrib4fv(unsigned int, float const *)
+ ?glDeleteFramebuffers@QGLFunctions@@QAEXHPBI@Z @ 798 NONAME ; void QGLFunctions::glDeleteFramebuffers(int, unsigned int const *)
+ ?glGetVertexAttribfv@QGLFunctions@@QAEXIIPAM@Z @ 799 NONAME ; void QGLFunctions::glGetVertexAttribfv(unsigned int, unsigned int, float *)
+ ?glGetProgramInfoLog@QGLFunctions@@QAEXIHPAHPAD@Z @ 800 NONAME ; void QGLFunctions::glGetProgramInfoLog(unsigned int, int, int *, char *)
+ ?glGetShaderInfoLog@QGLFunctions@@QAEXIHPAHPAD@Z @ 801 NONAME ; void QGLFunctions::glGetShaderInfoLog(unsigned int, int, int *, char *)
+ ?glEnableVertexAttribArray@QGLFunctions@@QAEXI@Z @ 802 NONAME ; void QGLFunctions::glEnableVertexAttribArray(unsigned int)
+ ?glGetVertexAttribiv@QGLFunctions@@QAEXIIPAH@Z @ 803 NONAME ; void QGLFunctions::glGetVertexAttribiv(unsigned int, unsigned int, int *)
+ ?glCompressedTexImage2D@QGLFunctions@@QAEXIHIHHHHPBX@Z @ 804 NONAME ; void QGLFunctions::glCompressedTexImage2D(unsigned int, int, unsigned int, int, int, int, int, void const *)
+ ?glGetAttribLocation@QGLFunctions@@QAEHIPBD@Z @ 805 NONAME ; int QGLFunctions::glGetAttribLocation(unsigned int, char const *)
+ ?glActiveTexture@QGLFunctions@@QAEXI@Z @ 806 NONAME ; void QGLFunctions::glActiveTexture(unsigned int)
+ ?glUniform4fv@QGLFunctions@@QAEXHHPBM@Z @ 807 NONAME ; void QGLFunctions::glUniform4fv(int, int, float const *)
+ ?glCreateShader@QGLFunctions@@QAEII@Z @ 808 NONAME ; unsigned int QGLFunctions::glCreateShader(unsigned int)
+ ?glAttachShader@QGLFunctions@@QAEXII@Z @ 809 NONAME ; void QGLFunctions::glAttachShader(unsigned int, unsigned int)
+ ?glRenderbufferStorage@QGLFunctions@@QAEXIIHH@Z @ 810 NONAME ; void QGLFunctions::glRenderbufferStorage(unsigned int, unsigned int, int, int)
+ ?glVertexAttribPointer@QGLFunctions@@QAEXIHIEHPBX@Z @ 811 NONAME ; void QGLFunctions::glVertexAttribPointer(unsigned int, int, unsigned int, unsigned char, int, void const *)
+ ?glUniform4iv@QGLFunctions@@QAEXHHPBH@Z @ 812 NONAME ; void QGLFunctions::glUniform4iv(int, int, int const *)
+ ?glDisableVertexAttribArray@QGLFunctions@@QAEXI@Z @ 813 NONAME ; void QGLFunctions::glDisableVertexAttribArray(unsigned int)
+ ?features@QGLWindowSurface@@UBE?AV?$QFlags@W4WindowSurfaceFeature@QWindowSurface@@@@XZ @ 814 NONAME ; class QFlags<enum QWindowSurface::WindowSurfaceFeature> QGLWindowSurface::features(void) const
+ ?glIsShader@QGLFunctions@@QAEEI@Z @ 815 NONAME ; unsigned char QGLFunctions::glIsShader(unsigned int)
+ ?glShaderBinary@QGLFunctions@@QAEXHPBIIPBXH@Z @ 816 NONAME ; void QGLFunctions::glShaderBinary(int, unsigned int const *, unsigned int, void const *, int)
+ ?glGenFramebuffers@QGLFunctions@@QAEXHPAI@Z @ 817 NONAME ; void QGLFunctions::glGenFramebuffers(int, unsigned int *)
+ ?glVertexAttrib3fv@QGLFunctions@@QAEXIPBM@Z @ 818 NONAME ; void QGLFunctions::glVertexAttrib3fv(unsigned int, float const *)
+ ?glGetVertexAttribPointerv@QGLFunctions@@QAEXIIPAPAX@Z @ 819 NONAME ; void QGLFunctions::glGetVertexAttribPointerv(unsigned int, unsigned int, void * *)
+ ?snippetNameStr@QGLEngineSharedShaders@@SA?AVQByteArray@@W4SnippetName@1@@Z @ 820 NONAME ; class QByteArray QGLEngineSharedShaders::snippetNameStr(enum QGLEngineSharedShaders::SnippetName)
+ ?glUniformMatrix4fv@QGLFunctions@@QAEXHHEPBM@Z @ 821 NONAME ; void QGLFunctions::glUniformMatrix4fv(int, int, unsigned char, float const *)
+ ?setContext@QGLTextureGlyphCache@@QAEXPBVQGLContext@@@Z @ 822 NONAME ; void QGLTextureGlyphCache::setContext(class QGLContext const *)
+ ?glDeleteBuffers@QGLFunctions@@QAEXHPBI@Z @ 823 NONAME ; void QGLFunctions::glDeleteBuffers(int, unsigned int const *)
+ ?glBindRenderbuffer@QGLFunctions@@QAEXII@Z @ 824 NONAME ; void QGLFunctions::glBindRenderbuffer(unsigned int, unsigned int)
+ ?glStencilFuncSeparate@QGLFunctions@@QAEXIIHI@Z @ 825 NONAME ; void QGLFunctions::glStencilFuncSeparate(unsigned int, unsigned int, int, unsigned int)
+ ?glGetUniformLocation@QGLFunctions@@QAEHIPBD@Z @ 826 NONAME ; int QGLFunctions::glGetUniformLocation(unsigned int, char const *)
+ ?glGetRenderbufferParameteriv@QGLFunctions@@QAEXIIPAH@Z @ 827 NONAME ; void QGLFunctions::glGetRenderbufferParameteriv(unsigned int, unsigned int, int *)
+ ?glBindAttribLocation@QGLFunctions@@QAEXIIPBD@Z @ 828 NONAME ; void QGLFunctions::glBindAttribLocation(unsigned int, unsigned int, char const *)
+ ?glGetShaderSource@QGLFunctions@@QAEXIHPAHPAD@Z @ 829 NONAME ; void QGLFunctions::glGetShaderSource(unsigned int, int, int *, char *)
+ ?setMipmap@QGLFramebufferObjectFormat@@QAEX_N@Z @ 830 NONAME ; void QGLFramebufferObjectFormat::setMipmap(bool)
+ ??1QGLContextGroupResourceBase@@UAE@XZ @ 831 NONAME ; QGLContextGroupResourceBase::~QGLContextGroupResourceBase(void)
+ ?glFramebufferTexture2D@QGLFunctions@@QAEXIIIIH@Z @ 832 NONAME ; void QGLFunctions::glFramebufferTexture2D(unsigned int, unsigned int, unsigned int, unsigned int, int)
+ ?glBlendEquationSeparate@QGLFunctions@@QAEXII@Z @ 833 NONAME ; void QGLFunctions::glBlendEquationSeparate(unsigned int, unsigned int)
+ ?insert@QGLContextResourceBase@@QAEXPBVQGLContext@@PAX@Z @ 834 NONAME ; void QGLContextResourceBase::insert(class QGLContext const *, void *)
+ ??_EQGLEngineSharedShaders@@QAE@I@Z @ 835 NONAME ; QGLEngineSharedShaders::~QGLEngineSharedShaders(unsigned int)
+ ?glUniform2i@QGLFunctions@@QAEXHHH@Z @ 836 NONAME ; void QGLFunctions::glUniform2i(int, int, int)
+ ?glGetUniformfv@QGLFunctions@@QAEXIHPAM@Z @ 837 NONAME ; void QGLFunctions::glGetUniformfv(unsigned int, int, float *)
+ ?glUniform3i@QGLFunctions@@QAEXHHHH@Z @ 838 NONAME ; void QGLFunctions::glUniform3i(int, int, int, int)
+ ?staticMetaObject@QGLEngineSharedShaders@@2UQMetaObject@@B @ 839 NONAME ; struct QMetaObject const QGLEngineSharedShaders::staticMetaObject
+ ?cleanup@QGLContextGroupResourceBase@@QAEXPBVQGLContext@@@Z @ 840 NONAME ; void QGLContextGroupResourceBase::cleanup(class QGLContext const *)
+ ?glIsRenderbuffer@QGLFunctions@@QAEEI@Z @ 841 NONAME ; unsigned char QGLFunctions::glIsRenderbuffer(unsigned int)
+ ?initializeGLFunctions@QGLFunctions@@QAEXPBVQGLContext@@@Z @ 842 NONAME ; void QGLFunctions::initializeGLFunctions(class QGLContext const *)
+ ??0QGLFunctions@@QAE@XZ @ 843 NONAME ; QGLFunctions::QGLFunctions(void)
+ ?glVertexAttrib2fv@QGLFunctions@@QAEXIPBM@Z @ 844 NONAME ; void QGLFunctions::glVertexAttrib2fv(unsigned int, float const *)
+ ?isInitialized@QGLFunctions@@CA_NPBUQGLFunctionsPrivate@@@Z @ 845 NONAME ; bool QGLFunctions::isInitialized(struct QGLFunctionsPrivate const *)
+ ?glGetUniformiv@QGLFunctions@@QAEXIHPAH@Z @ 846 NONAME ; void QGLFunctions::glGetUniformiv(unsigned int, int, int *)
+ ?glBlendEquation@QGLFunctions@@QAEXI@Z @ 847 NONAME ; void QGLFunctions::glBlendEquation(unsigned int)
+ ?glFramebufferRenderbuffer@QGLFunctions@@QAEXIIII@Z @ 848 NONAME ; void QGLFunctions::glFramebufferRenderbuffer(unsigned int, unsigned int, unsigned int, unsigned int)
+ ?glUniform4i@QGLFunctions@@QAEXHHHHH@Z @ 849 NONAME ; void QGLFunctions::glUniform4i(int, int, int, int, int)
+ ?glUniform3fv@QGLFunctions@@QAEXHHPBM@Z @ 850 NONAME ; void QGLFunctions::glUniform3fv(int, int, float const *)
+ ?value@QGLContextResourceBase@@QAEPAXPBVQGLContext@@@Z @ 851 NONAME ; void * QGLContextResourceBase::value(class QGLContext const *)
+ ?glBlendFuncSeparate@QGLFunctions@@QAEXIIII@Z @ 852 NONAME ; void QGLFunctions::glBlendFuncSeparate(unsigned int, unsigned int, unsigned int, unsigned int)
+ ?glCompressedTexSubImage2D@QGLFunctions@@QAEXIHHHHHIHPBX@Z @ 853 NONAME ; void QGLFunctions::glCompressedTexSubImage2D(unsigned int, int, int, int, int, int, unsigned int, int, void const *)
+ ?freeResource@QGLTextureGlyphCache@@UAEXPAX@Z @ 854 NONAME ; void QGLTextureGlyphCache::freeResource(void *)
+ ?value@QGLContextGroupResourceBase@@QAEPAXPBVQGLContext@@@Z @ 855 NONAME ; void * QGLContextGroupResourceBase::value(class QGLContext const *)
+ ?glUniform3iv@QGLFunctions@@QAEXHHPBH@Z @ 856 NONAME ; void QGLFunctions::glUniform3iv(int, int, int const *)
+ ?mipmap@QGLFramebufferObjectFormat@@QBE_NXZ @ 857 NONAME ; bool QGLFramebufferObjectFormat::mipmap(void) const
+ ?qt_extensionFuncs@QGLContextPrivate@@2UQGLExtensionFuncs@@A @ 858 NONAME ; struct QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs
+ ?glShaderSource@QGLFunctions@@QAEXIHPAPBDPBH@Z @ 859 NONAME ; void QGLFunctions::glShaderSource(unsigned int, int, char const * *, int const *)
+ ?glGetShaderPrecisionFormat@QGLFunctions@@QAEXIIPAH0@Z @ 860 NONAME ; void QGLFunctions::glGetShaderPrecisionFormat(unsigned int, unsigned int, int *, int *)
+ ?insert@QGLContextGroupResourceBase@@QAEXPBVQGLContext@@PAX@Z @ 861 NONAME ; void QGLContextGroupResourceBase::insert(class QGLContext const *, void *)
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index 18f576b..c9fc813 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -134,7 +134,7 @@ EXPORTS
?drawTextItem@QVGPaintEngine@@UAEXABVQPointF@@ABVQTextItem@@@Z @ 133 NONAME ; void QVGPaintEngine::drawTextItem(class QPointF const &, class QTextItem const &)
?clearScissor@QVGCompositionHelper@@QAEXXZ @ 134 NONAME ; void QVGCompositionHelper::clearScissor(void)
?fill@QVGPaintEngine@@UAEXABVQVectorPath@@ABVQBrush@@@Z @ 135 NONAME ; void QVGPaintEngine::fill(class QVectorPath const &, class QBrush const &)
- ?forceToImage@QVGPixmapData@@IAEXXZ @ 136 NONAME ; void QVGPixmapData::forceToImage(void)
+ ?forceToImage@QVGPixmapData@@IAEXXZ @ 136 NONAME ABSENT ; void QVGPixmapData::forceToImage(void)
?drawPoints@QVGPaintEngine@@UAEXPBVQPoint@@H@Z @ 137 NONAME ; void QVGPaintEngine::drawPoints(class QPoint const *, int)
??_EQVGPaintEngine@@UAE@I@Z @ 138 NONAME ; QVGPaintEngine::~QVGPaintEngine(unsigned int)
?clip@QVGPaintEngine@@UAEXABVQPainterPath@@W4ClipOperation@Qt@@@Z @ 139 NONAME ; void QVGPaintEngine::clip(class QPainterPath const &, enum Qt::ClipOperation)
@@ -183,4 +183,6 @@ EXPORTS
?initFromNativeImageHandle@QVGPixmapData@@QAE_NPAXABVQString@@@Z @ 182 NONAME ; bool QVGPixmapData::initFromNativeImageHandle(void *, class QString const &)
?createFromNativeImageHandleProvider@QVGPixmapData@@QAEXXZ @ 183 NONAME ; void QVGPixmapData::createFromNativeImageHandleProvider(void)
?releaseNativeImageHandle@QVGPixmapData@@QAEXXZ @ 184 NONAME ; void QVGPixmapData::releaseNativeImageHandle(void)
+ ?forceToImage@QVGPixmapData@@IAEX_N@Z @ 185 NONAME ; void QVGPixmapData::forceToImage(bool)
+ ?features@QVGWindowSurface@@UBE?AV?$QFlags@W4WindowSurfaceFeature@QWindowSurface@@@@XZ @ 186 NONAME ; class QFlags<enum QWindowSurface::WindowSurfaceFeature> QVGWindowSurface::features(void) const
diff --git a/src/s60installs/eabi/QtCoreu.def b/src/s60installs/eabi/QtCoreu.def
index cfdd9ee..ef3bbb1 100644
--- a/src/s60installs/eabi/QtCoreu.def
+++ b/src/s60installs/eabi/QtCoreu.def
@@ -3714,99 +3714,129 @@ EXPORTS
_Z26qt_symbian_SetupThreadHeapiR24SStdEpocThreadCreateInfo @ 3713 NONAME
_ZN24QAbstractDeclarativeData17objectNameChangedE @ 3714 NONAME DATA 4
_ZN23QEventDispatcherSymbian36queueDeferredActiveObjectsCompletionEv @ 3715 NONAME
- _ZN11QThreadPool11waitForDoneEi @ 3716 NONAME
- _ZN13QSharedMemory12setNativeKeyERK7QString @ 3717 NONAME
- _ZN13QUnifiedTimer10timerEventEP11QTimerEvent @ 3718 NONAME
- _ZN13QUnifiedTimer17ensureTimerUpdateEv @ 3719 NONAME
- _ZN13QUnifiedTimer17registerAnimationEP18QAbstractAnimationb @ 3720 NONAME
- _ZN13QUnifiedTimer17setTimingIntervalEi @ 3721 NONAME
- _ZN13QUnifiedTimer19unregisterAnimationEP18QAbstractAnimation @ 3722 NONAME
- _ZN13QUnifiedTimer20updateAnimationTimerEv @ 3723 NONAME
- _ZN13QUnifiedTimer20updateAnimationsTimeEv @ 3724 NONAME
- _ZN13QUnifiedTimer21restartAnimationTimerEv @ 3725 NONAME
- _ZN13QUnifiedTimer22installAnimationDriverEP16QAnimationDriver @ 3726 NONAME
- _ZN13QUnifiedTimer24registerRunningAnimationEP18QAbstractAnimation @ 3727 NONAME
- _ZN13QUnifiedTimer26unregisterRunningAnimationEP18QAbstractAnimation @ 3728 NONAME
- _ZN13QUnifiedTimer33closestPauseAnimationTimeToFinishEv @ 3729 NONAME
- _ZN13QUnifiedTimer8instanceEb @ 3730 NONAME
- _ZN13QUnifiedTimerC1Ev @ 3731 NONAME
- _ZN13QUnifiedTimerC2Ev @ 3732 NONAME
- _ZN16QAnimationDriver11qt_metacallEN11QMetaObject4CallEiPPv @ 3733 NONAME
- _ZN16QAnimationDriver11qt_metacastEPKc @ 3734 NONAME
- _ZN16QAnimationDriver16staticMetaObjectE @ 3735 NONAME DATA 16
- _ZN16QAnimationDriver19getStaticMetaObjectEv @ 3736 NONAME
- _ZN16QAnimationDriver4stopEv @ 3737 NONAME
- _ZN16QAnimationDriver5startEv @ 3738 NONAME
- _ZN16QAnimationDriver7advanceEv @ 3739 NONAME
- _ZN16QAnimationDriver7installEv @ 3740 NONAME
- _ZN16QAnimationDriverC2EP7QObject @ 3741 NONAME
- _ZN16QAnimationDriverC2ER23QAnimationDriverPrivateP7QObject @ 3742 NONAME
- _ZN16QCoreApplicationC1ERiPPci @ 3743 NONAME
- _ZN16QCoreApplicationC2ERiPPci @ 3744 NONAME
- _ZN23QCoreApplicationPrivate19app_compile_versionE @ 3745 NONAME DATA 4
- _ZN23QCoreApplicationPrivateC1ERiPPcj @ 3746 NONAME
- _ZN23QCoreApplicationPrivateC2ERiPPcj @ 3747 NONAME
- _ZN6QMutex12lockInternalEv @ 3748 NONAME
- _ZN6QMutex14unlockInternalEv @ 3749 NONAME
- _ZN7QObject10disconnectEPKS_RK11QMetaMethodS1_S4_ @ 3750 NONAME
- _ZN7QObject7connectEPKS_RK11QMetaMethodS1_S4_N2Qt14ConnectionTypeE @ 3751 NONAME
- _ZNK10QStringRef10startsWithE13QLatin1StringN2Qt15CaseSensitivityE @ 3752 NONAME
- _ZNK10QStringRef10startsWithE5QCharN2Qt15CaseSensitivityE @ 3753 NONAME
- _ZNK10QStringRef10startsWithERK7QStringN2Qt15CaseSensitivityE @ 3754 NONAME
- _ZNK10QStringRef10startsWithERKS_N2Qt15CaseSensitivityE @ 3755 NONAME
- _ZNK10QStringRef11lastIndexOfE13QLatin1StringiN2Qt15CaseSensitivityE @ 3756 NONAME
- _ZNK10QStringRef11lastIndexOfE5QChariN2Qt15CaseSensitivityE @ 3757 NONAME
- _ZNK10QStringRef11lastIndexOfERK7QStringiN2Qt15CaseSensitivityE @ 3758 NONAME
- _ZNK10QStringRef11lastIndexOfERKS_iN2Qt15CaseSensitivityE @ 3759 NONAME
- _ZNK10QStringRef11toLocal8BitEv @ 3760 NONAME
- _ZNK10QStringRef5countE5QCharN2Qt15CaseSensitivityE @ 3761 NONAME
- _ZNK10QStringRef5countERK7QStringN2Qt15CaseSensitivityE @ 3762 NONAME
- _ZNK10QStringRef5countERKS_N2Qt15CaseSensitivityE @ 3763 NONAME
- _ZNK10QStringRef6toUcs4Ev @ 3764 NONAME
- _ZNK10QStringRef6toUtf8Ev @ 3765 NONAME
- _ZNK10QStringRef7indexOfE13QLatin1StringiN2Qt15CaseSensitivityE @ 3766 NONAME
- _ZNK10QStringRef7indexOfE5QChariN2Qt15CaseSensitivityE @ 3767 NONAME
- _ZNK10QStringRef7indexOfERK7QStringiN2Qt15CaseSensitivityE @ 3768 NONAME
- _ZNK10QStringRef7indexOfERKS_iN2Qt15CaseSensitivityE @ 3769 NONAME
- _ZNK10QStringRef7toAsciiEv @ 3770 NONAME
- _ZNK10QStringRef8endsWithE13QLatin1StringN2Qt15CaseSensitivityE @ 3771 NONAME
- _ZNK10QStringRef8endsWithE5QCharN2Qt15CaseSensitivityE @ 3772 NONAME
- _ZNK10QStringRef8endsWithERK7QStringN2Qt15CaseSensitivityE @ 3773 NONAME
- _ZNK10QStringRef8endsWithERKS_N2Qt15CaseSensitivityE @ 3774 NONAME
- _ZNK10QStringRef8toLatin1Ev @ 3775 NONAME
- _ZNK11QMetaObject4castEPK7QObject @ 3776 NONAME
- _ZNK13QSharedMemory9nativeKeyEv @ 3777 NONAME
- _ZNK16QAnimationDriver10metaObjectEv @ 3778 NONAME
- _ZNK16QAnimationDriver9isRunningEv @ 3779 NONAME
- _ZNK4QUrl11isLocalFileEv @ 3780 NONAME
- _ZNK7QObject17senderSignalIndexEv @ 3781 NONAME
- _ZNK7QString10startsWithERK10QStringRefN2Qt15CaseSensitivityE @ 3782 NONAME
- _ZNK7QString11lastIndexOfERK10QStringRefiN2Qt15CaseSensitivityE @ 3783 NONAME
- _ZNK7QString5countERK10QStringRefN2Qt15CaseSensitivityE @ 3784 NONAME
- _ZNK7QString7indexOfERK10QStringRefiN2Qt15CaseSensitivityE @ 3785 NONAME
- _ZNK7QString8endsWithERK10QStringRefN2Qt15CaseSensitivityE @ 3786 NONAME
- _ZTI13QUnifiedTimer @ 3787 NONAME
- _ZTI16QAnimationDriver @ 3788 NONAME
- _ZTI23QAnimationDriverPrivate @ 3789 NONAME
- _ZTV13QUnifiedTimer @ 3790 NONAME
- _ZTV16QAnimationDriver @ 3791 NONAME
- _ZTV23QAnimationDriverPrivate @ 3792 NONAME
- _ZN12QSystemError8toStringEv @ 3793 NONAME
- _ZN5QChar21currentUnicodeVersionEv @ 3794 NONAME
- _ZN9QFileInfoC1EP16QFileInfoPrivate @ 3795 NONAME
- _ZN9QFileInfoC2EP16QFileInfoPrivate @ 3796 NONAME
- _ZN13QFSFileEngine4openE6QFlagsIN9QIODevice12OpenModeFlagEEP7__sFILES0_IN5QFile14FileHandleFlagEE @ 3797 NONAME
- _ZN13QFSFileEngine4openE6QFlagsIN9QIODevice12OpenModeFlagEERK5RFileS0_IN5QFile14FileHandleFlagEE @ 3798 NONAME
- _ZN13QFSFileEngine4openE6QFlagsIN9QIODevice12OpenModeFlagEEiS0_IN5QFile14FileHandleFlagEE @ 3799 NONAME
- _ZN5QFile4openEP7__sFILE6QFlagsIN9QIODevice12OpenModeFlagEES2_INS_14FileHandleFlagEE @ 3800 NONAME
- _ZN5QFile4openERK5RFile6QFlagsIN9QIODevice12OpenModeFlagEES3_INS_14FileHandleFlagEE @ 3801 NONAME
- _ZN5QFile4openEi6QFlagsIN9QIODevice12OpenModeFlagEES0_INS_14FileHandleFlagEE @ 3802 NONAME
- _ZN23QCoreApplicationPrivate18symbianCommandLineEv @ 3803 NONAME
- _ZNK16QXmlStreamWriter8hasErrorEv @ 3804 NONAME
- _ZNK13QElapsedTimer12nsecsElapsedEv @ 3805 NONAME
- _ZNK11QMetaMethod8revisionEv @ 3806 NONAME
- _ZNK13QMetaProperty8revisionEv @ 3807 NONAME
- _ZN16QAnimationDriverC1EP7QObject @ 3808 NONAME
- _ZN16QAnimationDriverC1ER23QAnimationDriverPrivateP7QObject @ 3809 NONAME
- _ZN31QNonContiguousByteDeviceFactory6createE14QSharedPointerI11QRingBufferE @ 3810 NONAME
+ _ZN23QCoreApplicationPrivate18symbianCommandLineEv @ 3716 NONAME
+ _ZNK11QMetaMethod8revisionEv @ 3717 NONAME
+ _ZNK13QMetaProperty8revisionEv @ 3718 NONAME
+ _ZN11QThreadPool11waitForDoneEi @ 3719 NONAME
+ _ZN12QSystemError8toStringEv @ 3720 NONAME
+ _ZN13QFSFileEngine4openE6QFlagsIN9QIODevice12OpenModeFlagEEP7__sFILES0_IN5QFile14FileHandleFlagEE @ 3721 NONAME
+ _ZN13QFSFileEngine4openE6QFlagsIN9QIODevice12OpenModeFlagEERK5RFileS0_IN5QFile14FileHandleFlagEE @ 3722 NONAME
+ _ZN13QFSFileEngine4openE6QFlagsIN9QIODevice12OpenModeFlagEEiS0_IN5QFile14FileHandleFlagEE @ 3723 NONAME
+ _ZN13QSharedMemory12setNativeKeyERK7QString @ 3724 NONAME
+ _ZN13QUnifiedTimer10timerEventEP11QTimerEvent @ 3725 NONAME
+ _ZN13QUnifiedTimer17ensureTimerUpdateEv @ 3726 NONAME
+ _ZN13QUnifiedTimer17registerAnimationEP18QAbstractAnimationb @ 3727 NONAME
+ _ZN13QUnifiedTimer17setTimingIntervalEi @ 3728 NONAME
+ _ZN13QUnifiedTimer19unregisterAnimationEP18QAbstractAnimation @ 3729 NONAME
+ _ZN13QUnifiedTimer20updateAnimationTimerEv @ 3730 NONAME
+ _ZN13QUnifiedTimer20updateAnimationsTimeEv @ 3731 NONAME
+ _ZN13QUnifiedTimer21restartAnimationTimerEv @ 3732 NONAME
+ _ZN13QUnifiedTimer22installAnimationDriverEP16QAnimationDriver @ 3733 NONAME
+ _ZN13QUnifiedTimer24registerRunningAnimationEP18QAbstractAnimation @ 3734 NONAME
+ _ZN13QUnifiedTimer26unregisterRunningAnimationEP18QAbstractAnimation @ 3735 NONAME
+ _ZN13QUnifiedTimer33closestPauseAnimationTimeToFinishEv @ 3736 NONAME
+ _ZN13QUnifiedTimer8instanceEb @ 3737 NONAME
+ _ZN13QUnifiedTimerC1Ev @ 3738 NONAME
+ _ZN13QUnifiedTimerC2Ev @ 3739 NONAME
+ _ZN16QAnimationDriver11qt_metacallEN11QMetaObject4CallEiPPv @ 3740 NONAME
+ _ZN16QAnimationDriver11qt_metacastEPKc @ 3741 NONAME
+ _ZN16QAnimationDriver16staticMetaObjectE @ 3742 NONAME DATA 16
+ _ZN16QAnimationDriver19getStaticMetaObjectEv @ 3743 NONAME
+ _ZN16QAnimationDriver4stopEv @ 3744 NONAME
+ _ZN16QAnimationDriver5startEv @ 3745 NONAME
+ _ZN16QAnimationDriver7advanceEv @ 3746 NONAME
+ _ZN16QAnimationDriver7installEv @ 3747 NONAME
+ _ZN16QAnimationDriverC1EP7QObject @ 3748 NONAME
+ _ZN16QAnimationDriverC1ER23QAnimationDriverPrivateP7QObject @ 3749 NONAME
+ _ZN16QAnimationDriverC2EP7QObject @ 3750 NONAME
+ _ZN16QAnimationDriverC2ER23QAnimationDriverPrivateP7QObject @ 3751 NONAME
+ _ZN16QCoreApplicationC1ERiPPci @ 3752 NONAME
+ _ZN16QCoreApplicationC2ERiPPci @ 3753 NONAME
+ _ZN23QCoreApplicationPrivate19app_compile_versionE @ 3754 NONAME DATA 4
+ _ZN23QCoreApplicationPrivateC1ERiPPcj @ 3755 NONAME
+ _ZN23QCoreApplicationPrivateC2ERiPPcj @ 3756 NONAME
+ _ZN31QNonContiguousByteDeviceFactory6createE14QSharedPointerI11QRingBufferE @ 3757 NONAME
+ _ZN5QChar21currentUnicodeVersionEv @ 3758 NONAME
+ _ZN5QFile4openEP7__sFILE6QFlagsIN9QIODevice12OpenModeFlagEES2_INS_14FileHandleFlagEE @ 3759 NONAME
+ _ZN5QFile4openERK5RFile6QFlagsIN9QIODevice12OpenModeFlagEES3_INS_14FileHandleFlagEE @ 3760 NONAME
+ _ZN5QFile4openEi6QFlagsIN9QIODevice12OpenModeFlagEES0_INS_14FileHandleFlagEE @ 3761 NONAME
+ _ZN6QMutex12lockInternalEv @ 3762 NONAME
+ _ZN6QMutex14unlockInternalEv @ 3763 NONAME
+ _ZN7QObject10disconnectEPKS_RK11QMetaMethodS1_S4_ @ 3764 NONAME
+ _ZN7QObject7connectEPKS_RK11QMetaMethodS1_S4_N2Qt14ConnectionTypeE @ 3765 NONAME
+ _ZN9QFileInfoC1EP16QFileInfoPrivate @ 3766 NONAME
+ _ZN9QFileInfoC2EP16QFileInfoPrivate @ 3767 NONAME
+ _ZNK10QStringRef10startsWithE13QLatin1StringN2Qt15CaseSensitivityE @ 3768 NONAME
+ _ZNK10QStringRef10startsWithE5QCharN2Qt15CaseSensitivityE @ 3769 NONAME
+ _ZNK10QStringRef10startsWithERK7QStringN2Qt15CaseSensitivityE @ 3770 NONAME
+ _ZNK10QStringRef10startsWithERKS_N2Qt15CaseSensitivityE @ 3771 NONAME
+ _ZNK10QStringRef11lastIndexOfE13QLatin1StringiN2Qt15CaseSensitivityE @ 3772 NONAME
+ _ZNK10QStringRef11lastIndexOfE5QChariN2Qt15CaseSensitivityE @ 3773 NONAME
+ _ZNK10QStringRef11lastIndexOfERK7QStringiN2Qt15CaseSensitivityE @ 3774 NONAME
+ _ZNK10QStringRef11lastIndexOfERKS_iN2Qt15CaseSensitivityE @ 3775 NONAME
+ _ZNK10QStringRef11toLocal8BitEv @ 3776 NONAME
+ _ZNK10QStringRef5countE5QCharN2Qt15CaseSensitivityE @ 3777 NONAME
+ _ZNK10QStringRef5countERK7QStringN2Qt15CaseSensitivityE @ 3778 NONAME
+ _ZNK10QStringRef5countERKS_N2Qt15CaseSensitivityE @ 3779 NONAME
+ _ZNK10QStringRef6toUcs4Ev @ 3780 NONAME
+ _ZNK10QStringRef6toUtf8Ev @ 3781 NONAME
+ _ZNK10QStringRef7indexOfE13QLatin1StringiN2Qt15CaseSensitivityE @ 3782 NONAME
+ _ZNK10QStringRef7indexOfE5QChariN2Qt15CaseSensitivityE @ 3783 NONAME
+ _ZNK10QStringRef7indexOfERK7QStringiN2Qt15CaseSensitivityE @ 3784 NONAME
+ _ZNK10QStringRef7indexOfERKS_iN2Qt15CaseSensitivityE @ 3785 NONAME
+ _ZNK10QStringRef7toAsciiEv @ 3786 NONAME
+ _ZNK10QStringRef8endsWithE13QLatin1StringN2Qt15CaseSensitivityE @ 3787 NONAME
+ _ZNK10QStringRef8endsWithE5QCharN2Qt15CaseSensitivityE @ 3788 NONAME
+ _ZNK10QStringRef8endsWithERK7QStringN2Qt15CaseSensitivityE @ 3789 NONAME
+ _ZNK10QStringRef8endsWithERKS_N2Qt15CaseSensitivityE @ 3790 NONAME
+ _ZNK10QStringRef8toLatin1Ev @ 3791 NONAME
+ _ZNK11QMetaObject4castEPK7QObject @ 3792 NONAME
+ _ZNK13QElapsedTimer12nsecsElapsedEv @ 3793 NONAME
+ _ZNK13QSharedMemory9nativeKeyEv @ 3794 NONAME
+ _ZNK16QAnimationDriver10metaObjectEv @ 3795 NONAME
+ _ZNK16QAnimationDriver9isRunningEv @ 3796 NONAME
+ _ZNK16QXmlStreamWriter8hasErrorEv @ 3797 NONAME
+ _ZNK4QUrl11isLocalFileEv @ 3798 NONAME
+ _ZNK7QObject17senderSignalIndexEv @ 3799 NONAME
+ _ZNK7QString10startsWithERK10QStringRefN2Qt15CaseSensitivityE @ 3800 NONAME
+ _ZNK7QString11lastIndexOfERK10QStringRefiN2Qt15CaseSensitivityE @ 3801 NONAME
+ _ZNK7QString5countERK10QStringRefN2Qt15CaseSensitivityE @ 3802 NONAME
+ _ZNK7QString7indexOfERK10QStringRefiN2Qt15CaseSensitivityE @ 3803 NONAME
+ _ZNK7QString8endsWithERK10QStringRefN2Qt15CaseSensitivityE @ 3804 NONAME
+ _ZTI13QUnifiedTimer @ 3805 NONAME
+ _ZTI16QAnimationDriver @ 3806 NONAME
+ _ZTI23QAnimationDriverPrivate @ 3807 NONAME
+ _ZTV13QUnifiedTimer @ 3808 NONAME
+ _ZTV16QAnimationDriver @ 3809 NONAME
+ _ZTV23QAnimationDriverPrivate @ 3810 NONAME
+ adler32_combine @ 3811 NONAME
+ adler32_combine64 @ 3812 NONAME
+ compressBound @ 3813 NONAME
+ crc32_combine @ 3814 NONAME
+ crc32_combine64 @ 3815 NONAME
+ deflateBound @ 3816 NONAME
+ deflatePrime @ 3817 NONAME
+ deflateSetHeader @ 3818 NONAME
+ deflateTune @ 3819 NONAME
+ gzbuffer @ 3820 NONAME
+ gzclearerr @ 3821 NONAME
+ gzclose_r @ 3822 NONAME
+ gzclose_w @ 3823 NONAME
+ gzdirect @ 3824 NONAME
+ gzoffset @ 3825 NONAME
+ gzoffset64 @ 3826 NONAME
+ gzopen64 @ 3827 NONAME
+ gzseek64 @ 3828 NONAME
+ gztell64 @ 3829 NONAME
+ gzungetc @ 3830 NONAME
+ inflateBack @ 3831 NONAME
+ inflateBackEnd @ 3832 NONAME
+ inflateBackInit_ @ 3833 NONAME
+ inflateCopy @ 3834 NONAME
+ inflateGetHeader @ 3835 NONAME
+ inflateMark @ 3836 NONAME
+ inflatePrime @ 3837 NONAME
+ inflateReset2 @ 3838 NONAME
+ inflateUndermine @ 3839 NONAME
+ zlibCompileFlags @ 3840 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index fc256e4..cfbca55 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -8830,7 +8830,7 @@ EXPORTS
_ZNK14QWindowSurface10grabWidgetEPK7QWidgetRK5QRect @ 8829 NONAME
_ZNK14QWindowSurface14staticContentsEv @ 8830 NONAME
_ZNK14QWindowSurface17hasStaticContentsEv @ 8831 NONAME
- _ZNK14QWindowSurface24hasStaticContentsSupportEv @ 8832 NONAME
+ _ZNK14QWindowSurface24hasStaticContentsSupportEv @ 8832 NONAME ABSENT
_ZNK14QWindowSurface6offsetEPK7QWidget @ 8833 NONAME
_ZNK14QWindowSurface6windowEv @ 8834 NONAME
_ZNK14QWindowSurface8geometryEv @ 8835 NONAME
@@ -12034,7 +12034,7 @@ EXPORTS
_ZNK13QS60MainAppUi15ApplicationRectEv @ 12033 NONAME
_ZNK14QPlainTextEdit8anchorAtERK6QPoint @ 12034 NONAME
_ZNK14QWidgetPrivate22childAtRecursiveHelperERK6QPointbb @ 12035 NONAME
- _ZNK14QWindowSurface23hasPartialUpdateSupportEv @ 12036 NONAME
+ _ZNK14QWindowSurface23hasPartialUpdateSupportEv @ 12036 NONAME ABSENT
_ZNK15QGraphicsWidget18autoFillBackgroundEv @ 12037 NONAME
_ZNK17QRasterPixmapData7toImageERK5QRect @ 12038 NONAME
_ZNK18QRuntimePixmapData11paintEngineEv @ 12039 NONAME
@@ -12394,7 +12394,7 @@ EXPORTS
_ZNK20QBlittablePixmapData6metricEN12QPaintDevice17PaintDeviceMetricE @ 12393 NONAME
_ZNK20QBlittablePixmapData7toImageEv @ 12394 NONAME
_ZNK20QBlittablePixmapData9blittableEv @ 12395 NONAME
- _ZNK20QRasterWindowSurface24hasStaticContentsSupportEv @ 12396 NONAME
+ _ZNK20QRasterWindowSurface24hasStaticContentsSupportEv @ 12396 NONAME ABSENT
_ZNK5QFont17hintingPreferenceEv @ 12397 NONAME
_ZNK7QGlyphs12glyphIndexesEv @ 12398 NONAME
_ZNK7QGlyphs4fontEv @ 12399 NONAME
@@ -12433,4 +12433,7 @@ EXPORTS
_ZTV20QBlittablePixmapData @ 12432 NONAME
_ZTV9QScroller @ 12433 NONAME
_Zls6QDebugPK13QSymbianEvent @ 12434 NONAME
+ _ZN11QTextEngine17leadingSpaceWidthERK11QScriptLine @ 12435 NONAME
+ _ZNK14QWindowSurface8featuresEv @ 12436 NONAME
+ _ZNK20QRasterWindowSurface8featuresEv @ 12437 NONAME
diff --git a/src/s60installs/eabi/QtOpenGLu.def b/src/s60installs/eabi/QtOpenGLu.def
index 251521a..44f7306 100644
--- a/src/s60installs/eabi/QtOpenGLu.def
+++ b/src/s60installs/eabi/QtOpenGLu.def
@@ -707,54 +707,63 @@ EXPORTS
_ZNK20QGLTextureGlyphCache16maxTextureHeightEv @ 706 NONAME
_ZThn8_NK20QGLTextureGlyphCache15maxTextureWidthEv @ 707 NONAME ABSENT
_ZThn8_NK20QGLTextureGlyphCache16maxTextureHeightEv @ 708 NONAME ABSENT
- _Z28qt_resolve_buffer_extensionsP10QGLContext @ 709 NONAME
- _ZN12QGLFunctions21initializeGLFunctionsEPK10QGLContext @ 710 NONAME
- _ZN12QGLFunctionsC1EPK10QGLContext @ 711 NONAME
- _ZN12QGLFunctionsC1Ev @ 712 NONAME
- _ZN12QGLFunctionsC2EPK10QGLContext @ 713 NONAME
- _ZN12QGLFunctionsC2Ev @ 714 NONAME
- _ZN13QGLPixmapData12toNativeTypeEN11QPixmapData10NativeTypeE @ 715 NONAME
- _ZN13QGLPixmapData14fromNativeTypeEPvN11QPixmapData10NativeTypeE @ 716 NONAME
- _ZN13QGLPixmapData15fromImageReaderEP12QImageReader6QFlagsIN2Qt19ImageConversionFlagEE @ 717 NONAME
- _ZN13QGLPixmapData20createPixmapForImageER6QImage6QFlagsIN2Qt19ImageConversionFlagEEb @ 718 NONAME
- _ZN16QGLWindowSurface12swapBehaviorE @ 719 NONAME DATA 4
- _ZN17QGLContextPrivate17qt_extensionFuncsE @ 720 NONAME DATA 60
- _ZN20QGLTextureGlyphCache10setContextEPK10QGLContext @ 721 NONAME
- _ZN20QGLTextureGlyphCache11fillTextureERKN18QTextureGlyphCache5CoordEj6QFixed @ 722 NONAME
- _ZN20QGLTextureGlyphCacheC1EPK10QGLContextN21QFontEngineGlyphCache4TypeERK10QTransform @ 723 NONAME
- _ZN20QGLTextureGlyphCacheC2EPK10QGLContextN21QFontEngineGlyphCache4TypeERK10QTransform @ 724 NONAME
- _ZN26QGLFramebufferObjectFormat9setMipmapEb @ 725 NONAME
- _ZN27QGLContextGroupResourceBase5valueEPK10QGLContext @ 726 NONAME
- _ZN27QGLContextGroupResourceBase6insertEPK10QGLContextPv @ 727 NONAME
- _ZN27QGLContextGroupResourceBase7cleanupEPK10QGLContextPv @ 728 NONAME
- _ZN27QGLContextGroupResourceBaseC2Ev @ 729 NONAME
- _ZN27QGLContextGroupResourceBaseD0Ev @ 730 NONAME
- _ZN27QGLContextGroupResourceBaseD1Ev @ 731 NONAME
- _ZN27QGLContextGroupResourceBaseD2Ev @ 732 NONAME
- _ZNK12QGLFunctions14openGLFeaturesEv @ 733 NONAME
- _ZNK12QGLFunctions16hasOpenGLFeatureENS_13OpenGLFeatureE @ 734 NONAME
- _ZNK14QGLPaintDevice9isFlippedEv @ 735 NONAME
- _ZNK26QGLFramebufferObjectFormat6mipmapEv @ 736 NONAME
- _ZTI27QGLContextGroupResourceBase @ 737 NONAME
- _ZTV27QGLContextGroupResourceBase @ 738 NONAME
- _ZThn104_N20QGLTextureGlyphCacheD0Ev @ 739 NONAME
- _ZThn104_N20QGLTextureGlyphCacheD1Ev @ 740 NONAME
- _ZN13QGLPixmapData12forceToImageEv @ 741 NONAME
- _ZN13QGLPixmapData14destroyTextureEv @ 742 NONAME
- _ZN13QGLPixmapData14reclaimTextureEv @ 743 NONAME
- _ZN13QGLPixmapData21detachTextureFromPoolEv @ 744 NONAME
- _ZN13QGLPixmapData9hibernateEv @ 745 NONAME
- _ZN17QGLGraphicsSystem22releaseCachedResourcesEv @ 746 NONAME
- _ZN22QGLEngineSharedShaders15qShaderSnippetsE @ 747 NONAME DATA 216
- _ZN22QGLEngineSharedShaders16staticMetaObjectE @ 748 NONAME DATA 16
- _ZN22QGLEngineSharedShaders17shadersForContextEPK10QGLContext @ 749 NONAME
- _ZN22QGLEngineSharedShaders18cleanupCustomStageEP20QGLCustomShaderStage @ 750 NONAME
- _ZN22QGLEngineSharedShaders18findProgramInCacheERK19QGLEngineShaderProg @ 751 NONAME
- _ZN22QGLEngineSharedShaders19getStaticMetaObjectEv @ 752 NONAME
- _ZN22QGLEngineSharedShadersC1EPK10QGLContext @ 753 NONAME
- _ZN22QGLEngineSharedShadersC2EPK10QGLContext @ 754 NONAME
- _ZN22QGLEngineSharedShadersD1Ev @ 755 NONAME
- _ZN22QGLEngineSharedShadersD2Ev @ 756 NONAME
- _ZNK16QGLWindowSurface23hasPartialUpdateSupportEv @ 757 NONAME
- _ZThn8_NK16QGLWindowSurface23hasPartialUpdateSupportEv @ 758 NONAME
+ _ZN13QGLPixmapData12toNativeTypeEN11QPixmapData10NativeTypeE @ 709 NONAME
+ _ZN13QGLPixmapData14fromNativeTypeEPvN11QPixmapData10NativeTypeE @ 710 NONAME
+ _ZN13QGLPixmapData15fromImageReaderEP12QImageReader6QFlagsIN2Qt19ImageConversionFlagEE @ 711 NONAME
+ _ZN13QGLPixmapData20createPixmapForImageER6QImage6QFlagsIN2Qt19ImageConversionFlagEEb @ 712 NONAME
+ _ZN16QGLWindowSurface12swapBehaviorE @ 713 NONAME DATA 4
+ _ZN20QGLTextureGlyphCache10setContextEP10QGLContext @ 714 NONAME ABSENT
+ _ZN20QGLTextureGlyphCache5clearEv @ 715 NONAME
+ _ZN13QGLPixmapData12forceToImageEv @ 716 NONAME
+ _ZN13QGLPixmapData14destroyTextureEv @ 717 NONAME
+ _ZN13QGLPixmapData14reclaimTextureEv @ 718 NONAME
+ _ZN13QGLPixmapData21detachTextureFromPoolEv @ 719 NONAME
+ _ZN13QGLPixmapData9hibernateEv @ 720 NONAME
+ _ZN17QGLGraphicsSystem22releaseCachedResourcesEv @ 721 NONAME
+ _ZN13QGLPixmapData11idealFormatER6QImage6QFlagsIN2Qt19ImageConversionFlagEE @ 722 NONAME
+ _ZN13QGLPixmapData24releaseNativeImageHandleEv @ 723 NONAME
+ _ZN13QGLPixmapData25initFromNativeImageHandleEPvRK7QString @ 724 NONAME
+ _ZN13QGLPixmapData35createFromNativeImageHandleProviderEv @ 725 NONAME
+ _Z28qt_resolve_buffer_extensionsP10QGLContext @ 726 NONAME
+ _ZN12QGLFunctions21initializeGLFunctionsEPK10QGLContext @ 727 NONAME
+ _ZN12QGLFunctionsC1EPK10QGLContext @ 728 NONAME
+ _ZN12QGLFunctionsC1Ev @ 729 NONAME
+ _ZN12QGLFunctionsC2EPK10QGLContext @ 730 NONAME
+ _ZN12QGLFunctionsC2Ev @ 731 NONAME
+ _ZN17QGLContextPrivate17qt_extensionFuncsE @ 732 NONAME DATA 60
+ _ZN20QGLTextureGlyphCache10setContextEPK10QGLContext @ 733 NONAME
+ _ZN20QGLTextureGlyphCache11fillTextureERKN18QTextureGlyphCache5CoordEj6QFixed @ 734 NONAME
+ _ZN20QGLTextureGlyphCacheC1EPK10QGLContextN21QFontEngineGlyphCache4TypeERK10QTransform @ 735 NONAME
+ _ZN20QGLTextureGlyphCacheC2EPK10QGLContextN21QFontEngineGlyphCache4TypeERK10QTransform @ 736 NONAME
+ _ZN22QGLEngineSharedShaders15qShaderSnippetsE @ 737 NONAME DATA 216
+ _ZN22QGLEngineSharedShaders16staticMetaObjectE @ 738 NONAME DATA 16
+ _ZN22QGLEngineSharedShaders17shadersForContextEPK10QGLContext @ 739 NONAME
+ _ZN22QGLEngineSharedShaders18cleanupCustomStageEP20QGLCustomShaderStage @ 740 NONAME
+ _ZN22QGLEngineSharedShaders18findProgramInCacheERK19QGLEngineShaderProg @ 741 NONAME
+ _ZN22QGLEngineSharedShaders19getStaticMetaObjectEv @ 742 NONAME
+ _ZN22QGLEngineSharedShadersC1EPK10QGLContext @ 743 NONAME
+ _ZN22QGLEngineSharedShadersC2EPK10QGLContext @ 744 NONAME
+ _ZN22QGLEngineSharedShadersD1Ev @ 745 NONAME
+ _ZN22QGLEngineSharedShadersD2Ev @ 746 NONAME
+ _ZN26QGLFramebufferObjectFormat9setMipmapEb @ 747 NONAME
+ _ZN27QGLContextGroupResourceBase5valueEPK10QGLContext @ 748 NONAME
+ _ZN27QGLContextGroupResourceBase6insertEPK10QGLContextPv @ 749 NONAME
+ _ZN27QGLContextGroupResourceBase7cleanupEPK10QGLContext @ 750 NONAME
+ _ZN27QGLContextGroupResourceBase7cleanupEPK10QGLContextPv @ 751 NONAME
+ _ZN27QGLContextGroupResourceBaseC2Ev @ 752 NONAME
+ _ZN27QGLContextGroupResourceBaseD0Ev @ 753 NONAME
+ _ZN27QGLContextGroupResourceBaseD1Ev @ 754 NONAME
+ _ZN27QGLContextGroupResourceBaseD2Ev @ 755 NONAME
+ _ZNK12QGLFunctions14openGLFeaturesEv @ 756 NONAME
+ _ZNK12QGLFunctions16hasOpenGLFeatureENS_13OpenGLFeatureE @ 757 NONAME
+ _ZNK14QGLPaintDevice9isFlippedEv @ 758 NONAME
+ _ZNK16QGLWindowSurface8featuresEv @ 759 NONAME
+ _ZNK26QGLFramebufferObjectFormat6mipmapEv @ 760 NONAME
+ _ZTI22QGLContextResourceBase @ 761 NONAME
+ _ZTI27QGLContextGroupResourceBase @ 762 NONAME
+ _ZTV22QGLContextResourceBase @ 763 NONAME
+ _ZTV27QGLContextGroupResourceBase @ 764 NONAME
+ _ZThn104_N20QGLTextureGlyphCacheD0Ev @ 765 NONAME
+ _ZThn104_N20QGLTextureGlyphCacheD1Ev @ 766 NONAME
+ _ZThn8_NK16QGLWindowSurface8featuresEv @ 767 NONAME
diff --git a/src/s60installs/eabi/QtOpenVGu.def b/src/s60installs/eabi/QtOpenVGu.def
index 7e91b83..5b083bd 100644
--- a/src/s60installs/eabi/QtOpenVGu.def
+++ b/src/s60installs/eabi/QtOpenVGu.def
@@ -8,7 +8,7 @@ EXPORTS
_Z25qt_vg_create_paint_enginev @ 7 NONAME
_Z26qt_vg_destroy_paint_engineP14QVGPaintEngine @ 8 NONAME
_Z28qt_vg_config_to_image_formatP11QEglContext @ 9 NONAME
- _ZN13QVGPixmapData12forceToImageEv @ 10 NONAME
+ _ZN13QVGPixmapData12forceToImageEv @ 10 NONAME ABSENT
_ZN13QVGPixmapData12toNativeTypeEN11QPixmapData10NativeTypeE @ 11 NONAME
_ZN13QVGPixmapData14fromNativeTypeEPvN11QPixmapData10NativeTypeE @ 12 NONAME
_ZN13QVGPixmapData15setAlphaChannelERK7QPixmap @ 13 NONAME
@@ -206,12 +206,13 @@ EXPORTS
_ZN13QVGPixmapData8fromDataEPKhjPKc6QFlagsIN2Qt19ImageConversionFlagEE @ 205 NONAME
_ZN13QVGPixmapData8fromFileERK7QStringPKc6QFlagsIN2Qt19ImageConversionFlagEE @ 206 NONAME
_ZNK14QVGPaintEngine16canVgWritePixelsERK6QImage @ 207 NONAME
- _ZN13QVGPixmapData12updateSerialEv @ 208 NONAME ABSENT
- _ZN13QVGPixmapData4copyEPK11QPixmapDataRK5QRect @ 209 NONAME ABSENT
- _ZNK13QVGPixmapData11idealFormatEP6QImage6QFlagsIN2Qt19ImageConversionFlagEE @ 210 NONAME ABSENT
- _ZN13QVGPixmapData24releaseNativeImageHandleEv @ 211 NONAME
- _ZN13QVGPixmapData25initFromNativeImageHandleEPvRK7QString @ 212 NONAME
- _ZN13QVGPixmapData35createFromNativeImageHandleProviderEv @ 213 NONAME
- _ZNK13QVGPixmapData14ensureReadbackEb @ 214 NONAME
- _ZNK16QVGWindowSurface24hasStaticContentsSupportEv @ 215 NONAME
+ _ZN13QVGPixmapData12updateSerialEv @ 208 NONAME
+ _ZN13QVGPixmapData4copyEPK11QPixmapDataRK5QRect @ 209 NONAME
+ _ZNK13QVGPixmapData11idealFormatEP6QImage6QFlagsIN2Qt19ImageConversionFlagEE @ 210 NONAME
+ _ZNK13QVGPixmapData14ensureReadbackEb @ 211 NONAME
+ _ZN13QVGPixmapData24releaseNativeImageHandleEv @ 212 NONAME
+ _ZN13QVGPixmapData25initFromNativeImageHandleEPvRK7QString @ 213 NONAME
+ _ZN13QVGPixmapData35createFromNativeImageHandleProviderEv @ 214 NONAME
+ _ZN13QVGPixmapData12forceToImageEb @ 215 NONAME
+ _ZNK16QVGWindowSurface8featuresEv @ 216 NONAME
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 1b5a5ce..02c3da0 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -42,7 +42,7 @@ symbian: {
contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) {
qts60plugindeployment = \
- "IF package(0x20022E6D)" \
+ "IF package(0x2003A678) OR package(0x20022E6D)" \
" \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \
" \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \
"ELSEIF package(0x1028315F)" \
diff --git a/src/sql/kernel/qsqldriver.cpp b/src/sql/kernel/qsqldriver.cpp
index c8a16c8..bbec21d 100644
--- a/src/sql/kernel/qsqldriver.cpp
+++ b/src/sql/kernel/qsqldriver.cpp
@@ -496,7 +496,7 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName,
s.append(QLatin1String("UPDATE ")).append(tableName).append(
QLatin1String(" SET "));
for (i = 0; i < rec.count(); ++i) {
- if (!rec.isGenerated(i) || !rec.value(i).isValid())
+ if (!rec.isGenerated(i))
continue;
s.append(prepareIdentifier(rec.fieldName(i), QSqlDriver::FieldName, this)).append(QLatin1Char('='));
if (preparedStatement)
@@ -517,7 +517,7 @@ QString QSqlDriver::sqlStatement(StatementType type, const QString &tableName,
s.append(QLatin1String("INSERT INTO ")).append(tableName).append(QLatin1String(" ("));
QString vals;
for (i = 0; i < rec.count(); ++i) {
- if (!rec.isGenerated(i) || !rec.value(i).isValid())
+ if (!rec.isGenerated(i))
continue;
s.append(prepareIdentifier(rec.fieldName(i), QSqlDriver::FieldName, this)).append(QLatin1String(", "));
if (preparedStatement)
diff --git a/src/sql/kernel/qsqlfield.cpp b/src/sql/kernel/qsqlfield.cpp
index a1ab9e3..b7e58b7 100644
--- a/src/sql/kernel/qsqlfield.cpp
+++ b/src/sql/kernel/qsqlfield.cpp
@@ -162,6 +162,7 @@ public:
QSqlField::QSqlField(const QString& fieldName, QVariant::Type type)
{
d = new QSqlFieldPrivate(fieldName, type);
+ val = QVariant(type);
}
/*!
@@ -389,6 +390,8 @@ void QSqlField::setType(QVariant::Type type)
{
detach();
d->type = type;
+ if (!val.isValid())
+ val = QVariant(type);
}
diff --git a/src/sql/models/qsqlrelationaltablemodel.cpp b/src/sql/models/qsqlrelationaltablemodel.cpp
index a261586..63633e6 100644
--- a/src/sql/models/qsqlrelationaltablemodel.cpp
+++ b/src/sql/models/qsqlrelationaltablemodel.cpp
@@ -275,6 +275,7 @@ int QSqlRelationalTableModelPrivate::nameToIndex(const QString &name) const
void QSqlRelationalTableModelPrivate::clearEditBuffer()
{
editBuffer = baseRec;
+ clearGenerated(editBuffer);
}
/*!
@@ -410,13 +411,14 @@ QVariant QSqlRelationalTableModel::data(const QModelIndex &index, int role) cons
case OnFieldChange:
break;
case OnRowChange:
- if (index.row() == d->editIndex || index.row() == d->insertIndex) {
+ if ((index.row() == d->editIndex || index.row() == d->insertIndex)
+ && d->editBuffer.isGenerated(index.column()))
v = d->editBuffer.value(index.column());
- }
break;
case OnManualSubmit:
const QSqlTableModelPrivate::ModifiedRow row = d->cache.value(index.row());
- v = row.rec.value(index.column());
+ if (row.op != QSqlTableModelPrivate::None && row.rec.isGenerated(index.column()))
+ v = row.rec.value(index.column());
break;
}
if (v.isValid())
@@ -678,8 +680,10 @@ void QSqlRelationalTableModelPrivate::translateFieldNames(int row, QSqlRecord &v
int realCol = q->indexInQuery(q->createIndex(row, i)).column();
if (realCol != -1 && relations.value(realCol).isValid()) {
QVariant v = values.value(i);
+ bool gen = values.isGenerated(i);
values.replace(i, baseRec.field(realCol));
values.setValue(i, v);
+ values.setGenerated(i, gen);
}
}
}
diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp
index bf7c0aa..99b516a 100644
--- a/src/sql/models/qsqltablemodel.cpp
+++ b/src/sql/models/qsqltablemodel.cpp
@@ -138,6 +138,7 @@ void QSqlTableModelPrivate::revertInsertedRow()
void QSqlTableModelPrivate::clearEditBuffer()
{
editBuffer = rec;
+ clearGenerated(editBuffer);
}
void QSqlTableModelPrivate::clearCache()
@@ -145,6 +146,18 @@ void QSqlTableModelPrivate::clearCache()
cache.clear();
}
+void QSqlTableModelPrivate::clearGenerated(QSqlRecord &rec)
+{
+ for (int i = rec.count() - 1; i >= 0; i--)
+ rec.setGenerated(i, false);
+}
+
+void QSqlTableModelPrivate::setGeneratedValue(QSqlRecord &rec, int c, QVariant v)
+{
+ rec.setValue(c, v);
+ rec.setGenerated(c, true);
+}
+
void QSqlTableModelPrivate::revertCachedRow(int row)
{
Q_Q(QSqlTableModel);
@@ -201,7 +214,7 @@ bool QSqlTableModelPrivate::exec(const QString &stmt, bool prepStatement,
}
int i;
for (i = 0; i < rec.count(); ++i) {
- if (rec.isGenerated(i) && rec.value(i).type() != QVariant::Invalid)
+ if (rec.isGenerated(i))
editQuery.addBindValue(rec.value(i));
}
for (i = 0; i < whereValues.count(); ++i) {
@@ -435,26 +448,22 @@ QVariant QSqlTableModel::data(const QModelIndex &index, int role) const
case OnFieldChange:
case OnRowChange:
if (index.row() == d->insertIndex) {
- QVariant val;
if (item.column() < 0 || item.column() >= d->rec.count())
- return val;
- val = d->editBuffer.value(index.column());
- if (val.type() == QVariant::Invalid)
- val = QVariant(d->rec.field(item.column()).type());
- return val;
+ return QVariant();
+ return d->editBuffer.value(index.column());
}
if (d->editIndex == item.row()) {
- QVariant var = d->editBuffer.value(item.column());
- if (var.isValid())
- return var;
+ if (d->editBuffer.isGenerated(item.column()))
+ return d->editBuffer.value(item.column());
+ }
+ break;
+ case OnManualSubmit:
+ if (d->cache.contains(index.row())) {
+ const QSqlTableModelPrivate::ModifiedRow row = d->cache.value(index.row());
+ if (row.rec.isGenerated(item.column()) || row.op == QSqlTableModelPrivate::Insert)
+ return row.rec.value(item.column());
}
break;
- case OnManualSubmit: {
- const QSqlTableModelPrivate::ModifiedRow row = d->cache.value(index.row());
- const QVariant var = row.rec.value(item.column());
- if (var.isValid() || row.op == QSqlTableModelPrivate::Insert)
- return var;
- break; }
}
// We need to handle row mapping here, but not column mapping
@@ -503,13 +512,13 @@ bool QSqlTableModel::isDirty(const QModelIndex &index) const
case OnFieldChange:
return false;
case OnRowChange:
- return index.row() == d->editIndex && d->editBuffer.value(index.column()).isValid();
+ return index.row() == d->editIndex && d->editBuffer.isGenerated(index.column());
case OnManualSubmit: {
const QSqlTableModelPrivate::ModifiedRow row = d->cache.value(index.row());
return row.op == QSqlTableModelPrivate::Insert
|| row.op == QSqlTableModelPrivate::Delete
|| (row.op == QSqlTableModelPrivate::Update
- && row.rec.value(index.column()).isValid());
+ && row.rec.isGenerated(index.column()));
}
}
return false;
@@ -538,11 +547,11 @@ bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, in
switch (d->strategy) {
case OnFieldChange: {
if (index.row() == d->insertIndex) {
- d->editBuffer.setValue(index.column(), value);
+ QSqlTableModelPrivate::setGeneratedValue(d->editBuffer, index.column(), value);
return true;
}
d->clearEditBuffer();
- d->editBuffer.setValue(index.column(), value);
+ QSqlTableModelPrivate::setGeneratedValue(d->editBuffer, index.column(), value);
isOk = updateRowInTable(index.row(), d->editBuffer);
if (isOk)
select();
@@ -550,7 +559,7 @@ bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, in
break; }
case OnRowChange:
if (index.row() == d->insertIndex) {
- d->editBuffer.setValue(index.column(), value);
+ QSqlTableModelPrivate::setGeneratedValue(d->editBuffer, index.column(), value);
return true;
}
if (d->editIndex != index.row()) {
@@ -558,7 +567,7 @@ bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, in
submit();
d->clearEditBuffer();
}
- d->editBuffer.setValue(index.column(), value);
+ QSqlTableModelPrivate::setGeneratedValue(d->editBuffer, index.column(), value);
d->editIndex = index.row();
emit dataChanged(index, index);
break;
@@ -567,9 +576,10 @@ bool QSqlTableModel::setData(const QModelIndex &index, const QVariant &value, in
if (row.op == QSqlTableModelPrivate::None) {
row.op = QSqlTableModelPrivate::Update;
row.rec = d->rec;
+ QSqlTableModelPrivate::clearGenerated(row.rec);
row.primaryValues = d->primaryValues(indexInQuery(index).row());
}
- row.rec.setValue(index.column(), value);
+ QSqlTableModelPrivate::setGeneratedValue(row.rec, index.column(), value);
emit dataChanged(index, index);
break; }
}
@@ -1330,6 +1340,7 @@ bool QSqlTableModel::setRecord(int row, const QSqlRecord &record)
if (mrow.op == QSqlTableModelPrivate::None) {
mrow.op = QSqlTableModelPrivate::Update;
mrow.rec = d->rec;
+ QSqlTableModelPrivate::clearGenerated(mrow.rec);
mrow.primaryValues = d->primaryValues(indexInQuery(createIndex(row, 0)).row());
}
QString fieldName;
@@ -1338,10 +1349,11 @@ bool QSqlTableModel::setRecord(int row, const QSqlRecord &record)
if (d->db.driver()->isIdentifierEscaped(fieldName, QSqlDriver::FieldName))
fieldName = d->db.driver()->stripDelimiters(fieldName, QSqlDriver::FieldName);
int idx = mrow.rec.indexOf(fieldName);
- if (idx == -1)
+ if (idx == -1) {
isOk = false;
- else
- mrow.rec.setValue(idx, record.value(i));
+ } else {
+ QSqlTableModelPrivate::setGeneratedValue(mrow.rec, idx, record.value(i));
+ }
}
if (isOk)
diff --git a/src/sql/models/qsqltablemodel_p.h b/src/sql/models/qsqltablemodel_p.h
index f4f3811..322c23b 100644
--- a/src/sql/models/qsqltablemodel_p.h
+++ b/src/sql/models/qsqltablemodel_p.h
@@ -72,6 +72,8 @@ public:
QSqlRecord primaryValues(int index);
virtual void clearEditBuffer();
virtual void clearCache();
+ static void clearGenerated(QSqlRecord &rec);
+ static void setGeneratedValue(QSqlRecord &rec, int c, QVariant v);
QSqlRecord record(const QVector<QVariant> &values) const;
bool exec(const QString &stmt, bool prepStatement,
@@ -100,7 +102,7 @@ public:
struct ModifiedRow
{
- ModifiedRow(Op o = None, const QSqlRecord &r = QSqlRecord()): op(o), rec(r) {}
+ ModifiedRow(Op o = None, const QSqlRecord &r = QSqlRecord()): op(o), rec(r) { clearGenerated(rec);}
ModifiedRow(const ModifiedRow &other): op(other.op), rec(other.rec), primaryValues(other.primaryValues) {}
Op op;
QSqlRecord rec;
diff --git a/src/testlib/qsignalspy.qdoc b/src/testlib/qsignalspy.qdoc
index 298b2b7..0c22868 100644
--- a/src/testlib/qsignalspy.qdoc
+++ b/src/testlib/qsignalspy.qdoc
@@ -38,7 +38,7 @@
The following example records all signal emissions for the \c clicked() signal
of a QCheckBox:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 0
\c{spy.takeFirst()} returns the arguments for the first emitted signal, as a
list of QVariant objects. The \c clicked() signal has a single bool argument,
@@ -46,17 +46,17 @@
The example below catches a signal from a custom object:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 1
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 1
\bold {Note:} Non-standard data types need to be registered, using
the qRegisterMetaType() function, before you can create a
QSignalSpy. For example:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 2
To retrieve the \c QModelIndex, you can use qvariant_cast:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 3
*/
/*! \fn QSignalSpy::QSignalSpy(QObject *object, const char *signal)
@@ -65,7 +65,7 @@
from the QObject \a object. Neither \a signal nor \a object can be null.
Example:
- \snippet doc/src/snippets/code/doc_src_qsignalspy.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qsignalspy.cpp 4
*/
/*! \fn QSignalSpy::isValid() const
diff --git a/src/testlib/qtestevent.qdoc b/src/testlib/qtestevent.qdoc
index 84e874b..4c695c2 100644
--- a/src/testlib/qtestevent.qdoc
+++ b/src/testlib/qtestevent.qdoc
@@ -39,7 +39,7 @@
QWidget.
Example:
- \snippet doc/src/snippets/code/doc_src_qtestevent.qdoc 0
+ \snippet doc/src/snippets/code/doc_src_qtestevent.cpp 0
The example above simulates the user entering the character \c a
followed by a backspace, waiting for 200 milliseconds and
diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
index 9e090d2..c5a3d14 100644
--- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
+++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp
@@ -91,6 +91,7 @@ private slots:
void sourceSize_QTBUG_14303();
void sourceSize_QTBUG_16389();
void nullPixmapPaint();
+ void resetSourceSize();
void testQtQuick11Attributes();
void testQtQuick11Attributes_data();
@@ -693,6 +694,27 @@ void tst_qdeclarativeimage::nullPixmapPaint()
delete image;
}
+void tst_qdeclarativeimage::resetSourceSize()
+{
+ QString src = QUrl::fromLocalFile(SRCDIR "/data/heart200.png").toString();
+ QString componentStr = "import QtQuick 1.1\nImage { function reset() { sourceSize = undefined }\nsource: \"" + src + "\"; sourceSize: Qt.size(100,100) }";
+
+ QDeclarativeComponent component(&engine);
+ component.setData(componentStr.toLatin1(), QUrl::fromLocalFile(""));
+ QDeclarativeImage *obj = qobject_cast<QDeclarativeImage*>(component.create());
+ QVERIFY(obj != 0);
+ QCOMPARE(obj->pixmap().width(), 100);
+ QCOMPARE(obj->pixmap().height(), 100);
+ QCOMPARE(obj->sourceSize().height(), 100);
+ QCOMPARE(obj->sourceSize().width(), 100);
+
+ QMetaObject::invokeMethod(obj, "reset");
+ QCOMPARE(obj->pixmap().width(), 200);
+ QCOMPARE(obj->pixmap().height(), 200);
+ QCOMPARE(obj->sourceSize().height(), 200);
+ QCOMPARE(obj->sourceSize().width(), 200);
+}
+
void tst_qdeclarativeimage::testQtQuick11Attributes()
{
QFETCH(QString, code);
diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
index 5a2591f..2ce493b 100644
--- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
+++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp
@@ -174,7 +174,7 @@ private:
QVERIFY(component.errors().isEmpty()); \
} else { \
QFile file(QLatin1String(SRCDIR) + QLatin1String("/data/") + QLatin1String(errorfile)); \
- QVERIFY(file.open(QIODevice::ReadOnly)); \
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); \
QByteArray data = file.readAll(); \
file.close(); \
QList<QByteArray> expected = data.split('\n'); \
diff --git a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
index dc104e2..9d1c609 100644
--- a/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
+++ b/tests/auto/declarative/qdeclarativemoduleplugin/tst_qdeclarativemoduleplugin.cpp
@@ -85,7 +85,7 @@ private slots:
QVERIFY(component.errors().isEmpty()); \
} else { \
QFile file(QLatin1String("data/") + QLatin1String(errorfile)); \
- QVERIFY(file.open(QIODevice::ReadOnly)); \
+ QVERIFY(file.open(QIODevice::ReadOnly | QIODevice::Text)); \
QByteArray data = file.readAll(); \
file.close(); \
QList<QByteArray> expected = data.split('\n'); \
diff --git a/tests/auto/declarative/qdeclarativepincharea/data/flickresize.qml b/tests/auto/declarative/qdeclarativepincharea/data/flickresize.qml
new file mode 100644
index 0000000..2da58fc
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativepincharea/data/flickresize.qml
@@ -0,0 +1,50 @@
+import QtQuick 1.1
+
+Flickable {
+ id: flick
+ property real scale: 1.0
+ width: 640
+ height: 360
+ contentWidth: 500
+ contentHeight: 500
+
+ PinchArea {
+ objectName: "pincharea"
+ width: Math.max(flick.contentWidth, flick.width)
+ height: Math.max(flick.contentHeight, flick.height)
+
+ property real initialWidth
+ property real initialHeight
+ onPinchStarted: {
+ initialWidth = flick.contentWidth
+ initialHeight = flick.contentHeight
+ }
+
+ onPinchUpdated: {
+ // adjust content pos due to drag
+ flick.contentX += pinch.previousCenter.x - pinch.center.x
+ flick.contentY += pinch.previousCenter.y - pinch.center.y
+
+ // resize content
+ flick.resizeContent(initialWidth * pinch.scale, initialHeight * pinch.scale, pinch.center)
+ flick.scale = pinch.scale
+ }
+
+ onPinchFinished: {
+ // Move its content within bounds.
+ flick.returnToBounds()
+ }
+
+ Rectangle {
+ width: flick.contentWidth
+ height: flick.contentHeight
+ color: "white"
+ Rectangle {
+ anchors.centerIn: parent
+ width: parent.width-40
+ height: parent.height-40
+ color: "blue"
+ }
+ }
+ }
+}
diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
index f175033..90506ba 100644
--- a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
+++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp
@@ -43,6 +43,7 @@
#include <QtTest/QSignalSpy>
#include <private/qdeclarativepincharea_p.h>
#include <private/qdeclarativerectangle_p.h>
+#include <private/qdeclarativeflickable_p.h>
#include <QtDeclarative/qdeclarativeview.h>
#include <QtDeclarative/qdeclarativecontext.h>
@@ -58,6 +59,7 @@ private slots:
void pinchProperties();
void scale();
void pan();
+ void flickable();
private:
QDeclarativeView *createView();
@@ -301,6 +303,77 @@ void tst_QDeclarativePinchArea::pan()
delete canvas;
}
+void tst_QDeclarativePinchArea::flickable()
+{
+ QDeclarativeView *canvas = createView();
+ canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/flickresize.qml"));
+ canvas->show();
+ canvas->setFocus();
+ QTest::qWaitForWindowShown(canvas);
+ QVERIFY(canvas->rootObject() != 0);
+ qApp->processEvents();
+
+ QDeclarativePinchArea *pinchArea = canvas->rootObject()->findChild<QDeclarativePinchArea*>("pincharea");
+ QDeclarativePinch *pinch = pinchArea->pinch();
+ QVERIFY(pinchArea != 0);
+ QVERIFY(pinch != 0);
+
+ QDeclarativeFlickable *root = qobject_cast<QDeclarativeFlickable*>(canvas->rootObject());
+ QVERIFY(root != 0);
+
+ QWidget *vp = canvas->viewport();
+
+ QPoint p1(110, 80);
+ QPoint p2(100, 100);
+
+ // begin by moving one touch point (mouse)
+ QTest::mousePress(vp, Qt::LeftButton, 0, canvas->mapFromScene(p1));
+ QTest::touchEvent(vp).press(0, p1);
+ {
+ p1 -= QPoint(10,10);
+ QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(p1), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
+ QApplication::sendEvent(canvas->viewport(), &mv);
+ QTest::touchEvent(vp).move(0, p1);
+ }
+ {
+ p1 -= QPoint(10,10);
+ QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(p1), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
+ QApplication::sendEvent(vp, &mv);
+ QTest::touchEvent(vp).move(0, p1);
+ }
+ {
+ p1 -= QPoint(10,10);
+ QMouseEvent mv(QEvent::MouseMove, canvas->mapFromScene(p1), Qt::LeftButton, Qt::LeftButton,Qt::NoModifier);
+ QApplication::sendEvent(vp, &mv);
+ QTest::touchEvent(vp).move(0, p1);
+ }
+
+ // Flickable has reacted to the gesture
+ QVERIFY(root->isMoving());
+ QVERIFY(root->property("scale").toReal() == 1.0);
+
+ // add another touch point and continue moving
+ QTest::touchEvent(vp).stationary(0).press(1, p2);
+ p1 -= QPoint(10,10);
+ p2 += QPoint(10,10);
+ QTest::touchEvent(vp).move(0, p1).move(1, p2);
+
+ QCOMPARE(root->property("scale").toReal(), 1.0);
+
+ p1 -= QPoint(10,10);
+ p2 += QPoint(10,10);
+ QTest::touchEvent(vp).move(0, p1).move(1, p2);
+
+ // PinchArea has stolen the gesture.
+ QVERIFY(!root->isMoving());
+ QVERIFY(root->property("scale").toReal() > 1.0);
+
+ QTest::mouseRelease(vp, Qt::LeftButton, 0, canvas->mapFromScene(p1));
+ QTest::touchEvent(vp).release(0, p1).release(1, p2);
+
+ delete canvas;
+}
+
QDeclarativeView *tst_QDeclarativePinchArea::createView()
{
QDeclarativeView *canvas = new QDeclarativeView(0);
diff --git a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
index 92ab722..78821cb 100644
--- a/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
+++ b/tests/auto/declarative/qdeclarativepositioners/tst_qdeclarativepositioners.cpp
@@ -154,6 +154,15 @@ void tst_QDeclarativePositioners::test_horizontal_rtl()
QCOMPARE(row->width(), 110.0);
QCOMPARE(row->height(), 50.0);
+ // Change the width of the row and check that items stay to the right
+ row->setWidth(200);
+ QCOMPARE(one->x(), 150.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 130.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 90.0);
+ QCOMPARE(three->y(), 0.0);
+
delete canvas;
}
@@ -527,6 +536,19 @@ void tst_QDeclarativePositioners::test_grid_rightToLeft()
QCOMPARE(grid->width(), 100.0);
QCOMPARE(grid->height(), 100.0);
+ // Change the width of the grid and check that items stay to the right
+ grid->setWidth(200);
+ QCOMPARE(one->x(), 150.0);
+ QCOMPARE(one->y(), 0.0);
+ QCOMPARE(two->x(), 130.0);
+ QCOMPARE(two->y(), 0.0);
+ QCOMPARE(three->x(), 100.0);
+ QCOMPARE(three->y(), 0.0);
+ QCOMPARE(four->x(), 150.0);
+ QCOMPARE(four->y(), 50.0);
+ QCOMPARE(five->x(), 140.0);
+ QCOMPARE(five->y(), 50.0);
+
delete canvas;
}
diff --git a/tests/auto/declarative/qdeclarativetextedit/data/CursorRect.qml b/tests/auto/declarative/qdeclarativetextedit/data/CursorRect.qml
new file mode 100644
index 0000000..3af0313
--- /dev/null
+++ b/tests/auto/declarative/qdeclarativetextedit/data/CursorRect.qml
@@ -0,0 +1,8 @@
+import QtQuick 1.0
+
+TextEdit {
+ focus: true
+ objectName: "myEdit"
+ width: 50
+ text: "This is a long piece of text"
+}
diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
index f62c2c5..8f1be6f 100644
--- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
+++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp
@@ -148,6 +148,7 @@ private slots:
void preeditMicroFocus();
void inputContextMouseHandler();
void inputMethodComposing();
+ void cursorRectangleSize();
private:
void simulateKey(QDeclarativeView *, int key, Qt::KeyboardModifiers modifiers = 0);
@@ -1340,6 +1341,12 @@ void tst_qdeclarativetextedit::mouseSelection()
else
QVERIFY(str.isEmpty());
+ // Clicking and shift to clicking between the same points should select the same text.
+ textEditObject->setCursorPosition(0);
+ QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::NoModifier, canvas->mapFromScene(QPoint(x1,y)));
+ QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::ShiftModifier, canvas->mapFromScene(QPoint(x2,y)));
+ QCOMPARE(textEditObject->selectedText(), str);
+
delete canvas;
}
@@ -1436,6 +1443,12 @@ void tst_qdeclarativetextedit::mouseSelectionMode()
QVERIFY(str != text);
}
+ // Clicking and shift to clicking between the same points should select the same text.
+ textEditObject->setCursorPosition(0);
+ QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::NoModifier, canvas->mapFromScene(QPoint(x1,y)));
+ QTest::mouseClick(canvas->viewport(), Qt::LeftButton, Qt::ShiftModifier, canvas->mapFromScene(QPoint(x2,y)));
+ QCOMPARE(textEditObject->selectedText(), str);
+
delete canvas;
}
@@ -2409,6 +2422,25 @@ void tst_qdeclarativetextedit::inputMethodComposing()
QCOMPARE(spy.count(), 2);
}
+void tst_qdeclarativetextedit::cursorRectangleSize()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/CursorRect.qml");
+ QVERIFY(canvas->rootObject() != 0);
+ canvas->show();
+ canvas->setFocus();
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+
+ QDeclarativeTextEdit *textEdit = qobject_cast<QDeclarativeTextEdit *>(canvas->rootObject());
+ QVERIFY(textEdit != 0);
+ textEdit->setFocus(Qt::OtherFocusReason);
+ QRectF cursorRect = textEdit->positionToRectangle(textEdit->cursorPosition());
+ QRectF microFocusFromScene = canvas->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF();
+ QRectF microFocusFromApp= QApplication::focusWidget()->inputMethodQuery(Qt::ImMicroFocus).toRectF();
+
+ QCOMPARE(microFocusFromScene.size(), cursorRect.size());
+ QCOMPARE(microFocusFromApp.size(), cursorRect.size());
+}
QTEST_MAIN(tst_qdeclarativetextedit)
#include "tst_qdeclarativetextedit.moc"
diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
index 45f38a4..ef32ee3 100644
--- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
+++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp
@@ -135,6 +135,7 @@ private slots:
void preeditMicroFocus();
void inputContextMouseHandler();
void inputMethodComposing();
+ void cursorRectangleSize();
private:
void simulateKey(QDeclarativeView *, int key);
@@ -604,10 +605,8 @@ void tst_qdeclarativetextinput::moveCursorSelection_data()
<< standard[2] << 13 << 6 << QDeclarativeTextInput::SelectWords << 6 << 13 << false;
QTest::newRow("Hello<(, world!)>|words")
<< standard[2] << 5 << 13 << QDeclarativeTextInput::SelectWords << 5 << 13 << true;
- // Fails due to an issue with QTextBoundaryFinder and punctuation at the end of strings.
- // QTBUG-11365
- // QTest::newRow("world<(!)>|words")
- // << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true;
+ QTest::newRow("world<(!)>|words")
+ << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true;
QTest::newRow("world!<()>)|words")
<< standard[2] << 13 << 13 << QDeclarativeTextInput::SelectWords << 13 << 13 << true;
QTest::newRow("world<()>!)|words")
@@ -653,16 +652,15 @@ void tst_qdeclarativetextinput::moveCursorSelection_data()
QTest::newRow(" <s(pac)ey> text |words")
<< standard[4] << 1 << 4 << QDeclarativeTextInput::SelectWords << 1 << 7 << true;
QTest::newRow(" spacey <t(ex)t> |words")
- << standard[4] << 11 << 13 << QDeclarativeTextInput::SelectWords << 10 << 14 << false; // Should be reversible. QTBUG-11365
+ << standard[4] << 11 << 13 << QDeclarativeTextInput::SelectWords << 10 << 14 << true;
QTest::newRow("<( )>spacey text |words|ltr")
<< standard[4] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 1 << false;
QTest::newRow("<( )spacey> text |words|rtl")
<< standard[4] << 1 << 0 << QDeclarativeTextInput::SelectWords << 0 << 7 << false;
QTest::newRow("spacey <text( )>|words|ltr")
<< standard[4] << 14 << 15 << QDeclarativeTextInput::SelectWords << 10 << 15 << false;
-// QTBUG-11365
-// QTest::newRow("spacey text<( )>|words|rtl")
-// << standard[4] << 15 << 14 << QDeclarativeTextInput::SelectWords << 14 << 15 << false;
+ QTest::newRow("spacey text<( )>|words|rtl")
+ << standard[4] << 15 << 14 << QDeclarativeTextInput::SelectWords << 14 << 15 << false;
QTest::newRow("<()> spacey text |words")
<< standard[4] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << false;
QTest::newRow(" spacey text <()>|words")
@@ -857,23 +855,21 @@ void tst_qdeclarativetextinput::moveCursorSelectionSequence_data()
<< 15 << 12 << 15
<< 10 << 15
<< 15 << 15;
-// QTBUG-11365
-// QTest::newRow(" spacey <te(xt{^ )>}|rtl")
-// << standard[4]
-// << 15 << 12 << 14
-// << 10 << 15
-// << 14 << 15;
+ QTest::newRow(" spacey <te(xt{^ )>}|rtl")
+ << standard[4]
+ << 15 << 12 << 14
+ << 10 << 15
+ << 14 << 15;
QTest::newRow(" spacey {<te(x^t} )>|ltr")
<< standard[4]
<< 12 << 15 << 13
<< 10 << 15
<< 10 << 14;
-// QTBUG-11365
-// QTest::newRow(" spacey {<te(xt^} )>|ltr")
-// << standard[4]
-// << 12 << 15 << 14
-// << 10 << 15
-// << 10 << 14;
+ QTest::newRow(" spacey {<te(xt^} )>|ltr")
+ << standard[4]
+ << 12 << 15 << 14
+ << 10 << 15
+ << 10 << 14;
}
void tst_qdeclarativetextinput::moveCursorSelectionSequence()
@@ -1633,12 +1629,11 @@ void tst_qdeclarativetextinput::cursorDelegate()
//Test Delegate gets moved
for(int i=0; i<= textInputObject->text().length(); i++){
textInputObject->setCursorPosition(i);
- //+5 is because the TextInput cursorRectangle is just a 10xHeight area centered on cursor position
- QCOMPARE(textInputObject->cursorRectangle().x() + 5, qRound(delegateObject->x()));
+ QCOMPARE(textInputObject->cursorRectangle().x(), qRound(delegateObject->x()));
QCOMPARE(textInputObject->cursorRectangle().y(), qRound(delegateObject->y()));
}
textInputObject->setCursorPosition(0);
- QCOMPARE(textInputObject->cursorRectangle().x()+5, qRound(delegateObject->x()));
+ QCOMPARE(textInputObject->cursorRectangle().x(), qRound(delegateObject->x()));
QCOMPARE(textInputObject->cursorRectangle().y(), qRound(delegateObject->y()));
//Test Delegate gets deleted
textInputObject->setCursorDelegate(0);
@@ -1727,19 +1722,26 @@ void tst_qdeclarativetextinput::cursorRectangle()
QRect r;
+ // some tolerance for different fonts.
+#ifdef Q_OS_LINUX
+ const int error = 2;
+#else
+ const int error = 5;
+#endif
+
for (int i = 0; i <= 5; ++i) {
input.setCursorPosition(i);
r = input.cursorRectangle();
int textWidth = fm.width(text.mid(0, i));
- QVERIFY(r.left() < textWidth);
- QVERIFY(r.right() > textWidth);
+ QVERIFY(r.left() < textWidth + error);
+ QVERIFY(r.right() > textWidth - error);
QCOMPARE(input.inputMethodQuery(Qt::ImMicroFocus).toRect(), r);
}
// Check the cursor rectangle remains within the input bounding rect when auto scrolling.
QVERIFY(r.left() < input.boundingRect().width());
- QVERIFY(r.right() >= input.width());
+ QVERIFY(r.right() >= input.width() - error);
for (int i = 6; i < text.length(); ++i) {
input.setCursorPosition(i);
@@ -2240,18 +2242,25 @@ void tst_qdeclarativetextinput::preeditAutoScroll()
QCOMPARE(input.positionAt(0), 0);
QCOMPARE(input.positionAt(input.width()), 5);
+ // some tolerance for different fonts.
+#ifdef Q_OS_LINUX
+ const int error = 2;
+#else
+ const int error = 5;
+#endif
+
// test if the preedit is larger than the text input that the
// character preceding the cursor is still visible.
qreal x = input.positionToRectangle(0).x();
for (int i = 0; i < 3; ++i) {
ic.sendPreeditText(preeditText, i + 1);
- QVERIFY(input.cursorRectangle().right() >= fm.width(preeditText.at(i)));
+ QVERIFY(input.cursorRectangle().right() >= fm.width(preeditText.at(i)) - error);
QVERIFY(input.positionToRectangle(0).x() < x);
x = input.positionToRectangle(0).x();
}
for (int i = 1; i >= 0; --i) {
ic.sendPreeditText(preeditText, i + 1);
- QVERIFY(input.cursorRectangle().right() >= fm.width(preeditText.at(i)));
+ QVERIFY(input.cursorRectangle().right() >= fm.width(preeditText.at(i)) - error);
QVERIFY(input.positionToRectangle(0).x() > x);
x = input.positionToRectangle(0).x();
}
@@ -2489,6 +2498,26 @@ void tst_qdeclarativetextinput::inputMethodComposing()
QCOMPARE(spy.count(), 2);
}
+void tst_qdeclarativetextinput::cursorRectangleSize()
+{
+ QDeclarativeView *canvas = createView(SRCDIR "/data/positionAt.qml");
+ QVERIFY(canvas->rootObject() != 0);
+ canvas->show();
+ canvas->setFocus();
+ QApplication::setActiveWindow(canvas);
+ QTest::qWaitForWindowShown(canvas);
+
+ QDeclarativeTextInput *textInput = qobject_cast<QDeclarativeTextInput *>(canvas->rootObject());
+ QVERIFY(textInput != 0);
+ textInput->setFocus(Qt::OtherFocusReason);
+ QRectF cursorRect = textInput->positionToRectangle(textInput->cursorPosition());
+ QRectF microFocusFromScene = canvas->scene()->inputMethodQuery(Qt::ImMicroFocus).toRectF();
+ QRectF microFocusFromApp= QApplication::focusWidget()->inputMethodQuery(Qt::ImMicroFocus).toRectF();
+
+ QCOMPARE(microFocusFromScene.size(), cursorRect.size());
+ QCOMPARE(microFocusFromApp.size(), cursorRect.size());
+}
+
QTEST_MAIN(tst_qdeclarativetextinput)
#include "tst_qdeclarativetextinput.moc"
diff --git a/tests/auto/qdir/qdir.pro b/tests/auto/qdir/qdir.pro
index 472e646..384c048 100644
--- a/tests/auto/qdir/qdir.pro
+++ b/tests/auto/qdir/qdir.pro
@@ -4,7 +4,7 @@ RESOURCES += qdir.qrc
QT = core
wince*|symbian {
- DirFiles.files = testdir testdata searchdir resources entrylist types tst_qdir.cpp
+ DirFiles.files = testdir testData searchdir resources entrylist types tst_qdir.cpp
DirFiles.path = .
DEPLOYMENT += DirFiles
}
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 1b4b503..64d49d8 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -262,6 +262,10 @@ void tst_QFtp::init()
void tst_QFtp::cleanup()
{
+ if (ftp) {
+ delete ftp;
+ ftp = 0;
+ }
QFETCH_GLOBAL(bool, setProxy);
if (setProxy) {
QNetworkProxy::setApplicationProxy(QNetworkProxy::DefaultProxy);
@@ -289,6 +293,7 @@ void tst_QFtp::connectToHost()
QTestEventLoop::instance().enterLoop( 61 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -337,6 +342,7 @@ void tst_QFtp::connectToUnresponsiveHost()
QVERIFY( it.value().success == 0 );
delete ftp;
+ ftp = 0;
}
void tst_QFtp::login_data()
@@ -369,6 +375,7 @@ void tst_QFtp::login()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -415,6 +422,7 @@ void tst_QFtp::close()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -482,6 +490,7 @@ void tst_QFtp::list()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -542,6 +551,7 @@ void tst_QFtp::cd()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() ) {
QFAIL( "Network operation timed out" );
}
@@ -617,6 +627,7 @@ void tst_QFtp::get()
QTestEventLoop::instance().enterLoop( 50 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -743,6 +754,7 @@ void tst_QFtp::put()
break;
}
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -775,6 +787,7 @@ void tst_QFtp::put()
break;
}
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -792,6 +805,7 @@ void tst_QFtp::put()
QTestEventLoop::instance().enterLoop( timestep );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -860,6 +874,7 @@ void tst_QFtp::mkdir()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -884,6 +899,7 @@ void tst_QFtp::mkdir()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -903,6 +919,7 @@ void tst_QFtp::mkdir()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -942,6 +959,7 @@ void tst_QFtp::mkdir2()
QVERIFY(commandFinishedSpy.at(3).at(1).toBool());
delete ftp;
+ ftp = 0;
}
void tst_QFtp::mkdir2Slot(int id, bool)
@@ -1019,6 +1037,7 @@ void tst_QFtp::renameInit( const QString &host, const QString &user, const QStri
QTestEventLoop::instance().enterLoop( 50 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1043,6 +1062,7 @@ void tst_QFtp::renameCleanup( const QString &host, const QString &user, const QS
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1087,6 +1107,7 @@ void tst_QFtp::rename()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1273,6 +1294,7 @@ void tst_QFtp::commandSequence()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1330,6 +1352,7 @@ void tst_QFtp::abort()
break;
}
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1367,6 +1390,7 @@ void tst_QFtp::abort()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1425,6 +1449,7 @@ void tst_QFtp::bytesAvailable()
ftp->readAll();
QVERIFY( ftp->bytesAvailable() == 0 );
delete ftp;
+ ftp = 0;
}
void tst_QFtp::activeMode()
@@ -1497,6 +1522,7 @@ void tst_QFtp::proxy()
QTestEventLoop::instance().enterLoop( 50 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() ) {
QFAIL( "Network operation timed out" );
}
@@ -1531,6 +1557,8 @@ void tst_QFtp::binaryAscii()
addCommand(QFtp::Close, ftp->close());
QTestEventLoop::instance().enterLoop( 30 );
+ delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1551,6 +1579,8 @@ void tst_QFtp::binaryAscii()
addCommand(QFtp::Close, ftp->close());
QTestEventLoop::instance().enterLoop( 30 );
+ delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1573,6 +1603,7 @@ void tst_QFtp::binaryAscii()
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() )
QFAIL( "Network operation timed out" );
@@ -1920,6 +1951,7 @@ bool tst_QFtp::fileExists( const QString &host, quint16 port, const QString &use
inFileDirExistsFunction = TRUE;
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() ) {
// ### make this test work
qWarning("tst_QFtp::fileExists: Network operation timed out");
@@ -1970,6 +2002,7 @@ bool tst_QFtp::dirExists( const QString &host, quint16 port, const QString &user
inFileDirExistsFunction = TRUE;
QTestEventLoop::instance().enterLoop( 30 );
delete ftp;
+ ftp = 0;
if ( QTestEventLoop::instance().timeout() ) {
// ### make this test work
// QFAIL( "Network operation timed out" );
@@ -1996,8 +2029,11 @@ void tst_QFtp::doneSignal()
ftp.close();
done_success = 0;
- while ( ftp.hasPendingCommands() )
- QCoreApplication::instance()->processEvents();
+ connect(&ftp, SIGNAL(done(bool)), &(QTestEventLoop::instance()), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(61);
+ if (QTestEventLoop::instance().timeout())
+ QFAIL("Network operation timed out");
+
QTest::qWait(200);
QCOMPARE(spy.count(), 1);
diff --git a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
index 9434a0b..903d7e7 100644
--- a/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
+++ b/tests/auto/qgraphicstransform/tst_qgraphicstransform.cpp
@@ -225,6 +225,10 @@ void tst_QGraphicsTransform::rotation()
rotation.setAngle(90);
QCOMPARE(transform2D(rotation).map(QPointF(10, 10)), QPointF(10, 10));
QCOMPARE(transform2D(rotation).map(QPointF(20, 10)), QPointF(10, 20));
+
+ rotation.setOrigin(QVector3D(0, 0, 0));
+ rotation.setAngle(qQNaN());
+ QCOMPARE(transform2D(rotation).map(QPointF(20, 10)), QPointF(20, 10));
}
Q_DECLARE_METATYPE(Qt::Axis);
diff --git a/tests/auto/qmutex/tst_qmutex.cpp b/tests/auto/qmutex/tst_qmutex.cpp
index ea983cb..a8c4b37 100644
--- a/tests/auto/qmutex/tst_qmutex.cpp
+++ b/tests/auto/qmutex/tst_qmutex.cpp
@@ -129,27 +129,57 @@ void tst_QMutex::tryLock()
testsTurn.release();
threadsTurn.acquire();
+ QVERIFY(!normalMutex.tryLock(0));
+ testsTurn.release();
+
+ threadsTurn.acquire();
+ timer.start();
+ QVERIFY(normalMutex.tryLock(0));
+ QVERIFY(timer.elapsed() < 1000);
+ QVERIFY(lockCount.testAndSetRelaxed(0, 1));
+ QVERIFY(!normalMutex.tryLock(0));
+ QVERIFY(lockCount.testAndSetRelaxed(1, 0));
+ normalMutex.unlock();
+ testsTurn.release();
+
+ threadsTurn.acquire();
}
};
Thread thread;
thread.start();
+ // thread can't acquire lock
+ testsTurn.acquire();
+ normalMutex.lock();
+ QVERIFY(lockCount.testAndSetRelaxed(0, 1));
+ threadsTurn.release();
+
+ // thread can acquire lock
+ testsTurn.acquire();
+ QVERIFY(lockCount.testAndSetRelaxed(1, 0));
+ normalMutex.unlock();
+ threadsTurn.release();
+
+ // thread can't acquire lock, timeout = 1000
testsTurn.acquire();
normalMutex.lock();
QVERIFY(lockCount.testAndSetRelaxed(0, 1));
threadsTurn.release();
+ // thread can acquire lock, timeout = 1000
testsTurn.acquire();
QVERIFY(lockCount.testAndSetRelaxed(1, 0));
normalMutex.unlock();
threadsTurn.release();
+ // thread can't acquire lock, timeout = 0
testsTurn.acquire();
normalMutex.lock();
QVERIFY(lockCount.testAndSetRelaxed(0, 1));
threadsTurn.release();
+ // thread can acquire lock, timeout = 0
testsTurn.acquire();
QVERIFY(lockCount.testAndSetRelaxed(1, 0));
normalMutex.unlock();
@@ -190,6 +220,7 @@ void tst_QMutex::tryLock()
timer.start();
QVERIFY(!recursiveMutex.tryLock(1000));
QVERIFY(timer.elapsed() >= 1000);
+ QVERIFY(!recursiveMutex.tryLock(0));
testsTurn.release();
threadsTurn.acquire();
@@ -206,12 +237,47 @@ void tst_QMutex::tryLock()
testsTurn.release();
threadsTurn.acquire();
+ QVERIFY(!recursiveMutex.tryLock(0));
+ QVERIFY(!recursiveMutex.tryLock(0));
+ testsTurn.release();
+
+ threadsTurn.acquire();
+ timer.start();
+ QVERIFY(recursiveMutex.tryLock(0));
+ QVERIFY(timer.elapsed() < 1000);
+ QVERIFY(lockCount.testAndSetRelaxed(0, 1));
+ QVERIFY(recursiveMutex.tryLock(0));
+ QVERIFY(lockCount.testAndSetRelaxed(1, 2));
+ QVERIFY(lockCount.testAndSetRelaxed(2, 1));
+ recursiveMutex.unlock();
+ QVERIFY(lockCount.testAndSetRelaxed(1, 0));
+ recursiveMutex.unlock();
+ testsTurn.release();
+
+ threadsTurn.acquire();
}
};
Thread thread;
thread.start();
+ // thread can't acquire lock
+ testsTurn.acquire();
+ recursiveMutex.lock();
+ QVERIFY(lockCount.testAndSetRelaxed(0, 1));
+ recursiveMutex.lock();
+ QVERIFY(lockCount.testAndSetRelaxed(1, 2));
+ threadsTurn.release();
+
+ // thread can acquire lock
+ testsTurn.acquire();
+ QVERIFY(lockCount.testAndSetRelaxed(2, 1));
+ recursiveMutex.unlock();
+ QVERIFY(lockCount.testAndSetRelaxed(1, 0));
+ recursiveMutex.unlock();
+ threadsTurn.release();
+
+ // thread can't acquire lock, timeout = 1000
testsTurn.acquire();
recursiveMutex.lock();
QVERIFY(lockCount.testAndSetRelaxed(0, 1));
@@ -219,6 +285,7 @@ void tst_QMutex::tryLock()
QVERIFY(lockCount.testAndSetRelaxed(1, 2));
threadsTurn.release();
+ // thread can acquire lock, timeout = 1000
testsTurn.acquire();
QVERIFY(lockCount.testAndSetRelaxed(2, 1));
recursiveMutex.unlock();
@@ -226,6 +293,7 @@ void tst_QMutex::tryLock()
recursiveMutex.unlock();
threadsTurn.release();
+ // thread can't acquire lock, timeout = 0
testsTurn.acquire();
recursiveMutex.lock();
QVERIFY(lockCount.testAndSetRelaxed(0, 1));
@@ -233,6 +301,7 @@ void tst_QMutex::tryLock()
QVERIFY(lockCount.testAndSetRelaxed(1, 2));
threadsTurn.release();
+ // thread can acquire lock, timeout = 0
testsTurn.acquire();
QVERIFY(lockCount.testAndSetRelaxed(2, 1));
recursiveMutex.unlock();
diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp
index 86adabb..c2e64e0 100644
--- a/tests/auto/qpainterpath/tst_qpainterpath.cpp
+++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp
@@ -426,6 +426,10 @@ void tst_QPainterPath::intersects_QRectF_data()
QTest::newRow("horizontal line") << linePath(0, 0, 10, 0) << QRectF(1, -1, 2, 2) << true;
QTest::newRow("vertical line") << linePath(0, 0, 0, 10) << QRectF(-1, 1, 2, 2) << true;
+
+ path = QPainterPath();
+ path.addEllipse(QRectF(-5000.0, -5000.0, 1500000.0, 1500000.0));
+ QTest::newRow("huge ellipse, qreal=float crash") << path << QRectF(1100000.35, 1098000.2, 1500000.0, 1500000.0) << true;
}
void tst_QPainterPath::intersects_QRectF()
diff --git a/tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp b/tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp
index ea06295..1c26343 100644
--- a/tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp
+++ b/tests/auto/qprocessenvironment/tst_qprocessenvironment.cpp
@@ -56,6 +56,8 @@ private slots:
void insert();
void emptyNull();
void toStringList();
+ void keys();
+ void insertEnv();
void caseSensitivity();
void systemEnvironment();
@@ -154,6 +156,58 @@ void tst_QProcessEnvironment::toStringList()
QVERIFY(result.contains("HELLO=World"));
}
+void tst_QProcessEnvironment::keys()
+{
+ QProcessEnvironment e;
+ QVERIFY(e.isEmpty());
+ QVERIFY(e.keys().isEmpty());
+
+ e.insert("FOO", "bar");
+ QStringList result = e.keys();
+ QCOMPARE(result.length(), 1);
+ QCOMPARE(result.at(0), QString("FOO"));
+
+ e.clear();
+ e.insert("BAZ", "");
+ result = e.keys();
+ QCOMPARE(result.at(0), QString("BAZ"));
+
+ e.insert("FOO", "bar");
+ e.insert("A", "bc");
+ e.insert("HELLO", "World");
+ result = e.keys();
+ QCOMPARE(result.length(), 4);
+
+ // order is not specified, so use contains()
+ QVERIFY(result.contains("FOO"));
+ QVERIFY(result.contains("BAZ"));
+ QVERIFY(result.contains("A"));
+ QVERIFY(result.contains("HELLO"));
+}
+
+void tst_QProcessEnvironment::insertEnv()
+{
+ QProcessEnvironment e;
+ e.insert("FOO", "bar");
+ e.insert("A", "bc");
+ e.insert("Hello", "World");
+
+ QProcessEnvironment e2;
+ e2.insert("FOO2", "bar2");
+ e2.insert("A2", "bc2");
+ e2.insert("Hello", "Another World");
+
+ e.insert(e2);
+ QStringList keys = e.keys();
+ QCOMPARE(keys.length(), 5);
+
+ QCOMPARE(e.value("FOO"), QString("bar"));
+ QCOMPARE(e.value("A"), QString("bc"));
+ QCOMPARE(e.value("Hello"), QString("Another World"));
+ QCOMPARE(e.value("FOO2"), QString("bar2"));
+ QCOMPARE(e.value("A2"), QString("bc2"));
+}
+
void tst_QProcessEnvironment::caseSensitivity()
{
QProcessEnvironment e;
diff --git a/tests/auto/qsemaphore/tst_qsemaphore.cpp b/tests/auto/qsemaphore/tst_qsemaphore.cpp
index ba2175a..9fc6de1 100644
--- a/tests/auto/qsemaphore/tst_qsemaphore.cpp
+++ b/tests/auto/qsemaphore/tst_qsemaphore.cpp
@@ -244,6 +244,8 @@ void tst_QSemaphore::tryAcquireWithTimeout()
QSemaphore semaphore;
QTime time;
+#define QVERIFYGE(a,b) {int e = a; if (a<b) qDebug() << #a << "=" << e << " !>= " << #b << "=" << b; QVERIFY(e>=b);}
+#define QVERIFYLE(a,b) {int e = a; if (b<a) qDebug() << #a << "=" << e << " !<= " << #b << "=" << b; QVERIFY(e<=b);}
QCOMPARE(semaphore.available(), 0);
@@ -251,69 +253,69 @@ void tst_QSemaphore::tryAcquireWithTimeout()
QCOMPARE(semaphore.available(), 1);
time.start();
QVERIFY(!semaphore.tryAcquire(2, timeout));
- QVERIFY(time.elapsed() >= timeout);
+ QVERIFYGE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 1);
semaphore.release();
QCOMPARE(semaphore.available(), 2);
time.start();
QVERIFY(!semaphore.tryAcquire(3, timeout));
- QVERIFY(time.elapsed() >= timeout);
+ QVERIFYGE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 2);
semaphore.release(10);
QCOMPARE(semaphore.available(), 12);
time.start();
QVERIFY(!semaphore.tryAcquire(100, timeout));
- QVERIFY(time.elapsed() >= timeout);
+ QVERIFYGE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 12);
semaphore.release(10);
QCOMPARE(semaphore.available(), 22);
time.start();
QVERIFY(!semaphore.tryAcquire(100, timeout));
- QVERIFY(time.elapsed() >= timeout);
+ QVERIFYGE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 22);
time.start();
QVERIFY(semaphore.tryAcquire(1, timeout));
- QVERIFY(time.elapsed() <= timeout);
+ QVERIFYLE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 21);
time.start();
QVERIFY(semaphore.tryAcquire(1, timeout));
- QVERIFY(time.elapsed() <= timeout);
+ QVERIFYLE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 20);
time.start();
QVERIFY(semaphore.tryAcquire(10, timeout));
- QVERIFY(time.elapsed() <= timeout);
+ QVERIFYLE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 10);
time.start();
QVERIFY(semaphore.tryAcquire(10, timeout));
- QVERIFY(time.elapsed() <= timeout);
+ QVERIFYLE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 0);
// should not be able to acquire more
time.start();
QVERIFY(!semaphore.tryAcquire(1, timeout));
- QVERIFY(time.elapsed() >= timeout);
+ QVERIFYGE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 0);
time.start();
QVERIFY(!semaphore.tryAcquire(1, timeout));
- QVERIFY(time.elapsed() >= timeout);
+ QVERIFYGE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 0);
time.start();
QVERIFY(!semaphore.tryAcquire(10, timeout));
- QVERIFY(time.elapsed() >= timeout);
+ QVERIFYGE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 0);
time.start();
QVERIFY(!semaphore.tryAcquire(10, timeout));
- QVERIFY(time.elapsed() >= timeout);
+ QVERIFYGE(time.elapsed(), timeout);
QCOMPARE(semaphore.available(), 0);
}
diff --git a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
index 910d437..bd19afb 100644
--- a/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
+++ b/tests/auto/qsoftkeymanager/tst_qsoftkeymanager.cpp
@@ -179,8 +179,8 @@ void tst_QSoftKeyManager::handleCommand()
// QTest::keyPress(&w, Qt::Key_Context1);
// QTest::keyPress(&w, Qt::Key_Context2);
- simulateSymbianCommand(6000);
- simulateSymbianCommand(6001);
+ simulateSymbianCommand(s60CommandStart); //0 = LSK position
+ simulateSymbianCommand(s60CommandStart + 2); //2 = RSK position
QApplication::processEvents();
@@ -205,28 +205,32 @@ void tst_QSoftKeyManager::checkSoftkeyEnableStates()
w.show();
QApplication::processEvents();
- QSignalSpy spy0(w.actions()[0], SIGNAL(triggered())); //restore defaults action
- QSignalSpy spy1(w.actions()[1], SIGNAL(triggered())); //disabled help action
+ //According to StandardButton enum in QDialogButtonBox the Help action
+ //is inserted before RestoreDefaults and thus help action is in index 0
+ QSignalSpy spy0(w.actions()[0], SIGNAL(triggered())); //disabled help action
+ QSignalSpy spy1(w.actions()[1], SIGNAL(triggered())); //restore defaults action
//Verify that enabled button gets all the action trigger signals and
//disabled button gets none.
for (int i = 0; i < 10; i++) {
- //simulate "Restore Defaults" softkey press
- simulateSymbianCommand(s60CommandStart);
//simulate "help" softkey press
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart);
+ //simulate "Restore Defaults" softkey press
+ simulateSymbianCommand(s60CommandStart + 2);
}
QApplication::processEvents();
- QCOMPARE(spy0.count(), 10);
- QCOMPARE(spy1.count(), 0);
+ //Restore defaults button is enabled and its signals are recorded to spy1
+ QCOMPARE(spy0.count(), 0);
+ QCOMPARE(spy1.count(), 10);
+
spy0.clear();
spy1.clear();
for (int i = 0; i < 10; i++) {
- //simulate "Restore Defaults" softkey press
- simulateSymbianCommand(s60CommandStart);
//simulate "help" softkey press
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart);
+ //simulate "Restore Defaults" softkey press
+ simulateSymbianCommand(s60CommandStart + 2);
//switch enabled button to disabled and vice versa
pBHelp->setEnabled(!pBHelp->isEnabled());
pBDefaults->setEnabled(!pBDefaults->isEnabled());
@@ -261,7 +265,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary()
//Verify that both base softkeys emit triggered signals
simulateSymbianCommand(s60CommandStart);
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart + 2);
QCOMPARE(baseLeftSpy.count(), 1);
QCOMPARE(baseRightSpy.count(), 1);
@@ -275,7 +279,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary()
QApplication::processEvents();
simulateSymbianCommand(s60CommandStart);
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart + 2);
QCOMPARE(baseLeftSpy.count(), 0);
QCOMPARE(baseRightSpy.count(), 0);
@@ -291,7 +295,7 @@ void tst_QSoftKeyManager::noMergingOverWindowBoundary()
QApplication::processEvents();
simulateSymbianCommand(s60CommandStart);
- simulateSymbianCommand(s60CommandStart + 1);
+ simulateSymbianCommand(s60CommandStart + 2);
QCOMPARE(baseLeftSpy.count(), 0);
QCOMPARE(baseRightSpy.count(), 0);
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 288b29c..be2087d 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -928,13 +928,12 @@ void tst_QSqlQuery::record()
QSqlQuery q( db );
QVERIFY( q.record().isEmpty() );
QVERIFY_SQL( q, exec( "select id, t_varchar, t_char from " + qtest + " order by id" ) );
- QSqlRecord rec = q.record();
QCOMPARE( q.record().fieldName( 0 ).toLower(), QString( "id" ) );
QCOMPARE( q.record().fieldName( 1 ).toLower(), QString( "t_varchar" ) );
QCOMPARE( q.record().fieldName( 2 ).toLower(), QString( "t_char" ) );
- QVERIFY( !q.record().value( 0 ).isValid() );
- QVERIFY( !q.record().value( 1 ).isValid() );
- QVERIFY( !q.record().value( 2 ).isValid() );
+ QCOMPARE(q.record().value(0), QVariant(q.record().field(0).type()));
+ QCOMPARE(q.record().value(1), QVariant(q.record().field(1).type()));
+ QCOMPARE(q.record().value(2), QVariant(q.record().field(2).type()));
QVERIFY( q.next() );
QVERIFY( q.next() );
diff --git a/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp b/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp
index e876764..9507e54 100644
--- a/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp
+++ b/tests/auto/qsqlquerymodel/tst_qsqlquerymodel.cpp
@@ -428,9 +428,9 @@ void tst_QSqlQueryModel::record()
QCOMPARE(rec.fieldName(0), isToUpper ? QString("ID") : QString("id"));
QCOMPARE(rec.fieldName(1), isToUpper ? QString("NAME") : QString("name"));
QCOMPARE(rec.fieldName(2), isToUpper ? QString("TITLE") : QString("title"));
- QCOMPARE(rec.value(0), QVariant());
- QCOMPARE(rec.value(1), QVariant());
- QCOMPARE(rec.value(2), QVariant());
+ QCOMPARE(rec.value(0), QVariant(rec.field(0).type()));
+ QCOMPARE(rec.value(1), QVariant(rec.field(1).type()));
+ QCOMPARE(rec.value(2), QVariant(rec.field(2).type()));
rec = model.record(0);
QCOMPARE(rec.fieldName(0), isToUpper ? QString("ID") : QString("id"));
diff --git a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
index bf68375..b91d025 100644
--- a/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
+++ b/tests/auto/qsqltablemodel/tst_qsqltablemodel.cpp
@@ -569,9 +569,9 @@ void tst_QSqlTableModel::insertMultiRecords()
QVERIFY(model.insertRow(2));
- QCOMPARE(model.data(model.index(2, 0)), QVariant());
- QCOMPARE(model.data(model.index(2, 1)), QVariant());
- QCOMPARE(model.data(model.index(2, 2)), QVariant());
+ QCOMPARE(model.data(model.index(2, 0)), QVariant(model.record().field(0).type()));
+ QCOMPARE(model.data(model.index(2, 1)), QVariant(model.record().field(1).type()));
+ QCOMPARE(model.data(model.index(2, 2)), QVariant(model.record().field(2).type()));
QVERIFY(model.insertRow(3));
QVERIFY(model.insertRow(0));
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted1.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted1.pem
new file mode 100644
index 0000000..3945aea
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted1.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDzCCAnigAwIBAgIQBH7L6fylX3vQnq424QyuHjANBgkqhkiG9w0BAQUFADBf
+MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
+ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRgwFgYDVQQDEw9tYWlsLmdvb2dsZS5jb20w
+HhcNMTEwMzI0MTMwNjI1WhcNMTEwNDIzMTMwNjI1WjBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9tYWlsLmdvb2dsZS5jb20wgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBAOeAGV2FbGnT4rLjTvCNEEDjj0/iIUATa6RT8WKF2PVaOzbE
+oceiODx6hTStvBnCgs+h/d3eVKgp+uAyBde5sW/HlOwHrNgKF3ZDvxegzIOEHaVI
+ndNtBpFS3UyOEkO0NxfioBatNRYpeTRU/DVmazu3yvzgrV1V2mDsrNngVWxJAgMB
+AAGjgcswgcgwHQYDVR0OBBYEFHcF1eqRpm7B78aY8ZjseN6zSYbvMIGYBgNVHSME
+gZAwgY2AFHcF1eqRpm7B78aY8ZjseN6zSYbvoWOkYTBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9tYWlsLmdvb2dsZS5jb22CEAR+y+n8pV970J6uNuEM
+rh4wDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQBEb1iF+EbhAJli5Sj2
++iEdJ5xMP8R6FtgqAYknqXD8+tyEyXxJXdN186qdAWuTD9N22AUqi61BPWxUkufW
+xH8FYMEHdFCkitvYE0321+GT5pJz6ON/d5Co+wusumt7T5oSjzj8Ax9V+nmo3Nkb
+dSANM4/Lnc6moijcpJZq+GC1ng==
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted2.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted2.pem
new file mode 100644
index 0000000..4b8d059
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted2.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAnegAwIBAgIRAPXIavNhYvE6ZPVPbclYfAYwDQYJKoZIhvcNAQEFBQAw
+XjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMOd3d3Lmdvb2dsZS5jb20w
+HhcNMTEwMzI0MTMwNzExWhcNMTEwNDIzMTMwNzExWjBeMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRcwFQYDVQQDEw53d3cuZ29vZ2xlLmNvbTCBnzANBgkqhkiG9w0BAQEF
+AAOBjQAwgYkCgYEAy1fNDFl65Njfcd1EUJeaxvyiKln+JKlqUmk1x4mrE1BQoa0C
+QZaiXAF21rDhivWejZWBiEQ4IWbg3b12ANY74G1KqAfLC4BNKS9UP94hy18vezRA
+pFc+m/HAClwc8AdACpl8eZpQW8cMgdvnMBMZTrQkgV0JYykX+uDD9Tb+QNUCAwEA
+AaOByzCByDAdBgNVHQ4EFgQUSelG6IVRj2ZQbp049zkQ0X/Po9wwgZgGA1UdIwSB
+kDCBjYAUSelG6IVRj2ZQbp049zkQ0X/Po9yhYqRgMF4xCzAJBgNVBAYTAkFVMRMw
+EQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0
+eSBMdGQxFzAVBgNVBAMTDnd3dy5nb29nbGUuY29tghEA9chq82Fi8Tpk9U9tyVh8
+BjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBALQyDC/AMQMNj2fa6E8L
+umILCklWJwG1K1p/1bUAgm0CB8zm94n1xrh/ZK4+HS+k2a9OQmvLRbFyJn8Wua8p
+3UU0267UNkCanA1FKHuO3Mo18wLvjMLWjjCQ4g1C9IvJx6P+8EFDQFG+MJBV/w2k
+gJXXVl3q1T1dvahIgfav9QBL
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted3.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted3.pem
new file mode 100644
index 0000000..e47ece6
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted3.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDETCCAnqgAwIBAgIRANdVj9r18RBbshMoK3B3KaMwDQYJKoZIhvcNAQEFBQAw
+XzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4ueWFob28uY29t
+MB4XDTExMDMyNDEzMDg0MloXDTExMDQyMzEzMDg0MlowXzELMAkGA1UEBhMCQVUx
+EzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
+UHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4ueWFob28uY29tMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQCosFLKRvGtxjvdAjWdEAHYycFTa4VtdpXmCNhNHf2xbeLn
+xzde10KjEe44pQxNI+UUD1rJkyuH6wUfloyefn0D2Mu+MvusmvOEzFosa4EDbK9s
+BAAlsSiyJgrp/GgbEPq/XOl4XJRBIVP1WC6LllduNbskFCipDqS+HQwifXmmwQID
+AQABo4HMMIHJMB0GA1UdDgQWBBSEgWnsoYtd5GEx/MGJvKxuIuROJzCBmQYDVR0j
+BIGRMIGOgBSEgWnsoYtd5GEx/MGJvKxuIuROJ6FjpGEwXzELMAkGA1UEBhMCQVUx
+EzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
+UHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4ueWFob28uY29tghEA11WP2vXxEFuyEygr
+cHcpozAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAKNpIrzTOxIykKZt
+EE6HU2nW1lrWUkIMjwjL8ntw7QI4JLMDN1ADVIxWaGTeQ+U/eXFou6dDNAYVAijK
+ONDXgOItxW2YvSw0wOZsZj6INX2x88/0yRH+19TqaL/r+Y1D1h/0zefkHgfXufnY
+Ex7BHju/rGBTp6R1mr+Tlh1tewva
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted4.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted4.pem
new file mode 100644
index 0000000..64c7d41
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted4.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDzCCAnigAwIBAgIQOSpDTw4H3x+KowXeNODCKTANBgkqhkiG9w0BAQUFADBf
+MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
+ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb20w
+HhcNMTEwMzI0MTMwOTE1WhcNMTEwNDIzMTMwOTE1WjBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb20wgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBANO2gz9x2H92xz5OvZSEul9gHxqqd+kdjeoS2exyvjC9wzqb
+gYXqNmAsbtNp4WmieEQFd0riCAEkIAn8JpHTCsMHN4rHhS+W+4D5a/drI2jfnZEF
+orNYJG1PHSQV/rvh6d7wkVdT+0SYOjrFTAA2biGWaK3W9ztf2yX577w+uQtBAgMB
+AAGjgcswgcgwHQYDVR0OBBYEFJjDp8Prs7oReRmskIeFixp0vDkGMIGYBgNVHSME
+gZAwgY2AFJjDp8Prs7oReRmskIeFixp0vDkGoWOkYTBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb22CEDkqQ08OB98fiqMF3jTg
+wikwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQAZyo0Q3leeM1+lxeCd
+Wp0ZYHMSW11ANc6nuMWOmJC+nIQGlyGiP3IqeUvIfekwboV638bahVPwcl2HYWsS
+/l01Bgyd25Zn6VTQBfMK01dILyxscjVwdHuojzYBN05sl+qkVoqQr5EroQQbgDc9
+6I88p6Kjajv3IusCwfK6wlqISw==
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted5.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted5.pem
new file mode 100644
index 0000000..c7ddbf2
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted5.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDzCCAnigAwIBAgIQPnXO1GtpMCEhiDCuhqgqcTANBgkqhkiG9w0BAQUFADBf
+MQswCQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50
+ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb20w
+HhcNMTEwMzI0MTMwOTQ4WhcNMTEwNDIzMTMwOTQ4WjBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb20wgZ8wDQYJKoZIhvcNAQEB
+BQADgY0AMIGJAoGBALkiHG9TgTw/00CMW8D23NBDAa3331AL5kTkAaXbAWg2R/1o
+yKQfXq3hgHbyWGPccUT+tU6FmaBf3bIndLK7iGx81RGzGgXeoQ5mpgnJ50iCeW73
+G99VlVwutPia7d9qqui84YdcG9t+P2Fuxv+xRqAB6lKOaa4qTPIbH50PgwOvAgMB
+AAGjgcswgcgwHQYDVR0OBBYEFBWJrs8bnZ5fikfaLbTxK0ssj69MMIGYBgNVHSME
+gZAwgY2AFBWJrs8bnZ5fikfaLbTxK0ssj69MoWOkYTBfMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRgwFgYDVQQDEw9sb2dpbi55YWhvby5jb22CED51ztRraTAhIYgwroao
+KnEwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCIfqqs1a7RzdmV8U00
+v/xAsxscKvQvmu6BK+HwvY5iL2pSwXTYgRLJLoj5QGOd3mmgOFsyW3BPSCP1+fVE
+M1ROhU2u8wHub+hGGds18Fx6F4yZjdh8pNUoOUR9A0Ym+VDJr2p50oUNTTy0RbH8
+9ns/gbemx84cjF9DD2G5stQhYg==
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted6.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted6.pem
new file mode 100644
index 0000000..bc2be2a
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted6.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDETCCAnqgAwIBAgIRAOkCi5V45BXcGnEKK4gVREcwDQYJKoZIhvcNAQEFBQAw
+XzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4uc2t5cGUuY29t
+MB4XDTExMDMyNDEzMTAxNloXDTExMDQyMzEzMTAxNlowXzELMAkGA1UEBhMCQVUx
+EzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
+UHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4uc2t5cGUuY29tMIGfMA0GCSqGSIb3DQEB
+AQUAA4GNADCBiQKBgQDFq06qqRl86pP7GRX3m7FMMSaSU6zlNGAo+WPoRfYAzB6x
+5KpvlfxMCo3T/nWtInX3Bw9TBWCZSweQ2GEjggO0irjw5UX3MiToLxK+rwzWztm9
+H3LBxTWR0cOOa78kRFvNQ1onvNHbs8fJzXjG7b2IJDOIwG1HAT1LK80oPXZc1wID
+AQABo4HMMIHJMB0GA1UdDgQWBBTiGNxw0ImW/wfW0mD3eA65PY5CAzCBmQYDVR0j
+BIGRMIGOgBTiGNxw0ImW/wfW0mD3eA65PY5CA6FjpGEwXzELMAkGA1UEBhMCQVUx
+EzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMg
+UHR5IEx0ZDEYMBYGA1UEAxMPbG9naW4uc2t5cGUuY29tghEA6QKLlXjkFdwacQor
+iBVERzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAHdb1QY/oxuro/4x
+GX9jbm930ysoeXkWZSKVtVxoxrPIferu8jVpb1SLRjGcMnmjJoNWNFpvnbZgoYei
+f3wdSWun7ndyQBh61k8eM7UABDOUXUHOsHuHj7s1koMKtet4gykmMfd6VxBkwBvN
+ZXOll4X+TKe8nrxbnGUByIwQaRM+
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted7.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted7.pem
new file mode 100644
index 0000000..19d4353
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted7.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDGjCCAoOgAwIBAgIRAJI51TSPQNFpWnRUcOHyP0MwDQYJKoZIhvcNAQEFBQAw
+YjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEbMBkGA1UEAxMSYWRkb25zLm1vemlsbGEu
+b3JnMB4XDTExMDMyNDEzMTA0NFoXDTExMDQyMzEzMTA0NFowYjELMAkGA1UEBhMC
+QVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdpZGdp
+dHMgUHR5IEx0ZDEbMBkGA1UEAxMSYWRkb25zLm1vemlsbGEub3JnMIGfMA0GCSqG
+SIb3DQEBAQUAA4GNADCBiQKBgQC1lsoAcZTwF8Pf0E9do5avLdobB/O7EhhrCMs2
+/EMO07aIlrLwl3UP/Fmu/cAkKuX8Mx+Eif9x+XT3ZqGKGYKiqPTJcNfeZvgwbn0j
+wXDtEo4DuURrwtBU9okS+v4dF6F4RtHQKAGcsXoOjhR7ah71kve+PG2GG0sJ167V
+klK1xwIDAQABo4HPMIHMMB0GA1UdDgQWBBRgGDJ4Qp0WFyLIzm4Nz5wgqDSSxjCB
+nAYDVR0jBIGUMIGRgBRgGDJ4Qp0WFyLIzm4Nz5wgqDSSxqFmpGQwYjELMAkGA1UE
+BhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGEludGVybmV0IFdp
+ZGdpdHMgUHR5IEx0ZDEbMBkGA1UEAxMSYWRkb25zLm1vemlsbGEub3JnghEAkjnV
+NI9A0WladFRw4fI/QzAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACeE
+DHMQ+LWEuoa/6z2EgrgM1k9rvBbUtCR+rjTuyzVW4OLXdpiVwZPOAiKphpq7q8Sb
+TQ3zwsCoPLLJk5VolwcPfcD8Y2/tYK3NCYl+HzGxxnzPDFVaZM5Jh8RI861Hc00D
+hVoQaptPK/V/lr0KEevqjhusAdFZbwlWA923zASa
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted8.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted8.pem
new file mode 100644
index 0000000..aedf3f7
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted8.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAnegAwIBAgIRALC3Ez7Qlvm1b66RyHS9OsAwDQYJKoZIhvcNAQEFBQAw
+XjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMObG9naW4ubGl2ZS5jb20w
+HhcNMTEwMzI0MTMxMTA2WhcNMTEwNDIzMTMxMTA2WjBeMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRcwFQYDVQQDEw5sb2dpbi5saXZlLmNvbTCBnzANBgkqhkiG9w0BAQEF
+AAOBjQAwgYkCgYEA3OVNj9ijzMewvDeZYzgCWoKtyjclyIHxrQfHZpcexaKbxUap
+1MtF6L0ayjtRWpiBYuPteUSy/Ja4Oh6zZz8K6z5rVgXhmy3xPIYuOoWaTKEOhb0Z
+oHTBtGh8aWWai1XWw37HIm2FP8cmfgdH4lZwVvpTZIUxYidsyqyjB9IrhiMCAwEA
+AaOByzCByDAdBgNVHQ4EFgQU4CcQcIvEhJC0tqHlNFMkv6MlDN4wgZgGA1UdIwSB
+kDCBjYAU4CcQcIvEhJC0tqHlNFMkv6MlDN6hYqRgMF4xCzAJBgNVBAYTAkFVMRMw
+EQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0
+eSBMdGQxFzAVBgNVBAMTDmxvZ2luLmxpdmUuY29tghEAsLcTPtCW+bVvrpHIdL06
+wDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAMNzIStXDNSNQ8ayxrcj
+4RrUMsHWUG/6XPrgfYqCP5TfPGAa5qBfNb9LfUbiS4b0flJVN1RlHVwwRo0yf9v4
+LGg0dSuPQAOWlLeUR1GminO1jHZw7E4dYfR7QEmiiOgaQU+CbxLsf5vCaKInN9Gu
+jv/5xytVCbMoLoZ4EBVb0tka
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/more-certificates/blacklisted9.pem b/tests/auto/qsslcertificate/more-certificates/blacklisted9.pem
new file mode 100644
index 0000000..d179b29
--- /dev/null
+++ b/tests/auto/qsslcertificate/more-certificates/blacklisted9.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAnegAwIBAgIRANjzX063hystqwaS4xU4L7AwDQYJKoZIhvcNAQEFBQAw
+XjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMOZ2xvYmFsIHRydXN0ZWUw
+HhcNMTEwMzI0MTMxMTM3WhcNMTEwNDIzMTMxMTM3WjBeMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRcwFQYDVQQDEw5nbG9iYWwgdHJ1c3RlZTCBnzANBgkqhkiG9w0BAQEF
+AAOBjQAwgYkCgYEArHCVym7AEZDBhDkrUSG3Q94a+caNcCk5fE6ltZHiZHv096xr
+cixHYvSGvms780bkI+oot2xI/e9awwkV+7VjWNvr0HrajzBWeimwk+myjP+3ddMY
+Kmr0eI6bmvmPHtOFJE5Ar8/62FwD0wlLogRIx56JtXcCpkiUQktJVPz2gtMCAwEA
+AaOByzCByDAdBgNVHQ4EFgQUUJwC/qSGBmcB+DVrd43ovRLdLmQwgZgGA1UdIwSB
+kDCBjYAUUJwC/qSGBmcB+DVrd43ovRLdLmShYqRgMF4xCzAJBgNVBAYTAkFVMRMw
+EQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0
+eSBMdGQxFzAVBgNVBAMTDmdsb2JhbCB0cnVzdGVlghEA2PNfTreHKy2rBpLjFTgv
+sDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBACAYxI+r3+JNelL6SBB0
+Pda3LkbCm+schP64NBYDdGl2Kus2b2QZ83T7xENBFEhyNoXvc6pRI4/Oh6JDxmG1
+7WmqOVStS/4JeAu6ygiyI1ImRKq2/MvJx/kaKh6IiXanB5nW1U+fhDV6kMOEfpwV
+i6FBibpHboPQoqzPPRe7qHSL
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
index 1e3a8dd..57f2fa8 100644
--- a/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
+++ b/tests/auto/qsslcertificate/tst_qsslcertificate.cpp
@@ -111,6 +111,8 @@ private slots:
void nulInSan();
void largeSerialNumber();
void largeExpirationDate();
+ void blacklistedCertificates();
+
// ### add tests for certificate bundles (multiple certificates concatenated into a single
// structure); both PEM and DER formatted
#endif
@@ -817,6 +819,15 @@ void tst_QSslCertificate::largeExpirationDate() // QTBUG-12489
QCOMPARE(cert.expiryDate().toUTC(), QDateTime(QDate(2051, 8, 29), QTime(9, 53, 41), Qt::UTC));
}
+void tst_QSslCertificate::blacklistedCertificates()
+{
+ QList<QSslCertificate> blacklistedCerts = QSslCertificate::fromPath("more-certificates/blacklisted*.pem", QSsl::Pem, QRegExp::Wildcard);
+ QVERIFY2(blacklistedCerts.count() > 0, "Please run this test from the source directory");
+ for (int a = 0; a < blacklistedCerts.count(); a++) {
+ QVERIFY(! blacklistedCerts.at(a).isValid());
+ }
+}
+
#endif // QT_NO_OPENSSL
QTEST_MAIN(tst_QSslCertificate)
diff --git a/tests/auto/qsslsocket/certs/fake-login.live.com.key b/tests/auto/qsslsocket/certs/fake-login.live.com.key
new file mode 100644
index 0000000..692a7bd
--- /dev/null
+++ b/tests/auto/qsslsocket/certs/fake-login.live.com.key
@@ -0,0 +1,15 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIICXQIBAAKBgQDOtxdvMa0VHUQYG5q7Tsi1Jj4qKEJppyZEkmuRXOi0fDbd1SwE
+bwHrLGMvDO6OMrYBbq3WDNrtnIfF9CvzUOEch+gjr4hEVQqecU5fb45Wor7yNel3
+/C/gxfbzuXHrsj/gUjNghL2i10+c2NW+hUo/sWO6OusaBT6d6s7ee+YBcQIDAQAB
+AoGAb8cVhu0HuLkgjyCuJMbPRRUu3ED02Iin6sB6JhplQuNAD+grayJTmUVhRJnr
+jTziqhedLHe7Em1oBaSo92MutfMpXvWiccSlbNygI61VgmrJpVB+qIN5H9cQc9ql
+Zymc+nIPa1+i5rsrOzlpUytTh7AsbZ27QG4tQXR/kQejEiECQQD6BgTxBeT8D7x9
+DuukoBaSCkLwx7U7P1NXx15EI3lA1nO51t6UHfvk/jGPp8Sl4wv4alJ7AQxr5uQ/
+vC3kzA/1AkEA06gNu10se8pe3n8qL2RRt+FmVjHkQdD9Mm2Dx9oWCs2A4wOSOrlo
+6/nKYF1CaQNYn9HgsNbHVEUpnICVO18qDQJBALEw/uOJ1+TDikPfBSWgxx4s45Ad
+GNWqZXh6NNZ5hX9r/IwiOZAjR9fcRmeW8IjYRi2BvH6sGY+HDRAWXzgdXtkCQCma
+dOiJTf8fLjqp4E7kdzOfuI/kyqstOze4Uxjrgz2oW1dEEnA8laUcumzqp+0gXUE8
+7d+UuCWWWrGKjMrYz9kCQQDh5E5+b6Djn082Jo6gvyuXWC5eXju6IdmihlJ2SMzD
+s2y3IDjOUtTeQQRDymLneteMz0ha79KeUp6VnAvZCOVe
+-----END RSA PRIVATE KEY-----
diff --git a/tests/auto/qsslsocket/certs/fake-login.live.com.pem b/tests/auto/qsslsocket/certs/fake-login.live.com.pem
new file mode 100644
index 0000000..429f951
--- /dev/null
+++ b/tests/auto/qsslsocket/certs/fake-login.live.com.pem
@@ -0,0 +1,19 @@
+-----BEGIN CERTIFICATE-----
+MIIDDjCCAnegAwIBAgIRALC3Ez7Qlvm1b66RyHS9OsAwDQYJKoZIhvcNAQEFBQAw
+XjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUxITAfBgNVBAoTGElu
+dGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEXMBUGA1UEAxMObG9naW4ubGl2ZS5jb20w
+HhcNMTEwMzI1MTMyODUwWhcNMTEwNDI0MTMyODUwWjBeMQswCQYDVQQGEwJBVTET
+MBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQ
+dHkgTHRkMRcwFQYDVQQDEw5sb2dpbi5saXZlLmNvbTCBnzANBgkqhkiG9w0BAQEF
+AAOBjQAwgYkCgYEAzrcXbzGtFR1EGBuau07ItSY+KihCaacmRJJrkVzotHw23dUs
+BG8B6yxjLwzujjK2AW6t1gza7ZyHxfQr81DhHIfoI6+IRFUKnnFOX2+OVqK+8jXp
+d/wv4MX287lx67I/4FIzYIS9otdPnNjVvoVKP7FjujrrGgU+nerO3nvmAXECAwEA
+AaOByzCByDAdBgNVHQ4EFgQUpSOEcmtkQITvBdM2IDfcXnJ0FCAwgZgGA1UdIwSB
+kDCBjYAUpSOEcmtkQITvBdM2IDfcXnJ0FCChYqRgMF4xCzAJBgNVBAYTAkFVMRMw
+EQYDVQQIEwpTb21lLVN0YXRlMSEwHwYDVQQKExhJbnRlcm5ldCBXaWRnaXRzIFB0
+eSBMdGQxFzAVBgNVBAMTDmxvZ2luLmxpdmUuY29tghEAsLcTPtCW+bVvrpHIdL06
+wDAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA4GBAD+2HT4GSHHKCdbl9VkX
+zsl+D+drMm2b0ksxz9SgPihP7aW50EEIJDEEihNMTa27mhpeOXHc/sLqDi4ECUao
+/0Ns/5uoVuAIrAKCydmtPsonVFh9XWjyrfUzPOHAc9p2bmJ1i9a3kTsLB6jlrVDO
+VufGzsowHlHZ0TtKf5omojU5
+-----END CERTIFICATE-----
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 8f62d87..9c32c2b 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -188,6 +188,7 @@ private slots:
void ignoreSslErrorsListWithSlot();
void readFromClosedSocket();
void writeBigChunk();
+ void blacklist();
void setEmptyDefaultConfiguration();
static void exitLoop()
@@ -860,9 +861,16 @@ class SslServer : public QTcpServer
{
Q_OBJECT
public:
- SslServer() : socket(0), protocol(QSsl::TlsV1) { }
+ SslServer(const QString &keyFile = SRCDIR "certs/fluke.key", const QString &certFile = SRCDIR "certs/fluke.cert")
+ : socket(0),
+ protocol(QSsl::TlsV1),
+ m_keyFile(keyFile),
+ m_certFile(certFile) { }
QSslSocket *socket;
QSsl::SslProtocol protocol;
+ QString m_keyFile;
+ QString m_certFile;
+
protected:
void incomingConnection(int socketDescriptor)
{
@@ -870,13 +878,13 @@ protected:
socket->setProtocol(protocol);
connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
- QFile file(SRCDIR "certs/fluke.key");
+ QFile file(m_keyFile);
QVERIFY(file.open(QIODevice::ReadOnly));
QSslKey key(file.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
QVERIFY(!key.isNull());
socket->setPrivateKey(key);
- QList<QSslCertificate> localCert = QSslCertificate::fromPath(SRCDIR "certs/fluke.cert");
+ QList<QSslCertificate> localCert = QSslCertificate::fromPath(m_certFile);
QVERIFY(!localCert.isEmpty());
QVERIFY(localCert.first().handle());
socket->setLocalCertificate(localCert.first());
@@ -1975,6 +1983,37 @@ void tst_QSslSocket::writeBigChunk()
socket->close();
}
+void tst_QSslSocket::blacklist()
+{
+ QFETCH_GLOBAL(bool, setProxy);
+ if (setProxy)
+ return;
+
+ SslServer server(SRCDIR "certs/fake-login.live.com.key", SRCDIR "certs/fake-login.live.com.pem");
+ QSslSocket *receiver = new QSslSocket(this);
+ connect(receiver, SIGNAL(readyRead()), SLOT(exitLoop()));
+
+ // connect two sockets to each other:
+ QVERIFY(server.listen(QHostAddress::LocalHost));
+ receiver->connectToHost("127.0.0.1", server.serverPort());
+ QVERIFY(receiver->waitForConnected(5000));
+ QVERIFY(server.waitForNewConnection(0));
+
+ QSslSocket *sender = server.socket;
+ QVERIFY(sender);
+ QVERIFY(sender->state() == QAbstractSocket::ConnectedState);
+ receiver->setObjectName("receiver");
+ sender->setObjectName("sender");
+ receiver->ignoreSslErrors();
+ receiver->startClientEncryption();
+
+ connect(receiver, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(exitLoop()));
+ connect(receiver, SIGNAL(encrypted()), SLOT(exitLoop()));
+ enterLoop(1);
+ QCOMPARE(receiver->error(), QAbstractSocket::SslHandshakeFailedError);
+ QCOMPARE(receiver->errorString(), QString("The peer certificate is blacklisted"));
+}
+
void tst_QSslSocket::setEmptyDefaultConfiguration()
{
// used to produce a crash in QSslConfigurationPrivate::deepCopyDefaultConfiguration, QTBUG-13265
diff --git a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
index 6157004..8003c44 100644
--- a/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
+++ b/tests/auto/qtextboundaryfinder/tst_qtextboundaryfinder.cpp
@@ -257,10 +257,10 @@ void tst_QTextBoundaryFinder::sentenceBoundaries()
void tst_QTextBoundaryFinder::isAtWordStart()
{
- QString txt("The quick brown fox jumped over $the lazy. dog ");
+ QString txt("The quick brown fox jumped over $the lazy. dog I win!");
QList<int> start, end;
- start << 0 << 4 << 10 << 16 << 20 << 27 << 32 << 33 << 37 << 41 << 43;
- end << 3 << 9 << 15 << 19 << 26 << 31 << 33 << 36 << 41 << 42 << 46;
+ start << 0 << 4 << 10 << 16 << 20 << 27 << 32 << 33 << 37 << 41 << 43 << 48 << 50 << 53;
+ end << 3 << 9 << 15 << 19 << 26 << 31 << 33 << 36 << 41 << 42 << 46 << 49 << 53 << 54;
QTextBoundaryFinder finder(QTextBoundaryFinder::Word, txt);
for(int i=0; i < txt.length(); ++i) {
finder.setPosition(i);
diff --git a/tests/auto/qthread/tst_qthread.cpp b/tests/auto/qthread/tst_qthread.cpp
index 12709db..9d8937c 100644
--- a/tests/auto/qthread/tst_qthread.cpp
+++ b/tests/auto/qthread/tst_qthread.cpp
@@ -105,6 +105,7 @@ private slots:
void adoptedThreadFinished();
void adoptedThreadExecFinished();
void adoptMultipleThreads();
+ void adoptMultipleThreadsOverlap();
void QTBUG13810_exitAndStart();
void QTBUG15378_exitAndExec();
@@ -664,7 +665,9 @@ void tst_QThread::usleep()
typedef void (*FunctionPointer)(void *);
void noop(void*) { }
-#ifdef Q_OS_UNIX
+#ifdef Q_OS_SYMBIAN
+typedef RThread ThreadHandle;
+#elif defined Q_OS_UNIX
typedef pthread_t ThreadHandle;
#elif defined Q_OS_WIN
typedef HANDLE ThreadHandle;
@@ -695,6 +698,7 @@ public:
protected:
static void *runUnix(void *data);
static unsigned WIN_FIX_STDCALL runWin(void *data);
+ static int runSymbian(void *data);
FunctionPointer functionPointer;
void *data;
@@ -704,7 +708,10 @@ void NativeThreadWrapper::start(FunctionPointer functionPointer, void *data)
{
this->functionPointer = functionPointer;
this->data = data;
-#ifdef Q_OS_UNIX
+#ifdef Q_OS_SYMBIAN
+ qt_symbian_throwIfError(nativeThreadHandle.Create(KNullDesC(), NativeThreadWrapper::runSymbian, 1024, &User::Allocator(), this));
+ nativeThreadHandle.Resume();
+#elif defined Q_OS_UNIX
const int state = pthread_create(&nativeThreadHandle, 0, NativeThreadWrapper::runUnix, this);
Q_UNUSED(state);
#elif defined(Q_OS_WINCE)
@@ -724,7 +731,12 @@ void NativeThreadWrapper::startAndWait(FunctionPointer functionPointer, void *da
void NativeThreadWrapper::join()
{
-#ifdef Q_OS_UNIX
+#ifdef Q_OS_SYMBIAN
+ TRequestStatus stat;
+ nativeThreadHandle.Logon(stat);
+ User::WaitForRequest(stat);
+ nativeThreadHandle.Close();
+#elif defined Q_OS_UNIX
pthread_join(nativeThreadHandle, 0);
#elif defined Q_OS_WIN
WaitForSingleObject(nativeThreadHandle, INFINITE);
@@ -764,6 +776,12 @@ unsigned WIN_FIX_STDCALL NativeThreadWrapper::runWin(void *data)
return 0;
}
+int NativeThreadWrapper::runSymbian(void *data)
+{
+ runUnix(data);
+ return 0;
+}
+
void NativeThreadWrapper::stop()
{
QMutexLocker lock(&mutex);
@@ -940,6 +958,7 @@ void tst_QThread::adoptMultipleThreads()
for (int i = 0; i < numThreads; ++i) {
nativeThreads.at(i)->stop();
nativeThreads.at(i)->join();
+ delete nativeThreads.at(i);
}
QTestEventLoop::instance().enterLoop(5);
@@ -948,6 +967,50 @@ void tst_QThread::adoptMultipleThreads()
qDeleteAll(nativeThreads);
}
+void tst_QThread::adoptMultipleThreadsOverlap()
+{
+#if defined(Q_OS_WIN)
+ // Windows CE is not capable of handling that many threads. On the emulator it is dead with 26 threads already.
+# if defined(Q_OS_WINCE)
+ const int numThreads = 20;
+# else
+ // need to test lots of threads, so that we exceed MAXIMUM_WAIT_OBJECTS in qt_adopted_thread_watcher()
+ const int numThreads = 200;
+# endif
+#elif defined(Q_OS_SYMBIAN)
+ // stress the monitoring thread's add function
+ const int numThreads = 100;
+#else
+ const int numThreads = 5;
+#endif
+ QVector<NativeThreadWrapper*> nativeThreads;
+
+ SignalRecorder recorder;
+
+ for (int i = 0; i < numThreads; ++i) {
+ nativeThreads.append(new NativeThreadWrapper());
+ nativeThreads.at(i)->setWaitForStop();
+ nativeThreads.at(i)->mutex.lock();
+ nativeThreads.at(i)->start();
+ }
+ for (int i = 0; i < numThreads; ++i) {
+ nativeThreads.at(i)->startCondition.wait(&nativeThreads.at(i)->mutex);
+ QObject::connect(nativeThreads.at(i)->qthread, SIGNAL(finished()), &recorder, SLOT(slot()));
+ nativeThreads.at(i)->mutex.unlock();
+ }
+
+ QObject::connect(nativeThreads.at(numThreads - 1)->qthread, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+
+ for (int i = 0; i < numThreads; ++i) {
+ nativeThreads.at(i)->stop();
+ nativeThreads.at(i)->join();
+ delete nativeThreads.at(i);
+ }
+
+ QTestEventLoop::instance().enterLoop(5);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+ QCOMPARE(int(recorder.activationCount), numThreads);
+}
void tst_QThread::stressTest()
{
#if defined(Q_OS_WINCE)
diff --git a/tests/auto/qthreadstorage/tst_qthreadstorage.cpp b/tests/auto/qthreadstorage/tst_qthreadstorage.cpp
index a62bfee..2391c81 100644
--- a/tests/auto/qthreadstorage/tst_qthreadstorage.cpp
+++ b/tests/auto/qthreadstorage/tst_qthreadstorage.cpp
@@ -385,19 +385,18 @@ void tst_QThreadStorage::QTBUG14579_leakInDestructor()
QCOMPARE(int(SPointer::count), c);
}
-
-class QTBUG14579_reset;
-Q_GLOBAL_STATIC(QThreadStorage<QTBUG14579_reset *>, QTBUG14579_resetTls)
-
class QTBUG14579_reset {
public:
SPointer member;
- ~QTBUG14579_reset() {
- //Quite stupid, but WTF::ThreadSpecific<T>::destroy does it.
- QTBUG14579_resetTls()->setLocalData(this);
- }
+ ~QTBUG14579_reset();
};
+Q_GLOBAL_STATIC(QThreadStorage<QTBUG14579_reset *>, QTBUG14579_resetTls)
+
+QTBUG14579_reset::~QTBUG14579_reset() {
+ //Quite stupid, but WTF::ThreadSpecific<T>::destroy does it.
+ QTBUG14579_resetTls()->setLocalData(this);
+}
void tst_QThreadStorage::QTBUG14579_resetInDestructor()
{
diff --git a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
index aa4c15a..8b38661 100644
--- a/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
+++ b/tests/benchmarks/corelib/thread/qmutex/tst_qmutex.cpp
@@ -44,7 +44,26 @@
#include <math.h>
-#ifdef Q_OS_UNIX
+#ifdef Q_OS_SYMBIAN
+# include <e32std.h>
+typedef RMutex NativeMutexType;
+void NativeMutexInitialize(NativeMutexType *mutex)
+{
+ mutex->CreateLocal();
+}
+void NativeMutexDestroy(NativeMutexType *mutex)
+{
+ mutex->Close();
+}
+void NativeMutexLock(NativeMutexType *mutex)
+{
+ mutex->Wait();
+}
+void NativeMutexUnlock(NativeMutexType *mutex)
+{
+ mutex->Signal();
+}
+#elif defined(Q_OS_UNIX)
# include <pthread.h>
# include <errno.h>
typedef pthread_mutex_t NativeMutexType;
diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro b/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro
new file mode 100644
index 0000000..bc7bd58
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qwaitcondition/qwaitcondition.pro
@@ -0,0 +1,5 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_bench_qwaitcondition
+QT -= gui
+SOURCES += tst_qwaitcondition.cpp
diff --git a/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp b/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
new file mode 100644
index 0000000..1bfc637
--- /dev/null
+++ b/tests/benchmarks/corelib/thread/qwaitcondition/tst_qwaitcondition.cpp
@@ -0,0 +1,210 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the Technology Preview License Agreement accompanying
+** this package.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain additional
+** rights. These rights are described in the Nokia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** If you have questions regarding the use of this file, please contact
+** Nokia at qt-info@nokia.com.
+**
+**
+**
+**
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtCore/QtCore>
+#include <QtTest/QtTest>
+
+#include <math.h>
+
+
+class tst_QWaitCondition : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QWaitCondition()
+ {
+ }
+
+private slots:
+ void oscillate_data();
+ void oscillate();
+
+ void thrash_data();
+ void thrash();
+
+public:
+ static QWaitCondition local, remote;
+ enum Turn {LocalTurn, RemoteTurn};
+ static Turn turn;
+};
+
+QWaitCondition tst_QWaitCondition::local;
+QWaitCondition tst_QWaitCondition::remote;
+tst_QWaitCondition::Turn tst_QWaitCondition::turn = tst_QWaitCondition::LocalTurn;
+
+class OscillateThread : public QThread
+{
+public:
+ bool m_done;
+ bool m_useMutex;
+ unsigned long m_timeout;
+ bool m_wakeOne;
+ int count;
+
+ OscillateThread(bool useMutex, unsigned long timeout, bool wakeOne)
+ : m_done(false), m_useMutex(useMutex), m_timeout(timeout), m_wakeOne(wakeOne)
+ {}
+ void run()
+ {
+ QMutex mtx;
+ QReadWriteLock rwl;
+ count = 0;
+
+ forever {
+ if (m_done)
+ break;
+ if (m_useMutex) {
+ mtx.lock();
+ while (tst_QWaitCondition::turn == tst_QWaitCondition::LocalTurn)
+ tst_QWaitCondition::remote.wait(&mtx, m_timeout);
+ mtx.unlock();
+ } else {
+ rwl.lockForWrite();
+ while (tst_QWaitCondition::turn == tst_QWaitCondition::LocalTurn)
+ tst_QWaitCondition::remote.wait(&rwl, m_timeout);
+ rwl.unlock();
+ }
+ tst_QWaitCondition::turn = tst_QWaitCondition::LocalTurn;
+ if (m_wakeOne)
+ tst_QWaitCondition::local.wakeOne();
+ else
+ tst_QWaitCondition::local.wakeAll();
+ count++;
+ }
+ }
+};
+
+void tst_QWaitCondition::oscillate_data()
+{
+ QTest::addColumn<bool>("useMutex");
+ QTest::addColumn<unsigned long>("timeout");
+ QTest::addColumn<bool>("wakeOne");
+
+ QTest::newRow("mutex, timeout, one") << true << 1000ul << true;
+ QTest::newRow("readWriteLock, timeout, one") << false << 1000ul << true;
+ QTest::newRow("mutex, timeout, all") << true << 1000ul << false;
+ QTest::newRow("readWriteLock, timeout, all") << false << 1000ul << false;
+ QTest::newRow("mutex, forever, one") << true << ULONG_MAX << true;
+ QTest::newRow("readWriteLock, forever, one") << false << ULONG_MAX << true;
+ QTest::newRow("mutex, forever, all") << true << ULONG_MAX << false;
+ QTest::newRow("readWriteLock, forever, all") << false << ULONG_MAX << false;
+}
+
+void tst_QWaitCondition::oscillate()
+{
+ QMutex mtx;
+ QReadWriteLock rwl;
+
+ QFETCH(bool, useMutex);
+ QFETCH(unsigned long, timeout);
+ QFETCH(bool, wakeOne);
+
+ turn = LocalTurn;
+ OscillateThread thrd(useMutex, timeout, wakeOne);
+ thrd.start();
+
+ QBENCHMARK {
+ if (useMutex)
+ mtx.lock();
+ else
+ rwl.lockForWrite();
+ turn = RemoteTurn;
+ if (wakeOne)
+ remote.wakeOne();
+ else
+ remote.wakeAll();
+ if (useMutex) {
+ while (turn == RemoteTurn)
+ local.wait(&mtx, timeout);
+ mtx.unlock();
+ } else {
+ while (turn == RemoteTurn)
+ local.wait(&rwl, timeout);
+ rwl.unlock();
+ }
+ }
+
+ thrd.m_done = true;
+ remote.wakeAll();
+ thrd.wait();
+
+ QCOMPARE(0, 0);
+}
+
+void tst_QWaitCondition::thrash_data()
+{
+ oscillate_data();
+}
+
+void tst_QWaitCondition::thrash()
+{
+ QMutex mtx;
+ mtx.lock();
+
+ QFETCH(bool, useMutex);
+ QFETCH(unsigned long, timeout);
+ QFETCH(bool, wakeOne);
+
+ turn = LocalTurn;
+ OscillateThread thrd(useMutex, timeout, wakeOne);
+ thrd.start();
+ local.wait(&mtx, 1000ul);
+ mtx.unlock();
+
+ QBENCHMARK {
+ turn = RemoteTurn;
+ if (wakeOne)
+ remote.wakeOne();
+ else
+ remote.wakeAll();
+ }
+
+ thrd.m_done = true;
+ turn = RemoteTurn;
+ remote.wakeAll();
+ thrd.wait();
+
+ QCOMPARE(0, 0);
+}
+
+QTEST_MAIN(tst_QWaitCondition)
+#include "tst_qwaitcondition.moc"
diff --git a/tools/designer/src/lib/sdk/membersheet.qdoc b/tools/designer/src/lib/sdk/membersheet.qdoc
index fdd13f2..57a3664 100644
--- a/tools/designer/src/lib/sdk/membersheet.qdoc
+++ b/tools/designer/src/lib/sdk/membersheet.qdoc
@@ -40,7 +40,7 @@
manipulate the member functions' appearance in \QD's signals and
slots editing mode. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 2
When implementing a custom widget plugin, a pointer to \QD's
current QDesignerFormEditorInterface object (\c formEditor in the
@@ -69,7 +69,7 @@
made known to the meta object system using the Q_INTERFACES()
macro:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 3
This enables \QD to use qobject_cast() to query for
supported interfaces using nothing but a QObject pointer.
@@ -101,13 +101,13 @@
QExtensionFactory and reimplement the
QExtensionFactory::createExtension() function. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 4
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a member sheet extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 5
For a complete example using an extension class, see \l
{designer/taskmenuextension}{Task Menu Extension example}. The
diff --git a/tools/designer/src/lib/sdk/propertysheet.qdoc b/tools/designer/src/lib/sdk/propertysheet.qdoc
index d82de88..becc74b 100644
--- a/tools/designer/src/lib/sdk/propertysheet.qdoc
+++ b/tools/designer/src/lib/sdk/propertysheet.qdoc
@@ -41,7 +41,7 @@
manipulate the properties' appearance in the property editor. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 15
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 15
Note that if you change the value of a property using the
QDesignerPropertySheetExtension::setProperty() function, the undo
@@ -80,7 +80,7 @@
an interface, we must ensure that it's made known to the meta
object system using the Q_INTERFACES() macro:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 16
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 16
This enables \QD to use qobject_cast() to query for supported
interfaces using nothing but a QObject pointer.
@@ -112,14 +112,14 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 17
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 17
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a property sheet extension extension as well. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 18
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 18
For a complete example using an extension class, see the \l
{designer/taskmenuextension}{Task Menu Extension example}. The
diff --git a/tools/designer/src/lib/sdk/taskmenu.qdoc b/tools/designer/src/lib/sdk/taskmenu.qdoc
index 06d0b96..c5a3795 100644
--- a/tools/designer/src/lib/sdk/taskmenu.qdoc
+++ b/tools/designer/src/lib/sdk/taskmenu.qdoc
@@ -51,7 +51,7 @@
inherit from both QObject and QDesignerTaskMenuExtension. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 9
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 9
Since we are implementing an interface, we must ensure that it
is made known to the meta-object system using the Q_INTERFACES()
@@ -94,13 +94,13 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 10
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 10
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a task menu extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 11
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 11
For a complete example using the QDesignerTaskMenuExtension class,
see the \l {designer/taskmenuextension}{Task Menu Extension
diff --git a/tools/designer/src/lib/shared/shared.pri b/tools/designer/src/lib/shared/shared.pri
index 8286360..9d50911 100644
--- a/tools/designer/src/lib/shared/shared.pri
+++ b/tools/designer/src/lib/shared/shared.pri
@@ -2,7 +2,7 @@
INCLUDEPATH += $$PWD
contains(QT_CONFIG, script): QT += script
-include(../../../../shared/qtpropertybrowser/qtpropertybrowser.pri)
+include(../../../../shared/qtpropertybrowser/qtpropertybrowserutils.pri)
include(../../../../shared/deviceskin/deviceskin.pri)
include(../../../../../src/tools/rcc/rcc.pri)
include(../../../../shared/findwidget/findwidget.pri)
diff --git a/tools/designer/src/lib/uilib/container.qdoc b/tools/designer/src/lib/uilib/container.qdoc
index 51d942e..d931051 100644
--- a/tools/designer/src/lib/uilib/container.qdoc
+++ b/tools/designer/src/lib/uilib/container.qdoc
@@ -44,7 +44,7 @@
To create a container extension, your extension class must inherit
from both QObject and QDesignerContainerExtension. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 6
Since we are implementing an interface, we must ensure that it's
made known to the meta object system using the Q_INTERFACES()
@@ -88,13 +88,13 @@
reimplement the QExtensionFactory::createExtension() function. For
example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 7
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 7
Or you can use an existing factory, expanding the
QExtensionFactory::createExtension() function to make the factory
able to create a container extension as well. For example:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 8
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 8
For a complete example using the QDesignerContainerExtension
class, see the \l {designer/containerextension}{Container
diff --git a/tools/designer/src/lib/uilib/customwidget.qdoc b/tools/designer/src/lib/uilib/customwidget.qdoc
index 3410fc6..d5ddaa7 100644
--- a/tools/designer/src/lib/uilib/customwidget.qdoc
+++ b/tools/designer/src/lib/uilib/customwidget.qdoc
@@ -73,7 +73,7 @@
class called \c MyCustomWidget, we can export it by adding the
following line to the file containing the plugin implementation:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 14
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 14
This macro ensures that \QD can access and construct the custom widget.
Without this macro, there is no way for \QD to use it.
@@ -264,13 +264,13 @@
several custom widgets \c CustomWidgetOne, \c CustomWidgetTwo and
\c CustomWidgetThree, the class definition may look like this:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 12
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 12
In the class constructor you add the interfaces to your custom
widgets to the list which you return in the customWidgets()
function:
- \snippet doc/src/snippets/code/doc_src_qtdesigner.qdoc 13
+ \snippet doc/src/snippets/code/doc_src_qtdesigner.cpp 13
Note that instead of exporting each custom widget plugin using the
Q_EXPORT_PLUGIN2() macro, you export the entire collection. The
diff --git a/tools/qdoc3/atom.cpp b/tools/qdoc3/atom.cpp
index fb473c7..2d50e5a 100644
--- a/tools/qdoc3/atom.cpp
+++ b/tools/qdoc3/atom.cpp
@@ -51,6 +51,7 @@ QString Atom::INDEX_ ("index");
QString Atom::ITALIC_ ("italic");
QString Atom::LINK_ ("link");
QString Atom::PARAMETER_ ("parameter");
+QString Atom::SPAN_ ("span");
QString Atom::SUBSCRIPT_ ("subscript");
QString Atom::SUPERSCRIPT_ ("superscript");
QString Atom::TELETYPE_ ("teletype");
@@ -107,7 +108,8 @@ QString Atom::UPPERROMAN_ ("upperroman");
\value CodeOld
\value CodeQuoteArgument
\value CodeQuoteCommand
- \value Div
+ \value DivLeft
+ \value DivRight
\value EndQmlText
\value FormatElse
\value FormatEndif
@@ -180,8 +182,8 @@ static const struct {
{ "CodeOld", Atom::CodeOld },
{ "CodeQuoteArgument", Atom::CodeQuoteArgument },
{ "CodeQuoteCommand", Atom::CodeQuoteCommand },
- { "Div", Atom::Div },
- { "EndDiv", Atom::EndDiv },
+ { "DivLeft", Atom::DivLeft },
+ { "DivRight", Atom::DivRight },
#ifdef QDOC_QML
{ "EndQmlText", Atom::EndQmlText },
#endif
diff --git a/tools/qdoc3/atom.h b/tools/qdoc3/atom.h
index e3b993e..dbb1a8b 100644
--- a/tools/qdoc3/atom.h
+++ b/tools/qdoc3/atom.h
@@ -46,7 +46,7 @@
#ifndef ATOM_H
#define ATOM_H
-#include <qstring.h>
+#include <qstringlist.h>
#define QDOC_QML
@@ -72,9 +72,9 @@ class Atom
CodeOld,
CodeQuoteArgument,
CodeQuoteCommand,
- Div,
+ DivLeft, // 16
+ DivRight, // 17
#ifdef QDOC_QML
- EndDiv,
EndQmlText,
#endif
FootnoteLeft,
@@ -101,10 +101,10 @@ class Atom
ListLeft,
ListItemNumber,
ListTagLeft, // 40
- ListTagRight, // 41
- ListItemLeft, // 42
- ListItemRight, // 43
- ListRight, // 44
+ ListTagRight,
+ ListItemLeft,
+ ListItemRight,
+ ListRight,
Nop,
ParaLeft,
ParaRight,
@@ -115,7 +115,7 @@ class Atom
QuotationLeft, // 50
QuotationRight,
RawString,
- SectionLeft, // 53
+ SectionLeft,
SectionRight,
SectionHeadingLeft,
SectionHeadingRight,
@@ -125,8 +125,8 @@ class Atom
SnippetCommand, // 60
SnippetIdentifier,
SnippetLocation,
- String, // 63
- TableLeft, // 64
+ String,
+ TableLeft,
TableRight,
TableHeaderLeft,
TableHeaderRight,
@@ -135,30 +135,57 @@ class Atom
TableItemLeft, // 70
TableItemRight,
TableOfContents,
- Target, // 73
+ Target,
UnhandledFormat,
UnknownCommand,
Last = UnknownCommand
};
- Atom(Type type, const QString &string = "")
- : nxt(0), typ(type), str(string) { }
- Atom(Atom *prev, Type type, const QString &string = "")
- : nxt(prev->nxt), typ(type), str(string) { prev->nxt = this; }
-
- void appendChar(QChar ch) { str += ch; }
- void appendString(const QString& string) { str += string; }
- void chopString() { str.chop(1); }
- void setString(const QString &string) { str = string; }
- Atom *next() { return nxt; }
- void setNext(Atom *newNext) { nxt = newNext; }
-
- const Atom *next() const { return nxt; }
- const Atom *next(Type t) const;
- const Atom *next(Type t, const QString& s) const;
+ Atom(Type type, const QString& string = "")
+ : nxt(0), typ(type)
+ {
+ strs << string;
+ }
+
+ Atom(Type type, const QString& p1, const QString& p2)
+ : nxt(0), typ(type)
+ {
+ strs << p1;
+ if (!p2.isEmpty())
+ strs << p2;
+ }
+
+ Atom(Atom* prev, Type type, const QString& string = "")
+ : nxt(prev->nxt), typ(type)
+ {
+ strs << string;
+ prev->nxt = this;
+ }
+
+ Atom(Atom* prev, Type type, const QString& p1, const QString& p2)
+ : nxt(prev->nxt), typ(type)
+ {
+ strs << p1;
+ if (!p2.isEmpty())
+ strs << p2;
+ prev->nxt = this;
+ }
+
+ void appendChar(QChar ch) { strs[0] += ch; }
+ void appendString(const QString& string) { strs[0] += string; }
+ void chopString() { strs[0].chop(1); }
+ void setString(const QString& string) { strs[0] = string; }
+ Atom* next() { return nxt; }
+ void setNext(Atom* newNext) { nxt = newNext; }
+
+ const Atom* next() const { return nxt; }
+ const Atom* next(Type t) const;
+ const Atom* next(Type t, const QString& s) const;
Type type() const { return typ; }
QString typeString() const;
- const QString& string() const { return str; }
+ const QString& string() const { return strs[0]; }
+ const QString& string(int i) const { return strs[i]; }
+ int count() const { return strs.size(); }
void dump() const;
static QString BOLD_;
@@ -166,6 +193,7 @@ class Atom
static QString ITALIC_;
static QString LINK_;
static QString PARAMETER_;
+ static QString SPAN_;
static QString SUBSCRIPT_;
static QString SUPERSCRIPT_;
static QString TELETYPE_;
@@ -181,9 +209,9 @@ class Atom
static QString UPPERROMAN_;
private:
- Atom *nxt;
+ Atom* nxt;
Type typ;
- QString str;
+ QStringList strs;
};
#define ATOM_FORMATTING_BOLD "bold"
@@ -191,6 +219,7 @@ class Atom
#define ATOM_FORMATTING_ITALIC "italic"
#define ATOM_FORMATTING_LINK "link"
#define ATOM_FORMATTING_PARAMETER "parameter"
+#define ATOM_FORMATTING_SPAN "span "
#define ATOM_FORMATTING_SUBSCRIPT "subscript"
#define ATOM_FORMATTING_SUPERSCRIPT "superscript"
#define ATOM_FORMATTING_TELETYPE "teletype"
diff --git a/tools/qdoc3/cppcodeparser.cpp b/tools/qdoc3/cppcodeparser.cpp
index 3979176..595756a 100644
--- a/tools/qdoc3/cppcodeparser.cpp
+++ b/tools/qdoc3/cppcodeparser.cpp
@@ -863,10 +863,12 @@ Node *CppCodeParser::processTopicCommandGroup(const Doc& doc,
}
if (qmlPropGroup) {
const ClassNode *correspondingClass = static_cast<const QmlClassNode*>(qmlPropGroup->parent())->classNode();
- PropertyNode *correspondingProperty = 0;
- if (correspondingClass)
- correspondingProperty = static_cast<PropertyNode*>((Node*)correspondingClass->findNode(property, Node::Property));
QmlPropertyNode *qmlPropNode = new QmlPropertyNode(qmlPropGroup,property,type,attached);
+
+ const PropertyNode *correspondingProperty = 0;
+ if (correspondingClass) {
+ correspondingProperty = qmlPropNode->correspondingProperty(tre);
+ }
if (correspondingProperty) {
bool writableList = type.startsWith("list") && correspondingProperty->dataType().endsWith('*');
qmlPropNode->setWritable(writableList || correspondingProperty->isWritable());
@@ -1829,7 +1831,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
QString key = previousLexeme();
QString value;
- if (match(Tok_Ident)) {
+ if (match(Tok_Ident) || match(Tok_Number)) {
value = previousLexeme();
}
else if (match(Tok_LeftParen)) {
@@ -1872,8 +1874,15 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
tre->addPropertyFunction(property, value, PropertyNode::Resetter);
else if (key == "NOTIFY") {
tre->addPropertyFunction(property, value, PropertyNode::Notifier);
- }
- else if (key == "SCRIPTABLE") {
+ } else if (key == "REVISION") {
+ int revision;
+ bool ok;
+ revision = value.toInt(&ok);
+ if (ok)
+ property->setRevision(revision);
+ else
+ parent->doc().location().warning(tr("Invalid revision number: %1").arg(value));
+ } else if (key == "SCRIPTABLE") {
QString v = value.toLower();
if (v == "true")
property->setScriptable(true);
@@ -1884,7 +1893,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
property->setRuntimeScrFunc(value);
}
}
- else if (key == "COSTANT")
+ else if (key == "CONSTANT")
property->setConstant();
else if (key == "FINAL")
property->setFinal();
diff --git a/tools/qdoc3/ditaxmlgenerator.cpp b/tools/qdoc3/ditaxmlgenerator.cpp
index e180c0a..5d3e34a 100644
--- a/tools/qdoc3/ditaxmlgenerator.cpp
+++ b/tools/qdoc3/ditaxmlgenerator.cpp
@@ -61,230 +61,6 @@ QT_BEGIN_NAMESPACE
#define COMMAND_VERSION Doc::alias("version")
int DitaXmlGenerator::id = 0;
-bool DitaXmlGenerator::inApiDesc = false;
-bool DitaXmlGenerator::inSection = false;
-bool DitaXmlGenerator::inDetailedDescription = false;
-bool DitaXmlGenerator::inLegaleseText = false;
-
-#define cxxapi_d_xref Doc::alias("cxxapi-d-xref")
-#define cxxclass Doc::alias("cxxclass")
-#define cxxdefine Doc::alias("cxxdefine")
-#define cxxenumeration Doc::alias("cxxenumeration")
-#define cxxfile Doc::alias("cxxfile")
-#define cxxfunction Doc::alias("cxxfunction")
-#define cxxstruct Doc::alias("cxxstruct")
-#define cxxtypedef Doc::alias("cxxtypedef")
-#define cxxunion Doc::alias("cxxunion")
-#define cxxvariable Doc::alias("cxxvariable")
-
-#define CXXAPIMAP Doc::alias("cxxAPIMap")
-#define CXXCLASSREF Doc::alias("cxxClassRef")
-#define CXXDEFINEREF Doc::alias("cxxDefineRef")
-#define CXXENUMERATIONREF Doc::alias("cxxEnumerationRef")
-#define CXXFILEREF Doc::alias("cxxFileRef")
-#define CXXFUNCTIONREF Doc::alias("cxxFunctionRef")
-#define CXXSTRUCTREF Doc::alias("cxxStructRef")
-#define CXXTYPDEFREF Doc::alias("cxxTypedefRef")
-#define CXXUNIONREF Doc::alias("cxxUnionRef")
-#define CXXVARIABLEREF Doc::alias("cxxVariableRef")
-
-#define CXXCLASS Doc::alias("cxxClass")
-#define CXXCLASSABSTRACT Doc::alias("cxxClassAbstract")
-#define CXXCLASSACCESSSPECIFIER Doc::alias("cxxClassAccessSpecifier")
-#define CXXCLASSAPIITEMLOCATION Doc::alias("cxxClassAPIItemLocation")
-#define CXXCLASSBASECLASS Doc::alias("cxxClassBaseClass")
-#define CXXCLASSBASECLASSSTRUCT Doc::alias("cxxClassBaseStruct")
-#define CXXCLASSBASEUNION Doc::alias("cxxClassBaseUnion")
-#define CXXCLASSDECLARATIONFILE Doc::alias("cxxClassDeclarationFile")
-#define CXXCLASSDECLARATIONFILELINE Doc::alias("cxxClassDeclarationFileLine")
-#define CXXCLASSDEFINITION Doc::alias("cxxClassDefinition")
-#define CXXCLASSDEFINITIONFILE Doc::alias("cxxClassDefinitionFile")
-#define CXXCLASSDEFINITIONFILEEND Doc::alias("cxxClassDefinitionFileLineEnd")
-#define CXXCLASSDEFINITIONFILESTART Doc::alias("cxxClassDefinitionFileLineStart")
-#define CXXCLASSDERIVATION Doc::alias("cxxClassDerivation")
-#define CXXCLASSDERIVATIONACCESSSPECIFIER Doc::alias("cxxClassDerivationAccessSpecifier")
-#define CXXCLASSDERIVATIONS Doc::alias("cxxClassDerivations")
-#define CXXCLASSDERIVATIONVIRTUAL Doc::alias("cxxClassDerivationVirtual")
-#define CXXCLASSDETAIL Doc::alias("cxxClassDetail")
-#define CXXCLASSENUMERATIONINHERITED Doc::alias("cxxClassEnumerationInherited")
-#define CXXCLASSENUMERATORINHERITED Doc::alias("cxxClassEnumeratorInherited")
-#define CXXCLASSFUNCTIONINHERITED Doc::alias("cxxClassFunctionInherited")
-#define CXXCLASSINHERITS Doc::alias("cxxClassInherits")
-#define CXXCLASSINHERITSDETAIL Doc::alias("cxxClassInheritsDetail")
-#define CXXCLASSNESTED Doc::alias("cxxClassNested")
-#define CXXCLASSNESTEDCLASS Doc::alias("cxxClassNestedClass")
-#define CXXCLASSNESTEDDETAIL Doc::alias("cxxClassNestedDetail")
-#define CXXCLASSNESTEDSTRUCT Doc::alias("cxxClassNestedStruct")
-#define CXXCLASSNESTEDUNION Doc::alias("cxxClassNestedUnion")
-#define CXXCLASSTEMPLATEPARAMETER Doc::alias("cxxClassTemplateParameter")
-#define CXXCLASSTEMPLATEPARAMETERS Doc::alias("cxxClassTemplateParameters")
-#define CXXCLASSTEMPLATEPARAMETERTYPE Doc::alias("cxxClassTemplateParameterType")
-#define CXXCLASSVARIABLEINHERITED Doc::alias("cxxClassVariableInherited")
-
-#define CXXDEFINE Doc::alias("cxxDefine")
-#define CXXDEFINEACCESSSPECIFIER Doc::alias("cxxDefineAccessSpecifier")
-#define CXXDEFINEAPIITEMLOCATION Doc::alias("cxxDefineAPIItemLocation")
-#define CXXDEFINEDECLARATIONFILE Doc::alias("cxxDefineDeclarationFile")
-#define CXXDEFINEDECLARATIONFILELINE Doc::alias("cxxDefineDeclarationFileLine")
-#define CXXDEFINEDEFINITION Doc::alias("cxxDefineDefinition")
-#define CXXDEFINEDETAIL Doc::alias("cxxDefineDetail")
-#define CXXDEFINENAMELOOKUP Doc::alias("cxxDefineNameLookup")
-#define CXXDEFINEPARAMETER Doc::alias("cxxDefineParameter")
-#define CXXDEFINEPARAMETERDECLARATIONNAME Doc::alias("cxxDefineParameterDeclarationName")
-#define CXXDEFINEPARAMETERS Doc::alias("cxxDefineParameters")
-#define CXXDEFINEPROTOTYPE Doc::alias("cxxDefinePrototype")
-#define CXXDEFINEREIMPLEMENTED Doc::alias("cxxDefineReimplemented")
-
-#define CXXENUMERATION Doc::alias("cxxEnumeration")
-#define CXXENUMERATIONACCESSSPECIFIER Doc::alias("cxxEnumerationAccessSpecifier")
-#define CXXENUMERATIONAPIITEMLOCATION Doc::alias("cxxEnumerationAPIItemLocation")
-#define CXXENUMERATIONDECLARATIONFILE Doc::alias("cxxEnumerationDeclarationFile")
-#define CXXENUMERATIONDECLARATIONFILELINE Doc::alias("cxxEnumerationDeclarationFileLine")
-#define CXXENUMERATIONDEFINITION Doc::alias("cxxEnumerationDefinition")
-#define CXXENUMERATIONDEFINITIONFILE Doc::alias("cxxEnumerationDefinitionFile")
-#define CXXENUMERATIONDEFINITIONFILELINEEND Doc::alias("cxxEnumerationDefinitionFileLineEnd")
-#define CXXENUMERATIONDEFINITIONFILELINESTART Doc::alias("cxxEnumerationDefinitionFileLineStart")
-#define CXXENUMERATIONDETAIL Doc::alias("cxxEnumerationDetail")
-#define CXXENUMERATIONNAMELOOKUP Doc::alias("cxxEnumerationNameLookup")
-#define CXXENUMERATIONPROTOTYPE Doc::alias("cxxEnumerationPrototype")
-#define CXXENUMERATIONREIMPLEMENTED Doc::alias("cxxEnumerationReimplemented")
-#define CXXENUMERATIONSCOPEDNAME Doc::alias("cxxEnumerationScopedName")
-#define CXXENUMERATOR Doc::alias("cxxEnumerator")
-#define CXXENUMERATORAPIITEMLOCATION Doc::alias("cxxEnumeratorAPIItemLocation")
-#define CXXENUMERATORDECLARATIONFILE Doc::alias("cxxEnumeratorDeclarationFile")
-#define CXXENUMERATORDECLARATIONFILELINE Doc::alias("cxxEnumeratorDeclarationFileLine")
-#define CXXENUMERATORINITIALISER Doc::alias("cxxEnumeratorInitialiser")
-#define CXXENUMERATORNAMELOOKUP Doc::alias("cxxEnumeratorNameLookup")
-#define CXXENUMERATORPROTOTYPE Doc::alias("cxxEnumeratorPrototype")
-#define CXXENUMERATORS Doc::alias("cxxEnumerators")
-#define CXXENUMERATORSCOPEDNAME Doc::alias("cxxEnumeratorScopedName")
-
-#define CXXFILE_INFO_TYPES Doc::alias("cxxFile-info-types")
-#define CXXFILE_TYPES_DEFAULT Doc::alias("cxxFile-types-default")
-#define CXXFILE Doc::alias("cxxFile")
-#define CXXFILEAPIITMELOCATION Doc::alias("cxxFileAPIItemLocation")
-#define CXXFILEDECLARATIONFILE Doc::alias("cxxFileDeclarationFile")
-
-#define CXXFUNCTION Doc::alias("cxxFunction")
-#define CXXFUNCTIONACCESSSPECIFIER Doc::alias("cxxFunctionAccessSpecifier")
-#define CXXFUNCTIONAPIITEMLOCATION Doc::alias("cxxFunctionAPIItemLocation")
-#define CXXFUNCTIONCONST Doc::alias("cxxFunctionConst")
-#define CXXFUNCTIONCONSTRUCTOR Doc::alias("cxxFunctionConstructor")
-#define CXXFUNCTIONDECLARATIONFILE Doc::alias("cxxFunctionDeclarationFile")
-#define CXXFUNCTIONDECLARATIONFILELINE Doc::alias("cxxFunctionDeclarationFileLine")
-#define CXXFUNCTIONDECLAREDTYPE Doc::alias("cxxFunctionDeclaredType")
-#define CXXFUNCTIONDEFINITION Doc::alias("cxxFunctionDefinition")
-#define CXXFUNCTIONDEFINITIONFILE Doc::alias("cxxFunctionDefinitionFile")
-#define CXXFUNCTIONDEFINITIONFILELINEEND Doc::alias("cxxFunctionDefinitionFileLineEnd")
-#define CXXFUNCTIONDEFINITIONFILELINESTART Doc::alias("cxxFunctionDefinitionFileLineStart")
-#define CXXFUNCTIONDESTRUCTOR Doc::alias("cxxFunctionDestructor")
-#define CXXFUNCTIONDETAIL Doc::alias("cxxFunctionDetail")
-#define CXXFUNCTIONEXPLICIT Doc::alias("cxxFunctionExplicit")
-#define CXXFUNCTIONINLINE Doc::alias("cxxFunctionInline")
-#define CXXFUNCTIONNAMELOOKUP Doc::alias("cxxFunctionNameLookup")
-#define CXXFUNCTIONPARAMETER Doc::alias("cxxFunctionParameter")
-#define CXXFUNCTIONPARAMETERDECLARATIONNAME Doc::alias("cxxFunctionParameterDeclarationName")
-#define CXXFUNCTIONPARAMETERDECLAREDTYPE Doc::alias("cxxFunctionParameterDeclaredType")
-#define CXXFUNCTIONPARAMETERDEFAULTVALUE Doc::alias("cxxFunctionParameterDefaultValue")
-#define CXXFUNCTIONPARAMETERDEFINITIONNAME Doc::alias("cxxFunctionParameterDefinitionName")
-#define CXXFUNCTIONPARAMETERS Doc::alias("cxxFunctionParameters")
-#define CXXFUNCTIONPROTOTYPE Doc::alias("cxxFunctionPrototype")
-#define CXXFUNCTIONPUREVIRTUAL Doc::alias("cxxFunctionPureVirtual")
-#define CXXFUNCTIONREIMPLEMENTED Doc::alias("cxxFunctionReimplemented")
-#define CXXFUNCTIONRETURNTYPE Doc::alias("cxxFunctionReturnType")
-#define CXXFUNCTIONSCOPEDNAME Doc::alias("cxxFunctionScopedName")
-#define CXXFUNCTIONSTORAGECLASSSPECIFIEREXTERN Doc::alias("cxxFunctionStorageClassSpecifierExtern")
-#define CXXFUNCTIONSTORAGECLASSSPECIFIERMUTABLE Doc::alias("cxxFunctionStorageClassSpecifierMutable")
-#define CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxFunctionStorageClassSpecifierStatic")
-#define CXXFUNCTIONTEMPLATEPARAMETER Doc::alias("cxxFunctionTemplateParameter")
-#define CXXFUNCTIONTEMPLATEPARAMETERS Doc::alias("cxxFunctionTemplateParameters")
-#define CXXFUNCTIONTEMPLATEPARAMETERTYPE Doc::alias("cxxFunctionTemplateParameterType")
-#define CXXFUNCTIONVIRTUAL Doc::alias("cxxFunctionVirtual")
-#define CXXFUNCTIONVOLATILE Doc::alias("cxxFunctionVolatile")
-
-#define CXXSTRUCT Doc::alias("cxxStruct")
-#define CXXSTRUCTABSTRACT Doc::alias("cxxStructAbstract")
-#define CXXSTRUCTACCESSSPECIFIER Doc::alias("cxxStructAccessSpecifier")
-#define CXXSTRUCTAPIITEMLOCATION Doc::alias("cxxStructAPIItemLocation")
-#define CXXSTRUCTBASECLASS Doc::alias("cxxStructBaseClass")
-#define CXXSTRUCTBASESTRUCT Doc::alias("cxxStructBaseStruct")
-#define CXXSTRUCTBASEUNION Doc::alias("cxxStructBaseUnion")
-#define CXXSTRUCTDECLARATIONFILE Doc::alias("cxxStructDeclarationFile")
-#define CXXSTRUCTDECLARATIONFILELINE Doc::alias("cxxStructDeclarationFileLine")
-#define CXXSTRUCTDEFINITION Doc::alias("cxxStructDefinition")
-#define CXXSTRUCTDEFINITIONFILE Doc::alias("cxxStructDefinitionFile")
-#define CXXSTRUCTDEFINITIONFILELINEEND Doc::alias("cxxStructDefinitionFileLineEnd")
-#define CXXSTRUCTDEFINITIONFILELINESTART Doc::alias("cxxStructDefinitionFileLineStart")
-#define CXXSTRUCTDERIVATION Doc::alias("cxxStructDerivation")
-#define CXXSTRUCTDERIVATIONACCESSSPECIFIER Doc::alias("cxxStructDerivationAccessSpecifier")
-#define CXXSTRUCTDERIVATIONS Doc::alias("cxxStructDerivations")
-#define CXXSTRUCTDERIVATIONVIRTUAL Doc::alias("cxxStructDerivationVirtual")
-#define CXXSTRUCTDETAIL Doc::alias("cxxStructDetail")
-#define CXXSTRUCTENUMERATIONINHERITED Doc::alias("cxxStructEnumerationInherited")
-#define CXXSTRUCTENUMERATORINHERITED Doc::alias("cxxStructEnumeratorInherited")
-#define CXXSTRUCTFUNCTIONINHERITED Doc::alias("cxxStructFunctionInherited")
-#define CXXSTRUCTINHERITS Doc::alias("cxxStructInherits")
-#define CXXSTRUCTINHERITSDETAIL Doc::alias("cxxStructInheritsDetail")
-#define CXXSTRUCTNESTED Doc::alias("cxxStructNested")
-#define CXXSTRUCTNESTEDCLASS Doc::alias("cxxStructNestedClass")
-#define CXXSTRUCTNESTEDDETAIL Doc::alias("cxxStructNestedDetail")
-#define CXXSTRUCTNESTEDSTRUCT Doc::alias("cxxStructNestedStruct")
-#define CXXSTRUCTNESTEDUNION Doc::alias("cxxStructNestedUnion")
-#define CXXSTRUCTTEMPLATEPARAMETER Doc::alias("cxxStructTemplateParameter")
-#define CXXSTRUCTTEMPLATEPARAMETERS Doc::alias("cxxStructTemplateParameters")
-#define CXXSTRUCTTEMPLATEPARAMETERTYPE Doc::alias("cxxStructTemplateParameterType")
-#define CXXSTRUCTVARIABLEINHERITED Doc::alias("cxxStructVariableInherited")
-
-#define CXXTYPEDEF Doc::alias("cxxTypedef")
-#define CXXTYPEDEFACCESSSPECIFIER Doc::alias("cxxTypedefAccessSpecifier")
-#define CXXTYPEDEFAPIITEMLOCATION Doc::alias("cxxTypedefAPIItemLocation")
-#define CXXTYPEDEFDECLARATIONFILE Doc::alias("cxxTypedefDeclarationFile")
-#define CXXTYPEDEFDECLARATIONFILELINE Doc::alias("cxxTypedefDeclarationFileLine")
-#define CXXTYPEDEFDECLAREDTYPE Doc::alias("cxxTypedefDeclaredType")
-#define CXXTYPEDEFDEFINITION Doc::alias("cxxTypedefDefinition")
-#define CXXTYPEDEFDETAIL Doc::alias("cxxTypedefDetail")
-#define CXXTYPEDEFNAMELOOKUP Doc::alias("cxxTypedefNameLookup")
-#define CXXTYPEDEFPROTOTYPE Doc::alias("cxxTypedefPrototype")
-#define CXXTYPEDEFREIMPLEMENTED Doc::alias("cxxTypedefReimplemented")
-#define CXXTYPEDEFSCOPEDNAME Doc::alias("cxxTypedefScopedName")
-
-#define CXXUNION Doc::alias("cxxUnion")
-#define CXXUNIONABSTRACT Doc::alias("cxxUnionAbstract")
-#define CXXUNIONACCESSSPECIFIER Doc::alias("cxxUnionAccessSpecifier")
-#define CXXUNIONAPIITEMLOCATION Doc::alias("cxxUnionAPIItemLocation")
-#define CXXUNIONDECLARATIONFILE Doc::alias("cxxUnionDeclarationFile")
-#define CXXUNIONDECLARATIONFILELINE Doc::alias("cxxUnionDeclarationFileLine")
-#define CXXUNIONDEFINITION Doc::alias("cxxUnionDefinition")
-#define CXXUNIONDEFINITIONFILE Doc::alias("cxxUnionDefinitionFile")
-#define CXXUNIONDEFINITIONFILELINEEND Doc::alias("cxxUnionDefinitionFileLineEnd")
-#define CXXUNIONDEFINITIONFILELINESTART Doc::alias("cxxUnionDefinitionFileLineStart")
-#define CXXUNIONDETAIL Doc::alias("cxxUnionDetail")
-#define CXXUNIONNESTED Doc::alias("cxxUnionNested")
-#define CXXUNIONNESTEDCLASS Doc::alias("cxxUnionNestedClass")
-#define CXXUNIONNESTEDDETAIL Doc::alias("cxxUnionNestedDetail")
-#define CXXUNIONNESTEDSTRUCT Doc::alias("cxxUnionNestedStruct")
-#define CXXUNIONNESTEDUNION Doc::alias("cxxUnionNestedUnion")
-#define CXXUNIONTEMPLATEPARAMETER Doc::alias("cxxUnionTemplateParameter")
-#define CXXUNIONTEMPLATEPARAMETERS Doc::alias("cxxUnionTemplateParameters")
-#define CXXUNIONTEMPLATEPARAMETERTYPE Doc::alias("cxxUnionTemplateParameterType")
-
-#define CXXVARIABLE Doc::alias("cxxVariable")
-#define CXXVARIABLEACCESSSPECIFIER Doc::alias("cxxVariableAccessSpecifier")
-#define CXXVARIABLEAPIITEMLOCATION Doc::alias("cxxVariableAPIItemLocation")
-#define CXXVARIABLECONST Doc::alias("cxxVariableConst")
-#define CXXVARIABLEDECLARATIONFILE Doc::alias("cxxVariableDeclarationFile")
-#define CXXVARIABLEDECLARATIONFILELINE Doc::alias("cxxVariableDeclarationFileLine")
-#define CXXVARIABLEDECLAREDTYPE Doc::alias("cxxVariableDeclaredType")
-#define CXXVARIABLEDEFINITION Doc::alias("cxxVariableDefinition")
-#define CXXVARIABLEDETAIL Doc::alias("cxxVariableDetail")
-#define CXXVARIABLENAMELOOKUP Doc::alias("cxxVariableNameLookup")
-#define CXXVARIABLEPROTOTYPE Doc::alias("cxxVariablePrototype")
-#define CXXVARIABLEREIMPLEMENTED Doc::alias("cxxVariableReimplemented")
-#define CXXVARIABLESCOPEDNAME Doc::alias("cxxVariableScopedName")
-#define CXXVARIABLESTORAGECLASSSPECIFIEREXTERN Doc::alias("cxxVariableStorageClassSpecifierExtern")
-#define CXXVARIABLESTORAGECLASSSPECIFIERMUTABLE Doc::alias("cxxVariableStorageClassSpecifierMutable")
-#define CXXVARIABLESTORAGECLASSSPECIFIERSTATIC Doc::alias("cxxVariableStorageClassSpecifierStatic")
-#define CXXVARIABLEVOLATILE Doc::alias("cxxVariableVolatile")
QString DitaXmlGenerator::sinceTitles[] =
{
@@ -305,6 +81,187 @@ QString DitaXmlGenerator::sinceTitles[] =
""
};
+/*
+ The strings in this array must appear in the same order as
+ the values in enum DitaXmlGenerator::DitaTag.
+ */
+QString DitaXmlGenerator::ditaTags[] =
+ {
+ "",
+ "alt",
+ "apiDesc",
+ "APIMap",
+ "apiName",
+ "audience",
+ "author",
+ "b",
+ "body",
+ "bodydiv",
+ "brand",
+ "category",
+ "codeblock",
+ "comment",
+ "component",
+ "copyrholder",
+ "copyright",
+ "copyryear",
+ "created",
+ "critdates",
+ "cxxAPIMap",
+ "cxxClass",
+ "cxxClassAbstract",
+ "cxxClassAccessSpecifier",
+ "cxxClassAPIItemLocation",
+ "cxxClassBaseClass",
+ "cxxClassDeclarationFile",
+ "cxxClassDeclarationFileLine",
+ "cxxClassDefinition",
+ "cxxClassDerivation",
+ "cxxClassDerivationAccessSpecifier",
+ "cxxClassDerivations",
+ "cxxClassDetail",
+ "cxxClassNested",
+ "cxxClassNestedClass",
+ "cxxClassNestedDetail",
+ "cxxDefine",
+ "cxxDefineAccessSpecifier",
+ "cxxDefineAPIItemLocation",
+ "cxxDefineDeclarationFile",
+ "cxxDefineDeclarationFileLine",
+ "cxxDefineDefinition",
+ "cxxDefineDetail",
+ "cxxDefineNameLookup",
+ "cxxDefineParameter",
+ "cxxDefineParameterDeclarationName",
+ "cxxDefineParameters",
+ "cxxDefinePrototype",
+ "cxxDefineReimplemented",
+ "cxxEnumeration",
+ "cxxEnumerationAccessSpecifier",
+ "cxxEnumerationAPIItemLocation",
+ "cxxEnumerationDeclarationFile",
+ "cxxEnumerationDeclarationFileLine",
+ "cxxEnumerationDefinition",
+ "cxxEnumerationDefinitionFile",
+ "cxxEnumerationDefinitionFileLineStart",
+ "cxxEnumerationDefinitionFileLineEnd",
+ "cxxEnumerationDetail",
+ "cxxEnumerationNameLookup",
+ "cxxEnumerationPrototype",
+ "cxxEnumerationScopedName",
+ "cxxEnumerator",
+ "cxxEnumeratorInitialiser",
+ "cxxEnumeratorNameLookup",
+ "cxxEnumeratorPrototype",
+ "cxxEnumerators",
+ "cxxEnumeratorScopedName",
+ "cxxFunction",
+ "cxxFunctionAccessSpecifier",
+ "cxxFunctionAPIItemLocation",
+ "cxxFunctionConst",
+ "cxxFunctionConstructor",
+ "cxxFunctionDeclarationFile",
+ "cxxFunctionDeclarationFileLine",
+ "cxxFunctionDeclaredType",
+ "cxxFunctionDefinition",
+ "cxxFunctionDestructor",
+ "cxxFunctionDetail",
+ "cxxFunctionNameLookup",
+ "cxxFunctionParameter",
+ "cxxFunctionParameterDeclarationName",
+ "cxxFunctionParameterDeclaredType",
+ "cxxFunctionParameterDefaultValue",
+ "cxxFunctionParameters",
+ "cxxFunctionPrototype",
+ "cxxFunctionPureVirtual",
+ "cxxFunctionReimplemented",
+ "cxxFunctionScopedName",
+ "cxxFunctionStorageClassSpecifierStatic",
+ "cxxFunctionVirtual",
+ "cxxTypedef",
+ "cxxTypedefAccessSpecifier",
+ "cxxTypedefAPIItemLocation",
+ "cxxTypedefDeclarationFile",
+ "cxxTypedefDeclarationFileLine",
+ "cxxTypedefDefinition",
+ "cxxTypedefDetail",
+ "cxxTypedefNameLookup",
+ "cxxTypedefScopedName",
+ "cxxVariable",
+ "cxxVariableAccessSpecifier",
+ "cxxVariableAPIItemLocation",
+ "cxxVariableDeclarationFile",
+ "cxxVariableDeclarationFileLine",
+ "cxxVariableDeclaredType",
+ "cxxVariableDefinition",
+ "cxxVariableDetail",
+ "cxxVariableNameLookup",
+ "cxxVariablePrototype",
+ "cxxVariableReimplemented",
+ "cxxVariableScopedName",
+ "cxxVariableStorageClassSpecifierStatic",
+ "data",
+ "data-about",
+ "dd",
+ "dl",
+ "dlentry",
+ "dt",
+ "entry",
+ "fig",
+ "i",
+ "image",
+ "keyword",
+ "keywords",
+ "li",
+ "link",
+ "linktext",
+ "lq",
+ "metadata",
+ "ol",
+ "othermeta",
+ "p",
+ "parameter",
+ "permissions",
+ "ph",
+ "platform",
+ "pre",
+ "prodinfo",
+ "prodname",
+ "prolog",
+ "publisher",
+ "related-links",
+ "resourceid",
+ "revised",
+ "row",
+ "section",
+ "sectiondiv",
+ "shortdesc",
+ "simpletable",
+ "source",
+ "stentry",
+ "sthead",
+ "strow",
+ "sub",
+ "sup",
+ "table",
+ "tbody",
+ "tgroup",
+ "thead",
+ "title",
+ "tm",
+ "topic",
+ "topicmeta",
+ "topicref",
+ "tt",
+ "u",
+ "ul",
+ "unknown",
+ "vrm",
+ "vrmlist",
+ "xref",
+ ""
+ };
+
static bool showBrokenLinks = false;
/*!
@@ -330,10 +287,11 @@ void DitaXmlGenerator::addLink(const QString& href,
const QStringRef& text)
{
if (!href.isEmpty()) {
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href", href);
writeCharacters(text.toString());
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
else {
writeCharacters(text.toString());
@@ -341,22 +299,129 @@ void DitaXmlGenerator::addLink(const QString& href,
}
/*!
+ Push \a t onto the dita tag stack and write the appropriate
+ start tag to the DITA XML file.
+ */
+void DitaXmlGenerator::writeStartTag(DitaTag t)
+{
+ xmlWriter().writeStartElement(ditaTags[t]);
+ tagStack.push(t);
+}
+
+/*!
+ Pop the current DITA tag off the stack, and write the
+ appropriate end tag to the DITA XML file.
+ */
+void DitaXmlGenerator::writeEndTag(DitaTag t)
+{
+ DitaTag top = tagStack.pop();
+ if (t > DT_NONE && top != t)
+ qDebug() << "Expected:" << t << "ACTUAL:" << top;
+ xmlWriter().writeEndElement();
+}
+
+/*!
+ Return the current DITA element tag, the one
+ on top of the stack.
+ */
+DitaXmlGenerator::DitaTag DitaXmlGenerator::currentTag()
+{
+ return tagStack.top();
+}
+
+/*!
+ Write the start tag \c{<apiDesc>}. if \a title is not
+ empty, generate a GUID from it and write the GUID as the
+ value of the \e{id} attribute. Then write \a title as
+ the value of the \e {spectitle} attribute.
+
+ Then if \a outputclass is not empty, write it as the value
+ of the \a outputclass attribute.
+
+ Fiunally, set the section nesting level to 1 and return 1.
+ */
+int DitaXmlGenerator::enterApiDesc(const QString& outputclass, const QString& title)
+{
+ writeStartTag(DT_apiDesc);
+ if (!title.isEmpty()) {
+ writeGuidAttribute(title);
+ xmlWriter().writeAttribute("spectitle",title);
+ }
+ if (!outputclass.isEmpty())
+ xmlWriter().writeAttribute("outputclass",outputclass);
+ sectionNestingLevel = 1;
+ return sectionNestingLevel;
+}
+
+/*!
+ If the section nesting level is 0, output a \c{<section>}
+ element with an \e id attribute generated from \a title and
+ an \e outputclass attribute set to \a outputclass.
+ If \a title is null, no \e id attribute is output.
+ If \a outputclass is empty, no \e outputclass attribute
+ is output.
+
+ Finally, increment the section nesting level and return
+ the new value.
+ */
+int DitaXmlGenerator::enterSection(const QString& outputclass, const QString& title)
+{
+ if (sectionNestingLevel == 0) {
+ writeStartTag(DT_section);
+ if (!title.isEmpty())
+ writeGuidAttribute(title);
+ if (!outputclass.isEmpty())
+ xmlWriter().writeAttribute("outputclass",outputclass);
+ }
+ else if (!title.isEmpty()) {
+ writeStartTag(DT_p);
+ writeGuidAttribute(title);
+ if (!outputclass.isEmpty())
+ xmlWriter().writeAttribute("outputclass",outputclass);
+ writeCharacters(title);
+ writeEndTag(); // </p>
+ }
+ return ++sectionNestingLevel;
+}
+
+/*!
+ If the section nesting level is greater than 0, decrement
+ it. If it becomes 0, output a \c {</section>}. Return the
+ decremented section nesting level.
+ */
+int DitaXmlGenerator::leaveSection()
+{
+ if (sectionNestingLevel > 0) {
+ --sectionNestingLevel;
+ if (sectionNestingLevel == 0)
+ writeEndTag(); // </section> or </apiDesc>
+ }
+ return sectionNestingLevel;
+}
+
+/*!
The default constructor.
*/
DitaXmlGenerator::DitaXmlGenerator()
- : inLink(false),
- inContents(false),
+ : inContents(false),
+ inDetailedDescription(false),
+ inLegaleseText(false),
+ inLink(false),
+ inObsoleteLink(false),
inSectionHeading(false),
inTableHeader(false),
inTableBody(false),
- numTableRows(0),
- threeColumnEnumValueTable(true),
+ noLinks(false),
+ obsoleteLinks(false),
offlineDocs(true),
+ threeColumnEnumValueTable(true),
+ codeIndent(0),
+ numTableRows(0),
+ divNestingLevel(0),
+ sectionNestingLevel(0),
+ tableColumnCount(0),
funcLeftParen("\\S(\\()"),
- myTree(0),
- obsoleteLinks(false),
- noLinks(false),
- tableColumnCount(0)
+ myTree(0)
{
// nothing yet.
}
@@ -378,29 +443,9 @@ DitaXmlGenerator::~DitaXmlGenerator()
*/
void DitaXmlGenerator::initializeGenerator(const Config &config)
{
- static const struct {
- const char *key;
- const char *tag;
- } defaults[] = {
- { ATOM_FORMATTING_BOLD, "b" },
- { ATOM_FORMATTING_INDEX, "<!--" },
- { ATOM_FORMATTING_ITALIC, "i" },
- { ATOM_FORMATTING_PARAMETER, "i" },
- { ATOM_FORMATTING_SUBSCRIPT, "sub" },
- { ATOM_FORMATTING_SUPERSCRIPT, "sup" },
- { ATOM_FORMATTING_TELETYPE, "tt", },
- { ATOM_FORMATTING_UNDERLINE, "u", },
- { 0, 0 }
- };
-
Generator::initializeGenerator(config);
obsoleteLinks = config.getBool(QLatin1String(CONFIG_OBSOLETELINKS));
setImageFileExtensions(QStringList() << "png" << "jpg" << "jpeg" << "gif");
- int i = 0;
- while (defaults[i].key) {
- formattingLeftMap().insert(defaults[i].key, defaults[i].tag);
- i++;
- }
style = config.getString(DitaXmlGenerator::format() +
Config::dot +
@@ -467,7 +512,8 @@ void DitaXmlGenerator::initializeGenerator(const Config &config)
Config::dot +
DITAXMLGENERATOR_CUSTOMHEADELEMENTS);
codeIndent = config.getInt(CONFIG_CODEINDENT);
-
+ version = config.getString(CONFIG_VERSION);
+ vrm = version.split(".");
}
/*!
@@ -639,7 +685,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
int skipAhead = 0;
QString hx, str;
static bool in_para = false;
- QString guid, hc;
+ QString guid, hc, attr;
switch (atom->type()) {
case Atom::AbstractLeft:
@@ -670,13 +716,13 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
//skipAhead = skipAtoms(atom, Atom::BriefRight);
//break;
//}
- if (inApiDesc || inSection) {
- xmlWriter().writeStartElement("p");
+ if (inSection()) {
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","brief");
}
else {
noLinks = true;
- xmlWriter().writeStartElement("shortdesc");
+ writeStartTag(DT_shortdesc);
}
if (relative->type() == Node::Property ||
relative->type() == Node::Variable) {
@@ -704,62 +750,98 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::BriefRight:
// if (relative->type() != Node::Fake)
- xmlWriter().writeEndElement(); // </shortdesc> or </p>
+ writeEndTag(); // </shortdesc> or </p>
noLinks = false;
break;
case Atom::C:
- xmlWriter().writeStartElement(formattingLeftMap()[ATOM_FORMATTING_TELETYPE]);
+ writeStartTag(DT_tt);
if (inLink) {
writeCharacters(protectEnc(plainCode(atom->string())));
}
else {
writeText(atom->string(), marker, relative);
}
- xmlWriter().writeEndElement(); // sse writeStartElement() above
+ writeEndTag(); // see writeStartElement() above
break;
case Atom::Code:
{
- xmlWriter().writeStartElement("codeblock");
+ writeStartTag(DT_codeblock);
QString chars = trimmedTrailing(atom->string());
writeText(chars, marker, relative);
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
}
break;
case Atom::Qml:
- xmlWriter().writeStartElement("codeblock");
+ writeStartTag(DT_codeblock);
writeText(trimmedTrailing(atom->string()), marker, relative);
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
break;
case Atom::CodeNew:
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeCharacters("you can rewrite it as");
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeStartElement("codeblock");
+ writeEndTag(); // </p>
+ writeStartTag(DT_codeblock);
writeText(trimmedTrailing(atom->string()), marker, relative);
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
break;
case Atom::CodeOld:
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeCharacters("For example, if you have code like");
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
// fallthrough
case Atom::CodeBad:
- xmlWriter().writeStartElement("codeblock");
+ writeStartTag(DT_codeblock);
writeCharacters(trimmedTrailing(plainCode(atom->string())));
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
break;
- case Atom::Div:
- xmlWriter().writeStartElement("bodydiv");
- if (!atom->string().isEmpty())
- xmlWriter().writeAttribute("outputclass", atom->string());
+ case Atom::DivLeft:
+ {
+ attr = atom->string();
+ DitaTag t = currentTag();
+ if ((t == DT_section) || (t == DT_sectiondiv)) {
+ writeStartTag(DT_sectiondiv);
+ divNestingLevel++;
+ }
+ else if ((t == DT_body) || (t == DT_bodydiv)) {
+ writeStartTag(DT_bodydiv);
+ divNestingLevel++;
+ }
+ if (!attr.isEmpty()) {
+ if (attr.contains('=')) {
+ int index = 0;
+ int from = 0;
+ QString values;
+ while (index >= 0) {
+ index = attr.indexOf('"',from);
+ if (index >= 0) {
+ ++index;
+ from = index;
+ index = attr.indexOf('"',from);
+ if (index > from) {
+ if (!values.isEmpty())
+ values.append(' ');
+ values += attr.mid(from,index-from);
+ from = index+1;
+ }
+ }
+ }
+ attr = values;
+ }
+ }
+ xmlWriter().writeAttribute("outputclass", attr);
+ }
break;
- case Atom::EndDiv:
- xmlWriter().writeEndElement(); // </bodydiv>
+ case Atom::DivRight:
+ if ((currentTag() == DT_sectiondiv) || (currentTag() == DT_bodydiv)) {
+ writeEndTag(); // </sectiondiv>, </bodydiv>, or </p>
+ if (divNestingLevel > 0)
+ --divNestingLevel;
+ }
break;
case Atom::FootnoteLeft:
// ### For now
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
xmlWriter().writeCharacters("<!-- ");
@@ -773,18 +855,68 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::FormatIf:
break;
case Atom::FormattingLeft:
- xmlWriter().writeStartElement(formattingLeftMap()[atom->string()]);
- if (atom->string() == ATOM_FORMATTING_PARAMETER) {
- if (atom->next() != 0 && atom->next()->type() == Atom::String) {
- QRegExp subscriptRegExp("([a-z]+)_([0-9n])");
- if (subscriptRegExp.exactMatch(atom->next()->string())) {
- xmlWriter().writeCharacters(subscriptRegExp.cap(1));
- xmlWriter().writeStartElement("sub");
- xmlWriter().writeCharacters(subscriptRegExp.cap(2));
- xmlWriter().writeEndElement(); // </sub>
- skipAhead = 1;
+ {
+ DitaTag t = DT_LAST;
+ if (atom->string() == ATOM_FORMATTING_BOLD)
+ t = DT_b;
+ else if (atom->string() == ATOM_FORMATTING_PARAMETER)
+ t = DT_i;
+ else if (atom->string() == ATOM_FORMATTING_ITALIC)
+ t = DT_i;
+ else if (atom->string() == ATOM_FORMATTING_TELETYPE)
+ t = DT_tt;
+ else if (atom->string().startsWith("span ")) {
+ t = DT_keyword;
+ }
+ else if (atom->string() == ATOM_FORMATTING_UNDERLINE)
+ t = DT_u;
+ else if (atom->string() == ATOM_FORMATTING_INDEX)
+ t = DT_comment;
+ else if (atom->string() == ATOM_FORMATTING_SUBSCRIPT)
+ t = DT_sub;
+ else if (atom->string() == ATOM_FORMATTING_SUPERSCRIPT)
+ t = DT_sup;
+ else
+ qDebug() << "DT_LAST";
+ writeStartTag(t);
+ if (atom->string() == ATOM_FORMATTING_PARAMETER) {
+ if (atom->next() != 0 && atom->next()->type() == Atom::String) {
+ QRegExp subscriptRegExp("([a-z]+)_([0-9n])");
+ if (subscriptRegExp.exactMatch(atom->next()->string())) {
+ xmlWriter().writeCharacters(subscriptRegExp.cap(1));
+ writeStartTag(DT_sub);
+ xmlWriter().writeCharacters(subscriptRegExp.cap(2));
+ writeEndTag(); // </sub>
+ skipAhead = 1;
+ }
}
}
+ else if (t == DT_keyword) {
+ QString attr = atom->string().mid(5);
+ if (!attr.isEmpty()) {
+ if (attr.contains('=')) {
+ int index = 0;
+ int from = 0;
+ QString values;
+ while (index >= 0) {
+ index = attr.indexOf('"',from);
+ if (index >= 0) {
+ ++index;
+ from = index;
+ index = attr.indexOf('"',from);
+ if (index > from) {
+ if (!values.isEmpty())
+ values.append(' ');
+ values += attr.mid(from,index-from);
+ from = index+1;
+ }
+ }
+ }
+ attr = values;
+ }
+ }
+ xmlWriter().writeAttribute("outputclass", attr);
+ }
}
break;
case Atom::FormattingRight:
@@ -792,7 +924,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
endLink();
}
else {
- xmlWriter().writeEndElement(); // ?
+ writeEndTag(); // ?
}
break;
case Atom::AnnotatedList:
@@ -981,7 +1113,7 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
/*
First generate the table of contents.
*/
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
s = sections.constBegin();
while (s != sections.constEnd()) {
if (!(*s).members.isEmpty()) {
@@ -990,17 +1122,17 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
}
++s;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
int idx = 0;
s = sections.constBegin();
while (s != sections.constEnd()) {
if (!(*s).members.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
writeGuidAttribute(Doc::canonicalTitle((*s).name));
xmlWriter().writeAttribute("outputclass","h3");
writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
if (idx == Class)
generateCompactList(0, marker, ncmap.value(), false, QString("Q"));
else if (idx == QmlClass)
@@ -1020,15 +1152,16 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
pmap = parentmaps.begin();
while (pmap != parentmaps.end()) {
NodeList nlist = pmap->values();
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeCharacters("Class ");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(pmap.key(), 0));
QStringList pieces = fullName(pmap.key(), 0, marker).split("::");
writeCharacters(protectEnc(pieces.last()));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
xmlWriter().writeCharacters(":");
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
generateSection(nlist, 0, marker, CodeMarker::Summary);
++pmap;
@@ -1060,8 +1193,8 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
fileName = QLatin1String("images/") + protectEnc(atom->string());
}
- xmlWriter().writeStartElement("fig");
- xmlWriter().writeStartElement("image");
+ writeStartTag(DT_fig);
+ writeStartTag(DT_image);
xmlWriter().writeAttribute("href",protectEnc(fileName));
if (atom->type() == Atom::InlineImage)
xmlWriter().writeAttribute("placement","inline");
@@ -1070,12 +1203,12 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
xmlWriter().writeAttribute("align","center");
}
if (!text.isEmpty()) {
- xmlWriter().writeStartElement("alt");
+ writeStartTag(DT_alt);
writeCharacters(protectEnc(text));
- xmlWriter().writeEndElement(); // </alt>
+ writeEndTag(); // </alt>
}
- xmlWriter().writeEndElement(); // </image>
- xmlWriter().writeEndElement(); // </fig>
+ writeEndTag(); // </image>
+ writeEndTag(); // </fig>
}
break;
case Atom::ImageText:
@@ -1129,47 +1262,47 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::ListLeft:
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
if (atom->string() == ATOM_LIST_BULLET) {
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
}
else if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeStartElement("dl");
+ writeStartTag(DT_dl);
}
else if (atom->string() == ATOM_LIST_VALUE) {
threeColumnEnumValueTable = isThreeColumnEnumValueTable(atom);
if (threeColumnEnumValueTable) {
- xmlWriter().writeStartElement("simpletable");
+ writeStartTag(DT_simpletable);
xmlWriter().writeAttribute("outputclass","valuelist");
- xmlWriter().writeStartElement("sthead");
- xmlWriter().writeStartElement("stentry");
+ writeStartTag(DT_sthead);
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Constant");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Value");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Description");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeEndElement(); // </sthead>
+ writeEndTag(); // </stentry>
+ writeEndTag(); // </sthead>
}
else {
- xmlWriter().writeStartElement("simpletable");
+ writeStartTag(DT_simpletable);
xmlWriter().writeAttribute("outputclass","valuelist");
- xmlWriter().writeStartElement("sthead");
- xmlWriter().writeStartElement("stentry");
+ writeStartTag(DT_sthead);
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Constant");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
xmlWriter().writeCharacters("Value");
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeEndElement(); // </sthead>
+ writeEndTag(); // </stentry>
+ writeEndTag(); // </sthead>
}
}
else {
- xmlWriter().writeStartElement("ol");
+ writeStartTag(DT_ol);
if (atom->string() == ATOM_LIST_UPPERALPHA)
xmlWriter().writeAttribute("outputclass","upperalpha");
else if (atom->string() == ATOM_LIST_LOWERALPHA)
@@ -1191,17 +1324,17 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::ListTagLeft:
if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeStartElement("dt");
+ writeStartTag(DT_dt);
}
else { // (atom->string() == ATOM_LIST_VALUE)
- xmlWriter().writeStartElement("strow");
- xmlWriter().writeStartElement("stentry");
- xmlWriter().writeStartElement("tt");
+ writeStartTag(DT_strow);
+ writeStartTag(DT_stentry);
+ writeStartTag(DT_tt);
writeCharacters(protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
relative))));
- xmlWriter().writeEndElement(); // </tt>
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </tt>
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
QString itemValue;
if (relative->type() == Node::Enum) {
@@ -1212,64 +1345,64 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
if (itemValue.isEmpty())
xmlWriter().writeCharacters("?");
else {
- xmlWriter().writeStartElement("tt");
+ writeStartTag(DT_tt);
writeCharacters(protectEnc(itemValue));
- xmlWriter().writeEndElement(); // </tt>
+ writeEndTag(); // </tt>
}
skipAhead = 1;
}
break;
case Atom::ListTagRight:
if (atom->string() == ATOM_LIST_TAG)
- xmlWriter().writeEndElement(); // </dt>
+ writeEndTag(); // </dt>
break;
case Atom::ListItemLeft:
if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeStartElement("dd");
+ writeStartTag(DT_dd);
}
else if (atom->string() == ATOM_LIST_VALUE) {
if (threeColumnEnumValueTable) {
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeStartElement("stentry");
+ writeEndTag(); // </stentry>
+ writeStartTag(DT_stentry);
}
}
else {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
break;
case Atom::ListItemRight:
if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeEndElement(); // </dd>
+ writeEndTag(); // </dd>
}
else if (atom->string() == ATOM_LIST_VALUE) {
- xmlWriter().writeEndElement(); // </stentry>
- xmlWriter().writeEndElement(); // </strow>
+ writeEndTag(); // </stentry>
+ writeEndTag(); // </strow>
}
else {
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
}
break;
case Atom::ListRight:
if (atom->string() == ATOM_LIST_BULLET) {
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
else if (atom->string() == ATOM_LIST_TAG) {
- xmlWriter().writeEndElement(); // </dl>
+ writeEndTag(); // </dl>
}
else if (atom->string() == ATOM_LIST_VALUE) {
- xmlWriter().writeEndElement(); // </simpletable>
+ writeEndTag(); // </simpletable>
}
else {
- xmlWriter().writeEndElement(); // </ol>
+ writeEndTag(); // </ol>
}
break;
case Atom::Nop:
// nothing
break;
case Atom::ParaLeft:
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
if (inLegaleseText)
xmlWriter().writeAttribute("outputclass","legalese");
in_para = true;
@@ -1277,15 +1410,15 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::ParaRight:
endLink();
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
break;
case Atom::QuotationLeft:
- xmlWriter().writeStartElement("lq");
+ writeStartTag(DT_lq);
break;
case Atom::QuotationRight:
- xmlWriter().writeEndElement(); // </lq>
+ writeEndTag(); // </lq>
break;
case Atom::RawString:
if (atom->string() == " ")
@@ -1293,41 +1426,44 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
if (atom->string().startsWith("&"))
writeCharacters(atom->string());
else if (atom->string() == "<sup>*</sup>") {
- xmlWriter().writeStartElement("sup");
+ writeStartTag(DT_sup);
writeCharacters("*");
- xmlWriter().writeEndElement(); // </sup>
+ writeEndTag(); // </sup>
+ }
+ else if (atom->string() == "<sup>&reg;</sup>") {
+ writeStartTag(DT_tm);
+ xmlWriter().writeAttribute("tmtype","reg");
+ writeEndTag(); // </tm>
}
else {
- xmlWriter().writeStartElement("pre");
+ writeStartTag(DT_pre);
xmlWriter().writeAttribute("outputclass","raw-html");
writeCharacters(atom->string());
- xmlWriter().writeEndElement(); // </pre>
+ writeEndTag(); // </pre>
}
break;
case Atom::SectionLeft:
- if (inSection || inApiDesc) {
+#if 0
+ if (inApiDesc) {
+ writeEndTag(); // </apiDesc>
inApiDesc = false;
- xmlWriter().writeEndElement(); // </section> or </apiDesc>
}
- inSection = true;
- xmlWriter().writeStartElement("section");
- writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
- xmlWriter().writeAttribute("outputclass","details");
+#endif
+ enterSection("details",QString());
+ //writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
break;
case Atom::SectionRight:
- if (inSection) {
- inSection = false;
- xmlWriter().writeEndElement(); // </section>
- }
+ leaveSection();
break;
case Atom::SectionHeadingLeft:
- xmlWriter().writeStartElement("title");
+ writeStartTag(DT_p);
+ writeGuidAttribute(Doc::canonicalTitle(Text::sectionHeading(atom).toString()));
hx = "h" + QString::number(atom->string().toInt() + hOffset(relative));
xmlWriter().writeAttribute("outputclass",hx);
inSectionHeading = true;
break;
case Atom::SectionHeadingRight:
- xmlWriter().writeEndElement(); // </title> (see case Atom::SectionHeadingLeft)
+ writeEndTag(); // </title> (see case Atom::SectionHeadingLeft)
inSectionHeading = false;
break;
case Atom::SidebarLeft:
@@ -1347,97 +1483,144 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
case Atom::TableLeft:
{
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
- xmlWriter().writeStartElement("table");
+ writeStartTag(DT_table);
numTableRows = 0;
if (tableColumnCount != 0) {
qDebug() << "ERROR: Nested tables!";
tableColumnCount = 0;
}
tableColumnCount = countTableColumns(atom->next());
- xmlWriter().writeStartElement("tgroup");
+ writeStartTag(DT_tgroup);
xmlWriter().writeAttribute("cols",QString::number(tableColumnCount));
inTableHeader = false;
inTableBody = false;
}
break;
case Atom::TableRight:
- xmlWriter().writeEndElement(); // </tbody>
- xmlWriter().writeEndElement(); // </tgroup>
- xmlWriter().writeEndElement(); // </table>
+ writeEndTag(); // </tbody>
+ writeEndTag(); // </tgroup>
+ writeEndTag(); // </table>
inTableHeader = false;
inTableBody = false;
tableColumnCount = 0;
break;
case Atom::TableHeaderLeft:
if (inTableBody) {
- xmlWriter().writeEndElement(); // </tbody>
- xmlWriter().writeEndElement(); // </tgroup>
- xmlWriter().writeEndElement(); // </table>
+ writeEndTag(); // </tbody>
+ writeEndTag(); // </tgroup>
+ writeEndTag(); // </table>
inTableHeader = false;
inTableBody = false;
tableColumnCount = 0;
- xmlWriter().writeStartElement("table");
+ writeStartTag(DT_table);
numTableRows = 0;
tableColumnCount = countTableColumns(atom);
- xmlWriter().writeStartElement("tgroup");
+ writeStartTag(DT_tgroup);
xmlWriter().writeAttribute("cols",QString::number(tableColumnCount));
}
- xmlWriter().writeStartElement("thead");
+ writeStartTag(DT_thead);
xmlWriter().writeAttribute("valign","top");
- xmlWriter().writeStartElement("row");
+ writeStartTag(DT_row);
xmlWriter().writeAttribute("valign","top");
inTableHeader = true;
inTableBody = false;
break;
case Atom::TableHeaderRight:
- xmlWriter().writeEndElement(); // </row>
+ writeEndTag(); // </row>
if (matchAhead(atom, Atom::TableHeaderLeft)) {
skipAhead = 1;
- xmlWriter().writeStartElement("row");
+ writeStartTag(DT_row);
xmlWriter().writeAttribute("valign","top");
}
else {
- xmlWriter().writeEndElement(); // </thead>
+ writeEndTag(); // </thead>
inTableHeader = false;
inTableBody = true;
- xmlWriter().writeStartElement("tbody");
+ writeStartTag(DT_tbody);
}
break;
case Atom::TableRowLeft:
if (!inTableHeader && !inTableBody) {
inTableBody = true;
- xmlWriter().writeStartElement("tbody");
+ writeStartTag(DT_tbody);
+ }
+ writeStartTag(DT_row);
+ attr = atom->string();
+ if (!attr.isEmpty()) {
+ if (attr.contains('=')) {
+ int index = 0;
+ int from = 0;
+ QString values;
+ while (index >= 0) {
+ index = attr.indexOf('"',from);
+ if (index >= 0) {
+ ++index;
+ from = index;
+ index = attr.indexOf('"',from);
+ if (index > from) {
+ if (!values.isEmpty())
+ values.append(' ');
+ values += attr.mid(from,index-from);
+ from = index+1;
+ }
+ }
+ }
+ attr = values;
+ }
+ xmlWriter().writeAttribute("outputclass", attr);
}
- xmlWriter().writeStartElement("row");
xmlWriter().writeAttribute("valign","top");
break;
case Atom::TableRowRight:
- xmlWriter().writeEndElement(); // </row>
+ writeEndTag(); // </row>
break;
case Atom::TableItemLeft:
{
- xmlWriter().writeStartElement("entry");
- QStringList spans = atom->string().split(",");
- if (spans.size() == 2) {
- if (inTableHeader ||
- (spans[0].toInt() != 1) ||
- (spans[1].toInt() != 1)) {
- QString s = "span(" + spans[0] + "," + spans[1] + ")";
- xmlWriter().writeAttribute("outputclass",s);
+ QString values = "";
+ writeStartTag(DT_entry);
+ for (int i=0; i<atom->count(); ++i) {
+ attr = atom->string(i);
+ if (attr.contains('=')) {
+ int index = 0;
+ int from = 0;
+ while (index >= 0) {
+ index = attr.indexOf('"',from);
+ if (index >= 0) {
+ ++index;
+ from = index;
+ index = attr.indexOf('"',from);
+ if (index > from) {
+ if (!values.isEmpty())
+ values.append(' ');
+ values += attr.mid(from,index-from);
+ from = index+1;
+ }
+ }
+ }
+ }
+ else {
+ QStringList spans = attr.split(",");
+ if (spans.size() == 2) {
+ if ((spans[0].toInt()>1) || (spans[1].toInt()>1)) {
+ values += "span(" + spans[0] + "," + spans[1] + ")";
+ }
+ }
}
}
+ if (!values.isEmpty())
+ xmlWriter().writeAttribute("outputclass",values);
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
}
break;
case Atom::TableItemRight:
if (inTableHeader)
- xmlWriter().writeEndElement(); // </entry>
+ writeEndTag(); // </entry>
else {
- xmlWriter().writeEndElement(); // </entry>
+ writeEndTag(); // </entry>
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
@@ -1473,26 +1656,26 @@ int DitaXmlGenerator::generateAtom(const Atom *atom,
break;
case Atom::Target:
if (in_para) {
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
in_para = false;
}
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
writeGuidAttribute(Doc::canonicalTitle(atom->string()));
xmlWriter().writeAttribute("outputclass","target");
//xmlWriter().writeCharacters(protectEnc(atom->string()));
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
break;
case Atom::UnhandledFormat:
- xmlWriter().writeStartElement("b");
+ writeStartTag(DT_b);
xmlWriter().writeAttribute("outputclass","error");
xmlWriter().writeCharacters("<Missing DITAXML>");
- xmlWriter().writeEndElement(); // </b>
+ writeEndTag(); // </b>
break;
case Atom::UnknownCommand:
- xmlWriter().writeStartElement("b");
+ writeStartTag(DT_b);
xmlWriter().writeAttribute("outputclass","error unknown-command");
writeCharacters(protectEnc(atom->string()));
- xmlWriter().writeEndElement(); // </b>
+ writeEndTag(); // </b>
break;
case Atom::QmlText:
case Atom::EndQmlText:
@@ -1532,85 +1715,81 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
*/
generateHeader(inner, fullTitle);
generateBrief(inner, marker); // <shortdesc>
-
- // not included: <prolog>
-
- xmlWriter().writeStartElement(CXXCLASSDETAIL);
- xmlWriter().writeStartElement(CXXCLASSDEFINITION);
+ writeProlog(inner,marker);
+
+ writeStartTag(DT_cxxClassDetail);
+ writeStartTag(DT_cxxClassDefinition);
writeLocation(nsn);
- xmlWriter().writeEndElement(); // <cxxClassDefinition>
+ writeEndTag(); // <cxxClassDefinition>
- xmlWriter().writeStartElement("apiDesc");
- xmlWriter().writeAttribute("spectitle",title);
+ enterApiDesc(QString(),title);
Text brief = nsn->doc().briefText(); // zzz
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
generateText(brief, nsn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
generateIncludes(nsn, marker);
generateStatus(nsn, marker);
generateThreadSafeness(nsn, marker);
generateSince(nsn, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+
+ enterSection("h2","Detailed Description");
+ generateBody(nsn, marker);
+ leaveSection();
+ leaveSection(); // </apiDesc>
bool needOtherSection = false;
QList<Section> summarySections;
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
- s = summarySections.begin();
- while (s != summarySections.end()) {
- if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
- if (!s->inherited.isEmpty())
- needOtherSection = true;
- }
- else {
- QString attr;
- if (!s->members.isEmpty()) {
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower() + " redundant";
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->members, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- if (!s->reimpMembers.isEmpty()) {
- QString name = QString("Reimplemented ") + (*s).name;
- attr = cleanRef(name).toLower() + " redundant";
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc(name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- }
- ++s;
- }
- if (needOtherSection) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h3");
- xmlWriter().writeCharacters("Additional Inherited Members");
- xmlWriter().writeEndElement(); // </title>
+ if (!summarySections.isEmpty()) {
+ enterSection("redundant",QString());
s = summarySections.begin();
while (s != summarySections.end()) {
- if (s->members.isEmpty())
- generateSectionInheritedList(*s, inner, marker);
+ if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
+ if (!s->inherited.isEmpty())
+ needOtherSection = true;
+ }
+ else {
+ QString attr;
+ if (!s->members.isEmpty()) {
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </title>
+ generateSection(s->members, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ if (!s->reimpMembers.isEmpty()) {
+ QString name = QString("Reimplemented ") + (*s).name;
+ attr = cleanRef(name).toLower() + " h2";
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc(name));
+ writeEndTag(); // </title>
+ generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ }
++s;
}
- xmlWriter().writeEndElement(); // </section>
+ if (needOtherSection) {
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass","h3");
+ xmlWriter().writeCharacters("Additional Inherited Members");
+ writeEndTag(); // </title>
+ s = summarySections.begin();
+ while (s != summarySections.end()) {
+ if (s->members.isEmpty())
+ generateSectionInheritedList(*s, inner, marker);
+ ++s;
+ }
+ }
+ leaveSection();
}
-
- writeDetailedDescription(nsn, marker, false, QString("Detailed Description"));
- xmlWriter().writeEndElement(); // </cxxClassDetail>
+
+ writeEndTag(); // </cxxClassDetail>
// not included: <related-links>
// not included: <cxxClassNested>
@@ -1646,7 +1825,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateLowStatusMembers(inner,marker,CodeMarker::Obsolete);
generateLowStatusMembers(inner,marker,CodeMarker::Compat);
- xmlWriter().writeEndElement(); // </cxxClass>
+ writeEndTag(); // </cxxClass>
}
else if (inner->type() == Node::Class) {
const ClassNode* cn = const_cast<ClassNode*>(static_cast<const ClassNode*>(inner));
@@ -1656,34 +1835,32 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateHeader(inner, fullTitle);
generateBrief(inner, marker); // <shortdesc>
-
- // not included: <prolog>
+ writeProlog(inner,marker);
- xmlWriter().writeStartElement(CXXCLASSDETAIL);
- xmlWriter().writeStartElement(CXXCLASSDEFINITION);
- xmlWriter().writeStartElement(CXXCLASSACCESSSPECIFIER);
+ writeStartTag(DT_cxxClassDetail);
+ writeStartTag(DT_cxxClassDefinition);
+ writeStartTag(DT_cxxClassAccessSpecifier);
xmlWriter().writeAttribute("value",inner->accessString());
- xmlWriter().writeEndElement(); // <cxxClassAccessSpecifier>
+ writeEndTag(); // <cxxClassAccessSpecifier>
if (cn->isAbstract()) {
- xmlWriter().writeStartElement(CXXCLASSABSTRACT);
+ writeStartTag(DT_cxxClassAbstract);
xmlWriter().writeAttribute("name","abstract");
xmlWriter().writeAttribute("value","abstract");
- xmlWriter().writeEndElement(); // </cxxClassAbstract>
+ writeEndTag(); // </cxxClassAbstract>
}
writeDerivations(cn, marker); // <cxxClassDerivations>
// not included: <cxxClassTemplateParameters>
writeLocation(cn);
- xmlWriter().writeEndElement(); // <cxxClassDefinition>
+ writeEndTag(); // <cxxClassDefinition>
- xmlWriter().writeStartElement("apiDesc");
- xmlWriter().writeAttribute("spectitle",title);
+ enterApiDesc(QString(),title);
Text brief = cn->doc().briefText(); // zzz
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
generateText(brief, cn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
generateIncludes(cn, marker);
generateStatus(cn, marker);
@@ -1691,68 +1868,64 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateInheritedBy(cn, marker);
generateThreadSafeness(cn, marker);
generateSince(cn, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+ enterSection("h2","Detailed Description");
+ generateBody(cn, marker);
+ leaveSection();
+ leaveSection(); // </apiDesc>
bool needOtherSection = false;
QList<Section> summarySections;
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
- s = summarySections.begin();
- while (s != summarySections.end()) {
- if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
- if (!s->inherited.isEmpty())
- needOtherSection = true;
- }
- else {
- QString attr;
- if (!s->members.isEmpty()) {
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower() + " redundant";
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->members, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- if (!s->reimpMembers.isEmpty()) {
- QString name = QString("Reimplemented ") + (*s).name;
- attr = cleanRef(name).toLower() + " redundant";
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc(name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- }
- ++s;
- }
- if (needOtherSection) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h3");
- xmlWriter().writeCharacters("Additional Inherited Members");
- xmlWriter().writeEndElement(); // </title>
+ if (!summarySections.isEmpty()) {
+ enterSection("redundant",QString());
s = summarySections.begin();
while (s != summarySections.end()) {
- if (s->members.isEmpty())
- generateSectionInheritedList(*s, inner, marker);
+ if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
+ if (!s->inherited.isEmpty())
+ needOtherSection = true;
+ }
+ else {
+ QString attr;
+ if (!s->members.isEmpty()) {
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </p>
+ generateSection(s->members, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ if (!s->reimpMembers.isEmpty()) {
+ QString name = QString("Reimplemented ") + (*s).name;
+ attr = cleanRef(name).toLower() + " h2";
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc(name));
+ writeEndTag(); // </p>
+ generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ }
++s;
}
- xmlWriter().writeEndElement(); // </section>
+ if (needOtherSection) {
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass","h3");
+ xmlWriter().writeCharacters("Additional Inherited Members");
+ writeEndTag(); // </p>
+ s = summarySections.begin();
+ while (s != summarySections.end()) {
+ if (s->members.isEmpty())
+ generateSectionInheritedList(*s, inner, marker);
+ ++s;
+ }
+ }
+ leaveSection();
}
-
- writeDetailedDescription(cn, marker, false, QString("Detailed Description"));
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxClassDetail>
+ writeEndTag(); // </cxxClassDetail>
// not included: <related-links>
// not included: <cxxClassNested>
@@ -1782,7 +1955,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateLowStatusMembers(inner,marker,CodeMarker::Obsolete);
generateLowStatusMembers(inner,marker,CodeMarker::Compat);
- xmlWriter().writeEndElement(); // </cxxClass>
+ writeEndTag(); // </cxxClass>
}
else if ((inner->type() == Node::Fake) && (inner->subType() == Node::HeaderFile)) {
const FakeNode* fn = const_cast<FakeNode*>(static_cast<const FakeNode*>(inner));
@@ -1798,78 +1971,78 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
*/
generateHeader(inner, fullTitle);
generateBrief(inner, marker); // <shortdesc>
- xmlWriter().writeStartElement(CXXCLASSDETAIL);
- xmlWriter().writeStartElement("apiDesc");
- xmlWriter().writeAttribute("spectitle",title);
+ writeProlog(inner,marker);
+
+ writeStartTag(DT_cxxClassDetail);
+ enterApiDesc(QString(),title);
Text brief = fn->doc().briefText(); // zzz
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
generateText(brief, fn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
generateIncludes(fn, marker);
generateStatus(fn, marker);
generateThreadSafeness(fn, marker);
generateSince(fn, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+ generateSince(fn, marker);
+ enterSection("h2","Detailed Description");
+ generateBody(fn, marker);
+ leaveSection();
+ leaveSection(); // </apiDesc>
bool needOtherSection = false;
QList<Section> summarySections;
summarySections = marker->sections(inner, CodeMarker::Summary, CodeMarker::Okay);
- s = summarySections.begin();
- while (s != summarySections.end()) {
- if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
- if (!s->inherited.isEmpty())
- needOtherSection = true;
- }
- else {
- QString attr;
- if (!s->members.isEmpty()) {
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower() + " redundant";
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->members, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- if (!s->reimpMembers.isEmpty()) {
- QString name = QString("Reimplemented ") + (*s).name;
- attr = cleanRef(name).toLower() + " redundant";
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc(name));
- xmlWriter().writeEndElement(); // </title>
- generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
- generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
- }
- }
- ++s;
- }
- if (needOtherSection) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","additional-inherited-members redundant");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h3");
- xmlWriter().writeCharacters("Additional Inherited Members");
- xmlWriter().writeEndElement(); // </title>
+ if (!summarySections.isEmpty()) {
+ enterSection("redundant",QString());
s = summarySections.begin();
while (s != summarySections.end()) {
- if (s->members.isEmpty())
- generateSectionInheritedList(*s, inner, marker);
+ if (s->members.isEmpty() && s->reimpMembers.isEmpty()) {
+ if (!s->inherited.isEmpty())
+ needOtherSection = true;
+ }
+ else {
+ QString attr;
+ if (!s->members.isEmpty()) {
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </p>
+ generateSection(s->members, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ if (!s->reimpMembers.isEmpty()) {
+ QString name = QString("Reimplemented ") + (*s).name;
+ attr = cleanRef(name).toLower() + " h2";
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc(name));
+ writeEndTag(); // </p>
+ generateSection(s->reimpMembers, inner, marker, CodeMarker::Summary);
+ generateSectionInheritedList(*s, inner, marker);
+ }
+ }
++s;
}
- xmlWriter().writeEndElement(); // </section>
+ if (needOtherSection) {
+ enterSection("additional-inherited-members redundant",QString());
+ writeStartTag(DT_p);
+ xmlWriter().writeAttribute("outputclass","h3");
+ xmlWriter().writeCharacters("Additional Inherited Members");
+ writeEndTag(); // </p>
+ s = summarySections.begin();
+ while (s != summarySections.end()) {
+ if (s->members.isEmpty())
+ generateSectionInheritedList(*s, inner, marker);
+ ++s;
+ }
+ }
+ leaveSection();
}
-
- writeDetailedDescription(fn, marker, false, QString("Detailed Description"));
- xmlWriter().writeEndElement(); // </cxxClassDetail>
+
+ writeEndTag(); // </cxxClassDetail>
// not included: <related-links>
// not included: <cxxClassNested>
@@ -1904,7 +2077,7 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
}
generateLowStatusMembers(inner,marker,CodeMarker::Obsolete);
generateLowStatusMembers(inner,marker,CodeMarker::Compat);
- xmlWriter().writeEndElement(); // </cxxClass>
+ writeEndTag(); // </cxxClass>
}
else if ((inner->type() == Node::Fake) && (inner->subType() == Node::QmlClass)) {
const QmlClassNode* qcn = const_cast<QmlClassNode*>(static_cast<const QmlClassNode*>(inner));
@@ -1917,76 +2090,74 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
generateHeader(inner, fullTitle);
generateBrief(inner, marker); // <shortdesc>
+ writeProlog(inner,marker);
- // not included: <prolog>
-
- xmlWriter().writeStartElement(CXXCLASSDETAIL);
- xmlWriter().writeStartElement("apiDesc");
- xmlWriter().writeAttribute("spectitle",title);
+ writeStartTag(DT_cxxClassDetail);
+ enterApiDesc(QString(),title);
Text brief = qcn->doc().briefText(); // zzz
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
generateText(brief, qcn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
generateQmlInstantiates(qcn, marker);
generateQmlInherits(qcn, marker);
generateQmlInheritedBy(qcn, marker);
generateSince(qcn, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+ enterSection("h2","Detailed Description");
+ generateBody(qcn, marker);
+ if (cn)
+ generateQmlText(cn->doc().body(), cn, marker, qcn->name());
+ leaveSection();
+ leaveSection(); // </apiDesc>
QList<Section> summarySections;
summarySections = marker->qmlSections(qcn,CodeMarker::Summary,0);
- s = summarySections.begin();
- while (s != summarySections.end()) {
- QString attr;
- if (!s->members.isEmpty()) {
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower() + " redundant";
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- generateQmlSummary(*s,qcn,marker);
- //generateSection(s->members, inner, marker, CodeMarker::Summary);
- //generateSectionInheritedList(*s, inner, marker);
- xmlWriter().writeEndElement(); // </section>
+ if (!summarySections.isEmpty()) {
+ enterSection("redundant",QString());
+ s = summarySections.begin();
+ while (s != summarySections.end()) {
+ QString attr;
+ if (!s->members.isEmpty()) {
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </p>
+ generateQmlSummary(*s,qcn,marker);
+ //generateSection(s->members, inner, marker, CodeMarker::Summary);
+ //generateSectionInheritedList(*s, inner, marker);
+ }
+ ++s;
}
- ++s;
+ leaveSection();
}
-
- writeDetailedDescription(qcn, marker, false, QString("Detailed Description"));
- if (cn)
- generateQmlText(cn->doc().body(), cn, marker, qcn->name());
QList<Section> detailSections;
detailSections = marker->qmlSections(qcn,CodeMarker::Detailed,0);
- s = detailSections.begin();
- while (s != detailSections.end()) {
- if (!s->members.isEmpty()) {
- QString attr;
- inSection = true;
- xmlWriter().writeStartElement("section");
- attr = cleanRef((*s).name).toLower();
- xmlWriter().writeAttribute("outputclass",attr);
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(protectEnc((*s).name));
- xmlWriter().writeEndElement(); // </title>
- NodeList::ConstIterator m = (*s).members.begin();
- while (m != (*s).members.end()) {
- generateDetailedQmlMember(*m, qcn, marker);
- ++m;
+ if (!detailSections.isEmpty()) {
+ enterSection("details",QString());
+ s = detailSections.begin();
+ while (s != detailSections.end()) {
+ if (!s->members.isEmpty()) {
+ QString attr;
+ writeStartTag(DT_p);
+ attr = cleanRef((*s).name).toLower() + " h2";
+ xmlWriter().writeAttribute("outputclass",attr);
+ writeCharacters(protectEnc((*s).name));
+ writeEndTag(); // </p>
+ NodeList::ConstIterator m = (*s).members.begin();
+ while (m != (*s).members.end()) {
+ generateDetailedQmlMember(*m, qcn, marker);
+ ++m;
+ }
}
- xmlWriter().writeEndElement(); // </section>
- inSection = false;
+ ++s;
}
- ++s;
+ leaveSection();
}
-
- xmlWriter().writeEndElement(); // </cxxClassDetail>
- xmlWriter().writeEndElement(); // </cxxClass>
+ writeEndTag(); // </cxxClassDetail>
+ writeEndTag(); // </cxxClass>
}
}
@@ -1996,12 +2167,13 @@ DitaXmlGenerator::generateClassLikeNode(const InnerNode* inner, CodeMarker* mark
*/
void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& text)
{
- xmlWriter().writeStartElement("li");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_li);
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",link);
writeCharacters(text);
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </li>
}
/*!
@@ -2010,45 +2182,31 @@ void DitaXmlGenerator::writeXrefListItem(const QString& link, const QString& tex
*/
void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker)
{
- SubTitleSize subTitleSize = LargeSubTitle;
QList<Section> sections;
QList<Section>::const_iterator s;
QString fullTitle = fake->fullTitle();
- QString htmlTitle = fullTitle;
- if (fake->subType() == Node::File && !fake->subTitle().isEmpty()) {
- subTitleSize = SmallSubTitle;
- htmlTitle += " (" + fake->subTitle() + ")";
- }
- else if (fake->subType() == Node::QmlBasicType) {
+ if (fake->subType() == Node::QmlBasicType) {
fullTitle = "QML Basic Type: " + fullTitle;
- htmlTitle = fullTitle;
}
generateHeader(fake, fullTitle);
generateBrief(fake, marker); // <shortdesc>
- xmlWriter().writeStartElement("body");
+ writeProlog(fake, marker);
+
+ writeStartTag(DT_body);
+ enterSection(QString(),QString());
if (fake->subType() == Node::Module) {
generateStatus(fake, marker);
if (moduleNamespaceMap.contains(fake->name())) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","namespaces");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- xmlWriter().writeCharacters("Namespaces");
- xmlWriter().writeEndElement(); // </title>
+ enterSection("h2","Namespaces");
generateAnnotatedList(fake, marker, moduleNamespaceMap[fake->name()]);
- xmlWriter().writeEndElement(); // </section>
+ leaveSection();
}
if (moduleClassMap.contains(fake->name())) {
- xmlWriter().writeStartElement("section");
- xmlWriter().writeAttribute("outputclass","classes");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- xmlWriter().writeCharacters("Classes");
- xmlWriter().writeEndElement(); // </title>
+ enterSection("h2","Classes");
generateAnnotatedList(fake, marker, moduleClassMap[fake->name()]);
- xmlWriter().writeEndElement(); // </section>
+ leaveSection();
}
}
@@ -2056,11 +2214,11 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker
if (fake->subType() == Node::File) {
Text text;
Quoter quoter;
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass", "small-subtitle");
text << fake->subTitle();
generateText(text, fake, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
Doc::quoteFromFile(fake->doc().location(), quoter, fake->name());
QString code = quoter.quoteTo(fake->location(), "", "");
text.clear();
@@ -2070,10 +2228,12 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker
}
else {
if (fake->subType() == Node::Module) {
- writeDetailedDescription(fake, marker, false, QString("Detailed Description"));
+ enterSection("h2","Detailed Description");
+ generateBody(fake, marker);
+ leaveSection();
}
else
- writeDetailedDescription(fake, marker, false, QString());
+ generateBody(fake, marker);
generateAlsoList(fake, marker);
if (!fake->groupMembers().isEmpty()) {
@@ -2085,9 +2245,10 @@ void DitaXmlGenerator::generateFakeNode(const FakeNode* fake, CodeMarker* marker
generateAnnotatedList(fake, marker, groupMembersMap);
}
}
- xmlWriter().writeEndElement(); // </body>
+ leaveSection(); // </section>
+ writeEndTag(); // </body>
writeRelatedLinks(fake, marker);
- xmlWriter().writeEndElement(); // </topic>
+ writeEndTag(); // </topic>
}
/*!
@@ -2102,13 +2263,13 @@ void DitaXmlGenerator::writeLink(const Node* node,
{
if (node) {
QString link = fileName(node) + "#" + node->guid();
- xmlWriter().writeStartElement("link");
+ writeStartTag(DT_link);
xmlWriter().writeAttribute("href", link);
xmlWriter().writeAttribute("role", role);
- xmlWriter().writeStartElement("linktext");
+ writeStartTag(DT_linktext);
writeCharacters(text);
- xmlWriter().writeEndElement(); // </linktext>
- xmlWriter().writeEndElement(); // </link>
+ writeEndTag(); // </linktext>
+ writeEndTag(); // </link>
}
}
@@ -2124,7 +2285,7 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
const Node* linkNode = 0;
QPair<QString,QString> linkPair;
if (node && !node->links().empty()) {
- xmlWriter().writeStartElement("related-links");
+ writeStartTag(DT_relatedLinks);
if (node->links().contains(Node::PreviousLink)) {
linkPair = node->links()[Node::PreviousLink];
linkNode = findNodeForTarget(linkPair.first, node, marker);
@@ -2140,7 +2301,7 @@ void DitaXmlGenerator::writeRelatedLinks(const FakeNode* node, CodeMarker* marke
linkNode = findNodeForTarget(linkPair.first, node, marker);
writeLink(linkNode, linkPair.second, "parent");
}
- xmlWriter().writeEndElement(); // </related-links>
+ writeEndTag(); // </related-links>
}
}
@@ -2166,59 +2327,59 @@ void DitaXmlGenerator::generateHeader(const Node* node,
if (!node)
return;
+ DitaTag mainTag = DT_cxxClass;
+ DitaTag nameTag = DT_apiName;
QString doctype;
- QString mainElement;
- QString nameElement;
QString dtd;
QString base;
QString version;
QString outputclass;
if (node->type() == Node::Class) {
- mainElement = "cxxClass";
- nameElement = "apiName";
+ mainTag = DT_cxxClass;
+ nameTag = DT_apiName;
dtd = "dtd/cxxClass.dtd";
version = "0.6.0";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
version + "//EN\" \"" + dtd + "\">";
}
else if (node->type() == Node::Namespace) {
- mainElement = "cxxClass";
- nameElement = "apiName";
+ mainTag = DT_cxxClass;
+ nameTag = DT_apiName;
dtd = "dtd/cxxClass.dtd";
version = "0.6.0";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
version + "//EN\" \"" + dtd + "\">";
outputclass = "namespace";
}
else if (node->type() == Node::Fake || subpage) {
if (node->subType() == Node::HeaderFile) {
- mainElement = "cxxClass";
- nameElement = "apiName";
+ mainTag = DT_cxxClass;
+ nameTag = DT_apiName;
dtd = "dtd/cxxClass.dtd";
version = "0.6.0";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
version + "//EN\" \"" + dtd + "\">";
outputclass = "headerfile";
}
else if (node->subType() == Node::QmlClass) {
- mainElement = "cxxClass";
- nameElement = "apiName";
+ mainTag = DT_cxxClass;
+ nameTag = DT_apiName;
dtd = "dtd/cxxClass.dtd";
version = "0.6.0";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//NOKIA//DTD DITA C++ API Class Reference Type v" +
version + "//EN\" \"" + dtd + "\">";
outputclass = "QML-class";
}
else {
- mainElement = "topic";
- nameElement = "title";
+ mainTag = DT_topic;
+ nameTag = DT_title;
dtd = "dtd/topic.dtd";
- doctype = "<!DOCTYPE " + mainElement +
+ doctype = "<!DOCTYPE " + ditaTags[mainTag] +
" PUBLIC \"-//OASIS//DTD DITA Topic//EN\" \"" + dtd + "\">";
switch (node->subType()) {
case Node::Page:
@@ -2250,13 +2411,13 @@ void DitaXmlGenerator::generateHeader(const Node* node,
xmlWriter().writeDTD(doctype);
xmlWriter().writeComment(node->doc().location().fileName());
- xmlWriter().writeStartElement(mainElement);
+ writeStartTag(mainTag);
xmlWriter().writeAttribute("id",node->guid());
if (!outputclass.isEmpty())
xmlWriter().writeAttribute("outputclass",outputclass);
- xmlWriter().writeStartElement(nameElement); // <title> or <apiName>
+ writeStartTag(nameTag); // <title> or <apiName>
writeCharacters(name);
- xmlWriter().writeEndElement(); // </title> or </apiName>
+ writeEndTag(); // </title> or </apiName>
}
/*!
@@ -2277,9 +2438,9 @@ void DitaXmlGenerator::generateBrief(const Node* node, CodeMarker* marker)
void DitaXmlGenerator::generateIncludes(const InnerNode* inner, CodeMarker* marker)
{
if (!inner->includes().isEmpty()) {
- xmlWriter().writeStartElement("codeblock");
+ writeStartTag(DT_codeblock);
writeText(marker->markedUpIncludes(inner->includes()), marker, inner);
- xmlWriter().writeEndElement(); // </codeblock>
+ writeEndTag(); // </codeblock>
}
}
@@ -2551,20 +2712,20 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative,
QStack<NodeMap > stack;
stack.push(topLevel);
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
while (!stack.isEmpty()) {
if (stack.top().isEmpty()) {
stack.pop();
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
if (!stack.isEmpty())
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
}
else {
const ClassNode *child =
static_cast<const ClassNode *>(*stack.top().begin());
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
generateFullName(child, relative, marker);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
stack.top().erase(stack.top().begin());
NodeMap newTop;
@@ -2574,8 +2735,8 @@ void DitaXmlGenerator::generateClassHierarchy(const Node* relative,
}
if (!newTop.isEmpty()) {
stack.push(newTop);
- xmlWriter().writeStartElement("li");
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_li);
+ writeStartTag(DT_ul);
}
}
}
@@ -2591,11 +2752,11 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative,
{
if (nodeMap.isEmpty())
return;
- xmlWriter().writeStartElement("table");
+ writeStartTag(DT_table);
xmlWriter().writeAttribute("outputclass","annotated");
- xmlWriter().writeStartElement("tgroup");
+ writeStartTag(DT_tgroup);
xmlWriter().writeAttribute("cols","2");
- xmlWriter().writeStartElement("tbody");
+ writeStartTag(DT_tbody);
foreach (const QString& name, nodeMap.keys()) {
const Node* node = nodeMap[name];
@@ -2603,35 +2764,35 @@ void DitaXmlGenerator::generateAnnotatedList(const Node* relative,
if (node->status() == Node::Obsolete)
continue;
- xmlWriter().writeStartElement("row");
- xmlWriter().writeStartElement("entry");
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_row);
+ writeStartTag(DT_entry);
+ writeStartTag(DT_p);
generateFullName(node, relative, marker);
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeEndElement(); // <entry>
+ writeEndTag(); // </p>
+ writeEndTag(); // <entry>
if (!(node->type() == Node::Fake)) {
Text brief = node->doc().trimmedBriefText(name);
if (!brief.isEmpty()) {
- xmlWriter().writeStartElement("entry");
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_entry);
+ writeStartTag(DT_p);
generateText(brief, node, marker);
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeEndElement(); // <entry>
+ writeEndTag(); // </p>
+ writeEndTag(); // <entry>
}
}
else {
- xmlWriter().writeStartElement("entry");
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_entry);
+ writeStartTag(DT_p);
writeCharacters(protectEnc(node->doc().briefText().toString())); // zzz
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeEndElement(); // <entry>
+ writeEndTag(); // </p>
+ writeEndTag(); // <entry>
}
- xmlWriter().writeEndElement(); // </row>
+ writeEndTag(); // </row>
}
- xmlWriter().writeEndElement(); // </tbody>
- xmlWriter().writeEndElement(); // </tgroup>
- xmlWriter().writeEndElement(); // </table>
+ writeEndTag(); // </tbody>
+ writeEndTag(); // </tgroup>
+ writeEndTag(); // </table>
}
/*!
@@ -2768,26 +2929,27 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
Output the alphabet as a row of links.
*/
if (includeAlphabet) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","alphabet");
for (int i = 0; i < 26; i++) {
QChar ch('a' + i);
if (usedParagraphNames.contains(char('a' + i))) {
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
QString guid = lookupGuid(outFileName(),QString(ch));
QString attr = outFileName() + QString("#%1").arg(guid);
xmlWriter().writeAttribute("href", attr);
xmlWriter().writeCharacters(QString(ch.toUpper()));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
}
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
/*
Output a <p> element to contain all the <dl> elements.
*/
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","compactlist");
for (int i=0; i<classMap.count()-1; i++) {
@@ -2802,25 +2964,25 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
*/
if (curParOffset == 0) {
if (i > 0) {
- xmlWriter().writeEndElement(); // </dlentry>
- xmlWriter().writeEndElement(); // </dl>
+ writeEndTag(); // </dlentry>
+ writeEndTag(); // </dl>
}
- xmlWriter().writeStartElement("dl");
- xmlWriter().writeStartElement("dlentry");
- xmlWriter().writeStartElement("dt");
+ writeStartTag(DT_dl);
+ writeStartTag(DT_dlentry);
+ writeStartTag(DT_dt);
if (includeAlphabet) {
QChar c = paragraphName[curParNr][0].toLower();
writeGuidAttribute(QString(c));
}
xmlWriter().writeAttribute("outputclass","sublist-header");
xmlWriter().writeCharacters(paragraphName[curParNr]);
- xmlWriter().writeEndElement(); // </dt>
+ writeEndTag(); // </dt>
}
/*
Output a <dd> for the current offset in the current paragraph.
*/
- xmlWriter().writeStartElement("dd");
+ writeStartTag(DT_dd);
if ((curParNr < NumParagraphs) &&
!paragraphName[curParNr].isEmpty()) {
NodeMap::Iterator it;
@@ -2832,7 +2994,8 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
Previously, we used generateFullName() for this, but we
require some special formatting.
*/
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(it.value(), relative));
QStringList pieces;
@@ -2841,19 +3004,19 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
else
pieces = fullName(it.value(), relative, marker).split("::");
xmlWriter().writeCharacters(protectEnc(pieces.last()));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
if (pieces.size() > 1) {
xmlWriter().writeCharacters(" (");
generateFullName(it.value()->parent(),relative,marker);
xmlWriter().writeCharacters(")");
}
}
- xmlWriter().writeEndElement(); // </dd>
+ writeEndTag(); // </dd>
curParOffset++;
}
- xmlWriter().writeEndElement(); // </dlentry>
- xmlWriter().writeEndElement(); // </dl>
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </dlentry>
+ writeEndTag(); // </dl>
+ writeEndTag(); // </p>
}
/*!
@@ -2862,34 +3025,35 @@ void DitaXmlGenerator::generateCompactList(const Node* relative,
void DitaXmlGenerator::generateFunctionIndex(const Node* relative,
CodeMarker* marker)
{
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","alphabet");
for (int i = 0; i < 26; i++) {
QChar ch('a' + i);
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
QString guid = lookupGuid(outFileName(),QString(ch));
QString attr = outFileName() + QString("#%1").arg(guid);
xmlWriter().writeAttribute("href", attr);
xmlWriter().writeCharacters(QString(ch.toUpper()));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
char nextLetter = 'a';
char currentLetter;
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
QMap<QString, NodeMap >::ConstIterator f = funcIndex.begin();
while (f != funcIndex.end()) {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
currentLetter = f.key()[0].unicode();
while (islower(currentLetter) && currentLetter >= nextLetter) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
writeGuidAttribute(QString(nextLetter));
xmlWriter().writeAttribute("outputclass","target");
xmlWriter().writeCharacters(QString(nextLetter));
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
nextLetter++;
}
xmlWriter().writeCharacters(protectEnc(f.key()));
@@ -2900,10 +3064,10 @@ void DitaXmlGenerator::generateFunctionIndex(const Node* relative,
generateFullName((*s)->parent(), relative, marker, *s);
++s;
}
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
++f;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
/*!
@@ -2916,14 +3080,14 @@ void DitaXmlGenerator::generateLegaleseList(const Node* relative,
while (it != legaleseTexts.end()) {
Text text = it.key();
generateText(text, relative, marker);
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
do {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
generateFullName(it.value(), relative, marker);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
++it;
} while (it != legaleseTexts.end() && it.key() == text);
- xmlWriter().writeEndElement(); //</ul>
+ writeEndTag(); //</ul>
}
}
@@ -3044,50 +3208,53 @@ void DitaXmlGenerator::generateOverviewList(const Node* relative, CodeMarker* /*
if (!fakeNodeMap.isEmpty()) {
foreach (const QString& groupTitle, groupTitlesMap.keys()) {
const FakeNode* groupNode = groupTitlesMap[groupTitle];
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","h3");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(groupNode, relative));
writeCharacters(protectEnc(groupNode->fullTitle()));
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </p>
if (fakeNodeMap[groupNode].count() == 0)
continue;
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
foreach (const FakeNode* fakeNode, fakeNodeMap[groupNode]) {
QString title = fakeNode->fullTitle();
if (title.startsWith("The "))
title.remove(0, 4);
- xmlWriter().writeStartElement("li");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_li);
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(fakeNode, relative));
writeCharacters(protectEnc(title));
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </li>
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
}
if (!uncategorizedNodeMap.isEmpty()) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","h3");
xmlWriter().writeCharacters("Miscellaneous");
- xmlWriter().writeEndElement(); // </p>
- xmlWriter().writeStartElement("ul");
+ writeEndTag(); // </p>
+ writeStartTag(DT_ul);
foreach (const FakeNode *fakeNode, uncategorizedNodeMap) {
QString title = fakeNode->fullTitle();
if (title.startsWith("The "))
title.remove(0, 4);
- xmlWriter().writeStartElement("li");
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_li);
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",linkForNode(fakeNode, relative));
writeCharacters(protectEnc(title));
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </li>
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
}
@@ -3102,18 +3269,18 @@ void DitaXmlGenerator::generateSection(const NodeList& nl,
CodeMarker::SynopsisStyle style)
{
if (!nl.isEmpty()) {
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
NodeList::ConstIterator m = nl.begin();
while (m != nl.end()) {
if ((*m)->access() != Node::Private) {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
QString marked = getMarkedUpSynopsis(*m, relative, marker, style);
writeText(marked, marker, relative);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
}
++m;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
}
@@ -3126,10 +3293,10 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section,
{
if (section.inherited.isEmpty())
return;
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
QList<QPair<ClassNode*,int> >::ConstIterator p = section.inherited.begin();
while (p != section.inherited.end()) {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
QString text;
text.setNum((*p).second);
text += " ";
@@ -3139,18 +3306,19 @@ void DitaXmlGenerator::generateSectionInheritedList(const Section& section,
text += section.pluralMember;
text += " inherited from ";
writeCharacters(text);
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
// zzz
text = fileName((*p).first) + "#";
text += DitaXmlGenerator::cleanRef(section.name.toLower());
xmlWriter().writeAttribute("href",text);
text = protectEnc(marker->plainFullName((*p).first, relative));
writeCharacters(text);
- xmlWriter().writeEndElement(); // </xref>
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </xref>
+ writeEndTag(); // </li>
++p;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
/*!
@@ -3299,18 +3467,18 @@ void DitaXmlGenerator::writeText(const QString& markedCode,
writeCharacters(html);
html.clear();
}
- xmlWriter().writeStartElement("i");
+ writeStartTag(DT_i);
writeCharacters(arg.toString());
- xmlWriter().writeEndElement(); // </i>
+ writeEndTag(); // </i>
}
else if (k == 5) { // <@extra>
if (!html.isEmpty()) {
writeCharacters(html);
html.clear();
}
- xmlWriter().writeStartElement("tt");
+ writeStartTag(DT_tt);
writeCharacters(arg.toString());
- xmlWriter().writeEndElement(); // </tt>
+ writeEndTag(); // </tt>
}
else {
if (!html.isEmpty()) {
@@ -3362,10 +3530,10 @@ void DitaXmlGenerator::generateLink(const Atom* atom,
writeCharacters(protectEnc(atom->string().left(k)));
if (link.isEmpty()) {
if (showBrokenLinks)
- xmlWriter().writeEndElement(); // </i>
+ writeEndTag(); // </i>
}
else
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
inLink = false;
writeCharacters(protectEnc(atom->string().mid(k)));
}
@@ -3374,12 +3542,12 @@ void DitaXmlGenerator::generateLink(const Atom* atom,
bool func = atom->string().endsWith("()");
bool tt = (func || atom->string().contains(camelCase));
if (tt)
- xmlWriter().writeStartElement("tt");
+ writeStartTag(DT_tt);
if (func)
writeCharacters(protectEnc(atom->string().left(atom->string().length() - 2)));
else
writeCharacters(protectEnc(atom->string()));
- xmlWriter().writeEndElement(); // </tt>
+ writeEndTag(); // </tt>
}
else
writeCharacters(protectEnc(atom->string()));
@@ -3714,11 +3882,12 @@ void DitaXmlGenerator::generateFullName(const Node* apparentNode,
{
if (actualNode == 0)
actualNode = apparentNode;
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
QString href = linkForNode(actualNode, relative);
xmlWriter().writeAttribute("href",href);
writeCharacters(protectEnc(fullName(apparentNode, relative, marker)));
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
void DitaXmlGenerator::findAllClasses(const InnerNode* node)
@@ -3902,6 +4071,11 @@ void DitaXmlGenerator::findAllNamespaces(const InnerNode* node)
}
}
+/*!
+ We're writing an attribute that indicates that the text
+ data is a heading, hence, h1, h2, h3... etc, and we must
+ decide which number to use.
+ */
int DitaXmlGenerator::hOffset(const Node* node)
{
switch (node->type()) {
@@ -4142,7 +4316,8 @@ void DitaXmlGenerator::beginLink(const QString& link)
this->link = link;
if (link.isEmpty())
return;
- xmlWriter().writeStartElement("xref");
+ writeStartTag(DT_xref);
+ // formathtml
xmlWriter().writeAttribute("href",link);
inLink = true;
}
@@ -4152,15 +4327,15 @@ void DitaXmlGenerator::endLink()
if (inLink) {
if (link.isEmpty()) {
if (showBrokenLinks)
- xmlWriter().writeEndElement(); // </i>
+ writeEndTag(); // </i>
}
else {
if (inObsoleteLink) {
- xmlWriter().writeStartElement("sup");
+ writeStartTag(DT_sup);
xmlWriter().writeCharacters("(obsolete)");
- xmlWriter().writeEndElement(); // </sup>
+ writeEndTag(); // </sup>
}
- xmlWriter().writeEndElement(); // </xref>
+ writeEndTag(); // </xref>
}
}
inLink = false;
@@ -4178,16 +4353,16 @@ void DitaXmlGenerator::generateQmlSummary(const Section& section,
CodeMarker* marker)
{
if (!section.members.isEmpty()) {
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
NodeList::ConstIterator m;
m = section.members.begin();
while (m != section.members.end()) {
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
generateQmlItem(*m,relative,marker,true);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
++m;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
}
@@ -4205,11 +4380,11 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node,
if (node->subType() == Node::QmlPropertyGroup) {
const QmlPropGroupNode* qpgn = static_cast<const QmlPropGroupNode*>(node);
NodeList::ConstIterator p = qpgn->childNodes().begin();
- xmlWriter().writeStartElement("ul");
+ writeStartTag(DT_ul);
while (p != qpgn->childNodes().end()) {
if ((*p)->type() == Node::QmlProperty) {
qpn = static_cast<const QmlPropertyNode*>(*p);
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_li);
writeGuidAttribute((Node*)qpn);
QString attr;
if (!qpn->isWritable(myTree))
@@ -4222,31 +4397,31 @@ void DitaXmlGenerator::generateDetailedQmlMember(const Node* node,
if (!attr.isEmpty())
xmlWriter().writeAttribute("outputclass",attr);
generateQmlItem(qpn, relative, marker, false);
- xmlWriter().writeEndElement(); // </li>
+ writeEndTag(); // </li>
}
++p;
}
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </ul>
}
else if (node->type() == Node::QmlSignal) {
Node* n = const_cast<Node*>(node);
- xmlWriter().writeStartElement("ul");
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_ul);
+ writeStartTag(DT_li);
writeGuidAttribute(n);
marked = getMarkedUpSynopsis(n, relative, marker, CodeMarker::Detailed);
writeText(marked, marker, relative);
- xmlWriter().writeEndElement(); // </li>
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </li>
+ writeEndTag(); // </ul>
}
else if (node->type() == Node::QmlMethod) {
Node* n = const_cast<Node*>(node);
- xmlWriter().writeStartElement("ul");
- xmlWriter().writeStartElement("li");
+ writeStartTag(DT_ul);
+ writeStartTag(DT_li);
writeGuidAttribute(n);
marked = getMarkedUpSynopsis(n, relative, marker, CodeMarker::Detailed);
writeText(marked, marker, relative);
- xmlWriter().writeEndElement(); // </li>
- xmlWriter().writeEndElement(); // </ul>
+ writeEndTag(); // </li>
+ writeEndTag(); // </ul>
}
generateStatus(node, marker);
generateBody(node, marker);
@@ -4270,7 +4445,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn,
const Node* n = myTree->findNode(strList,Node::Fake);
if (n && n->subType() == Node::QmlClass) {
const QmlClassNode* qcn = static_cast<const QmlClassNode*>(n);
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","inherits");
Text text;
text << "[Inherits ";
@@ -4280,7 +4455,7 @@ void DitaXmlGenerator::generateQmlInherits(const QmlClassNode* cn,
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
text << "]";
generateText(text, cn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
}
}
@@ -4318,7 +4493,7 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
{
const ClassNode* cn = qcn->classNode();
if (cn && (cn->status() != Node::Internal)) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","instantiates");
Text text;
text << "[";
@@ -4333,7 +4508,7 @@ void DitaXmlGenerator::generateQmlInstantiates(const QmlClassNode* qcn,
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
text << "]";
generateText(text, qcn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
}
@@ -4350,7 +4525,7 @@ void DitaXmlGenerator::generateInstantiatedBy(const ClassNode* cn,
if (cn && cn->status() != Node::Internal && !cn->qmlElement().isEmpty()) {
const Node* n = myTree->root()->findNode(cn->qmlElement(),Node::Fake);
if (n && n->subType() == Node::QmlClass) {
- xmlWriter().writeStartElement("p");
+ writeStartTag(DT_p);
xmlWriter().writeAttribute("outputclass","instantiated-by");
Text text;
text << "[";
@@ -4365,7 +4540,7 @@ void DitaXmlGenerator::generateInstantiatedBy(const ClassNode* cn,
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_LINK);
text << "]";
generateText(text, cn, marker);
- xmlWriter().writeEndElement(); // </p>
+ writeEndTag(); // </p>
}
}
}
@@ -4421,32 +4596,32 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker)
int index;
if (!cn->baseClasses().isEmpty()) {
- xmlWriter().writeStartElement(CXXCLASSDERIVATIONS);
+ writeStartTag(DT_cxxClassDerivations);
r = cn->baseClasses().begin();
index = 0;
while (r != cn->baseClasses().end()) {
- xmlWriter().writeStartElement(CXXCLASSDERIVATION);
- xmlWriter().writeStartElement(CXXCLASSDERIVATIONACCESSSPECIFIER);
+ writeStartTag(DT_cxxClassDerivation);
+ writeStartTag(DT_cxxClassDerivationAccessSpecifier);
xmlWriter().writeAttribute("value",(*r).accessString());
- xmlWriter().writeEndElement(); // </cxxClassDerivationAccessSpecifier>
+ writeEndTag(); // </cxxClassDerivationAccessSpecifier>
// not included: <cxxClassDerivationVirtual>
- xmlWriter().writeStartElement(CXXCLASSBASECLASS);
+ writeStartTag(DT_cxxClassBaseClass);
QString attr = fileName((*r).node) + "#" + (*r).node->guid();
xmlWriter().writeAttribute("href",attr);
writeCharacters(marker->plainFullName((*r).node));
- xmlWriter().writeEndElement(); // </cxxClassBaseClass>
+ writeEndTag(); // </cxxClassBaseClass>
// not included: <ClassBaseStruct> or <cxxClassBaseUnion>
- xmlWriter().writeEndElement(); // </cxxClassDerivation>
+ writeEndTag(); // </cxxClassDerivation>
// not included: <cxxStructDerivation>
++r;
}
- xmlWriter().writeEndElement(); // </cxxClassDerivations>
+ writeEndTag(); // </cxxClassDerivations>
}
}
@@ -4457,73 +4632,77 @@ void DitaXmlGenerator::writeDerivations(const ClassNode* cn, CodeMarker* marker)
*/
void DitaXmlGenerator::writeLocation(const Node* n)
{
- QString s1, s2, s3, s4, s5, s6;
+ DitaTag s1, s2, s3, s4, s5, s6;
+ s1 = DT_cxxClassAPIItemLocation;
+ s2 = DT_cxxClassDeclarationFile;
+ s3 = DT_cxxClassDeclarationFileLine;
+ s4 = DT_LAST;
if (n->type() == Node::Class || n->type() == Node::Namespace) {
- s1 = CXXCLASSAPIITEMLOCATION;
- s2 = CXXCLASSDECLARATIONFILE;
- s3 = CXXCLASSDECLARATIONFILELINE;
+ s1 = DT_cxxClassAPIItemLocation;
+ s2 = DT_cxxClassDeclarationFile;
+ s3 = DT_cxxClassDeclarationFileLine;
}
else if (n->type() == Node::Function) {
FunctionNode* fn = const_cast<FunctionNode*>(static_cast<const FunctionNode*>(n));
if (fn->isMacro()) {
- s1 = CXXDEFINEAPIITEMLOCATION;
- s2 = CXXDEFINEDECLARATIONFILE;
- s3 = CXXDEFINEDECLARATIONFILELINE;
+ s1 = DT_cxxDefineAPIItemLocation;
+ s2 = DT_cxxDefineDeclarationFile;
+ s3 = DT_cxxDefineDeclarationFileLine;
}
else {
- s1 = CXXFUNCTIONAPIITEMLOCATION;
- s2 = CXXFUNCTIONDECLARATIONFILE;
- s3 = CXXFUNCTIONDECLARATIONFILELINE;
+ s1 = DT_cxxFunctionAPIItemLocation;
+ s2 = DT_cxxFunctionDeclarationFile;
+ s3 = DT_cxxFunctionDeclarationFileLine;
}
}
else if (n->type() == Node::Enum) {
- s1 = CXXENUMERATIONAPIITEMLOCATION;
- s2 = CXXENUMERATIONDECLARATIONFILE;
- s3 = CXXENUMERATIONDECLARATIONFILELINE;
- s4 = CXXENUMERATIONDEFINITIONFILE;
- s5 = CXXENUMERATIONDEFINITIONFILELINESTART;
- s6 = CXXENUMERATIONDEFINITIONFILELINEEND;
+ s1 = DT_cxxEnumerationAPIItemLocation;
+ s2 = DT_cxxEnumerationDeclarationFile;
+ s3 = DT_cxxEnumerationDeclarationFileLine;
+ s4 = DT_cxxEnumerationDefinitionFile;
+ s5 = DT_cxxEnumerationDefinitionFileLineStart;
+ s6 = DT_cxxEnumerationDefinitionFileLineEnd;
}
else if (n->type() == Node::Typedef) {
- s1 = CXXTYPEDEFAPIITEMLOCATION;
- s2 = CXXTYPEDEFDECLARATIONFILE;
- s3 = CXXTYPEDEFDECLARATIONFILELINE;
+ s1 = DT_cxxTypedefAPIItemLocation;
+ s2 = DT_cxxTypedefDeclarationFile;
+ s3 = DT_cxxTypedefDeclarationFileLine;
}
else if ((n->type() == Node::Property) ||
(n->type() == Node::Variable)) {
- s1 = CXXVARIABLEAPIITEMLOCATION;
- s2 = CXXVARIABLEDECLARATIONFILE;
- s3 = CXXVARIABLEDECLARATIONFILELINE;
+ s1 = DT_cxxVariableAPIItemLocation;
+ s2 = DT_cxxVariableDeclarationFile;
+ s3 = DT_cxxVariableDeclarationFileLine;
}
- xmlWriter().writeStartElement(s1);
- xmlWriter().writeStartElement(s2);
+ writeStartTag(s1);
+ writeStartTag(s2);
xmlWriter().writeAttribute("name","filePath");
xmlWriter().writeAttribute("value",n->location().filePath());
- xmlWriter().writeEndElement(); // </cxx<s2>DeclarationFile>
- xmlWriter().writeStartElement(s3);
+ writeEndTag(); // </cxx<s2>DeclarationFile>
+ writeStartTag(s3);
xmlWriter().writeAttribute("name","lineNumber");
QString lineNr;
xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo()));
- xmlWriter().writeEndElement(); // </cxx<s3>DeclarationFileLine>
- if (!s4.isEmpty()) { // zzz This stuff is temporary, I think.
- xmlWriter().writeStartElement(s4);
+ writeEndTag(); // </cxx<s3>DeclarationFileLine>
+ if (s4 != DT_LAST) { // zzz This stuff is temporary, I think.
+ writeStartTag(s4);
xmlWriter().writeAttribute("name","filePath");
xmlWriter().writeAttribute("value",n->location().filePath());
- xmlWriter().writeEndElement(); // </cxx<s4>DefinitionFile>
- xmlWriter().writeStartElement(s5);
+ writeEndTag(); // </cxx<s4>DefinitionFile>
+ writeStartTag(s5);
xmlWriter().writeAttribute("name","lineNumber");
xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo()));
- xmlWriter().writeEndElement(); // </cxx<s5>DefinitionFileLineStart>
- xmlWriter().writeStartElement(s6);
+ writeEndTag(); // </cxx<s5>DefinitionFileLineStart>
+ writeStartTag(s6);
xmlWriter().writeAttribute("name","lineNumber");
xmlWriter().writeAttribute("value",lineNr.setNum(n->location().lineNo()));
- xmlWriter().writeEndElement(); // </cxx<s6>DefinitionFileLineEnd>
+ writeEndTag(); // </cxx<s6>DefinitionFileLineEnd>
}
// not included: <cxxXXXDefinitionFile>, <cxxXXXDefinitionFileLineStart>,
// and <cxxXXXDefinitionFileLineEnd>
- xmlWriter().writeEndElement(); // </cxx<s1>ApiItemLocation>
+ writeEndTag(); // </cxx<s1>ApiItemLocation>
}
/*!
@@ -4538,90 +4717,90 @@ void DitaXmlGenerator::writeFunctions(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Function) {
FunctionNode* fn = const_cast<FunctionNode*>(static_cast<const FunctionNode*>(*m));
- xmlWriter().writeStartElement(CXXFUNCTION);
+ writeStartTag(DT_cxxFunction);
xmlWriter().writeAttribute("id",fn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
if (fn->metaness() == FunctionNode::Signal)
xmlWriter().writeAttribute("class","signal");
else if (fn->metaness() == FunctionNode::Slot)
xmlWriter().writeAttribute("class","slot");
writeCharacters(fn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(fn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXFUNCTIONDETAIL);
- xmlWriter().writeStartElement(CXXFUNCTIONDEFINITION);
- xmlWriter().writeStartElement(CXXFUNCTIONACCESSSPECIFIER);
+ writeStartTag(DT_cxxFunctionDetail);
+ writeStartTag(DT_cxxFunctionDefinition);
+ writeStartTag(DT_cxxFunctionAccessSpecifier);
xmlWriter().writeAttribute("value",fn->accessString());
- xmlWriter().writeEndElement(); // <cxxFunctionAccessSpecifier>
+ writeEndTag(); // <cxxFunctionAccessSpecifier>
// not included: <cxxFunctionStorageClassSpecifierExtern>
if (fn->isStatic()) {
- xmlWriter().writeStartElement(CXXFUNCTIONSTORAGECLASSSPECIFIERSTATIC);
+ writeStartTag(DT_cxxFunctionStorageClassSpecifierStatic);
xmlWriter().writeAttribute("name","static");
xmlWriter().writeAttribute("value","static");
- xmlWriter().writeEndElement(); // <cxxFunctionStorageClassSpecifierStatic>
+ writeEndTag(); // <cxxFunctionStorageClassSpecifierStatic>
}
// not included: <cxxFunctionStorageClassSpecifierMutable>,
if (fn->isConst()) {
- xmlWriter().writeStartElement(CXXFUNCTIONCONST);
+ writeStartTag(DT_cxxFunctionConst);
xmlWriter().writeAttribute("name","const");
xmlWriter().writeAttribute("value","const");
- xmlWriter().writeEndElement(); // <cxxFunctionConst>
+ writeEndTag(); // <cxxFunctionConst>
}
// not included: <cxxFunctionExplicit>
// <cxxFunctionInline
if (fn->virtualness() != FunctionNode::NonVirtual) {
- xmlWriter().writeStartElement(CXXFUNCTIONVIRTUAL);
+ writeStartTag(DT_cxxFunctionVirtual);
xmlWriter().writeAttribute("name","virtual");
xmlWriter().writeAttribute("value","virtual");
- xmlWriter().writeEndElement(); // <cxxFunctionVirtual>
+ writeEndTag(); // <cxxFunctionVirtual>
if (fn->virtualness() == FunctionNode::PureVirtual) {
- xmlWriter().writeStartElement(CXXFUNCTIONPUREVIRTUAL);
+ writeStartTag(DT_cxxFunctionPureVirtual);
xmlWriter().writeAttribute("name","pure virtual");
xmlWriter().writeAttribute("value","pure virtual");
- xmlWriter().writeEndElement(); // <cxxFunctionPureVirtual>
+ writeEndTag(); // <cxxFunctionPureVirtual>
}
}
if (fn->name() == n->name()) {
- xmlWriter().writeStartElement(CXXFUNCTIONCONSTRUCTOR);
+ writeStartTag(DT_cxxFunctionConstructor);
xmlWriter().writeAttribute("name","constructor");
xmlWriter().writeAttribute("value","constructor");
- xmlWriter().writeEndElement(); // <cxxFunctionConstructor>
+ writeEndTag(); // <cxxFunctionConstructor>
}
else if (fn->name()[0] == QChar('~')) {
- xmlWriter().writeStartElement(CXXFUNCTIONDESTRUCTOR);
+ writeStartTag(DT_cxxFunctionDestructor);
xmlWriter().writeAttribute("name","destructor");
xmlWriter().writeAttribute("value","destructor");
- xmlWriter().writeEndElement(); // <cxxFunctionDestructor>
+ writeEndTag(); // <cxxFunctionDestructor>
}
else {
- xmlWriter().writeStartElement(CXXFUNCTIONDECLAREDTYPE);
+ writeStartTag(DT_cxxFunctionDeclaredType);
writeCharacters(fn->returnType());
- xmlWriter().writeEndElement(); // <cxxFunctionDeclaredType>
+ writeEndTag(); // <cxxFunctionDeclaredType>
}
// not included: <cxxFunctionReturnType>
QString fq = fullQualification(fn);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXFUNCTIONSCOPEDNAME);
+ writeStartTag(DT_cxxFunctionScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxFunctionScopedName>
+ writeEndTag(); // <cxxFunctionScopedName>
}
- xmlWriter().writeStartElement(CXXFUNCTIONPROTOTYPE);
+ writeStartTag(DT_cxxFunctionPrototype);
writeCharacters(fn->signature(true));
- xmlWriter().writeEndElement(); // <cxxFunctionPrototype>
+ writeEndTag(); // <cxxFunctionPrototype>
QString fnl = fn->signature(false);
int idx = fnl.indexOf(' ');
@@ -4630,30 +4809,30 @@ void DitaXmlGenerator::writeFunctions(const Section& s,
else
++idx;
fnl = fn->parent()->name() + "::" + fnl.mid(idx);
- xmlWriter().writeStartElement(CXXFUNCTIONNAMELOOKUP);
+ writeStartTag(DT_cxxFunctionNameLookup);
writeCharacters(fnl);
- xmlWriter().writeEndElement(); // <cxxFunctionNameLookup>
+ writeEndTag(); // <cxxFunctionNameLookup>
if (!fn->isInternal() && fn->isReimp() && fn->reimplementedFrom() != 0) {
FunctionNode* rfn = (FunctionNode*)fn->reimplementedFrom();
if (rfn && !rfn->isInternal()) {
- xmlWriter().writeStartElement(CXXFUNCTIONREIMPLEMENTED);
+ writeStartTag(DT_cxxFunctionReimplemented);
xmlWriter().writeAttribute("href",rfn->ditaXmlHref());
writeCharacters(marker->plainFullName(rfn));
- xmlWriter().writeEndElement(); // </cxxFunctionReimplemented>
+ writeEndTag(); // </cxxFunctionReimplemented>
}
}
writeParameters(fn);
writeLocation(fn);
- xmlWriter().writeEndElement(); // <cxxFunctionDefinition>
+ writeEndTag(); // <cxxFunctionDefinition>
- writeDetailedDescription(fn, marker, true, QString());
+ writeApiDesc(fn, marker, QString());
// generateAlsoList(inner, marker);
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxFunctionDetail>
- xmlWriter().writeEndElement(); // </cxxFunction>
+ writeEndTag(); // </cxxFunctionDetail>
+ writeEndTag(); // </cxxFunction>
if (fn->metaness() == FunctionNode::Ctor ||
fn->metaness() == FunctionNode::Dtor ||
@@ -4671,33 +4850,33 @@ void DitaXmlGenerator::writeParameters(const FunctionNode* fn)
{
const QList<Parameter>& parameters = fn->parameters();
if (!parameters.isEmpty()) {
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERS);
+ writeStartTag(DT_cxxFunctionParameters);
QList<Parameter>::ConstIterator p = parameters.begin();
while (p != parameters.end()) {
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETER);
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDECLAREDTYPE);
+ writeStartTag(DT_cxxFunctionParameter);
+ writeStartTag(DT_cxxFunctionParameterDeclaredType);
writeCharacters((*p).leftType());
if (!(*p).rightType().isEmpty())
writeCharacters((*p).rightType());
- xmlWriter().writeEndElement(); // <cxxFunctionParameterDeclaredType>
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDECLARATIONNAME);
+ writeEndTag(); // <cxxFunctionParameterDeclaredType>
+ writeStartTag(DT_cxxFunctionParameterDeclarationName);
writeCharacters((*p).name());
- xmlWriter().writeEndElement(); // <cxxFunctionParameterDeclarationName>
+ writeEndTag(); // <cxxFunctionParameterDeclarationName>
// not included: <cxxFunctionParameterDefinitionName>
if (!(*p).defaultValue().isEmpty()) {
- xmlWriter().writeStartElement(CXXFUNCTIONPARAMETERDEFAULTVALUE);
+ writeStartTag(DT_cxxFunctionParameterDefaultValue);
writeCharacters((*p).defaultValue());
- xmlWriter().writeEndElement(); // <cxxFunctionParameterDefaultValue>
+ writeEndTag(); // <cxxFunctionParameterDefaultValue>
}
// not included: <apiDefNote>
- xmlWriter().writeEndElement(); // <cxxFunctionParameter>
+ writeEndTag(); // <cxxFunctionParameter>
++p;
}
- xmlWriter().writeEndElement(); // <cxxFunctionParameters>
+ writeEndTag(); // <cxxFunctionParameters>
}
}
@@ -4712,32 +4891,32 @@ void DitaXmlGenerator::writeEnumerations(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Enum) {
const EnumNode* en = static_cast<const EnumNode*>(*m);
- xmlWriter().writeStartElement(CXXENUMERATION);
+ writeStartTag(DT_cxxEnumeration);
xmlWriter().writeAttribute("id",en->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(en->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(en,marker);
// not included <prolog>
- xmlWriter().writeStartElement(CXXENUMERATIONDETAIL);
- xmlWriter().writeStartElement(CXXENUMERATIONDEFINITION);
- xmlWriter().writeStartElement(CXXENUMERATIONACCESSSPECIFIER);
+ writeStartTag(DT_cxxEnumerationDetail);
+ writeStartTag(DT_cxxEnumerationDefinition);
+ writeStartTag(DT_cxxEnumerationAccessSpecifier);
xmlWriter().writeAttribute("value",en->accessString());
- xmlWriter().writeEndElement(); // <cxxEnumerationAccessSpecifier>
+ writeEndTag(); // <cxxEnumerationAccessSpecifier>
QString fq = fullQualification(en);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATIONSCOPEDNAME);
+ writeStartTag(DT_cxxEnumerationScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxEnumerationScopedName>
+ writeEndTag(); // <cxxEnumerationScopedName>
}
const QList<EnumItem>& items = en->items();
if (!items.isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATIONPROTOTYPE);
+ writeStartTag(DT_cxxEnumerationPrototype);
writeCharacters(en->name());
xmlWriter().writeCharacters(" = { ");
QList<EnumItem>::ConstIterator i = items.begin();
@@ -4752,68 +4931,68 @@ void DitaXmlGenerator::writeEnumerations(const Section& s,
xmlWriter().writeCharacters(", ");
}
xmlWriter().writeCharacters(" }");
- xmlWriter().writeEndElement(); // <cxxEnumerationPrototype>
+ writeEndTag(); // <cxxEnumerationPrototype>
}
- xmlWriter().writeStartElement(CXXENUMERATIONNAMELOOKUP);
+ writeStartTag(DT_cxxEnumerationNameLookup);
writeCharacters(en->parent()->name() + "::" + en->name());
- xmlWriter().writeEndElement(); // <cxxEnumerationNameLookup>
+ writeEndTag(); // <cxxEnumerationNameLookup>
// not included: <cxxEnumerationReimplemented>
if (!items.isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATORS);
+ writeStartTag(DT_cxxEnumerators);
QList<EnumItem>::ConstIterator i = items.begin();
while (i != items.end()) {
- xmlWriter().writeStartElement(CXXENUMERATOR);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_cxxEnumerator);
+ writeStartTag(DT_apiName);
writeCharacters((*i).name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
QString fq = fullQualification(en->parent());
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATORSCOPEDNAME);
+ writeStartTag(DT_cxxEnumeratorScopedName);
writeCharacters(fq + "::" + (*i).name());
- xmlWriter().writeEndElement(); // <cxxEnumeratorScopedName>
+ writeEndTag(); // <cxxEnumeratorScopedName>
}
- xmlWriter().writeStartElement(CXXENUMERATORPROTOTYPE);
+ writeStartTag(DT_cxxEnumeratorPrototype);
writeCharacters((*i).name());
- xmlWriter().writeEndElement(); // <cxxEnumeratorPrototype>
- xmlWriter().writeStartElement(CXXENUMERATORNAMELOOKUP);
+ writeEndTag(); // <cxxEnumeratorPrototype>
+ writeStartTag(DT_cxxEnumeratorNameLookup);
writeCharacters(en->parent()->name() + "::" + (*i).name());
- xmlWriter().writeEndElement(); // <cxxEnumeratorNameLookup>
+ writeEndTag(); // <cxxEnumeratorNameLookup>
if (!(*i).value().isEmpty()) {
- xmlWriter().writeStartElement(CXXENUMERATORINITIALISER);
+ writeStartTag(DT_cxxEnumeratorInitialiser);
xmlWriter().writeAttribute("value", (*i).value());
- xmlWriter().writeEndElement(); // <cxxEnumeratorInitialiser>
+ writeEndTag(); // <cxxEnumeratorInitialiser>
}
// not included: <cxxEnumeratorAPIItemLocation>
if (!(*i).text().isEmpty()) {
- xmlWriter().writeStartElement("apiDesc");
+ writeStartTag(DT_apiDesc);
generateText((*i).text(), en, marker);
- xmlWriter().writeEndElement(); // </apiDesc>
+ writeEndTag(); // </apiDesc>
}
- xmlWriter().writeEndElement(); // <cxxEnumerator>
+ writeEndTag(); // <cxxEnumerator>
++i;
}
- xmlWriter().writeEndElement(); // <cxxEnumerators>
+ writeEndTag(); // <cxxEnumerators>
}
writeLocation(en);
- xmlWriter().writeEndElement(); // <cxxEnumerationDefinition>
+ writeEndTag(); // <cxxEnumerationDefinition>
- writeDetailedDescription(en, marker, true, QString());
+ writeApiDesc(en, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxEnumerationDetail>
+ writeEndTag(); // </cxxEnumerationDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxEnumeration>
+ writeEndTag(); // </cxxEnumeration>
}
++m;
}
@@ -4831,52 +5010,52 @@ void DitaXmlGenerator::writeTypedefs(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Typedef) {
const TypedefNode* tn = static_cast<const TypedefNode*>(*m);
- xmlWriter().writeStartElement(CXXTYPEDEF);
+ writeStartTag(DT_cxxTypedef);
xmlWriter().writeAttribute("id",tn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(tn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(tn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXTYPEDEFDETAIL);
- xmlWriter().writeStartElement(CXXTYPEDEFDEFINITION);
- xmlWriter().writeStartElement(CXXTYPEDEFACCESSSPECIFIER);
+ writeStartTag(DT_cxxTypedefDetail);
+ writeStartTag(DT_cxxTypedefDefinition);
+ writeStartTag(DT_cxxTypedefAccessSpecifier);
xmlWriter().writeAttribute("value",tn->accessString());
- xmlWriter().writeEndElement(); // <cxxTypedefAccessSpecifier>
+ writeEndTag(); // <cxxTypedefAccessSpecifier>
// not included: <cxxTypedefDeclaredType>
QString fq = fullQualification(tn);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXTYPEDEFSCOPEDNAME);
+ writeStartTag(DT_cxxTypedefScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxTypedefScopedName>
+ writeEndTag(); // <cxxTypedefScopedName>
}
// not included: <cxxTypedefPrototype>
- xmlWriter().writeStartElement(CXXTYPEDEFNAMELOOKUP);
+ writeStartTag(DT_cxxTypedefNameLookup);
writeCharacters(tn->parent()->name() + "::" + tn->name());
- xmlWriter().writeEndElement(); // <cxxTypedefNameLookup>
+ writeEndTag(); // <cxxTypedefNameLookup>
// not included: <cxxTypedefReimplemented>
writeLocation(tn);
- xmlWriter().writeEndElement(); // <cxxTypedefDefinition>
+ writeEndTag(); // <cxxTypedefDefinition>
- writeDetailedDescription(tn, marker, true, QString());
+ writeApiDesc(tn, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxTypedefDetail>
+ writeEndTag(); // </cxxTypedefDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxTypedef>
+ writeEndTag(); // </cxxTypedef>
}
++m;
}
@@ -4894,22 +5073,22 @@ void DitaXmlGenerator::writeProperties(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Property) {
const PropertyNode* pn = static_cast<const PropertyNode*>(*m);
- xmlWriter().writeStartElement(CXXVARIABLE);
+ writeStartTag(DT_cxxVariable);
xmlWriter().writeAttribute("id",pn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(pn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(pn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXVARIABLEDETAIL);
- xmlWriter().writeStartElement(CXXVARIABLEDEFINITION);
- xmlWriter().writeStartElement(CXXVARIABLEACCESSSPECIFIER);
+ writeStartTag(DT_cxxVariableDetail);
+ writeStartTag(DT_cxxVariableDefinition);
+ writeStartTag(DT_cxxVariableAccessSpecifier);
xmlWriter().writeAttribute("value",pn->accessString());
- xmlWriter().writeEndElement(); // <cxxVariableAccessSpecifier>
+ writeEndTag(); // <cxxVariableAccessSpecifier>
// not included: <cxxVariableStorageClassSpecifierExtern>,
// <cxxVariableStorageClassSpecifierStatic>,
@@ -4917,18 +5096,18 @@ void DitaXmlGenerator::writeProperties(const Section& s,
// <cxxVariableConst>, <cxxVariableVolatile>
if (!pn->qualifiedDataType().isEmpty()) {
- xmlWriter().writeStartElement(CXXVARIABLEDECLAREDTYPE);
+ writeStartTag(DT_cxxVariableDeclaredType);
writeCharacters(pn->qualifiedDataType());
- xmlWriter().writeEndElement(); // <cxxVariableDeclaredType>
+ writeEndTag(); // <cxxVariableDeclaredType>
}
QString fq = fullQualification(pn);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXVARIABLESCOPEDNAME);
+ writeStartTag(DT_cxxVariableScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxVariableScopedName>
+ writeEndTag(); // <cxxVariableScopedName>
}
- xmlWriter().writeStartElement(CXXVARIABLEPROTOTYPE);
+ writeStartTag(DT_cxxVariablePrototype);
xmlWriter().writeCharacters("Q_PROPERTY(");
writeCharacters(pn->qualifiedDataType());
xmlWriter().writeCharacters(" ");
@@ -4964,32 +5143,32 @@ void DitaXmlGenerator::writeProperties(const Section& s,
if (pn->isFinal())
xmlWriter().writeCharacters(" FINAL");
xmlWriter().writeCharacters(")");
- xmlWriter().writeEndElement(); // <cxxVariablePrototype>
+ writeEndTag(); // <cxxVariablePrototype>
- xmlWriter().writeStartElement(CXXVARIABLENAMELOOKUP);
+ writeStartTag(DT_cxxVariableNameLookup);
writeCharacters(pn->parent()->name() + "::" + pn->name());
- xmlWriter().writeEndElement(); // <cxxVariableNameLookup>
+ writeEndTag(); // <cxxVariableNameLookup>
if (pn->overriddenFrom() != 0) {
PropertyNode* opn = (PropertyNode*)pn->overriddenFrom();
- xmlWriter().writeStartElement(CXXVARIABLEREIMPLEMENTED);
+ writeStartTag(DT_cxxVariableReimplemented);
xmlWriter().writeAttribute("href",opn->ditaXmlHref());
writeCharacters(marker->plainFullName(opn));
- xmlWriter().writeEndElement(); // </cxxVariableReimplemented>
+ writeEndTag(); // </cxxVariableReimplemented>
}
writeLocation(pn);
- xmlWriter().writeEndElement(); // <cxxVariableDefinition>
+ writeEndTag(); // <cxxVariableDefinition>
- writeDetailedDescription(pn, marker, true, QString());
+ writeApiDesc(pn, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxVariableDetail>
+ writeEndTag(); // </cxxVariableDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxVariable>
+ writeEndTag(); // </cxxVariable>
}
++m;
}
@@ -5006,74 +5185,74 @@ void DitaXmlGenerator::writeDataMembers(const Section& s,
while (m != s.members.end()) {
if ((*m)->type() == Node::Variable) {
const VariableNode* vn = static_cast<const VariableNode*>(*m);
- xmlWriter().writeStartElement(CXXVARIABLE);
+ writeStartTag(DT_cxxVariable);
xmlWriter().writeAttribute("id",vn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(vn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(vn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXVARIABLEDETAIL);
- xmlWriter().writeStartElement(CXXVARIABLEDEFINITION);
- xmlWriter().writeStartElement(CXXVARIABLEACCESSSPECIFIER);
+ writeStartTag(DT_cxxVariableDetail);
+ writeStartTag(DT_cxxVariableDefinition);
+ writeStartTag(DT_cxxVariableAccessSpecifier);
xmlWriter().writeAttribute("value",vn->accessString());
- xmlWriter().writeEndElement(); // <cxxVariableAccessSpecifier>
+ writeEndTag(); // <cxxVariableAccessSpecifier>
// not included: <cxxVAriableStorageClassSpecifierExtern>
if (vn->isStatic()) {
- xmlWriter().writeStartElement(CXXVARIABLESTORAGECLASSSPECIFIERSTATIC);
+ writeStartTag(DT_cxxVariableStorageClassSpecifierStatic);
xmlWriter().writeAttribute("name","static");
xmlWriter().writeAttribute("value","static");
- xmlWriter().writeEndElement(); // <cxxVariableStorageClassSpecifierStatic>
+ writeEndTag(); // <cxxVariableStorageClassSpecifierStatic>
}
// not included: <cxxVAriableStorageClassSpecifierMutable>,
// <cxxVariableConst>, <cxxVariableVolatile>
- xmlWriter().writeStartElement(CXXVARIABLEDECLAREDTYPE);
+ writeStartTag(DT_cxxVariableDeclaredType);
writeCharacters(vn->leftType());
if (!vn->rightType().isEmpty())
writeCharacters(vn->rightType());
- xmlWriter().writeEndElement(); // <cxxVariableDeclaredType>
+ writeEndTag(); // <cxxVariableDeclaredType>
QString fq = fullQualification(vn);
if (!fq.isEmpty()) {
- xmlWriter().writeStartElement(CXXVARIABLESCOPEDNAME);
+ writeStartTag(DT_cxxVariableScopedName);
writeCharacters(fq);
- xmlWriter().writeEndElement(); // <cxxVariableScopedName>
+ writeEndTag(); // <cxxVariableScopedName>
}
- xmlWriter().writeStartElement(CXXVARIABLEPROTOTYPE);
+ writeStartTag(DT_cxxVariablePrototype);
writeCharacters(vn->leftType() + " ");
//writeCharacters(vn->parent()->name() + "::" + vn->name());
writeCharacters(vn->name());
if (!vn->rightType().isEmpty())
writeCharacters(vn->rightType());
- xmlWriter().writeEndElement(); // <cxxVariablePrototype>
+ writeEndTag(); // <cxxVariablePrototype>
- xmlWriter().writeStartElement(CXXVARIABLENAMELOOKUP);
+ writeStartTag(DT_cxxVariableNameLookup);
writeCharacters(vn->parent()->name() + "::" + vn->name());
- xmlWriter().writeEndElement(); // <cxxVariableNameLookup>
+ writeEndTag(); // <cxxVariableNameLookup>
// not included: <cxxVariableReimplemented>
writeLocation(vn);
- xmlWriter().writeEndElement(); // <cxxVariableDefinition>
+ writeEndTag(); // <cxxVariableDefinition>
- writeDetailedDescription(vn, marker, true, QString());
+ writeApiDesc(vn, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxVariableDetail>
+ writeEndTag(); // </cxxVariableDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxVariable>
+ writeEndTag(); // </cxxVariable>
}
++m;
}
@@ -5091,24 +5270,24 @@ void DitaXmlGenerator::writeMacros(const Section& s,
if ((*m)->type() == Node::Function) {
const FunctionNode* fn = static_cast<const FunctionNode*>(*m);
if (fn->isMacro()) {
- xmlWriter().writeStartElement(CXXDEFINE);
+ writeStartTag(DT_cxxDefine);
xmlWriter().writeAttribute("id",fn->guid());
if (!attribute.isEmpty())
xmlWriter().writeAttribute("outputclass",attribute);
- xmlWriter().writeStartElement("apiName");
+ writeStartTag(DT_apiName);
writeCharacters(fn->name());
- xmlWriter().writeEndElement(); // </apiName>
+ writeEndTag(); // </apiName>
generateBrief(fn,marker);
// not included: <prolog>
- xmlWriter().writeStartElement(CXXDEFINEDETAIL);
- xmlWriter().writeStartElement(CXXDEFINEDEFINITION);
- xmlWriter().writeStartElement(CXXDEFINEACCESSSPECIFIER);
+ writeStartTag(DT_cxxDefineDetail);
+ writeStartTag(DT_cxxDefineDefinition);
+ writeStartTag(DT_cxxDefineAccessSpecifier);
xmlWriter().writeAttribute("value",fn->accessString());
- xmlWriter().writeEndElement(); // <cxxDefineAccessSpecifier>
+ writeEndTag(); // <cxxDefineAccessSpecifier>
- xmlWriter().writeStartElement(CXXDEFINEPROTOTYPE);
+ writeStartTag(DT_cxxDefinePrototype);
xmlWriter().writeCharacters("#define ");
writeCharacters(fn->name());
if (fn->metaness() == FunctionNode::MacroWithParams) {
@@ -5126,50 +5305,50 @@ void DitaXmlGenerator::writeMacros(const Section& s,
xmlWriter().writeCharacters(")");
}
}
- xmlWriter().writeEndElement(); // <cxxDefinePrototype>
+ writeEndTag(); // <cxxDefinePrototype>
- xmlWriter().writeStartElement(CXXDEFINENAMELOOKUP);
+ writeStartTag(DT_cxxDefineNameLookup);
writeCharacters(fn->name());
- xmlWriter().writeEndElement(); // <cxxDefineNameLookup>
+ writeEndTag(); // <cxxDefineNameLookup>
if (fn->reimplementedFrom() != 0) {
FunctionNode* rfn = (FunctionNode*)fn->reimplementedFrom();
- xmlWriter().writeStartElement(CXXDEFINEREIMPLEMENTED);
+ writeStartTag(DT_cxxDefineReimplemented);
xmlWriter().writeAttribute("href",rfn->ditaXmlHref());
writeCharacters(marker->plainFullName(rfn));
- xmlWriter().writeEndElement(); // </cxxDefineReimplemented>
+ writeEndTag(); // </cxxDefineReimplemented>
}
if (fn->metaness() == FunctionNode::MacroWithParams) {
QStringList params = fn->parameterNames();
if (!params.isEmpty()) {
- xmlWriter().writeStartElement(CXXDEFINEPARAMETERS);
+ writeStartTag(DT_cxxDefineParameters);
for (int i = 0; i < params.size(); ++i) {
- xmlWriter().writeStartElement(CXXDEFINEPARAMETER);
- xmlWriter().writeStartElement(CXXDEFINEPARAMETERDECLARATIONNAME);
+ writeStartTag(DT_cxxDefineParameter);
+ writeStartTag(DT_cxxDefineParameterDeclarationName);
writeCharacters(params[i]);
- xmlWriter().writeEndElement(); // <cxxDefineParameterDeclarationName>
+ writeEndTag(); // <cxxDefineParameterDeclarationName>
// not included: <apiDefNote>
- xmlWriter().writeEndElement(); // <cxxDefineParameter>
+ writeEndTag(); // <cxxDefineParameter>
}
- xmlWriter().writeEndElement(); // <cxxDefineParameters>
+ writeEndTag(); // <cxxDefineParameters>
}
}
writeLocation(fn);
- xmlWriter().writeEndElement(); // <cxxDefineDefinition>
+ writeEndTag(); // <cxxDefineDefinition>
- writeDetailedDescription(fn, marker, true, QString());
+ writeApiDesc(fn, marker, QString());
// not included: <example> or <apiImpl>
- xmlWriter().writeEndElement(); // </cxxDefineDetail>
+ writeEndTag(); // </cxxDefineDetail>
// not included: <related-links>
- xmlWriter().writeEndElement(); // </cxxDefine>
+ writeEndTag(); // </cxxDefine>
}
}
++m;
@@ -5212,6 +5391,7 @@ void DitaXmlGenerator::beginSubPage(const Location& location,
writer->setAutoFormatting(true);
writer->setAutoFormattingIndent(4);
writer->writeStartDocument();
+ clearSectionNesting();
}
/*!
@@ -5221,6 +5401,8 @@ void DitaXmlGenerator::beginSubPage(const Location& location,
*/
void DitaXmlGenerator::endSubPage()
{
+ if (inSection())
+ qDebug() << "Missing </section> in" << outFileName() << sectionNestingLevel;
xmlWriter().writeEndDocument();
delete xmlWriterStack.pop();
PageGenerator::endSubPage();
@@ -5238,58 +5420,18 @@ QXmlStreamWriter& DitaXmlGenerator::xmlWriter()
}
/*!
- Writes the \e {Detailed Description} section(s) for \a node to the
- current XML stream using the code \a marker. if the \a apiDesc flag
- is true, then the first section of the sequence of sections written
- will be an \c {apiDesc>} element with a \e {spectitle} attribute of
- \e {Detailed Description}. Otherwise, the first section will be a
- \c {<section>} element with a \c {<title>} element of \e {Detailed
- Description}. This function calls the Generator::generateBody()
- function to write the XML for the section list.
+ Writes the \e {<apiDesc>} element for \a node to the current XML
+ stream using the code \a marker and the \a title.
*/
-void DitaXmlGenerator::writeDetailedDescription(const Node* node,
- CodeMarker* marker,
- bool apiDesc,
- const QString& title)
+void DitaXmlGenerator::writeApiDesc(const Node* node,
+ CodeMarker* marker,
+ const QString& title)
{
if (!node->doc().isEmpty()) {
inDetailedDescription = true;
- if (apiDesc) {
- inApiDesc = true;
- xmlWriter().writeStartElement("apiDesc");
- if (!title.isEmpty()) {
- writeGuidAttribute(title);
- xmlWriter().writeAttribute("spectitle",title);
- }
- else
- writeGuidAttribute("Detailed Description");
- xmlWriter().writeAttribute("outputclass","details");
- }
- else {
- inSection = true;
- xmlWriter().writeStartElement("section");
- if (!title.isEmpty()) {
- writeGuidAttribute(title);
- xmlWriter().writeAttribute("outputclass","details");
- xmlWriter().writeStartElement("title");
- xmlWriter().writeAttribute("outputclass","h2");
- writeCharacters(title);
- xmlWriter().writeEndElement(); // </title>
- }
- else {
- writeGuidAttribute("Detailed Description");
- xmlWriter().writeAttribute("outputclass","details");
- }
- }
+ enterApiDesc(QString(),title);
generateBody(node, marker);
- if (inApiDesc) {
- xmlWriter().writeEndElement(); // </apiDesc>
- inApiDesc = false;
- }
- else if (inSection) {
- xmlWriter().writeEndElement(); // </section>
- inSection = false;
- }
+ leaveSection();
}
inDetailedDescription = false;
}
@@ -5302,23 +5444,23 @@ void DitaXmlGenerator::writeNestedClasses(const Section& s,
{
if (s.members.isEmpty())
return;
- xmlWriter().writeStartElement("cxxClassNested");
- xmlWriter().writeStartElement("cxxClassNestedDetail");
+ writeStartTag(DT_cxxClassNested);
+ writeStartTag(DT_cxxClassNestedDetail);
NodeList::ConstIterator m = s.members.begin();
while (m != s.members.end()) {
if ((*m)->type() == Node::Class) {
- xmlWriter().writeStartElement("cxxClassNestedClass");
+ writeStartTag(DT_cxxClassNestedClass);
QString link = linkForNode((*m), n);
xmlWriter().writeAttribute("href", link);
QString name = n->name() + "::" + (*m)->name();
writeCharacters(name);
- xmlWriter().writeEndElement(); // <cxxClassNestedClass>
+ writeEndTag(); // <cxxClassNestedClass>
}
++m;
}
- xmlWriter().writeEndElement(); // <cxxClassNestedDetail>
- xmlWriter().writeEndElement(); // <cxxClassNested>
+ writeEndTag(); // <cxxClassNestedDetail>
+ writeEndTag(); // <cxxClassNested>
}
/*!
@@ -5389,23 +5531,158 @@ void DitaXmlGenerator::writeDitaMap()
doctype = "<!DOCTYPE cxxAPIMap PUBLIC \"-//NOKIA//DTD DITA C++ API Map Reference Type v0.6.0//EN\" \"dtd/cxxAPIMap.dtd\">";
xmlWriter().writeDTD(doctype);
- xmlWriter().writeStartElement("cxxAPIMap");
+ writeStartTag(DT_cxxAPIMap);
xmlWriter().writeAttribute("id","Qt-DITA-Map");
xmlWriter().writeAttribute("title","Qt DITA Map");
- xmlWriter().writeStartElement("topicmeta");
- xmlWriter().writeStartElement("shortdesc");
+ writeStartTag(DT_topicmeta);
+ writeStartTag(DT_shortdesc);
xmlWriter().writeCharacters("The top level map for the Qt documentation");
- xmlWriter().writeEndElement(); // </shortdesc>
- xmlWriter().writeEndElement(); // </topicmeta>
+ writeEndTag(); // </shortdesc>
+ writeEndTag(); // </topicmeta>
GuidMaps::iterator i = guidMaps.begin();
while (i != guidMaps.end()) {
- xmlWriter().writeStartElement("topicref");
+ writeStartTag(DT_topicref);
xmlWriter().writeAttribute("href",i.key());
xmlWriter().writeAttribute("type","topic");
- xmlWriter().writeEndElement(); // </topicref>
+ writeEndTag(); // </topicref>
++i;
}
endSubPage();
}
+/*!
+ Writes the <prolog> element for the \a inner node
+ using the \a marker. The <prolog> element contains
+ the <metadata> element, plus some others. This
+ function writes one or more of these elements:
+
+ \list
+ \o <audience>
+ \o <author> *
+ \o <brand>
+ \o <category> *
+ \o <compomnent> *
+ \o <copyrholder>
+ \o <copyright>
+ \o <created>
+ \o <copyryear>
+ \o <critdates>
+ \o <keyword>
+ \o <keywords>
+ \o <metadata> *
+ \o <othermeta>
+ \o <permissions> *
+ \o <platform>
+ \o <prodinfo> *
+ \o <prodname> *
+ \o <prolog> *
+ \o <publisher> *
+ \o <resourceid>
+ \o <revised>
+ \o <source>
+ \o <tm>
+ \o <unknown>
+ \o <vrm> *
+ \o <vrmlist> *
+ \endlist
+
+ \node * means the tag has been used.
+
+ */
+void
+DitaXmlGenerator::writeProlog(const InnerNode* inner, CodeMarker* marker)
+{
+ if (!inner)
+ return;
+ writeStartTag(DT_prolog);
+
+ QString author = inner->author();
+ writeStartTag(DT_author);
+ if (author.isEmpty())
+ author = "Qt Development Frameworks";
+ xmlWriter().writeCharacters(author);
+ writeEndTag(); // <author>
+
+ QString publisher = inner->publisher();
+ writeStartTag(DT_publisher);
+ if (publisher.isEmpty())
+ publisher = "Nokia";
+ xmlWriter().writeCharacters(publisher);
+ writeEndTag(); // <publisher>
+
+ QString permissions = inner->permissions();
+ writeStartTag(DT_permissions);
+ if (permissions.isEmpty())
+ permissions = "all";
+ xmlWriter().writeAttribute("view",permissions);
+ writeEndTag(); // <permissions>
+
+ writeStartTag(DT_metadata);
+ writeStartTag(DT_category);
+ QString category = "Page";
+ if (inner->type() == Node::Class)
+ category = "C++ Class";
+ else if (inner->type() == Node::Namespace)
+ category = "C++ Namespace";
+ else if (inner->type() == Node::Fake) {
+ if (inner->subType() == Node::QmlBasicType)
+ category = "QML Class";
+ else if (inner->subType() == Node::QmlClass)
+ category = "QML Basic Type";
+ else if (inner->subType() == Node::HeaderFile)
+ category = "Header File";
+ else if (inner->subType() == Node::Module)
+ category = "Module";
+ else if (inner->subType() == Node::File)
+ category = "Example Source File";
+ else if (inner->subType() == Node::Example)
+ category = "Example";
+ else if (inner->subType() == Node::Image)
+ category = "Image";
+ else if (inner->subType() == Node::Group)
+ category = "Group";
+ else if (inner->subType() == Node::Page)
+ category = "Page";
+ else if (inner->subType() == Node::ExternalPage)
+ category = "External Page"; // Is this necessary?
+ }
+ xmlWriter().writeCharacters(category);
+ writeEndTag(); // <category>
+ if (vrm.size() > 0) {
+ writeStartTag(DT_prodinfo);
+ writeStartTag(DT_prodname);
+ xmlWriter().writeCharacters(projectDescription);
+ writeEndTag(); // <prodname>
+ writeStartTag(DT_vrmlist);
+ writeStartTag(DT_vrm);
+ if (vrm.size() > 0)
+ xmlWriter().writeAttribute("version",vrm[0]);
+ if (vrm.size() > 1)
+ xmlWriter().writeAttribute("release",vrm[1]);
+ if (vrm.size() > 2)
+ xmlWriter().writeAttribute("modification",vrm[2]);
+ writeEndTag(); // <vrm>
+ writeEndTag(); // <vrmlist>
+ QString component = inner->moduleName();
+ if (!component.isEmpty()) {
+ writeStartTag(DT_component);
+ xmlWriter().writeCharacters(component);
+ writeEndTag(); // <component>
+ }
+ writeEndTag(); // <prodinfo>
+ if (inner->hasOtherMetadata()) {
+ const QMap<QString, QString>& omd = inner->otherMetadata();
+ QMapIterator<QString, QString> i(omd);
+ while (i.hasNext()) {
+ i.next();
+ writeStartTag(DT_othermeta);
+ xmlWriter().writeAttribute("name",i.key());
+ xmlWriter().writeAttribute("content",i.value());
+ }
+ }
+ }
+ writeEndTag(); // <metadata>
+ writeEndTag(); // <prolog>
+}
+
QT_END_NAMESPACE
diff --git a/tools/qdoc3/ditaxmlgenerator.h b/tools/qdoc3/ditaxmlgenerator.h
index 4aae657..7793db0 100644
--- a/tools/qdoc3/ditaxmlgenerator.h
+++ b/tools/qdoc3/ditaxmlgenerator.h
@@ -81,6 +81,182 @@ class DitaXmlGenerator : public PageGenerator
LastSinceType
};
+ enum DitaTag {
+ DT_NONE,
+ DT_alt,
+ DT_apiDesc,
+ DT_APIMap,
+ DT_apiName,
+ DT_audience,
+ DT_author,
+ DT_b,
+ DT_body,
+ DT_bodydiv,
+ DT_brand,
+ DT_category,
+ DT_codeblock,
+ DT_comment,
+ DT_component,
+ DT_copyrholder,
+ DT_copyright,
+ DT_copyryear,
+ DT_created,
+ DT_critdates,
+ DT_cxxAPIMap,
+ DT_cxxClass,
+ DT_cxxClassAbstract,
+ DT_cxxClassAccessSpecifier,
+ DT_cxxClassAPIItemLocation,
+ DT_cxxClassBaseClass,
+ DT_cxxClassDeclarationFile,
+ DT_cxxClassDeclarationFileLine,
+ DT_cxxClassDefinition,
+ DT_cxxClassDerivation,
+ DT_cxxClassDerivationAccessSpecifier,
+ DT_cxxClassDerivations,
+ DT_cxxClassDetail,
+ DT_cxxClassNested,
+ DT_cxxClassNestedClass,
+ DT_cxxClassNestedDetail,
+ DT_cxxDefine,
+ DT_cxxDefineAccessSpecifier,
+ DT_cxxDefineAPIItemLocation,
+ DT_cxxDefineDeclarationFile,
+ DT_cxxDefineDeclarationFileLine,
+ DT_cxxDefineDefinition,
+ DT_cxxDefineDetail,
+ DT_cxxDefineNameLookup,
+ DT_cxxDefineParameter,
+ DT_cxxDefineParameterDeclarationName,
+ DT_cxxDefineParameters,
+ DT_cxxDefinePrototype,
+ DT_cxxDefineReimplemented,
+ DT_cxxEnumeration,
+ DT_cxxEnumerationAccessSpecifier,
+ DT_cxxEnumerationAPIItemLocation,
+ DT_cxxEnumerationDeclarationFile,
+ DT_cxxEnumerationDeclarationFileLine,
+ DT_cxxEnumerationDefinition,
+ DT_cxxEnumerationDefinitionFile,
+ DT_cxxEnumerationDefinitionFileLineStart,
+ DT_cxxEnumerationDefinitionFileLineEnd,
+ DT_cxxEnumerationDetail,
+ DT_cxxEnumerationNameLookup,
+ DT_cxxEnumerationPrototype,
+ DT_cxxEnumerationScopedName,
+ DT_cxxEnumerator,
+ DT_cxxEnumeratorInitialiser,
+ DT_cxxEnumeratorNameLookup,
+ DT_cxxEnumeratorPrototype,
+ DT_cxxEnumerators,
+ DT_cxxEnumeratorScopedName,
+ DT_cxxFunction,
+ DT_cxxFunctionAccessSpecifier,
+ DT_cxxFunctionAPIItemLocation,
+ DT_cxxFunctionConst,
+ DT_cxxFunctionConstructor,
+ DT_cxxFunctionDeclarationFile,
+ DT_cxxFunctionDeclarationFileLine,
+ DT_cxxFunctionDeclaredType,
+ DT_cxxFunctionDefinition,
+ DT_cxxFunctionDestructor,
+ DT_cxxFunctionDetail,
+ DT_cxxFunctionNameLookup,
+ DT_cxxFunctionParameter,
+ DT_cxxFunctionParameterDeclarationName,
+ DT_cxxFunctionParameterDeclaredType,
+ DT_cxxFunctionParameterDefaultValue,
+ DT_cxxFunctionParameters,
+ DT_cxxFunctionPrototype,
+ DT_cxxFunctionPureVirtual,
+ DT_cxxFunctionReimplemented,
+ DT_cxxFunctionScopedName,
+ DT_cxxFunctionStorageClassSpecifierStatic,
+ DT_cxxFunctionVirtual,
+ DT_cxxTypedef,
+ DT_cxxTypedefAccessSpecifier,
+ DT_cxxTypedefAPIItemLocation,
+ DT_cxxTypedefDeclarationFile,
+ DT_cxxTypedefDeclarationFileLine,
+ DT_cxxTypedefDefinition,
+ DT_cxxTypedefDetail,
+ DT_cxxTypedefNameLookup,
+ DT_cxxTypedefScopedName,
+ DT_cxxVariable,
+ DT_cxxVariableAccessSpecifier,
+ DT_cxxVariableAPIItemLocation,
+ DT_cxxVariableDeclarationFile,
+ DT_cxxVariableDeclarationFileLine,
+ DT_cxxVariableDeclaredType,
+ DT_cxxVariableDefinition,
+ DT_cxxVariableDetail,
+ DT_cxxVariableNameLookup,
+ DT_cxxVariablePrototype,
+ DT_cxxVariableReimplemented,
+ DT_cxxVariableScopedName,
+ DT_cxxVariableStorageClassSpecifierStatic,
+ DT_data,
+ DT_dataabout,
+ DT_dd,
+ DT_dl,
+ DT_dlentry,
+ DT_dt,
+ DT_entry,
+ DT_fig,
+ DT_i,
+ DT_image,
+ DT_keyword,
+ DT_keywords,
+ DT_li,
+ DT_link,
+ DT_linktext,
+ DT_lq,
+ DT_metadata,
+ DT_ol,
+ DT_othermeta,
+ DT_p,
+ DT_parameter,
+ DT_permissions,
+ DT_ph,
+ DT_platform,
+ DT_pre,
+ DT_prodinfo,
+ DT_prodname,
+ DT_prolog,
+ DT_publisher,
+ DT_relatedLinks,
+ DT_resourceid,
+ DT_revised,
+ DT_row,
+ DT_section,
+ DT_sectiondiv,
+ DT_shortdesc,
+ DT_simpletable,
+ DT_source,
+ DT_stentry,
+ DT_sthead,
+ DT_strow,
+ DT_sub,
+ DT_sup,
+ DT_table,
+ DT_tbody,
+ DT_tgroup,
+ DT_thead,
+ DT_title,
+ DT_tm,
+ DT_topic,
+ DT_topicmeta,
+ DT_topicref,
+ DT_tt,
+ DT_u,
+ DT_ul,
+ DT_unknown,
+ DT_vrm,
+ DT_vrmlist,
+ DT_xref,
+ DT_LAST
+ };
+
public:
DitaXmlGenerator();
~DitaXmlGenerator();
@@ -139,6 +315,7 @@ class DitaXmlGenerator : public PageGenerator
void writePropertyParameter(const QString& tag, const NodeList& nlist);
void writeRelatedLinks(const FakeNode* fake, CodeMarker* marker);
void writeLink(const Node* node, const QString& tex, const QString& role);
+ void writeProlog(const InnerNode* inner, CodeMarker* marker);
private:
enum SubTitleSize { SmallSubTitle, LargeSubTitle };
@@ -254,27 +431,45 @@ class DitaXmlGenerator : public PageGenerator
virtual void endSubPage();
virtual void generateInnerNode(const InnerNode* node);
QXmlStreamWriter& xmlWriter();
- void writeDetailedDescription(const Node* node,
- CodeMarker* marker,
- bool apiDesc,
- const QString& title);
+ void writeApiDesc(const Node* node, CodeMarker* marker, const QString& title);
void addLink(const QString& href, const QStringRef& text);
void writeDitaMap();
+ void writeStartTag(DitaTag t);
+ void writeEndTag(DitaTag t=DT_NONE);
+ DitaTag currentTag();
+ void clearSectionNesting() { sectionNestingLevel = 0; }
+ int enterApiDesc(const QString& outputclass, const QString& title);
+ int enterSection(const QString& outputclass, const QString& title);
+ int leaveSection();
+ bool inSection() const { return (sectionNestingLevel > 0); }
+ int currentSectionNestingLevel() const { return sectionNestingLevel; }
+
private:
- QMap<QString, QString> refMap;
- QMap<QString, QString> name2guidMap;
- GuidMaps guidMaps;
- int codeIndent;
+ /*
+ These flags indicate which elements the generator
+ is currently outputting.
+ */
+ bool inContents;
+ bool inDetailedDescription;
+ bool inLegaleseText;
bool inLink;
bool inObsoleteLink;
- bool inContents;
bool inSectionHeading;
bool inTableHeader;
bool inTableBody;
- int numTableRows;
- bool threeColumnEnumValueTable;
+
+ bool noLinks;
+ bool obsoleteLinks;
bool offlineDocs;
+ bool threeColumnEnumValueTable;
+
+ int codeIndent;
+ int numTableRows;
+ int divNestingLevel;
+ int sectionNestingLevel;
+ int tableColumnCount;
+
QString link;
QStringList sectionNumber;
QRegExp funcLeftParen;
@@ -288,12 +483,14 @@ class DitaXmlGenerator : public PageGenerator
QString projectDescription;
QString projectUrl;
QString navigationLinks;
+ QString version;
+ QStringList vrm;
QStringList stylesheets;
QStringList customHeadElements;
const Tree* myTree;
- bool obsoleteLinks;
- bool noLinks;
- int tableColumnCount;
+ QMap<QString, QString> refMap;
+ QMap<QString, QString> name2guidMap;
+ GuidMaps guidMaps;
QMap<QString, NodeMap > moduleClassMap;
QMap<QString, NodeMap > moduleNamespaceMap;
NodeMap nonCompatClasses;
@@ -312,12 +509,9 @@ class DitaXmlGenerator : public PageGenerator
NewClassMaps newClassMaps;
NewClassMaps newQmlClassMaps;
static int id;
- static bool inApiDesc;
- static bool inSection;
- static bool inDetailedDescription;
- static bool inLegaleseText;
-
+ static QString ditaTags[];
QStack<QXmlStreamWriter*> xmlWriterStack;
+ QStack<DitaTag> tagStack;
};
#define DITAXMLGENERATOR_ADDRESS "address"
diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp
index a730799..5f563be 100644
--- a/tools/qdoc3/doc.cpp
+++ b/tools/qdoc3/doc.cpp
@@ -55,6 +55,7 @@
#include <qregexp.h>
#include <ctype.h>
#include <limits.h>
+#include <qdebug.h>
QT_BEGIN_NAMESPACE
@@ -90,8 +91,8 @@ enum {
CMD_QUOTEFROMFILE, CMD_QUOTEFUNCTION, CMD_RAW, CMD_ROW,
CMD_SA, CMD_SECTION1, CMD_SECTION2, CMD_SECTION3,
CMD_SECTION4, CMD_SIDEBAR, CMD_SINCELIST, CMD_SKIPLINE,
- CMD_SKIPTO, CMD_SKIPUNTIL, CMD_SNIPPET, CMD_SUB, CMD_SUP,
- CMD_TABLE, CMD_TABLEOFCONTENTS, CMD_TARGET, CMD_TT,
+ CMD_SKIPTO, CMD_SKIPUNTIL, CMD_SNIPPET, CMD_SPAN, CMD_SUB,
+ CMD_SUP, CMD_TABLE, CMD_TABLEOFCONTENTS, CMD_TARGET, CMD_TT,
CMD_UNDERLINE, CMD_UNICODE, CMD_VALUE, CMD_WARNING,
#ifdef QDOC_QML
CMD_QML, CMD_ENDQML, CMD_CPP, CMD_ENDCPP, CMD_QMLTEXT,
@@ -184,6 +185,7 @@ static struct {
{ "skipto", CMD_SKIPTO, 0 },
{ "skipuntil", CMD_SKIPUNTIL, 0 },
{ "snippet", CMD_SNIPPET, 0 },
+ { "span", CMD_SPAN, 0 },
{ "sub", CMD_SUB, 0 },
{ "sup", CMD_SUP, 0 },
{ "table", CMD_TABLE, 0 },
@@ -366,14 +368,15 @@ class DocParser
void endSection(int unit, int endCmd);
void parseAlso();
void append(Atom::Type type, const QString& string = "");
+ void append(Atom::Type type, const QString& p1, const QString& p2);
void appendChar(QChar ch);
void appendWord(const QString &word);
void appendToCode(const QString &code);
void appendToCode(const QString &code, Atom::Type defaultType);
void startNewPara();
void enterPara(Atom::Type leftType = Atom::ParaLeft,
- Atom::Type rightType = Atom::ParaRight,
- const QString& string = "");
+ Atom::Type rightType = Atom::ParaRight,
+ const QString& string = "");
void leavePara();
void leaveValue();
void leaveValueList();
@@ -405,9 +408,13 @@ class DocParser
Location cachedLoc;
int cachedPos;
- DocPrivate *priv;
- enum ParaState { OutsidePara, InsideSingleLinePara, InsideMultiLinePara };
- ParaState paraState;
+ DocPrivate* priv;
+ enum ParagraphState {
+ OutsideParagraph,
+ InSingleLineParagraph,
+ InMultiLineParagraph
+ };
+ ParagraphState paraState;
bool inTableHeader;
bool inTableRow;
bool inTableItem;
@@ -454,7 +461,7 @@ void DocParser::parse(const QString& source,
priv = docPrivate;
priv->text << Atom::Nop;
- paraState = OutsidePara;
+ paraState = OutsideParagraph;
inTableHeader = false;
inTableRow = false;
inTableItem = false;
@@ -470,7 +477,7 @@ void DocParser::parse(const QString& source,
CodeMarker *marker = 0;
Atom *currentLinkAtom = 0;
- QString x;
+ QString p1, p2;
QStack<bool> preprocessorSkipping;
int numPreprocessorSkipping = 0;
@@ -509,11 +516,11 @@ void DocParser::parse(const QString& source,
switch (cmd) {
case CMD_A:
enterPara();
- x = getArgument();
+ p1 = getArgument();
append(Atom::FormattingLeft,ATOM_FORMATTING_PARAMETER);
- append(Atom::String, x);
+ append(Atom::String, p1);
append(Atom::FormattingRight,ATOM_FORMATTING_PARAMETER);
- priv->params.insert(x);
+ priv->params.insert(p1);
break;
case CMD_ABSTRACT:
if (openCommand(cmd)) {
@@ -538,20 +545,20 @@ void DocParser::parse(const QString& source,
break;
case CMD_C:
enterPara();
- x = untabifyEtc(getArgument(true));
- marker = CodeMarker::markerForCode(x);
- append(Atom::C, marker->markedUpCode(x, 0, location()));
+ p1 = untabifyEtc(getArgument(true));
+ marker = CodeMarker::markerForCode(p1);
+ append(Atom::C, marker->markedUpCode(p1, 0, location()));
break;
case CMD_CAPTION:
leavePara();
- /* ... */
+ enterPara(Atom::CaptionLeft, Atom::CaptionRight);
break;
case CMD_CHAPTER:
startSection(Doc::Chapter, cmd);
break;
case CMD_CODE:
leavePara();
- append(Atom::Code, getCode(CMD_CODE, marker));
+ append(Atom::Code, getCode(CMD_CODE, 0));
break;
#ifdef QDOC_QML
case CMD_QML:
@@ -568,10 +575,14 @@ void DocParser::parse(const QString& source,
#endif
case CMD_DIV:
leavePara();
- x = getArgument(true);
- append(Atom::Div, x);
+ p1 = getArgument(true);
+ append(Atom::DivLeft, p1);
openedCommands.push(cmd);
- enterPara();
+ break;
+ case CMD_ENDDIV:
+ leavePara();
+ append(Atom::DivRight);
+ closeCommand(cmd);
break;
case CMD_CODELINE:
{
@@ -635,16 +646,11 @@ void DocParser::parse(const QString& source,
}
break;
case CMD_ENDCHAPTER:
- endSection(0, cmd);
+ endSection(Doc::Chapter, cmd);
break;
case CMD_ENDCODE:
closeCommand(cmd);
break;
- case CMD_ENDDIV:
- leavePara();
- append(Atom::EndDiv);
- closeCommand(cmd);
- break;
#ifdef QDOC_QML
case CMD_ENDQML:
closeCommand(cmd);
@@ -660,7 +666,7 @@ void DocParser::parse(const QString& source,
if (closeCommand(cmd)) {
leavePara();
append(Atom::FootnoteRight);
- paraState = InsideMultiLinePara; // ###
+ paraState = InMultiLineParagraph; // ###
}
break;
case CMD_ENDIF:
@@ -747,7 +753,7 @@ void DocParser::parse(const QString& source,
if (openCommand(cmd)) {
enterPara();
append(Atom::FootnoteLeft);
- paraState = OutsidePara; // ###
+ paraState = OutsideParagraph; // ###
}
break;
case CMD_ANNOTATEDLIST:
@@ -807,7 +813,7 @@ void DocParser::parse(const QString& source,
append(Atom::String, " ");
break;
case CMD_INDEX:
- if (paraState == OutsidePara) {
+ if (paraState == OutsideParagraph) {
enterPara();
indexStartedPara = true;
}
@@ -826,23 +832,23 @@ void DocParser::parse(const QString& source,
case CMD_L:
enterPara();
if (isLeftBraceAhead()) {
- x = getArgument();
- append(Atom::Link, x);
+ p1 = getArgument();
+ append(Atom::Link, p1);
if (isLeftBraceAhead()) {
currentLinkAtom = priv->text.lastAtom();
startFormat(ATOM_FORMATTING_LINK, cmd);
}
else {
append(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
- append(Atom::String, cleanLink(x));
+ append(Atom::String, cleanLink(p1));
append(Atom::FormattingRight, ATOM_FORMATTING_LINK);
}
}
else {
- x = getArgument();
- append(Atom::Link, x);
+ p1 = getArgument();
+ append(Atom::Link, p1);
append(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
- append(Atom::String, cleanLink(x));
+ append(Atom::String, cleanLink(p1));
append(Atom::FormattingRight, ATOM_FORMATTING_LINK);
}
break;
@@ -855,8 +861,8 @@ void DocParser::parse(const QString& source,
case CMD_LINK:
if (openCommand(cmd)) {
enterPara();
- x = getArgument();
- append(Atom::Link, x);
+ p1 = getArgument();
+ append(Atom::Link, p1);
append(Atom::FormattingLeft, ATOM_FORMATTING_LINK);
skipSpacesOrOneEndl();
}
@@ -870,8 +876,8 @@ void DocParser::parse(const QString& source,
break;
case CMD_META:
priv->constructExtra();
- x = getArgument();
- priv->extra->metaMap.insert(x, getRestOfLine());
+ p1 = getArgument();
+ priv->extra->metaMap.insert(p1, getRestOfLine());
break;
case CMD_NEWCODE:
location().warning(tr("Unexpected '\\%1'").arg(cmdName(CMD_NEWCODE)));
@@ -895,9 +901,13 @@ void DocParser::parse(const QString& source,
enterPara();
}
else if (openedCommands.top() == CMD_TABLE) {
- x = "1,1";
- if (isLeftBraceAhead())
- x = getArgument();
+ p1 = "1,1";
+ if (isLeftBraceAhead()) {
+ p1 = getArgument();
+ if (isLeftBraceAhead()) {
+ p2 = getArgument();
+ }
+ }
if (!inTableHeader && !inTableRow) {
location().warning(tr("Missing '\\%1' or '\\%1' before '\\%3'")
@@ -912,7 +922,7 @@ void DocParser::parse(const QString& source,
inTableItem = false;
}
- append(Atom::TableItemLeft, x);
+ append(Atom::TableItemLeft, p1, p2);
inTableItem = true;
}
else {
@@ -931,11 +941,11 @@ void DocParser::parse(const QString& source,
getUntilEnd(cmd);
break;
case CMD_OMITVALUE:
- x = getArgument();
- if (!priv->enumItemList.contains(x))
- priv->enumItemList.append(x);
- if (!priv->omitEnumItemList.contains(x))
- priv->omitEnumItemList.append(x);
+ p1 = getArgument();
+ if (!priv->enumItemList.contains(p1))
+ priv->enumItemList.append(p1);
+ if (!priv->omitEnumItemList.contains(p1))
+ priv->omitEnumItemList.append(p1);
break;
case CMD_PART:
startSection(Doc::Part, cmd);
@@ -1004,35 +1014,38 @@ void DocParser::parse(const QString& source,
case CMD_QUOTEFUNCTION:
leavePara();
marker = quoteFromFile();
- x = getRestOfLine();
+ p1 = getRestOfLine();
if (!quoting) {
quoter.quoteTo(location(), cmdStr,
- slashed(marker->functionBeginRegExp(x)));
+ slashed(marker->functionBeginRegExp(p1)));
append(Atom::Code,
quoter.quoteUntil(location(), cmdStr,
- slashed(marker->functionEndRegExp(x))));
+ slashed(marker->functionEndRegExp(p1))));
quoter.reset();
}
else {
append(Atom::CodeQuoteCommand, cmdStr);
- append(Atom::CodeQuoteArgument, slashed(marker->functionEndRegExp(x)));
+ append(Atom::CodeQuoteArgument, slashed(marker->functionEndRegExp(p1)));
}
break;
case CMD_RAW:
leavePara();
- x = getRestOfLine();
- if (x.isEmpty())
+ p1 = getRestOfLine();
+ if (p1.isEmpty())
location().warning(tr("Missing format name after '\\%1")
.arg(cmdName(CMD_RAW)));
- append(Atom::FormatIf, x);
+ append(Atom::FormatIf, p1);
append(Atom::RawString, untabifyEtc(getUntilEnd(cmd)));
append(Atom::FormatElse);
append(Atom::FormatEndif);
break;
case CMD_ROW:
if (openedCommands.top() == CMD_TABLE) {
+ p1.clear();
+ if (isLeftBraceAhead())
+ p1 = getArgument(true);
leaveTableRow();
- append(Atom::TableRowLeft);
+ append(Atom::TableRowLeft,p1);
inTableRow = true;
}
else {
@@ -1102,6 +1115,10 @@ void DocParser::parse(const QString& source,
append(Atom::CodeQuoteArgument, getRestOfLine());
}
break;
+ case CMD_SPAN:
+ p1 = ATOM_FORMATTING_SPAN + getArgument(true);
+ startFormat(p1, cmd);
+ break;
case CMD_SNIPPET:
leavePara();
{
@@ -1125,22 +1142,22 @@ void DocParser::parse(const QString& source,
startFormat(ATOM_FORMATTING_SUPERSCRIPT, cmd);
break;
case CMD_TABLE:
- x = getRestOfLine();
+ p1 = getRestOfLine();
if (openCommand(cmd)) {
leavePara();
- append(Atom::TableLeft, x);
+ append(Atom::TableLeft, p1);
inTableHeader = false;
inTableRow = false;
inTableItem = false;
}
break;
case CMD_TABLEOFCONTENTS:
- x = "1";
+ p1 = "1";
if (isLeftBraceAhead())
- x = getArgument();
- x += ",";
- x += QString::number((int)getSectioningUnit());
- append(Atom::TableOfContents, x);
+ p1 = getArgument();
+ p1 += ",";
+ p1 += QString::number((int)getSectioningUnit());
+ append(Atom::TableOfContents, p1);
break;
case CMD_TARGET:
insertTarget(getRestOfLine(),false);
@@ -1153,16 +1170,16 @@ void DocParser::parse(const QString& source,
break;
case CMD_UNICODE:
enterPara();
- x = getArgument();
+ p1 = getArgument();
{
bool ok;
- uint unicodeChar = x.toUInt(&ok, 0);
+ uint unicodeChar = p1.toUInt(&ok, 0);
if (!ok ||
(unicodeChar == 0x0000) ||
(unicodeChar > 0xFFFE)) {
location().warning(tr("Invalid Unicode character '%1' specified "
"with '%2'")
- .arg(x, cmdName(CMD_UNICODE)));
+ .arg(p1, cmdName(CMD_UNICODE)));
}
else {
append(Atom::String, QChar(unicodeChar));
@@ -1172,13 +1189,13 @@ void DocParser::parse(const QString& source,
case CMD_VALUE:
leaveValue();
if (openedLists.top().style() == OpenedList::Value) {
- x = getArgument();
- if (!priv->enumItemList.contains(x))
- priv->enumItemList.append(x);
+ p1 = getArgument();
+ if (!priv->enumItemList.contains(p1))
+ priv->enumItemList.append(p1);
openedLists.top().next();
append(Atom::ListTagLeft, ATOM_LIST_VALUE);
- append(Atom::String, x);
+ append(Atom::String, p1);
append(Atom::ListTagRight, ATOM_LIST_VALUE);
append(Atom::ListItemLeft, ATOM_LIST_VALUE);
@@ -1191,7 +1208,8 @@ void DocParser::parse(const QString& source,
}
break;
case CMD_WARNING:
- startNewPara();
+ leavePara();
+ enterPara();
append(Atom::FormattingLeft, ATOM_FORMATTING_BOLD);
append(Atom::String, "Warning:");
append(Atom::FormattingRight, ATOM_FORMATTING_BOLD);
@@ -1199,13 +1217,13 @@ void DocParser::parse(const QString& source,
break;
case CMD_OVERLOAD:
priv->metacommandsUsed.insert(cmdStr);
- x.clear();
+ p1.clear();
if (!isBlankLine())
- x = getRestOfLine();
- if (!x.isEmpty()) {
+ p1 = getRestOfLine();
+ if (!p1.isEmpty()) {
append(Atom::ParaLeft);
append(Atom::String, "This function overloads ");
- append(Atom::AutoLink,x);
+ append(Atom::AutoLink,p1);
append(Atom::String, ".");
append(Atom::ParaRight);
}
@@ -1213,9 +1231,9 @@ void DocParser::parse(const QString& source,
append(Atom::ParaLeft);
append(Atom::String,"This is an overloaded function.");
append(Atom::ParaRight);
- x = getMetaCommandArgument(cmdStr);
+ p1 = getMetaCommandArgument(cmdStr);
}
- priv->metaCommandMap[cmdStr].append(x);
+ priv->metaCommandMap[cmdStr].append(p1);
break;
case NOT_A_CMD:
if (metaCommandSet.contains(cmdStr)) {
@@ -1281,8 +1299,7 @@ void DocParser::parse(const QString& source,
braceDepth--;
pos++;
- QMap<int, QString>::Iterator f =
- pendingFormats.find(braceDepth);
+ QMap<int, QString>::Iterator f = pendingFormats.find(braceDepth);
if (f == pendingFormats.end()) {
enterPara();
appendChar('}');
@@ -1319,7 +1336,7 @@ void DocParser::parse(const QString& source,
newWord = false;
}
- if (paraState == OutsidePara) {
+ if (paraState == OutsideParagraph) {
if (ch.isSpace()) {
++pos;
newWord = false;
@@ -1333,7 +1350,7 @@ void DocParser::parse(const QString& source,
if (ch.isSpace()) {
++pos;
if ((ch == '\n') &&
- (paraState == InsideSingleLinePara ||
+ (paraState == InSingleLineParagraph ||
isBlankLine())) {
leavePara();
newWord = false;
@@ -1441,7 +1458,7 @@ void DocParser::parse(const QString& source,
location().warning(tr("Missing '\\%1'").arg(cmdName(CMD_ENDIF)));
}
- while (currentSectioningUnit > Doc::Chapter) {
+ while (currentSectioningUnit >= Doc::Chapter) {
int delta = currentSectioningUnit - priv->extra->sectioningUnit;
append(Atom::SectionRight, QString::number(delta));
currentSectioningUnit = Doc::SectioningUnit(int(currentSectioningUnit) - 1);
@@ -1697,8 +1714,7 @@ bool DocParser::closeCommand(int endCmd)
}
}
else {
- location().warning(tr("Unexpected '\\%1'")
- .arg(cmdName(endCmd)));
+ location().warning(tr("Unexpected '\\%1'").arg(cmdName(endCmd)));
}
return false;
}
@@ -1816,19 +1832,32 @@ void DocParser::parseAlso()
}
}
+//static bool debug = false;
+#if 0
+ if (type == Atom::DivLeft)
+ debug = true;
+ if (debug)
+ qDebug() << type << string;
+ if (type == Atom::DivRight)
+ debug = false;
+#endif
+
void DocParser::append(Atom::Type type, const QString &string)
{
Atom::Type lastType = priv->text.lastAtom()->type();
-#ifdef QDOC_QML
- if (((lastType == Atom::Code) || (lastType == Atom::Code)) &&
-#else
- if ((lastType == Atom::Code) &&
-#endif
- priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
+ if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
priv->text.lastAtom()->chopString();
priv->text << Atom(type, string);
}
+void DocParser::append(Atom::Type type, const QString& p1, const QString& p2)
+{
+ Atom::Type lastType = priv->text.lastAtom()->type();
+ if ((lastType == Atom::Code) && priv->text.lastAtom()->string().endsWith(QLatin1String("\n\n")))
+ priv->text.lastAtom()->chopString();
+ priv->text << Atom(type, p1, p2);
+}
+
void DocParser::appendChar(QChar ch)
{
if (priv->text.lastAtom()->type() != Atom::String)
@@ -1883,20 +1912,23 @@ void DocParser::enterPara(Atom::Type leftType,
Atom::Type rightType,
const QString& string)
{
- if (paraState == OutsidePara) {
- if (priv->text.lastAtom()->type() != Atom::ListItemLeft)
+ if (paraState == OutsideParagraph) {
+
+ if ((priv->text.lastAtom()->type() != Atom::ListItemLeft) &&
+ (priv->text.lastAtom()->type() != Atom::DivLeft)) {
leaveValueList();
+ }
+
append(leftType, string);
indexStartedPara = false;
pendingParaLeftType = leftType;
pendingParaRightType = rightType;
pendingParaString = string;
- if (
- leftType == Atom::SectionHeadingLeft) {
- paraState = InsideSingleLinePara;
+ if (leftType == Atom::SectionHeadingLeft) {
+ paraState = InSingleLineParagraph;
}
else {
- paraState = InsideMultiLinePara;
+ paraState = InMultiLineParagraph;
}
skipSpacesOrOneEndl();
}
@@ -1904,7 +1936,7 @@ void DocParser::enterPara(Atom::Type leftType,
void DocParser::leavePara()
{
- if (paraState != OutsidePara) {
+ if (paraState != OutsideParagraph) {
if (!pendingFormats.isEmpty()) {
location().warning(tr("Missing '}'"));
pendingFormats.clear();
@@ -1920,7 +1952,7 @@ void DocParser::leavePara()
}
append(pendingParaRightType, pendingParaString);
}
- paraState = OutsidePara;
+ paraState = OutsideParagraph;
indexStartedPara = false;
pendingParaRightType = Atom::Nop;
pendingParaString = "";
@@ -2154,10 +2186,8 @@ QString DocParser::getArgument(bool verbatim)
location().warning(tr("Missing '}'"));
}
else {
- while (pos < in.length() &&
- ((delimDepth > 0) ||
- ((delimDepth == 0) &&
- !in[pos].isSpace()))) {
+ while ((pos < in.length()) &&
+ ((delimDepth > 0) || ((delimDepth == 0) && !in[pos].isSpace()))) {
switch (in[pos].unicode()) {
case '(':
case '[':
@@ -2362,6 +2392,9 @@ bool DocParser::isLeftBraceAhead()
return numEndl < 2 && i < len && in[i] == '{';
}
+/*!
+ Skips to the next non-space character or EOL.
+ */
void DocParser::skipSpacesOnLine()
{
while ((pos < in.length()) &&
@@ -2370,6 +2403,9 @@ void DocParser::skipSpacesOnLine()
++pos;
}
+/*!
+ Skips spaces and on EOL.
+ */
void DocParser::skipSpacesOrOneEndl()
{
int firstEndl = -1;
diff --git a/tools/qdoc3/doc/config/compat.qdocconf b/tools/qdoc3/doc/config/compat.qdocconf
new file mode 100644
index 0000000..4b8d7a4
--- /dev/null
+++ b/tools/qdoc3/doc/config/compat.qdocconf
@@ -0,0 +1,28 @@
+macro.0 = "\\\\0"
+macro.b = "\\\\b"
+macro.n = "\\\\n"
+macro.r = "\\\\r"
+macro.i = "\\o"
+macro.i11 = "\\o{1,1}"
+macro.i12 = "\\o{1,2}"
+macro.i13 = "\\o{1,3}"
+macro.i14 = "\\o{1,4}"
+macro.i15 = "\\o{1,5}"
+macro.i16 = "\\o{1,6}"
+macro.i17 = "\\o{1,7}"
+macro.i18 = "\\o{1,8}"
+macro.i19 = "\\o{1,9}"
+macro.i21 = "\\o{2,1}"
+macro.i31 = "\\o{3,1}"
+macro.i41 = "\\o{4,1}"
+macro.i51 = "\\o{5,1}"
+macro.i61 = "\\o{6,1}"
+macro.i71 = "\\o{7,1}"
+macro.i81 = "\\o{8,1}"
+macro.i91 = "\\o{9,1}"
+macro.img = "\\image"
+macro.endquote = "\\endquotation"
+macro.relatesto = "\\relates"
+
+spurious = "Missing comma in .*" \
+ "Missing pattern .*"
diff --git a/tools/qdoc3/doc/config/macros.qdocconf b/tools/qdoc3/doc/config/macros.qdocconf
new file mode 100644
index 0000000..2262daa
--- /dev/null
+++ b/tools/qdoc3/doc/config/macros.qdocconf
@@ -0,0 +1,37 @@
+macro.aacute.HTML = "&aacute;"
+macro.Aring.HTML = "&Aring;"
+macro.aring.HTML = "&aring;"
+macro.Auml.HTML = "&Auml;"
+macro.author = "\\bold{Author:}"
+macro.br.HTML = "<br />"
+macro.BR.HTML = "<br />"
+macro.copyright.HTML = "&copy;"
+macro.eacute.HTML = "&eacute;"
+macro.gui = "\\bold"
+macro.hr.HTML = "<hr />"
+macro.iacute.HTML = "&iacute;"
+macro.key = "\\bold"
+macro.menu = "\\bold"
+macro.note = "\\bold{Note:}"
+macro.oslash.HTML = "&oslash;"
+macro.ouml.HTML = "&ouml;"
+macro.QA = "\\e{Qt Assistant}"
+macro.QD = "\\e{Qt Designer}"
+macro.QL = "\\e{Qt Linguist}"
+macro.QQV = "\\e{Qt QML Viewer}"
+macro.param = "\\e"
+macro.raisedaster.HTML = "<sup>*</sup>"
+macro.rarrow.HTML = "&rarr;"
+macro.reg.HTML = "<sup>&reg;</sup>"
+macro.return = "Returns"
+macro.starslash = "\\c{*/}"
+macro.begincomment = "\\c{/*}"
+macro.endcomment = "\\c{*/}"
+macro.uuml.HTML = "&uuml;"
+macro.mdash.HTML = "&mdash;"
+
+macro.beginfloatleft.HTML = "<div style=\"float: left; margin-right: 2em\">"
+macro.beginfloatright.HTML = "<div style=\"float: right; margin-left: 2em\">"
+macro.endfloat.HTML = "</div>"
+macro.clearfloat.HTML = "<br style=\"clear: both\" />"
+macro.emptyspan.HTML = "<span></span>"
diff --git a/tools/qdoc3/doc/config/qdoc-online.qdocconf b/tools/qdoc3/doc/config/qdoc-online.qdocconf
new file mode 100644
index 0000000..7fd8ed5
--- /dev/null
+++ b/tools/qdoc3/doc/config/qdoc-online.qdocconf
@@ -0,0 +1,2 @@
+include(qdoc-project.qdocconf)
+include(qt-html-templates-online.qdocconf)
diff --git a/tools/qdoc3/doc/config/qdoc-project.qdocconf b/tools/qdoc3/doc/config/qdoc-project.qdocconf
new file mode 100644
index 0000000..9694052
--- /dev/null
+++ b/tools/qdoc3/doc/config/qdoc-project.qdocconf
@@ -0,0 +1,47 @@
+include(compat.qdocconf)
+include(macros.qdocconf)
+include(qt-cpp-ignore.qdocconf)
+include(qt-defines.qdocconf)
+
+indexes = $$QT_BUILD_TREE/doc/html/qt.index
+
+sourceencoding = UTF-8
+outputencoding = UTF-8
+naturallanguage = en_US
+
+project = QDoc
+description = QDoc3 Manual
+url = http://doc.qt.nokia.com/qdoc
+
+sources.fileextensions = "*.cpp *.qdoc *.mm *.qml"
+headers.fileextensions = "*.h *.ch *.h++ *.hh *.hpp *.hxx"
+examples.fileextensions = "*.cpp *.h *.js *.xq *.svg *.xml *.ui *.qhp *.qhcp *.qml"
+examples.imageextensions = "*.png *.jpeg *.jpg *.gif *.mng"
+
+sourcedirs = ..
+
+exampledirs = .. \
+ ../examples \
+ ../../../../examples
+
+imagedirs = ../../../doc/src/templates/images \
+ images
+
+outputdir = $$QT_BUILD_TREE/tools/qdoc3/doc/html
+tagfile = $$QT_BUILD_TREE/tools/qdoc3/doc/html/qdoc.tags
+
+qhp.projects = QDoc
+
+qhp.QDoc.file = qdoc.qhp
+qhp.QDoc.namespace = com.trolltech.qdoc
+qhp.QDoc.virtualFolder = qdoc
+qhp.QDoc.indexTitle = QDoc Manual - Table of Contents
+qhp.QDoc.indexRoot =
+
+qhp.QDoc.filterAttributes = qdoc qtrefdoc
+qhp.QDoc.customFilters.QDoc.name = QDoc
+qhp.QDoc.customFilters.QDoc.filterAttributes = qdoc
+qhp.QDoc.subprojects = overviews
+qhp.QDoc.subprojects.overviews.title = Overviews
+qhp.QDoc.subprojects.overviews.indexTitle = All Overviews and HOWTOs
+qhp.QDoc.subprojects.overviews.selectors = fake:page,group,module
diff --git a/tools/qdoc3/doc/config/qdoc.qdocconf b/tools/qdoc3/doc/config/qdoc.qdocconf
new file mode 100644
index 0000000..c238abe
--- /dev/null
+++ b/tools/qdoc3/doc/config/qdoc.qdocconf
@@ -0,0 +1,2 @@
+include(qdoc-project.qdocconf)
+include(qt-html-templates.qdocconf)
diff --git a/tools/qdoc3/doc/config/qt-cpp-ignore.qdocconf b/tools/qdoc3/doc/config/qt-cpp-ignore.qdocconf
new file mode 100644
index 0000000..044eef4
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-cpp-ignore.qdocconf
@@ -0,0 +1,98 @@
+Cpp.ignoretokens = QAXFACTORY_EXPORT \
+ QDESIGNER_COMPONENTS_LIBRARY \
+ QDESIGNER_EXTENSION_LIBRARY \
+ QDESIGNER_SDK_LIBRARY \
+ QDESIGNER_SHARED_LIBRARY \
+ QDESIGNER_UILIB_LIBRARY \
+ QM_EXPORT_CANVAS \
+ QM_EXPORT_DNS \
+ QM_EXPORT_DOM \
+ QM_EXPORT_FTP \
+ QM_EXPORT_HTTP \
+ QM_EXPORT_ICONVIEW \
+ QM_EXPORT_NETWORK \
+ QM_EXPORT_OPENGL \
+ QM_EXPORT_OPENVG \
+ QM_EXPORT_SQL \
+ QM_EXPORT_TABLE \
+ QM_EXPORT_WORKSPACE \
+ QM_EXPORT_XML \
+ QT_ASCII_CAST_WARN \
+ QT_ASCII_CAST_WARN_CONSTRUCTOR \
+ QT_BEGIN_HEADER \
+ QT_DESIGNER_STATIC \
+ QT_END_HEADER \
+ QT_FASTCALL \
+ QT_WIDGET_PLUGIN_EXPORT \
+ Q_COMPAT_EXPORT \
+ Q_CORE_EXPORT \
+ Q_CORE_EXPORT_INLINE \
+ Q_EXPLICIT \
+ Q_EXPORT \
+ Q_EXPORT_CODECS_CN \
+ Q_EXPORT_CODECS_JP \
+ Q_EXPORT_CODECS_KR \
+ Q_EXPORT_PLUGIN \
+ Q_GFX_INLINE \
+ Q_AUTOTEST_EXPORT \
+ Q_GUI_EXPORT \
+ Q_GUI_EXPORT_INLINE \
+ Q_GUI_EXPORT_STYLE_CDE \
+ Q_GUI_EXPORT_STYLE_COMPACT \
+ Q_GUI_EXPORT_STYLE_MAC \
+ Q_GUI_EXPORT_STYLE_MOTIF \
+ Q_GUI_EXPORT_STYLE_MOTIFPLUS \
+ Q_GUI_EXPORT_STYLE_PLATINUM \
+ Q_GUI_EXPORT_STYLE_POCKETPC \
+ Q_GUI_EXPORT_STYLE_SGI \
+ Q_GUI_EXPORT_STYLE_WINDOWS \
+ Q_GUI_EXPORT_STYLE_WINDOWSXP \
+ QHELP_EXPORT \
+ Q_INLINE_TEMPLATE \
+ Q_INTERNAL_WIN_NO_THROW \
+ Q_NETWORK_EXPORT \
+ Q_OPENGL_EXPORT \
+ Q_OPENVG_EXPORT \
+ Q_OUTOFLINE_TEMPLATE \
+ Q_SQL_EXPORT \
+ Q_SVG_EXPORT \
+ Q_SCRIPT_EXPORT \
+ Q_SCRIPTTOOLS_EXPORT \
+ Q_TESTLIB_EXPORT \
+ Q_TYPENAME \
+ Q_XML_EXPORT \
+ Q_XMLSTREAM_EXPORT \
+ Q_XMLPATTERNS_EXPORT \
+ QDBUS_EXPORT \
+ Q_DBUS_EXPORT \
+ QT_BEGIN_NAMESPACE \
+ QT_BEGIN_INCLUDE_NAMESPACE \
+ QT_END_NAMESPACE \
+ QT_END_INCLUDE_NAMESPACE \
+ PHONON_EXPORT \
+ Q_DECLARATIVE_EXPORT \
+ Q_GADGET \
+ QWEBKIT_EXPORT \
+ Q_INVOKABLE
+Cpp.ignoredirectives = Q_DECLARE_HANDLE \
+ Q_DECLARE_INTERFACE \
+ Q_DECLARE_METATYPE \
+ Q_DECLARE_OPERATORS_FOR_FLAGS \
+ Q_DECLARE_PRIVATE \
+ Q_DECLARE_PUBLIC \
+ Q_DECLARE_SHARED \
+ Q_DECLARE_TR_FUNCTIONS \
+ Q_DECLARE_TYPEINFO \
+ Q_DISABLE_COPY \
+ QT_FORWARD_DECLARE_CLASS \
+ Q_DUMMY_COMPARISON_OPERATOR \
+ Q_ENUMS \
+ Q_FLAGS \
+ Q_INTERFACES \
+ __attribute__ \
+ K_DECLARE_PRIVATE \
+ PHONON_OBJECT \
+ PHONON_HEIR \
+ Q_PRIVATE_PROPERTY \
+ Q_DECLARE_PRIVATE_D \
+ Q_CLASSINFO
diff --git a/tools/qdoc3/doc/config/qt-defines.qdocconf b/tools/qdoc3/doc/config/qt-defines.qdocconf
new file mode 100644
index 0000000..50a355f
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-defines.qdocconf
@@ -0,0 +1,17 @@
+defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT_KEYPAD_NAVIGATION \
+ QT_NO_EGL \
+ QT3_SUPPORT \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ QT_DEPRECATED \
+ Q_NO_USING_KEYWORD \
+ __cplusplus
+
+versionsym = QT_VERSION_STR
+
+codeindent = 1
diff --git a/tools/qdoc3/doc/config/qt-html-default-styles.qdocconf b/tools/qdoc3/doc/config/qt-html-default-styles.qdocconf
new file mode 100644
index 0000000..47e550b
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-html-default-styles.qdocconf
@@ -0,0 +1,32 @@
+# Define the location of the templates to use. Style sheets and scripts are
+# specified relative to the template directory and will be copied into
+# subdirectories of the output directory.
+
+HTML.templatedir = .
+
+HTML.stylesheets = style/offline.css
+
+HTML.scripts =
+
+# Files not referenced in any qdoc file (last four needed by qtdemo)
+# See also qhp.Qt.extraFiles
+extraimages.HTML = qt-logo.png \
+ arrow_down.png \
+ breadcrumb.png \
+ bullet_gt.png \
+ bullet_dn.png \
+ bullet_sq.png \
+ bullet_up.png \
+ horBar.png \
+ sprites-combined.png
+
+# Include the style sheets and scripts used.
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/offline.css\" />\n"
+
+HTML.headerscripts =
+
+HTML.endheader = \
+ "</head>\n" \
+ "<body>\n"
diff --git a/tools/qdoc3/doc/config/qt-html-online-styles.qdocconf b/tools/qdoc3/doc/config/qt-html-online-styles.qdocconf
new file mode 100644
index 0000000..f915cb4
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-html-online-styles.qdocconf
@@ -0,0 +1,72 @@
+# Define the location of the templates to use. Style sheets and scripts are
+# specified relative to the template directory and will be copied into
+# subdirectories of the output directory.
+
+HTML.templatedir = .
+
+HTML.stylesheets = style/narrow.css \
+ style/style.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/superfish.css
+
+# Adding jquery and functions - providing online tools and search features
+HTML.scripts = scripts/functions.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ scripts/jquery.js
+
+
+# Files not referenced in any qdoc file.
+# See also qhp.Qt.extraFiles
+extraimages.HTML = qt-logo.png \
+ bg_l.png \
+ bg_l_blank.png \
+ bg_ll_blank.png \
+ bg_ul_blank.png \
+ header_bg.png \
+ bg_r.png \
+ box_bg.png \
+ breadcrumb.png \
+ bullet_gt.png \
+ bullet_dn.png \
+ bullet_sq.png \
+ bullet_up.png \
+ arrow_down.png \
+ feedbackground.png \
+ horBar.png \
+ page.png \
+ page_bg.png \
+ sprites-combined.png \
+ spinner.gif
+
+# Include the style sheets and scripts used.
+
+HTML.headerstyles = \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\" />\n" \
+ " <script src=\"scripts/jquery.js\" type=\"text/javascript\"></script>\n" \
+ " <script src=\"scripts/functions.js\" type=\"text/javascript\"></script>\n" \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/superfish.css\" />\n" \
+ " <link rel=\"stylesheet\" type=\"text/css\" href=\"style/narrow.css\" />\n" \
+ " <!--[if IE]>\n" \
+ "<meta name=\"MSSmartTagsPreventParsing\" content=\"true\">\n" \
+ "<meta http-equiv=\"imagetoolbar\" content=\"no\">\n" \
+ "<![endif]-->\n" \
+ "<!--[if lt IE 7]>\n" \
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie6.css\">\n" \
+ "<![endif]-->\n" \
+ "<!--[if IE 7]>\n" \
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie7.css\">\n" \
+ "<![endif]-->\n" \
+ "<!--[if IE 8]>\n" \
+ "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style_ie8.css\">\n" \
+ "<![endif]-->\n\n"
+
+HTML.headerscripts = \
+ "<script src=\"scripts/superfish.js\" type=\"text/javascript\"></script>\n" \
+ "<script src=\"scripts/narrow.js\" type=\"text/javascript\"></script>\n\n"
+
+HTML.endheader = \
+ "</head>\n" \
+ "<body class=\"\" onload=\"CheckEmptyAndLoadList();\">\n"
diff --git a/tools/qdoc3/doc/config/qt-html-templates-online.qdocconf b/tools/qdoc3/doc/config/qt-html-templates-online.qdocconf
new file mode 100644
index 0000000..cbf8851
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-html-templates-online.qdocconf
@@ -0,0 +1,115 @@
+include(qt-html-online-styles.qdocconf)
+
+HTML.postheader = \
+ " <div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"content\"> \n" \
+ " <div id=\"nav-logo\">\n" \
+ " <a href=\"index.html\">Home</a></div>\n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>QDoc Reference Documentation</span></a>\n" \
+ " <div id=\"narrowsearch\"></div>\n" \
+ " <div id=\"nav-topright\">\n" \
+ " <ul>\n" \
+ " <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \
+ " <li class=\"nav-topright-dev\"><a href=\"http://developer.qt.nokia.com/\">DEV</a></li>\n" \
+ " <li class=\"nav-topright-labs\"><a href=\"http://labs.qt.nokia.com/blogs/\">LABS</a></li>\n" \
+ " <li class=\"nav-topright-doc nav-topright-doc-active\"><a href=\"http://doc.qt.nokia.com/\">\n" \
+ " DOC</a></li>\n" \
+ " <li class=\"nav-topright-blog\"><a href=\"http://blog.qt.nokia.com/\">BLOG</a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " <div id=\"shortCut\">\n" \
+ " <ul>\n" \
+ " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.7</a></span></li>\n" \
+ " <li class=\"shortCut-topleft-active\"><a href=\"http://doc.qt.nokia.com\">ALL VERSIONS" \
+ " </a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"wrapper\">\n" \
+ " <div class=\"hd\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ " <div class=\"bd group\">\n" \
+ " <div class=\"wrap\">\n" \
+ " <div class=\"toolbar\">\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Breadcrumbs go here -->\n"
+
+HTML.postpostheader = \
+ " </ul>\n" \
+ " </div>\n" \
+ " <div class=\"toolbuttons toolblock\">\n" \
+ " <ul>\n" \
+ " <li id=\"smallA\" class=\"t_button\">A</li>\n" \
+ " <li id=\"medA\" class=\"t_button active\">A</li>\n" \
+ " <li id=\"bigA\" class=\"t_button\">A</li>\n" \
+ " <li id=\"print\" class=\"t_button\"><a href=\"javascript:this.print();\">\n" \
+ " <span>Print</span></a></li>\n" \
+ " </ul>\n" \
+ " </div>\n" \
+ " </div>\n" \
+ " <div class=\"content mainContent\">\n"
+
+HTML.footer = \
+ " </div>\n" \
+ " </div>\n" \
+ " </div> \n" \
+ " <div class=\"ft\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ " </div> \n" \
+ " <div class=\"footer\">\n" \
+ " <p>\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2008-2011 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ " </div>\n"
+
+
+# Files not referenced in any qdoc file.
+# See also extraimages.HTML
+qhp.QDoc.extraFiles = index.html \
+ images/bg_l.png \
+ images/bg_l_blank.png \
+ images/bg_ll_blank.png \
+ images/bg_ul_blank.png \
+ images/header_bg.png \
+ images/bg_r.png \
+ images/box_bg.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/arrow_down.png \
+ images/feedbackground.png \
+ images/horBar.png \
+ images/page.png \
+ images/page_bg.png \
+ images/sprites-combined.png \
+ images/spinner.gif \
+ scripts/functions.js \
+ scripts/jquery.js \
+ scripts/narrow.js \
+ scripts/superfish.js \
+ style/narrow.css \
+ style/superfish.css \
+ style/style_ie6.css \
+ style/style_ie7.css \
+ style/style_ie8.css \
+ style/style.css
diff --git a/tools/qdoc3/doc/config/qt-html-templates.qdocconf b/tools/qdoc3/doc/config/qt-html-templates.qdocconf
new file mode 100644
index 0000000..e0dc875
--- /dev/null
+++ b/tools/qdoc3/doc/config/qt-html-templates.qdocconf
@@ -0,0 +1,54 @@
+include(qt-html-default-styles.qdocconf)
+
+HTML.postheader = \
+ "<div class=\"header\" id=\"qtdocheader\">\n" \
+ " <div class=\"content\"> \n" \
+ " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
+ " </div>\n" \
+ " <div class=\"breadcrumb toolblock\">\n" \
+ " <ul>\n" \
+ " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
+ " <!-- Breadcrumbs go here -->\n"
+
+HTML.postpostheader = \
+ " </ul>\n" \
+ " </div>\n" \
+ "</div>\n" \
+ "<div class=\"content mainContent\">\n"
+
+HTML.footer = \
+ " <div class=\"ft\">\n" \
+ " <span></span>\n" \
+ " </div>\n" \
+ "</div> \n" \
+ "<div class=\"footer\">\n" \
+ " <p>\n" \
+ " <acronym title=\"Copyright\">&copy;</acronym> 2008-2011 Nokia Corporation and/or its\n" \
+ " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
+ " in Finland and/or other countries worldwide.</p>\n" \
+ " <p>\n" \
+ " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
+ " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
+ " <br />\n" \
+ " <p>\n" \
+ " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
+ " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
+ " with the terms contained in a written agreement between you and Nokia.</p>\n" \
+ " <p>\n" \
+ " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
+ " Free Documentation License version 1.3</a>\n" \
+ " as published by the Free Software Foundation.</p>\n" \
+ "</div>\n" \
+
+# Files not referenced in any qdoc file.
+# See also extraimages.HTML
+qhp.QDoc.extraFiles = index.html \
+ images/arrow_down.png \
+ images/breadcrumb.png \
+ images/bullet_gt.png \
+ images/bullet_dn.png \
+ images/bullet_sq.png \
+ images/bullet_up.png \
+ images/horBar.png \
+ images/sprites-combined.png \
+ style/offline.css
diff --git a/tools/qdoc3/doc/config/scripts/functions.js b/tools/qdoc3/doc/config/scripts/functions.js
new file mode 100755
index 0000000..62bc535
--- /dev/null
+++ b/tools/qdoc3/doc/config/scripts/functions.js
@@ -0,0 +1,258 @@
+// Removing search results
+function hideSearchResults() {
+/* hiding search results as the user clicks on the different categories */
+ $('#resultdialog').removeClass('active');
+ $("#resultlist").removeClass().addClass('all');
+ $("#resultlinks").removeClass().addClass('all');
+ $("#searchcount").removeClass().addClass('all');
+}
+/* closing the searhc result dialog */
+$('#resultclose').click(function(e) {
+ e.preventDefault();
+ hideSearchResults();
+});
+
+$(document.body).click(function() {
+});
+
+/* START non link areas where cursor should change to pointing hand */
+$('.t_button').mouseover(function() {
+ $('.t_button').css('cursor','pointer');
+});
+/* END non link areas */
+/* Changing font size to smaller */
+$('#smallA').click(function() {
+ $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('font-size','smaller');
+ $('.t_button').removeClass('active')
+ $(this).addClass('active')
+});
+
+/* Reset font size */
+$('#medA').click(function() {
+ $('.mainContent .heading').css('font','600 16px/1 Arial');
+ $('.mainContent h1').css('font','600 18px/1.2 Arial');
+ $('.mainContent h2').css('font','600 16px/1.2 Arial');
+ $('.mainContent h3').css('font','600 14px/1.2 Arial');
+ $('.mainContent p').css('font','13px/20px Verdana');
+ $('.mainContent li').css('font','400 13px/1 Verdana');
+ $('.mainContent li').css('line-height','14px');
+ $('.mainContent .toc li').css('font', 'normal 10px/1.2 Verdana');
+ $('.mainContent table').css('font','13px/1.2 Verdana');
+ $('.mainContent .heading').css('font','600 16px/1 Arial');
+ $('.mainContent .indexboxcont li').css('font','600 13px/1 Verdana');
+ $('.t_button').removeClass('active')
+ $(this).addClass('active')
+});
+/* Changing font size to bigger */
+$('#bigA').click(function() {
+ $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('font-size','large');
+ $('.mainContent .heading,.mainContent h1, .mainContent h2, .mainContent h3, .mainContent p, .mainContent li, .mainContent table').css('line-height','25px');
+ $('.t_button').removeClass('active')
+ $(this).addClass('active')
+});
+
+/* Show page content after closing feedback box */
+$('.feedclose').click(function() {
+ $('.bd').show();
+ $('.hd').show();
+ $('.footer').show();
+ $('#feedbackBox').hide();
+ $('#blurpage').hide();
+});
+
+/* Hide page content and show feedback box */
+$('.feedback').click(function() {
+ $('.bd').hide();
+ $('.hd').hide();
+ $('.footer').hide();
+ $('#feedbackBox').show();
+ $('#blurpage').show();
+});
+/* Default search URL */
+var qturl = "";
+
+/* The next function handles the response data (in xml) returned by the search engine */
+
+// Process data sent back from the server. The data is structured as a XML.
+/*
+XML structure handled by function processNokiaData()
+<page> - container for each page returned
+<pageWords/> - contains keywords
+<pageTitle/> - contains page title/header content
+<pageUrl/> - contains page URL - URL relative to root
+<pageType> - contains page type - APIPage/Article/Example
+</page>
+*/
+
+
+function processNokiaData(response){
+/* fetch the responce from the server using page as the root element */
+ var propertyTags = response.getElementsByTagName('page');
+ /* reset counters */
+ var apiCount = 0;
+ var articleCount = 0;
+ var exampleCount = 0;
+ var full_li_element;
+
+/* remove any old results */
+ $('#resultlist li').remove();
+
+
+ /* running through the elements in the xml structure */
+ for (var i=0; i<propertyTags.length; i++) {
+ /* for every element named pageWords*/
+ for (var j=0; j< propertyTags[i].getElementsByTagName('pageWords').length; j++) {
+ /* start a new list element */
+ full_li_element = '<li';
+ /* if the pageType element reads APIPage, add class name api */
+ if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'APIPage') {
+ full_li_element += ' class="api"';
+ apiCount++;
+ }
+ /* if the pageType element reads Article, add class name article */
+ else if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Article') {
+ full_li_element += ' class="article"';
+ articleCount++;
+ }
+ /* if the pageType element reads Example, add class name example */
+ else if (propertyTags[i].getElementsByTagName('pageType')[0].firstChild.nodeValue == 'Example') {
+ full_li_element += ' class="example"';
+ exampleCount++;
+ }
+ /* adding the link element*/
+ full_li_element += '><a href="'+qturl;
+ /* adding the URL attribute*/
+ full_li_element += propertyTags[i].getElementsByTagName('pageUrl')[j].firstChild.nodeValue;
+ /* adding the link title and closing the link and list elements */
+ full_li_element += '">' + propertyTags[i].getElementsByTagName('pageWords')[0].firstChild.nodeValue + '</a></li>';
+ /* appending the list element to the #resultlist div*/
+ $('#resultlist').append(full_li_element);
+ }
+ }
+
+ /* if the result is not empty */
+ if (propertyTags.length > 0) {
+ /* add class name active to show the dialog */
+ $('#resultdialog').addClass('active');
+ /* setting number of hits*/
+ $('#resultcount').html(propertyTags.length);
+ $('#apicount').html(apiCount);
+ $('#articlecount').html(articleCount);
+ $('#examplecount').html(exampleCount);
+
+ }
+ else {
+ $('#pageType').addClass('red');
+ }
+
+
+
+ // Filtering results in display
+ $('p#resultlinks a').click(function(e) {
+ e.preventDefault();
+ // Displays API ref pages
+ if (this.id == "showapiresults") {
+ $("#resultlist").removeClass().addClass('api');
+ $("#resultlinks").removeClass().addClass('api');
+ $("#searchcount").removeClass().addClass('api');
+ }
+ // Displays Articles
+ else if (this.id == "showarticleresults") {
+ $("#resultlist").removeClass().addClass('article');
+ $("#resultlinks").removeClass().addClass('article');
+ $("#searchcount").removeClass().addClass('article');
+ }
+ // Displays Examples
+ if (this.id == "showexampleresults") {
+ $("#resultlist").removeClass().addClass('example');
+ $("#resultlinks").removeClass().addClass('example');
+ $("#searchcount").removeClass().addClass('example');
+ }
+ // Displays All
+ if (this.id == "showallresults") {
+ $("#resultlist").removeClass().addClass('all');
+ $("#resultlinks").removeClass().addClass('all');
+ $("#searchcount").removeClass().addClass('all');
+ }
+ });
+}
+
+//build regular expression object to find empty string or any number of blank
+var blankRE=/^\s*$/;
+
+
+function CheckEmptyAndLoadList()
+{
+ /* Start Extracting information for feedback and adding this to the feedback form */
+ var pageUrl = window.location.href;
+ var pageVal = $('title').html();
+ $('#pageType').removeClass('red');
+ $('#feedUrl').remove();
+ $('#pageVal').remove();
+ $('.menuAlert').remove();
+ $('#feedform').append('<input id="feedUrl" name="feedUrl" value="'+pageUrl+'" style="display:none;">');
+ $('#feedform').append('<input id="pageVal" name="pageVal" value="'+pageVal+'" style="display:none;">');
+ /* End Extracting information for feedback and adding this to the feedback form */
+
+ /* extracts search query */
+ var value = document.getElementById('pageType').value;
+ /* if the search is less than three chars long remove class names and remove elements from old search*/
+ if((blankRE.test(value)) || (value.length < 3))
+ {
+ $('#resultdialog').removeClass('active');
+ $('#resultlist li').remove();
+ }
+}
+
+// Loads on doc ready - prepares search
+ $(document).ready(function () {
+ /* fetch page title*/
+ var pageTitle = $('title').html();
+ /* getting content from search box */
+ var currentString = $('#pageType').val() ;
+ /* if the search box is not empty run CheckEmptyAndLoadList*/
+ if(currentString.length < 1){
+ CheckEmptyAndLoadList();
+ }
+
+ /* on key-up in the search box execute the following */
+ $('#pageType').keyup(function () {
+ /* extract the search box content */
+ var searchString = $('#pageType').val() ;
+ /* if the string is less than three characters */
+ if ((searchString == null) || (searchString.length < 3)) {
+ /* remove classes and elements*/
+ $('#pageType').removeClass('loading');
+ $('.searching').remove();
+ /* run CheckEmptyAndLoadList */
+ CheckEmptyAndLoadList();
+
+ $('.report').remove();
+ return;
+ }
+ /* if timer checks out */
+ if (this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(function () {
+ /* add loading image by adding loading class */
+ $('#pageType').addClass('loading');
+ $('.searching').remove();
+
+ /* run the actual search */
+ $.ajax({
+ contentType: "application/x-www-form-urlencoded",
+ url: 'http://' + location.host + '/nokiasearch/GetDataServlet',
+ data: 'searchString='+searchString,
+ dataType:'xml',
+ type: 'post',
+ success: function (response, textStatus) {
+ /* on success remove loading img */
+ $('.searching').remove();
+ $('#pageType').removeClass('loading');
+
+ processNokiaData(response);
+
+ }
+ });
+ }, 500); /* timer set to 500 ms */
+ });
+ }); \ No newline at end of file
diff --git a/tools/qdoc3/doc/config/scripts/jquery.js b/tools/qdoc3/doc/config/scripts/jquery.js
new file mode 100755
index 0000000..0c7294c
--- /dev/null
+++ b/tools/qdoc3/doc/config/scripts/jquery.js
@@ -0,0 +1,152 @@
+/*!
+ * jQuery JavaScript Library v1.4.1
+ * http://jquery.com/
+ *
+ * Copyright 2010, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2010, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Mon Jan 25 19:43:33 2010 -0500
+ */
+(function(z,v){function la(){if(!c.isReady){try{r.documentElement.doScroll("left")}catch(a){setTimeout(la,1);return}c.ready()}}function Ma(a,b){b.src?c.ajax({url:b.src,async:false,dataType:"script"}):c.globalEval(b.text||b.textContent||b.innerHTML||"");b.parentNode&&b.parentNode.removeChild(b)}function X(a,b,d,f,e,i){var j=a.length;if(typeof b==="object"){for(var n in b)X(a,n,b[n],f,e,d);return a}if(d!==v){f=!i&&f&&c.isFunction(d);for(n=0;n<j;n++)e(a[n],b,f?d.call(a[n],n,e(a[n],b)):d,i);return a}return j?
+e(a[0],b):null}function J(){return(new Date).getTime()}function Y(){return false}function Z(){return true}function ma(a,b,d){d[0].type=a;return c.event.handle.apply(b,d)}function na(a){var b,d=[],f=[],e=arguments,i,j,n,o,m,s,x=c.extend({},c.data(this,"events").live);if(!(a.button&&a.type==="click")){for(o in x){j=x[o];if(j.live===a.type||j.altLive&&c.inArray(a.type,j.altLive)>-1){i=j.data;i.beforeFilter&&i.beforeFilter[a.type]&&!i.beforeFilter[a.type](a)||f.push(j.selector)}else delete x[o]}i=c(a.target).closest(f,
+a.currentTarget);m=0;for(s=i.length;m<s;m++)for(o in x){j=x[o];n=i[m].elem;f=null;if(i[m].selector===j.selector){if(j.live==="mouseenter"||j.live==="mouseleave")f=c(a.relatedTarget).closest(j.selector)[0];if(!f||f!==n)d.push({elem:n,fn:j})}}m=0;for(s=d.length;m<s;m++){i=d[m];a.currentTarget=i.elem;a.data=i.fn.data;if(i.fn.apply(i.elem,e)===false){b=false;break}}return b}}function oa(a,b){return"live."+(a?a+".":"")+b.replace(/\./g,"`").replace(/ /g,"&")}function pa(a){return!a||!a.parentNode||a.parentNode.nodeType===
+11}function qa(a,b){var d=0;b.each(function(){if(this.nodeName===(a[d]&&a[d].nodeName)){var f=c.data(a[d++]),e=c.data(this,f);if(f=f&&f.events){delete e.handle;e.events={};for(var i in f)for(var j in f[i])c.event.add(this,i,f[i][j],f[i][j].data)}}})}function ra(a,b,d){var f,e,i;if(a.length===1&&typeof a[0]==="string"&&a[0].length<512&&a[0].indexOf("<option")<0&&(c.support.checkClone||!sa.test(a[0]))){e=true;if(i=c.fragments[a[0]])if(i!==1)f=i}if(!f){b=b&&b[0]?b[0].ownerDocument||b[0]:r;f=b.createDocumentFragment();
+c.clean(a,b,f,d)}if(e)c.fragments[a[0]]=i?f:1;return{fragment:f,cacheable:e}}function K(a,b){var d={};c.each(ta.concat.apply([],ta.slice(0,b)),function(){d[this]=a});return d}function ua(a){return"scrollTo"in a&&a.document?a:a.nodeType===9?a.defaultView||a.parentWindow:false}var c=function(a,b){return new c.fn.init(a,b)},Na=z.jQuery,Oa=z.$,r=z.document,S,Pa=/^[^<]*(<[\w\W]+>)[^>]*$|^#([\w-]+)$/,Qa=/^.[^:#\[\.,]*$/,Ra=/\S/,Sa=/^(\s|\u00A0)+|(\s|\u00A0)+$/g,Ta=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,O=navigator.userAgent,
+va=false,P=[],L,$=Object.prototype.toString,aa=Object.prototype.hasOwnProperty,ba=Array.prototype.push,Q=Array.prototype.slice,wa=Array.prototype.indexOf;c.fn=c.prototype={init:function(a,b){var d,f;if(!a)return this;if(a.nodeType){this.context=this[0]=a;this.length=1;return this}if(typeof a==="string")if((d=Pa.exec(a))&&(d[1]||!b))if(d[1]){f=b?b.ownerDocument||b:r;if(a=Ta.exec(a))if(c.isPlainObject(b)){a=[r.createElement(a[1])];c.fn.attr.call(a,b,true)}else a=[f.createElement(a[1])];else{a=ra([d[1]],
+[f]);a=(a.cacheable?a.fragment.cloneNode(true):a.fragment).childNodes}}else{if(b=r.getElementById(d[2])){if(b.id!==d[2])return S.find(a);this.length=1;this[0]=b}this.context=r;this.selector=a;return this}else if(!b&&/^\w+$/.test(a)){this.selector=a;this.context=r;a=r.getElementsByTagName(a)}else return!b||b.jquery?(b||S).find(a):c(b).find(a);else if(c.isFunction(a))return S.ready(a);if(a.selector!==v){this.selector=a.selector;this.context=a.context}return c.isArray(a)?this.setArray(a):c.makeArray(a,
+this)},selector:"",jquery:"1.4.1",length:0,size:function(){return this.length},toArray:function(){return Q.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this.slice(a)[0]:this[a]},pushStack:function(a,b,d){a=c(a||null);a.prevObject=this;a.context=this.context;if(b==="find")a.selector=this.selector+(this.selector?" ":"")+d;else if(b)a.selector=this.selector+"."+b+"("+d+")";return a},setArray:function(a){this.length=0;ba.apply(this,a);return this},each:function(a,b){return c.each(this,
+a,b)},ready:function(a){c.bindReady();if(c.isReady)a.call(r,c);else P&&P.push(a);return this},eq:function(a){return a===-1?this.slice(a):this.slice(a,+a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(Q.apply(this,arguments),"slice",Q.call(arguments).join(","))},map:function(a){return this.pushStack(c.map(this,function(b,d){return a.call(b,d,b)}))},end:function(){return this.prevObject||c(null)},push:ba,sort:[].sort,splice:[].splice};
+c.fn.init.prototype=c.fn;c.extend=c.fn.extend=function(){var a=arguments[0]||{},b=1,d=arguments.length,f=false,e,i,j,n;if(typeof a==="boolean"){f=a;a=arguments[1]||{};b=2}if(typeof a!=="object"&&!c.isFunction(a))a={};if(d===b){a=this;--b}for(;b<d;b++)if((e=arguments[b])!=null)for(i in e){j=a[i];n=e[i];if(a!==n)if(f&&n&&(c.isPlainObject(n)||c.isArray(n))){j=j&&(c.isPlainObject(j)||c.isArray(j))?j:c.isArray(n)?[]:{};a[i]=c.extend(f,j,n)}else if(n!==v)a[i]=n}return a};c.extend({noConflict:function(a){z.$=
+Oa;if(a)z.jQuery=Na;return c},isReady:false,ready:function(){if(!c.isReady){if(!r.body)return setTimeout(c.ready,13);c.isReady=true;if(P){for(var a,b=0;a=P[b++];)a.call(r,c);P=null}c.fn.triggerHandler&&c(r).triggerHandler("ready")}},bindReady:function(){if(!va){va=true;if(r.readyState==="complete")return c.ready();if(r.addEventListener){r.addEventListener("DOMContentLoaded",L,false);z.addEventListener("load",c.ready,false)}else if(r.attachEvent){r.attachEvent("onreadystatechange",L);z.attachEvent("onload",
+c.ready);var a=false;try{a=z.frameElement==null}catch(b){}r.documentElement.doScroll&&a&&la()}}},isFunction:function(a){return $.call(a)==="[object Function]"},isArray:function(a){return $.call(a)==="[object Array]"},isPlainObject:function(a){if(!a||$.call(a)!=="[object Object]"||a.nodeType||a.setInterval)return false;if(a.constructor&&!aa.call(a,"constructor")&&!aa.call(a.constructor.prototype,"isPrototypeOf"))return false;var b;for(b in a);return b===v||aa.call(a,b)},isEmptyObject:function(a){for(var b in a)return false;
+return true},error:function(a){throw a;},parseJSON:function(a){if(typeof a!=="string"||!a)return null;if(/^[\],:{}\s]*$/.test(a.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return z.JSON&&z.JSON.parse?z.JSON.parse(a):(new Function("return "+a))();else c.error("Invalid JSON: "+a)},noop:function(){},globalEval:function(a){if(a&&Ra.test(a)){var b=r.getElementsByTagName("head")[0]||
+r.documentElement,d=r.createElement("script");d.type="text/javascript";if(c.support.scriptEval)d.appendChild(r.createTextNode(a));else d.text=a;b.insertBefore(d,b.firstChild);b.removeChild(d)}},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,b,d){var f,e=0,i=a.length,j=i===v||c.isFunction(a);if(d)if(j)for(f in a){if(b.apply(a[f],d)===false)break}else for(;e<i;){if(b.apply(a[e++],d)===false)break}else if(j)for(f in a){if(b.call(a[f],f,a[f])===false)break}else for(d=
+a[0];e<i&&b.call(d,e,d)!==false;d=a[++e]);return a},trim:function(a){return(a||"").replace(Sa,"")},makeArray:function(a,b){b=b||[];if(a!=null)a.length==null||typeof a==="string"||c.isFunction(a)||typeof a!=="function"&&a.setInterval?ba.call(b,a):c.merge(b,a);return b},inArray:function(a,b){if(b.indexOf)return b.indexOf(a);for(var d=0,f=b.length;d<f;d++)if(b[d]===a)return d;return-1},merge:function(a,b){var d=a.length,f=0;if(typeof b.length==="number")for(var e=b.length;f<e;f++)a[d++]=b[f];else for(;b[f]!==
+v;)a[d++]=b[f++];a.length=d;return a},grep:function(a,b,d){for(var f=[],e=0,i=a.length;e<i;e++)!d!==!b(a[e],e)&&f.push(a[e]);return f},map:function(a,b,d){for(var f=[],e,i=0,j=a.length;i<j;i++){e=b(a[i],i,d);if(e!=null)f[f.length]=e}return f.concat.apply([],f)},guid:1,proxy:function(a,b,d){if(arguments.length===2)if(typeof b==="string"){d=a;a=d[b];b=v}else if(b&&!c.isFunction(b)){d=b;b=v}if(!b&&a)b=function(){return a.apply(d||this,arguments)};if(a)b.guid=a.guid=a.guid||b.guid||c.guid++;return b},
+uaMatch:function(a){a=a.toLowerCase();a=/(webkit)[ \/]([\w.]+)/.exec(a)||/(opera)(?:.*version)?[ \/]([\w.]+)/.exec(a)||/(msie) ([\w.]+)/.exec(a)||!/compatible/.test(a)&&/(mozilla)(?:.*? rv:([\w.]+))?/.exec(a)||[];return{browser:a[1]||"",version:a[2]||"0"}},browser:{}});O=c.uaMatch(O);if(O.browser){c.browser[O.browser]=true;c.browser.version=O.version}if(c.browser.webkit)c.browser.safari=true;if(wa)c.inArray=function(a,b){return wa.call(b,a)};S=c(r);if(r.addEventListener)L=function(){r.removeEventListener("DOMContentLoaded",
+L,false);c.ready()};else if(r.attachEvent)L=function(){if(r.readyState==="complete"){r.detachEvent("onreadystatechange",L);c.ready()}};(function(){c.support={};var a=r.documentElement,b=r.createElement("script"),d=r.createElement("div"),f="script"+J();d.style.display="none";d.innerHTML=" <link/><table></table><a href='/a' style='color:red;float:left;opacity:.55;'>a</a><input type='checkbox'/>";var e=d.getElementsByTagName("*"),i=d.getElementsByTagName("a")[0];if(!(!e||!e.length||!i)){c.support=
+{leadingWhitespace:d.firstChild.nodeType===3,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/red/.test(i.getAttribute("style")),hrefNormalized:i.getAttribute("href")==="/a",opacity:/^0.55$/.test(i.style.opacity),cssFloat:!!i.style.cssFloat,checkOn:d.getElementsByTagName("input")[0].value==="on",optSelected:r.createElement("select").appendChild(r.createElement("option")).selected,checkClone:false,scriptEval:false,noCloneEvent:true,boxModel:null};
+b.type="text/javascript";try{b.appendChild(r.createTextNode("window."+f+"=1;"))}catch(j){}a.insertBefore(b,a.firstChild);if(z[f]){c.support.scriptEval=true;delete z[f]}a.removeChild(b);if(d.attachEvent&&d.fireEvent){d.attachEvent("onclick",function n(){c.support.noCloneEvent=false;d.detachEvent("onclick",n)});d.cloneNode(true).fireEvent("onclick")}d=r.createElement("div");d.innerHTML="<input type='radio' name='radiotest' checked='checked'/>";a=r.createDocumentFragment();a.appendChild(d.firstChild);
+c.support.checkClone=a.cloneNode(true).cloneNode(true).lastChild.checked;c(function(){var n=r.createElement("div");n.style.width=n.style.paddingLeft="1px";r.body.appendChild(n);c.boxModel=c.support.boxModel=n.offsetWidth===2;r.body.removeChild(n).style.display="none"});a=function(n){var o=r.createElement("div");n="on"+n;var m=n in o;if(!m){o.setAttribute(n,"return;");m=typeof o[n]==="function"}return m};c.support.submitBubbles=a("submit");c.support.changeBubbles=a("change");a=b=d=e=i=null}})();c.props=
+{"for":"htmlFor","class":"className",readonly:"readOnly",maxlength:"maxLength",cellspacing:"cellSpacing",rowspan:"rowSpan",colspan:"colSpan",tabindex:"tabIndex",usemap:"useMap",frameborder:"frameBorder"};var G="jQuery"+J(),Ua=0,xa={},Va={};c.extend({cache:{},expando:G,noData:{embed:true,object:true,applet:true},data:function(a,b,d){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var f=a[G],e=c.cache;if(!b&&!f)return null;f||(f=++Ua);if(typeof b==="object"){a[G]=f;e=e[f]=c.extend(true,
+{},b)}else e=e[f]?e[f]:typeof d==="undefined"?Va:(e[f]={});if(d!==v){a[G]=f;e[b]=d}return typeof b==="string"?e[b]:e}},removeData:function(a,b){if(!(a.nodeName&&c.noData[a.nodeName.toLowerCase()])){a=a==z?xa:a;var d=a[G],f=c.cache,e=f[d];if(b){if(e){delete e[b];c.isEmptyObject(e)&&c.removeData(a)}}else{try{delete a[G]}catch(i){a.removeAttribute&&a.removeAttribute(G)}delete f[d]}}}});c.fn.extend({data:function(a,b){if(typeof a==="undefined"&&this.length)return c.data(this[0]);else if(typeof a==="object")return this.each(function(){c.data(this,
+a)});var d=a.split(".");d[1]=d[1]?"."+d[1]:"";if(b===v){var f=this.triggerHandler("getData"+d[1]+"!",[d[0]]);if(f===v&&this.length)f=c.data(this[0],a);return f===v&&d[1]?this.data(d[0]):f}else return this.trigger("setData"+d[1]+"!",[d[0],b]).each(function(){c.data(this,a,b)})},removeData:function(a){return this.each(function(){c.removeData(this,a)})}});c.extend({queue:function(a,b,d){if(a){b=(b||"fx")+"queue";var f=c.data(a,b);if(!d)return f||[];if(!f||c.isArray(d))f=c.data(a,b,c.makeArray(d));else f.push(d);
+return f}},dequeue:function(a,b){b=b||"fx";var d=c.queue(a,b),f=d.shift();if(f==="inprogress")f=d.shift();if(f){b==="fx"&&d.unshift("inprogress");f.call(a,function(){c.dequeue(a,b)})}}});c.fn.extend({queue:function(a,b){if(typeof a!=="string"){b=a;a="fx"}if(b===v)return c.queue(this[0],a);return this.each(function(){var d=c.queue(this,a,b);a==="fx"&&d[0]!=="inprogress"&&c.dequeue(this,a)})},dequeue:function(a){return this.each(function(){c.dequeue(this,a)})},delay:function(a,b){a=c.fx?c.fx.speeds[a]||
+a:a;b=b||"fx";return this.queue(b,function(){var d=this;setTimeout(function(){c.dequeue(d,b)},a)})},clearQueue:function(a){return this.queue(a||"fx",[])}});var ya=/[\n\t]/g,ca=/\s+/,Wa=/\r/g,Xa=/href|src|style/,Ya=/(button|input)/i,Za=/(button|input|object|select|textarea)/i,$a=/^(a|area)$/i,za=/radio|checkbox/;c.fn.extend({attr:function(a,b){return X(this,a,b,true,c.attr)},removeAttr:function(a){return this.each(function(){c.attr(this,a,"");this.nodeType===1&&this.removeAttribute(a)})},addClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=
+c(this);m.addClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string")for(var b=(a||"").split(ca),d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1)if(e.className)for(var i=" "+e.className+" ",j=0,n=b.length;j<n;j++){if(i.indexOf(" "+b[j]+" ")<0)e.className+=" "+b[j]}else e.className=a}return this},removeClass:function(a){if(c.isFunction(a))return this.each(function(o){var m=c(this);m.removeClass(a.call(this,o,m.attr("class")))});if(a&&typeof a==="string"||a===v)for(var b=(a||"").split(ca),
+d=0,f=this.length;d<f;d++){var e=this[d];if(e.nodeType===1&&e.className)if(a){for(var i=(" "+e.className+" ").replace(ya," "),j=0,n=b.length;j<n;j++)i=i.replace(" "+b[j]+" "," ");e.className=i.substring(1,i.length-1)}else e.className=""}return this},toggleClass:function(a,b){var d=typeof a,f=typeof b==="boolean";if(c.isFunction(a))return this.each(function(e){var i=c(this);i.toggleClass(a.call(this,e,i.attr("class"),b),b)});return this.each(function(){if(d==="string")for(var e,i=0,j=c(this),n=b,o=
+a.split(ca);e=o[i++];){n=f?n:!j.hasClass(e);j[n?"addClass":"removeClass"](e)}else if(d==="undefined"||d==="boolean"){this.className&&c.data(this,"__className__",this.className);this.className=this.className||a===false?"":c.data(this,"__className__")||""}})},hasClass:function(a){a=" "+a+" ";for(var b=0,d=this.length;b<d;b++)if((" "+this[b].className+" ").replace(ya," ").indexOf(a)>-1)return true;return false},val:function(a){if(a===v){var b=this[0];if(b){if(c.nodeName(b,"option"))return(b.attributes.value||
+{}).specified?b.value:b.text;if(c.nodeName(b,"select")){var d=b.selectedIndex,f=[],e=b.options;b=b.type==="select-one";if(d<0)return null;var i=b?d:0;for(d=b?d+1:e.length;i<d;i++){var j=e[i];if(j.selected){a=c(j).val();if(b)return a;f.push(a)}}return f}if(za.test(b.type)&&!c.support.checkOn)return b.getAttribute("value")===null?"on":b.value;return(b.value||"").replace(Wa,"")}return v}var n=c.isFunction(a);return this.each(function(o){var m=c(this),s=a;if(this.nodeType===1){if(n)s=a.call(this,o,m.val());
+if(typeof s==="number")s+="";if(c.isArray(s)&&za.test(this.type))this.checked=c.inArray(m.val(),s)>=0;else if(c.nodeName(this,"select")){var x=c.makeArray(s);c("option",this).each(function(){this.selected=c.inArray(c(this).val(),x)>=0});if(!x.length)this.selectedIndex=-1}else this.value=s}})}});c.extend({attrFn:{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true},attr:function(a,b,d,f){if(!a||a.nodeType===3||a.nodeType===8)return v;if(f&&b in c.attrFn)return c(a)[b](d);
+f=a.nodeType!==1||!c.isXMLDoc(a);var e=d!==v;b=f&&c.props[b]||b;if(a.nodeType===1){var i=Xa.test(b);if(b in a&&f&&!i){if(e){b==="type"&&Ya.test(a.nodeName)&&a.parentNode&&c.error("type property can't be changed");a[b]=d}if(c.nodeName(a,"form")&&a.getAttributeNode(b))return a.getAttributeNode(b).nodeValue;if(b==="tabIndex")return(b=a.getAttributeNode("tabIndex"))&&b.specified?b.value:Za.test(a.nodeName)||$a.test(a.nodeName)&&a.href?0:v;return a[b]}if(!c.support.style&&f&&b==="style"){if(e)a.style.cssText=
+""+d;return a.style.cssText}e&&a.setAttribute(b,""+d);a=!c.support.hrefNormalized&&f&&i?a.getAttribute(b,2):a.getAttribute(b);return a===null?v:a}return c.style(a,b,d)}});var ab=function(a){return a.replace(/[^\w\s\.\|`]/g,function(b){return"\\"+b})};c.event={add:function(a,b,d,f){if(!(a.nodeType===3||a.nodeType===8)){if(a.setInterval&&a!==z&&!a.frameElement)a=z;if(!d.guid)d.guid=c.guid++;if(f!==v){d=c.proxy(d);d.data=f}var e=c.data(a,"events")||c.data(a,"events",{}),i=c.data(a,"handle"),j;if(!i){j=
+function(){return typeof c!=="undefined"&&!c.event.triggered?c.event.handle.apply(j.elem,arguments):v};i=c.data(a,"handle",j)}if(i){i.elem=a;b=b.split(/\s+/);for(var n,o=0;n=b[o++];){var m=n.split(".");n=m.shift();if(o>1){d=c.proxy(d);if(f!==v)d.data=f}d.type=m.slice(0).sort().join(".");var s=e[n],x=this.special[n]||{};if(!s){s=e[n]={};if(!x.setup||x.setup.call(a,f,m,d)===false)if(a.addEventListener)a.addEventListener(n,i,false);else a.attachEvent&&a.attachEvent("on"+n,i)}if(x.add)if((m=x.add.call(a,
+d,f,m,s))&&c.isFunction(m)){m.guid=m.guid||d.guid;m.data=m.data||d.data;m.type=m.type||d.type;d=m}s[d.guid]=d;this.global[n]=true}a=null}}},global:{},remove:function(a,b,d){if(!(a.nodeType===3||a.nodeType===8)){var f=c.data(a,"events"),e,i,j;if(f){if(b===v||typeof b==="string"&&b.charAt(0)===".")for(i in f)this.remove(a,i+(b||""));else{if(b.type){d=b.handler;b=b.type}b=b.split(/\s+/);for(var n=0;i=b[n++];){var o=i.split(".");i=o.shift();var m=!o.length,s=c.map(o.slice(0).sort(),ab);s=new RegExp("(^|\\.)"+
+s.join("\\.(?:.*\\.)?")+"(\\.|$)");var x=this.special[i]||{};if(f[i]){if(d){j=f[i][d.guid];delete f[i][d.guid]}else for(var A in f[i])if(m||s.test(f[i][A].type))delete f[i][A];x.remove&&x.remove.call(a,o,j);for(e in f[i])break;if(!e){if(!x.teardown||x.teardown.call(a,o)===false)if(a.removeEventListener)a.removeEventListener(i,c.data(a,"handle"),false);else a.detachEvent&&a.detachEvent("on"+i,c.data(a,"handle"));e=null;delete f[i]}}}}for(e in f)break;if(!e){if(A=c.data(a,"handle"))A.elem=null;c.removeData(a,
+"events");c.removeData(a,"handle")}}}},trigger:function(a,b,d,f){var e=a.type||a;if(!f){a=typeof a==="object"?a[G]?a:c.extend(c.Event(e),a):c.Event(e);if(e.indexOf("!")>=0){a.type=e=e.slice(0,-1);a.exclusive=true}if(!d){a.stopPropagation();this.global[e]&&c.each(c.cache,function(){this.events&&this.events[e]&&c.event.trigger(a,b,this.handle.elem)})}if(!d||d.nodeType===3||d.nodeType===8)return v;a.result=v;a.target=d;b=c.makeArray(b);b.unshift(a)}a.currentTarget=d;(f=c.data(d,"handle"))&&f.apply(d,
+b);f=d.parentNode||d.ownerDocument;try{if(!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()]))if(d["on"+e]&&d["on"+e].apply(d,b)===false)a.result=false}catch(i){}if(!a.isPropagationStopped()&&f)c.event.trigger(a,b,f,true);else if(!a.isDefaultPrevented()){d=a.target;var j;if(!(c.nodeName(d,"a")&&e==="click")&&!(d&&d.nodeName&&c.noData[d.nodeName.toLowerCase()])){try{if(d[e]){if(j=d["on"+e])d["on"+e]=null;this.triggered=true;d[e]()}}catch(n){}if(j)d["on"+e]=j;this.triggered=false}}},handle:function(a){var b,
+d;a=arguments[0]=c.event.fix(a||z.event);a.currentTarget=this;d=a.type.split(".");a.type=d.shift();b=!d.length&&!a.exclusive;var f=new RegExp("(^|\\.)"+d.slice(0).sort().join("\\.(?:.*\\.)?")+"(\\.|$)");d=(c.data(this,"events")||{})[a.type];for(var e in d){var i=d[e];if(b||f.test(i.type)){a.handler=i;a.data=i.data;i=i.apply(this,arguments);if(i!==v){a.result=i;if(i===false){a.preventDefault();a.stopPropagation()}}if(a.isImmediatePropagationStopped())break}}return a.result},props:"altKey attrChange attrName bubbles button cancelable charCode clientX clientY ctrlKey currentTarget data detail eventPhase fromElement handler keyCode layerX layerY metaKey newValue offsetX offsetY originalTarget pageX pageY prevValue relatedNode relatedTarget screenX screenY shiftKey srcElement target toElement view wheelDelta which".split(" "),
+fix:function(a){if(a[G])return a;var b=a;a=c.Event(b);for(var d=this.props.length,f;d;){f=this.props[--d];a[f]=b[f]}if(!a.target)a.target=a.srcElement||r;if(a.target.nodeType===3)a.target=a.target.parentNode;if(!a.relatedTarget&&a.fromElement)a.relatedTarget=a.fromElement===a.target?a.toElement:a.fromElement;if(a.pageX==null&&a.clientX!=null){b=r.documentElement;d=r.body;a.pageX=a.clientX+(b&&b.scrollLeft||d&&d.scrollLeft||0)-(b&&b.clientLeft||d&&d.clientLeft||0);a.pageY=a.clientY+(b&&b.scrollTop||
+d&&d.scrollTop||0)-(b&&b.clientTop||d&&d.clientTop||0)}if(!a.which&&(a.charCode||a.charCode===0?a.charCode:a.keyCode))a.which=a.charCode||a.keyCode;if(!a.metaKey&&a.ctrlKey)a.metaKey=a.ctrlKey;if(!a.which&&a.button!==v)a.which=a.button&1?1:a.button&2?3:a.button&4?2:0;return a},guid:1E8,proxy:c.proxy,special:{ready:{setup:c.bindReady,teardown:c.noop},live:{add:function(a,b){c.extend(a,b||{});a.guid+=b.selector+b.live;b.liveProxy=a;c.event.add(this,b.live,na,b)},remove:function(a){if(a.length){var b=
+0,d=new RegExp("(^|\\.)"+a[0]+"(\\.|$)");c.each(c.data(this,"events").live||{},function(){d.test(this.type)&&b++});b<1&&c.event.remove(this,a[0],na)}},special:{}},beforeunload:{setup:function(a,b,d){if(this.setInterval)this.onbeforeunload=d;return false},teardown:function(a,b){if(this.onbeforeunload===b)this.onbeforeunload=null}}}};c.Event=function(a){if(!this.preventDefault)return new c.Event(a);if(a&&a.type){this.originalEvent=a;this.type=a.type}else this.type=a;this.timeStamp=J();this[G]=true};
+c.Event.prototype={preventDefault:function(){this.isDefaultPrevented=Z;var a=this.originalEvent;if(a){a.preventDefault&&a.preventDefault();a.returnValue=false}},stopPropagation:function(){this.isPropagationStopped=Z;var a=this.originalEvent;if(a){a.stopPropagation&&a.stopPropagation();a.cancelBubble=true}},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Z;this.stopPropagation()},isDefaultPrevented:Y,isPropagationStopped:Y,isImmediatePropagationStopped:Y};var Aa=function(a){for(var b=
+a.relatedTarget;b&&b!==this;)try{b=b.parentNode}catch(d){break}if(b!==this){a.type=a.data;c.event.handle.apply(this,arguments)}},Ba=function(a){a.type=a.data;c.event.handle.apply(this,arguments)};c.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){c.event.special[a]={setup:function(d){c.event.add(this,b,d&&d.selector?Ba:Aa,a)},teardown:function(d){c.event.remove(this,b,d&&d.selector?Ba:Aa)}}});if(!c.support.submitBubbles)c.event.special.submit={setup:function(a,b,d){if(this.nodeName.toLowerCase()!==
+"form"){c.event.add(this,"click.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="submit"||i==="image")&&c(e).closest("form").length)return ma("submit",this,arguments)});c.event.add(this,"keypress.specialSubmit."+d.guid,function(f){var e=f.target,i=e.type;if((i==="text"||i==="password")&&c(e).closest("form").length&&f.keyCode===13)return ma("submit",this,arguments)})}else return false},remove:function(a,b){c.event.remove(this,"click.specialSubmit"+(b?"."+b.guid:""));c.event.remove(this,
+"keypress.specialSubmit"+(b?"."+b.guid:""))}};if(!c.support.changeBubbles){var da=/textarea|input|select/i;function Ca(a){var b=a.type,d=a.value;if(b==="radio"||b==="checkbox")d=a.checked;else if(b==="select-multiple")d=a.selectedIndex>-1?c.map(a.options,function(f){return f.selected}).join("-"):"";else if(a.nodeName.toLowerCase()==="select")d=a.selectedIndex;return d}function ea(a,b){var d=a.target,f,e;if(!(!da.test(d.nodeName)||d.readOnly)){f=c.data(d,"_change_data");e=Ca(d);if(a.type!=="focusout"||
+d.type!=="radio")c.data(d,"_change_data",e);if(!(f===v||e===f))if(f!=null||e){a.type="change";return c.event.trigger(a,b,d)}}}c.event.special.change={filters:{focusout:ea,click:function(a){var b=a.target,d=b.type;if(d==="radio"||d==="checkbox"||b.nodeName.toLowerCase()==="select")return ea.call(this,a)},keydown:function(a){var b=a.target,d=b.type;if(a.keyCode===13&&b.nodeName.toLowerCase()!=="textarea"||a.keyCode===32&&(d==="checkbox"||d==="radio")||d==="select-multiple")return ea.call(this,a)},beforeactivate:function(a){a=
+a.target;a.nodeName.toLowerCase()==="input"&&a.type==="radio"&&c.data(a,"_change_data",Ca(a))}},setup:function(a,b,d){for(var f in T)c.event.add(this,f+".specialChange."+d.guid,T[f]);return da.test(this.nodeName)},remove:function(a,b){for(var d in T)c.event.remove(this,d+".specialChange"+(b?"."+b.guid:""),T[d]);return da.test(this.nodeName)}};var T=c.event.special.change.filters}r.addEventListener&&c.each({focus:"focusin",blur:"focusout"},function(a,b){function d(f){f=c.event.fix(f);f.type=b;return c.event.handle.call(this,
+f)}c.event.special[b]={setup:function(){this.addEventListener(a,d,true)},teardown:function(){this.removeEventListener(a,d,true)}}});c.each(["bind","one"],function(a,b){c.fn[b]=function(d,f,e){if(typeof d==="object"){for(var i in d)this[b](i,f,d[i],e);return this}if(c.isFunction(f)){e=f;f=v}var j=b==="one"?c.proxy(e,function(n){c(this).unbind(n,j);return e.apply(this,arguments)}):e;return d==="unload"&&b!=="one"?this.one(d,f,e):this.each(function(){c.event.add(this,d,j,f)})}});c.fn.extend({unbind:function(a,
+b){if(typeof a==="object"&&!a.preventDefault){for(var d in a)this.unbind(d,a[d]);return this}return this.each(function(){c.event.remove(this,a,b)})},trigger:function(a,b){return this.each(function(){c.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0]){a=c.Event(a);a.preventDefault();a.stopPropagation();c.event.trigger(a,b,this[0]);return a.result}},toggle:function(a){for(var b=arguments,d=1;d<b.length;)c.proxy(a,b[d++]);return this.click(c.proxy(a,function(f){var e=(c.data(this,"lastToggle"+
+a.guid)||0)%d;c.data(this,"lastToggle"+a.guid,e+1);f.preventDefault();return b[e].apply(this,arguments)||false}))},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}});c.each(["live","die"],function(a,b){c.fn[b]=function(d,f,e){var i,j=0;if(c.isFunction(f)){e=f;f=v}for(d=(d||"").split(/\s+/);(i=d[j++])!=null;){i=i==="focus"?"focusin":i==="blur"?"focusout":i==="hover"?d.push("mouseleave")&&"mouseenter":i;b==="live"?c(this.context).bind(oa(i,this.selector),{data:f,selector:this.selector,
+live:i},e):c(this.context).unbind(oa(i,this.selector),e?{guid:e.guid+this.selector+i}:null)}return this}});c.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error".split(" "),function(a,b){c.fn[b]=function(d){return d?this.bind(b,d):this.trigger(b)};if(c.attrFn)c.attrFn[b]=true});z.attachEvent&&!z.addEventListener&&z.attachEvent("onunload",function(){for(var a in c.cache)if(c.cache[a].handle)try{c.event.remove(c.cache[a].handle.elem)}catch(b){}});
+(function(){function a(g){for(var h="",k,l=0;g[l];l++){k=g[l];if(k.nodeType===3||k.nodeType===4)h+=k.nodeValue;else if(k.nodeType!==8)h+=a(k.childNodes)}return h}function b(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===k){y=l[t.sizset];break}if(t.nodeType===1&&!p){t.sizcache=k;t.sizset=q}if(t.nodeName.toLowerCase()===h){y=t;break}t=t[g]}l[q]=y}}}function d(g,h,k,l,q,p){q=0;for(var u=l.length;q<u;q++){var t=l[q];if(t){t=t[g];for(var y=false;t;){if(t.sizcache===
+k){y=l[t.sizset];break}if(t.nodeType===1){if(!p){t.sizcache=k;t.sizset=q}if(typeof h!=="string"){if(t===h){y=true;break}}else if(o.filter(h,[t]).length>0){y=t;break}}t=t[g]}l[q]=y}}}var f=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^[\]]*\]|['"][^'"]*['"]|[^[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,e=0,i=Object.prototype.toString,j=false,n=true;[0,0].sort(function(){n=false;return 0});var o=function(g,h,k,l){k=k||[];var q=h=h||r;if(h.nodeType!==1&&h.nodeType!==9)return[];if(!g||
+typeof g!=="string")return k;for(var p=[],u,t,y,R,H=true,M=w(h),I=g;(f.exec(""),u=f.exec(I))!==null;){I=u[3];p.push(u[1]);if(u[2]){R=u[3];break}}if(p.length>1&&s.exec(g))if(p.length===2&&m.relative[p[0]])t=fa(p[0]+p[1],h);else for(t=m.relative[p[0]]?[h]:o(p.shift(),h);p.length;){g=p.shift();if(m.relative[g])g+=p.shift();t=fa(g,t)}else{if(!l&&p.length>1&&h.nodeType===9&&!M&&m.match.ID.test(p[0])&&!m.match.ID.test(p[p.length-1])){u=o.find(p.shift(),h,M);h=u.expr?o.filter(u.expr,u.set)[0]:u.set[0]}if(h){u=
+l?{expr:p.pop(),set:A(l)}:o.find(p.pop(),p.length===1&&(p[0]==="~"||p[0]==="+")&&h.parentNode?h.parentNode:h,M);t=u.expr?o.filter(u.expr,u.set):u.set;if(p.length>0)y=A(t);else H=false;for(;p.length;){var D=p.pop();u=D;if(m.relative[D])u=p.pop();else D="";if(u==null)u=h;m.relative[D](y,u,M)}}else y=[]}y||(y=t);y||o.error(D||g);if(i.call(y)==="[object Array]")if(H)if(h&&h.nodeType===1)for(g=0;y[g]!=null;g++){if(y[g]&&(y[g]===true||y[g].nodeType===1&&E(h,y[g])))k.push(t[g])}else for(g=0;y[g]!=null;g++)y[g]&&
+y[g].nodeType===1&&k.push(t[g]);else k.push.apply(k,y);else A(y,k);if(R){o(R,q,k,l);o.uniqueSort(k)}return k};o.uniqueSort=function(g){if(C){j=n;g.sort(C);if(j)for(var h=1;h<g.length;h++)g[h]===g[h-1]&&g.splice(h--,1)}return g};o.matches=function(g,h){return o(g,null,null,h)};o.find=function(g,h,k){var l,q;if(!g)return[];for(var p=0,u=m.order.length;p<u;p++){var t=m.order[p];if(q=m.leftMatch[t].exec(g)){var y=q[1];q.splice(1,1);if(y.substr(y.length-1)!=="\\"){q[1]=(q[1]||"").replace(/\\/g,"");l=m.find[t](q,
+h,k);if(l!=null){g=g.replace(m.match[t],"");break}}}}l||(l=h.getElementsByTagName("*"));return{set:l,expr:g}};o.filter=function(g,h,k,l){for(var q=g,p=[],u=h,t,y,R=h&&h[0]&&w(h[0]);g&&h.length;){for(var H in m.filter)if((t=m.leftMatch[H].exec(g))!=null&&t[2]){var M=m.filter[H],I,D;D=t[1];y=false;t.splice(1,1);if(D.substr(D.length-1)!=="\\"){if(u===p)p=[];if(m.preFilter[H])if(t=m.preFilter[H](t,u,k,p,l,R)){if(t===true)continue}else y=I=true;if(t)for(var U=0;(D=u[U])!=null;U++)if(D){I=M(D,t,U,u);var Da=
+l^!!I;if(k&&I!=null)if(Da)y=true;else u[U]=false;else if(Da){p.push(D);y=true}}if(I!==v){k||(u=p);g=g.replace(m.match[H],"");if(!y)return[];break}}}if(g===q)if(y==null)o.error(g);else break;q=g}return u};o.error=function(g){throw"Syntax error, unrecognized expression: "+g;};var m=o.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF-]|\\.)+)\s*(?:(\S?=)\s*(['"]*)(.*?)\3|)\s*\]/,
+TAG:/^((?:[\w\u00c0-\uFFFF\*-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\((even|odd|[\dn+-]*)\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(g){return g.getAttribute("href")}},relative:{"+":function(g,h){var k=typeof h==="string",l=k&&!/\W/.test(h);k=k&&!l;if(l)h=h.toLowerCase();l=0;for(var q=g.length,
+p;l<q;l++)if(p=g[l]){for(;(p=p.previousSibling)&&p.nodeType!==1;);g[l]=k||p&&p.nodeName.toLowerCase()===h?p||false:p===h}k&&o.filter(h,g,true)},">":function(g,h){var k=typeof h==="string";if(k&&!/\W/.test(h)){h=h.toLowerCase();for(var l=0,q=g.length;l<q;l++){var p=g[l];if(p){k=p.parentNode;g[l]=k.nodeName.toLowerCase()===h?k:false}}}else{l=0;for(q=g.length;l<q;l++)if(p=g[l])g[l]=k?p.parentNode:p.parentNode===h;k&&o.filter(h,g,true)}},"":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=
+h=h.toLowerCase();q=b}q("parentNode",h,l,g,p,k)},"~":function(g,h,k){var l=e++,q=d;if(typeof h==="string"&&!/\W/.test(h)){var p=h=h.toLowerCase();q=b}q("previousSibling",h,l,g,p,k)}},find:{ID:function(g,h,k){if(typeof h.getElementById!=="undefined"&&!k)return(g=h.getElementById(g[1]))?[g]:[]},NAME:function(g,h){if(typeof h.getElementsByName!=="undefined"){var k=[];h=h.getElementsByName(g[1]);for(var l=0,q=h.length;l<q;l++)h[l].getAttribute("name")===g[1]&&k.push(h[l]);return k.length===0?null:k}},
+TAG:function(g,h){return h.getElementsByTagName(g[1])}},preFilter:{CLASS:function(g,h,k,l,q,p){g=" "+g[1].replace(/\\/g,"")+" ";if(p)return g;p=0;for(var u;(u=h[p])!=null;p++)if(u)if(q^(u.className&&(" "+u.className+" ").replace(/[\t\n]/g," ").indexOf(g)>=0))k||l.push(u);else if(k)h[p]=false;return false},ID:function(g){return g[1].replace(/\\/g,"")},TAG:function(g){return g[1].toLowerCase()},CHILD:function(g){if(g[1]==="nth"){var h=/(-?)(\d*)n((?:\+|-)?\d*)/.exec(g[2]==="even"&&"2n"||g[2]==="odd"&&
+"2n+1"||!/\D/.test(g[2])&&"0n+"+g[2]||g[2]);g[2]=h[1]+(h[2]||1)-0;g[3]=h[3]-0}g[0]=e++;return g},ATTR:function(g,h,k,l,q,p){h=g[1].replace(/\\/g,"");if(!p&&m.attrMap[h])g[1]=m.attrMap[h];if(g[2]==="~=")g[4]=" "+g[4]+" ";return g},PSEUDO:function(g,h,k,l,q){if(g[1]==="not")if((f.exec(g[3])||"").length>1||/^\w/.test(g[3]))g[3]=o(g[3],null,null,h);else{g=o.filter(g[3],h,k,true^q);k||l.push.apply(l,g);return false}else if(m.match.POS.test(g[0])||m.match.CHILD.test(g[0]))return true;return g},POS:function(g){g.unshift(true);
+return g}},filters:{enabled:function(g){return g.disabled===false&&g.type!=="hidden"},disabled:function(g){return g.disabled===true},checked:function(g){return g.checked===true},selected:function(g){return g.selected===true},parent:function(g){return!!g.firstChild},empty:function(g){return!g.firstChild},has:function(g,h,k){return!!o(k[3],g).length},header:function(g){return/h\d/i.test(g.nodeName)},text:function(g){return"text"===g.type},radio:function(g){return"radio"===g.type},checkbox:function(g){return"checkbox"===
+g.type},file:function(g){return"file"===g.type},password:function(g){return"password"===g.type},submit:function(g){return"submit"===g.type},image:function(g){return"image"===g.type},reset:function(g){return"reset"===g.type},button:function(g){return"button"===g.type||g.nodeName.toLowerCase()==="button"},input:function(g){return/input|select|textarea|button/i.test(g.nodeName)}},setFilters:{first:function(g,h){return h===0},last:function(g,h,k,l){return h===l.length-1},even:function(g,h){return h%2===
+0},odd:function(g,h){return h%2===1},lt:function(g,h,k){return h<k[3]-0},gt:function(g,h,k){return h>k[3]-0},nth:function(g,h,k){return k[3]-0===h},eq:function(g,h,k){return k[3]-0===h}},filter:{PSEUDO:function(g,h,k,l){var q=h[1],p=m.filters[q];if(p)return p(g,k,h,l);else if(q==="contains")return(g.textContent||g.innerText||a([g])||"").indexOf(h[3])>=0;else if(q==="not"){h=h[3];k=0;for(l=h.length;k<l;k++)if(h[k]===g)return false;return true}else o.error("Syntax error, unrecognized expression: "+
+q)},CHILD:function(g,h){var k=h[1],l=g;switch(k){case "only":case "first":for(;l=l.previousSibling;)if(l.nodeType===1)return false;if(k==="first")return true;l=g;case "last":for(;l=l.nextSibling;)if(l.nodeType===1)return false;return true;case "nth":k=h[2];var q=h[3];if(k===1&&q===0)return true;h=h[0];var p=g.parentNode;if(p&&(p.sizcache!==h||!g.nodeIndex)){var u=0;for(l=p.firstChild;l;l=l.nextSibling)if(l.nodeType===1)l.nodeIndex=++u;p.sizcache=h}g=g.nodeIndex-q;return k===0?g===0:g%k===0&&g/k>=
+0}},ID:function(g,h){return g.nodeType===1&&g.getAttribute("id")===h},TAG:function(g,h){return h==="*"&&g.nodeType===1||g.nodeName.toLowerCase()===h},CLASS:function(g,h){return(" "+(g.className||g.getAttribute("class"))+" ").indexOf(h)>-1},ATTR:function(g,h){var k=h[1];g=m.attrHandle[k]?m.attrHandle[k](g):g[k]!=null?g[k]:g.getAttribute(k);k=g+"";var l=h[2];h=h[4];return g==null?l==="!=":l==="="?k===h:l==="*="?k.indexOf(h)>=0:l==="~="?(" "+k+" ").indexOf(h)>=0:!h?k&&g!==false:l==="!="?k!==h:l==="^="?
+k.indexOf(h)===0:l==="$="?k.substr(k.length-h.length)===h:l==="|="?k===h||k.substr(0,h.length+1)===h+"-":false},POS:function(g,h,k,l){var q=m.setFilters[h[2]];if(q)return q(g,k,h,l)}}},s=m.match.POS;for(var x in m.match){m.match[x]=new RegExp(m.match[x].source+/(?![^\[]*\])(?![^\(]*\))/.source);m.leftMatch[x]=new RegExp(/(^(?:.|\r|\n)*?)/.source+m.match[x].source.replace(/\\(\d+)/g,function(g,h){return"\\"+(h-0+1)}))}var A=function(g,h){g=Array.prototype.slice.call(g,0);if(h){h.push.apply(h,g);return h}return g};
+try{Array.prototype.slice.call(r.documentElement.childNodes,0)}catch(B){A=function(g,h){h=h||[];if(i.call(g)==="[object Array]")Array.prototype.push.apply(h,g);else if(typeof g.length==="number")for(var k=0,l=g.length;k<l;k++)h.push(g[k]);else for(k=0;g[k];k++)h.push(g[k]);return h}}var C;if(r.documentElement.compareDocumentPosition)C=function(g,h){if(!g.compareDocumentPosition||!h.compareDocumentPosition){if(g==h)j=true;return g.compareDocumentPosition?-1:1}g=g.compareDocumentPosition(h)&4?-1:g===
+h?0:1;if(g===0)j=true;return g};else if("sourceIndex"in r.documentElement)C=function(g,h){if(!g.sourceIndex||!h.sourceIndex){if(g==h)j=true;return g.sourceIndex?-1:1}g=g.sourceIndex-h.sourceIndex;if(g===0)j=true;return g};else if(r.createRange)C=function(g,h){if(!g.ownerDocument||!h.ownerDocument){if(g==h)j=true;return g.ownerDocument?-1:1}var k=g.ownerDocument.createRange(),l=h.ownerDocument.createRange();k.setStart(g,0);k.setEnd(g,0);l.setStart(h,0);l.setEnd(h,0);g=k.compareBoundaryPoints(Range.START_TO_END,
+l);if(g===0)j=true;return g};(function(){var g=r.createElement("div"),h="script"+(new Date).getTime();g.innerHTML="<a name='"+h+"'/>";var k=r.documentElement;k.insertBefore(g,k.firstChild);if(r.getElementById(h)){m.find.ID=function(l,q,p){if(typeof q.getElementById!=="undefined"&&!p)return(q=q.getElementById(l[1]))?q.id===l[1]||typeof q.getAttributeNode!=="undefined"&&q.getAttributeNode("id").nodeValue===l[1]?[q]:v:[]};m.filter.ID=function(l,q){var p=typeof l.getAttributeNode!=="undefined"&&l.getAttributeNode("id");
+return l.nodeType===1&&p&&p.nodeValue===q}}k.removeChild(g);k=g=null})();(function(){var g=r.createElement("div");g.appendChild(r.createComment(""));if(g.getElementsByTagName("*").length>0)m.find.TAG=function(h,k){k=k.getElementsByTagName(h[1]);if(h[1]==="*"){h=[];for(var l=0;k[l];l++)k[l].nodeType===1&&h.push(k[l]);k=h}return k};g.innerHTML="<a href='#'></a>";if(g.firstChild&&typeof g.firstChild.getAttribute!=="undefined"&&g.firstChild.getAttribute("href")!=="#")m.attrHandle.href=function(h){return h.getAttribute("href",
+2)};g=null})();r.querySelectorAll&&function(){var g=o,h=r.createElement("div");h.innerHTML="<p class='TEST'></p>";if(!(h.querySelectorAll&&h.querySelectorAll(".TEST").length===0)){o=function(l,q,p,u){q=q||r;if(!u&&q.nodeType===9&&!w(q))try{return A(q.querySelectorAll(l),p)}catch(t){}return g(l,q,p,u)};for(var k in g)o[k]=g[k];h=null}}();(function(){var g=r.createElement("div");g.innerHTML="<div class='test e'></div><div class='test'></div>";if(!(!g.getElementsByClassName||g.getElementsByClassName("e").length===
+0)){g.lastChild.className="e";if(g.getElementsByClassName("e").length!==1){m.order.splice(1,0,"CLASS");m.find.CLASS=function(h,k,l){if(typeof k.getElementsByClassName!=="undefined"&&!l)return k.getElementsByClassName(h[1])};g=null}}})();var E=r.compareDocumentPosition?function(g,h){return g.compareDocumentPosition(h)&16}:function(g,h){return g!==h&&(g.contains?g.contains(h):true)},w=function(g){return(g=(g?g.ownerDocument||g:0).documentElement)?g.nodeName!=="HTML":false},fa=function(g,h){var k=[],
+l="",q;for(h=h.nodeType?[h]:h;q=m.match.PSEUDO.exec(g);){l+=q[0];g=g.replace(m.match.PSEUDO,"")}g=m.relative[g]?g+"*":g;q=0;for(var p=h.length;q<p;q++)o(g,h[q],k);return o.filter(l,k)};c.find=o;c.expr=o.selectors;c.expr[":"]=c.expr.filters;c.unique=o.uniqueSort;c.getText=a;c.isXMLDoc=w;c.contains=E})();var bb=/Until$/,cb=/^(?:parents|prevUntil|prevAll)/,db=/,/;Q=Array.prototype.slice;var Ea=function(a,b,d){if(c.isFunction(b))return c.grep(a,function(e,i){return!!b.call(e,i,e)===d});else if(b.nodeType)return c.grep(a,
+function(e){return e===b===d});else if(typeof b==="string"){var f=c.grep(a,function(e){return e.nodeType===1});if(Qa.test(b))return c.filter(b,f,!d);else b=c.filter(b,f)}return c.grep(a,function(e){return c.inArray(e,b)>=0===d})};c.fn.extend({find:function(a){for(var b=this.pushStack("","find",a),d=0,f=0,e=this.length;f<e;f++){d=b.length;c.find(a,this[f],b);if(f>0)for(var i=d;i<b.length;i++)for(var j=0;j<d;j++)if(b[j]===b[i]){b.splice(i--,1);break}}return b},has:function(a){var b=c(a);return this.filter(function(){for(var d=
+0,f=b.length;d<f;d++)if(c.contains(this,b[d]))return true})},not:function(a){return this.pushStack(Ea(this,a,false),"not",a)},filter:function(a){return this.pushStack(Ea(this,a,true),"filter",a)},is:function(a){return!!a&&c.filter(a,this).length>0},closest:function(a,b){if(c.isArray(a)){var d=[],f=this[0],e,i={},j;if(f&&a.length){e=0;for(var n=a.length;e<n;e++){j=a[e];i[j]||(i[j]=c.expr.match.POS.test(j)?c(j,b||this.context):j)}for(;f&&f.ownerDocument&&f!==b;){for(j in i){e=i[j];if(e.jquery?e.index(f)>
+-1:c(f).is(e)){d.push({selector:j,elem:f});delete i[j]}}f=f.parentNode}}return d}var o=c.expr.match.POS.test(a)?c(a,b||this.context):null;return this.map(function(m,s){for(;s&&s.ownerDocument&&s!==b;){if(o?o.index(s)>-1:c(s).is(a))return s;s=s.parentNode}return null})},index:function(a){if(!a||typeof a==="string")return c.inArray(this[0],a?c(a):this.parent().children());return c.inArray(a.jquery?a[0]:a,this)},add:function(a,b){a=typeof a==="string"?c(a,b||this.context):c.makeArray(a);b=c.merge(this.get(),
+a);return this.pushStack(pa(a[0])||pa(b[0])?b:c.unique(b))},andSelf:function(){return this.add(this.prevObject)}});c.each({parent:function(a){return(a=a.parentNode)&&a.nodeType!==11?a:null},parents:function(a){return c.dir(a,"parentNode")},parentsUntil:function(a,b,d){return c.dir(a,"parentNode",d)},next:function(a){return c.nth(a,2,"nextSibling")},prev:function(a){return c.nth(a,2,"previousSibling")},nextAll:function(a){return c.dir(a,"nextSibling")},prevAll:function(a){return c.dir(a,"previousSibling")},
+nextUntil:function(a,b,d){return c.dir(a,"nextSibling",d)},prevUntil:function(a,b,d){return c.dir(a,"previousSibling",d)},siblings:function(a){return c.sibling(a.parentNode.firstChild,a)},children:function(a){return c.sibling(a.firstChild)},contents:function(a){return c.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:c.makeArray(a.childNodes)}},function(a,b){c.fn[a]=function(d,f){var e=c.map(this,b,d);bb.test(a)||(f=d);if(f&&typeof f==="string")e=c.filter(f,e);e=this.length>1?c.unique(e):
+e;if((this.length>1||db.test(f))&&cb.test(a))e=e.reverse();return this.pushStack(e,a,Q.call(arguments).join(","))}});c.extend({filter:function(a,b,d){if(d)a=":not("+a+")";return c.find.matches(a,b)},dir:function(a,b,d){var f=[];for(a=a[b];a&&a.nodeType!==9&&(d===v||a.nodeType!==1||!c(a).is(d));){a.nodeType===1&&f.push(a);a=a[b]}return f},nth:function(a,b,d){b=b||1;for(var f=0;a;a=a[d])if(a.nodeType===1&&++f===b)break;return a},sibling:function(a,b){for(var d=[];a;a=a.nextSibling)a.nodeType===1&&a!==
+b&&d.push(a);return d}});var Fa=/ jQuery\d+="(?:\d+|null)"/g,V=/^\s+/,Ga=/(<([\w:]+)[^>]*?)\/>/g,eb=/^(?:area|br|col|embed|hr|img|input|link|meta|param)$/i,Ha=/<([\w:]+)/,fb=/<tbody/i,gb=/<|&\w+;/,sa=/checked\s*(?:[^=]|=\s*.checked.)/i,Ia=function(a,b,d){return eb.test(d)?a:b+"></"+d+">"},F={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],
+col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]};F.optgroup=F.option;F.tbody=F.tfoot=F.colgroup=F.caption=F.thead;F.th=F.td;if(!c.support.htmlSerialize)F._default=[1,"div<div>","</div>"];c.fn.extend({text:function(a){if(c.isFunction(a))return this.each(function(b){var d=c(this);d.text(a.call(this,b,d.text()))});if(typeof a!=="object"&&a!==v)return this.empty().append((this[0]&&this[0].ownerDocument||r).createTextNode(a));return c.getText(this)},
+wrapAll:function(a){if(c.isFunction(a))return this.each(function(d){c(this).wrapAll(a.call(this,d))});if(this[0]){var b=c(a,this[0].ownerDocument).eq(0).clone(true);this[0].parentNode&&b.insertBefore(this[0]);b.map(function(){for(var d=this;d.firstChild&&d.firstChild.nodeType===1;)d=d.firstChild;return d}).append(this)}return this},wrapInner:function(a){if(c.isFunction(a))return this.each(function(b){c(this).wrapInner(a.call(this,b))});return this.each(function(){var b=c(this),d=b.contents();d.length?
+d.wrapAll(a):b.append(a)})},wrap:function(a){return this.each(function(){c(this).wrapAll(a)})},unwrap:function(){return this.parent().each(function(){c.nodeName(this,"body")||c(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,true,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,
+false,function(b){this.parentNode.insertBefore(b,this)});else if(arguments.length){var a=c(arguments[0]);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,false,function(b){this.parentNode.insertBefore(b,this.nextSibling)});else if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,c(arguments[0]).toArray());return a}},clone:function(a){var b=this.map(function(){if(!c.support.noCloneEvent&&
+!c.isXMLDoc(this)){var d=this.outerHTML,f=this.ownerDocument;if(!d){d=f.createElement("div");d.appendChild(this.cloneNode(true));d=d.innerHTML}return c.clean([d.replace(Fa,"").replace(V,"")],f)[0]}else return this.cloneNode(true)});if(a===true){qa(this,b);qa(this.find("*"),b.find("*"))}return b},html:function(a){if(a===v)return this[0]&&this[0].nodeType===1?this[0].innerHTML.replace(Fa,""):null;else if(typeof a==="string"&&!/<script/i.test(a)&&(c.support.leadingWhitespace||!V.test(a))&&!F[(Ha.exec(a)||
+["",""])[1].toLowerCase()]){a=a.replace(Ga,Ia);try{for(var b=0,d=this.length;b<d;b++)if(this[b].nodeType===1){c.cleanData(this[b].getElementsByTagName("*"));this[b].innerHTML=a}}catch(f){this.empty().append(a)}}else c.isFunction(a)?this.each(function(e){var i=c(this),j=i.html();i.empty().append(function(){return a.call(this,e,j)})}):this.empty().append(a);return this},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(c.isFunction(a))return this.each(function(b){var d=c(this),f=d.html();d.replaceWith(a.call(this,
+b,f))});else a=c(a).detach();return this.each(function(){var b=this.nextSibling,d=this.parentNode;c(this).remove();b?c(b).before(a):c(d).append(a)})}else return this.pushStack(c(c.isFunction(a)?a():a),"replaceWith",a)},detach:function(a){return this.remove(a,true)},domManip:function(a,b,d){function f(s){return c.nodeName(s,"table")?s.getElementsByTagName("tbody")[0]||s.appendChild(s.ownerDocument.createElement("tbody")):s}var e,i,j=a[0],n=[];if(!c.support.checkClone&&arguments.length===3&&typeof j===
+"string"&&sa.test(j))return this.each(function(){c(this).domManip(a,b,d,true)});if(c.isFunction(j))return this.each(function(s){var x=c(this);a[0]=j.call(this,s,b?x.html():v);x.domManip(a,b,d)});if(this[0]){e=a[0]&&a[0].parentNode&&a[0].parentNode.nodeType===11?{fragment:a[0].parentNode}:ra(a,this,n);if(i=e.fragment.firstChild){b=b&&c.nodeName(i,"tr");for(var o=0,m=this.length;o<m;o++)d.call(b?f(this[o],i):this[o],e.cacheable||this.length>1||o>0?e.fragment.cloneNode(true):e.fragment)}n&&c.each(n,
+Ma)}return this}});c.fragments={};c.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){c.fn[a]=function(d){var f=[];d=c(d);for(var e=0,i=d.length;e<i;e++){var j=(e>0?this.clone(true):this).get();c.fn[b].apply(c(d[e]),j);f=f.concat(j)}return this.pushStack(f,a,d.selector)}});c.each({remove:function(a,b){if(!a||c.filter(a,[this]).length){if(!b&&this.nodeType===1){c.cleanData(this.getElementsByTagName("*"));c.cleanData([this])}this.parentNode&&
+this.parentNode.removeChild(this)}},empty:function(){for(this.nodeType===1&&c.cleanData(this.getElementsByTagName("*"));this.firstChild;)this.removeChild(this.firstChild)}},function(a,b){c.fn[a]=function(){return this.each(b,arguments)}});c.extend({clean:function(a,b,d,f){b=b||r;if(typeof b.createElement==="undefined")b=b.ownerDocument||b[0]&&b[0].ownerDocument||r;var e=[];c.each(a,function(i,j){if(typeof j==="number")j+="";if(j){if(typeof j==="string"&&!gb.test(j))j=b.createTextNode(j);else if(typeof j===
+"string"){j=j.replace(Ga,Ia);var n=(Ha.exec(j)||["",""])[1].toLowerCase(),o=F[n]||F._default,m=o[0];i=b.createElement("div");for(i.innerHTML=o[1]+j+o[2];m--;)i=i.lastChild;if(!c.support.tbody){m=fb.test(j);n=n==="table"&&!m?i.firstChild&&i.firstChild.childNodes:o[1]==="<table>"&&!m?i.childNodes:[];for(o=n.length-1;o>=0;--o)c.nodeName(n[o],"tbody")&&!n[o].childNodes.length&&n[o].parentNode.removeChild(n[o])}!c.support.leadingWhitespace&&V.test(j)&&i.insertBefore(b.createTextNode(V.exec(j)[0]),i.firstChild);
+j=c.makeArray(i.childNodes)}if(j.nodeType)e.push(j);else e=c.merge(e,j)}});if(d)for(a=0;e[a];a++)if(f&&c.nodeName(e[a],"script")&&(!e[a].type||e[a].type.toLowerCase()==="text/javascript"))f.push(e[a].parentNode?e[a].parentNode.removeChild(e[a]):e[a]);else{e[a].nodeType===1&&e.splice.apply(e,[a+1,0].concat(c.makeArray(e[a].getElementsByTagName("script"))));d.appendChild(e[a])}return e},cleanData:function(a){for(var b=0,d;(d=a[b])!=null;b++){c.event.remove(d);c.removeData(d)}}});var hb=/z-?index|font-?weight|opacity|zoom|line-?height/i,
+Ja=/alpha\([^)]*\)/,Ka=/opacity=([^)]*)/,ga=/float/i,ha=/-([a-z])/ig,ib=/([A-Z])/g,jb=/^-?\d+(?:px)?$/i,kb=/^-?\d/,lb={position:"absolute",visibility:"hidden",display:"block"},mb=["Left","Right"],nb=["Top","Bottom"],ob=r.defaultView&&r.defaultView.getComputedStyle,La=c.support.cssFloat?"cssFloat":"styleFloat",ia=function(a,b){return b.toUpperCase()};c.fn.css=function(a,b){return X(this,a,b,true,function(d,f,e){if(e===v)return c.curCSS(d,f);if(typeof e==="number"&&!hb.test(f))e+="px";c.style(d,f,e)})};
+c.extend({style:function(a,b,d){if(!a||a.nodeType===3||a.nodeType===8)return v;if((b==="width"||b==="height")&&parseFloat(d)<0)d=v;var f=a.style||a,e=d!==v;if(!c.support.opacity&&b==="opacity"){if(e){f.zoom=1;b=parseInt(d,10)+""==="NaN"?"":"alpha(opacity="+d*100+")";a=f.filter||c.curCSS(a,"filter")||"";f.filter=Ja.test(a)?a.replace(Ja,b):b}return f.filter&&f.filter.indexOf("opacity=")>=0?parseFloat(Ka.exec(f.filter)[1])/100+"":""}if(ga.test(b))b=La;b=b.replace(ha,ia);if(e)f[b]=d;return f[b]},css:function(a,
+b,d,f){if(b==="width"||b==="height"){var e,i=b==="width"?mb:nb;function j(){e=b==="width"?a.offsetWidth:a.offsetHeight;f!=="border"&&c.each(i,function(){f||(e-=parseFloat(c.curCSS(a,"padding"+this,true))||0);if(f==="margin")e+=parseFloat(c.curCSS(a,"margin"+this,true))||0;else e-=parseFloat(c.curCSS(a,"border"+this+"Width",true))||0})}a.offsetWidth!==0?j():c.swap(a,lb,j);return Math.max(0,Math.round(e))}return c.curCSS(a,b,d)},curCSS:function(a,b,d){var f,e=a.style;if(!c.support.opacity&&b==="opacity"&&
+a.currentStyle){f=Ka.test(a.currentStyle.filter||"")?parseFloat(RegExp.$1)/100+"":"";return f===""?"1":f}if(ga.test(b))b=La;if(!d&&e&&e[b])f=e[b];else if(ob){if(ga.test(b))b="float";b=b.replace(ib,"-$1").toLowerCase();e=a.ownerDocument.defaultView;if(!e)return null;if(a=e.getComputedStyle(a,null))f=a.getPropertyValue(b);if(b==="opacity"&&f==="")f="1"}else if(a.currentStyle){d=b.replace(ha,ia);f=a.currentStyle[b]||a.currentStyle[d];if(!jb.test(f)&&kb.test(f)){b=e.left;var i=a.runtimeStyle.left;a.runtimeStyle.left=
+a.currentStyle.left;e.left=d==="fontSize"?"1em":f||0;f=e.pixelLeft+"px";e.left=b;a.runtimeStyle.left=i}}return f},swap:function(a,b,d){var f={};for(var e in b){f[e]=a.style[e];a.style[e]=b[e]}d.call(a);for(e in b)a.style[e]=f[e]}});if(c.expr&&c.expr.filters){c.expr.filters.hidden=function(a){var b=a.offsetWidth,d=a.offsetHeight,f=a.nodeName.toLowerCase()==="tr";return b===0&&d===0&&!f?true:b>0&&d>0&&!f?false:c.curCSS(a,"display")==="none"};c.expr.filters.visible=function(a){return!c.expr.filters.hidden(a)}}var pb=
+J(),qb=/<script(.|\s)*?\/script>/gi,rb=/select|textarea/i,sb=/color|date|datetime|email|hidden|month|number|password|range|search|tel|text|time|url|week/i,N=/=\?(&|$)/,ja=/\?/,tb=/(\?|&)_=.*?(&|$)/,ub=/^(\w+:)?\/\/([^\/?#]+)/,vb=/%20/g;c.fn.extend({_load:c.fn.load,load:function(a,b,d){if(typeof a!=="string")return this._load(a);else if(!this.length)return this;var f=a.indexOf(" ");if(f>=0){var e=a.slice(f,a.length);a=a.slice(0,f)}f="GET";if(b)if(c.isFunction(b)){d=b;b=null}else if(typeof b==="object"){b=
+c.param(b,c.ajaxSettings.traditional);f="POST"}var i=this;c.ajax({url:a,type:f,dataType:"html",data:b,complete:function(j,n){if(n==="success"||n==="notmodified")i.html(e?c("<div />").append(j.responseText.replace(qb,"")).find(e):j.responseText);d&&i.each(d,[j.responseText,n,j])}});return this},serialize:function(){return c.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?c.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&
+(this.checked||rb.test(this.nodeName)||sb.test(this.type))}).map(function(a,b){a=c(this).val();return a==null?null:c.isArray(a)?c.map(a,function(d){return{name:b.name,value:d}}):{name:b.name,value:a}}).get()}});c.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){c.fn[b]=function(d){return this.bind(b,d)}});c.extend({get:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b=null}return c.ajax({type:"GET",url:a,data:b,success:d,dataType:f})},getScript:function(a,
+b){return c.get(a,null,b,"script")},getJSON:function(a,b,d){return c.get(a,b,d,"json")},post:function(a,b,d,f){if(c.isFunction(b)){f=f||d;d=b;b={}}return c.ajax({type:"POST",url:a,data:b,success:d,dataType:f})},ajaxSetup:function(a){c.extend(c.ajaxSettings,a)},ajaxSettings:{url:location.href,global:true,type:"GET",contentType:"application/x-www-form-urlencoded",processData:true,async:true,xhr:z.XMLHttpRequest&&(z.location.protocol!=="file:"||!z.ActiveXObject)?function(){return new z.XMLHttpRequest}:
+function(){try{return new z.ActiveXObject("Microsoft.XMLHTTP")}catch(a){}},accepts:{xml:"application/xml, text/xml",html:"text/html",script:"text/javascript, application/javascript",json:"application/json, text/javascript",text:"text/plain",_default:"*/*"}},lastModified:{},etag:{},ajax:function(a){function b(){e.success&&e.success.call(o,n,j,w);e.global&&f("ajaxSuccess",[w,e])}function d(){e.complete&&e.complete.call(o,w,j);e.global&&f("ajaxComplete",[w,e]);e.global&&!--c.active&&c.event.trigger("ajaxStop")}
+function f(q,p){(e.context?c(e.context):c.event).trigger(q,p)}var e=c.extend(true,{},c.ajaxSettings,a),i,j,n,o=a&&a.context||e,m=e.type.toUpperCase();if(e.data&&e.processData&&typeof e.data!=="string")e.data=c.param(e.data,e.traditional);if(e.dataType==="jsonp"){if(m==="GET")N.test(e.url)||(e.url+=(ja.test(e.url)?"&":"?")+(e.jsonp||"callback")+"=?");else if(!e.data||!N.test(e.data))e.data=(e.data?e.data+"&":"")+(e.jsonp||"callback")+"=?";e.dataType="json"}if(e.dataType==="json"&&(e.data&&N.test(e.data)||
+N.test(e.url))){i=e.jsonpCallback||"jsonp"+pb++;if(e.data)e.data=(e.data+"").replace(N,"="+i+"$1");e.url=e.url.replace(N,"="+i+"$1");e.dataType="script";z[i]=z[i]||function(q){n=q;b();d();z[i]=v;try{delete z[i]}catch(p){}A&&A.removeChild(B)}}if(e.dataType==="script"&&e.cache===null)e.cache=false;if(e.cache===false&&m==="GET"){var s=J(),x=e.url.replace(tb,"$1_="+s+"$2");e.url=x+(x===e.url?(ja.test(e.url)?"&":"?")+"_="+s:"")}if(e.data&&m==="GET")e.url+=(ja.test(e.url)?"&":"?")+e.data;e.global&&!c.active++&&
+c.event.trigger("ajaxStart");s=(s=ub.exec(e.url))&&(s[1]&&s[1]!==location.protocol||s[2]!==location.host);if(e.dataType==="script"&&m==="GET"&&s){var A=r.getElementsByTagName("head")[0]||r.documentElement,B=r.createElement("script");B.src=e.url;if(e.scriptCharset)B.charset=e.scriptCharset;if(!i){var C=false;B.onload=B.onreadystatechange=function(){if(!C&&(!this.readyState||this.readyState==="loaded"||this.readyState==="complete")){C=true;b();d();B.onload=B.onreadystatechange=null;A&&B.parentNode&&
+A.removeChild(B)}}}A.insertBefore(B,A.firstChild);return v}var E=false,w=e.xhr();if(w){e.username?w.open(m,e.url,e.async,e.username,e.password):w.open(m,e.url,e.async);try{if(e.data||a&&a.contentType)w.setRequestHeader("Content-Type",e.contentType);if(e.ifModified){c.lastModified[e.url]&&w.setRequestHeader("If-Modified-Since",c.lastModified[e.url]);c.etag[e.url]&&w.setRequestHeader("If-None-Match",c.etag[e.url])}s||w.setRequestHeader("X-Requested-With","XMLHttpRequest");w.setRequestHeader("Accept",
+e.dataType&&e.accepts[e.dataType]?e.accepts[e.dataType]+", */*":e.accepts._default)}catch(fa){}if(e.beforeSend&&e.beforeSend.call(o,w,e)===false){e.global&&!--c.active&&c.event.trigger("ajaxStop");w.abort();return false}e.global&&f("ajaxSend",[w,e]);var g=w.onreadystatechange=function(q){if(!w||w.readyState===0||q==="abort"){E||d();E=true;if(w)w.onreadystatechange=c.noop}else if(!E&&w&&(w.readyState===4||q==="timeout")){E=true;w.onreadystatechange=c.noop;j=q==="timeout"?"timeout":!c.httpSuccess(w)?
+"error":e.ifModified&&c.httpNotModified(w,e.url)?"notmodified":"success";var p;if(j==="success")try{n=c.httpData(w,e.dataType,e)}catch(u){j="parsererror";p=u}if(j==="success"||j==="notmodified")i||b();else c.handleError(e,w,j,p);d();q==="timeout"&&w.abort();if(e.async)w=null}};try{var h=w.abort;w.abort=function(){w&&h.call(w);g("abort")}}catch(k){}e.async&&e.timeout>0&&setTimeout(function(){w&&!E&&g("timeout")},e.timeout);try{w.send(m==="POST"||m==="PUT"||m==="DELETE"?e.data:null)}catch(l){c.handleError(e,
+w,null,l);d()}e.async||g();return w}},handleError:function(a,b,d,f){if(a.error)a.error.call(a.context||a,b,d,f);if(a.global)(a.context?c(a.context):c.event).trigger("ajaxError",[b,a,f])},active:0,httpSuccess:function(a){try{return!a.status&&location.protocol==="file:"||a.status>=200&&a.status<300||a.status===304||a.status===1223||a.status===0}catch(b){}return false},httpNotModified:function(a,b){var d=a.getResponseHeader("Last-Modified"),f=a.getResponseHeader("Etag");if(d)c.lastModified[b]=d;if(f)c.etag[b]=
+f;return a.status===304||a.status===0},httpData:function(a,b,d){var f=a.getResponseHeader("content-type")||"",e=b==="xml"||!b&&f.indexOf("xml")>=0;a=e?a.responseXML:a.responseText;e&&a.documentElement.nodeName==="parsererror"&&c.error("parsererror");if(d&&d.dataFilter)a=d.dataFilter(a,b);if(typeof a==="string")if(b==="json"||!b&&f.indexOf("json")>=0)a=c.parseJSON(a);else if(b==="script"||!b&&f.indexOf("javascript")>=0)c.globalEval(a);return a},param:function(a,b){function d(j,n){if(c.isArray(n))c.each(n,
+function(o,m){b?f(j,m):d(j+"["+(typeof m==="object"||c.isArray(m)?o:"")+"]",m)});else!b&&n!=null&&typeof n==="object"?c.each(n,function(o,m){d(j+"["+o+"]",m)}):f(j,n)}function f(j,n){n=c.isFunction(n)?n():n;e[e.length]=encodeURIComponent(j)+"="+encodeURIComponent(n)}var e=[];if(b===v)b=c.ajaxSettings.traditional;if(c.isArray(a)||a.jquery)c.each(a,function(){f(this.name,this.value)});else for(var i in a)d(i,a[i]);return e.join("&").replace(vb,"+")}});var ka={},wb=/toggle|show|hide/,xb=/^([+-]=)?([\d+-.]+)(.*)$/,
+W,ta=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]];c.fn.extend({show:function(a,b){if(a||a===0)return this.animate(K("show",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");this[a].style.display=d||"";if(c.css(this[a],"display")==="none"){d=this[a].nodeName;var f;if(ka[d])f=ka[d];else{var e=c("<"+d+" />").appendTo("body");f=e.css("display");if(f==="none")f="block";e.remove();
+ka[d]=f}c.data(this[a],"olddisplay",f)}}a=0;for(b=this.length;a<b;a++)this[a].style.display=c.data(this[a],"olddisplay")||"";return this}},hide:function(a,b){if(a||a===0)return this.animate(K("hide",3),a,b);else{a=0;for(b=this.length;a<b;a++){var d=c.data(this[a],"olddisplay");!d&&d!=="none"&&c.data(this[a],"olddisplay",c.css(this[a],"display"))}a=0;for(b=this.length;a<b;a++)this[a].style.display="none";return this}},_toggle:c.fn.toggle,toggle:function(a,b){var d=typeof a==="boolean";if(c.isFunction(a)&&
+c.isFunction(b))this._toggle.apply(this,arguments);else a==null||d?this.each(function(){var f=d?a:c(this).is(":hidden");c(this)[f?"show":"hide"]()}):this.animate(K("toggle",3),a,b);return this},fadeTo:function(a,b,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,d)},animate:function(a,b,d,f){var e=c.speed(b,d,f);if(c.isEmptyObject(a))return this.each(e.complete);return this[e.queue===false?"each":"queue"](function(){var i=c.extend({},e),j,n=this.nodeType===1&&c(this).is(":hidden"),
+o=this;for(j in a){var m=j.replace(ha,ia);if(j!==m){a[m]=a[j];delete a[j];j=m}if(a[j]==="hide"&&n||a[j]==="show"&&!n)return i.complete.call(this);if((j==="height"||j==="width")&&this.style){i.display=c.css(this,"display");i.overflow=this.style.overflow}if(c.isArray(a[j])){(i.specialEasing=i.specialEasing||{})[j]=a[j][1];a[j]=a[j][0]}}if(i.overflow!=null)this.style.overflow="hidden";i.curAnim=c.extend({},a);c.each(a,function(s,x){var A=new c.fx(o,i,s);if(wb.test(x))A[x==="toggle"?n?"show":"hide":x](a);
+else{var B=xb.exec(x),C=A.cur(true)||0;if(B){x=parseFloat(B[2]);var E=B[3]||"px";if(E!=="px"){o.style[s]=(x||1)+E;C=(x||1)/A.cur(true)*C;o.style[s]=C+E}if(B[1])x=(B[1]==="-="?-1:1)*x+C;A.custom(C,x,E)}else A.custom(C,x,"")}});return true})},stop:function(a,b){var d=c.timers;a&&this.queue([]);this.each(function(){for(var f=d.length-1;f>=0;f--)if(d[f].elem===this){b&&d[f](true);d.splice(f,1)}});b||this.dequeue();return this}});c.each({slideDown:K("show",1),slideUp:K("hide",1),slideToggle:K("toggle",
+1),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"}},function(a,b){c.fn[a]=function(d,f){return this.animate(b,d,f)}});c.extend({speed:function(a,b,d){var f=a&&typeof a==="object"?a:{complete:d||!d&&b||c.isFunction(a)&&a,duration:a,easing:d&&b||b&&!c.isFunction(b)&&b};f.duration=c.fx.off?0:typeof f.duration==="number"?f.duration:c.fx.speeds[f.duration]||c.fx.speeds._default;f.old=f.complete;f.complete=function(){f.queue!==false&&c(this).dequeue();c.isFunction(f.old)&&f.old.call(this)};return f},easing:{linear:function(a,
+b,d,f){return d+f*a},swing:function(a,b,d,f){return(-Math.cos(a*Math.PI)/2+0.5)*f+d}},timers:[],fx:function(a,b,d){this.options=b;this.elem=a;this.prop=d;if(!b.orig)b.orig={}}});c.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this);(c.fx.step[this.prop]||c.fx.step._default)(this);if((this.prop==="height"||this.prop==="width")&&this.elem.style)this.elem.style.display="block"},cur:function(a){if(this.elem[this.prop]!=null&&(!this.elem.style||this.elem.style[this.prop]==
+null))return this.elem[this.prop];return(a=parseFloat(c.css(this.elem,this.prop,a)))&&a>-10000?a:parseFloat(c.curCSS(this.elem,this.prop))||0},custom:function(a,b,d){function f(i){return e.step(i)}this.startTime=J();this.start=a;this.end=b;this.unit=d||this.unit||"px";this.now=this.start;this.pos=this.state=0;var e=this;f.elem=this.elem;if(f()&&c.timers.push(f)&&!W)W=setInterval(c.fx.tick,13)},show:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.show=true;this.custom(this.prop===
+"width"||this.prop==="height"?1:0,this.cur());c(this.elem).show()},hide:function(){this.options.orig[this.prop]=c.style(this.elem,this.prop);this.options.hide=true;this.custom(this.cur(),0)},step:function(a){var b=J(),d=true;if(a||b>=this.options.duration+this.startTime){this.now=this.end;this.pos=this.state=1;this.update();this.options.curAnim[this.prop]=true;for(var f in this.options.curAnim)if(this.options.curAnim[f]!==true)d=false;if(d){if(this.options.display!=null){this.elem.style.overflow=
+this.options.overflow;a=c.data(this.elem,"olddisplay");this.elem.style.display=a?a:this.options.display;if(c.css(this.elem,"display")==="none")this.elem.style.display="block"}this.options.hide&&c(this.elem).hide();if(this.options.hide||this.options.show)for(var e in this.options.curAnim)c.style(this.elem,e,this.options.orig[e]);this.options.complete.call(this.elem)}return false}else{e=b-this.startTime;this.state=e/this.options.duration;a=this.options.easing||(c.easing.swing?"swing":"linear");this.pos=
+c.easing[this.options.specialEasing&&this.options.specialEasing[this.prop]||a](this.state,e,0,1,this.options.duration);this.now=this.start+(this.end-this.start)*this.pos;this.update()}return true}};c.extend(c.fx,{tick:function(){for(var a=c.timers,b=0;b<a.length;b++)a[b]()||a.splice(b--,1);a.length||c.fx.stop()},stop:function(){clearInterval(W);W=null},speeds:{slow:600,fast:200,_default:400},step:{opacity:function(a){c.style(a.elem,"opacity",a.now)},_default:function(a){if(a.elem.style&&a.elem.style[a.prop]!=
+null)a.elem.style[a.prop]=(a.prop==="width"||a.prop==="height"?Math.max(0,a.now):a.now)+a.unit;else a.elem[a.prop]=a.now}}});if(c.expr&&c.expr.filters)c.expr.filters.animated=function(a){return c.grep(c.timers,function(b){return a===b.elem}).length};c.fn.offset="getBoundingClientRect"in r.documentElement?function(a){var b=this[0];if(a)return this.each(function(e){c.offset.setOffset(this,a,e)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);var d=b.getBoundingClientRect(),
+f=b.ownerDocument;b=f.body;f=f.documentElement;return{top:d.top+(self.pageYOffset||c.support.boxModel&&f.scrollTop||b.scrollTop)-(f.clientTop||b.clientTop||0),left:d.left+(self.pageXOffset||c.support.boxModel&&f.scrollLeft||b.scrollLeft)-(f.clientLeft||b.clientLeft||0)}}:function(a){var b=this[0];if(a)return this.each(function(s){c.offset.setOffset(this,a,s)});if(!b||!b.ownerDocument)return null;if(b===b.ownerDocument.body)return c.offset.bodyOffset(b);c.offset.initialize();var d=b.offsetParent,f=
+b,e=b.ownerDocument,i,j=e.documentElement,n=e.body;f=(e=e.defaultView)?e.getComputedStyle(b,null):b.currentStyle;for(var o=b.offsetTop,m=b.offsetLeft;(b=b.parentNode)&&b!==n&&b!==j;){if(c.offset.supportsFixedPosition&&f.position==="fixed")break;i=e?e.getComputedStyle(b,null):b.currentStyle;o-=b.scrollTop;m-=b.scrollLeft;if(b===d){o+=b.offsetTop;m+=b.offsetLeft;if(c.offset.doesNotAddBorder&&!(c.offset.doesAddBorderForTableAndCells&&/^t(able|d|h)$/i.test(b.nodeName))){o+=parseFloat(i.borderTopWidth)||
+0;m+=parseFloat(i.borderLeftWidth)||0}f=d;d=b.offsetParent}if(c.offset.subtractsBorderForOverflowNotVisible&&i.overflow!=="visible"){o+=parseFloat(i.borderTopWidth)||0;m+=parseFloat(i.borderLeftWidth)||0}f=i}if(f.position==="relative"||f.position==="static"){o+=n.offsetTop;m+=n.offsetLeft}if(c.offset.supportsFixedPosition&&f.position==="fixed"){o+=Math.max(j.scrollTop,n.scrollTop);m+=Math.max(j.scrollLeft,n.scrollLeft)}return{top:o,left:m}};c.offset={initialize:function(){var a=r.body,b=r.createElement("div"),
+d,f,e,i=parseFloat(c.curCSS(a,"marginTop",true))||0;c.extend(b.style,{position:"absolute",top:0,left:0,margin:0,border:0,width:"1px",height:"1px",visibility:"hidden"});b.innerHTML="<div style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;'><div></div></div><table style='position:absolute;top:0;left:0;margin:0;border:5px solid #000;padding:0;width:1px;height:1px;' cellpadding='0' cellspacing='0'><tr><td></td></tr></table>";a.insertBefore(b,a.firstChild);
+d=b.firstChild;f=d.firstChild;e=d.nextSibling.firstChild.firstChild;this.doesNotAddBorder=f.offsetTop!==5;this.doesAddBorderForTableAndCells=e.offsetTop===5;f.style.position="fixed";f.style.top="20px";this.supportsFixedPosition=f.offsetTop===20||f.offsetTop===15;f.style.position=f.style.top="";d.style.overflow="hidden";d.style.position="relative";this.subtractsBorderForOverflowNotVisible=f.offsetTop===-5;this.doesNotIncludeMarginInBodyOffset=a.offsetTop!==i;a.removeChild(b);c.offset.initialize=c.noop},
+bodyOffset:function(a){var b=a.offsetTop,d=a.offsetLeft;c.offset.initialize();if(c.offset.doesNotIncludeMarginInBodyOffset){b+=parseFloat(c.curCSS(a,"marginTop",true))||0;d+=parseFloat(c.curCSS(a,"marginLeft",true))||0}return{top:b,left:d}},setOffset:function(a,b,d){if(/static/.test(c.curCSS(a,"position")))a.style.position="relative";var f=c(a),e=f.offset(),i=parseInt(c.curCSS(a,"top",true),10)||0,j=parseInt(c.curCSS(a,"left",true),10)||0;if(c.isFunction(b))b=b.call(a,d,e);d={top:b.top-e.top+i,left:b.left-
+e.left+j};"using"in b?b.using.call(a,d):f.css(d)}};c.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),d=this.offset(),f=/^body|html$/i.test(b[0].nodeName)?{top:0,left:0}:b.offset();d.top-=parseFloat(c.curCSS(a,"marginTop",true))||0;d.left-=parseFloat(c.curCSS(a,"marginLeft",true))||0;f.top+=parseFloat(c.curCSS(b[0],"borderTopWidth",true))||0;f.left+=parseFloat(c.curCSS(b[0],"borderLeftWidth",true))||0;return{top:d.top-f.top,left:d.left-f.left}},offsetParent:function(){return this.map(function(){for(var a=
+this.offsetParent||r.body;a&&!/^body|html$/i.test(a.nodeName)&&c.css(a,"position")==="static";)a=a.offsetParent;return a})}});c.each(["Left","Top"],function(a,b){var d="scroll"+b;c.fn[d]=function(f){var e=this[0],i;if(!e)return null;if(f!==v)return this.each(function(){if(i=ua(this))i.scrollTo(!a?f:c(i).scrollLeft(),a?f:c(i).scrollTop());else this[d]=f});else return(i=ua(e))?"pageXOffset"in i?i[a?"pageYOffset":"pageXOffset"]:c.support.boxModel&&i.document.documentElement[d]||i.document.body[d]:e[d]}});
+c.each(["Height","Width"],function(a,b){var d=b.toLowerCase();c.fn["inner"+b]=function(){return this[0]?c.css(this[0],d,false,"padding"):null};c.fn["outer"+b]=function(f){return this[0]?c.css(this[0],d,false,f?"margin":"border"):null};c.fn[d]=function(f){var e=this[0];if(!e)return f==null?null:this;if(c.isFunction(f))return this.each(function(i){var j=c(this);j[d](f.call(this,i,j[d]()))});return"scrollTo"in e&&e.document?e.document.compatMode==="CSS1Compat"&&e.document.documentElement["client"+b]||
+e.document.body["client"+b]:e.nodeType===9?Math.max(e.documentElement["client"+b],e.body["scroll"+b],e.documentElement["scroll"+b],e.body["offset"+b],e.documentElement["offset"+b]):f===v?c.css(e,d):this.css(d,typeof f==="string"?f:f+"px")}});z.jQuery=z.$=c})(window);
diff --git a/tools/qdoc3/doc/config/scripts/narrow.js b/tools/qdoc3/doc/config/scripts/narrow.js
new file mode 100644
index 0000000..a5e8b97
--- /dev/null
+++ b/tools/qdoc3/doc/config/scripts/narrow.js
@@ -0,0 +1,133 @@
+/* This function generates menus and search box in narrow/slim fit mode */
+var narrowInit = function() {
+ /* 1: Create search form */
+ var narrowSearch = $('<div id="narrowsearch"></div>');
+ var searchform = $("#qtdocsearch");
+ narrowSearch.append(searchform);
+ $("#qtdocheader .content .qtref").after(narrowSearch);
+
+ /* 2: Create dropdowns */
+ var narrowmenu = $('<ul id="narrowmenu" class="sf-menu"></ul>');
+
+ /* Lookup */
+ var lookuptext = $("#lookup h2").attr("title");
+ $("#lookup ul").removeAttr("id");
+ $("#lookup ul li").removeAttr("class");
+ $("#lookup ul li").removeAttr("style");
+ var lookupul = $("#lookup ul");
+ var lookuplist = $('<li></li>');
+ var lookuplink = $('<a href="#"></a>');
+ lookuplink.append(lookuptext);
+ lookuplist.append(lookuplink);
+ lookuplist.append(lookupul);
+ narrowmenu.append(lookuplist);
+
+ /* Topics */
+ var topicstext = $("#topics h2").attr("title");
+ $("#topics ul").removeAttr("id");
+ $("#topics ul li").removeAttr("class");
+ $("#topics ul li").removeAttr("style");
+ var topicsul = $("#topics ul");
+ var topicslist = $('<li></li>');
+ var topicslink = $('<a href="#"></a>');
+ topicslink.append(topicstext);
+ topicslist.append(topicslink);
+ topicslist.append(topicsul);
+ narrowmenu.append(topicslist);
+
+ /* Examples */
+ var examplestext = $("#examples h2").attr("title");
+ $("#examples ul").removeAttr("id");
+ $("#examples ul li").removeAttr("class");
+ $("#examples ul li").removeAttr("style");
+ var examplesul = $("#examples ul");
+ var exampleslist = $('<li></li>');
+ var exampleslink = $('<a href="#"></a>');
+ exampleslink.append(examplestext);
+ exampleslist.append(exampleslink);
+ exampleslist.append(examplesul);
+ narrowmenu.append(exampleslist);
+
+ $("#shortCut").after(narrowmenu);
+ $('ul#narrowmenu').superfish({
+ delay: 100,
+ autoArrows: false,
+ disableHI: true
+ });
+}
+
+/* Executes on doc ready */
+$(document).ready(function(){
+ /* check if body has the narrow class */
+ if ($('body').hasClass('narrow')) {
+ /* run narrowInit */
+ narrowInit();
+ }
+
+ /* messure window width and add class if it is smaller than 600 px */
+ if($(window).width()<600) {
+ $('body').addClass('narrow');
+ /* if the search box contains */
+ if ($("#narrowsearch").length == 0) {
+ /* run narrowInit */
+ narrowInit();
+ }
+ }
+ else { /* if the window is wider than 600 px, narrow is removed */
+ $('body').removeClass('narrow');
+ if ($("#narrowsearch").length == 0) {
+ }
+ }
+});
+/* binding resize event to this funciton */
+$(window).bind('resize', function () {
+ /* if the window is wider than 600 px, narrow class is added */
+ if($(window).width()<600) {
+ $('body').addClass('narrow');
+ if ($("#narrowsearch").length == 0) {
+ narrowInit();
+ }
+ }
+ else {
+ /* else we remove the narrow class */
+ $('body').removeClass('narrow');
+ }
+});
+
+ $('#narrowsearch').keyup(function () {
+ /* extract the search box content */
+ var searchString = $('#narrowsearch').val();
+ /* if the string is less than three characters */
+ if ((searchString == null) || (searchString.length < 3)) {
+ /* remove classes and elements*/
+ $('#narrowsearch').removeClass('loading');
+ $('.searching').remove();
+ /* run CheckEmptyAndLoadList */
+ CheckEmptyAndLoadList();
+
+ $('.report').remove();
+ return;
+ }
+ /* if timer checks out */
+ if (this.timer) clearTimeout(this.timer);
+ this.timer = setTimeout(function () {
+ /* add loading image by adding loading class */
+ $('#narrowsearch').addClass('loading');
+ $('.searching').remove();
+
+ /* run the actual search */
+ $.ajax({
+ contentType: "application/x-www-form-urlencoded",
+ url: 'http://' + location.host + '/nokiasearch/GetDataServlet',
+ data: 'searchString='+searchString,
+ dataType:'xml',
+ type: 'post',
+ success: function (response, textStatus) {
+ /* on success remove loading img */
+ $('.searching').remove();
+ $('#narrowsearch').removeClass('loading');
+ processNokiaData(response);
+ }
+ });
+ }, 500); /* timer set to 500 ms */
+ }); \ No newline at end of file
diff --git a/tools/qdoc3/doc/config/scripts/superfish.js b/tools/qdoc3/doc/config/scripts/superfish.js
new file mode 100644
index 0000000..c6a9c7d
--- /dev/null
+++ b/tools/qdoc3/doc/config/scripts/superfish.js
@@ -0,0 +1,121 @@
+
+/*
+ * Superfish v1.4.8 - jQuery menu widget
+ * Copyright (c) 2008 Joel Birch
+ *
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ * CHANGELOG: http://users.tpg.com.au/j_birch/plugins/superfish/changelog.txt
+ */
+
+;(function($){
+ $.fn.superfish = function(op){
+
+ var sf = $.fn.superfish,
+ c = sf.c,
+ $arrow = $(['<span class="',c.arrowClass,'"> &#187;</span>'].join('')),
+ over = function(){
+ var $$ = $(this), menu = getMenu($$);
+ clearTimeout(menu.sfTimer);
+ $$.showSuperfishUl().siblings().hideSuperfishUl();
+ },
+ out = function(){
+ var $$ = $(this), menu = getMenu($$), o = sf.op;
+ clearTimeout(menu.sfTimer);
+ menu.sfTimer=setTimeout(function(){
+ o.retainPath=($.inArray($$[0],o.$path)>-1);
+ $$.hideSuperfishUl();
+ if (o.$path.length && $$.parents(['li.',o.hoverClass].join('')).length<1){over.call(o.$path);}
+ },o.delay);
+ },
+ getMenu = function($menu){
+ var menu = $menu.parents(['ul.',c.menuClass,':first'].join(''))[0];
+ sf.op = sf.o[menu.serial];
+ return menu;
+ },
+ addArrow = function($a){ $a.addClass(c.anchorClass).append($arrow.clone()); };
+
+ return this.each(function() {
+ var s = this.serial = sf.o.length;
+ var o = $.extend({},sf.defaults,op);
+ o.$path = $('li.'+o.pathClass,this).slice(0,o.pathLevels).each(function(){
+ $(this).addClass([o.hoverClass,c.bcClass].join(' '))
+ .filter('li:has(ul)').removeClass(o.pathClass);
+ });
+ sf.o[s] = sf.op = o;
+
+ $('li:has(ul)',this)[($.fn.hoverIntent && !o.disableHI) ? 'hoverIntent' : 'hover'](over,out).each(function() {
+ if (o.autoArrows) addArrow( $('>a:first-child',this) );
+ })
+ .not('.'+c.bcClass)
+ .hideSuperfishUl();
+
+ var $a = $('a',this);
+ $a.each(function(i){
+ var $li = $a.eq(i).parents('li');
+ $a.eq(i).focus(function(){over.call($li);}).blur(function(){out.call($li);});
+ });
+ o.onInit.call(this);
+
+ }).each(function() {
+ var menuClasses = [c.menuClass];
+ if (sf.op.dropShadows && !($.browser.msie && $.browser.version < 7)) menuClasses.push(c.shadowClass);
+ $(this).addClass(menuClasses.join(' '));
+ });
+ };
+
+ var sf = $.fn.superfish;
+ sf.o = [];
+ sf.op = {};
+ sf.IE7fix = function(){
+ var o = sf.op;
+ if ($.browser.msie && $.browser.version > 6 && o.dropShadows && o.animation.opacity!=undefined)
+ this.toggleClass(sf.c.shadowClass+'-off');
+ };
+ sf.c = {
+ bcClass : 'sf-breadcrumb',
+ menuClass : 'sf-js-enabled',
+ anchorClass : 'sf-with-ul',
+ arrowClass : 'sf-sub-indicator',
+ shadowClass : 'sf-shadow'
+ };
+ sf.defaults = {
+ hoverClass : 'sfHover',
+ pathClass : 'overideThisToUse',
+ pathLevels : 1,
+ delay : 800,
+ animation : {opacity:'show'},
+ speed : 'normal',
+ autoArrows : true,
+ dropShadows : true,
+ disableHI : false, // true disables hoverIntent detection
+ onInit : function(){}, // callback functions
+ onBeforeShow: function(){},
+ onShow : function(){},
+ onHide : function(){}
+ };
+ $.fn.extend({
+ hideSuperfishUl : function(){
+ var o = sf.op,
+ not = (o.retainPath===true) ? o.$path : '';
+ o.retainPath = false;
+ var $ul = $(['li.',o.hoverClass].join(''),this).add(this).not(not).removeClass(o.hoverClass)
+ .find('>ul').hide().css('visibility','hidden');
+ o.onHide.call($ul);
+ return this;
+ },
+ showSuperfishUl : function(){
+ var o = sf.op,
+ sh = sf.c.shadowClass+'-off',
+ $ul = this.addClass(o.hoverClass)
+ .find('>ul:hidden').css('visibility','visible');
+ sf.IE7fix.call($ul);
+ o.onBeforeShow.call($ul);
+ $ul.animate(o.animation,o.speed,function(){ sf.IE7fix.call($ul); o.onShow.call($ul); });
+ return this;
+ }
+ });
+
+})(jQuery);
diff --git a/tools/qdoc3/doc/config/style/narrow.css b/tools/qdoc3/doc/config/style/narrow.css
new file mode 100644
index 0000000..39b4740
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/narrow.css
@@ -0,0 +1,271 @@
+ /* start narrow mode */
+
+ body.narrow
+ {
+ background-image: none;
+ }
+
+ .narrow a {
+ color: #00732f;
+ }
+
+ .narrow .header, .narrow .header .content, .narrow .footer, .narrow .wrapper {
+ margin: 0 7px;
+ min-width: 300px;
+ }
+
+ .narrow .footer {
+ margin: 0px;
+ }
+
+ .creator .header, .creator .header .content, .creator .footer, .creator .wrapper {
+ margin: 0px;
+ min-width: 300px;
+ }
+ .narrow .header
+ {
+ width: 100%;
+ margin: 0;
+ height: auto;
+ background: #fff url(../images/header_bg.png) repeat-x 0 100%;
+ padding: 10px 0 5px 0;
+ overflow: visible;
+ }
+
+ .narrow .header .content
+ {
+ }
+
+ .narrow .header #nav-logo
+ {
+ display: none;
+ }
+
+ .narrow .header .qtref
+ {
+ width: auto;
+ height: auto;
+ color: #00732f;
+ position: static;
+ float: left;
+ margin-left: 25px;
+ font: bold 18px/1 Arial;
+ }
+
+ .narrow .header .qtref a
+ {
+ color: #00732F;
+ }
+
+ .narrow .header .qtref span
+ {
+ background-image: none;
+ text-indent: 0;
+ width: 260px;
+ }
+
+ .narrow .header #nav-topright
+ {
+ display: none;
+ }
+
+ .narrow .header #shortCut
+ {
+ clear: both;
+ font-weight: normal;
+ position: static;
+ float: left;
+ margin: 15px 0 0 25px;
+ overflow: hidden;
+ padding: 0;
+ height: auto;
+ }
+
+ .narrow .header #shortCut ul
+ {
+ float: none;
+ margin: 0;
+ width: auto;
+ font-size: 11px;
+ }
+
+ .narrow .header #shortCut ul li
+ {
+ background-image: none;
+ }
+
+ .narrow .header #shortCut ul .shortCut-topleft-active,
+ .narrow .header #shortCut ul .shortCut-topleft-inactive
+ {
+ background-image: none;
+ height: auto;
+ padding: 0;
+ width: auto;
+ }
+ .narrow .header #shortCut ul li a
+ {
+ color: #00732F;
+ }
+
+ .narrow .wrapper .hd
+ {
+ background: url(../images/bg_ul_blank.png) no-repeat 0 0;
+ }
+
+ .narrow .wrapper .bd
+ {
+ background: url(../images/bg_l_blank.png) repeat-y 0 0;
+ }
+
+ .narrow .wrapper .ft
+ {
+ background: url(../images/bg_ll_blank.png) no-repeat 0 0;
+ }
+
+ .narrow .sidebar
+ {
+ display: none;
+ }
+
+ .narrow .wrap
+ {
+ margin: 0 5px 0 5px;
+ }
+
+ .creator .wrap
+ {
+ margin: 0px;
+ background:#FFFFFF;
+ }
+ .narrow .wrap .toolbar
+ {
+ border-bottom: none;
+ }
+
+ .narrow .wrap .content
+ {
+ padding-top: 15px;
+ }
+ .creator .wrap .content
+ {
+ padding-top: 10px;
+ }
+ .creator .wrap .content .guide
+ {
+ padding-top: 15px;
+ }
+ .narrow .wrap .feedback
+ {
+ display: none;
+ }
+
+ .narrow .wrap .breadcrumb ul li {
+ font-weight: normal;
+ }
+
+ .narrow .wrap .breadcrumb ul li a {
+ color: #00732f;
+ }
+
+ .narrow .wrap .breadcrumb ul li.last a {
+ color: #363534;
+ }
+
+ #narrowsearch {
+ display: none;
+ }
+
+ .narrow #narrowsearch {
+ display: block;
+ float: right;
+ margin-right: 25px;
+ _position: relative;
+ }
+
+ .narrow #narrowsearch fieldset {
+ _position: absolute;
+ _margin-top: -1px;
+ }
+
+ .narrow #narrowsearch {
+ background: url("http://doc.qt.nokia.com/prototype/html/images/sprites-combined.png") no-repeat scroll -6px -348px transparent;
+ height: 21px;
+ padding: 2px 0 0 5px;
+ width: 167px;
+ }
+
+ .narrow #narrowsearch input {
+ border: none;
+ font: 13px/1.2 Verdana;
+ height: 19px;
+ outline: none;
+ padding: 0;
+ width: 158px;
+ *border: 1px solid #fff;
+ *height: 17px;
+ _height: 18px;
+ }
+ .narrow .indexbox .indexIcon {
+ display: none;
+ }
+
+ .narrow .indexboxcont .section {
+ width: 64%;
+ padding-left: 0;
+ }
+
+ .narrow .indexboxcont .sectionlist {
+ width: 32.5%;
+ }
+
+ #narrowmenu {
+ display: none;
+ float: right;
+ margin: 15px 40px 0 0;
+ font-size: 11px;
+ position: relative;
+ }
+
+ .narrow #narrowmenu {
+ display: block;
+ }
+
+ #narrowmenu a {
+ line-height: 1.1;
+ background: url(../images/arrow_down.png) no-repeat 100% 50%;
+ white-space: nowrap;
+ padding: 0 16px 0 5px;
+ }
+
+ #narrowmenu li {
+ margin-left: 20px;
+ }
+
+ #narrowmenu li li {
+ margin: 0 0 5px 0;
+ }
+
+ #narrowmenu li li a {
+ padding: 0;
+ background-image: none;
+ }
+
+ #narrowmenu li,
+ #narrowmenu li ul {
+ background-color: #fff;
+ margin-top:-1px;
+ }
+
+ #narrowmenu li ul {
+ width: auto;
+ padding: 5px;
+ }
+
+ .sf-menu li:hover ul, .sf-menu li.sfHover ul {
+ top: 1.2em;
+ }
+
+ /* end narrow mode */
+ .creator #narrowsearch, .creator #narrowmenu{
+ display:none;
+ }
diff --git a/tools/qdoc3/doc/config/style/offline.css b/tools/qdoc3/doc/config/style/offline.css
new file mode 100644
index 0000000..3689ee8
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/offline.css
@@ -0,0 +1,673 @@
+@media screen
+{
+
+/* basic elements */
+ html
+ {
+ color: #000000;
+ background: #FFFFFF;
+ }
+ table
+ {
+ border-collapse: collapse;
+ border-spacing: 0;
+ }
+ fieldset, img
+ {
+ border: 0;
+ max-width:100%;
+ }
+ address, caption, cite, code, dfn, em, strong, th, var, optgroup
+ {
+ font-style: inherit;
+ font-weight: inherit;
+ }
+ del, ins
+ {
+ text-decoration: none;
+ }
+ li
+ {
+ list-style: none;
+ }
+ ol li
+ {
+ list-style: decimal;
+ }
+ caption, th
+ {
+ text-align: left;
+ }
+ h1, h2, h3, h4, h5, h6
+ {
+ font-size: 100%;
+ }
+ q:before, q:after
+ {
+ content: '';
+ }
+ abbr, acronym
+ {
+ border: 0;
+ font-variant: normal;
+ }
+ sup, sub
+ {
+ vertical-align: baseline;
+ }
+ tt, .qmlreadonly span, .qmldefault span
+ {
+ word-spacing:0.5em;
+ }
+ legend
+ {
+ color: #000000;
+ }
+ strong
+ {
+ font-weight: bold;
+ }
+ em
+ {
+ font-style: italic;
+ }
+
+ body
+ {
+ margin-left: 0.5em;
+ margin-right: 0.5em;
+ }
+ a
+ {
+ color: #00732F;
+ text-decoration: none;
+ }
+ hr
+ {
+ background-color: #E6E6E6;
+ border: 1px solid #E6E6E6;
+ height: 1px;
+ width: 100%;
+ text-align: left;
+ margin: 1.5em 0 1.5em 0;
+ }
+
+ pre
+ {
+ border: 1px solid #DDDDDD;
+ -moz-border-radius: 0.7em 0.7em 0.7em 0.7em;
+ -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em;
+ border-radius: 0.7em 0.7em 0.7em 0.7em;
+ margin: 0 1.5em 1em 1em;
+ padding: 1em 1em 1em 1em;
+ overflow-x: auto;
+ }
+ table, pre
+ {
+ -moz-border-radius: 0.7em 0.7em 0.7em 0.7em;
+ -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em;
+ border-radius: 0.7em 0.7em 0.7em 0.7em;
+ background-color: #F6F6F6;
+ border: 1px solid #E6E6E6;
+ border-collapse: separate;
+ margin-bottom: 2.5em;
+ }
+ pre {
+ font-size: 90%;
+ display: block;
+ overflow:hidden;
+ }
+ thead
+ {
+ margin-top: 0.5em;
+ font-weight: bold
+ }
+ th
+ {
+ padding: 0.5em 1.5em 0.5em 1.5em;
+ background-color: #E1E1E1;
+ border-left: 1px solid #E6E6E6;
+ }
+ td
+ {
+ padding: 0.25em 1.5em 0.25em 2em;
+ }
+
+ td.rightAlign
+ {
+ padding: 0.25em 0.5em 0.25em 1em;
+ }
+ table tr.odd
+ {
+ border-left: 1px solid #E6E6E6;
+ background-color: #F6F6F6;
+ color: #66666E;
+ }
+ table tr.even
+ {
+ border-left: 1px solid #E6E6E6;
+ background-color: #ffffff;
+ color: #66666E;
+ }
+
+ div.float-left
+ {
+ float: left; margin-right: 2em
+ }
+ div.float-right
+ {
+ float: right; margin-left: 2em
+ }
+
+ span.comment
+ {
+ color: #008B00;
+ font-style: italic
+ }
+ span.string, span.char
+ {
+ color: #000084;
+ }
+ span.number
+ {
+ color: #a46200;
+ }
+ span.operator
+ {
+ color: #202020;
+ }
+ span.keyword
+ {
+ color: #840000;
+ }
+ span.name
+ {
+ color: black
+ }
+ span.type
+ {
+ font-weight: bold
+ }
+ span.type a:visited
+ {
+ color: #0F5300;
+ }
+ span.preprocessor
+ {
+ color: #404040
+ }
+/* end basic elements */
+
+/* font style elements */
+ .heading
+ {
+ font-weight: bold;
+ font-size: 125%;
+ }
+ .subtitle
+ {
+ font-size: 110%
+ }
+ .small-subtitle
+ {
+ font-size: 100%
+ }
+ .red
+ {
+ color:red;
+ }
+/* end font style elements */
+
+/* global settings*/
+ .header, .footer
+ {
+ display: block;
+ clear: both;
+ overflow: hidden;
+ }
+/* end global settings*/
+
+/* header elements */
+ .header .qtref
+ {
+ color: #00732F;
+ font-weight: bold;
+ font-size: 130%;
+ }
+
+ .header .content
+ {
+ margin-bottom: 0.5em
+ }
+
+ .naviNextPrevious
+ {
+ display: none
+ }
+ .header .breadcrumb
+ {
+ font-size: 90%;
+ padding: 0.5em 0 0.5em 1em;
+ margin: 0;
+ background-color: #fafafa;
+ height: 1.35em;
+ border-bottom: 1px solid #d1d1d1;
+ }
+
+ .header .breadcrumb ul
+ {
+ margin: 0;
+ padding: 0;
+ }
+
+ .header .content
+ {
+ word-wrap: break-word;
+ }
+
+ .header .breadcrumb ul li
+ {
+ float: left;
+ background: url(../images/breadcrumb.png) no-repeat 0 3px;
+ padding-left: 1.5em;
+ margin-left: 1.5em;
+ }
+
+ .header .breadcrumb ul li.last
+ {
+ font-weight: normal;
+ }
+
+ .header .breadcrumb ul li a
+ {
+ color: #00732F;
+ }
+
+ .header .breadcrumb ul li.first
+ {
+ background-image: none;
+ padding-left: 0;
+ margin-left: 0;
+ }
+
+ .header .content ol li {
+ background: none;
+ margin-bottom: 1.0em;
+ margin-left: 1.2em;
+ padding-left: 0
+ }
+
+ .header .content li
+ {
+ background: url(../images/bullet_sq.png) no-repeat 0 5px;
+ margin-bottom: 1em;
+ padding-left: 1.2em;
+ }
+
+/* end header elements */
+
+/* content elements */
+ .content h1
+ {
+ font-weight: bold;
+ font-size: 150%
+ }
+
+ .content h2
+ {
+ font-weight: bold;
+ font-size: 135%;
+ width: 100%;
+ }
+ .content h3
+ {
+ font-weight: bold;
+ font-size: 120%;
+ width: 100%;
+ }
+ .content table p
+ {
+ margin: 0
+ }
+ .content ul
+ {
+ padding-left: 2.5em;
+ }
+ .content li
+ {
+ padding-top: 0.25em;
+ padding-bottom: 0.25em;
+ }
+ .content ul img {
+ vertical-align: middle;
+ }
+
+ .content a:visited
+ {
+ color: #4c0033;
+ text-decoration: none;
+ }
+
+ .content a:visited:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+
+ a:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+ descr p a
+ {
+ text-decoration: underline;
+ }
+
+ .descr p a:visited
+ {
+ text-decoration: underline;
+ }
+
+ .alphaChar{
+ width:95%;
+ background-color:#F6F6F6;
+ border:1px solid #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ font-size:12pt;
+ padding-left:10px;
+ margin-top:10px;
+ margin-bottom:10px;
+ }
+ .flowList{
+ /*vertical-align:top;*/
+ /*margin:20px auto;*/
+
+ column-count:3;
+ -webkit-column-count:3;
+ -moz-column-count:3;
+/*
+ column-width:100%;
+ -webkit-column-width:200px;
+ -col-column-width:200px;
+*/
+ column-gap:41px;
+ -webkit-column-gap:41px;
+ -moz-column-gap:41px;
+
+ column-rule: 1px dashed #ccc;
+ -webkit-column-rule: 1px dashed #ccc;
+ -moz-column-rule: 1px dashed #ccc;
+ }
+
+ .flowList dl{
+ }
+ .flowList dd{
+ /*display:inline-block;*/
+ margin-left:10px;
+ min-width:250px;
+ line-height: 1.5;
+ min-width:100%;
+ min-height:15px;
+ }
+
+ .flowList dd a{
+ }
+
+ .content .flowList p{
+ padding:0px;
+ }
+
+ .content .alignedsummary
+ {
+ margin: 15px;
+ }
+
+
+ .qmltype
+ {
+ text-align: center;
+ font-size: 120%;
+ }
+ .qmlreadonly
+ {
+ padding-left: 5px;
+ float: right;
+ color: #254117;
+ }
+
+ .qmldefault
+ {
+ padding-left: 5px;
+ float: right;
+ color: red;
+ }
+
+ .qmldoc
+ {
+ }
+
+ .generic .alphaChar{
+ margin-top:5px;
+ }
+
+ .generic .odd .alphaChar{
+ background-color: #F6F6F6;
+ }
+
+ .generic .even .alphaChar{
+ background-color: #FFFFFF;
+ }
+
+ .memItemRight{
+ padding: 0.25em 1.5em 0.25em 0;
+ }
+ .highlightedCode
+ {
+ margin: 1.0em;
+ }
+ .annotated td {
+ padding: 0.25em 0.5em 0.25em 0.5em;
+ }
+
+ .header .content .toc ul
+ {
+ padding-left: 0px;
+ }
+
+ .content .toc h3 {
+ border-bottom: 0px;
+ margin-top: 0px;
+ }
+
+ .content .toc h3 a:hover {
+ color: #00732F;
+ text-decoration: none;
+ }
+
+ .content .toc .level2
+ {
+ margin-left: 1.5em;
+ }
+
+ .content .toc .level3
+ {
+ margin-left: 3.0em;
+ }
+
+ .content ul li
+ {
+ background: url(../images/bullet_sq.png) no-repeat 0 0.7em;
+ padding-left: 1em
+ }
+
+ .content .toc li
+ {
+ background: url(../images/bullet_dn.png) no-repeat 0 5px;
+ padding-left: 1em
+ }
+
+ .relpage
+ {
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ padding: 25px 25px;
+ clear: both;
+ }
+ .relpage ul
+ {
+ float: none;
+ padding: 1.5em;
+ }
+
+ h3.fn, span.fn
+ {
+ -moz-border-radius:7px 7px 7px 7px;
+ -webkit-border-radius:7px 7px 7px 7px;
+ border-radius:7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ font-weight: bold;
+ word-spacing:3px;
+ padding:3px 5px;
+ }
+
+ .functionIndex {
+ font-size:12pt;
+ word-spacing:10px;
+ margin-bottom:10px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ width:100%;
+ }
+
+ .centerAlign
+ {
+ text-align:center;
+ }
+
+ .rightAlign
+ {
+ text-align:right;
+ }
+
+ .leftAlign
+ {
+ text-align:left;
+ }
+
+ .topAlign{
+ vertical-align:top
+ }
+
+ .functionIndex a{
+ display:inline-block;
+ }
+
+/* end content elements */
+/* footer elements */
+
+ .footer
+ {
+ color: #393735;
+ font-size: 0.75em;
+ text-align: center;
+ padding-top: 1.5em;
+ padding-bottom: 1em;
+ background-color: #E6E7E8;
+ margin: 0;
+ }
+ .footer p
+ {
+ margin: 0.25em
+ }
+ .small
+ {
+ font-size: 0.5em;
+ }
+/* end footer elements */
+
+ .item {
+ float: left;
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+ }
+
+
+ .item .primary {
+ margin-right: 220px;
+ position: relative;
+ }
+
+ .item hr {
+ margin-left: -220px;
+ }
+
+ .item .secondary {
+ float: right;
+ width: 200px;
+ position: relative;
+ }
+
+ .item .cols {
+ clear: both;
+ display: block;
+ }
+
+ .item .cols .col {
+ float: left;
+ margin-left: 1.5%;
+ }
+
+ .item .cols .col.first {
+ margin-left: 0;
+ }
+
+ .item .cols.two .col {
+ width: 45%;
+ }
+
+ .item .box {
+ margin: 0 0 10px 0;
+ }
+
+ .item .box h3 {
+ margin: 0 0 10px 0;
+ }
+
+ .cols.unclear {
+ clear:none;
+ }
+}
+
+/* end of screen media */
+
+/* start of print media */
+
+@media print
+{
+ input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult
+ {
+ display: none;
+ background: none;
+ }
+ .content
+ {
+ background: none;
+ display: block;
+ width: 100%; margin: 0; float: none;
+ }
+}
+/* end of print media */
diff --git a/tools/qdoc3/doc/config/style/style.css b/tools/qdoc3/doc/config/style/style.css
new file mode 100644
index 0000000..48ecedc
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/style.css
@@ -0,0 +1,1733 @@
+@media screen
+{
+
+/* basic elements */
+ html
+ {
+ color: #000000;
+ background: #FFFFFF;
+ }
+ body, div, dl, dt, dd, ul, ol, li, h1, h2, h3, h4, h5, h6, pre, code, form, fieldset, legend, input, button, textarea, p, blockquote, th, td
+ {
+ margin: 0;
+ padding: 0;
+ }
+ table
+ {
+ border-collapse: collapse;
+ border-spacing: 0;
+ }
+ fieldset, img
+ {
+ border: 0;
+ max-width:100%;
+ }
+ address, caption, cite, code, dfn, em, strong, th, var, optgroup
+ {
+ font-style: inherit;
+ font-weight: inherit;
+ }
+ del, ins
+ {
+ text-decoration: none;
+ }
+ li
+ {
+ list-style: none;
+ }
+ ol li
+ {
+ list-style: decimal;
+ }
+ caption, th
+ {
+ text-align: left;
+ }
+ h1, h2, h3, h4, h5, h6
+ {
+ font-size: 100%;
+ }
+ q:before, q:after
+ {
+ content: '';
+ }
+ abbr, acronym
+ {
+ border: 0;
+ font-variant: normal;
+ }
+ sup, sub
+ {
+ vertical-align: baseline;
+ }
+ tt, .qmlreadonly span, .qmldefault span
+ {
+ word-spacing:5px;
+ }
+ legend
+ {
+ color: #000000;
+ }
+ input, button, textarea, select, optgroup, option
+ {
+ font-family: inherit;
+ font-size: inherit;
+ font-style: inherit;
+ font-weight: inherit;
+ }
+ input, button, textarea, select
+ {
+ font-size: 100%;
+ }
+ strong
+ {
+ font-weight: bold;
+ }
+ em
+ {
+ font-style: italic;
+ }
+
+ /* adding Qt theme */
+ html
+ {
+ /* background-color: #e5e5e5;*/
+ }
+ body
+ {
+ background: #e6e7e8 url(../images/page_bg.png) repeat-x 0 0;
+ font: normal 13px/1.2 Verdana;
+ color: #363534;
+ }
+ a
+ {
+ color: #00732F;
+ text-decoration: none;
+ }
+ hr
+ {
+ background-color: #E6E6E6;
+ border: 1px solid #E6E6E6;
+ height: 1px;
+ width: 100%;
+ text-align: left;
+ margin: 15px 0px 15px 0px;
+ }
+
+ pre
+ {
+ border: 1px solid #DDDDDD;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
+ overflow-x: auto;
+ }
+ table, pre
+ {
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border: 1px solid #E6E6E6;
+ border-collapse: separate;
+ font-size: 11px;
+ margin-bottom: 25px;
+ }
+ pre.highlightedCode {
+ display: block;
+ overflow:hidden;
+ }
+ thead
+ {
+ margin-top: 5px;
+ font:600 12px/1.2 Arial;
+ }
+ th
+ {
+ padding: 5px 15px 5px 15px;
+ background-color: #E1E1E1;
+ border-left: 1px solid #E6E6E6;
+ }
+ td
+ {
+ padding: 3px 15px 3px 20px;
+ }
+ tr.odd td:hover, tr.even td:hover {}
+
+ td.rightAlign
+ {
+ padding: 3px 5px 3px 10px;
+ }
+ table tr.odd
+ {
+ border-left: 1px solid #E6E6E6;
+ background-color: #F6F6F6;
+ color: #66666E;
+ }
+ table tr.even
+ {
+ border-left: 1px solid #E6E6E6;
+ background-color: #ffffff;
+ color: #66666E;
+ }
+ table tr.odd td:hover, table tr.even td:hover
+ {
+ /* background-color: #E6E6E6;*/ /* disabled until further notice */
+ }
+
+ div.float-left
+ {
+ float: left; margin-right: 2em
+ }
+ div.float-right
+ {
+ float: right; margin-left: 2em
+ }
+
+ span.comment
+ {
+ color: #008B00;
+ font-style: italic
+ }
+ span.string, span.char
+ {
+ color: #000084;
+ }
+ span.number
+ {
+ color: #a46200;
+ }
+ span.operator
+ {
+ color: #202020;
+ }
+ span.keyword
+ {
+ color: #840000;
+ }
+ span.name
+ {
+ color: black
+ }
+ span.type
+ {
+ font-weight: bold
+ }
+ span.type a:visited
+ {
+ color: #0F5300;
+ }
+ span.preprocessor
+ {
+ color: #404040
+ }
+/* end basic elements */
+
+/* font style elements */
+ .heading
+ {
+ font: normal bold 16px/1.2 Arial;
+ padding-bottom: 15px;
+ }
+ .subtitle
+ {
+ font-size: 13px;
+ }
+ .small-subtitle
+ {
+ font-size: 13px;
+ }
+ .red
+ {
+ color:red;
+ }
+ .figCaption{
+ color:#363534;
+ font:italic 11px/1.2 Verdana;
+ padding-top:0;
+ }
+/* end font style elements */
+
+/* global settings*/
+ .header, .footer, .wrapper
+ {
+ min-width: 600px;
+ max-width: 1500px;
+ margin: 0 30px;
+ }
+ .header, .footer
+ {
+ display: block;
+ clear: both;
+ overflow: hidden;
+ }
+ .header:after, .footer:after, .breadcrumb:after, .wrap .content:after, .group:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+/* end global settings*/
+
+/* header elements */
+ .header
+ {
+ height: 115px;
+ position: relative;
+ }
+ .header .icon
+ {
+ position: absolute;
+ top: 13px;
+ left: 0;
+ }
+ .header .qtref
+ {
+ position: absolute;
+ top: 28px;
+ left: 88px;
+ width: 302px;
+ height: 22px;
+ }
+ .header .qtref span
+ {
+ display: block;
+ width: 302px;
+ height: 22px;
+ text-indent: -999em;
+ background: url(../images/sprites-combined.png) no-repeat -78px -235px;
+ }
+ .content a:visited
+ {
+ color: #4c0033;
+ text-decoration: none;
+ }
+ .content a:visited:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+
+ #nav-topright
+ {
+ height: 70px;
+ }
+
+ #nav-topright ul
+ {
+ list-style-type: none;
+ float: right;
+ width: 370px;
+ margin-top: 11px;
+ }
+
+ #nav-topright li
+ {
+ display: inline-block;
+ margin-right: 20px;
+ float: left;
+ }
+
+ #nav-topright li.nav-topright-last
+ {
+ margin-right: 0;
+ }
+
+ #nav-topright li a
+ {
+ background: transparent url(../images/sprites-combined.png) no-repeat;
+ height: 18px;
+ display: block;
+ overflow: hidden;
+ text-indent: -9999px;
+ }
+
+ #nav-topright li.nav-topright-home a
+ {
+ width: 65px;
+ background-position: -2px -91px;
+ }
+
+ #nav-topright li.nav-topright-home a:hover
+ {
+ background-position: -2px -117px;
+ }
+
+ #nav-topright li.nav-topright-dev a
+ {
+ width: 30px;
+ background-position: -76px -91px;
+ }
+
+ #nav-topright li.nav-topright-dev a:hover
+ {
+ background-position: -76px -117px;
+ }
+
+
+ #nav-topright li.nav-topright-labs a
+ {
+ width: 40px;
+ background-position: -114px -91px;
+ }
+
+ #nav-topright li.nav-topright-labs a:hover
+ {
+ background-position: -114px -117px;
+ }
+
+ #nav-topright li.nav-topright-doc a
+ {
+ width: 32px;
+ background-position: -162px -91px;
+ }
+
+ #nav-topright li.nav-topright-doc a:hover, #nav-topright li.nav-topright-doc-active a
+ {
+ background-position: -162px -117px;
+ }
+
+ #nav-topright li.nav-topright-blog a
+ {
+ width: 40px;
+ background-position: -203px -91px;
+ }
+
+ #nav-topright li.nav-topright-blog a:hover, #nav-topright li.nav-topright-blog-active a
+ {
+ background-position: -203px -117px;
+ }
+
+ #nav-topright li.nav-topright-shop a
+ {
+ width: 40px;
+ background-position: -252px -91px;
+ }
+
+ #nav-topright li.nav-topright-shop a:hover, #nav-topright li.nav-topright-shop-active a
+ {
+ background-position: -252px -117px;
+ }
+
+ #nav-logo
+ {
+ background: transparent url(../images/sprites-combined.png ) no-repeat 0 -225px;
+ left: -3px;
+ position: absolute;
+ width: 75px;
+ height: 75px;
+ top: 13px;
+ }
+ #nav-logo a
+ {
+ width: 75px;
+ height: 75px;
+ display: block;
+ text-indent: -9999px;
+ overflow: hidden;
+ }
+
+ .shortCut-topleft-inactive
+ {
+ padding-left: 3px;
+ padding-right: 3px;
+ background: transparent url( ../images/sprites-combined.png) no-repeat 0px -58px;
+ height: 20px;
+ }
+ .shortCut-topleft-inactive span
+ {
+ font-variant: normal;
+ }
+ .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover
+ {
+ text-decoration:none;
+ }
+ #shortCut
+ {
+ padding-top: 10px;
+ font-weight: bolder;
+ color: #b0adab;
+ }
+ #shortCut ul
+ {
+ list-style-type: none;
+ float: left;
+ width: 347px;
+ margin-left: 100px;
+ }
+ #shortCut li
+ {
+ display: inline-block;
+ margin-right: 25px;
+ float: left;
+ white-space: nowrap;
+ }
+ #shortCut li a
+ {
+ color: #b0adab;
+ }
+ #shortCut li a:hover
+ {
+ color: #44a51c;
+ }
+/* end header elements */
+
+/* content and sidebar elements */
+ .wrapper
+ {
+ background: url(../images/bg_r.png) repeat-y 100% 0;
+ }
+
+ .wrapper .hd
+ {
+ padding-left: 16px;
+ height: 15px;
+ background: url(../images/page.png) no-repeat 0px -15px;
+ overflow: hidden;
+ }
+
+ .wrapper .hd span
+ {
+ height: 15px;
+ display: block;
+ overflow: hidden;
+ background: url(../images/page.png) no-repeat 100% -30px;
+ }
+
+ .wrapper .bd
+ {
+ background: url(../images/bg_l_blank.png) repeat-y 0 0;
+ position: relative;
+ }
+
+ .wrapper .ft
+ {
+ padding-left: 16px;
+ height: 15px;
+ background: url(../images/page.png) no-repeat 0 -75px;
+ overflow: hidden;
+ }
+
+ .wrapper .ft span
+ {
+ height: 15px;
+ display: block;
+ background: url(../images/page.png) no-repeat 100% -60px;
+ overflow: hidden;
+ }
+ .navTop{
+ float:right;
+ display:block;
+ padding-right:15px;
+ }
+/* end content and sidebar elements */
+
+/* sidebar elements */
+ .sidebar
+ {
+ float: left;
+ margin-left: 5px;
+ width: 200px;
+ font-size: 11px;
+ }
+
+ .sidebar .searchlabel
+ {
+ padding: 0 0 2px 17px;
+ font: normal bold 11px/1.2 Verdana;
+ }
+
+ .sidebar .search
+ {
+ padding: 0 15px 0 16px;
+ }
+
+ .sidebar .search form
+ {
+ background: url(../images/sprites-combined.png) no-repeat -6px -348px;
+ height:21px;
+ padding:2px 0 0 5px;
+ width:167px;
+ }
+
+ .sidebar .search form input#pageType
+ {
+ width: 158px;
+ height: 19px;
+ padding: 0;
+ border: 0px;
+ outline: none;
+ font: 13px/1.2 Verdana;
+ }
+
+ .sidebar .box
+ {
+ padding: 17px 15px 5px 16px;
+ }
+
+ .sidebar .box .first
+ {
+ background-image: none;
+ }
+
+ .sidebar .box h2
+ {
+ font: bold 16px/1.2 Arial;
+ padding: 0;
+ }
+ .sidebar .box h2 span
+ {
+ overflow: hidden;
+ display: inline-block;
+ }
+ .sidebar .box#lookup h2
+ {
+ background-image: none;
+ }
+ .sidebar #lookup.box h2 span
+ {
+ }
+ .sidebar .box#topics h2
+ {
+ background-image: none;
+ }
+ .sidebar #topics.box h2 span
+ {
+ }
+ .sidebar .box#examples h2
+ {
+ background-image: none;
+ }
+ .sidebar #examples.box h2 span
+ {
+ }
+
+ .sidebar .box .list
+ {
+ display: block;
+ max-height:200px;
+ min-height:120px;
+ overflow-y:auto;
+ overflow-x:none;
+ }
+ .list li a:hover
+ {
+ text-decoration: underline;
+ }
+ .sidebar .box ul
+ {
+ padding-bottom:5px;
+ padding-left:10px;
+ padding-top:5px;
+ }
+ .sidebar .box ul li
+ {
+ padding-left: 12px;
+ background: url(../images/bullet_gt.png) no-repeat 0 5px;
+ margin-bottom: 5px;
+ }
+ .sidebar .bottombar
+ {
+ background: url(../images/box_bg.png) repeat-x 0 bottom;
+ }
+ .sidebar .box ul li.noMatch
+ {
+ background: none;
+ color:#FF2A00;
+ font-style:italic;
+ }
+ .sidebar .box ul li.hit
+ {
+ background: none;
+ color:#AAD2F0;
+ font-style:italic;
+ }
+ .sidebar .search form input.loading
+ {
+ background:url("../images/spinner.gif") no-repeat scroll right center transparent;
+ }
+
+ .sidebar .search form {
+ _height: 23px;
+ _width: 169px;
+ }
+
+ #resultdialog {
+ display: none;
+ position: absolute;
+ *left: 30px;
+ _left: 0;
+ *top: 35px;
+ _top: 30px;
+ _zoom: 1;
+ background-color: #fff;
+ border: 1px solid #666;
+ z-index: 4;
+ margin-top: 5px;
+ _margin: 0 0 0 -20px;
+ padding: 10px;
+ width: 30%;
+ _width: 196px;
+ height: 250px;
+ overflow: auto;
+ -webkit-border-radius: .5em;
+ -moz-border-radius: .5em;
+ border-radius: .5em;
+ -webkit-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
+ -moz-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
+ box-shadow: 0 4px 6px 0 rgba(0,0,0,.2);
+ font-size: 11px;
+ }
+
+ #resultdialog a
+ {
+ color: #00732f;
+ }
+
+ #resultdialog.active {
+ display: block;
+ }
+
+ .narrow #resultdialog {
+ width: 60%;
+ _width: 360px;
+ }
+
+ .narrow #resultdialog.active {
+ right: 10px;
+ *left: auto;
+ _left: auto;
+ _right: -20px;
+ }
+
+
+ #resultdialog #resultclose {
+ float: right;
+ }
+
+ #resultdialog p,
+ #resultdialog ul {
+ clear: both;
+ margin: 3px 0;
+ }
+
+ p#searchcount span {
+ display: none;
+ }
+
+ p#searchcount.all span#resultcount,
+ p#searchcount.api span#apicount,
+ p#searchcount.article span#articlecount,
+ p#searchcount.example span#examplecount {
+ display: inline;
+ }
+
+ #resultlist li {
+ display: none;
+ }
+
+ #resultlist.api li.api,
+ #resultlist.article li.article,
+ #resultlist.example li.example,
+ #resultlist.all li {
+ display: block;
+ }
+
+ #resultlinks.api a#showapiresults,
+ #resultlinks.api a#showapiresults:hover,
+ #resultlinks.article a#showarticleresults,
+ #resultlinks.article a#showarticleresults:hover,
+ #resultlinks.example a#showexampleresults,
+ #resultlinks.example a#showexampleresults:hover,
+ #resultlinks.all a#showallresults,
+ #resultlinks.all a#showallresults:hover {
+ color: #B0ADAB;
+ }
+ .floatingResult{
+ z-index:1;
+ position:relative;
+ padding-top:0px;
+ background-color:white;
+ border:solid 1px black;
+ height:250px;
+ width:600px;
+ overflow-x:hidden;
+ overflow-y:auto;
+ }
+
+ .floatingResult:hover{
+ display:block;
+ }
+ .floatingResult:hover{
+ }
+/* end sidebar elements */
+
+/* content elements */
+ .wrap
+ {
+ margin: 0 5px 0 5px;
+ overflow: visible;
+ }
+
+ .wrap .toolbar
+ {
+ background-color: #fafafa;
+ border-bottom: 1px solid #d1d1d1;
+ height: 20px;
+ position: relative;
+ }
+ .wrap .toolbar .toolblock
+ {
+ position: absolute;
+ }
+ .wrap .toolbar .breadcrumb
+ {
+ font-size: 11px;
+ line-height: 1.2;
+ padding: 0 0 10px 21px;
+ height: 10px;
+ }
+ .wrap .toolbar .toolbuttons
+ {
+ padding: 0 0 10px 21px;
+ right: 5px;
+ vertical-align: middle;
+ overflow: hidden;
+ }
+ .wrap .toolbar .toolbuttons .active
+ {
+ color: #00732F;
+ }
+ .wrap .toolbar .toolbuttons ul
+ {
+ float: right;
+ }
+ .wrap .toolbar .toolbuttons li
+ {
+ float: left;
+ text-indent: -10px;
+ margin-top: -5px;
+ margin-right: 15px;
+ font-weight: bold;
+ color: #B0ADAB;
+ font: bold 10px/1.2 Verdana;
+ }
+
+ .toolbuttons #print
+ {
+ border-left: 1px solid #c5c4c4;
+ margin-top: 0;
+ padding-left: 7px;
+ text-indent: 0;
+ }
+ .toolbuttons #print a
+ {
+ width: 16px;
+ height: 16px;
+ }
+
+ .toolbuttons #print a span
+ {
+ width: 16px;
+ height: 16px;
+ text-indent: -999em;
+ display: block;
+ overflow: hidden;
+ background: url(../images/sprites-combined.png) no-repeat -137px -311px;
+ }
+
+ .toolbuttons #smallA
+ {
+ font-size: 10pt;
+ }
+ .toolbuttons #medA
+ {
+ font-size: 12pt;
+ }
+ .toolbuttons #bigA
+ {
+ font-size: 14pt;
+ margin-right: 7px;
+ }
+
+ #smallA:hover, #medA:hover, #bigA:hover
+ {
+ color: #00732F;
+ }
+
+ .wrap .content
+ {
+ padding: 30px;
+ word-wrap:break-word;
+ }
+
+ .wrap .breadcrumb ul
+ {
+ }
+ .wrap .breadcrumb ul li
+ {
+ float: left;
+ background: url(../images/breadcrumb.png) no-repeat 0 3px;
+ padding-left: 15px;
+ margin-left: 15px;
+ font-weight: bold;
+ }
+ .wrap .breadcrumb ul li.last
+ {
+ font-weight: normal;
+ }
+ .wrap .breadcrumb ul li a
+ {
+ color: #363534;
+ }
+ .wrap .breadcrumb ul li.first
+ {
+ background-image: none;
+ padding-left: 0;
+ margin-left: 0;
+ }
+
+ .wrap .content ol li {
+ background:none;
+ font:normal 10pt/1.2 Verdana;
+
+ margin-bottom:10px;
+ margin-left:12px;
+ /*list-style-type:disc;*/
+ }
+
+ .wrap .content ol li
+ {
+ background:none;
+ margin-bottom: 10px;
+ padding-left:0px;
+ margin-left:52px;
+ }
+
+ .wrap .content li
+ {
+ background: url(../images/bullet_sq.png) no-repeat 0 5px;
+ font: normal 400 10pt/1.2 Verdana;
+ margin-bottom: 10px;
+ padding-left:12px;
+ }
+
+ .content li:hover {}
+
+ .wrap .content h1
+ {
+ font: bold 18px/1.2 Arial;
+ }
+ .wrap .content h2
+ {
+ font:600 16px/1.2 Arial;
+ margin-top:15px;
+ width:100%;
+ }
+ .wrap .content h3
+ {
+ font: bold 14px/1.2 Arial;
+ font:600 16px/1.2 Arial;
+ margin-top:15px;
+ width:100%;
+ }
+ .wrap .content p
+ {
+ line-height: 20px;
+ padding: 5px;
+ }
+ .wrap .content table p
+ {
+ line-height: 20px;
+ }
+ .wrap .content ul
+ {
+ padding-left: 25px;
+ padding-top: 10px;
+ }
+ .wrap .content ul img {
+ vertical-align:middle;
+ }
+ a:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+ descr p a
+ {
+ text-decoration: underline;
+ }
+
+ .descr p a:visited
+ {
+ text-decoration: underline;
+ }
+ .feedback
+ {
+ float: none;
+ position: absolute;
+ right: 15px;
+ bottom: 10px;
+ font: normal 8px/1 Verdana;
+ color: #B0ADAB;
+ }
+ .feedback:hover
+ {
+ float: right;
+ font: normal 8px/1 Verdana;
+ color: #00732F;
+ text-decoration: underline;
+ }
+ .alphaChar{
+ width:95%;
+ background-color:#F6F6F6;
+ border:1px solid #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ font-size:12pt;
+ padding-left:10px;
+ margin-top:10px;
+ margin-bottom:10px;
+ }
+ .flowList{
+ /*vertical-align:top;*/
+ /*margin:20px auto;*/
+
+ column-count:3;
+ -webkit-column-count:3;
+ -moz-column-count:3;
+/*
+ column-width:100%;
+ -webkit-column-width:200px;
+ -col-column-width:200px;
+*/
+ column-gap:41px;
+ -webkit-column-gap:41px;
+ -moz-column-gap:41px;
+
+ column-rule: 1px dashed #ccc;
+ -webkit-column-rule: 1px dashed #ccc;
+ -moz-column-rule: 1px dashed #ccc;
+ }
+
+ .flowList dl{
+ }
+ .flowList dd{
+ /*display:inline-block;*/
+ margin-left:10px;
+ min-width:250px;
+ line-height: 1.5;
+ min-width:100%;
+ min-height:15px;
+ }
+
+ .flowList dd a{
+ }
+
+ .wrap .content .flowList p{
+ padding:0px;
+ }
+
+ .content .alignedsummary
+ {
+ margin: 15px;
+ }
+
+
+ .qmltype
+ {
+ text-align: center;
+ font-size: 160%;
+ }
+ .qmlreadonly
+ {
+ padding-left: 5px;
+ float: right;
+ color: #254117;
+ }
+
+ .qmldefault
+ {
+ padding-left: 5px;
+ float: right;
+ color: red;
+ }
+
+ .qmldoc
+ {
+ }
+
+ *.qmlitem p
+ {
+ }
+ #feedbackBox
+ {
+ display: none;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ position: fixed;
+ top: 100px;
+ left: 33%;
+ height: 230px;
+ width: 400px;
+ padding: 5px;
+ background-color: #e6e7e8;
+ z-index: 4;
+ }
+ #feedcloseX
+ {
+ display: inline;
+ padding: 5px 5px 0 0;
+ margin-bottom: 3px;
+ color: #363534;
+ font-weight:bold;
+ float: right;
+ text-decoration: none;
+ }
+
+ #feedbox
+ {
+ display: inline;
+ width: 370px;
+ height: 120px;
+ margin: 0px 25px 10px 15px;
+ }
+ #noteHead
+ {
+ font-weight:bold;
+ padding:10px 10px 10px 20px;
+ }
+ #feedsubmit
+ {
+ display: inline;
+ float: right;
+ margin: 4px 32px 0 0;
+ }
+
+ .note
+ {
+ font-size:7pt;
+ padding-bottom:3px;
+ padding-left:20px;
+ }
+
+ #blurpage
+ {
+ display: none;
+ position: fixed;
+ float: none;
+ top: 0px;
+ left: 0px;
+ right: 0px;
+ bottom: 0px;
+ background: transparent url(../images/feedbackground.png) 0 0;
+ z-index: 3;
+ }
+ .toc
+ {
+ float: right;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border: 1px solid #DDDDDD;
+ margin: 0 20px 10px 10px;
+ padding: 20px 15px 20px 20px;
+ height: auto;
+ width: 200px;
+ }
+
+ .toc h3, .generic a
+ {
+ font: bold 12px/1.2 Arial;
+ }
+
+ .generic{
+ }
+ .generic td{
+ /* padding:5px;*/
+ }
+ .generic .alphaChar{
+ margin-top:5px;
+ }
+
+ .generic .odd .alphaChar{
+ background-color: #F6F6F6;
+ }
+
+ .generic .even .alphaChar{
+ background-color: #FFFFFF;
+ }
+
+ .alignedsummary{}
+ .propsummary{}
+ .memItemLeft{}
+ .memItemRight{
+ padding:3px 15px 3px 0;
+ }
+ .bottomAlign{}
+ .highlightedCode
+ {
+ margin:10px;
+ }
+ .LegaleseLeft{}
+ .valuelist{}
+ .annotated td{
+ padding: 3px 5px 3px 5px;
+ }
+ .obsolete{}
+ .compat{}
+ .flags{}
+ .qmlsummary{}
+ .qmlitem{}
+ .qmlproto{}
+ .qmlname{}
+ .qmlreadonly{}
+ .qmldefault{}
+ .qmldoc{}
+ .qt-style{}
+ .redFont{}
+ code{}
+
+ .wrap .content .toc ul
+ {
+ padding-left: 0px;
+ }
+
+ .wrap .content .toc h3{
+ border-bottom:0px;
+ margin-top:0px;
+ }
+
+ .wrap .content .toc h3 a:hover{
+ color:#00732F;
+ text-decoration:none;
+ }
+
+
+ .wrap .content .toc .level2
+ {
+ margin-left: 15px;
+ }
+
+ .wrap .content .toc .level3
+ {
+ margin-left: 30px;
+ }
+
+ .content .toc li
+ {
+ font: normal 10px/1.2 Verdana;
+ background: url(../images/bullet_dn.png) no-repeat 0 5px;
+ }
+ .relpage
+ {
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ border: 1px solid #DDDDDD;
+ padding: 25px 25px;
+ clear: both;
+ }
+ .relpage ul
+ {
+ float: none;
+ padding: 15px;
+ }
+ .content .relpage li
+ {
+ font: normal 11px/1.2 Verdana;
+ }
+ h3.fn, span.fn
+ {
+ -moz-border-radius:7px 7px 7px 7px;
+ -webkit-border-radius:7px 7px 7px 7px;
+ border-radius:7px 7px 7px 7px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ font-weight: bold;
+ word-spacing:3px;
+ padding:3px 5px;
+ }
+
+ .functionIndex {
+ font-size:12pt;
+ word-spacing:10px;
+ margin-bottom:10px;
+ background-color: #F6F6F6;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #E6E6E6;
+ -moz-border-radius: 7px 7px 7px 7px;
+ -webkit-border-radius: 7px 7px 7px 7px;
+ border-radius: 7px 7px 7px 7px;
+ width:100%;
+ }
+
+ .centerAlign
+ {
+ text-align:center;
+ }
+
+ .rightAlign
+ {
+ text-align:right;
+ }
+
+ .leftAlign
+ {
+ text-align:left;
+ }
+
+ .topAlign{
+ vertical-align:top
+ }
+
+ .functionIndex a{
+ display:inline-block;
+ }
+/* end content elements */
+
+/* footer elements */
+ .footer
+ {
+ min-height: 100px;
+ color: #797775;
+ font: normal 9px/1 Verdana;
+ text-align: center;
+ padding-top: 40px;
+ background-color: #E6E7E8;
+ margin: 0;
+ }
+ .small
+ {
+ font: normal 9px/1 Verdana;
+ }
+/* end footer elements */
+
+ /* start index box */
+ .indexbox
+ {
+ width: 100%;
+ display:inline-block;
+ }
+
+ .indexboxcont
+ {
+ display: block;
+
+ }
+
+ .indexboxbar
+ {
+ background: transparent url(../images/horBar.png ) repeat-x left bottom;
+ margin-bottom: 25px;
+
+
+ }
+
+ .indexboxcont .section
+ {
+ display: inline-block;
+ width: 49%;
+ *width:42%;
+ _width:42%;
+ padding:0 2% 0 1%;
+ vertical-align:top;
+ }
+
+ .indexboxcont .indexIcon
+ {
+ width: 11%;
+ *width:18%;
+ _width:18%;
+ overflow:hidden;
+ }
+
+ .indexboxcont .section {
+ float: left;
+ }
+
+ .indexboxcont .section p
+ {
+ padding-top: 20px;
+ padding-bottom: 20px;
+ }
+ .indexboxcont .sectionlist
+ {
+ display: inline-block;
+ vertical-align:top;
+ width: 32.5%;
+ padding: 0;
+ }
+ .indexboxcont .sectionlist ul
+ {
+ margin-bottom: 20px;
+ }
+
+ .indexboxcont .sectionlist ul li
+ {
+ line-height: 12px;
+ }
+
+ .content .indexboxcont li
+ {
+ font: normal bold 13px/1 Verdana;
+ }
+
+ .indexbox a:hover, .indexbox a:visited:hover
+ {
+ color: #4c0033;
+ text-decoration: underline;
+ }
+
+ .indexbox a:visited
+ {
+ color: #00732f;
+ text-decoration: none;
+ }
+
+ .indexbox .indexIcon {
+ width: 11%;
+ }
+
+ .indexbox .indexIcon span
+ {
+ display: block;
+ }
+
+ .indexbox.guide .indexIcon span
+ {
+ width: 96px;
+ height: 137px;
+ background: url(../images/sprites-combined.png) no-repeat -5px -376px;
+ padding: 0;
+ }
+
+ .indexbox.tools .indexIcon span
+ {
+ width: 115px;
+ height: 137px;
+ background: url(../images/sprites-combined.png) no-repeat -111px -376px;
+ padding: 0;
+ }
+ .indexboxcont:after
+ {
+ content: ".";
+ display: block;
+ height: 0;
+ clear: both;
+ visibility: hidden;
+ }
+
+
+
+/* start of creator spec*/
+ .creator
+ {
+ margin-left:0px;
+ margin-right:0px;
+ padding-left:0px;
+ padding-right:0px;
+ }
+ .creator .wrap .content ol li {
+ list-style-type:decimal;
+ }
+ .creator .header .icon,
+ .creator .feedback,
+ .creator .t_button,
+ .creator .feedback,
+ .creator #feedbackBox,
+ .creator #feedback,
+ .creator #blurpage,
+ /* .creator .indexbox .indexIcon span,*/
+ .creator .wrapper .hd,
+ /* .creator .indexbox .indexIcon,*/
+ .creator .header #nav-logo,
+ .creator #offlinemenu,
+ .creator #offlinesearch,
+ .creator .header #nav-topright,
+ .creator .header #shortCut ,
+ .creator .wrapper .hd,
+ .creator .wrapper .ft,
+ .creator .sidebar,
+ .creator .wrap .feedback
+ {
+ display:none;
+ }
+
+ body.creator
+ {
+ background: none;
+
+ font: normal 13px/1.2 Verdana;
+ color: #363534;
+ background-color: #FAFAFA;
+ }
+
+ .wrap .content ol li {
+
+ }
+
+
+ .creator .header, .creator .footer, .creator .wrapper
+ {
+ max-width: 1500px;
+ margin: 0px;
+ }
+
+ .creator .wrapper
+ {
+ position:relative;
+ top:5px;
+ }
+ .creator .wrapper .bd
+ {
+ background:#FFFFFF;
+ }
+
+
+ .creator .header, .footer
+ {
+ display: block;
+ clear: both;
+ overflow: hidden;
+ }
+ .creator .wrap .content p
+
+ {
+ line-height: 20px;
+ padding: 5px;
+ }
+
+ .creator .header .qtref span
+ {
+ background:none;
+ }
+
+ .creator .footer
+ {
+ border-top:1px solid #E5E5E5;
+ height: 50px;
+ margin:0px;
+ padding:10px;
+ }
+
+ .creator .footer p
+ {
+ text-align:justify;
+ max-width:900px;
+ }
+
+ .creator .wrap
+ {
+ padding:0 5px 0 5px;
+ margin: 0px;
+ }
+ .creator .wrap .toolbar
+ {
+ border-bottom:1px solid #E5E5E5;
+ /*width:100%;*/
+ margin-left:-5px;
+ margin-right:-5px;
+ }
+ .creator .wrap .breadcrumb ul li a
+ {
+ /* color: #363534;*/
+ color: #00732F;
+ }
+
+ .creator .wrap .content
+ {
+ padding: 0px;
+ word-wrap:break-word;
+ }
+
+ .creator .wrap .content ol li {
+ background:none;
+ font: inherit;
+ padding-left: 0px;
+ }
+
+ .creator .wrap .content .descr ol li {
+ margin-left: 45px;
+ }
+
+ .creator .content .alignedsummary
+ {
+ margin: 5px;
+ width:100%;
+ }
+ .creator .generic{
+ max-width:75%;
+ }
+ .creator .generic td{
+ /*padding:0;*/
+ }
+ .creator .indexboxbar
+ {
+ border-bottom:1px solid #E5E5E5;
+ margin-bottom: 25px;
+ background: none;
+ }
+
+ .creator .header
+ {
+ width: 100%;
+ margin: 0;
+ height: auto;
+ background-color: #ffffff;
+ padding: 10px 0 5px 0;
+ overflow: visible;
+ border-bottom: solid #E5E5E5 1px;
+ z-index:1;
+ /* position:fixed;*/
+ }
+
+ .creator .header .content
+ {
+ }
+ .creator .header .qtref
+ {
+ color: #00732F;
+ position: static;
+ float: left;
+ margin-left: 5px;
+ font: bold 18px/1 Arial;
+ }
+
+ .creator .header .qtref:visited
+ {
+ color: #00732F;
+ }
+ .creator .header .qtref:hover
+ {
+ color: #00732F;
+ text-decoration:none;
+ }
+ .creator .header .qtref span
+ {
+ background-image: none;
+ text-indent: 0;
+ text-decoration:none;
+ }
+
+ .creator .wrap .toolbar
+ {
+ display:block;
+ padding-top:0px;
+ }
+
+ .creator .wrap .breadcrumb ul li {
+ font-weight: normal;
+ }
+
+ .creator .wrap .breadcrumb ul li a {
+ /*color: #44a51c;*/
+ }
+
+ .creator .wrap .breadcrumb ul li.last a {
+ /*color: #363534;*/
+ }
+
+ .creator #narrowmenu ul
+ {
+ border-bottom:solid 1px #E5E5E5;
+ border-left:solid 1px #E5E5E5;
+ border-right:solid 1px #E5E5E5;
+ }
+
+ .creator #narrowmenu li ul {
+ margin-top:-15px;
+ }
+
+ .creator .toc {
+ margin:10px 20px 10px 10px;
+ }
+
+ .creator #narrowsearch, .creator #narrowmenu{
+ display:none;
+ }
+/* end of creator spec*/
+
+ .item {
+ float: left;
+ position: relative;
+ width: 100%;
+ overflow: hidden;
+ }
+
+ .item .primary {
+ margin-right: 220px;
+ position: relative;
+ }
+
+ .item hr {
+ margin-left: -220px;
+ }
+
+ .item .secondary {
+ float: right;
+ width: 200px;
+ position: relative;
+ }
+
+ .item .cols {
+ clear: both;
+ display: block;
+ }
+
+ .item .cols .col {
+ float: left;
+ margin-left: 1.5%;
+ }
+
+ .item .cols .col.first {
+ margin-left: 0;
+ }
+
+ .item .cols.two .col {
+ width: 45%;
+ }
+
+ .item .box {
+ margin: 0 0 10px 0;
+ }
+
+ .item .box h3 {
+ margin: 0 0 10px 0;
+ }
+
+ .cols.unclear {
+ clear:none;
+ }
+}
+
+/* end of screen media */
+
+/* start of print media */
+
+@media print
+{
+ input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult
+ {
+ display: none;
+ background: none;
+ }
+ .content
+ {
+ background: none;
+ display: block;
+ width: 100%; margin: 0; float: none;
+ }
+}
+/* end of print media */
diff --git a/tools/qdoc3/doc/config/style/style_ie6.css b/tools/qdoc3/doc/config/style/style_ie6.css
new file mode 100644
index 0000000..16fb850
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/style_ie6.css
@@ -0,0 +1,54 @@
+.indexbox, .indexboxcont, .group {
+ zoom: 1;
+ height: 1%;
+}
+
+.sidebar {
+ margin-left: 3px;
+ width: 199px;
+ overflow: hidden;
+}
+
+.sidebar .search form {
+ position: relative;
+}
+
+.sidebar .search form fieldset {
+ position: absolute;
+ margin-top: -1px;
+}
+
+.sidebar .search form input#searchstring {
+ border: 1px solid #fff;
+ height: 18px;
+}
+
+.wrap {
+ zoom: 1;
+}
+
+.content,
+.toolbar {
+ zoom: 1;
+ margin-left: -3px;
+ position: relative;
+}
+
+.indexbox {
+ clear: both;
+}
+
+.indexboxcont .section {
+ zoom: 1;
+ float: left;
+}
+
+.indexboxcont .sectionlist {
+ zoom: 1;
+ float: left;
+}
+
+.wrap .toolbar .toolbuttons li {
+ text-indent: 0;
+ margin-right: 8px;
+} \ No newline at end of file
diff --git a/tools/qdoc3/doc/config/style/style_ie7.css b/tools/qdoc3/doc/config/style/style_ie7.css
new file mode 100644
index 0000000..afbff5f
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/style_ie7.css
@@ -0,0 +1,19 @@
+.indexbox, .indexboxcont, .group {
+ min-height: 1px;
+}
+
+.sidebar .search form input#searchstring {
+ border: 1px solid #fff;
+ height: 17px;
+}
+
+
+.indexboxcont .section {
+ zoom: 1;
+ float: left;
+}
+
+.indexboxcont .sectionlist {
+ zoom: 1;
+ float: left;
+}
diff --git a/tools/qdoc3/doc/config/style/style_ie8.css b/tools/qdoc3/doc/config/style/style_ie8.css
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/style_ie8.css
diff --git a/tools/qdoc3/doc/config/style/superfish.css b/tools/qdoc3/doc/config/style/superfish.css
new file mode 100644
index 0000000..2bdaef4
--- /dev/null
+++ b/tools/qdoc3/doc/config/style/superfish.css
@@ -0,0 +1,51 @@
+.sf-menu, .sf-menu * {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+.sf-menu {
+ line-height: 1.0;
+}
+.sf-menu ul {
+ position: absolute;
+ top: -999em;
+ width: 10em; /* left offset of submenus need to match (see below) */
+}
+.sf-menu ul li {
+ width: 100%;
+}
+.sf-menu li:hover {
+ visibility: inherit; /* fixes IE7 'sticky bug' */
+}
+.sf-menu li {
+ float: left;
+ position: relative;
+}
+.sf-menu a {
+ display: block;
+ position: relative;
+}
+.sf-menu li:hover ul,
+.sf-menu li.sfHover ul {
+ left: 0;
+ top: 2.5em; /* match top ul list item height */
+ z-index: 99;
+}
+ul.sf-menu li:hover li ul,
+ul.sf-menu li.sfHover li ul {
+ top: -999em;
+}
+ul.sf-menu li li:hover ul,
+ul.sf-menu li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
+ul.sf-menu li li:hover li ul,
+ul.sf-menu li li.sfHover li ul {
+ top: -999em;
+}
+ul.sf-menu li li li:hover ul,
+ul.sf-menu li li li.sfHover ul {
+ left: 10em; /* match ul width */
+ top: 0;
+}
diff --git a/tools/qdoc3/doc/qdoc-manual.qdoc b/tools/qdoc3/doc/qdoc-manual.qdoc
index 7290c0e..712dcea 100644
--- a/tools/qdoc3/doc/qdoc-manual.qdoc
+++ b/tools/qdoc3/doc/qdoc-manual.qdoc
@@ -27,727 +27,874 @@
/*!
\page index.html
- \nextpage QDoc Manual
+ \nextpage Introduction to QDoc
- \title QDoc Manual - Table of Contents
+ \title Table of Contents
\list
- \o \l{QDoc Manual}
- \o \l{QDoc Commands}
- \list
- \o \l{Markup Commands}
- \o \l{Text Formatting Commands}
- \o \l{Document Structuring Commands}
- \o \l{Verbatim Code Commands}
- \o \l{Quoting External Code Commands}
- \list
- \o \l{Example File}
- \endlist
- \o \l{Linking Commands}
- \o \l{Graphic Commands}
- \o \l{Container Commands}
- \o \l{Document Contents Commands}
- \o \l{Miscellaneous Commands}
- \list
- \o \l{signalandslots.qdocinc}
- \o \l{objectmodel.qdocinc}
- \o \l{layoutmanagement.qdocinc}
- \endlist
- \o \l{Topical Commands}
- \o \l{Contextual Commands}
- \o \l{Navigation Commands}
- \o \l{Status Commands}
- \o \l{Thread Support Commands}
- \o \l{Relating Commands}
- \o \l{Grouping Commands}
- \o \l{Title Commands}
- \endlist
- \o \l{QDoc Configuration}
- \list
- \o \l{General Configuration Variables}
- \o \l{Creating Help Project Files}
- \o \l{C++ Specific Configuration Variables}
- \o \l{HTML Specific Configuration Variables}
- \o \l{Supporting Derived Projects}
- \o \l{QDoc Compatibility}
- \o \l{qt.qdocconf}
- \o \l{minimum.qdocconf}
- \endlist
- \o \l{QDoc Commands - Alphabetical List}
+ \o \l {Introduction to QDoc}
+ \o \l {Command Index}
+ \o \l {Topic Commands}
+ \o \l {Context Commands}
+ \list
+ \o \l {Document Navigation}
+ \o \l {Reporting Status}
+ \o \l {Thread Support}
+ \o \l {Relating Things}
+ \o \l {Grouping Things}
+ \o \l {Naming Things}
+ \endlist
+ \o \l{Markup Commands}
+ \list
+ \o \l {Text Markup}
+ \o \l {Document Structure}
+ \o \l {Including Code Inline}
+ \o \l {Including External Code}
+ \o \l {Creating Links}
+ \o \l {Including Images}
+ \o \l {Tables and Lists}
+ \o \l {Special Content}
+ \o \l {Miscellaneous}
+ \endlist
+ \o \l {The QDoc Configuration File}
+ \list
+ \o \l {General Configuration Variables}
+ \o \l {Creating Help Project Files}
+ \o \l {C++ Specific Configuration Variables}
+ \o \l {HTML Specific Configuration Variables}
+ \o \l {Supporting Derived Projects}
+ \o \l {Compatibility Issues}
+ \o \l {qt.qdocconf}
+ \o \l {minimum.qdocconf}
+ \endlist
\endlist
+
*/
/*!
\page 01-qdoc-manual.html
- \contentspage QDoc Manual - Table of Contents
- \previouspage QDoc Manual - Table of Contents
- \nextpage QDoc Commands
+ \contentspage Table of Contents
+ \previouspage Table of Contents
+ \nextpage Command Index
+
+ \title Introduction to QDoc
+
+ QDoc is a tool used by Qt Developers to generate documentation of
+ software projects by extracting the documentation from the project
+ source files and then formatting it as HTML pages or DITA XML
+ documents, etc. The documentation is embedded in the source files
+ in \e {qdoc comments}. A qdoc comment begins with an exclamation
+ mark \bold{(!)} e.g.:
+
+ \code
+ / *!
+ \class QObject
+ \brief The QObject class is the base class of all Qt objects.
+
+ \ingroup objectmodel
+
+ \reentrant
+
+ QObject is the heart of the Qt \l{Object Model}. The
+ central feature in this model is a very powerful mechanism
+ for seamless object communication called \l{signals and
+ slots}. You can connect a signal to a slot with connect()
+ and destroy the connection with disconnect(). To avoid
+ never ending notification loops you can temporarily block
+ signals with blockSignals(). The protected functions
+ connectNotify() and disconnectNotify() make it possible to
+ track connections.
+
+ QObjects organize themselves in \l {Object Trees &
+ Ownership} {object trees}. When you create a QObject with
+ another object as parent, the object will automatically
+ add itself to the parent's children() list. The parent
+ takes ownership of the object; i.e., it will automatically
+ delete its children in its destructor. You can look for an
+ object by name and optionally type using findChild() or
+ findChildren().
+
+ Every object has an objectName() and its class name can be
+ found via the corresponding metaObject() (see
+ QMetaObject::className()). You can determine whether the
+ object's class inherits another class in the QObject
+ inheritance hierarchy by using the inherits() function.
+
+ ....
+ * /
+ \endcode
- \title QDoc Manual
+ From this snippet, QDoc generates the now famous HTML page \l
+ {http://doc.trolltech.com/4.7/qobject.html#details} {QObject Class Reference}.
+
+ This manual explains how to use the QDoc commands to write useful
+ qdoc comments in your source files. It also explains how to create
+ a \l {The QDoc Configuration File} {QDoc configuration file},
+ which you must pass to QDoc on the command line when you run it.
- QDoc is the internal tool used by Qt Development Frameworks for generating
- documentation. This document is a reference for QDoc command syntax and
- configuration.
+ \section1 Running QDoc
- \section1 Overview
+ The current name of the QDoc program is \c {qdoc3}. To run qdoc3
+ from the command line, give it the name of a configuration file:
- \list I
- \o \section2 \l {QDoc Commands}
+ \quotation
+ \c {/current/dir$ ../../bin/qdoc3 ./config.qdocconf}
+ \endquotation
- \l {QDoc Commands - Alphabetical List}{A complete alphabetical
- list}.
+ \c{config.qdocconf} is your \l{The QDoc Configuration File} {QDoc
+ configuration file}. The configuration file is where tell QDoc
+ where to find the source files from which it will extract the QDoc
+ comments it will use to generate the documentation. It is also
+ where you tell QDoc what kind of output to generate (HTML, DITA
+ XML,...), and where to put the generated output. The configuration
+ file also contains other information for QDoc.
- There are two main categories of commands for QDoc: markup
- commands and meta-commands.
+ \section1 Command Types
- The markup commands indicate the generated documentation's
- appearance and logical structure. The meta-commands provide
- information about the document as well as the documented
- item. The meta-commands can be further categorized as topical
- commands and contextual commands.
+ QDoc interprets three types of commands:
- \list
- \o \l {Markup Commands}
- \list
- \o \l {Text Formatting Commands}{Text Formatting}
- \o \l {Document Structuring Commands}{Document Structuring}
- \o \l {Verbatim Code Commands}{Verbatim Code}
- \o \l {Quoting External Code Commands}{Quoting External Code}
- \o \l {Linking Commands}{Linking}
- \o \l {Graphic Commands}{Graphic}
- \o \l {Container Commands}{Container}
- \o \l {Document Contents Commands}{Document Contents}
- \o \l {Miscellaneous Commands}{Miscellaneous}
- \endlist
- \o \l {Topical Commands}
- \o \l {Contextual Commands}
- \list
- \o \l {Navigation Commands}{Navigation}
- \o \l {Status Commands}{Status}
- \o \l {Thread Support Commands}{Thread Support}
- \o \l {Relating Commands}{Relating}
- \o \l {Grouping Commands}{Grouping}
- \o \l {Title Commands}{Title}
- \endlist
- \endlist
+ \list
+ \o \l {Topic Commands}
+ \o \l {Context Commands}
+ \o \l {Markup Commands}
\endlist
- \list II
- \o \section2 \l {QDoc Configuration}
-
- When running QDoc to generate the documentation, you must
- specify a configuration file on the command line. The
- configuration file is a list of entries of entries of the form
- "variable = value".
-
- \list
- \o \l {Configuration Variables}
- \o \l {Configuration File Examples}
- \endlist
-
- Some particular configuration variables allow you to use QDoc
- to support Qt-based projects; i.e to make projects, such as Qt
- Solutions, contain references to the online Qt documentation.
-
- \list
- \o \l {Supporting Derived Projects}
- \endlist
-
- QDoc is a tool that constantly evolves to suit our needs, for
- that reason there are some compatibility issues between old and
- new practices.
-
- \list
- \o \l {QDoc Compatibility}
- \endlist
- \endlist
+ Topic commands identify the elememt you are documenting, e.g. a C++
+ class, function, or type, an example, or an extra page of text
+ that doesn't map to an underlying C++ elememnt.
+
+ Context commands tell QDoc how the element being documented
+ relates to other documented elememnts, e.g. next and previous page
+ links or inclusion in page groups or library modules. Context
+ commands can also provide information about the documented element
+ that QDoc can't get from the source files, e.g. whether the
+ element is thread-safe, an overloaded or reimplemented function,
+ or that it has been deprecated.
+
+ Markup commands tell QDoc how text and image elements in the
+ document should be rendered, or about the document's outline
+ structure.
*/
/*!
- \page 02-qdoc-commands.html
- \previouspage QDoc Manual
- \contentspage QDoc Manual - Table of Contents
- \nextpage Markup Commands
-
- \title QDoc Commands
+ \page 03-qdoc-commands-markup.html
+ \contentspage Table of Contents
+ \previouspage Naming Things
+ \nextpage Text Markup
- There are two main categories of commands for QDoc: markup
- commands and meta-commands.
+ \title Markup Commands
The markup commands indicate the generated documentation's visual
- appearance and logical structure. The meta-commands provide
- information about the documentation unit as well as the documented
- item. The meta-commands can be further categorized as topical
- commands and contextual commands.
-
- \section1 Alphabetical List
-
- A complete \l{QDoc Commands - Alphabetical List }
- {alphabetical list of the QDoc commands}.
-
- \section1 Categories
+ appearance and logical structure.
\list
- \o \l {Markup Commands}
- \o \l {Topical Commands}
- \o \l {Contextual Commands}
+ \o \l {04-qdoc-commands-textmarkup.html#a-command} {\\a}
+ \o \l {11-qdoc-commands-specialcontent.html#abstract-command} {\\abstract}
+ \o \l {06-qdoc-commands-includecodeinline.html#badcode-command} {\\badcode}
+ \o \l {04-qdoc-commands-textmarkup.html#bold-command} {\\bold}
+ \o \l {11-qdoc-commands-specialcontent.html#brief-command} {\\brief}
+ \o \l {04-qdoc-commands-textmarkup.html#c-command} {\\c}
+ \o \l {09-qdoc-commands-includingimages.html#caption-command} {\\caption}
+ \o \l {05-qdoc-commands-documentstructure.html#chapter-command} {\\chapter}
+ \o \l {06-qdoc-commands-includecodeinline.html#code-command} {\\code}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#codeline-command} {\\codeline}
+ \o \l {04-qdoc-commands-textmarkup.html#div-command} {\\div} \span {class="newStuff"} {(new)}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#dots-command} {\\dots}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#else-command} {\\else}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#endif-command} {\\endif}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#expire-command} {\\expire}
+ \o \l {11-qdoc-commands-specialcontent.html#footnote-command} {\\footnote}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#generatelist-command} {\\generatelist}
+ \o \l {10-qdoc-commands-tablesandlists.html#header-command} {\\header}
+ \o \l {04-qdoc-commands-textmarkup.html#i-command} {\\i}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#if-command} {\\if}
+ \o \l {09-qdoc-commands-includingimages.html#image-command} {\\image}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#include-command} {\\include}
+ \o \l {09-qdoc-commands-includingimages.html#inlineimage-command} {\\inlineimage}
+ \o \l {08-qdoc-commands-creatinglinks.html#keyword-command} {\\keyword}
+ \o \l {08-qdoc-commands-creatinglinks.html#l-command} {\\l}
+ \o \l {11-qdoc-commands-specialcontent.html#legalese-command} {\\legalese}
+ \o \l {10-qdoc-commands-tablesandlists.html#list-command} {\\list}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#meta-command} {\\meta}
+ \o \l {06-qdoc-commands-includecodeinline.html#newcode-command} {\\newcode}
+ \o \l {10-qdoc-commands-tablesandlists.html#o-command} {\\o}
+ \o \l {06-qdoc-commands-includecodeinline.html#oldcode-command} {\\oldcode}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#omit-command} {\\omit}
+ \o \l {05-qdoc-commands-documentstructure.html#part-command} {\\part}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printline-command} {\\printline}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printto-command} {\\printto}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printuntil-command} {\\printuntil}
+ \o \l {11-qdoc-commands-specialcontent.html#quotation-command} {\\quotation}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#quotefile-command} {\\quotefile}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#quotefromfile-command} {\\quotefromfile}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#raw-command} {\\raw} \span {class="newStuff"} {(deprecated)}
+ \o \l {10-qdoc-commands-tablesandlists.html#row-command} {\\row}
+ \o \l {08-qdoc-commands-creatinglinks.html#sa-command} {\\sa}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionOne-command} {\\section1}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionTwo-command} {\\section2}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionThree-command} {\\section3}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionFour-command} {\\section4}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipline-command} {\\skipline}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipto-command} {\\skipto}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipuntil-command} {\\skipuntil}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#snippet-command} {\\snippet}
+ \o \l {04-qdoc-commands-textmarkup.html#span-command} {\\span} \span {class="newStuff"} {(new)}
+ \o \l {04-qdoc-commands-textmarkup.html#sub-command} {\\sub}
+ \o \l {04-qdoc-commands-textmarkup.html#sup-command} {\\sup}
+ \o \l {10-qdoc-commands-tablesandlists.html#table-command} {\\table}
+ \o \l {11-qdoc-commands-specialcontent.html#tableofcontents-command} {\\tableofcontents}
+ \o \l {08-qdoc-commands-creatinglinks.html#target-command} {\\target}
+ \o \l {04-qdoc-commands-textmarkup.html#tt-command} {\\tt}
+ \o \l {04-qdoc-commands-textmarkup.html#underline-command} {\\underline}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#raw-command} {\\unicode}
+ \o \l {11-qdoc-commands-specialcontent.html#warning-command} {\\warning}
+ \o \l {04-qdoc-commands-textmarkup.html#backslash-command} {\\\\}
\endlist
*/
/*!
- \page 03-qdoc-commands-markup.html
- \contentspage QDoc Manual - Table of Contents
- \previouspage QDoc Commands
- \nextpage Text Formatting Commands
+ \page 04-qdoc-commands-textmarkup.html
+ \contentspage Table of Contents
+ \previouspage Markup Commands
+ \nextpage Document Structure
- \title Markup Commands
+ \title Text Markup
- The markup commands indicate the generated documentation's visual
- appearance and logical structure.
+ The text formatting commands indicate how text is to be rendered.
- \section1 Alphabetical List
-
- \l {04-qdoc-commands-textformatting.html#backslash}{\\\\},
- \l {04-qdoc-commands-textformatting.html#a}{\\a},
- \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract},
- \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode},
- \l {04-qdoc-commands-textformatting.html#bold}{\\bold},
- \l {11-qdoc-commands-documentcontents.html#brief}{\\brief},
- \l {04-qdoc-commands-textformatting.html#c}{\\c},
- \l {09-qdoc-commands-graphic.html#caption}{\\caption},
- \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter},
- \l {06-qdoc-commands-verbatimcode.html#code}{\\code},
- \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
- \l {07-0-qdoc-commands-quoting.html#dots}{\\dots},
- \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else},
- \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif},
- \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire},
- \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote},
- \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist},
- \l {10-qdoc-commands-container.html#header}{\\header},
- \l {04-qdoc-commands-textformatting.html#i}{\\i},
- \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if},
- \l {09-qdoc-commands-graphic.html#image}{\\image},
- \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include},
- \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage},
- \l {08-qdoc-commands-linking.html#keyword}{\\keyword},
- \l {08-qdoc-commands-linking.html#l}{\\l},
- \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese},
- \l {10-qdoc-commands-container.html#list}{\\list},
- \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta},
- \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode},
- \l {10-qdoc-commands-container.html#o}{\\o},
- \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode},
- \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit},
- \l {05-qdoc-commands-documentstructuring.html#part}{\\part},
- \l {07-0-qdoc-commands-quoting.html#printline}{\\printline},
- \l {07-0-qdoc-commands-quoting.html#printto}{\\printto},
- \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil},
- \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation},
- \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile},
- \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
- \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw},
- \l {10-qdoc-commands-container.html#row}{\\row},
- \l {08-qdoc-commands-linking.html#sa}{\\sa},
- \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1},
- \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2},
- \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3},
- \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4},
- \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline},
- \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto},
- \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil},
- \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet},
- \l {04-qdoc-commands-textformatting.html#sub}{\\sub},
- \l {04-qdoc-commands-textformatting.html#sup}{\\sup},
- \l {10-qdoc-commands-container.html#table}{\\table},
- \l {11-qdoc-commands-documentcontents.html#tableofcontents}
- {\\tableofcontents},
- \l {08-qdoc-commands-linking.html#target}{\\target},
- \l {04-qdoc-commands-textformatting.html#tt}{\\tt},
- \l {04-qdoc-commands-textformatting.html#underline}{\\underline},
- \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\unicode},
- \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
+ \target a-command
+ \section1 \\a (parameter marker)
- \section1 Categories
- \list
- \o \l {Text Formatting Commands}
- \o \l {Document Structuring Commands}
- \o \l {Verbatim Code Commands}
- \o \l {Quoting External Code Commands}
- \o \l {Linking Commands}
- \o \l {Graphic Commands}
- \o \l {Container Commands}
- \o \l {Document Contents Commands}
- \o \l {Miscellaneous Commands}
- \endlist
+ The \\a command tells QDoc the next word is a formal parameter name.
-*/
+ A warning is emitted when a formal parameter is not documented or
+ is misspelled, so when you document a function you should mention
+ each formal parameter by name in the function description,
+ preceded by the \\a command. The parameter name is then rendered
+ in italics.
-/*!
- \page 04-qdoc-commands-textformatting.html
- \contentspage QDoc Manual - Table of Contents
- \previouspage Markup Commands
- \nextpage Document Structuring Commands
+ \code
+ / *!
+ Constructs a line edit containing the text
+ \a contents. The \a parent parameter is sent
+ to the QWidget constructor.
+ * /
- \title Text Formatting Commands
+ QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)
+ {
+ ...
+ }
- The text formatting commands indicate how the regular text in the
- documentation is rendered.
+ \endcode
- \section1 Alphabetical List
+ QDoc renders this as:
- \l {04-qdoc-commands-textformatting.html#backslash}{\\\\},
- \l {04-qdoc-commands-textformatting.html#a}{\\a},
- \l {04-qdoc-commands-textformatting.html#bold}{\\bold},
- \l {04-qdoc-commands-textformatting.html#c}{\\c},
- \l {04-qdoc-commands-textformatting.html#i}{\\i},
- \l {04-qdoc-commands-textformatting.html#sub}{\\sub},
- \l {04-qdoc-commands-textformatting.html#sup}{\\sup},
- \l {04-qdoc-commands-textformatting.html#tt}{\\tt},
- \l {04-qdoc-commands-textformatting.html#underline}{\\underline}
+ \quotation
+ \bold {QLineEdit::QLineEdit ( const QString &
+ contents, QWidget *parent )}
- \section1 Command Descriptions
+ Constructs a line edit containing the text \a contents.
+ The \a parent parameter is sent to the QWidget constructor.
+ \endquotation
- \table
- \header
- \o Command
- \o Description
+ You can enclose the formal parameter name in curly brackets, if
+ you want to, but it isn't necessary.
- \row
+ \target c-command
+ \section1 \\c (code font)
+
+ The \\c command is used for rendering variable names, user-defined
+ class names, and C++ keywords (e.g. \c int and \c for) in the code
+ font.
- \o \bold \\\\ \target backslash
- \o \bold {The \\\\ command expands to a single backslash.}
+ The command renders its argument using a typewriter font. For
+ example:
- QDoc commands always start with a backslash alone. To
- display an actual backslash in the text you need to type
- two of the kind. If you want to display two backslashes,
- you need to type four, and so forth. For example:
+ \code
+ / *!
+ The \c AnalogClock class provides a clock widget with hour
+ and minute hands that is automatically updated every
+ few seconds.
+ * /
+ \endcode
- \code
- / *!
- The \\\\ command is useful if you want a
- backslash to appear verbatim, for example,
- writing C:\\windows\\home\\.
- * /
- \endcode
+ QDoc renders this as:
- will be rendered as
+ \quotation
+ The \c AnalogClock class provides a clock widget with hour
+ and minute hands that is automatically updated every
+ few seconds.
+ \endquotation
- \quotation
- The \\\\ command is useful if you want a
- backslash to appear verbatim, for example,
- writing C:\\windows\\home\\.
- \endquotation
+ If the text to be rendered in the code font contains spaces, enclose the
+ entire text in curly brackets.
- However, if you want your text to appear in a typewriter
- font as well, you can use the \l {c}{\\c} command instead,
- which accepts and renders the backslash as any other
- character. For example:
+ \code
+ \c {QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)}
+ \endcode
- \code
- / *!
- The \\c command is useful if you want a
- backslash to appear verbatim, and the word
- that contains it written in a typewriter font,
- like this: \c {C:\windows\home\}.
- * /
- \endcode
+ QDoc renders this as:
- will be rendered as
+ \quotation
+ \c {QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)}
+ \endquotation
- \quotation
- The \\c command is useful if you want a
- backslash to appear verbatim, and the word
- that contains it written in a typewriter font,
- like this: \c {C:\windows\home\}.
- \endquotation
+ The \\c command accepts the special character \c \ within its
+ argument, i.e. it renders it as a normal character. So if you want
+ to use nested commands, you must use the \l {tt-command} {teletype
+ (\\tt)} command instead.
- \row
- \o \bold \\a \target a
- \o \bold {The \\a command indicates that the next word
- is a parameter when documenting functions.}
+ See also \l {tt-command} {\\tt} and \l {code-command} {\\code}.
+
+ \target div-command
+ \section1 \\div \span {class="newStuff"} {(new)}
+
+ The \\div and \\enddiv commands delimit a large or small block of
+ text (which may include other QDoc commands) to which special
+ formatting attributes should be applied.
- Warnings are emitted when function parameters are
- undocumented or misspelled, so whenever you write
- documentation for functions you should make sure you
- mention all the parameters and precede each of these by the
- \\a command. The parameter is then rendered in italic. For
- example:
+ An argument must be provided in curly braces, as in the qdoc
+ comment shown below. The argument is not interpreted but is used
+ as attribute(s) of the tag that is ultimately output by qdoc.
- \code
- / *!
- Constructs a line edit containing the text
- \a contents.
+ For example, we might want to render an inline image so that it
+ floats to the right of the current block of text:
- The \a parent parameter is sent to the
- QWidget constructor.
- * /
+ \code
+ / *!
+ \div {class="float-right"}
+ \inlineimage qml-column.png
+ \enddiv
- QLineEdit::QLineEdit(const QString &contents, QWidget *parent)
- :QWidget(parent)
- {
- ...
- }
+ * /
+ \endcode
- \endcode
+ If qdoc is generating HTML, it will translate these commands to:
- will be rendered as
+ \code
+ <div class="float-right"><p><img src="images/qml-column.png" /></p></div>
+ \endcode
- \quotation
- \bold {QLineEdit::QLineEdit ( const QString &
- contents, QWidget *parent )}
+ For HTML, the attribute value \e {float-right} then will refer to
+ a clause in the style.css file. which in this case could be:
- Constructs a line edit containing the text \a contents.
+ \code
+ div.float-right
+ {
+ float: right; margin-left: 2em
+ }
+ \endcode
- The \a parent parameter is sent to the QWidget
- constructor.
+ If qdoc is generating DITA XML, it will translate the commands to:
- \endquotation
+ \code
+ <sectiondiv outputclass="float-right">
+ <p>
+ <fig>
+ <image href="images/qml-column.png" placement="inline"/>
+ </fig>
+ </p>
+ </sectiondiv>
+ \endcode
- The \\a command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument. However, a parameter
- is always a single word, so braces are rarely
- necessary. And for the same reason, parentheses seldom
- occur.
+ Your DITA XML publishing program must then recognize the \e
+ {outputclass} attribute value.
- \row
- \o \bold \\c \target c
- \o \bold {The \\c command can be used to render variables,
- user-defined classes and C++ keywords like \c int,
- \c for, etc.}
+ \note The \bold {\\div} command can be nested.
+
+ Below is an example taken from the index.qdoc file used to
+ generate index.html for Qt 4.7:
- The command renders its argument using a typewriter font. For
- example:
+ \code
+ \div {class="indexbox guide"}
+ \div {class="heading"}
+ Qt Developer Guide
+ \enddiv
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="section indexIcon"} \emptyspan
+ \enddiv
+ \div {class="section"}
+ Qt is a cross-platform application and UI
+ framework. Using Qt, you can write web-enabled
+ applications once and deploy them across desktop,
+ mobile and embedded operating systems without
+ rewriting the source code.
+ \enddiv
+ \div {class="section sectionlist"}
+ \list
+ \o \l{Getting Started Guides} {Getting started}
+ \o \l{Installation} {Installation}
+ \o \l{how-to-learn-qt.html} {How to learn Qt}
+ \o \l{tutorials.html} {Tutorials}
+ \o \l{Qt Examples} {Examples}
+ \o \l{qt4-7-intro.html} {What's new in Qt 4.7}
+ \endlist
+ \enddiv
+ \enddiv
+ \enddiv
+ \endcode
- \code
- / *!
- The \c AnalogClock class provides a clock widget with hour
- and minute hands that is automatically updated every
- few seconds.
- * /
- \endcode
+ When all the class attribute values are defined as they are in the
+ style.css file that is used for rendering the Qt 4.7 documentation,
+ the above example is rendered as:
+
+ \div {class="indexbox guide"}
+ \div {class="heading"}
+ Qt Developer Guide
+ \enddiv
+ \div {class="indexboxcont indexboxbar"}
+ \div {class="section indexIcon"} \emptyspan
+ \enddiv
+ \div {class="section"}
+ Qt is a cross-platform application and UI
+ framework. Using Qt, you can write web-enabled
+ applications once and deploy them across desktop,
+ mobile and embedded operating systems without
+ rewriting the source code.
+ \enddiv
+ \div {class="section sectionlist"}
+ \list
+ \o \l{Getting Started Guides} {Getting started}
+ \o \l{Installation} {Installation}
+ \o \l{how-to-learn-qt.html} {How to learn Qt}
+ \o \l{tutorials.html} {Tutorials}
+ \o \l{Qt Examples} {Examples}
+ \o \l{qt4-7-intro.html} {What's new in Qt 4.7}
+ \endlist
+ \enddiv
+ \enddiv
+ \enddiv
+
+ When generating DITA XML, qdoc outputs the nested \e {div} commands as:
- will be rendered as
+ \code
+ <sectiondiv outputclass="indexbox guide">
+ <sectiondiv outputclass="heading">
+ <p>Qt Developer Guide</p>
+ </sectiondiv>
+ <sectiondiv outputclass="indexboxcont indexboxbar">
+ <sectiondiv outputclass="section indexIcon"/>
+ <sectiondiv outputclass="section">
+ <p>Qt is a cross-platform application and UI
+ framework. Using Qt, you can write
+ web-enabled applications once and deploy
+ them across desktop, mobile and embedded
+ operating systems without rewriting the
+ source code.
+ </p>
+ </sectiondiv>
+ <sectiondiv outputclass="section sectionlist">
+ <ul>
+ <li>
+ <xref href="gettingstarted.xml#id-606ee7a8-219b-47b7-8f94-91bc8c76e54c">Getting started</xref>
+ </li>
+ <li>
+ <xref href="installation.xml#id-075c20e2-aa1e-4f88-a316-a46517e50443">Installation</xref>
+ </li>
+ <li>
+ <xref href="how-to-learn-qt.xml#id-49f509b5-52f9-4cd9-9921-74217b9a5182">How to learn Qt</xref>
+ </li>
+ <li>
+ <xref href="tutorials.xml#id-a737f955-a904-455f-b4aa-0dc69ed5a64f">Tutorials</xref>
+ </li>
+ <li>
+ <xref href="all-examples.xml#id-98d95159-d65b-4706-b08f-13d80080448d">Examples</xref>
+ </li>
+ <li>
+ <xref href="qt4-7-intro.xml#id-519ae0e3-4242-4c2a-b2be-e05d1e95f177">What's new in Qt 4.7</xref>
+ </li>
+ </ul>
+ </sectiondiv>
+ </sectiondiv>
+ </sectiondiv>
+ \endcode
- \quotation
- The \c AnalogClock class provides a clock widget with hour
- and minute hands that is automatically updated every
- few seconds.
- \endquotation
+ Your DITA XML publishing program must recognize the values of the
+ \e {outputclass} attribute.
+
+ See also \l {span-command} {\\span}.
- The \\c command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument.
+ \target span -command
+ \section1 \\span \span {class="newStuff"} {(new)}
+
+ The \\span command is for applying special formatting
+ attributes to a small block of text.
+
+ Two arguments must be provided, each argument in curly braces, as
+ shown in the qdoc comment below. The first argument is not
+ interpreted but is used as the formatting attribute(s) of the tag
+ that is ultimately output by qdoc. The second argument is the text
+ to be rendered with the special formatting attributes.
+
+ For example, we might want to render the first word of each
+ element in a numeric list in blue.
- The \\c command accepts the special character \c \ within
- its argument, i.e. it renders it as a normal character. So
- if you want to use nested commands, you must use the \l
- {tt}{teletype (\\tt)} command instead.
+ \code
+ / *!
+ Global variables with complex types:
+ \list 1
+ \o \span {class="variableName"} {mutableComplex1} in globals.cpp at line 14
+ \o \span {class="variableName"} {mutableComplex2} in globals.cpp at line 15
+ \o \span {class="variableName"} {constComplex1} in globals.cpp at line 16
+ \o \span {class="variableName"} {constComplex2} in globals.cpp at line 17
+ \endlist
+ * /
+ \endcode
- See also \l {tt}{\\tt} and \l {code}{\\code}.
+ Class \e {variableName} refers to a clause in your style.css.
- \row
- \o \bold \\tt \target tt
- \o \bold {The \\tt command can be used to render variables,
- user-defined classes and C++ keywords like \c int, \c
- for, etc.}
+ \code
+ .variableName
+ {
+ font-family: courier;
+ color: blue
+ }
+ \endcode
- The \\tt command behaves just like the \l {c}{\\c} command,
- except that \\tt parses QDoc commands (like \l {i}{\\i}, \l
- {bold}{\\bold} and \l {underline}{\\underline}) contained
- within its argument.
+ Using the \e {variableName} clause shown above, the example is rendered as:
- The command renders its argument using a monospace
- font. For example:
+ Global variables with complex types:
+ \list 1
+ \o \span {class="variableName"} {mutableComplex1} in globals.cpp at line 14
+ \o \span {class="variableName"} {mutableComplex2} in globals.cpp at line 15
+ \o \span {class="variableName"} {constComplex1} in globals.cpp at line 16
+ \o \span {class="variableName"} {constComplex2} in globals.cpp at line 17
+ \endlist
- \code
- / *!
- After \c setupUi() populates the main container with
- child widgets it scans the main container's list of
- slots for names with the form
- \tt{on_\i{objectName}_\i{signalName}().}
- * /
- \endcode
+ \note The \bold span command does not cause a new paragraph to be
+ started.
- will be rendered as
+ See also \l {div-command} {\\div}.
+
+ \target tt-command
+ \section1 \\tt (teletype font)
- \quotation
- After \c setupUi() populates the main container with
- child widgets it scans the main container's list of
- slots for names with the form
- \tt{on_\i{objectName}_\i{signalName}().}
- \endquotation
+ The \\tt command renders its argument in a monospace font. This
+ command behaves just like the \l {c-command} {\\c} command, except
+ that \\tt allows you to nest QDoc commands within the argument
+ (e.g. \l {i-command} {\\i}, \l {bold-command} {\\bold} and \l
+ {underline-command} {\\underline}).
- The \\tt command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument.
+ \code
+ / *!
+ After \c setupUi() populates the main container with
+ child widgets it scans the main container's list of
+ slots for names with the form
+ \tt{on_\e{objectName}_\e{signalName}().}
+ * /
+ \endcode
- See also \l {c}{\\c}.
+ QDoc renders this as:
- \row
- \o \bold \\bold \target bold
- \o \bold {The \\bold command renders its argument using
- a bold font.}
+ \quotation
+ After \c setupUi() populates the main container with
+ child widgets it scans the main container's list of
+ slots for names with the form
+ \tt{on_\e{objectName}_\e{signalName}().}
+ \endquotation
- For example:
+ If the text to be rendered in the code font contains spaces, enclose the
+ entire text in curly brackets.
- \code
- / *!
- This is regular text; \bold {this text is
- rendered using the \\bold command}.
- * /
- \endcode
+ \code
+ \tt {QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)}
+ \endcode
- will be rendered as
+ QDoc renders this as:
- \quotation
- This is regular text; \bold {this text is rendered using
- the \\bold command}.
- \endquotation
+ \quotation
+ \tt {QLineEdit::QLineEdit(const QString &contents, QWidget *parent) :QWidget(parent)}
+ \endquotation
- The command follows the same conventions as the \l {i}{\\i}
- command for \l {argument}{punctuation, parentheses and use
- of braces} for the argument.
+ See also \l {c-command} {\\c}.
- \row
- \o \bold \\i \target i
- \o \bold {The \\i command renders its argument in italic.}
+ \target bold-command
+ \section1 \\bold
- \warning This is preliminary functionality. For
- more information, see the \l
- {26-qdoc-commands-compatibility.html#i-versus-e}{compatibility}
- section.
+ The \\bold command renders its argument in bold font.
- \target argument
- Normally, a command argument ends at the next whitespace [1],
- but braces can be used to group words [2]. For example:
+ \code
+ / *!
+ This is regular text; \bold {this text is
+ rendered using the \\bold command}.
+ * /
+ \endcode
- \code
- / *!
- Here, we render \i {a few words} in italic.
- * /
- \endcode
+ QDoc renders this as:
- will be rendered as
+ \quotation
+ This is regular text; \bold {this text is rendered using
+ the \\bold command}.
+ \endquotation
- \quotation
- Here, we render \i {a few words} in italic.
- \endquotation
+ \target i-command
+ \section1 \\i (italics)
- If you want to use other QDoc commands within an argument
- that contains spaces, you always need to enclose the
- argument with braces. But QDoc is smart enough to count
- parentheses [3], so you don't need braces in cases like this:
+ The \\i command renders its argument in italics.
- \code
- / *!
- An argument can sometimes contain whitespaces,
- for example: \i QPushButton(tr("A Brand New Button"))
- * /
- \endcode
+ \warning If \\i doesn't work and you get some strange error
+ meesages from qdoc3 about using \\o outside of tables and lists,
+ use \bold{\\e} for italics instead of \\i. For more information,
+ see the relevant explanation in the section on \l
+ {26-qdoc-commands-compatibility.html#i-versus-e} {compatibility
+ issues}.
- will be rendered as
+ If the argument contains spaces or other punctuation, enclose the
+ argument in curly brackets.
- \quotation
- An argument can sometimes contain whitespaces,
- for example: \i QPushButton(tr("A Brand New Button"))
- \endquotation
+ \code
+ / *!
+ Here, we render \i {a few words} in italic.
+ * /
+ \endcode
- Finally, trailing punctuation is not included in an
- argument [4], nor is 's [5]
+ QDoc renders this as:
- \raw HTML
- <table align="center" cellpadding="2"
- cellspacing="1" border="0">
- <tr valign="top" bgcolor="#a2c511">
- <th></th>
- <th>QDoc Syntax</th>
- <th>Generated Documentation</th>
- </tr>
+ \quotation
+ Here, we render \e {a few words} in italic.
+ \endquotation
- <tr valign="top" bgcolor="#d0d0d0">
- <td>1</td>
- <td>A variation of a command button is a \i menu
- button.</td>
- <td>A variation of a command button is a <i>menu</i>
- button.</td>
- </tr>
+ If you want to use other QDoc commands within an argument that
+ contains spaces, you always need to enclose the argument with
+ braces. But QDoc is smart enough to count parentheses [3], so you
+ don't need braces in cases like this:
- <tr valign="top" bgcolor="#c0c0c0">
- <td>2</td>
- <td>The QPushButton widget provides a
- \i {command button}.</td>
- <td>The QPushButton widget provides a
- <i>command button</i>.</td>
- </tr>
+ \code
+ / *!
+ An argument can sometimes contain whitespaces,
+ for example: \i QPushButton(tr("A Brand New Button"))
+ * /
+ \endcode
- <tr valign="top" bgcolor="#d0d0d0">
- <td>3</td>
- <td>Another class of buttons are option buttons
- \i (see QRadioButton).</td>
- <td>Another class of buttons are option buttons
- <i> (see QRadioButton)</i>.</td>
- </tr>
+ QDoc renders this as:
- <tr valign="top" bgcolor="#c0c0c0">
- <td>4</td>
- <td>A push button emits the signal \i clicked().</td>
- <td>A push button emits the signal <i>clicked</i>().</td>
- </tr>
+ \quotation
+ An argument can sometimes contain whitespaces,
+ for example: \e QPushButton(tr("A Brand New Button"))
+ \endquotation
- <tr valign="top" bgcolor="#d0d0d0">
- <td>5</td>
- <td>The \i QPushButton's checked property is
- false by default.</td>
- <td>The <i>QPushButton</i>'s checked property is
- false by default.</td>
- </tr>
+ Finally, trailing punctuation is not included in an argument [4],
+ nor is 's [5]
- </table>
- \endraw
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th></th>
+ <th>QDoc Syntax</th>
+ <th>Generated Documentation</th>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>1</td>
+ <td>A variation of a command button is a \e menu
+ button.</td>
+ <td>A variation of a command button is a <i>menu</i>
+ button.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>2</td>
+ <td>The QPushButton widget provides a
+ \e {command button}.</td>
+ <td>The QPushButton widget provides a
+ <i>command button</i>.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>3</td>
+ <td>Another class of buttons are option buttons
+ \e (see QRadioButton).</td>
+ <td>Another class of buttons are option buttons
+ <i> (see QRadioButton)</i>.</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#c0c0c0">
+ <td>4</td>
+ <td>A push button emits the signal \e clicked().</td>
+ <td>A push button emits the signal <i>clicked</i>().</td>
+ </tr>
+
+ <tr valign="top" bgcolor="#d0d0d0">
+ <td>5</td>
+ <td>The \e QPushButton's checked property is
+ false by default.</td>
+ <td>The <i>QPushButton</i>'s checked property is
+ false by default.</td>
+ </tr>
- \row
- \o \bold \\sub \target sub
- \o \bold {The \\sub command renders its argument lower
- than the baseline of the regular text, using a smaller font.}
+ </table>
+ \endraw
- For example:
+ \target sub-command
+ \section1 \\sub
- \code
- / *!
- Definition (Range): Consider the sequence
- {x\sub n}\sub {n > 1} . The set
+ The \\sub command renders its argument lower than the baseline of
+ the regular text, using a smaller font.
- {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
+ \code
+ / *!
+ Definition (Range): Consider the sequence
+ {x\sub n}\sub {n > 1} . The set
- is called the range of the sequence.
- * /
- \endcode
+ {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
- will be rendered as
+ is called the range of the sequence.
+ * /
+ \endcode
- \quotation
- Definition (Range): Consider the sequence
- {x\sub n}\sub {n > 1} . The set
+ QDoc renders this as:
- {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
+ \quotation
+ Definition (Range): Consider the sequence
+ {x\sub n}\sub {n > 1} . The set
- is called the range of the sequence.
- \endquotation
+ {x\sub 2, x\sub 3, x\sub 4, ...} = {x\sub n ; n = 2, 3, 4, ...}
- The \\sub command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument.
+ is called the range of the sequence.
+ \endquotation
- \row
- \o \bold \\sup \target sup
- \o \bold {The \\sup command renders its argument higher than
- the baseline of the regular text, using a smaller font.}
+ If the argument contains spaces or other punctuation, enclose the
+ argument in curly brackets.
- For example:
+ \target sup-command
+ \section1 \\sup
- \code
- / *!
- The series
+ The \\sup command renders its argument higher than
+ the baseline of the regular text, using a smaller font.
- 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
+ \code
+ / *!
+ The series
- is called the \i {geometric series}.
- * /
- \endcode
+ 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
- will be rendered as
+ is called the \i {geometric series}.
+ * /
+ \endcode
- \quotation
- The series
+ QDoc renders this as:
- 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
+ \quotation
+ The series
- is called the \i {geometric series}.
- \endquotation
+ 1 + a + a\sup 2 + a\sup 3 + a\sup 4 + ...
- The \\sup command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation, parentheses
- and use of braces} for the argument.
+ is called the \e {geometric series}.
+ \endquotation
- \row
- \o \bold \\underline \target underline
- \o \bold {The \\underline command renders its argument underlined.}
+ If the argument contains spaces or other punctuation, enclose the
+ argument in curly brackets.
- For example:
+ \target underline-command
+ \section1 \\underline
- \code
- / *!
- The \underline {F}ile menu gives the users the possibility
- to open, and edit, an existing file, save a new or modified
- file, and exit the application.
- * /
- \endcode
+ The \\underline command renders its argument underlined.
- will be rendered as
+ \code
+ / *!
+ The \underline {F}ile menu gives the users the possibility
+ to open, and edit, an existing file, save a new or modified
+ file, and exit the application.
+ * /
+ \endcode
- \quotation
- The \underline {F}ile menu gives the users the possibility
- to open, and edit, an existing file, save a new or modified
- file, and exit the application.
- \endquotation
+ QDoc renders this as:
- The \\underline command follows the same conventions as the
- \l {i}{\\i} command for \l {argument}{punctuation,
- parentheses and use of braces} for the argument. \endtable
-*/
+ \quotation
+ The \underline {F}ile menu gives the users the possibility
+ to open, and edit, an existing file, save a new or modified
+ file, and exit the application.
+ \endquotation
-/*!
- \page 05-qdoc-commands-documentstructuring.html
- \previouspage Text Formatting Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Verbatim Code Commands
+ If the argument contains spaces or other punctuation, enclose the
+ argument in curly brackets.
- \title Document Structuring Commands
+ \target backslash-command
+ \section1 \\\\ (double backslash)
- The document structuring commands divide the documentation into
- sections. In total, there are six levels of sections in QDoc: \c
- \part, \c \chapter, \c \section1, \c \section2, \c \section3 and
- \c \section4. \c \section1 to \c \section4 correspond to the
- traditional section, subsection, subsubsection and
- subsubsubsection.
+ The \\\\ command expands to a single backslash.
- \section1 Alphabetical List
+ QDoc commands always start with a backslash alone. To display an
+ actual backslash in the text you need to type two of the kind. If
+ you want to display two backslashes, you need to type four, and so
+ forth.
- \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter},
- \l {05-qdoc-commands-documentstructuring.html#part}{\\part},
- \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1},
- \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2},
- \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3},
- \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4}
+ \code
+ / *!
+ The \\\\ command is useful if you want a
+ backslash to appear verbatim, for example,
+ writing C:\\windows\\home\\.
+ * /
+ \endcode
- \section1 Command Descriptions
+ QDoc renders this as:
- \table
- \header
- \o Command
- \o Description
+ \quotation
+ The \\\\ command is useful if you want a
+ backslash to appear verbatim, for example,
+ writing C:\\windows\\home\\.
+ \endquotation
- \row
- \o \bold \\part \target part
- \o \bold {The \\part command is intended for use in
- larger documents, and divides the document into parts.}
+ However, if you want your text to appear in a typewriter font as
+ well, you can use the \l {c-command} {\\c} command instead, which
+ accepts and renders the backslash as any other character. For
+ example:
- In general a document structuring command considers
- everything that follows it until the first line break as
- its argument. The argument is rendered as the unit's
- title. If the title needs to be spanned over several lines,
- make sure that each line (except the last one) is ended
- with a backslash.
+ \code
+ / *!
+ The \\c command is useful if you want a
+ backslash to appear verbatim, and the word
+ that contains it written in a typewriter font,
+ like this: \c {C:\windows\home\}.
+ * /
+ \endcode
- In total, there are six levels of sections in QDoc: \c
- \part, \c \chapter, \c \section1, \c \section2, \c
- \section3 and \c \section4. \c \section1 to \c \section4
- correspond to the traditional section, subsection,
- subsubsection and subsubsubsection.
+ QDoc renders this as:
- There is a strict ordering of the section units:
+ \quotation
+ The \\c command is useful if you want a
+ backslash to appear verbatim, and the word
+ that contains it written in a typewriter font,
+ like this: \c {C:\windows\home\}.
+ \endquotation
+
+*/
+
+/*!
+ \page 05-qdoc-commands-documentstructure.html
+ \previouspage Text Markup
+ \contentspage Table of Contents
+ \nextpage Including Code Inline
+
+ \title Document Structure
+
+ The document structuring commands are for dividing your document
+ into sections. QDoc supports six kinds of sections: \c \part, \c
+ \chapter, \c \section1, \c \section2, \c \section3 and \c
+ \section4. The \c \section1..4 commands are the most useful. The
+ correspond to the traditional section, subsection, etc used in
+ outlining.
+
+ \target part-command
+ \section1 \\part
+
+ The \\part command is intended for use in a large document, like a
+ book.
+
+ In general a document structuring command considers everything
+ that follows it until the first line break as its argument. The
+ argument is rendered as the unit's title. If the title needs to be
+ spanned over several lines, make sure that each line (except the
+ last one) is ended with a backslash.
+
+ In total, there are six levels of sections in QDoc: \c \part, \c
+ \chapter, \c \section1, \c \section2, \c \section3 and \c
+ \section4. \c \section1 to \c \section4 correspond to the
+ traditional section, subsection, subsubsection and
+ subsubsubsection.
+
+ There is a strict ordering of the section units:
\code
part
@@ -763,13 +910,12 @@
section4
\endcode
- For example, a \c section1 unit can only appear as the top
- level section or inside a \c chapter unit. Skipping a
- section unit, for example from \c part to \c section1, is
- not allowed.
+ For example, a \c section1 unit can only appear as the top level
+ section or inside a \c chapter unit. Skipping a section unit, for
+ example from \c part to \c section1, is not allowed.
- You can \i begin with either of the three: \c part, \c
- chapter or \c section1. For example:
+ You can \e begin with either of the three: \c part, \c chapter or
+ \c section1.
\code
@@ -829,7 +975,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
@@ -890,154 +1036,96 @@
\endraw
\endquotation
- Each section level is a logical unit within the
- document. Its title will appear on the table of contents
- generated by the \l
- {11-qdoc-commands-documentcontents.html#tableofcontents}
- {\\tableofcontents} command. For example:
-
- \code
- / *!
- Contents:
+ Each section is a logical unit in the document. The section
+ heading appears in the automatically generated table of contents
+ that normally appears in the upper righthand corner of the page.
- \tableofcontents
+ \target chapter-command
+ \section1 \\chapter
+
+ The \\chapter command is intended for use in
+ larger documents, and divides the document into chapters.
- ...
- * /
- \endcode
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- will expand to
+ \target sectionOne-command
+ \section1 \\section1
- \quotation
- \raw HTML
- <p>Contents:</p>
-
- <ul>
- <li><a href="#Basic Qt">Basic Qt</a></li>
- <ul>
- <li><a href="#Getting Started">Getting Started</a></li>
- <ul>
- <li><a href="#Hello Qt">Hello Qt</a></li>
- <li><a href="#Making Connections">
- Making Connections</a></li>
- <li><a href="#Using the Reference Documentation">
- Using the Reference Documentation</a></li>
- </ul>
- <li><a href="#Creating Dialogs">Creating Dialogs</a></li>
- <ul>
- <li><a href="#Subclassing QDialog">
- Subclassing QDialog</a></li>
- </ul>
- </ul>
- <li><a href="#Intermediate Qt">Intermediate Qt</a></li>
- <ul>
- <li><a href="#Layout Management">
- Layout Management</a></li>
- <ul>
- <li><a href="#Basic Layouts">Basic Layouts</a></li>
- </ul>
- </ul>
- </ul>
+ The \\section1 command starts a new section.
- ...
- \endraw
- \endquotation
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- \row
- \o \bold \\chapter \target chapter
- \o \bold {The \\chapter command is intended for use in
- larger documents, and divides the document into chapters.}
+ \target sectionTwo-command
+ \section1 \\section2
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
+ The \\section2 command starts a new section.
- \row
- \o \bold \\section1 \target sectionOne
- \o \bold {The \\section1 command starts a new section.}
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
- \row
- \o \bold \\section2 \target sectionTwo
- \o \bold {The \\section2 command starts a new section.}
+ \target sectionThree-command
+ \section1 \\section3
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
+ The \\section3 command starts a new section.
- \row
- \o \bold \\section3 \target sectionThree
- \o \bold {The \\section3 command starts a new section.}
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
+ \target sectionFour-command
+ \section1 \\section4
- \row
- \o \bold \\section4 \target sectionFour
- \o \bold {The \\section4 command starts a new section.}
+ The \\section4 command starts a new section.
- See \l{part}{\\part} for an explanation of the various
- section units, command argument and rendering.
+ See \l{part} {\\part} for an explanation of the various
+ section units, command argument and rendering.
- \endtable
*/
/*!
- \page 06-qdoc-commands-verbatimcode.html
- \previouspage Document Structuring Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Quoting External Code Commands
-
- \title Verbatim Code Commands
-
- The following commands are used to render verbatim code within the
- documentation. The code is rendered on a new line, using a
- typewriter font and the standard indentation.
-
- \bold{Note:} Although all of these commands can be used to present
- C++ code, the \l{07-0-qdoc-commands-quoting.html#snippet}{\\snippet}
- and \l{07-0-qdoc-commands-quoting.html#codeline}{\\codeline} commands
- should be used in preference to
- the others when presenting valid code. This allows auxilliary tools
- for Qt language bindings to substitute the relevant code snippets in
- place of the C++ ones.
+ \page 06-qdoc-commands-includecodeinline.html
+ \previouspage Document Structure
+ \contentspage Table of Contents
+ \nextpage Including External Code
+
+ \title Including Code Inline
+
+ The following commands are used to render source code without
+ formatting. The source code begins on a new line, rendered in the
+ code.
+
+ \bold{Note:} Although all these commands are for rendering C++
+ code, the
+ \l{07-0-qdoc-commands-includingexternalcode.html#snippet-command}
+ {\\snippet} and
+ \l{07-0-qdoc-commands-includingexternalcode.html#codeline-command}
+ {\\codeline} commands are preferred over the others. These
+ commands allow equivalent code snippets for other Qt language
+ bindings to be substituted for the C++ snippets in the
+ documentation.
- \section1 Alphabetical List
+ \target code-command
+ \section1 \\code
- \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode},
- \l {06-qdoc-commands-verbatimcode.html#code}{\\code},
- \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode},
- \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode}
+ The \\code and \\endcode commands enclose a snippet of source code.
- \section1 Command Descriptions
+ \note The \l {c-command} {\\c} command can be used for short code
+ fragments within a sentence. The \\code command is for longer code
+ snippets. It renders the code verbatim in a separate paragraph in
+ the code font.
- \table
- \header
- \o Command
- \o Description
+ When processing any of the \\code, \l {badcode-command}
+ {\\badcode}, \l {newcode-command} {\\newcode} or \l
+ {oldcode-command} {\\oldcode} commands, QDoc removes all
+ indentation that is common for the verbatim code blocks within a
+ \c{/}\c{*!} ... \c{*}\c{/} comment before it adds the standard
+ indentation. For that reason the recommended style is to use 8
+ spaces for the verbatim code contained within these commands
- \row
- \o \bold \\code \target code
- \o \bold {The \\code command and the corresponding
- \\endcode command delimit a piece of verbatim code.}
-
- Whereas the \l {c}{\\c} command can be used for short code
- fragments within a sentence, the \\code command is for
- longer code snippets and renders the code verbatim in a
- separate paragraph using a typewriter font and the standard
- indentation.
-
- When processing any of the \\code, \l {badcode}{\\badcode},
- \l {newcode}{\\newcode} and \l {oldcode}{\\oldcode}
- commands, QDoc basically removes all indentation that is
- common for the verbatim code blocks within a \c{/}\c{*!} ...
- \c{*}\c{/} comment before it adds the standard
- indentation. For that reason the recommended style is to
- use 8 spaces for the verbatim code contained within these
- commands (note that this doesn't apply to externally
- quoted code using the \l {quotefromfile}{\\quotefromfile}
- or \l {quotefile}{\\quotefile} command).
-
- For example:
+ \note This doesn't apply to externally quoted code using the \l
+ {quotefromfile-command} {\\quotefromfile} or \l
+ {quotefile-command} {\\quotefile} command.
\code
/ *!
@@ -1053,7 +1141,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\code
#include <QApplication>
@@ -1065,34 +1153,35 @@
}
\endcode
- Other QDoc commands are disabled within
- \\code... \\endcode, and the special character '\\' is
- accepted and rendered like the rest of the code.
+ Other QDoc commands are disabled within \\code... \\endcode, and
+ the special character '\\' is accepted and rendered like the rest
+ of the code.
- You need to type the code manually between the \\code and
- \\endcode commands. If you want to include code snippets
- from a particular file, use the \l
- {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile}
- command instead.
+ To include code snippets from an external file, use the
+ \l{07-0-qdoc-commands-includingexternalcode.html#snippet-command}
+ {\\snippet} and
+ \l{07-0-qdoc-commands-includingexternalcode.html#codeline-command}
+ {\\codeline} commands.
- See also \l {c}{\\c}, \l
- {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
- \l {badcode}{\\badcode}, \l {newcode}{\\newcode} and \l
- {oldcode}{\\oldcode}.
+ See also \l {c-command} {\\c}, \l
+ {07-0-qdoc-commands-includingexternalcode.html#quotefromfile-command}
+ {\\quotefromfile}, \l {badcode-command} {\\badcode}, \l
+ {newcode-command} {\\newcode} and \l {oldcode-command}
+ {\\oldcode}.
- \row
- \o \bold \\badcode \target badcode
- \o \bold {The \\badcode command and the corresponding
- \\endcode command delimit a piece of code that doesn't
- compile or is wrong for some other reason.}
+ \target badcode-command
+ \section1 \\badcode
- The \\badcode command is similar the \l {code}{\\code}
- command, but renders the code using a grey font instead of
- black (the default).
+ The \\badcode and \\endcode commands delimit a snippet of code
+ that doesn't compile or is wrong for some other reason.
- Like the \l {code}{\\code} command, it renders its code on
- a new line in the documentation using a typewriter font and
- the standard indentation. For example:
+ The \\badcode command is similar to the \l {code-command} {\\code}
+ command, but it renders the code snippet using a grey font instead
+ of black.
+
+ Like the \l {code-command} {\\code} command, this command begins
+ its code snippet on a new line rendered in the code font and with
+ the standard indentation.
\code
/ *!
@@ -1112,7 +1201,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The statement below is rendered using the
@@ -1130,30 +1219,29 @@
\endcode
\endquotation
- Other QDoc commands are disabled within
- \\badcode... \\endcode, and the special character '\\' is
- accepted and rendered like the rest of the code.
+ Other QDoc commands are disabled within \\badcode... \\endcode,
+ and the special character '\\' is accepted and rendered like the
+ rest of the code.
- See also \l {code}{\\code}, \l {newcode}{\\newcode} and \l
- {oldcode}{\\oldcode}.
+ See also \l {code-command} {\\code}, \l {newcode-command}
+ {\\newcode} and \l {oldcode-command} {\\oldcode}.
- \row
- \o \bold \\newcode \target newcode
- \o \bold {The \\newcode command, and the associated \\oldcode
- and \\endcode commands, indicate how to port a piece of
- code to a new version of an API.}
-
- The \\newcode command, and its companion the \\oldcode
- command, is a convenience combination of the \l
- {code}{\\code} and \l {badcode}{\\badcode} commands: The
- combination provides a text relating the two code snippets
- to each other. The command requires a preceding \\oldcode
- statement.
-
- Like the \l {code}{\\code} and \l {badcode}{\\badcode}
- commands, the \\newcode command renders its code on a new
- line in the documentation using a typewriter font and the
- standard indentation. For example:
+ \target newcode-command
+ \section1 \\newcode
+
+ The \\newcode, \\oldcode, and \\endcode commands enable you to
+ show how to port a snippet of code to a new version of an API.
+
+ The \\newcode command, and its companion the \\oldcode command, is
+ a convenience combination of the \l {code-command} {\\code} and \l
+ {badcode-command} {\\badcode} commands: The combination provides a
+ text relating the two code snippets to each other. The command
+ requires a preceding \\oldcode statement.
+
+ Like the \l {code-command} {\\code} and \l {badcode-command}
+ {\\badcode} commands, the \\newcode command renders its code on a
+ new line in the documentation using a typewriter font and the
+ standard indentation.
\code
/ *!
@@ -1168,7 +1256,7 @@
* /
\endcode
- is rendered like this:
+ QDoc renders this as:
\quotation
\oldcode
@@ -1181,76 +1269,102 @@
\endcode
\endquotation
- Other QDoc commands are disabled within
- \\oldcode ... \\endcode, and the '\\' character doesn't need
- to be escaped.
+ Other QDoc commands are disabled within \\oldcode ... \\endcode,
+ and the '\\' character doesn't need to be escaped.
- \row
- \o \bold \\oldcode \target oldcode
- \o \bold {The \\oldcode command requires a corresponding
- \\newcode statement; otherwise QDoc fails to parse the command
- and emits a warning.}
+ \target oldcode-command
+ \section1 \\oldcode
- See also \l {newcode}{\\newcode} and \l {badcode}{\\badcode}.
- \endtable
+ The \\oldcode command requires a corresponding
+ \\newcode statement; otherwise QDoc fails to parse the command
+ and emits a warning.
+
+ See also \l {newcode-command} {\\newcode} and \l {badcode-command} {\\badcode}.
+
+ \target qml-command
+ \section1 \\qml \span {class="newStuff"} {(new)}
+
+ The \\qml and \\endqml commands enclose a snippet of QML source
+ code. Currently, QDoc handles \\qml and \\endqml exactly the same
+ as \\code and \\endcode.
+
+ \code
+ / *!
+ \qml
+ import QtQuick 1.0
+
+ Row {
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Translate { y: 20 }
+ }
+ Rectangle {
+ width: 100; height: 100
+ color: "red"
+ transform: Translate { y: -20 }
+ }
+ }
+ \endqml
+ * /
+ \endcode
+
+ QDoc renders this as:
+
+ \qml
+ import QtQuick 1.0
+
+ Row {
+ Rectangle {
+ width: 100; height: 100
+ color: "blue"
+ transform: Translate { y: 20 }
+ }
+ Rectangle {
+ width: 100; height: 100
+ color: "red"
+ transform: Translate { y: -20 }
+ }
+ }
+ \endqml
*/
/*!
- \page 07-0-qdoc-commands-quoting.html
- \previouspage Verbatim Code Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Linking Commands
+ \page 07-0-qdoc-commands-includingexternalcode.html
+ \previouspage Including Code Inline
+ \contentspage Table of Contents
+ \nextpage Creating Links
- \title Quoting External Code Commands
+ \title Including External Code
- The following commands enable quoting from files in the
- documentation: You can make QDoc include the complete contents of
+ The following commands enable you to include code snippets from
+ external files. You can make QDoc include the complete contents of
a file, or you can quote specific parts of the file and skip
others. The typical use of the latter is to quote a file chunk by
chunk.
- \bold{Note:} Although all of these commands can be used to present
- C++ code, the \l{#snippet}{\\snippet} and \l{#codeline}{\\codeline}
- commands should be used in preference to
- the others when presenting valid code. This allows auxilliary tools
- for Qt language bindings to substitute the relevant code snippets in
- place of the C++ ones.
-
- \section1 Alphabetical List
-
- \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
- \l {07-0-qdoc-commands-quoting.html#dots}{\\dots},
- \l {07-0-qdoc-commands-quoting.html#printline}{\\printline},
- \l {07-0-qdoc-commands-quoting.html#printto}{\\printto},
- \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil},
- \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile},
- \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile},
- \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline},
- \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto},
- \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil},
- \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet}
-
- \section1 Command Descriptions
-
- \table
- \header
- \o Command
- \o Description
+ \bold{Note:} Although all these commands are for rendering C++
+ code, the
+ \l{07-0-qdoc-commands-includingexternalcode.html#snippet-command}
+ {\\snippet} and
+ \l{07-0-qdoc-commands-includingexternalcode.html#codeline-command}
+ {\\codeline} commands are preferred over the others. These
+ commands allow equivalent code snippets for other Qt language
+ bindings to be substituted for the C++ snippets in the
+ documentation.
- \row
- \o \bold \\quotefile \target quotefile
- \o \bold {The \\quotefile command expands to the complete
- contents of the file given as argument.}
+ \target quotefile-command
+ \section1 \\quotefile
- The command considers the rest of the line as part of its
- argument, make sure to follow the file name with a line
- break.
+ The \\quotefile command expands to the complete contents of the
+ file given as argument.
- The file's contents is rendered in a separate paragraph,
- using a typewriter font and the standard indentation. The
- code is shown verbatim.
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the file name with a line break.
- For example:
+ The file's contents is rendered in a separate paragraph, using a
+ typewriter font and the standard indentation. The code is shown
+ verbatim.
\code
/ *!
@@ -1263,7 +1377,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
This is a simple "Hello world" example:
@@ -1274,29 +1388,29 @@
application up and running.
\endquotation
- \warning If you use the \l {QDoc
- Compatibility}{compat.qdocconf} file this command is called
- \\include.
+ \warning If you use the \l {Compatibility Issues}
+ {compat.qdocconf} file this command is called \\include.
- See also \l {quotefromfile}{\\quotefromfile} and \l
- {code}{\\code}.
+ See also \l {quotefromfile-command} {\\quotefromfile} and
+ \l {code-command} {\\code}.
- \row
- \o \bold \\quotefromfile \target quotefromfile
- \o \bold {The \\quotefromfile command opens the file
- given as argument for quoting.}
-
- The command considers the rest of the line as part of its
- argument, make sure to follow the file name with a line
- break.
-
- The command is intended for use when quoting parts from
- file with the walkthrough commands: \l
- {printline}{\\printline}, \l {printto}{\\printto}, \l
- {printuntil}{\\printuntil}, \l {skipline}{\\skipline}, \l
- {skipto}{\\skipto}, \l {skipuntil}{\\skipuntil}. This
- enables you to quote specific portions of a file. For
- example:
+
+ \target quotefromfile-command
+ \section1 \\quotefromfile
+
+ The \\quotefromfile command opens the file given as argument for
+ quoting.
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the file name with a line break.
+
+ The command is intended for use when quoting parts from file with
+ the walkthrough commands: \l {printline-command} {\\printline}, \l
+ {printto-command} {\\printto}, \l {printuntil-command}
+ {\\printuntil}, \l {skipline-command} {\\skipline}, \l
+ {skipto-command} {\\skipto}, \l {skipuntil-command}
+ {\\skipuntil}. This enables you to quote specific portions of a
+ file.
\code
/ *!
@@ -1321,7 +1435,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The whole application is contained within
@@ -1344,38 +1458,35 @@
...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- QDoc remembers which file it's quoting, and the current
- position within that file (see \l {file}{\\printline} for
- more information). There is no need to "close" the file.
+ QDoc remembers which file it's quoting, and the current position
+ within that file (see \l {file} {\\printline} for more
+ information). There is no need to "close" the file.
- Earlier we called this command \\quotefile. For more
- information, see the \l
- {26-qdoc-commands-compatibility.html#quotefromfile-versus-quotefile}
- {compatibility} section.
+ Earlier we called this command \\quotefile. For more information,
+ see the \l
+ {26-qdoc-commands-compatibility.html#quotefromfile-versus-quotefile}
+ {compatibility} section.
- See also \l {quotefile}{\\quotefile}, \l {code}{\\code} and
- \l {dots}{\\dots}.
+ See also \l {quotefile-command} {\\quotefile}, \l {code-command}
+ {\\code} and \l {dots} {\\dots}.
- \row
- \o \bold \\printline \target printline
- \o \bold {The \\printline command expands to the line
- from the current position to the next non-blank line of
- the current souce file.}
+ \target printline-command
+ \section1 \\printline
- To ensure that the documentation always is synchronized
- with the source file, a substring of the line must be
- specified as an argument to the command. Note that the
- command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break.
+ The \\printline command expands to the line from the current
+ position to the next non-blank line of the current souce file.
- The line from the source file is rendered as a separate
- paragraph, using a typewriter font and the standard
- indentation. The code is shown verbatim.
+ To ensure that the documentation remains synchronized with the
+ source file, a substring of the line must be specified as an
+ argument to the command. Note that the command considers the rest
+ of the line as part of its argument, make sure to follow the
+ substring with a line break.
- For example:
+ The line from the source file is rendered as a separate paragraph,
+ using a typewriter font and the standard indentation. The code is
+ shown verbatim.
\code
/ *!
@@ -1403,7 +1514,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
There has to be exactly one QApplication object
@@ -1430,22 +1541,20 @@
The main function...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- \target file
+ \target file
- QDoc reads the file sequentially. To move the current
- position forward you can use either of the \l
- {skipline}{\\skip...} commands. To move the current
- position backward, you can use the \l
- {quotefromfile}{\\quotefromfile} command again.
+ QDoc reads the file sequentially. To move the current position
+ forward you can use either of the \l {skipline-command}
+ {\\skip...} commands. To move the current position backward, you
+ can use the \l {quotefromfile-command} {\\quotefromfile} command
+ again.
- \target substring
+ \target substring
- If the substring argument is surrounded by slashes it is
- interpreted as a \l {regular expression}.
-
- For example:
+ If the substring argument is surrounded by slashes it is
+ interpreted as a \l {regular expression}.
\code
/ *!
@@ -1462,7 +1571,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\quotefromfile widgets/scribble/mainwindow.cpp
@@ -1477,39 +1586,36 @@
application.
\endquotation
- (\l {widgets/scribble}{The complete example file...})
+ (\l {widgets/scribble} {The complete example file...})
- The regular expression \c /^\}/ makes QDoc print until the
- first '}' character occurring at the beginning of the line
- without indentation. /.../ encloses the regular expression,
- and '^' means the beginning of the line. The '}' character
- must be escaped since it is a special character in regular
- expressions.
+ The regular expression \c /^\}/ makes QDoc print until the first
+ '}' character occurring at the beginning of the line without
+ indentation. /.../ encloses the regular expression, and '^' means
+ the beginning of the line. The '}' character must be escaped since
+ it is a special character in regular expressions.
- QDoc will emit a warning if the specified substring or
- regular expression cannot be located, i.e. if the source
- code has changed.
+ QDoc will emit a warning if the specified substring or regular
+ expression cannot be located, i.e. if the source code has changed.
- See also \l {printto}{\\printto} and \l
- {printuntil}{\\printuntil}.
+ See also \l {printto-command} {\\printto} and \l
+ {printuntil-command} {\\printuntil}.
- \row
- \o \bold \\printto \target printto
- \o \bold {The \\printto command expands to all the lines
- from the current position up to and \i excluding the
- next line containing a given substring.}
+ \target printto-command
+ \section1 \\printto
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break. The command also follows the same conventions for \l
- {file}{positioning} and \l {substring}{argument} as the \l
- {printline}{\\printline} command.
+ The \\printto command expands to all the lines from the current
+ position up to and \e excluding the next line containing a given
+ substring.
- The lines from the source file are rendered in a separate
- paragraph, using a typewriter font and the standard
- indentation. The code is shown verbatim.
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break. The
+ command also follows the same conventions for \l {file}
+ {positioning} and \l {substring} {argument} as the \l
+ {printline-command} {\\printline} command.
- For example:
+ The lines from the source file are rendered in a separate
+ paragraph, using a typewriter font and the standard
+ indentation. The code is shown verbatim.
\code
/ *!
@@ -1524,7 +1630,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The whole application is contained within the
@@ -1538,28 +1644,27 @@
and \c argv parameters...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {printline}{\\printline} and \l
- {printuntil}{\\printuntil}.
+ See also \l {printline-command} {\\printline} and \l
+ {printuntil-command} {\\printuntil}.
- \row
- \o \bold \\printuntil \target printuntil
- \o \bold {The \\printuntil command expands to all the lines
- from the current position up to and \i including the next line
- containing a given substring.}
+ \target printuntil-command
+ \section1 \\printuntil
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break. The command also follows the same conventions for \l
- {file}{positioning} and \l {substring}{argument} as the \l
- {printline}{\\printline} command.
+ The \\printuntil command expands to all the lines from the current
+ position up to and \e including the next line containing a given
+ substring.
- The lines from the source file are rendered in a separate
- paragraph, using a typewriter font and the standard
- indentation. The code is shown verbatim.
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break. The
+ command also follows the same conventions for \l {file}
+ {positioning} and \l {substring} {argument} as the \l
+ {printline-command} {\\printline} command.
- For example:
+ The lines from the source file are rendered in a separate
+ paragraph, using a typewriter font and the standard
+ indentation. The code is shown verbatim.
\code
/ *!
@@ -1576,7 +1681,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The whole application is contained within the
@@ -1587,33 +1692,33 @@
\printuntil hello
First we create a \l
- {http://qt.nokia.com/doc/4.0/qapplication}{QApplication}
+ {http://qt.nokia.com/doc/4.0/qapplication} {QApplication}
object using the \c argc and \c argv parameters, then we
create a \l
- {http://qt.nokia.com/doc/4.0/qpushbutton}{QPushButton}.
+ {http://qt.nokia.com/doc/4.0/qpushbutton} {QPushButton}.
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {printline}{\\printline} and \l
- {printto}{\\printto}.
+ See also \l {printline-command} {\\printline} and \l
+ {printto-command} {\\printto}.
- \row
- \o \bold \\skipline \target skipline
- \o \bold {The \\skipline command ignores the next non-blank
- line in the current source file.}
-
- Doc reads the file sequentially, and the \\skipline command
- is used to move the current position (omitting a line of
- the source file). See the remark about \l {file}{file
- positioning} above.
-
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break. The command also follows the same conventions for \l
- {substring}{argument} as the \l {printline}{\\printline}
- command, and it is used in conjunction with the \l
- {quotefromfile}{\\quotefromfile} command. For example:
+ \target skipline-command
+ \section1 \\skipline
+
+ The \\skipline command ignores the next non-blank line in the
+ current source file.
+
+ Doc reads the file sequentially, and the \\skipline command is
+ used to move the current position (omitting a line of the source
+ file). See the remark about \l {file} {file positioning} above.
+
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break. The
+ command also follows the same conventions for \l {substring}
+ {argument} as the \l {printline-command} {\\printline} command,
+ and it is used in conjunction with the \l {quotefromfile-command}
+ {\\quotefromfile} command.
\code
/ *!
@@ -1631,7 +1736,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\l
@@ -1649,30 +1754,30 @@
that contains its definition.
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {skipto}{\\skipto}, \l
- {skipuntil}{\\skipuntil} and \l {dots}{\\dots}.
+ See also \l {skipto-command} {\\skipto}, \l {skipuntil-command}
+ {\\skipuntil} and \l {dots} {\\dots}.
- \row
- \o \bold \\skipto \target skipto
- \o \bold {The \\skipto command ignores all the lines from the
- current position up to and \i excluding the next line
- containing a given substring.}
+ \target skipto-command
+ \section1 \\skipto
- QDoc reads the file sequentially, and the \\skipto command
- is used to move the current position (omitting one or
- several lines of the source file). See the remark about \l
- {file}{file positioning} above.
+ The \\skipto command ignores all the lines from the current
+ position up to and \e excluding the next line containing a given
+ substring.
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break.
+ QDoc reads the file sequentially, and the \\skipto command is used
+ to move the current position (omitting one or several lines of the
+ source file). See the remark about \l {file} {file positioning}
+ above.
- The command also follows the same conventions for \l
- {substring}{argument} as the \l {printline}{\\printline}
- command, and it is used in conjunction with the \l
- {quotefromfile}{\\quotefromfile} command. For example:
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break.
+
+ The command also follows the same conventions for \l {substring}
+ {argument} as the \l {printline-command} {\\printline} command,
+ and it is used in conjunction with the \l {quotefromfile-command}
+ {\\quotefromfile} command.
\code
/ *!
@@ -1691,7 +1796,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The whole application is contained within
@@ -1707,30 +1812,30 @@
reasonable size ...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {skipline}{\\skipline}, \l
- {skipuntil}{\\skipuntil} and \l {dots}{\\dots}.
+ See also \l {skipline-command} {\\skipline}, \l
+ {skipuntil-command} {\\skipuntil} and \l {dots} {\\dots}.
- \row
- \o \bold \\skipuntil \target skipuntil
- \o \bold {The \\skipuntil command ignores all the lines from
- the current position up to and \i including the next line
- containing a given substring.}
+ \target skipuntil-command
+ \section1 \\skipuntil
- QDoc reads the file sequentially, and the \\skipuntil
- command is used to move the current position (omitting one
- or several lines of the source file). See the remark about
- \l {file}{file positioning} above.
+ The \\skipuntil command ignores all the lines from the current
+ position up to and \e including the next line containing a given
+ substring.
- The command considers the rest of the line as part of its
- argument, make sure to follow the substring with a line
- break.
+ QDoc reads the file sequentially, and the \\skipuntil command is
+ used to move the current position (omitting one or several lines
+ of the source file). See the remark about \l {file} {file
+ positioning} above.
- The command also follows the same conventions for \l
- {substring}{argument} as the \l {printline}{\\printline}
- command, and it is used in conjunction with the \l
- {quotefromfile}{\\quotefromfile} command. For example:
+ The command considers the rest of the line as part of its
+ argument, make sure to follow the substring with a line break.
+
+ The command also follows the same conventions for \l {substring}
+ {argument} as the \l {printline-command} {\\printline} command,
+ and it is used in conjunction with the \l {quotefromfile-command}
+ {\\quotefromfile} command.
\code
/ *!
@@ -1748,7 +1853,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
The first thing we did in the \c main() function was to
@@ -1764,20 +1869,21 @@
will return when the application exits...
\endquotation
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- See also \l {skipline}{\\skipline}, \l {skipto}{\\skipto}
- and \l {dots}{\\dots}.
+ See also \l {skipline-command} {\\skipline}, \l {skipto-command}
+ {\\skipto} and \l {dots} {\\dots}.
- \row
- \o \bold \\dots \target dots
- \o \bold {The \\dots command indicates that parts of the
- source file have been omitted when quoting a file.}
+ \target dots-command
+ \section1 \\dots
- The command is used in conjunction with the \l
- {quotefromfile}{\\quotefromfile} command, and should be
- stated on its own line. The dots are rendered on a new
- line, using a typewriter font. For example:
+ The \\dots command indicates that parts of the source file have
+ been omitted when quoting a file.
+
+ The command is used in conjunction with the \l
+ {quotefromfile-command} {\\quotefromfile} command, and should be
+ stated on its own line. The dots are rendered on a new line, using
+ a typewriter font.
\code
/ *!
@@ -1790,7 +1896,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotefromfile examples/main.cpp
\skipto main
@@ -1799,54 +1905,54 @@
\skipuntil exec
\printline }
- (\l {Example File}{The complete example file...})
+ (\l {Example File} {The complete example file...})
- The default indentation is 4 spaces, but this can be
- adjusted using the command's optional argument. For
- example:
+ The default indentation is 4 spaces, but this can be adjusted
+ using the command's optional argument.
- \code
- / *!
- \dots 0
- \dots
- \dots 8
- \dots 12
- \dots 16
- * /
- \endcode
+ \code
+ / *!
+ \dots 0
+ \dots
+ \dots 8
+ \dots 12
+ \dots 16
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this as:
- \dots 0
- \dots
- \dots 8
- \dots 12
- \dots 16
+ \dots 0
+ \dots
+ \dots 8
+ \dots 12
+ \dots 16
- See also \l {skipline}{\\skipline}, \l
- {skipto}{\\skipto} and \l {skipuntil}{\\skipuntil}.
+ See also \l {skipline-command} {\\skipline}, \l {skipto-command}
+ {\\skipto} and \l {skipuntil-command} {\\skipuntil}.
- \row
- \o \bold \\snippet \target snippet
- \o \bold {The \\snippet command causes a code snippet to be included
- verbatim as preformatted text, which may be syntax highlighted.}
-
- Each code snippet are referenced by the file that holds it and by
- a unique identifier for that file. Snippet files are typically
- stored in a \c{snippets} directory inside the documentation
- directory (e.g., \c{$QTDIR/doc/src/snippets}).
+ \target snippet-command
+ \section1 \\snippet
+
+ The \\snippet command causes a code snippet to be included
+ verbatim as preformatted text, which may be syntax highlighted.
- For example, the following documentation references a snippet in
- a file residing in a subdirectory of the documentation directory:
+ Each code snippet are referenced by the file that holds it and by
+ a unique identifier for that file. Snippet files are typically
+ stored in a \c{snippets} directory inside the documentation
+ directory (e.g., \c{$QTDIR/doc/src/snippets}).
+
+ For example, the following documentation references a snippet in a
+ file residing in a subdirectory of the documentation directory:
\code
\snippet snippets/textdocument-resources/main.cpp Adding a resource
\endcode
- The text following the file name is the unique identifier for the
- snippet. This is used to delimit the quoted code in the relevant
- snippet file as shown in the following example that corresponds to
- the above \c{\\snippet} command:
+ The text following the file name is the unique identifier for the
+ snippet. This is used to delimit the quoted code in the relevant
+ snippet file as shown in the following example that corresponds to
+ the above \c{\\snippet} command:
\dots
\code
@@ -1859,18 +1965,20 @@
//! [Adding a resource]
\endcode
\dots
- \row
- \o \bold \\codeline \target codeline
- \o \bold{The \\codeline command inserts a blank line of preformatted
- text. It is used to insert gaps between snippets without closing
- the current preformatted text area and opening a new one.}
- \endtable
+
+ \target codeline-command
+ \section1 \\codeline
+
+ The \\codeline command inserts a blank line of preformatted
+ text. It is used to insert gaps between snippets without closing
+ the current preformatted text area and opening a new one.
+
*/
/*!
\page 07-1-example.html
- \previouspage Quoting External Code Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Including External Code
+ \contentspage Table of Contents
\title Example File
@@ -1878,541 +1986,528 @@
*/
/*!
- \page 08-qdoc-commands-linking.html
- \previouspage Quoting External Code Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Graphic Commands
+ \page 08-qdoc-commands-creatinglinks.html
+ \previouspage Including External Code
+ \contentspage Table of Contents
+ \nextpage Including Images
- \title Linking Commands
+ \title Creating Links
- The linking commands make it possible to create hyperlinks to
- classes, functions, header files and examples. They also make it
- possible to link to targets within a document, as well as to other
- documents and URLs.
+ These commands are for creating hyperlinks to classes, functions,
+ examples, and other targets.
- \section1 Alphabetical List
+ \target l-command
+ \section1 \\l (link)
- \l {08-qdoc-commands-linking.html#keyword}{\\keyword},
- \l {08-qdoc-commands-linking.html#l}{\\l},
- \l {08-qdoc-commands-linking.html#sa}{\\sa},
- \l {08-qdoc-commands-linking.html#target}{\\target}
+ The \\l link command is used to create a hyperlink to many
+ different kinds of targets. The command's general syntax is:
- \section1 Command Descriptions
+ \code
+ \l {link target} {link text}
+ \endcode
- \table
- \header
- \o Command
- \o Description
+ \code
+ / *!
+ Read the \l {http://qt.nokia.com/doc/4.0/}
+ {Qt's Reference Documentation} carefully.
+ * /
+ \endcode
- \row
- \o \bold \\l \target l
- \o \bold {The \\l command is used to create hyperlinks. }
+ QDoc renders this as:
- The command's general syntax is
+ \quotation
+ Read the \l {http://qt.nokia.com/doc/4.0/}
+ {Qt's Reference Documentation} carefully.
+ \endquotation
- \code
- \l {link target}{link text}
- \endcode
+ If the link target is equivalent to the link text, the second
+ argument can be omitted.
- For example:
+ For example, if you have documentation like:
- \code
- / *!
- Read the \l {http://qt.nokia.com/doc/4.0/}
- {Qt's Reference Documentation} carefully.
- * /
- \endcode
+ \code
+ / *!
+ \target assertions
- will be rendered as
+ Assertions make some statement about the text at the
+ point where they occur in the regexp but they do not
+ match any characters.
- \quotation
- Read the \l {http://qt.nokia.com/doc/4.0/}
- {Qt's Reference Documentation} carefully.
- \endquotation
+ ...
- If the link target is equivalent to the link text, the
- second argument can be omitted.
+ Regexps are built up from expressions, quantifiers, and
+ \l {assertions} {assertions}.
+ * /
+ \endcode
- For example, if you have documentation like:
+ You can simplify this as follows:
- \code
- / *!
- \target assertions
+ \code
+ / *!
+ \target assertions
- Assertions make some statement about the text at the
- point where they occur in the regexp but they do not
- match any characters.
+ Assertions make some statement about the text at the
+ point where they occur in the regexp but they do not
+ match any characters.
- ...
+ ...
- Regexps are built up from expressions, quantifiers, and
- \l {assertions}{assertions}.
- * /
- \endcode
+ Regexps are built up from expressions, quantifiers, and
+ \l assertions.
+ * /
+ \endcode
- you can rewrite it as
+ For the one-parameter version the braces can often be omitted.
+ The \\l command supports several kinds of links:
- \code
- / *!
- \target assertions
+ \list
- Assertions make some statement about the text at the
- point where they occur in the regexp but they do not
- match any characters.
+ \o \c {\l QWidget} - The name of a class documented with the \l
+ {class-command} {\\class} command.
- ...
+ \o \c {\l QWidget::sizeHint()} - The name of a member function,
+ documented with or without an \l {fn-command} {\\fn} command.
- Regexps are built up from expressions, quantifiers, and
- \l assertions.
- * /
- \endcode
+ \o \c {\l <QtGlobal>} - The subject of a \l {headerfile-command}
+ {\\headerfile} command.
- For the one-parameter version the braces can often
- be omitted. See the \l {i}{\\i} command for the \l
- {argument}{argument conventions}.
+ \o \c {\l widgets/wiggly} - The relative path used in an \l
+ {example-command} {\\example} command.
- The \\l command supports several kinds of links:
+ \o \c {\l {QWidget Class Reference}} - The title used in a
+ \l {title-command} {\\title} command.
- \list
- \o \c {\l QWidget} - a defined \l {class}{\\class}
- \o \c {\l QWidget::sizeHint()} - a defined member
- function (\l {fn}{\\fn})
- \o \c {\l <QtGlobal>} - a defined \l {headerfile}{\\headerfile}
- \o \c {\l widgets/wiggly} - a defined
- \l {example-command}{\\example}
- \o \c {\l {QWidget Class Reference}} - a defined \l {title}{\\title}
- \o \c {\l {Introduction}}- a defined \l{part}{\\part},
- \l{chapter}{\\chapter} or \l {sectionOne}{\\section...}
- \o \c {\l fontmatching} - a defined \l {target}{\\target}
- \o \c {\l {Shared Classes}} - a defined \l {keyword}{\\keyword}
- \o \c {\l network.html} - a defined \l {page}{\\page}
- \o \c {\l http://www.trolltech.com/} - a URL
- \endlist
+ \o \c {\l {Introduction to QDoc}}- The text from one of the
+ \l{part-command} {\\part}, \l{chapter} {\\chapter} or \l
+ {sectionOne-command} {\\section} commands.
- QDoc also tries to make a link out of any words that don't
- resemble any normal English words, for example Qt class
- names or functions, like QWidget or QWidget::sizeHint(). In
- these cases, the \\l command can actually be omitted, but
- by using the command, you ensure that QDoc will emit a
- warning if it cannot find the link target. In addition, if
- you only want the function name to appear in the link, you
- can use the following syntax:
+ \o \c {\l fontmatching} - The argument of a \l {target-command}
+ {\\target} command.
- \list
- \o \c {\l {QWidget::}{sizeHint()}}
- \endlist
+ \o \c {\l {Shared Classes}} - A keyword named in a \l
+ {keyword-command} {\\keyword} command.
- See also \l {sa}{\\sa}, \l {target}{\\target} and \l
- {keyword}{\\keyword}.
+ \o \c {\l network.html} - The file name used in a \l
+ {page-command} {\\page} command.
- \row
- \o \bold \\sa \target sa
- \o \bold {The \\sa command defines a list of links that will
- be rendered in a separate "See also" section at the bottom
- of the documentation.}
+ \o \c {\l http://www.trolltech.com/} - A URL.
- The command takes a comma-separated list of links as its
- argument. If the line ends with a comma, you can continue
- on a second line. The general syntax is:
+ \endlist
- \code
- \sa {the first link}, {the second link},
- {the third link}, ...
- \endcode
+ QDoc also tries to make a link out of any words that don't
+ resemble any normal English words, for example Qt class names or
+ functions, like QWidget or QWidget::sizeHint(). In these cases,
+ the \\l command can actually be omitted, but by using the command,
+ you ensure that QDoc will emit a warning if it cannot find the
+ link target. In addition, if you only want the function name to
+ appear in the link, you can use the following syntax:
- QDoc will automatically try to generate "See also" links
- interconnecting a property's various functions. For
- example, an setVisible() function will automatically get a
- link to visible() and vice versa.
+ \list
+ \o \c {\l {QWidget::} {sizeHint()}}
+ \endlist
- In general, QDoc will generate "See also" links that
- interconnect the functions that access the same
- property. It recognizes four different syntax versions:
+ QDoc renders this as:
- \list
- \o \c property()
- \o \c setProperty()
- \o \c isProperty()
- \o \c hasProperty()
- \endlist
+ \quotation
+ \l {QWidget::} {sizeHint()}
+ \endquotation
- The \\sa command supports the same kind
- of links as the \l {l}{\\l} command. For example:
+ See also \l {sa-command} {\\sa}, \l {target-command} {\\target}
+ and \l {keyword-command} {\\keyword}.
- \code
- / *!
- Appends the actions \a actions to this widget's
- list of actions.
- \sa removeAction(), QMenu, addAction()
- * /
- void QWidget::addActions(QList<QAction *> actions)
- {
- ...
- }
- \endcode
+ \target sa-command
+ \section1 \\sa (see also)
- will be rendered as
+ The \\sa command defines a list of links that will be rendered in
+ a separate "See also" section at the bottom of the documentation
+ unit.
- \quotation
- \bold {void QWidget::addActions ( QList<QAction*>
- \i actions )}
+ The command takes a comma-separated list of links as its
+ argument. If the line ends with a comma, you can continue
+ the list on the next line. The general syntax is:
- Appends the actions \i actions to this widget's
- list of actions.
+ \code
+ \sa {the first link}, {the second link},
+ {the third link}, ...
+ \endcode
- See also \l {QWidget::removeAction()}{removeAction()},
- \l QMenu, and \l {QWidget::addAction()}{addAction()}.
- \endquotation
+ QDoc will automatically try to generate "See also" links
+ interconnecting a property's various functions. For example, a
+ setVisible() function will automatically get a link to visible()
+ and vice versa.
- See also \l {l}{\\l}, \l {target}{\\target} and \l
- {keyword}{\\keyword}.
+ In general, QDoc will generate "See also" links that interconnect
+ the functions that access the same property. It recognizes four
+ different syntax versions:
- \row
- \o \bold \\target \target target
- \o \bold {The \\target command defines an explicit point in the
- documentation that you can later link to using the \l {l}{\\l}
- and \l {sa}{\\sa} commands.}
+ \list
+ \o \c property()
+ \o \c setProperty()
+ \o \c isProperty()
+ \o \c hasProperty()
+ \endlist
- The command considers the rest of the line as part of its
- argument, make sure to follow the target name with a line
- break.
+ The \\sa command supports the same kind of links as the \l
+ {l-command} {\\l} command.
- For example:
+ \code
+ / *!
+ Appends the actions \a actions to this widget's
+ list of actions.
+
+ \sa removeAction(), QMenu, addAction()
+ * /
+ void QWidget::addActions(QList<QAction *> actions)
+ {
+ ...
+ }
+ \endcode
- \code
- / *!
- \target capturing parentheses
- \section1 Capturing Text
+ QDoc renders this as:
- Parentheses allow us to group elements together so that
- we can quantify and capture them.
+ \quotation
+ \bold {void QWidget::addActions ( QList<QAction*>
+ \e actions )}
- ...
- * /
- \endcode
+ Appends the actions \e actions to this widget's list of
+ actions.
- can be referenced with
+ See also \l {QWidget::removeAction()} {removeAction()},
+ \l QMenu, and \l {QWidget::addAction()} {addAction()}.
+ \endquotation
- \list
- \o \c {\l {capturing parentheses}}
- (from elsewhere in the same comment)
- \o \c {\l qregexp.html#capturing-parentheses}
- (from anywhere else)
- \endlist
+ See also \l {l-command} {\\l}, \l {target-command} {\\target} and
+ \l {keyword-command} {\\keyword}.
- within a documentation unit, and with
- \list
- \o \c {\l http://www.trolltech.com/4.0/doc/html/qregexp.html#capturing-parentheses}
- \endlist
+ \target target-command
+ \section1 \\target
- on a more global scale.
+ The \\target command names a place in the documentation that you
+ can link to using the \l {l-command} {\\l (link)} and \l
+ {sa-command} {\\sa (see also)} commands.
- If the target name does't contain any spaces, the brackets can
- be omitted as well.
+ The text up to the line break becomes the target name. Be sure to
+ follow the target name with a line break. Curly brackets are not
+ required around the target name, but they may be required when the
+ target name is used in a link cammand. See below.
- See also \l {l}{\\l}, \l {sa}{\\sa} and \l
- {keyword}{\\keyword}.
+ \code
+ / *!
+ \target capturing parentheses
+ \section1 Capturing Text
- \row
- \o \bold \\keyword \target keyword
- \o \bold {The \\keyword command defines an explicit point in the
- documentation that you can later link to using the \l {l}{\\l}
- and \l {sa}{\\sa} commands.}
+ Parentheses allow us to group elements together so that
+ we can quantify and capture them.
- Keywords must be unique within the entire set of
- documentation processed in on QDoc run. The command
- considers the rest of the line as part of its argument,
- make sure to follow the keyword with a line break.
+ ...
+ * /
+ \endcode
- The \\keyword command is similar to \l {target}{\\target},
- but stronger. A keyword can be referenced from anywhere
- using a simple syntax. For example:
+ The target name \e{capturing parentheses} can be linked from
+ within the same document containing the target in two ways:
- \code
- / *!
- \class QRegExp
- \reentrant
- \brief The QRegExp class provides pattern
- matching using regular expressions.
- \ingroup tools
- \ingroup misc
- \ingroup shared
- \mainclass
+ \list
+ \o \c {\l {capturing parentheses}} (from within the same qdoc comment)
+ \o \c {\l qregexp.html#capturing-parentheses} (from elsewhere in the same document)
+ \endlist
- \keyword regular expression
+ \note The brackets in the link example are required because the
+ target name contains spaces.
- Regular expressions, or "regexps", provide a way to
- find patterns within text.
+ From other documents, the target name can be linked this way:
- ...
- * /
- \endcode
+ \list
+ \o \c {\l http://www.trolltech.com/4.0/doc/html/qregexp.html#capturing-parentheses}
+ \endlist
- can be referenced like this
+ See also \l {l-command} {\\l}, \l {sa-command} {\\sa} and \l
+ {keyword-command} {\\keyword}.
- \code
- / *!
- When a string is surrounded by slashes, it's
- interpreted as a \l regular expression.
- * /
- \endcode
+ \target keyword-command
+ \section1 \\keyword
- which will be rendered as
+ The \\keyword command names a place in the documentation that you
+ can link to using the \l {l-command} {\\l (link)} and \l
+ {sa-command} {\\sa (see also)} commands.
- \quotation
- When a string is surrounded by slashes, it's
- interpreted as a \l {regular expression}.
- \endquotation
+ The \\keyword command is like the \l {target-command} {\\target}
+ command, but stronger. A keyword can be linked from anywhere using
+ a simple syntax.
- If the keyword does't contain any spaces, the brackets can
- be omitted as well.
+ Keywords must be unique over all the documents processed during
+ the QDoc run. The command uses the rest of the line as its
+ argument. Be sure to follow the keyword with a line break.
- See also \l {l}{\\l}, \l {sa}{\\sa} and \l
- {target}{\\target}.
- \endtable
-*/
-/*!
- \page 09-qdoc-commands-graphic.html
- \previouspage Linking Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Container Commands
+ \code
+ / *!
+ \class QRegExp
+ \reentrant
+ \brief The QRegExp class provides pattern
+ matching using regular expressions.
+ \ingroup tools
+ \ingroup misc
+ \ingroup shared
+ \mainclass
- \title Graphic Commands
+ \keyword regular expression
- The graphic commands makes it possible to include images in the
- documentation. The images can be rendered as separate paragraphs,
- or within running text.
+ Regular expressions, or "regexps", provide a way to
+ find patterns within text.
- \section1 Alphabetical List
+ ...
+ * /
+ \endcode
- \l {09-qdoc-commands-graphic.html#caption}{\\caption},
- \l {09-qdoc-commands-graphic.html#image}{\\image},
- \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage}
+ The location marked with the keyword can be linked with:
- \section1 Command Descriptions
+ \code
+ / *!
+ When a string is surrounded by slashes, it is
+ interpreted as a \l {regular expression}.
+ * /
+ \endcode
- \table
- \header
- \o Command
- \o Description
+ QDoc renders this as:
- \row
- \o \bold \\image \target image
- \o \bold {The \\image command expands to the image specified by its
- argument, and renders it centered as a separate paragraph.}
+ \quotation
+ When a string is surrounded by slashes, it's
+ interpreted as a \l {regular expression}.
+ \endquotation
- The \\image command replaces the old \\img command. For more
- information, see the \l
- {26-qdoc-commands-compatibility.html#image-versus-img}
- {compatibility} section.
+ If the keyword text contains spaces, the brackets are required.
- The command takes two arguments. The first is the name of
- the image file. The second argument is optional and is a
- simple description of the image equivalent to the HTML
- alt="" in an image tag. The description is used for
- tooltips, and when a browser doesn't support images like
- the Lynx text browser.
+ See also \l {l-command} {\\l (link)}, \l {sa-command} {\\sa (see
+ also)} and \l {target-command} {\\target}.
- The command considers the rest of the line after the file
- name its second argument, make sure that you follow the
- filename or description with a line break. Braces are only
- necessary if the description spans several lines.
+*/
- For example:
+/*!
+ \page 09-qdoc-commands-includingimages.html
+ \previouspage Creating Links
+ \contentspage Table of Contents
+ \nextpage Tables and Lists
- \code
- / *!
- Qt by Trolltech is a C++ toolkit for cross-platform GUI
- application development.
+ \title Including Images
- \image happyguy.jpg "Happy guy"
+ The graphic commands makes it possible to include images in the
+ documentation. The images can be rendered as separate paragraphs,
+ or within running text.
- Qt provides single-source portability across Microsoft
- Windows, Mac OS X, Linux, and all major commercial Unix
- variants. It is also available for embedded devices.
- * /
- \endcode
+ \target image-command
+ \section1 \\image
- will be rendered as
+ The \\image command expands to the image specified by its first
+ argument, and renders it centered as a separate paragraph.
- \quotation
- Qt by Trolltech is a C++ toolkit for cross-platform GUI
- application development.
+ The \\image command replaces the old \\img command. For more
+ information, see the \l
+ {26-qdoc-commands-compatibility.html#image-versus-img}
+ {compatibility} section.
- \image happyguy.jpg image "Happy guy"
+ The command takes two arguments. The first argument is the name of
+ the image file. The second argument is optional and is a simple
+ description of the image, equivalent to the HTML alt="" in an image
+ tag. The description is used for tooltips, and for when a browser
+ doesn't support images, like the Lynx text browser.
- Qt provides single-source portability across Microsoft
- Windows, Mac OS X, Linux, and all major commercial Unix
- variants. It is also available for embedded devices.
- \endquotation
+ The remaining text \e{after} the file name is the optional,
+ description argument. Be sure to follow the file name or the
+ description with a line break. Curly brackets are required if the
+ description argument spans multiple lines.
- See also \l {inlineimage}{\\inlineimage} and \l
- {caption}{\\caption}.
+ \code
+ / *!
+ Qt by Trolltech is a C++ toolkit for cross-platform GUI
+ application development.
- \row
- \o \bold \\inlineimage \target inlineimage
- \o \bold {The \\inlineimage command expands to the image
- specified by its argument; the image is rendered inline
- with the rest of the text.}
+ \image happyguy.jpg "Happy guy"
- The command takes two arguments. The first is the name of
- the image file. The second argument is optional and is a
- simple description of the image equivalent to the HTML
- alt="" in an image tag. The description is used for
- tooltips, and when a browser doesn't support images like
- the Lynx text browser.
+ Qt provides single-source portability across Microsoft
+ Windows, Mac OS X, Linux, and all major commercial Unix
+ variants. It is also available for embedded devices.
+ * /
+ \endcode
- The most common use of the \\inlineimage command is in
- lists and tables. For example:
+ QDoc renders this as:
- \code
- / *!
- \list 1
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \endlist
- * /
- \endcode
+ \quotation
+ Qt by Trolltech is a C++ toolkit for cross-platform GUI
+ application development.
- will be rendered as
+ \image happyguy.jpg image "Happy guy"
- \list 1
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \endlist
+ Qt provides single-source portability across Microsoft
+ Windows, Mac OS X, Linux, and all major commercial Unix
+ variants. It is also available for embedded devices.
+ \endquotation
- And
+ See also \l {inlineimage-command} {\\inlineimage} and \l
+ {caption-command} {\\caption}.
- \code
- / *!
- \table
- \header
- \o Trolltech
- \o Trolltech
- \row
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \row
- \o \inlineimage happy.gif Oh so happy!
- \o \inlineimage happy.gif Oh so happy!
- \endtable
- * /
- \endcode
+ \target inlineimage-command
+ \section1 \\inlineimage
- will be rendered as
+ The \\inlineimage command expands to the image specified by its
+ argument. The image is rendered inline with the rest of the text.
- \raw HTML
- <table align="center" cellpadding="2"
- cellspacing="1" border="0">
- <tr valign="top" bgcolor="#a2c511">
- <th>Trolltech</th>
- <th>Trolltech</th>
- </tr>
+ The command takes two arguments. The first argument is the name of
+ the image file. The second argument is optional and is a simple
+ description of the image, equivalent to the HTML alt="" in an image
+ tag. The description is used for tooltips, and for when a browser
+ doesn't support images, like the Lynx text browser.
- <tr valign="top" bgcolor="#f0f0f0">
- <td><img src="images/happy.gif" alt="Oh so happy!" />
- </td>
- <td><img src="images/happy.gif" alt="Oh so happy!" />
- </td>
- </tr>
+ The most common use of the \\inlineimage command is in lists and
+ tables. Here is an example of including inline images in a list:
- <tr valign="top" bgcolor="#f0f0f0">
- <td><img src="images/happy.gif" alt="Oh so happy!"/>
- </td>
- <td><img src="images/happy.gif" alt="Oh so happy!" />
- </td>
- </tr>
+ \code
+ / *!
+ \list 1
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endlist
+ * /
+ \endcode
- </table>
- \endraw
+ QDoc renders this as:
- The command can also be used to insert an image
- inline with the regular text. For example:
+ \list 1
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endlist
- \code
- / *!
- \inlineimage training.jpg Training by Trolltech
- The Qt Programming course is offered as a
- five day Open Enrollment Course. The classes
- are open to the public.While the course is open
- to anyone who wants to learn, attendees should
- have significant experience in C++ development
- to derive maximum benefit from the course.
- * /
- \endcode
+ Her eis an example of including inline images in a table:
- will be rendered as
+ \code
+ / *!
+ \table
+ \header
+ \o Trolltech
+ \o Trolltech
+ \row
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \row
+ \o \inlineimage happy.gif Oh so happy!
+ \o \inlineimage happy.gif Oh so happy!
+ \endtable
+ * /
+ \endcode
- \quotation
- \inlineimage training.jpg Training by Trolltech
- The Qt Programming course is offered as a
- five day Open Enrollment Course. The classes
- are open to the public.While the course is open
- to anyone who wants to learn, attendees should
- have significant experience in C++ development
- to derive maximum benefit from the course.
- \endquotation
+ QDoc renders this as:
+
+ \raw HTML
+ <table align="center" cellpadding="2"
+ cellspacing="1" border="0">
+ <tr valign="top" bgcolor="#a2c511">
+ <th>Trolltech</th>
+ <th>Trolltech</th>
+ </tr>
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ </tr>
+ <tr valign="top" bgcolor="#f0f0f0">
+ <td><img src="images/happy.gif" alt="Oh so happy!"/>
+ </td>
+ <td><img src="images/happy.gif" alt="Oh so happy!" />
+ </td>
+ </tr>
+ </table>
+ \endraw
- See also \l {image}{\\image} and \l {caption}{\\caption}.
+ The command can also be used to insert an image inline with the
+ text.
- \row
- \o \bold \\caption \target caption
- \o \bold {The \\caption command provides a caption for an image.}
+ \code
+ / *!
+ \inlineimage training.jpg Training by Trolltech
+ The Qt Programming course is offered as a
+ five day Open Enrollment Course. The classes
+ are open to the public.While the course is open
+ to anyone who wants to learn, attendees should
+ have significant experience in C++ development
+ to derive maximum benefit from the course.
+ * /
+ \endcode
+
+ QDoc renders this as:
- The command follows the same conventions for parentheses and use
- of braces for its \l argument as the \l {i}{\\i} command.
+ \quotation
+ \inlineimage training.jpg Training by Trolltech
+ The Qt Programming course is offered as a
+ five day Open Enrollment Course. The classes
+ are open to the public.While the course is open
+ to anyone who wants to learn, attendees should
+ have significant experience in C++ development
+ to derive maximum benefit from the course.
+ \endquotation
- \warning This is preliminary functionality. The
- command is not fully implemented.
+ See also \l {image-command} {\\image} and \l {caption-command} {\\caption}.
- See also \l {image}{\\image} and \l
- {inlineimage}{\\inlineimage}
+ \target caption-command
+ \section1 \\caption
- \endtable
-*/
+ The \\caption command provides a caption for an image.
-/*!
- \page 10-qdoc-commands-container.html
- \previouspage Graphic Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Document Contents Commands
+ The command takes all the text up to the end of the paragraph to
+ be the caption. Experiment until you get the effect you want.
- \title Container Commands
+ \code
+ / *!
+ \table 100%
+ \row
+ \o \image windowsvista-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+ \o \image windowsvista-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+ \endtable
+ * /
+ \endcode
- The container commands create tables and lists with associated
- items and contents. A list is rendered left aligned as a separate
- paragraph. A table is rendered centered as a separate paragraph,
- and its width depends on its content.
+ QDoc renders this as:
- \section1 Alphabetical List
+ \table 100%
+ \row
+ \o \image windowsvista-pushbutton.png
+ \caption The QPushButton widget provides a command button.
+ \o \image windowsvista-toolbutton.png
+ \caption The QToolButton class provides a quick-access button to commands
+ or options, usually used inside a QToolBar.
+ \endtable
- \l {10-qdoc-commands-container.html#header}{\\header},
- \l {10-qdoc-commands-container.html#list}{\\list},
- \l {10-qdoc-commands-container.html#o}{\\o},
- \l {10-qdoc-commands-container.html#omitvalue}{\\omitvalue},
- \l {10-qdoc-commands-container.html#row}{\\row},
- \l {10-qdoc-commands-container.html#table}{\\table},
- \l {10-qdoc-commands-container.html#value}{\\value}
+ See also \l {image-command} {\\image} and \l {inlineimage-command}
+ {\\inlineimage}
+*/
- \section1 Command Descriptions
+/*!
+ \page 10-qdoc-commands-tablesandlists.html
+ \previouspage Including Images
+ \contentspage Table of Contents
+ \nextpage Special Content
- \table
- \header
- \o Command
- \o Description
+ \title Tables and Lists
- \row
- \o \bold \\table \target table
- \o \bold {The \\table command and the corresponding \\endtable
- command delimit the contents of a table.}
+ These commands enable creating lists and tables. A list is
+ rendered left aligned as a separate paragraph. A table is rendered
+ centered as a separate paragraph. The table width depends on the
+ width of its contents.
- The command accepts a single argument specifying the
- table's width in percentage:
+ \target table-command
+ \section1 \\table
+
+ The \\table and \\endtable commands delimit the contents of a
+ table.
+
+ The command accepts a single argument specifying the table's width
+ as a percentage of the page width:
\code
/ *!
@@ -2424,15 +2519,15 @@
* /
\endcode
- The code above ensures that the table will fill all
- available space. If the table's width is smaller than 100 %,
- the table will be centered in the generated documentation.
+ The code above ensures that the table will fill all available
+ space. If the table's width is smaller than 100 %, the table will
+ be centered in the generated documentation.
- A table can contain headers, rows and columns. A row starts
- with a \l {row}{\\row} command and consists of cells, which
- starts with a \l {o}{\\o} command. There is also a \l
- {header}{\\header} command which is a special kind of row
- with a special formatting. For example:
+ A table can contain headers, rows and columns. A row starts with a
+ \l {row-command} {\\row} command and consists of cells, which
+ starts with a \l {o-command} {\\o} command. There is also a \l
+ {header-command} {\\header} command which is a special kind of row
+ with a special formatting.
\code
/ *!
@@ -2458,7 +2553,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2"
@@ -2498,8 +2593,8 @@
</table>
\endraw
- You can also make cells span several rows and columns. For
- example:
+ You can also make cells span several rows and columns. For
+ example:
\code
/ *!
@@ -2519,7 +2614,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2" cellspacing="1"
@@ -2548,20 +2643,20 @@
</table>
\endraw
- See also \l {header}{\\header}, \l {row}{\\row} and \l {o}{\\o}.
+ See also \l {header-command} {\\header}, \l {row-command} {\\row} and \l {o-command} {\\o}.
- \row
- \o \bold \\header \target header
- \o \bold {The \\header command indicates that the following
- table cells are the current table's column headers.}
+ \target header-command
+ \section1 \\header
+
+ The \\header command indicates that the following table cells are
+ the current table's column headers.
- The command can only be used within the \l{table}
- {\\table...\\endtable} commands. A header can contain
- several cells. A cell is created with the \l {o}{\\o}
- command.
+ The command can only be used within the \l{table-command}
+ {\\table...\\endtable} commands. A header can contain several
+ cells. A cell is created with the \l {o-command} {\\o} command.
- A header cell's text is centered within the table cell and
- rendered using a bold font. For example:
+ A header cell's text is centered within the table cell and
+ rendered using a bold font.
\code
/ *!
@@ -2577,7 +2672,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2"
@@ -2598,23 +2693,22 @@
</table>
\endraw
- See also \l {table}{\\table}, \l {row}{\\row} and \l {o}{\\o}.
+ See also \l {table-command} {\\table}, \l {row-command} {\\row} and \l {o-command} {\\o}.
- \row
- \o \bold \\row \target row
- \o \bold {The \\row command indicates that the following table
- cells belong to the same row in the current table.}
+ \target row-command
+ \section1 \\row
- The command can only be used within the \l{table}
- {\\table...\\endtable} commands. A row can contain
- several cells. A cell is created with the \l {o}{\\o}
- command.
+ The \\row command begins a new row in a table. The \l {o-command}
+ {\\o items} that belong in the new row will immediately follow the
+ \\row.
- The background cell color of each row alternate between two
- shades of grey, making it easier to distinguish the rows
- from each other. The cells' contents is left aligned.
+ The command can only be used within the \l{table-command}
+ {\\table...\\endtable} commands. A row can contain several
+ cells. A cell is created with the \l {o-command} {\\o} command.
- For example:
+ The background cell color of each row alternates between two
+ shades of grey, making it easier to distinguish the rows from each
+ other. The cells' contents is left aligned.
\code
/ *!
@@ -2640,7 +2734,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2"
@@ -2680,44 +2774,45 @@
</table>
\endraw
- See also \l {table}{\\table}, \l {header}{\\header} and \l
- {o}{\\o}.
+ See also \l {table-command} {\\table}, \l {header-command}
+ {\\header} and \l {o-command} {\\o}.
- \row
- \o \bold \\value \target value
- \o \bold {The \\value command starts the documentation of a C++ enum
- item}.
+ \target value-command
+ \section1 \\value
- The command's first argument is the enum item. Then follows
- its associated description. The description argument ends
- at the next blank line or \\value. The arguments are
- rendered within a table.
+ The \\value command starts the documentation of a C++ enum item.
- The documentation will be located in the associated class,
- header file or namespace documentation. See the \l
- {enum}{\\enum} documentation for an example.
+ The command's first argument is the enum item. Then follows its
+ associated description. The description argument ends at the next
+ blank line or \\value. The arguments are rendered within a table.
- See also \l {enum}{\\enum} and \l {omitvalue}{\\omitvalue}.
+ The documentation will be located in the associated class, header
+ file or namespace documentation. See the \l {enum-command}
+ {\\enum} documentation for an example.
- \row
- \o \bold \\omitvalue \target omitvalue
- \o \bold {The \\omitvalue command excludes a C++ enum item
- from the documentation}.
+ See also \l {enum-command} {\\enum} and \l {omitvalue-command} {\\omitvalue}.
+
+ \target omitvalue-command
+ \section1 \\omitvalue
- The command's only argument is the name of the enum item
- that will be omitted. See the \l {enum}{\\enum}
- documentation for an example.
+ The \\omitvalue command excludes a C++ enum item from the
+ documentation.
- See also \l {enum}{\\enum} and \l {value}{\\value}.
+ The command's only argument is the name of the enum item that will
+ be omitted. See the \l {enum-command} {\\enum} documentation for
+ an example.
- \row
- \o \bold \\list \target list
- \o \bold {The \\list command and the corresponding \\endlist
- command delimit a list of items.}
+ See also \l {enum-command} {\\enum} and \l {value-command}
+ {\\value}.
+
+ \target list-command
+ \section1 \\list
+
+ The \\list and \\endlist commands delimit a list of items.
- You need to create each list item explicitly using the \l
- {o}{\\o} command. A list can contain one or more items; it
- can also be nested. For example:
+ Create each list item with the \l {o-command} {\\o} command. A
+ list always contains one or more items. Lists can be nested. For
+ example:
\code
/ *!
@@ -2738,7 +2833,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\list
\o Qt Reference Documentation: Getting Started
@@ -2755,8 +2850,8 @@
\endlist
\endlist
- The \\list command takes an optional argument providing
- alternative appearances for the list items. For example:
+ The \\list command takes an optional argument providing
+ alternative appearances for the list items.
\code
/ *!
@@ -2768,7 +2863,7 @@
* /
\endcode
- will render the list items with bullets (the default):
+ QDoc renders the list items with bullets (the default):
\list
\o How to Learn Qt
@@ -2776,9 +2871,12 @@
\o Tutorial and Examples
\endlist
- If you provide 'A' as an argument to the \\list command,
- the bullets are replaced with characters following in
- alphabetical order:
+ \warning There appears to be a bug in qdoc3 here. If you include
+ any of the argument types, you get a numeric list. We're looking
+ into it.
+
+ If you provide 'A' as an argument to the \\list command, the
+ bullets are replaced with characters in alphabetical order:
\list A
\o How to Learn Qt
@@ -2786,8 +2884,8 @@
\o Tutorial and Examples
\endlist
- If you replace 'A' with '1', the list items are rendered
- with numbers following in ascending order:
+ If you replace 'A' with '1', the list items are numbered in
+ ascending order:
\list 1
\o How to Learn Qt
@@ -2796,8 +2894,8 @@
\endlist
- If you provide 'i' as the argument, the default bullets are
- replaced with roman numerals:
+ If you provide 'i' as the argument, the bullets are replaced with
+ roman numerals:
\list i
\o How to Learn Qt
@@ -2805,9 +2903,9 @@
\o Tutorial and Examples
\endlist
- Or finally, you can make the list items appear with roman
- numbers following in ascending order if you provide 'I' as
- the optional argument:
+ Finally, you can make the list items appear with roman numbers
+ following in ascending order if you provide 'I' as the optional
+ argument:
\list I
\o How to Learn Qt
@@ -2815,9 +2913,9 @@
\o Tutorial and Examples
\endlist
- You can also make the listing start at any character or
- number by simply provide the number or character you want
- to start at. For example:
+ You can also make the listing start at any character or number by
+ simply provide the number or character you want to start at. For
+ example:
\code
/ *!
@@ -2829,7 +2927,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\list G
\o How to Learn Qt
@@ -2837,30 +2935,30 @@
\o Tutorial and Examples
\endlist
- See also \l {o}{\\o}.
+ See also \l {o-command} {\\o}.
- \row
- \o \bold \\o \target o
- \o \bold {The \\o command announce a table or list item.}
+ \target o-command
+ \section1 \\o (cell, item)
- Earlier we used the \l {i}{\\i} command for this purpose. For more
- information see the \l
- {26-qdoc-commands-compatibility.html#o-versus-i}{compatibility}
- section.
+ The \\o command announce a table or list item.
- The command can only be used within the \l{table}
- {\\table...\\endtable} or \l{list}{\\list... \\endlist}
- commands.
+ Earlier we used the \l {i-command} {\\i} command for this
+ purpose. For more information see the \l
+ {26-qdoc-commands-compatibility.html#o-versus-i} {compatibility}
+ section.
- It considers everything until the next occurrence
- of the \\o command, or the currently applicable \l
- {table}{\\endtable} or \l {list}{\\endlist} command, as its
- argument. For examples, see \l {table}{\\table} and \l
- {list}{\\list}.
+ The command can only be used within the \l{table-command}
+ {\\table...\\endtable} or \l{list-command} {\\list... \\endlist}
+ commands.
- If the command is used within a table, you can in addition
- specify how many rows or columns the item should span. For
- example:
+ It considers everything until the next occurrence of the \\o
+ command, or the currently applicable \l {table-command}
+ {\\endtable} or \l {list-command} {\\endlist} command, as its
+ argument. For examples, see \l {table-command} {\\table} and \l
+ {list-command} {\\list}.
+
+ If the command is used within a table, you can in addition specify
+ how many rows or columns the item should span.
\code
/ *!
@@ -2880,7 +2978,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2" cellspacing="1"
@@ -2909,333 +3007,133 @@
</table>
\endraw
- If not specified, the item will span one column and one row.
+ If not specified, the item will span one column and one row.
+
+ See also \l {table-command} {\\table}, \l {header-command}
+ {\\header}, \l {list-command} {\\list} and \l {o-command} {\\o}.
- See also \l {table}{\\table}, \l {header}{\\header},
- \l {list}{\\list} and \l {o}{\\o}.
- \endtable
*/
/*!
- \page 11-qdoc-commands-documentcontents.html
- \previouspage Container Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Miscellaneous Commands
+ \page 11-qdoc-commands-specialcontent.html
+ \previouspage Tables and Lists
+ \contentspage Table of Contents
+ \nextpage Miscellaneous
- \title Document Contents Commands
+ \title Special Content
The document contents commands identify parts of the documentation,
i.e. parts with a special rendering, conceptual meaning or
function.
- \section1 Alphabetical List
-
- \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract},
- \l {11-qdoc-commands-documentcontents.html#brief}{\\brief},
- \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote},
- \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese},
- \l {11-qdoc-commands-documentcontents.html#tableofcontents}
- {\\tableofcontents},
- \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation},
- \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
-
- \section1 Command Descriptions
-
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\abstract \target abstract
- \o \bold {The \\abstract command and the corresponding \\endabstract
- command delimit a document's abstract section.}
-
- The abstract section is rendered as an indented italicized
- paragraph.
-
- \warning This is preliminary funcionality. The
- command is not fully implemented. Currently, the abstract
- section is rendered as a regular HTML paragraph. For
- example:
-
- \code
- / *!
- \abstract
- Qt by Trolltech is a C++ toolkit for cross-platform
- GUI application development. Qt provides
- single-source portability across Microsoft Windows,
- Mac OS X, Linux, and all major commercial Unix
- variants. It is also available for embedded
- devices.
- \endabstract
- * /
- \endcode
-
- will be rendered as
-
- \abstract
- Qt by Trolltech is a C++ toolkit for cross-platform GUI
- application development. Qt provides single-source
- portability across Microsoft Windows, Mac OS X, Linux,
- and all major commercial Unix variants. It is also
- available for embedded devices.
- \endabstract
-
- \row
- \o \bold \\quotation \target quotation
- \o \bold { The \\quotation command and the corresponding
- \\endquotation command delimit a quotation remark.}
-
- This command replaces the old \\quote command. For more
- information see the \l
- {26-qdoc-commands-compatibility.html#quotation-versus-quote}
- {compatibility} section.
-
- The remark is rendered as a separate centered
- paragraph. For example:
-
- \code
- / *!
- While the prospect of a significantly broader market is
- good news for Firstlogic, the notion also posed some
- challenges. Dave Dobson, director of technology for the La
- Crosse, Wisconsin-based company, said:
-
-
- \quotation
- As our solutions were being adopted into new
- environments, we saw an escalating need for easier
- integration with a wider range of enterprise
- applications.
- \endquotation
- * /
- \endcode
-
- will be rendered as
-
- While the prospect of a significantly broader market is
- good news for Firstlogic, the notion also posed some
- challenges. Dave Dobson, director of technology for the La
- Crosse, Wisconsin-based company, said:
-
- \quotation
- As our solutions were being adopted into new
- environments, we saw an escalating need for easier
- integration with a wider range of enterprise
- applications.
- \endquotation
-
- \row
- \o \bold \\footnote \target footnote
- \o \bold {The \\footnote command and the corresponding
- \\endfootnote command delimit a footnote.}
-
- The footnote follows the standard conventions, rendered at the
- bottom of the page.
-
- \warning This is preliminary funcionality. The
- command is not fully implemented.
-
- For example:
-
- \code
- / *!
- In Qt 4 we have tried to simplify the constructors of
- QObject/QWidget subclasses. This makes subclassing
- easier, at the same time as it helps make the Qt
- library more efficient.
-
- \footnote
- Constructors no longer take a "const char *name"
- parameter. If you want to specify a name for a QObject,
- you must call QObject::setObjectName() after
- construction. The object name is now a QString.
- \endfootnote
-
- QWidget's WFlags data type has been split in two:
- Qt::WindowFlags specifies low-level window flags (the
- type of window and the frame style), whereas
- Qt::WidgetAttribute specifies various higher-level
- attributes about the widget (e.g.,
- WA_StaticContents).
- * /
- \endcode
-
- will be rendered as
-
- \quotation
- In Qt 4 we have tried to simplify the constructors of
- QObject/QWidget subclasses. This makes subclassing
- easier, at the same time as it helps make the Qt
- library more efficient.
-
- \footnote
- Constructors no longer take a "const char *name"
- parameter. If you want to specify a name for a QObject,
- you must call QObject::setObjectName() after
- construction. The object name is now a QString.
- \endfootnote
-
- QWidget's WFlags data type has been split in two:
- Qt::WindowFlags specifies low-level window flags (the
- type of window and the frame style), whereas
- Qt::WidgetAttribute specifies various higher-level
- attributes about the widget (e.g.,
- WA_StaticContents).
- \endquotation
+ \target abstract-command
+ \section1 \\abstract
- \row
- \o \bold \\tableofcontents \target tableofcontents
- \o \bold {The \\tableofcontents command generates a
- table displaying the titles of the current documentation
- unit's parts, chapters, sections, etc.}
-
- The command accepts a single optional argument:
-
- \code
- \tableofcontents sectionN
- \endcode
-
- where \c sectionN is the deepest section to include (by
- default all sections are included).
-
- For example, it the documentation unit's structure looks
- something like this:
-
- \quotation
- \raw HTML
- <a name="Basic Qt">
- <h1>Basic Qt</h1>
- </a>
- <p>This is the first part.</p>
-
- <a name="Getting started">
- <h2>Getting Started</h2>
- </a>
- This is the first part's first chapter.</p>
+ The \\abstract and \\endabstract commands delimit a
+ document's abstract section.
- <a name="Hello Qt">
- <h3>Hello Qt</h3>
- </a>
- <p>This is the first chapter's first section.</p>
+ The abstract section is rendered as an indented italicized
+ paragraph.
- <a name="Making Connections">
- <h3>Making Connections</h3>
- </a>
- <p>This is the first chapter's second section.</p>
+ \warning The \bold{\\abstract} and \bold{\\endabstract} commands
+ have not been implemented. The abstract section is rendered as a
+ regular HTML paragraph.
- <a name="Using the Reference Documentation">
- <h3>Using the Reference Documentation</h3>
- </a>
- <p>This is the first chapter's third section.</p>
+ \target quotation-command
+ \section1 \\quotation
- <a name="Creating Dialogs">
- <h2>Creating Dialogs</h2>
- </a>
- <p>This is the first part's second chapter.</p>
+ The \\quotation and \\endquotation commands delimit a long quotation.
- <a name="Subclassing QDialog">
- <h3>Subclassing QDialog</h3>
- </a>
- <p>This is the second chapter's first section.</p>
+ The text in the delimited block is surrounded by
+ \bold{<blockquote>} and \bold{</blockquote>} in the html output,
+ e.g.:
- ...
+ \code
+ / *!
+ While the prospect of a significantly broader market is
+ good news for Firstlogic, the notion also posed some
+ challenges. Dave Dobson, director of technology for the La
+ Crosse, Wisconsin-based company, said:
+
+ \quotation
+ As our solutions were being adopted into new
+ environments, we saw an escalating need for easier
+ integration with a wider range of enterprise
+ applications.
+ \endquotation
+ * /
+ \endcode
- <a name="Intermediate Qt">
- <h1>Intermediate Qt</h1>
- </a>
- <p>This is the second part.</p>
+ The text in the \bold{\\quotation} block will appear in the generated HTML as:
- <a name="Layout Management">
- <h2>Layout Management</h2>
- </a>
- <p>This is the second part's first chapter.</p>
+ \code
+ <blockquote>
+ <p>As our solutions were being adopted into new environments,
+ we saw an escalating need for easier integration with a wider
+ range of enterprise applications.</p>
+ </blockquote>
+ \endcode
- <a name="Basic Layouts">
- <h3>Basic Layouts</h3>
- </a>
- <p>This is the first chapter's first section.</p>
+ The built-in style sheet for most browsers will render the
+ contents of the <blockquote> tag with left and right
+ indentations. The example above would be rendered as:
- ...
+ \quotation
+ As our solutions were being adopted into new
+ environments, we saw an escalating need for easier
+ integration with a wider range of enterprise
+ applications.
+ \endquotation
- \endraw
- \endquotation
+ But you can redefine the \bold{<blockquote>} tag in your style.css file.
- Then
+ This command replaces the old \\quote command. For more
+ information see the \l
+ {26-qdoc-commands-compatibility.html#quotation-versus-quote}
+ {compatibility} section.
- \code
- / *!
- Contents:
+ \target footnote-command
+ \section1 \\footnote
- \tableofcontents
+ The \\footnote and \\endfootnote commands delimit a footnote.
- ...
- * /
- \endcode
+ The footnote is rendered at the bottom of the page.
- will expand to
+ \warning The \bold{\\footnote} and \bold{\\endfootnote} commands
+ have not been implemented. The footnote is rendered as a regular
+ HTML paragraph.
- \quotation
- \raw HTML
- <p>Contents:</p>
+ \target tableofcontents-command
+ \section1 \\tableofcontents
- <ul>
- <li><a href="#Basic Qt">Basic Qt</a></li>
- <ul>
- <li><a href="#Getting Started">Getting Started</a></li>
- <ul>
- <li><a href="#Hello Qt">Hello Qt</a></li>
- <li><a href="#Making Connections">
- Making Connections</a></li>
- <li><a href="#Using the Reference Documentation">
- Using the Reference Documentation</a></li>
- </ul>
- <li><a href="#Creating Dialogs">Creating Dialogs</a></li>
- <ul>
- <li><a href="#Subclassing QDialog">
- Subclassing QDialog</a></li>
- </ul>
- </ul>
- <li><a href="#Intermediate Qt">Intermediate Qt</a></li>
- <ul>
- <li><a href="#Layout Management">Layout Management</a></li>
- <ul>
- <li><a href="#Basic Layouts">Basic Layouts</a></li>
- </ul>
- </ul>
- </ul>
+ The \\tableofcontents command has been disabled because QDoc
+ now generates a table of contents automatically.
- ...
- \endraw
- \endquotation
+ The automatically generated table of contents appears in the upper
+ righthand corner of the page.
- Each table entry becomes a link to the corresponding part,
- chapter or section.
+ \target brief-command
+ \section1 \\brief
- \row
- \o \bold \\brief \target brief
- \o \bold {The \\brief command introduces a one-sentence
- description of a class, namespace, header file, property
- or variable.}
+ The \\brief command introduces a one-sentence description of a
+ class, namespace, header file, property or variable.
- The brief text is used to introduce the documentation of
- the associated object, and in lists generated using the \l
- {generatelist}{\\generatelist} command.
+ The brief text is used to introduce the documentation of the
+ associated object, and in lists generated using the \l
+ {generatelist-command} {\\generatelist} command.
- The \\brief command can be used in two significant
- different ways: \l {brief class}{One for classes,
- namespaces and header files}, and \l {brief property}{one
- for properties and variables}.
+ The \\brief command can be used in two significant different ways:
+ \l {brief class} {One for classes, namespaces and header files},
+ and \l {brief-property} {one for properties and variables}.
- \target brief property
+ \target brief-property
- When the \\brief command is used to describe a property or
- a variable, the brief text must only be a sentence fragment
- and start with "whether" (for boolean properties and
- variables) or "the" (for any other property or variable).
+ When the \\brief command is used to describe a property or a
+ variable, the brief text must be a sentence fragment starting with
+ "whether" (for a boolean property or variable) or starting with
+ "the" (for any other property or variable).
- For example the boolean QWidget::isWindow property:
+ For example the boolean QWidget::isWindow property:
\code
/ *!
@@ -3270,7 +3168,7 @@
* /
\endcode
- The latter will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
@@ -3292,28 +3190,21 @@
\endlist
See also \l
- {QWidget::frameGeometry()}{frameGeometry()}, \l
- {QWidget::rect()}{rect()}, ...
+ {QWidget::frameGeometry()} {frameGeometry()}, \l
+ {QWidget::rect()} {rect()}, ...
\endquotation
- \target brief class
+ \target brief class
- When the \\brief command is used to describe a class, the
- brief text should be a complete sentence and must start
- like this:
+ When the \\brief command is used to describe a class, the brief
+ text should be a complete sentence and must start like this:
\code
The <classname> class is|provides|contains|specifies...
\endcode
- and likewise when the command is used for namespaces or
- header files.
-
- \warning The brief statement is used as the first
- paragraph of the detailed description. Do not repeat the
- sentence.
-
- For example:
+ \warning The brief statement is used as the first paragraph of the
+ detailed description. Do not repeat the sentence.
\code
/ *!
@@ -3333,7 +3224,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
@@ -3342,7 +3233,7 @@
The PreviewWindow class is a custom widget displaying
the names of its currently set window flags in a
- read-only text editor. \l {preview window}{More...}
+ read-only text editor. \l {preview window} {More...}
\raw HTML
<h3>Properties</h3>
@@ -3358,8 +3249,8 @@
\endraw
\list
- \o \l {constructor}{PreviewWindow}(QWidget *parent = 0)
- \o void \l {function}{setWindowFlags}(Qt::WindowFlags flags)
+ \o \l {constructor} {PreviewWindow}(QWidget *parent = 0)
+ \o void \l {function} {setWindowFlags}(Qt::WindowFlags flags)
\endlist
\list
@@ -3395,13 +3286,14 @@
<hr />
<h2>Detailed Description</h2>
\endraw
+
The PreviewWindow class is a custom widget displaying
the names of its currently set window flags in a
read-only text editor.
The PreviewWindow class inherits QWidget. The widget
displays the names of its window flags set with the \l
- {function}{setWindowFlags()} function. It is also
+ {function} {setWindowFlags()} function. It is also
provided with a QPushButton that closes the window.
...
@@ -3418,7 +3310,7 @@
<h3>PreviewWindow(QWidget *parent = 0)</h3>
\endraw
- Constructs a preview window widget with \i parent.
+ Constructs a preview window widget with \e parent.
\target function
\raw HTML
@@ -3434,7 +3326,7 @@
the text in the widgets text editor.
\endquotation
- Using \\brief with a namespace can for example look like this:
+ Using \\brief in a \l{namespace-command}{\\namespace}:
\code
/ *!
@@ -3445,8 +3337,7 @@
* /
\endcode
- and finally using \\brief with a header file can look
- something like this:
+ Using \\brief in a \l{headerfile-command}{\\headerfile}:
\code
/ *!
@@ -3460,107 +3351,83 @@
* /
\endcode
- See also \l{property}{\\property}, \l{class}{\\class},
- \l{namespace}{\\namespace} and \l{headerfile}{\\headerfile}.
-
- \row
- \o \bold \\legalese \target legalese
- \o \bold {The \\legalese command, and the corresponding \\endlegalese
- command, delimit a licence agreement.}
-
- If the \\endlegalese command is omitted, QDoc will still
- process the \\legalese command but considers the rest of
- the documentation page as the license agreement.
-
- Ideally, the license documentation is located where the
- licensed code is used.
-
- Later the documentation identified by the \\legalese
- command can be accumulated into a list using the \l
- {generatelist}{\\generatelist} command with the \c legalese
- argument. This is useful to generate an overview of all the
- licenses associated with the source code.
-
- For example:
-
- \code
- \ * !
- ...
-
- On X11, Qt also supports drops via the Motif Drag \&
- Drop Protocol. The implementation incorporates some
- code that was originally written by Daniel Dardailler,
- and adapted for Qt by Matt Koss \<koss@napri.sk\> and
- Trolltech. Here is the original copyright notice:
-
- \legalese
- \code
-
- Copyright 1996 Daniel Dardailler.
-
- Permission to use, copy, modify, distribute, and sell
- this software for any purpose is hereby granted without
- fee, provided that the above copyright notice appear in
- all copies and that both that copyright notice and this
- permission notice appear in supporting documentation,
- and that the name of Daniel Dardailler not be used in
- advertising or publicity pertaining to distribution of
- the software without specific, written prior
- permission. Daniel Dardailler makes no representations
- about the suitability of this software for any
- purpose. It is provided "as is" without express or
- implied warranty.
-
- Modifications Copyright 1999 Matt Koss, under the same
- license as above.
-
- \ endcode
- \endlegalese
- * /
- \endcode
-
- will be rendered as
-
- \quotation
- ...
-
- On X11, Qt also supports drops via the Motif Drag \&
- Drop Protocol. The implementation incorporates some
- code that was originally written by Daniel Dardailler,
- and adapted for Qt by Matt Koss \<koss@napri.sk\> and
- Trolltech. Here is the original copyright notice:
+ See also \l{property-command} {\\property}, \l{class-command}
+ {\\class}, \l{namespace-command} {\\namespace} and
+ \l{headerfile-command} {\\headerfile}.
- \legalese
- \code
-
- Copyright 1996 Daniel Dardailler.
+ \target legalese-command
+ \section1 \\legalese
- Permission to use, copy, modify, distribute, and sell
- this software for any purpose is hereby granted without
- fee, provided that the above copyright notice appear in
- all copies and that both that copyright notice and this
- permission notice appear in supporting documentation,
- and that the name of Daniel Dardailler not be used in
- advertising or publicity pertaining to distribution of
- the software without specific, written prior
- permission. Daniel Dardailler makes no representations
- about the suitability of this software for any
- purpose. It is provided "as is" without express or
- implied warranty.
+ The \\legalese and \\endlegalese commands delimit a licence agreement.
- Modifications Copyright 1999 Matt Koss, under the same
- license as above.
+ In the generated HTML, the delimited text is surrounded by a \bold
+ {<div class="LegaleseLeft">} and \bold {</div>} tags.
- \endcode
- \endlegalese
- \endquotation
+ For example, here is a license agreement enclosed in \\legalese
+ and \\endlegalese:
- \row
- \o \bold \\warning \target warning
- \o \bold {The \\warning command renders a "Warning:" prefix to
- the command's argument.}
+ \code
+ / *!
+ \legalese
+ Copyright 1996 Daniel Dardailler.
+
+ Permission to use, copy, modify, distribute, and sell this
+ software for any purpose is hereby granted without fee,
+ provided that the above copyright notice appear in all
+ copies and that both that copyright notice and this
+ permission notice appear in supporting documentation, and
+ that the name of Daniel Dardailler not be used in
+ advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission. Daniel
+ Dardailler makes no representations about the suitability of
+ this software for any purpose. It is provided "as is"
+ without express or implied warranty.
+
+ Modifications Copyright 1999 Matt Koss, under the same
+ license as above.
+ \endlegalese
+ * /
+ \endcode
- For example:
+ It will appear in the generated HTML as:
+
+ \code
+ <div class="LegaleseLeft">
+ <p>Copyright 1996 Daniel Dardailler.</p>
+ <p>Permission to use, copy, modify, distribute, and sell
+ this software for any purpose is hereby granted without fee,
+ provided that the above copyright notice appear in all
+ copies and that both that copyright notice and this
+ permission notice appear in supporting documentation, and
+ that the name of Daniel Dardailler not be used in
+ advertising or publicity pertaining to distribution of the
+ software without specific, written prior permission. Daniel
+ Dardailler makes no representations about the suitability of
+ this software for any purpose. It is provided "as is"
+ without express or implied warranty.</p>
+
+ <p>Modifications Copyright 1999 Matt Koss, under the same
+ license as above.</p>
+ </div>
+ \endcode
+
+ If the \\endlegalese command is omitted, QDoc will process the
+ \\legalese command but considers the rest of the documentation
+ page as the license agreement.
+
+ Ideally, the license text is located with the licensed code.
+
+ Elsewhere, the documentation identified as \e{\\legalese} command
+ can be accumulated using \l {generatelist-command} {\\generatelist}
+ with \c {legalese-command} as the argument. This is useful for
+ generating an overview of the license agreements associated with
+ the source code.
+
+ \target warning-command
+ \section1 \\warning
+
+ The \\warning command prepends "Warning:" to the command's
+ argument, in bold font.
\code
/ *!
@@ -3573,7 +3440,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
Qt::HANDLE is a platform-specific handle type
@@ -3583,50 +3450,31 @@
\warning Using this type is not portable.
\endquotation
- \endtable
+
*/
/*!
\page 12-0-qdoc-commands-miscellaneous.html
- \previouspage Document Contents Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Topical Commands
-
- \title Miscellaneous Commands
-
- These commands provide miscellaneous functions
- connected to the visual appearance of the documentation, and to the
- process of generating the documentation.
-
- \section1 Alphabetical List
+ \previouspage Special Content
+ \contentspage Table of Contents
+ \nextpage The QDoc Configuration File
- \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else},
- \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif},
- \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire},
- \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist},
- \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if},
- \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include},
- \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta},
- \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit},
- \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw},
- \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\unicode}
+ \title Miscellaneous
- \section1 Command Descriptions
+ These commands provide miscellaneous functions connected to the
+ visual appearance of the documentation, and to the process of
+ generating the documentation.
- \table
- \header
- \o Command
- \o Description
+ \target expire-command
+ \section1 \\expire
- \row
- \o \bold \\expire \target expire
- \o \bold {The \\expire command allows you to define an expiration
- date for your documentation.}
+ The \\expire command allows you to define an expiration
+ date for your documentation.
- When using the \\expire command, QDoc will emit a warning
- when the current date is larger than the specified
- date. The command accepts one argument; the argument's
- format is yyyy-mm-dd. For example:
+ When using the \\expire command, QDoc will emit a warning when the
+ current date is larger than the specified date. The command
+ accepts one argument; the argument's format is yyyy-mm-dd. For
+ example:
\code
/ *!
@@ -3645,23 +3493,24 @@
* /
\endcode
- If you run QDoc on 4 July 2005, it will emit the warning
+ If you run QDoc on 4 July 2005, it will emit the warning
\quotation
porting.qdoc:6: Documentation expired 185 days ago
\endquotation
- \row
- \o \bold \\generatelist \target generatelist
- \o \bold {The \\generatelist command expands to a list of
- various documentation or links to documentation.}
- For example in the Qt Reference Documentation:
+ \target generatelist-command
+ \section1 \\generatelist
+
+ The \\generatelist command expands to a list of various
+ documentation or links to documentation. Below is an example from
+ the Qt Reference Documentation:
\code
/ *!
\page classes.html
- \title All Qt Classes (main index)
+ \title All Classes
For a shorter list that only includes the most
frequently used classes, see \l{Qt's Main Classes}. For
@@ -3672,434 +3521,308 @@
* /
\endcode
- is used to generate \l {All Qt Classes (main index)}.
-
- The command accepts the following arguments:
-
- \target table example
-
- \list
- \o \c annotatedclasses
-
- The \c annotatedclasses argument provides a table
- containing the names of all the classes, and a
- description of each class. Each class name is a link to
- the class's reference documentation.
-
- For example:
-
- \quotation
- \raw HTML
- <table align="center" cellpadding="2"
- cellspacing="1" border="0">
-
- <tr valign="top" bgcolor="#d0d0d0">
- <td>
- <a href="http://qt.nokia.com/doc/4.0/qdial.html">
- QDial</a>
- </td>
- <td>Rounded range control (like a speedometer
- or potentiometer)</td>
- </tr>
-
- <tr valign="top" bgcolor="#d0d0d0">
- <td>
- <a href="http://qt.nokia.com/doc/4.0/qdialog.html">
- QDialog</a>
- </td>
- <td>The base class of dialog windows</td>
- </tr>
-
- <tr valign="top" bgcolor="#d0d0d0">
- <td>
- <a href="http://qt.nokia.com/doc/4.0/qdir.html">
- QDir</a>
- </td>
- <td>Access to directory structures and their
- contents</td>
- </tr>
- </table>
- \endraw
- \endquotation
-
- A class is identified within the documentation by the
- the \l {class}{\\class} command, and the descriptions
- are based on the argument of the \l {brief}{\\brief}
- commands in the class documentation.
-
- \target list example
+ This generates the \l {All Classes} page. The command accepts the
+ following arguments:
- \o \c classes
-
- The \c classes argument provides a complete alphabetical
- list of the classes. Each class name is a link to the
- class's reference documentation.
-
- For example:
-
- \quotation
- \raw HTML
- <p><table width="100%">
+ \target table example
+ \section2 \c annotatedclasses
- <tr>
- <td align="right"><b>A&nbsp;</b></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractbutton.html">QAbstractButton</a></td>
+ The \c annotatedclasses argument provides a table containing the
+ names of all the classes, and a description of each class. Each
+ class name is a link to the class's reference documentation. For
+ example:
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractextensionmanager.html">QAbstractExtensionManager</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemmodel.html">QAbstractItemModel</a></td>
- </tr>
-
- <tr>
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstracteventdispatcher.html">QAbstractEventDispatcher</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractformbuilder.html">QAbstractFormBuilder</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemview.html">QAbstractItemView</a></td>
- </tr>
-
- <tr>
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractextensionfactory.html">QAbstractExtensionFactory</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractitemdelegate.html">QAbstractItemDelegate</a></td>
-
- <td align="right"></td>
- <td><a href="http://qt.nokia.com/doc/4.0/qabstractlistmodel.html">QAbstractListModel</a></td>
- </tr>
- </table></p>
- \endraw
- \endquotation
-
- A class is identified within the documentation by the
- the \l {class}{\\class} command.
-
- \o \c classesbymodule
+ \table
+ \row
+ \o QDial
+ \o Rounded range control (like a speedometer or potentiometer)
+ \row
+ \o QDialog
+ \o The base class of dialog windows
+ \row
+ \o QDir
+ \o Access to directory structures and their contents
+ \endtable
- This particular argument requests an additional argument,
- i.e. a specification of the module.
+ A C++ class is documented with the \l {class-command} {\\class}
+ command. The annotation for the class is taken from the argument
+ of the class comment's \l {brief-command} {\\brief} command.
- For example:
+ \target list example
+ \section2 \c classes
- \code
- / *!
- \page qtgui.html
- \contentspage Qt Classes by Module
- \previouspage QtCore Classes
- \nextpage QtNetwork Classes
+ The \c classes argument provides a complete alphabetical list of
+ the classes. Each class name is a link to the class's reference
+ documentation. This command is uded to generate the \l
+ {classes.html} {All Classes} page this way:
- \title QtGui Classes
+ \code
+ / *!
+ \page classes.html
+ \title All Classes
+ \ingroup classlists
- \keyword QtGui
+ \brief If you know the name of the class you want, find it here.
- \generatelist {classesbymodule QtGui}
- * /
- \endcode
+ This is a list of all Qt classes. For a list of the classes
+ provided for compatibility with Qt3, see \l{Qt3 Support
+ Classes}. For classes that have been deprecated, see the
+ \l{Obsolete Classes} list.
- Together, these arguments provide a table containing the
- classes considered members of the specified module,
- accompanied with a brief description. Each class name is
- a link to the class's reference documentation.
+ \generatelist classes
+ * /
+ \endcode
- The generated table is rendered similarily to the one
- generated when using the \l {table example}{\c
- annotatedclasses} argument.
+ A C++ class is documented with the \l {class-command} {\\class}
+ command.
- For the basic classes in Qt, a class's module is
- determined by its location, i.e. its directory. However,
- for extensions, like ActiveQt and Qt Designer, a class
- is related to a module with the \l
- {inmodule}{\\inmodule} command.
+ \section2 \c classesbymodule
- \o \c classesbyedition
+ When this argument is used, a second argument is required, which
+ specifies the module whose classes are to be listed. QDoc
+ generates a table containing those classes. Each class is listed
+ with the text of its \l{brief-command} {\\brief} command.
- This particular argument requests an additional argument,
- i.e. a specification of the edition.
+ This command is used to generate the \l {phonon-module.html}
+ {Phonon Module} page this way.
- For example:
+ \code
+ / *!
+ \page phonon-module.html
+ \module Phonon
+ \title Phonon Module
+ \ingroup modules
- \code
- / *!
- \page console-edition-classes.html
- \title Qt Console Edition Classes
+ \brief The Phonon module contains namespaces and classes for multimedia functionality.
- \generatelist{classesbyedition Console}
- * /
- \endcode
+ \generatelist{classesbymodule Phonon}
- Together, these arguments provide a table containing the
- classes considered members of the specified edition,
- accompanied with a brief description. Each class name is
- a link to the class's reference documentation.
+ ...
- The edition a given class can be found in is determined by
- the module it belongs to.
+ * /
+ \endcode
- \o \c compatclasses
+ Each class that is a member of the specified module must be marked
+ with the \l {inmodule-command} {\\inmodule} command in its \\class
+ comment.
- The \c compatclasses argument provides a complete and
- alphabetical list of the support classes. A support
- class is identified within the documentation by the \l
- {compat}{\\compat} command. Each class name is a link to
- the class's reference documentation. The list is
- rendered similarily to the list generated by the \l
- {list example}{\c classes} argument.
+ \section2 \c compatclasses
- \warning The \c classesbymodule argument will at some
- point replace the this argument.
+ The \c compatclasses argument generates a list in alphabetical
+ order of the support classes. It is normally used only to
+ generate the \l {compatclasses.html} {Qt3 Support Classes} page
+ this way:
- \o \c functionindex
+ \code
+ / *!
+ \page compatclasses.html
+ \title Qt3 Support Classes
+ \ingroup classlists
- The \c functionindex argument provides a complete
- alphabetical list of all the documented member
- functions.
+ \brief These classes ease the porting of code from Qt 3 to Qt 4.
- For example:
+ These are the classes that Qt provides for compatibility with Qt
+ 3. Most of these are provided by the Qt3Support module.
- \quotation
- \raw HTML
- <p><center><font size="+1"><b><a href="#a">A</a>&nbsp;<a href="#b">B</a>&nbsp;<a href="#c">C</a>&nbsp;<a href="#d">D</a>&nbsp;<a href="#e">E</a>&nbsp;<a href="#f">F</a>&nbsp;<a href="#g">G</a>&nbsp;<a href="#h">H</a>&nbsp;<a href="#i">I</a>&nbsp;<a href="#j">J</a>&nbsp;<a href="#k">K</a>&nbsp;<a href="#l">L</a>&nbsp;<a href="#m">M</a>&nbsp;<a href="#n">N</a>&nbsp;<a href="#o">O</a>&nbsp;<a href="#p">P</a>&nbsp;<a href="#q">Q</a>&nbsp;<a href="#r">R</a>&nbsp;<a href="#s">S</a>&nbsp;<a href="#t">T</a>&nbsp;<a href="#u">U</a>&nbsp;<a href="#v">V</a>&nbsp;<a href="#w">W</a>&nbsp;<a href="#x">X</a>&nbsp;<a href="#y">Y</a>&nbsp;<a href="#z">Z</a>&nbsp;</b></font></center></p>
+ \generatelist compatclasses
+ * /
+ \endcode
- <p>DTDHandler: <a href="http://qt.nokia.com/doc/4.0/qxmlreader.html#DTDHandler">QXmlReader</a></p>
+ A support class is identified in the \\class comment with the \l
+ {compat-command} {\\compat} command.
- <p>QAXCLASS: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXCLASS">global</a></p>
+ \section2 \c functionindex
- <p>QAXFACTORY_BEGIN: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_BEGIN">global</a></p>
+ The \c functionindex argument provides a complete alphabetical
+ list of all the documented member functions. It is normally used
+ only to generate the \l {functions.html} {Qt function index} page
+ this way:
- <p>QAXFACTORY_DEFAULT: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_DEFAULT">global</a></p>
+ \code
+ / *!
+ \page functions.html
+ \title All Functions
+ \ingroup funclists
- <p>QAXFACTORY_END: <a href="http://qt.nokia.com/doc/4.0/qaxfactory.html#QAXFACTORY_END">global</a></p>
+ \brief All documented Qt functions listed alphabetically with a
+ link to where each one is declared.
- \endraw
+ This is the list of all documented member functions and global
+ functions in the Qt API. Each function has a link to the
+ class or header file where it is declared and documented.
- ...
- \endquotation
-
- \o \c legalese
-
- The \c legalese argument provides a complete list of all
- the licenses. The licenses are identified within the
- documentation using the \l {legalese}{\\legalese}
- command.
-
- For example:
-
- \quotation
- \raw HTML
- <hr />
- <p>
- Copyright (c) 1989 The Regents of the
- University of California. All rights reserved.
- </p>
-
- <p>
- 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...
- </p>
-
- <ul>
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qdate.html#weekNumber">QDate::weekNumber()</a>
- </li>
- </ul>
-
- <hr />
- <p>
- Copyright (c) 1991 by AT&amp;T.
- </p>
-
- <p>
- Permission to use, copy, modify, and distribute
- this software for any purpose without fee is
- hereby granted, provided that this entire notice
- is included in all copies of any software which
- is or includes a copy or modification of this
- software and in all copies of the supporting
- documentation for such software...
- </p>
-
- <ul>
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qlocale.html">QLocale</a>
- </li>
- </ul>
- <hr />
- \endraw
- ...
- \endquotation
+ \generatelist functionindex
+ * /
+ \endcode
- \o \c mainclasses
+ \section2 \c legalese
- The \c mainclasses argument provides a complete
- alphabetical list of the main classes. Each class name
- is a link to the class's reference documentation. A
- class is related to the group of main classes by using
- the \l {mainclass}{\\mainclass} command.
+ The \c legalese argument tells QDoc to generate a complete list of
+ licenses in the documentation. Each license is identified using
+ the \l {legalese-command} {\\legalese} command. This command is
+ used to generate the \l {licenses.html} {Qt license information}
+ page this way:
- The list is rendered similarily to the list generated by
- the \l {list example}{\c classes} argument.
+ \code
+ / *!
+ \page licenses.html
+ \title Other Licenses Used in Qt
+ \ingroup licensing
+ \brief Information about other licenses used for Qt components and third-party code.
+
+ Qt contains some code that is not provided under the
+ \l{GNU General Public License (GPL)},
+ \l{GNU Lesser General Public License (LGPL)} or the
+ \l{Qt Commercial Edition}{Qt Commercial License Agreement}, but rather under
+ specific licenses from the original authors. Some pieces of code were developed
+ by Nokia and others originated from third parties.
+ This page lists the licenses used, names the authors, and links
+ to the places where it is used.
+
+ Nokia gratefully acknowledges these and other contributions
+ to Qt. We recommend that programs that use Qt also acknowledge
+ these contributions, and quote these license statements in an
+ appendix to the documentation.
+
+ See also: \l{Licenses for Fonts Used in Qt for Embedded Linux}
+
+ \generatelist legalese
+ * /
+ \endcode
- \o \c overviews
+ \section2 \c mainclasses
- The \c overviews argument provides a complete
- alphabetical overview of the documentation. Each list
- entry is a link to the respective documentation page.
+ The \c mainclasses argument tells QDoc to generate an alphabetical
+ list of the main classes. A class is marked as a main class by
+ including a \l {mainclass-command} {\\mainclass} command in the
+ \\class comment.
- The list includes pages declared using commands like \l
- {page}{\\page} and \l {group}{\\group}. The list omits
- examples and classes, and only lists the first page of
- documentation that contains two or more pages using
- commands like \l {nextpage}{\\nextpage}.
+ \note The Qt documentation no longer includes a main classes page,
+ but you can generate one for your main classes if you want it.
- For example:
+ \section2 \c overviews
- \quotation
- \raw HTML
- <ul>
+ The \c overviews argument is used to tell QDoc to generate a list
+ by concatenating the contents of all the \l {group-command}
+ {\\group} pages. Qt uses it to generate the \l {overviews.html}
+ {overviews} page this way:
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qtalgorithms.html">
- &lt;QtAlgorithms&gt; - Generic Algorithms
- </a>
- </li>
+ \code
+ / *!
+ \page overviews.html
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qtglobal.html">
- &lt;QtGlobal&gt; - Global Qt Declarations
- </a>
- </li>
+ \title All Overviews and HOWTOs
- <li>
- <a href="http://qt.nokia.com/doc/4.0/qaxserver-demo-simple.html">
- A standard ActiveX and the &quot;simple&quot; ActiveQt widget
- </a>
- </li>
+ \generatelist overviews
+ * /
+ \endcode
- <li>
- <a href="http://qt.nokia.com/doc/4.0/aboutqt.html">
- About Qt
- </a>
- </li>
+ \section2 \c related
- <li>
- <a href="http://qt.nokia.com/doc/4.0/trolltech.html">
- About Trolltech
- </a>
- </li>
+ The \c related argument is used in combination with the \l
+ {group-command} {\\group} and \l {ingroup-command} {\\ingroup}
+ commands to list all the overviews related to a specified
+ group. For example, the page for the \l {Programming with Qt}
+ {Programming with Qt} page is generated this way:
- <li>
- <a href="http://qt.nokia.com/doc/4.0/abstractwidgets.html">
- Abstract Widget Classes
- </a>
- </li>
+ \code
+ / *!
+ \group qt-basic-concepts
+ \title Programming with Qt
- <li>
- <a href="http://qt.nokia.com/doc/4.0/accessibility.html">
- Accessibility Classes
- </a>
- </li>
- ...
- </ul>
- \endraw
- \endquotation
+ \brief The basic architecture of the Qt cross-platform application and UI framework.
- \o \c related
+ Qt is a cross-platform application and UI framework for
+ writing web-enabled applications for desktop, mobile, and
+ embedded operating systems. This page contains links to
+ articles and overviews explaining key components and
+ techniuqes used in Qt development.
- The \c related argument is used in combination with the
- \l {group}{\\group} command to list all the overviews
- related to the given group. Each list entry is a link to
- the respective documentation page.
+ \generatelist {related}
+ * /
+ \endcode
- \o \c relatedinline
+ Each page listed on this group page contains the command:
- The \c related argument is used in combination with the
- \l {group}{\\group} command to collect all documentation
- related to the given group. The various documentation
- snippets are copied directly into the group page.
+ \code
+ \ingroup qt-basic-concepts
+ \endcode
- \o \c service
+ \section2 \c service
- The \c service argument provides a complete alphabetical
- list of the services. Each service name is a link to the
- service's reference documentation.
+ The \c service argument tells QDoc to generate an alphabetical
+ list of the services. Each service name is a link to the service's
+ reference documentation.
- A service is identified within the documentation by the
- \l {service}{\\service} command.
+ A service is identified with the \l {service-command} {\\service}
+ command.
- \endlist
+ \note This command and the \l {service-command} {\\service}
+ command are not used in the Qt documentation.
+ \target if-command
+ \section1 \\if
- \row
- \o \bold \\if \target if
- \o \bold {The \\if command and the corresponding \\endif command
- enclose parts of a QDoc comment that only will be included if
- the condition specified by the command's argument is true.}
+ The \\if command and the corresponding \\endif command
+ enclose parts of a QDoc comment that only will be included if
+ the condition specified by the command's argument is true.
- The command reads the rest of the line and parses it as an
- C++ #if statement. For example:
+ The command reads the rest of the line and parses it as an C++ #if
+ statement.
\code
/ *!
\if defined(opensourceedition)
\bold{Note:} This edition is for the development of
- \l{Qt Open Source Edition}{Free and Open Source}
+ \l{Qt Open Source Edition} {Free and Open Source}
software only; see \l{Qt Commercial Editions}.
\endif
* /
\endcode
- This QDoc comment will only be rendered if the \c
- opensourceedition preprocessor symbol is defined, and
- specified in the \l {definesvariable}{defines} variable in
- the configuration file to make QDoc process
- the code within #ifdef and #endif:
+ This QDoc comment will only be rendered if the \c
+ opensourceedition preprocessor symbol is defined, and specified in
+ the \l {defines-variable} {defines} variable in the configuration
+ file to make QDoc process the code within #ifdef and #endif:
\code
defines = opensourceedition
\endcode
- You can also define the preprocessor symbol manually on the
- command line. For more information see the documentation of
- the \l {definesvariable}{defines} variable.
+ You can also define the preprocessor symbol manually on the
+ command line. For more information see the documentation of the \l
+ {defines-variable} {defines} variable.
- See also \l{endif}{\\endif}, \l{else}{\\else}, \l
- {definesvariable}{defines} and \l falsehoods.
+ See also \l{endif-command} {\\endif}, \l{else-command} {\\else},
+ \l {defines-variable} {defines} and \l {falsehoods-variable}
+ {falsehoods}.
- \row
- \o \bold \\endif \target endif
- \o \bold {The \\endif command and the corresponding \\if command
- enclose parts of a QDoc comment that will be included if
- the condition specified by the \l {if}{\\if} command's
- argument is true.}
+ \target endif-command
+ \section1 \\endif
- For more information, see the documentation of the \l
- {if}{\\if} command.
+ The \\endif command and the corresponding \\if command
+ enclose parts of a QDoc comment that will be included if
+ the condition specified by the \l {if-command} {\\if} command's
+ argument is true.
- See also \l{if}{\\if}, \l{else}{\\else}, \l
- {definesvariable}{defines} and \l falsehoods.
+ For more information, see the documentation of the \l {if-command}
+ {\\if} command.
- \row
- \o \bold \\else \target else
- \o \bold {The \\else command specifies an alternative if the
- condition in the \l {if}{\\if} command is false.}
+ See also \l{if-command} {\\if}, \l{else-command} {\\else}, \l
+ {defines-variable} {defines} and \l {falsehoods-variable}
+ {falsehoods}.
+
+ \target else-command
+ \section1 \\else
- The \\else command can only be used within \l
- {if}{\\if...\\endif} commands, but is useful when there is
- only two alternatives. For example:
+ The \\else command specifies an alternative if the
+ condition in the \l {if-command} {\\if} command is false.
+
+ The \\else command can only be used within \l {if-command}
+ {\\if...\\endif} commands, but is useful when there is only two
+ alternatives.
\code
/ *!
@@ -4134,8 +3857,8 @@
* /
\endcode
- If the \c QT3_SUPPORT is defined, the comment will be rendered
- as
+ If the \c QT3_SUPPORT is defined, the comment will be rendered
+ like this:
\quotation
The Qt 3 support library is provided to keep old source
@@ -4146,8 +3869,8 @@
API to cohabit with the new one.
\endquotation
- If \c QT3_SUPPORT isn't defined but \c QT3_SUPPORT_WARNINGS
- is, the comment will be rendered as
+ If \c QT3_SUPPORT is not defined but \c QT3_SUPPORT_WARNINGS is
+ defined, the comment will be rendered like this:
\quotation
The Qt 3 support library is provided to keep old source
@@ -4186,32 +3909,31 @@
GCC 3.2+ and MSVC 7.)
\endquotation
- See also \l{if}{\\if}, \l{endif}{\\endif}, \l
- {definesvariable}{defines} and \l falsehoods.
+ See also \l{if-command} {\\if}, \l{endif-command} {\\endif}, \l
+ {defines-variable} {defines} and \l {falsehoods-variable}
+ {falsehoods}.
- \row
- \o \bold \\include \target include
- \o \bold {The \\include command expands to the contents of the
- file specified by the command's argument.}
+ \target include-command
+ \section1 \\include
- \warning This is preliminary functionality. For more
- information, see the \l
- {26-qdoc-commands-compatibility.html#include-versus-input}
- {compatibility} section.
+ The \\include command expands to the contents of the
+ file specified by the command's argument.
- The command takes a file name as an argument, and is
- useful when some piece of the documentation is used
- repeatedly: Move the repetetive text into a separate file,
- and use the \\include command whenever you want to insert
- the separate documentation.
+ \warning This is preliminary functionality. For more information,
+ see the \l
+ {26-qdoc-commands-compatibility.html#include-versus-input}
+ {compatibility} section.
- The contents of such a file should follow QDoc syntax,
- excluding the enclosing \c{/}\c{*!} ... \c{*}\c{/} marks.
- To ensure that QDoc won't attempt to read the file as a
- stand-alone piece of documentation, we recommend that you
- use the \c .qdocinc extension.
+ The command takes a file name as an argument, and is useful when
+ some piece of the documentation is used repeatedly: Move the
+ repetetive text into a separate file, and use the \\include
+ command whenever you want to insert the separate documentation.
- For example:
+ The contents of such a file should follow QDoc syntax, excluding
+ the enclosing \c{/}\c{*!} ... \c{*}\c{/} marks. To ensure that
+ QDoc won't attempt to read the file as a stand-alone piece of
+ documentation, we recommend that you use the \c .qdocinc
+ extension.
\code
/ *!
@@ -4224,33 +3946,31 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
<h1>Core Features</h1>
\endraw
- \include examples/signalandslots.qdocinc
- \include examples/objectmodel.qdocinc
- \include examples/layoutmanagement.qdocinc
+ \input examples/signalandslots.qdocinc
+ \input examples/objectmodel.qdocinc
+ \input examples/layoutmanagement.qdocinc
\endquotation
- Here is the actual \c .qdocinc files: \l
- signalandslots.qdocinc, \l objectmodel.qdocinc, \l
- layoutmanagement.qdocinc
+ Here is the actual \c .qdocinc files: \l signalandslots.qdocinc,
+ \l objectmodel.qdocinc, \l layoutmanagement.qdocinc
- \row
- \o \bold \\meta \target meta
- \o \bold {The \\meta command is the QDoc equivalent to the HTML
- \c meta tag.}
+ \target meta-command
+ \section1 \\meta
- The command accepts two arguments: The first argument (the
- following word) is equivalent to the HTML meta tag's \i
- name variable, and the second argument (the rest of the
- line) is equivalent to the tag's \i contents variable.
+ The \\meta command is the QDoc equivalent to the HTML
+ \c meta tag.
- For example:
+ The command accepts two arguments: The first argument (the
+ following word) is equivalent to the HTML meta tag's \e name
+ variable, and the second argument (the rest of the line) is
+ equivalent to the tag's \e contents variable.
\code
/ *!
@@ -4274,7 +3994,7 @@
* /
\endcode
- will be included in the generated HTML page as
+ QDoc renders this as:
\code
<head>
@@ -4284,13 +4004,12 @@
</head>
\endcode
- \row
- \o \bold \\omit \target omit
- \o \bold {The \\omit command and the correspondning \\endomit
- command delimit parts of the documentation that
- you want QDoc to skip.}
+ \target omit-command
+ \section1 \\omit
- For example:
+ The \\omit command and the correspondning \\endomit command
+ delimit parts of the documentation that you want QDoc to skip. For
+ example:
\code
/ *!
@@ -4314,7 +4033,7 @@
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\raw HTML
<table align="center" cellpadding="2"
@@ -4333,94 +4052,115 @@
</table>
\endraw
+ \target raw-command
+ \section1 \\raw \span {class="newStuff"} {(avoid)}
- \row
- \o \bold \\raw \target raw
- \o \bold {The \\raw command and the corresponding
- \\endraw command delimit a block of raw mark-up language code.}
+ The \\raw command and the corresponding
+ \\endraw command delimit a block of raw mark-up language code.
- The command takes an argument specifying the code's format;
- currently the only supported format is HTML.
+ \note Avoid using this command if possible, because it generates
+ DITA XML code that causes problems. If you are trying to generate
+ special table or list behavior, try to get the behavior you want
+ using the \l {span-command} {\\span} and \l {div-command} {\\div}
+ commands in your \l {table-command} {\\table} or \l {list-command}
+ {\\list}.
+
+ The command takes an argument specifying the code's format;
+ currently the only supported format is HTML.
- The \\raw command is useful if you want some special HTML
- effects in your documentation. For example:
+ The \\raw command is useful if you want some special HTML effects
+ in your documentation.
\code
/ *!
- Qt has some predefined QColor objects. For example:
+ Qt has some predefined QColor objects.
\raw HTML
<style type="text/css" id="colorstyles">
- #blue { background-color: #0000ff; color: #ffffff }
- #darkBlue { background-color: #000080; color: #ffffff }
- #cyan { background-color: #00ffff; color: #000000 }
+ #color-blue { background-color: #0000ff; color: #ffffff }
+ #color-darkBlue { background-color: #000080; color: #ffffff }
+ #color-cyan { background-color: #00ffff; color: #000000 }
</style>
<p>
- <tt id="blue">Blue(#0000ff)</tt>,
- <tt id="darkBlue">dark blue(#000080)</tt> and
- <tt id="cyan">cyan(#00ffff)</tt>.
+ <tt id="color-blue">Blue(#0000ff)</tt>,
+ <tt id="color-darkBlue">dark blue(#000080)</tt> and
+ <tt id="color-cyan">cyan(#00ffff)</tt>.
+ </p>
\endraw
* /
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
- Qt has some predefined QColor objects. For example:
+ Qt has some predefined QColor objects.
\raw HTML
<style type="text/css" id="colorstyles">
- #blue { background-color: #0000ff; color: #ffffff }
- #darkBlue { background-color: #000080; color: #ffffff }
- #cyan { background-color: #00ffff; color: #000000 }
+ #color-blue { background-color: #0000ff; color: #ffffff }
+ #color-darkBlue { background-color: #000080; color: #ffffff }
+ #color-cyan { background-color: #00ffff; color: #000000 }
</style>
<p>
- <tt id="blue">Blue(#0000ff)</tt>,
- <tt id="darkBlue">dark blue(#000080)</tt> and
- <tt id="cyan">cyan(#00ffff)</tt>.
+ <tt id="color-blue">Blue(#0000ff)</tt>,
+ <tt id="color-darkBlue">dark blue(#000080)</tt> and
+ <tt id="color-cyan">cyan(#00ffff)</tt>.
+ </p>
\endraw
\endquotation
- \row
- \o \bold \\unicode \target unicode
- \o \bold {The \\unicode command allows you to insert an
- arbitrary Unicode character in the document.}
+ \note But you can achieve the exact same thing using qdoc
+ commands. In this case, all you have to do is include the color
+ styles in your style.css file. Then you can write:
+
+ \code
+ \tt {\span {id="color-blue"} {Blue(#0000ff)}},
+ \tt {\span {id="color-darkBlue"} {dark blue(#000080)}} and
+ \tt {\span {id="color-cyan"} {cyan(#00ffff)}}.
+ \endcode
- The command takes an argument specifying the character as
- an integer. By default, base 10 is assumed, unless a '0x'
- or '0' prefix is specified (for base 16 and 8,
- respectively). For example:
+ ...which is rendered again as:
+
+ \tt {\span {id="color-blue"} {Blue(#0000ff)}},
+ \tt {\span {id="color-darkBlue"} {dark blue(#000080)}} and
+ \tt {\span {id="color-cyan"} {cyan(#00ffff)}}.
+
+ \target unicode-command
+ \section1 \\unicode
+
+ The \\unicode command allows you to insert an arbitrary Unicode
+ character in the document.
+
+ The command takes an argument specifying the character as an
+ integer. By default, base 10 is assumed, unless a '0x' or '0'
+ prefix is specified (for base 16 and 8, respectively). For
+ example:
\code
O G\unicode{0xEA}nio e as Rosas
\unicode 0xC0 table en famille avec 15 \unicode 0x20AC par jour
- \unicode 0x3A3 \i{a}\sub{\i{i}}
+ \unicode 0x3A3 \e{a}\sub{\e{i}}
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
O G\unicode{0xEA}nio e as Rosas
\unicode 0xC0 table en famille avec 15 \unicode 0x20AC par jour
- \unicode 0x3A3 \i{a}\sub{\i{i}}
+ \unicode 0x3A3 \e{a}\sub{\e{i}}
\endquotation
-
- The \\raw command follows the same conventions as the \l
- {i}{\\i} command for \l {argument}{punctuation and use of
- braces} for the argument.
- \endtable
*/
/*!
\page 12-1-signalandslots.html
- \previouspage Miscellaneous Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Miscellaneous
+ \contentspage Table of Contents
\title signalandslots.qdocinc
@@ -4429,8 +4169,8 @@
/*!
\page 12-2-objectmodel.html
- \previouspage Miscellaneous Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Miscellaneous
+ \contentspage Table of Contents
\title objectmodel.qdocinc
@@ -4439,8 +4179,8 @@
/*!
\page 12-3-layoutmanagement.html
- \previouspage Miscellaneous Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Miscellaneous
+ \contentspage Table of Contents
\title layoutmanagement.qdocinc
@@ -4448,71 +4188,54 @@
*/
/*!
- \page 13-qdoc-commands-topical.html
- \previouspage Miscellaneous Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Contextual Commands
-
- \title Topical Commands
-
- The topical commands tell QDoc what is being documented
- (i.e. existing units like classes, functions and examples), and
- some of the commands allows you to create extra pages.
-
- \section1 Alphabetical List
-
- \l {13-qdoc-commands-topical.html#class}{\\class},
- \l {13-qdoc-commands-topical.html#enum}{\\enum},
- \l {13-qdoc-commands-topical.html#example-command}{\\example},
- \l {13-qdoc-commands-topical.html#externalpage}{\\externalpage},
- \l {13-qdoc-commands-topical.html#fn}{\\fn},
- \l {13-qdoc-commands-topical.html#group}{\\group},
- \l {13-qdoc-commands-topical.html#headerfile}{\\headerfile},
- \l {13-qdoc-commands-topical.html#macro}{\\macro},
- \l {13-qdoc-commands-topical.html#module}{\\module},
- \l {13-qdoc-commands-topical.html#namespace}{\\namespace},
- \l {13-qdoc-commands-topical.html#page}{\\page},
- \l {13-qdoc-commands-topical.html#property}{\\property},
- \l {13-qdoc-commands-topical.html#service}{\\service},
- \l {13-qdoc-commands-topical.html#typedef}{\\typedef},
- \l {13-qdoc-commands-topical.html#variable}{\\variable},
+ \page 13-qdoc-commands-topics.html
+ \previouspage Command Index
+ \contentspage Table of Contents
+ \nextpage Context Commands
- \section1 General Description
+ \title Topic Commands
+
+ A topic command tells QDoc which source code element is being
+ documented. Some topic commands allow you to create documentation
+ pages that aren't tied to any underlying source code element.
- When QDoc is processing a comment, it will try to connect the
- documentation to the source code. For that reason it will first
- look for the topical commands. If there is no such command, it
- will try to tie the documentation to the immediately following
- code. If there is no topical command, and the documentation cannot
- be tied to following code, the documentation is simply lost.
+ When QDoc processes a QDoc comment, it tries to connect the
+ comment to an element in the source code by first looking for a
+ topic command that names the source code element. If there is no
+ topic command, QDoc tries to connect the comment to the source
+ code element that immediately follows the comment. If it can't do
+ either of these and if there is no topic command that indicates
+ the comment does not have an underlying source code element (e.g.
+ \l{page-command} {\\page}), then the comment is discarded.
- \target topical argument
+ \target topic argument
- The documented unit's name is passed as the unique argument for
- all the topical commands. The argument's naming convention is the
- documented unit's complete name. For example:
+ The name of the thing being documented is the unique argument for
+ each topic command. The naming convention is to use the complete
+ name.
\code
\enum QComboBox::InsertPolicy
\endcode
- Functions is a special case, the argument's naming convention for
- the \l {fn}{\\fn} command is that of the function's definition
- outside the class definition. For example:
+ The \l {fn-command} {\\fn} command is a special case. For the \l
+ {fn-command} {\\fn} command, use the function's signature
+ including the class qualifier.
\code
- \fn void PreviewWindow::setWindowFlags()
+ \fn void QGraphicsWidget::setWindowFlags(Qt::WindowFlags wFlags)
\endcode
- A topical command can appear anywhere in a comment, but must stand
- alone on its own line. If the argument spans several lines, make
- sure that each line (except the last one) is ended with a
+ A topic command can appear anywhere in a comment but must stand
+ alone on its own line. Best practice is to put the topic commend
+ at the top of the comment. If the argument spans several lines,
+ make sure that each line (except the last one) is ended with a
backslash. In addition QDoc counts parentheses, which means that
if it encounters a '(' it considers everything until the closing
')' as its argument.
- If a topical command is repeated with different arguments, the
- same documentation will appear for both the units. For example:
+ If a topic command is repeated with different arguments, the
+ same documentation will appear for both the units.
\code
/ *!
@@ -4532,232 +4255,224 @@
ControllerWindow::setWindowFlags() functions will get the same
documentation.
- \section1 Command Descriptions
-
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\class \target class
- \o \bold {The \\class command tells QDoc that a class is
- part of the public API, and lets you enter a detailed
- description.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument, and supports
- nested classes, for example:
+ \target class-command
+ \section1 \\class
- \code
- / *!
- \class QMap::iterator
+ The \\class command is for documenting a C++ class. The argument
+ is the complete name of the class. The command tells QDoc that a
+ class is part of the public API, and lets you enter a detailed
+ description.
- \brief The QMap::iterator class provides an STL-style
- non-const iterator for QMap and QMultiMap.
+ \code
+ / *!
+ \class QMap::iterator
- QMap features both \l{STL-style iterators} and
- \l{Java-style iterators}. The STL-style iterators ...
- * /
- \endcode
+ \brief The QMap::iterator class provides an STL-style
+ non-const iterator for QMap and QMultiMap.
- The generated HTML documentation for the specified class is
- put in \c <lower-case>classname.html. For example, the
- documentation for the \c PreviewWindow class is located in
- \c previewwindow.html.
+ QMap features both \l{STL-style iterators} and
+ \l{Java-style iterators}. The STL-style iterators ...
+ * /
+ \endcode
- \target framework
+ The HTML documentation for the named class is written to a
+ \c{.html} file named from the class name, in lower case, and with
+ the double colon qulifier(s) replaced with '-'. For example, the
+ documentation for the \c QMap::Iterator class is written to \c
+ qmap-iterator.html.
- In addition to render the detailed description, the \\class
- comand will generate the documentation framework, i.e. a
- list of the class's types, properties, functions, signals
- and slots with empty documentation.
+ \target framework
- The command is typically accompanied with a \l
- {brief}{\\brief} command, a \l {mainclass}{\\mainclass}
- command, an \l {ingroup}{\\ingroup} command and a \l
- {sa}{\\sa} command. For example:
+ The file contains the class description from the \\class comment,
+ plus the documentation generated from QDoc comments for all the
+ class members, i.e. a list of the class's types, properties,
+ functions, signals, and slots.
- \code
- / *!
- \class PreviewWindow
- \brief The PreviewWindow class is a custom widget
- displaying the names of its currently set
- window flags in a read-only text editor.
+ In addition to the detailed description of the class, the \\class
+ comment typically contains a \l {brief-command} {\\brief} command
+ and one or more \l{Markup Commands}. See the \\class command for
+ any of the Qt class for examples. Here is a very simple example:
- \mainclass
- \ingroup miscellaneous
+ \code
+ / *!
+ \class PreviewWindow
+ \brief The PreviewWindow class is a custom widget
+ displaying the names of its currently set
+ window flags in a read-only text editor.
- The PreviewWindow class inherits QWidget. The widget
- displays the names of its window flags set with the \l
- {function}{setWindowFlags()} function. It is also
- provided with a QPushButton that closes the window.
+ \ingroup miscellaneous
- ...
+ The PreviewWindow class inherits QWidget. The widget
+ displays the names of its window flags set with the \l
+ {function} {setWindowFlags()} function. It is also
+ provided with a QPushButton that closes the window.
- \sa QWidget
- * /
- \endcode
+ ...
- will be rendered as
+ \sa QWidget
+ * /
+ \endcode
- \quotation
- \raw HTML
- <h1>PreviewWindow Class Reference</h1>
- \endraw
+ The way QDoc renders this \\class will depend a lot on your \c
+ {style.css} file, but the general outline of the class reference
+ page will look like this:
- The PreviewWindow class is a custom widget displaying
- the names of its currently set window flags in a
- read-only text editor. \l {preview window}{More...}
+ \quotation
+ \raw HTML
+ <h1>PreviewWindow Class Reference</h1>
+ \endraw
- \raw HTML
- <h3>Properties</h3>
- \endraw
+ The PreviewWindow class is a custom widget displaying
+ the names of its currently set window flags in a
+ read-only text editor. \l {preview window} {More...}
- \list
- \o 52 properties inherited from QWidget
- \o 1 property inherited from QObject
- \endlist
+ \raw HTML
+ <h3>Properties</h3>
+ \endraw
- \raw HTML
- <h3>Public Functions</h3>
- \endraw
+ \list
+ \o 52 properties inherited from QWidget
+ \o 1 property inherited from QObject
+ \endlist
- \list
- \o \l {constructor}{PreviewWindow}(QWidget *parent = 0)
- \o void \l {function}{setWindowFlags}(Qt::WindowFlags flags)
- \endlist
+ \raw HTML
+ <h3>Public Functions</h3>
+ \endraw
- \list
- \o 183 public functions inherited from QWidget
- \o 28 public functions inherited from QObject
- \endlist
+ \list
+ \o \l {constructor} {PreviewWindow}(QWidget *parent = 0)
+ \o void \l {function} {setWindowFlags}(Qt::WindowFlags flags)
+ \endlist
- \raw HTML
- <h3>Public Slots</h3>
- \endraw
+ \list
+ \o 183 public functions inherited from QWidget
+ \o 28 public functions inherited from QObject
+ \endlist
- \list
- \o 17 public slots inherited from QWidget
- \o 1 public slot inherited from QObject
- \endlist
+ \raw HTML
+ <h3>Public Slots</h3>
+ \endraw
- \raw HTML
- <h3>Additional Inherited Members</h3>
- \endraw
+ \list
+ \o 17 public slots inherited from QWidget
+ \o 1 public slot inherited from QObject
+ \endlist
- \list
- \o 1 signal inherited from QWidget
- \o 1 signal inherited from QObject
- \o 4 static public members inherited from QWidget
- \o 4 static public members inherited from QObject
- \o 39 protected functions inherited from QWidget
- \o 7 protected functions inherited from QObject
- \endlist
+ \raw HTML
+ <h3>Additional Inherited Members</h3>
+ \endraw
- \target preview window
+ \list
+ \o 1 signal inherited from QWidget
+ \o 1 signal inherited from QObject
+ \o 4 static public members inherited from QWidget
+ \o 4 static public members inherited from QObject
+ \o 39 protected functions inherited from QWidget
+ \o 7 protected functions inherited from QObject
+ \endlist
- \raw HTML
- <hr />
- <h2>Detailed Description</h2>
- \endraw
+ \target preview window
- The PreviewWindow class is a custom widget displaying
- the names of its currently set window flags in a
- read-only text editor.
+ \raw HTML
+ <hr />
+ <h2>Detailed Description</h2>
+ \endraw
- The PreviewWindow class inherits QWidget. The widget
- displays the names of its window flags set with the \l
- {function}{setWindowFlags()} function. It is also
- provided with a QPushButton that closes the window.
+ The PreviewWindow class is a custom widget displaying
+ the names of its currently set window flags in a
+ read-only text editor.
- ...
+ The PreviewWindow class inherits QWidget. The widget
+ displays the names of its window flags set with the \l
+ {function} {setWindowFlags()} function. It is also
+ provided with a QPushButton that closes the window.
- See also QWidget.
+ ...
- \raw HTML
- <hr />
- <h2>Member Function Documentation</h2>
- \endraw
+ See also QWidget.
- \target constructor
- \raw HTML
- <h3>PreviewWindow(QWidget *parent = 0)</h3>
- \endraw
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ \endraw
- Constructs a preview window widget with \i parent.
+ \target constructor
+ \raw HTML
+ <h3>PreviewWindow(QWidget *parent = 0)</h3>
+ \endraw
- \target function
- \raw HTML
- <h3>setWindowFlags(Qt::WindowFlags flags)</h3>
- \endraw
+ Constructs a preview window widget with \e parent.
- Sets the widgets flags using the
- QWidget::setWindowFlags() function.
+ \target function
+ \raw HTML
+ <h3>setWindowFlags(Qt::WindowFlags flags)</h3>
+ \endraw
- Then runs through the available window flags,
- creating a text that contains the names of the flags
- that matches the flags parameter, displaying
- the text in the widgets text editor.
- \endquotation
+ Sets the widgets flags using the
+ QWidget::setWindowFlags() function.
- \row
- \o \bold \\enum \target enum
- \o \bold {The \\enum command allows you to document a C++ enum.}
+ Then runs through the available window flags,
+ creating a text that contains the names of the flags
+ that matches the flags parameter, displaying
+ the text in the widgets text editor.
+ \endquotation
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ \target enum-command
+ \section1 \\enum
- The enum items are documented using the \l {value}{\\value}
- command. If an item isn't documented, QDoc will emit a
- warning. This can be avoided using the \l
- {omitvalue}{\\omitvalue} command excluding an item from the
- documentation. The enum documentation will be located in
- the associated class, header file or namespace
- documentation.
+ The \\enum command is for documenting a C++ enum type. The
+ argument is the full name of the enum type.
- For example:
+ The enum values are documented in the \\enum comment using the \l
+ {value-command} {\\value} command. If an enum value is not
+ documented with \\value, QDoc emits a warning. These warnings can
+ be avoided using the \l {omitvalue-command} {\\omitvalue} command
+ to tell QDoc that an enum value should not be documented. The enum
+ documentation will be included on the class reference page, header
+ file page, or namespace page where the enum type is defined. For
+ example, consider the enum type \c {Corner} in the Qt namespace:
- \code
- enum Corner {
- TopLeftCorner = 0x00000,
- TopRightCorner = 0x00001,
- BottomLeftCorner = 0x00002,
- BottomRightCorner = 0x00003
- #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
- ,TopLeft = TopLeftCorner,
- TopRight = TopRightCorner,
- BottomLeft = BottomLeftCorner,
- BottomRight = BottomRightCorner
- #endif
- };
- \endcode
+ \code
+ enum Corner {
+ TopLeftCorner = 0x00000,
+ TopRightCorner = 0x00001,
+ BottomLeftCorner = 0x00002,
+ BottomRightCorner = 0x00003
+ #if defined(QT3_SUPPORT) && !defined(Q_MOC_RUN)
+ ,TopLeft = TopLeftCorner,
+ TopRight = TopRightCorner,
+ BottomLeft = BottomLeftCorner,
+ BottomRight = BottomRightCorner
+ #endif
+ };
+ \endcode
- In case of the Qt::Corner enum,
+ This enum can be cocumented this way:
- \code
- / *!
- \enum Qt::Corner
-
- This enum type specifies a corner in a rectangle:
-
- \value TopLeftCorner
- The top-left corner of the rectangle.
- \value TopRightCorner
- The top-right corner of the rectangle.
- \value BottomLeftCorner
- The bottom-left corner of the rectangle.
- \value BottomRightCorner
- The bottom-right corner of the rectangle.
-
- \omitvalue TopLeft
- \omitvalue TopRight
- \omitvalue BottomLeft
- \omitvalue BottomRight
- * /
- \endcode
+ \code
+ / *!
+ \enum Qt::Corner
+
+ This enum type specifies a corner in a rectangle:
+
+ \value TopLeftCorner
+ The top-left corner of the rectangle.
+ \value TopRightCorner
+ The top-right corner of the rectangle.
+ \value BottomLeftCorner
+ The bottom-left corner of the rectangle.
+ \value BottomRightCorner
+ The bottom-right corner of the rectangle.
+
+ \omitvalue TopLeft
+ \omitvalue TopRight
+ \omitvalue BottomLeft
+ \omitvalue BottomRight
+ * /
+ \endcode
- this associated QDoc comment will be rendered as
+ Note the inclusion of the namespace qualifier. QDoc will render
+ this enum type in \c {qt.html} like this:
\quotation
\raw HTML
@@ -4800,231 +4515,258 @@
\endraw
\endquotation
- in qt.html.
+ See also \l {value-command} {\\value} and \l {omitvalue-command} {\\omitvalue}.
- See also \l {value}{\\value} and \l {omitvalue}{\\omitvalue}.
+ \target example-command
+ \section1 \\example
- \row
- \o \bold \\example \target example-command
- \o \bold {The \\example command allows you to document an
- example.}
+ The \\example command is for documenting an example. The argument
+ is the example's path relative to omne of the paths listed in the
+ \l {exampledirs-variable} {exampledirs} variable in the QDoc
+ configuration file.
- The command follows \l {topical argument}{the general
- topical command convention} for the argument. In particular
- the command's argument is the example's path relative to
- the paths listed in the \l exampledirs configuration
- variable.
+ The documentation page will be output to \c {path-to-example}.html.
+ QDoc will add a list of all the example's source files at the top
+ of the page.
- The documentation will be located in \i
- {path-to-example}.html, and QDoc will add a list of all the
- example files at the top of this documentation page.
+ For example, if \l {exampledirs-variable} {exampledirs} contains
+ \c $QTDIR/examples/widgets/imageviewer, then
- For example, if \l exampledirs contain \c
- $QTDIR/examples/widgets/imageviewer, then
+ \code
+ / *!
+ \example widgets/imageviewer
+ \title ImageViewer Example
+ \subtitle
- \code
- / *!
- \example widgets/imageviewer
- \title ImageViewer Example
- \subtitle
+ The example shows how to combine QLabel and QScrollArea
+ to display an image.
- The example shows how to combine QLabel and QScrollArea
- to display an image.
+ ...
+ * /
+ \endcode
- ...
- * /
- \endcode
+ QDoc renders this example in widgets-imageviewer.html:
- will be rendered as
+ \quotation
+ \raw HTML
+ <center><h1>Image Viewer Example</h1></center>
+ \endraw
- \quotation
- \raw HTML
- <center><h1>Image Viewer Example</h1></center>
- \endraw
+ Files:
+ \list
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-cpp.html}
+ {widgets/imageviewer/imageviewer.cpp}
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-h.html}
+ {widgets/imageviewer/imageviewer.h}
+ \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-main-cpp.html}
+ {widgets/imageviewer/main.cpp}
+ \endlist
- Files:
- \list
- \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-cpp.html}
- {widgets/imageviewer/imageviewer.cpp}
- \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-imageviewer-h.html}
- {widgets/imageviewer/imageviewer.h}
- \o \l{http://qt.nokia.com/doc/4.0/widgets-imageviewer-main-cpp.html}
- {widgets/imageviewer/main.cpp}
- \endlist
+ The example shows how to combine QLabel and QScrollArea
+ to display an image.
- The example shows how to combine QLabel and QScrollArea
- to display an image.
+ ...
+ \endquotation
- ...
- \endquotation
+ \target externalpage-command
+ \section1 \\externalpage
- in widgets-imageviewer.html.
+ The \\externalpage command assigns a title to an external URL.
- \row
- \o \bold \\fn \target fn
- \o \bold {The \\fn command allows you to document a function.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument. In particular
- it is important that the return type of the function,
- whether it is \c const or not and the complete set of
- arguments with type are included in the argument. If the
- referenced function doesn't exist, QDoc will emit a
- warning.
-
- Also, the \\fn command is QDoc's default command, i.e. when
- no topical command can be found within a QDoc comment, QDoc
- tries to tie the documentation to the following code as if
- it was function documentation.
-
- This means that the command normally isn't necessary since
- the recommended style is to write the function
- documentation directly before the function implementation
- in the \c .cpp file. In fact, it should only be used for
- inline functions implemented in the \c .h file.
-
- For example:
+ \code
+ / *!
+ \externalpage http://doc.trolltech.com/4.3/qtopiacore.html
+ \title Qtopia Core
+ * /
+ \endcode
- \code
- / *!
- \fn bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
+ This allows you to include a link to the external page in your
+ documentation this way:
- Returns true if this toolbar is dockable in the given
- \a area; otherwise returns false.
- * /
- \endcode
+ \code
+ / *!
+ The broad scope of the \l {Qtopia Core} API enables it to
+ be used across a wide variety of development projects.
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this as:
- \quotation
- \raw HTML
- <h3>bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
- </h3>
- \endraw
+ \quotation
+ The broad scope of the \l
+ {http://doc.trolltech.com/4.3/qtopiacore.html} {Qtopia
+ Core} API enables it to be used across a wide variety
+ of development projects.
+ \endquotation
- Returns true if this toolbar is dockable in the given
- \a area; otherwise returns false.
- \endquotation
+ To achieve the same result without using the \\externalpage
+ command, you would have to hard code the adress into your
+ documentation:
- See also \l {overload}{\\overload}.
+ \code
+ / *!
+ The broad scope of the \l
+ {http://doc.trolltech.com/4.3/qtopiacore.html} {Qtopia
+ Core} API enables it to be used across a wide variety
+ of development projects.
+ * /
+ \endcode
- \row
- \o \bold \\group \target group
- \o \bold {The \\group command creates a separate page that
- lists the classes belonging to the group specified by the
- command's argument.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument. The \\group
- command is typically followed by a \l {title}{\\title}
- command and a short introduction to the group. The
- generated HTML documentation for the specified group is put
- in <lower-case>\i{group}.html.
-
- A class can be related to a group by using the \l
- {ingroup}{\\ingroup} command. In addition, overviews can be
- related to a group using the same command, but these must
- be listed explicitly using the \l
- {generatelist}{\\generatelist} command (see example below).
-
- Each class is listed with a link to the class reference
- page and a brief description based on the classes' \l
- {brief}{\\brief} texts. For example:
+ The \\externalpage command makes it easier to maintain the
+ documentation. If the adress changes, you only need to change the
+ argument of the \\externalpage command.
- \code
- / *!
- \group io
+ \target fn-command
+ \section1 \\fn (function)
- \title Input/Output and Networking
+ The \\fn command is for documenting a function. The argument is
+ the function's signature, including its return type, const-ness,
+ and list of formal arguments with types. If the named function
+ doesn't exist, QDoc emits a warning.
- These classes are used to handle input and output to
- and from external devices, processes, files etc. as
- well as manipulating files and directories.
- * /
- \endcode
+ \note The \\fn command is QDoc's default command, i.e. when no
+ topic command can be found in a QDoc comment, QDoc tries to tie
+ the documentation to the following code as if it is the
+ documentation for a function. Hence, it is normally not necessary
+ to include this command when documenting a function, if the
+ function's QDoc comment is written immediately above the function
+ implementation in the \c .cpp file. But it must be present when
+ documenting an inline function in the \c .cpp file that is
+ implemented in the \c .h file.
- will be rendered as
+ \code
+ / *!
+ \fn bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
- \quotation
- \raw HTML
+ Returns true if this toolbar is dockable in the given
+ \a area; otherwise returns false.
+ * /
+ \endcode
- <h1>Input/Output and Networking</h1>
-
- <p>These classes are used to handle input and output
- to and from external devices, processes, files etc. as
- well as manipulating files and directories.</p>
-
- <p>
- <table width="100%">
- <tr valign="top" bgcolor="#e0e0e0">
- <td><b>
- <a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
- </b></td>
- <td>
- The base functionality common to all socket types
- </td></tr>
-
- <tr valign="top" bgcolor="#e0e0e0">
- <td><b>
- <a href="http://qt.nokia.com/doc/4.0/qbuffer.html">QBuffer</a>
- </b></td>
- <td>
- QIODevice interface for a QByteArray
- </td></tr>
-
- <tr valign="top" bgcolor="#e0e0e0">
- <td><b>
- <a href="http://qt.nokia.com/doc/4.0/qclipboard.html">QClipboard</a>
- </b></td>
- <td>
- Access to the window system clipboard
- </td></tr>
- </table>
- \endraw
- \endquotation
+ QDoc renders this as:
- in io.html.
+ \quotation
+ \raw HTML
+ <h3>bool QToolBar::isAreaAllowed(Qt::ToolBarArea area) const
+ </h3>
+ \endraw
- Note that overviews related to the given group, must be
- listed explicitly using the \l
- {generatelist}{\\generatelist} command with the \c related
- argument. For example:
+ Returns true if this toolbar is dockable in the given
+ \a area; otherwise returns false.
+ \endquotation
- \code
- / *!
- \group architecture
+ See also \l {overload-command} {\\overload}.
- \title Architecture
+ \target group-command
+ \section1 \\group
- These documents describe aspects of Qt's architecture
- and design, including overviews of core Qt features and
- technologies.
+ The \\group command creates a separate page that lists the classes
+ belonging to the group. The argument is the group name.
- \generatelist{related}
- * /
- \endcode
+ A class is included in a group by using the \l {ingroup-command}
+ {\\ingroup} command. Overview pages can also be related to a group
+ using the same command, but the list of overview pages must be
+ requested explicitly using the \l {generatelist-command}
+ {\\generatelist} command (see example below).
- See also \l {ingroup}{\\ingroup} and \l
- {generatelist}{\\generatelist}.
+ The \\group command is typically followed by a \l {title-command}
+ {\\title} command and a short introduction to the group. The
+ HTML page for the group is written to a \c {.html} file put in
+ <lower-case>\e{group}.html.
- \row
- \o \bold \\headerfile \target headerfile
- \o \bold {The \\headerfile command allows you to document
- global functions, types and macros declared in a header file.}
+ Each class name is listed as a link to the class reference page
+ followed by the text from the class's \l {brief-command} {\\brief}
+ texts.
+
+ \code
+ / *!
+ \group io
- The command follows \l {topical argument}{the general
- topical command convention} for the argument, and the
- generated HTML documentation for the specified header file
- is put in <lower-case>\i{headerfilename}.html.
+ \title Input/Output and Networking
- A function, type or macro can be associated with a
- headerfile using the \l {relates}{\\relates} command.
+ These classes are used to handle input and output to
+ and from external devices, processes, files etc. as
+ well as manipulating files and directories.
+ * /
+ \endcode
+
+ QDoc generates a group page in \c{io.html} that will look
+ like this:
+
+ \quotation
+ \raw HTML
+
+ <h1>Input/Output and Networking</h1>
+
+ <p>These classes are used to handle input and output
+ to and from external devices, processes, files etc. as
+ well as manipulating files and directories.</p>
+
+ <p>
+ <table width="100%">
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qabstractsocket.html">QAbstractSocket</a>
+ </b></td>
+ <td>
+ The base functionality common to all socket types
+ </td></tr>
+
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qbuffer.html">QBuffer</a>
+ </b></td>
+ <td>
+ QIODevice interface for a QByteArray
+ </td></tr>
+
+ <tr valign="top" bgcolor="#e0e0e0">
+ <td><b>
+ <a href="http://qt.nokia.com/doc/4.0/qclipboard.html">QClipboard</a>
+ </b></td>
+ <td>
+ Access to the window system clipboard
+ </td></tr>
+ </table>
+ \endraw
+ \endquotation
- If the referenced header file doesn't exist, the
- \\headerfile command will still create a documentation page
- for a header file with the referenced file's name.
+ Note that overview pages related to the group, must be listed
+ explicitly using the \l {generatelist-command} {\\generatelist}
+ command with the \c related argument.
- For example:
+ \code
+ / *!
+ \group architecture
+
+ \title Architecture
+
+ These documents describe aspects of Qt's architecture
+ and design, including overviews of core Qt features and
+ technologies.
+
+ \generatelist{related}
+ * /
+ \endcode
+
+ See also \l {ingroup-command} {\\ingroup} and \l
+ {generatelist-command} {\\generatelist}.
+
+ \target headerfile-command
+ \section1 \\headerfile
+
+ The \\headerfile command is for documenting the global functions,
+ types and macros that are declared in a header file but not in a
+ namespace. The argument is the name of the header file. The HTML
+ page is written to a \c {.html} file constructed from the header
+ file aregument.
+
+ The documentation for a function, type, or macro that is declared
+ in the header file being documented is included in the header file
+ page using the \l {relates-command} {\\relates} command.
+
+ If the argument doesn't exist as a header file, the \\headerfile
+ command creates a documentation page for the header file anyway.
\code
/ *!
@@ -5041,7 +4783,8 @@
* /
\endcode
- will be rendered as
+ QDoc generates a header file page \c{qtalgorithms.html} that looks
+ like this:
\quotation
\raw HTML
@@ -5049,7 +4792,7 @@
Generic Algorithms</h1></center>
<p>The <QtAlgorithms> header file provides generic
template-based algorithms.
- <a href="13-qdoc-commands-topical.html#header">More...</a>
+ <a href="13-qdoc-commands-topics.html#header-command">More...</a>
</p>
<h3>Functions</h3>
@@ -5077,163 +4820,139 @@
...
\endquotation
- in qtalgorithms.html.
-
- \row
- \o \bold \\macro \target macro
- \o \bold {The \\macro command allows you to document a C++ macro.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
-
- QDoc recognizes three different macro syntax: function-like
- macros like Q_ASSERT(), declaration-style macros like
- Q_PROPERTY() and macros without parentheses like Q_OBJECT.
-
- The \\macro command must be followed by a \l
- {relates}{\\relates} command which attaches the
- documentation to that of a related class, header file. or
- namespace. Otherwise the documentation will be lost.
-
- For example:
+ \target macro-command
+ \section1 \\macro
- \code
- / *!
- \macro void Q_ASSERT(bool test)
- \relates <QtGlobal>
-
- Prints a warning message containing the source code
- file name and line number if \a test is false.
-
- ...
-
- \sa Q_ASSERT_X(), qFatal(), {Debugging Techniques}
- * /
- \endcode
+ The \\macro command is for documententin a C++ macro. The argument
+ is the macro in one of three styles: function-like macros like
+ Q_ASSERT(), declaration-style macros like Q_PROPERTY(), and macros
+ without parentheses like Q_OBJECT.
- will be rendered as
+ The \\macro comment must contain a \l {relates-command}
+ {\\relates} command that attaches the macro comment to a class,
+ header file, or namespace. Otherwise, the documentation will be
+ lost. Here are three example macro comments followed by what they
+ might look like in \c {qtglobal.html} or \c {qobject.html}:
- \quotation
- \raw HTML
- <h3>void Q_ASSERT ( bool <i>test</i> )</h3>
- \endraw
-
- Prints a warning message containing the source code
- file name and line number if \a test is false.
-
- ...
-
- See also Q_ASSERT_X(), qFatal() and \l {Debugging
- Techniques}.
- \endquotation
+ \code
+ / *!
+ \macro void Q_ASSERT(bool test)
+ \relates <QtGlobal>
- in qtglobal.html. And
+ Prints a warning message containing the source code
+ file name and line number if \a test is false.
- \code
- / *!
- \macro Q_PROPERTY(...)
- \relates QObject
+ ...
- This macro declares a QObject property. The syntax is:
+ \sa Q_ASSERT_X(), qFatal(), {Debugging Techniques}
+ * /
+ \endcode
- ...
+ \quotation
+ \raw HTML
+ <h3>void Q_ASSERT ( bool <i>test</i> )</h3>
+ \endraw
- \sa {Qt's Property System}
- * /
- \endcode
+ Prints a warning message containing the source code
+ file name and line number if \a test is false.
- will be rendered as
+ ...
- \quotation
- \raw HTML
- <h3>Q_PROPERTY ( ... )</h3>
- \endraw
+ See also Q_ASSERT_X(), qFatal() and \l {Debugging Techniques}.
+
+ \endquotation
- This macro declares a QObject property. The syntax is:
+ \code
+ / *!
+ \macro Q_PROPERTY(...)
+ \relates QObject
- ...
+ This macro declares a QObject property. The syntax is:
- See also \l {Qt's Property System}.
- \endquotation
+ ...
- in qobject.html. And
+ \sa {Qt's Property System}
+ * /
+ \endcode
- \code
- / *!
- \macro Q_OBJECT
- \relates QObject
+ \quotation
+ \raw HTML
+ <h3>Q_PROPERTY ( ... )</h3>
+ \endraw
- The Q_OBJECT macro must appear in the private section
- of a class definition that declares its own signals and
- slots or that uses other services provided by Qt's
- meta-object system.
+ This macro declares a QObject property. The syntax is:
- ...
+ ...
- \sa {Meta-Object System}, {Signals and Slots}, {Qt's
- Property System}
- * /
- \endcode
+ See also \l {Qt's Property System}.
+ \endquotation
- will be rendered as
+ \code
+ / *!
+ \macro Q_OBJECT
+ \relates QObject
- \quotation
- \raw HTML
- <h3>Q_OBJECT</h3>
- \endraw
+ The Q_OBJECT macro must appear in the private section
+ of a class definition that declares its own signals and
+ slots or that uses other services provided by Qt's
+ meta-object system.
- The Q_OBJECT macro must appear in the private section
- of a class definition that declares its own signals and
- slots or that uses other services provided by Qt's
- meta-object system.
+ ...
- ...
+ \sa {Meta-Object System}, {Signals and Slots}, {Qt's
+ Property System}
+ * /
+ \endcode
- See also \l {Meta-Object System}, \l {Signals and
- Slots} and \l {Qt's Property System}.
- \endquotation
+ \quotation
+ \raw HTML
+ <h3>Q_OBJECT</h3>
+ \endraw
- in qobject.html.
+ The Q_OBJECT macro must appear in the private section
+ of a class definition that declares its own signals and
+ slots or that uses other services provided by Qt's
+ meta-object system.
- \row
- \o \bold \\module \target module
- \o \bold {The \\module creates a separate page that lists the
- classes belonging to the module specified by the command's
- argument.}
+ ...
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ See also \l {Meta-Object System}, \l {Signals &
+ Slots} and \l {Qt's Property System}.
+ \endquotation
- A class can be related to a module using the \l
- {inmodule}{\\inmodule} command.
+ \target module-command
+ \section1 \\module
- The \\module command is typically followed by the \l
- {title}{\\title} and \l {brief}{\\brief} commands. Each
- class is listed with a link to the class reference page and
- a brief description based on the classes' \l
- {brief}{\\brief} texts.
+ The \\module creates a page that lists the classes belonging to
+ the module specified by the command's argument. A class included
+ in the module by including the \l {inmodule-command} {\\inmodule}
+ command in the \\class comment.
- For example:
+ The \\module command is typically followed by a \l {title-command}
+ {\\title} and a \l {brief-command} {\\brief} command. Each class
+ is listed as a link to the class reference page followed by the
+ text from the class's \l {brief-command} {\\brief} command. For
+ example:
- \code
- / *!
- \module QtNetwork
+ \code
+ / *!
+ \module QtNetwork
- \title QtNetwork Module
+ \title QtNetwork Module
- \brief The QtNetwork module offers classes that allow
- you to write TCP/IP clients and servers.
+ \brief The QtNetwork module offers classes that allow
+ you to write TCP/IP clients and servers.
- The network module provides classes to make network
- programming easier and portable. It offers both
- high-level classes such as QHttp and QFtp that
- implement specific application-level protocols, and
- lower-level classes such as QTcpSocket, QTcpServer, and
- QUdpSocket.
- * /
- \endcode
+ The network module provides classes to make network
+ programming easier and portable. It offers both
+ high-level classes such as QHttp and QFtp that
+ implement specific application-level protocols, and
+ lower-level classes such as QTcpSocket, QTcpServer, and
+ QUdpSocket.
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this in \c {qtnetwork.html} like this:
\quotation
\raw HTML
@@ -5242,7 +4961,7 @@
The QtNetwork module offers classes that allow you to
write TCP/IP clients and servers.\l {module
- details}{More...}
+ details} {More...}
\raw HTML
<p>
@@ -5296,43 +5015,33 @@
\endquotation
- in qtnetwork.html.
+ See also \l {inmodule-command} {\\inmodule}
- See also \l {inmodule}{\\inmodule}
+ \target namespace-command
+ \section1 \\namespace
- \row
- \o \bold \\namespace \target namespace
- \o \bold {The \\namespace command allows you to document a C++
- namespace.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
-
- QDoc will generate the same additional links and
- documentation for all the members of the namespace as it
- does for \l {framework}{classes}. The documentation for
- the specified namespace is put in <lower-case>\i
- {namespace}.html.
-
- For example:
+ The \\namespace command is for documenting the contents of the C++
+ namespace named as its argument. The documentation outline QDoc
+ generates for a namespace is similar to the outline it generates
+ for a C++ class.
- \code
- / *!
- \namespace Qt
+ \code
+ / *!
+ \namespace Qt
- \brief The Qt namespace contains miscellaneous
- identifiers used throughout the Qt library.
- * /
- \endcode
+ \brief The Qt namespace contains miscellaneous
+ identifiers used throughout the Qt library.
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this in \c{qt.html} like this:
\quotation
\raw HTML
<center><h1>Qt Namespace Reference</h1></center>
<p>The Qt namespace contains miscellaneous
identifiers used throughout the Qt library.
- <a href="13-qdoc-commands-topical.html#name">More...</a>
+ <a href="13-qdoc-commands-topics.html#name">More...</a>
</p>
<pre>#include &lt;Qt&gt;</pre>
@@ -5362,18 +5071,13 @@
...
\endquotation
- in qt.html.
-
- \row
- \o \bold \\page \target page
- \o \bold {The \\page command allows you to create a stand-alone
- documentation page.}
-
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ \target page-command
+ \section1 \\page
- The page's title can be set using the \l {title}{\\title}
- command. For example:
+ The \\page command is for creating a stand-alone documentation
+ page. The argument is the name of the file where QDoc should
+ store the page. The page title is set using the \l {title-command}
+ {\\title} command.
\code
/ *!
@@ -5398,470 +5102,587 @@
* /
\endcode
- will be rendered in its own HTML file: \l{About Qt}.
+ QDoc renders this page in \c {aboutqt.html}.
- \row
- \o \bold {\\externalpage} \target externalpage
- \o \bold {The \\externalpage command gives a title to
- an external URL.}
+ \target property-command
+ \section1 \\property
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ The \\property command is for documenting a Qt property. The
+ argument is the full property name.
- For example:
+ A property is defined using the Q_PROPERTY() macro. The macro
+ takes as arguments the property's name and its set, reset and get
+ functions.
- \code
- / *!
- \externalpage http://www.trolltech.com/products/embedded/index.html
- \title Qtopia Core
- * /
- \endcode
+ \code
+ Q_PROPERTY(QString state READ state WRITE setState)
+ \endcode
- The QDoc comment above allows you to link to the Qtopia
- Core webpage by simply linking to the given title. For
- example:
+ The set, reset and get functions don't need to be documented,
+ documenting the property is sufficient. QDoc will generate a list
+ of the access function that will appear in the property
+ documentation which in turn will be located in the documentation
+ of the class that defines the property.
- \code
- / *!
- The broad scope of the \l {Qtopia Core} API enables it to
- be used across a wide variety of development projects.
- * /
- \endcode
+ The \\property command comment typically includes a \l
+ {brief-command} {\\brief} command. Forproperties the \l
+ {brief-command} {\\brief} command's argument is a sentence
+ fragment that will be included in a one line description of the
+ property. The command follows the same rules for the \l
+ {brief-property} {description} as the \l {variable-command}
+ {\\variable} command.
- will be rendered as
+ \code
+ / *!
+ \property QPushButton::flat
+ \brief whether the border is disabled
- \quotation
- The broad scope of the \l
- {http://www.trolltech.com/products/embedded/index.html}{Qtopia
- Core} API enables it to be used across a wide variety
- of development projects.
- \endquotation
+ This property's default is false.
+ * /
+ \endcode
- To achieve the same result without using the
- \\externalpage command, you would have to hard code the
- adress into your documentation:
+ QDoc includes this in \c {qpushbutton.html} like this:
- \code
- / *!
- The broad scope of the \l
- {http://www.trolltech.com/products/embedded/index.html}{Qtopia
- Core} API enables it to be used across a wide variety
- of development projects.
- * /
- \endcode
+ \quotation
+ \raw HTML
+ <h3>flat : bool</h3>
+ \endraw
- The \\externalpage command makes it easier to maintain the
- documentation. If the adress changes, you only need to change the
- argument of the \\externalpage command.
+ This property holds whether the border is disabled.
- \row
- \o \bold \\property \target property
- \o \bold {The \\property command allows you to document a Qt
- property.}
+ This property's default is false.
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ Access functions:
- A property is defined using the Q_PROPERTY() macro. The
- macro takes as arguments the property's name and its set,
- reset and get functions. For example:
+ \list
+ \o \bold { bool isFlat () const}
+ \o \bold { void setFlat ( bool )}
+ \endlist
- \code
- Q_PROPERTY(QString state READ state WRITE setState)
- \endcode
+ \endquotation
- The set, reset and get functions don't need to be
- documented, documenting the property is sufficient. QDoc
- will generate a list of the access function that will
- appear in the property documentation which in turn will be
- located in the documentation of the class that defines the
- property.
+ \code
+ / *!
+ \property QWidget::width
+ \brief the width of the widget excluding any window frame
- The \\property command is typically accompanied with a \l
- {brief}{\\brief} command. In the case of a property, the
- \l {brief}{\\brief} command's argument is a sentence
- fragment that will be included in a one-sentence
- description of the property generated by QDoc. The command
- follows the same rules for the \l {brief
- property}{description} as the \l {variable}{\\variable}
- command.
+ See the \l {Window Geometry} documentation for an
+ overview of window geometry.
- For example:
+ \sa geometry, height, size
+ * /
+ \endcode
- \code
- / *!
- \property QPushButton::flat
- \brief whether the border is disabled
+ QDoc includes this in \c {qwidget.html} like this:
- This property's default is false.
- * /
- \endcode
+ \quotation
+ \raw HTML
+ <h3>width : const int</h3>
+ \endraw
- will be rendered as
+ This property holds the width of the widget excluding
+ any window frame.
- \quotation
- \raw HTML
- <h3>flat : bool</h3>
- \endraw
+ See the \l {Window Geometry} documentation for an
+ overview of window geometry.
- This property holds whether the border is disabled.
+ Access functions:
- This property's default is false.
+ \list
+ \o \bold { int width () const}
+ \endlist
- Access functions:
+ See also \l{QWidget::geometry} {geometry},
+ \l{QWidget::height} {height}, and \l{QWidget::size} {size}.
+ \endquotation
- \list
- \o \bold { bool isFlat () const}
- \o \bold { void setFlat ( bool )}
- \endlist
+ \target service-command
+ \section1 \\service
+
+ The \\service command tells QDoc that a class is a service class
+ and names the service. The command takes two arguments, the name
+ of the class and the name of the service. Currently, this command
+ is not used in the Qt documentation.
+
+ \code
+ / *!
+ \service TimeService Time
+ ...
+ * /
+ class TimeService : public QCopObjectService
+ {
+ ...
+ }
+ \endcode
+
+ See also \l {class-command} {\\class} and \l
+ {generatelist-command} {\\generatelist}.
+
+ \target qmlattachedproperty-command
+ \section1 \\qmlattachedproperty \span {class="newStuff"} {(new)}
+
+ The \\qmlattachedproperty command is for documenting a QML
+ property that will be attached to some QML element type. See
+ \l{http://doc.trolltech.com/4.7/qdeclarativeintroduction.html#attached-properties}
+ {Attached Properties}. The argument is the rest of the line. The
+ argument text should be the property type, followed by the QML
+ element name where the property is being declared, the \c{::}
+ qualifier, and finally the property name. If we have a QML
+ attached property named \c isCurrentItem in QML element \c ListView,
+ and the property has type \c {bool}, the \\qmlattachedproperty for
+ it would look like this:
- \endquotation
+ \code
+ / *!
+ \qmlattachedproperty bool ListView::isCurrentItem
+ This attached property is true if this delegate is the current
+ item; otherwise false.
- in qpushbutton.html. And
+ It is attached to each instance of the delegate.
- \code
- / *!
- \property QWidget::width
- \brief the width of the widget excluding any window frame
+ This property may be used to adjust the appearance of the current
+ item, for example:
- See the \l {Window Geometry} documentation for an
- overview of window geometry.
+ \snippet doc/src/snippets/declarative/listview/listview.qml isCurrentItem
+ * /
+ \endcode
- \sa geometry, height, size
- * /
- \endcode
+ QDoc includes this attached property on the QML reference page for the
+ \l{http://doc.trolltech.com/4.7/qml-listview.html#isCurrentItem-prop}
+ {ListView} element.
- will be rendered as
+ \target qmlattachedsignal-command
+ \section1 \\qmlattachedsignal \span {class="newStuff"} {(new)}
- \quotation
- \raw HTML
- <h3>width : const int</h3>
- \endraw
+ The \\qmlattachedsignal command is for documenting an attachable
+ \l{http://doc.trolltech.com/4.7/qdeclarativeintroduction.html#signal-handlers}
+ {signal handler}. The \\qmlattachedsignal command is used just like
+ the \l{qmlsignal-command} {\\qmlsignal} command.
- This property holds the width of the widget excluding
- any window frame.
+ The argument is the rest of the line. It should be the name of the
+ QML element where the signal handler is declared, the \c{::}
+ qualifier, and finally the signal handler name. If we have a QML
+ attached signal handler named \c onAdd() in the \c GridView
+ element, the \\qmlattachedsignal for it would look like this:
- See the \l {Window Geometry} documentation for an
- overview of window geometry.
+ \code
+ / *!
+ \qmlattachedsignal GridView::onAdd()
+ This attached handler is called immediately after an item is
+ added to the view.
+ * /
+ \endcode
- Access functions:
+ QDoc includes this documentation on the QML reference page for the
+ \l{http://doc.trolltech.com/4.7/qml-gridview.html#onAdd-signal}
+ {GridView} element.
- \list
- \o \bold { int width () const}
- \endlist
+ \target qmlbasictype-command
+ \section1 \\qmlbasictype \span {class="newStuff"} {(new)}
- See also \l{QWidget::geometry}{geometry},
- \l{QWidget::height}{height}, and \l{QWidget::size}{size}.
- \endquotation
+ The \\qmlbasictype command is for documenting a basic type for QML.
+ The argument is the type name. The type must be included in the
+ QML basic types group using the \l{ingroup-command}{\\ingroup}
+ command as shown below. This will cause QDoc to include the
+ documentation for the type on the
+ \l{http://doc.trolltech.com/4.7/qdeclarativebasictypes.html}
+ {QML Basic Types} page. The \l{brief-command} {\\brief} command
+ is also required, because it appears on the
+ \l{http://doc.trolltech.com/4.7/qdeclarativebasictypes.html}
+ {QML Basic Types} page as well.
- in qwidget.html.
+ \code
+ / *!
+ \qmlbasictype int
+ \ingroup qmlbasictypes
- \row
- \o \bold \\service \target service
+ \brief An integer is a whole number, e.g. 0, 10, or -20.
- \o \bold {The \\service command tells QDoc that a class is a
- service class and specifies its alias, i.e. the associated
- service's name.}
+ An integer is a whole number, e.g. 0, 10, or -20. The possible
+ \c int values range from around -2000000000 to around
+ 2000000000, although most elements will only accept a reduced
+ range (which they mention in their documentation).
- The command takes two arguments, the service class's name
- and the associated alias. For example:
+ Example:
+ \qml
+ Item { width: 100; height: 200 }
+ \endqml
- \code
- / *!
- \service TimeService Time
- ...
- * /
- class TimeService : public QCopObjectService
- {
- ...
- }
- \endcode
+ \sa {QML Basic Types}
+ * /
+ \endcode
- See also \l {class}{\\class} and \l
- {generatelist}{\\generatelist}.
+ QDoc outputs this as \l{http://doc.trolltech.com/4.7/qml-int.html}
+ {qml-int.html}.
- \row
- \o \bold \\typedef \target typedef
- \o \bold {The \\typedef command allows you to document a C++ type
- definition.}
+ \target qmlclass-command
+ \section1 \\qmlclass \span {class="newStuff"} {(new)}
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ The \\qmlclass command is for documenting a QML element that is
+ instantiated by a C++ class. The command has two arguments. The
+ first argument is the name of the QML element. The second argument
+ is the name of the C++ class that instantiates the QML element.
- The documentation will be located in the associated class,
- header file or namespace documentation. When documenting a
- global type definition, the \\typedef command must be
- accompanied with a \l {relates}{\\relates} command. For
- example:
+ \code
+ / *!
+ \qmlclass Transform QGraphicsTransform
+ \ingroup qml-transform-elements
+ \since 4.7
+ \brief The Transform elements provide a way of building
+ advanced transformations on Items.
- \code
- / *!
- \typedef QObjectList
- \relates QObject
+ The Transform element is a base type which cannot be
+ instantiated directly. The following concrete Transform types
+ are available:
- Synonym for QList<QObject>.
- * /
- \endcode
+ \list
+ \o \l Rotation
+ \o \l Scale
+ \o \l Translate
+ \endlist
- will be rendered as
+ The Transform elements let you create and control advanced
+ transformations that can be configured independently using
+ specialized properties.
- \quotation
- \raw HTML
- <h3>typedef QObjectList</h3>
- \endraw
+ You can assign any number of Transform elements to an \l
+ Item. Each Transform is applied in order, one at a time.
- Synonym for QList<QObject>.
- \endquotation
+ * /
+ \endcode
- in qobject.html. Another, although more rare, example is
+ This example generates the
+ \l {http://doc.trolltech.com/4.7/qml-transform.html} {QML Trasform
+ Element} page. The \\qmlclass comment should include the \l
+ {since-command} {\\since} command, because all QML elements are
+ new. It should also include the \l{brief-command} {\\brief}
+ command. And since every QML element is a member of a group of QML
+ elements, it should also include one or more \l{ingroup-command}
+ {\\ingroup} commands.
- \code
- / *!
- \typedef QMsgHandler
- \relates QtGlobal
+ \target qmlmethod-command
+ \section1 \\qmlmethod \span {class="newStuff"} {(new)}
- This is a typedef for a pointer to a function with the
- following signature:
+ The \\qmlmethod command is for documenting a QML method. The
+ argument is the complete method signature, including return
+ type and parameter names and types.
- \code
- void myMsgHandler(QtMsgType, const char *);
- \ endcode
+ \code
+ / *!
+ \qmlmethod void TextInput::select(int start, int end)
- \sa QtMsgType, qInstallMsgHandler()
- * /
- \endcode
+ Causes the text from \a start to \a end to be selected.
- will be rendered as
+ If either start or end is out of range, the selection is not changed.
- \quotation
- \raw HTML
- <h3>typedef QtMsgHandler</h3>
- \endraw
+ After calling this, selectionStart will become the lesser and
+ selectionEnd will become the greater (regardless of the order
+ passed to this method).
- This is a typedef for a pointer to a function with the
- following signature:
+ \sa selectionStart, selectionEnd
+ * /
+ \endcode
- \raw HTML
- <tt>
- <pre> void myMsgHandler(QtMsgType, const char *);</pre>
- </tt>
- \endraw
+ QDoc includes this documentation on the element refence page for the
+ \l{http://doc.trolltech.com/4.7/qml-textinput.html#select-method}
+ {TextInput} element.
- See also QtMsgType and qInstallMsgHandler().
+ \target qmlproperty-command
+ \section1 \\qmlproperty \span {class="newStuff"} {(new)}
- \endquotation
+ The \\qmlproperty command is for documenting a QML property. The
+ argument is the rest of the line. The argument text should be the
+ property type, followed by the QML element name, the \c{::}
+ qualifier, and finally the property name. If we have a QML
+ property named \c x in QML element \c Translate, and the property
+ has type \c {real}, the \\qmlproperty for it would look like this:
- in qtglobal.html. Other type definitions are located in the
- documentation of the class that defines it, for example:
+ \code
+ / *!
+ \qmlproperty real Translate::x
- \code
- / *!
- \typedef QLinkedList::Iterator
+ The translation along the X axis.
+ * /
+ \endcode
- Qt-style synonym for QList::iterator.
- * /
- \endcode
+ QDoc includes this QML property on the QML reference page for the
+ \l {http://doc.trolltech.com/4.7/qml-translate.html} {Translate}
+ element.
- will be rendered as
+ \target qmlsignal-command
+ \section1 \\qmlsignal \span {class="newStuff"} {(new)}
- \quotation
- \raw HTML
- <h3>typedef QLinkedList::Iterator</h3>
- \endraw
+ The \\qmlsignal command is for documenting a
+ \l{http://doc.trolltech.com/4.7/qdeclarativeintroduction.html#signal-handlers}
+ {signal handler}.
+ The argument is the rest of the line. It should be the QML element where the
+ signal handler is declared, the \c{::} qualifier, and finally the signal
+ handler name. If we have a QML signal handler named \c onAdd() in QML
+ element \c MouseArea, the \\qmlsignal for it would look like this:
- Qt-style synonym for QList::iterator.
- \endquotation
+ \code
+ / *!
+ \qmlsignal MouseArea::onEntered()
- in qlinkedlist.html.
+ This handler is called when the mouse enters the mouse area.
- \row
- \o \bold \\variable \target variable
- \o \bold {The \\variable command allows you to document a
- member variable or a constant.}
+ By default the onEntered handler is only called while a button is
+ pressed. Setting hoverEnabled to true enables handling of
+ onEntered when no mouse button is pressed.
- The command follows \l {topical argument}{the general
- topical command convention} for the argument.
+ \sa hoverEnabled
+ * /
+ \endcode
- The \\variable command is typically followed by a \l
- {brief}{\\brief} command; QDoc will generate the
- documentation for the variable based on the brief
- description. The command follows the same rules for the \l
- {brief property}{description} as the \l
- {property}{\\property} command.
+ QDoc includes this documentation on the QML reference page for the
+ \l{http://doc.trolltech.com/4.7/qml-mousearea.html#onEntered-signal}
+ {MouseArea} element.
- The documentation will be located in the in the associated
- class, header file or namespace documentation.
+ \target typedef-command
+ \section1 \\typedef
- In case of a member variable:
+ The \\typedef command is for documenting a C++ typedef. The
+ argument is the name of the typedef. The documentation for
+ the typedef will be included in the refernece documentation
+ for the class, namespace, or header file in which the typedef
+ is declared. To relat the \\typedef to a class, namespace, or
+ header file, the \\typedef comment must contain a
+ \l {relates-command} {\\relates} command.
- \code
- / *!
- \variable QStyleOption::palette
- \brief the palette that should be used when painting
- the control
- * /
- \endcode
+ \code
+ / *!
+ \typedef QObjectList
+ \relates QObject
- will be rendered as
+ Synonym for QList<QObject>.
+ * /
+ \endcode
- \quotation
- \raw HTML
- <h3>
- <a href="http://qt.nokia.com/doc/4.0/qpalette.html">
- QPalette
- </a>
- QStyleOption::palette
- </h3>
- \endraw
+ QDoc includes this in \c {qobject.html} as:
- This variable holds the palette that should be used
- when painting the control.
- \endquotation
+ \quotation
+ \raw HTML
+ <h3>typedef QObjectList</h3>
+ \endraw
- in qstyleoption.html.
+ Synonym for QList<QObject>.
+ \endquotation
- But you can also use the \\variable command to document
- constants like for example the \c Type and \c UserType
- constants in the QTreeWidgetItem class:
+ Another, although more rare, example:
- \code
- enum { Type = 0, UserType = 1000 };
- \endcode
+ \code
+ / *!
+ \typedef QMsgHandler
+ \relates QtGlobal
- Then
+ This is a typedef for a pointer to a function with the
+ following signature:
- \code
- / *!
- \variable QTreeWidgetItem::Type
+ \code
+ void myMsgHandler(QtMsgType, const char *);
+ \ endcode
- The default type for tree widget items.
+ \sa QtMsgType, qInstallMsgHandler()
+ * /
+ \endcode
- \sa UserType, type()
- * /
- \endcode
+ QDoc includes this in \c {qtglobal.html} as:
- and
+ \quotation
+ \raw HTML
+ <h3>typedef QtMsgHandler</h3>
+ \endraw
- \code
- / *!
- \variable QTreeWidgetItem::UserType
+ This is a typedef for a pointer to a function with the
+ following signature:
- The minimum value for custom types. Values below
- UserType are reserved by Qt.
+ \raw HTML
+ <tt>
+ <pre> void myMsgHandler(QtMsgType, const char *);</pre>
+ </tt>
+ \endraw
- \sa Type, type()
- * /
- \endcode
+ See also QtMsgType and qInstallMsgHandler().
+ \endquotation
- will be rendered as
+ Other typedefs are located on the reference page for the class
+ that defines them.
- \quotation
- \raw HTML
- <h3>
- const int QTreeWidgetItem::Type
- </h3>
- \endraw
+ \code
+ / *!
+ \typedef QLinkedList::Iterator
- The default type for tree widget items.
+ Qt-style synonym for QList::iterator.
+ * /
+ \endcode
- See also \l {QTreeWidgetItem::UserType}{UserType} and
- \l {QTreeWidgetItem::type()}{type()}.
+ QDoc includes this one on the reference page for class QLinkedList as:
- \raw HTML
- <h3>
- const int QTreeWidgetItem::UserType
- </h3>
- \endraw
+ \quotation
+ \raw HTML
+ <h3>typedef QLinkedList::Iterator</h3>
+ \endraw
- The minimum value for custom types. Values below
- UserType are reserved by Qt.
+ Qt-style synonym for QList::iterator.
+ \endquotation
- See also \l {QTreeWidgetItem::Type}{Type} and
- \l{QTreeWidgetItem::type()}{type()}.
+ \target variable-command
+ \section1 \\variable
- \endquotation
+ The \\variable command is for documenting a class member variable
+ or a constant. The argument is the variable or constant name. The
+ \\variable command comment includes a \l {brief-command} {\\brief}
+ command. QDoc generates the documentation based on the text from
+ \\brief command.
- in qtreewidget.html.
- \endtable
+ The documentation will be located in the in the associated class,
+ header file or namespace documentation.
+
+ In case of a member variable:
+
+ \code
+ / *!
+ \variable QStyleOption::palette
+ \brief the palette that should be used when painting
+ the control
+ * /
+ \endcode
+
+ QDoc includes this in qstyleoption.html as:
+
+ \quotation
+ \raw HTML
+ <h3>
+ <a href="http://qt.nokia.com/doc/4.0/qpalette.html">
+ QPalette
+ </a>
+ QStyleOption::palette
+ </h3>
+ \endraw
+
+ This variable holds the palette that should be used
+ when painting the control.
+ \endquotation
+
+ You can also document constants with the \\variable command. For
+ example, suppose you have the \c Type and \c UserType constants in
+ the QTreeWidgetItem class:
+
+ \code
+ enum { Type = 0, UserType = 1000 };
+ \endcode
+
+ For these, the \\vaqriable command can be used this way:
+
+ \code
+ / *!
+ \variable QTreeWidgetItem::Type
+
+ The default type for tree widget items.
+
+ \sa UserType, type()
+ * /
+ \endcode
+ \code
+ / *!
+ \variable QTreeWidgetItem::UserType
+
+ The minimum value for custom types. Values below
+ UserType are reserved by Qt.
+
+ \sa Type, type()
+ * /
+ \endcode
+
+ QDoc includes these in qtreewidget.html as:
+
+ \quotation
+ \raw HTML
+ <h3>
+ const int QTreeWidgetItem::Type
+ </h3>
+ \endraw
+
+ The default type for tree widget items.
+
+ See also \l {QTreeWidgetItem::UserType} {UserType} and \l
+ {QTreeWidgetItem::type()} {type()}.
+
+ \raw HTML
+ <h3>
+ const int QTreeWidgetItem::UserType
+ </h3>
+ \endraw
+
+ The minimum value for custom types. Values below
+ UserType are reserved by Qt.
+
+ See also \l {QTreeWidgetItem::Type} {Type} and
+ \l{QTreeWidgetItem::type()} {type()}.
+
+ \endquotation
*/
/*!
- \page 14-qdoc-commands-contextualcommands.html
- \previouspage Topical Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Navigation Commands
-
- \title Contextual Commands
-
- The contextual commands provide QDoc with information, that it
- wouldn't figure out otherwise, about the documented object. For
- example whether a class is thread-safe or not.
-
- These commands can appear anywhere within a QDoc comment.
-
- \section1 Alphabetical List
-
- \l {16-qdoc-commands-status.html#compat}{\\compat},
- \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage},
- \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage},
- \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup},
- \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule},
- \l {16-qdoc-commands-status.html#internal}{\\internal},
- \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass},
- \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage},
- \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant},
- \l {16-qdoc-commands-status.html#obsolete}{\\obsolete},
- \l {18-qdoc-commands-relating.html#overload}{\\overload},
- \l {16-qdoc-commands-status.html#preliminary}{\\preliminary},
- \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage},
- \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant},
- \l {18-qdoc-commands-relating.html#reimp}{\\reimp},
- \l {18-qdoc-commands-relating.html#relates}{\\relates},
- \l {15-qdoc-commands-navigation.html#startpage}{\\startpage},
- \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe},
- \l {20-qdoc-commands-title.html#title}{\\title}
+ \page 14-qdoc-commands-contextcommands.html
+ \previouspage Topic Commands
+ \contentspage Table of Contents
+ \nextpage Document Navigation
+
+ \title Context Commands
+
+ The context commands provide information about the element being
+ documented that QDoc can't deduce on its own. e.g. Is a class
+ thread-safe? Is a function reentrant? Which module is the class a
+ member of? Context commands can appear anywhere in a QDoc comment,
+ but they are normally placed near the top of the comment, just
+ below the \l {Topic Commands} {topic} command.
- \section1 Categories
\list
- \o \l {Navigation Commands}
- \o \l {Status Commands}
- \o \l {Thread Support Commands}
- \o \l {Relating Commands}
- \o \l {Grouping Commands}
- \o \l {Title Commands}
+ \o \l {16-qdoc-commands-status.html#compat-command}{\\compat},
+ \o \l {15-qdoc-commands-navigation.html#contentspage-command}{\\contentspage},
+ \o \l {15-qdoc-commands-navigation.html#indexpage-command}{\\indexpage},
+ \o \l {19-qdoc-commands-grouping.html#ingroup-command}{\\ingroup},
+ \o \l {18-qdoc-commands-relating.html#inherits-command}{\\inherits},
+ \o \l {19-qdoc-commands-grouping.html#inmodule-command}{\\inmodule},
+ \o \l {16-qdoc-commands-status.html#internal-command}{\\internal},
+ \o \l {19-qdoc-commands-grouping.html#mainclass-command}{\\mainclass},
+ \o \l {15-qdoc-commands-navigation.html#nextpage-command}{\\nextpage},
+ \o \l {17-qdoc-commands-thread.html#nonreentrant-command}{\\nonreentrant},
+ \o \l {16-qdoc-commands-status.html#obsolete-command}{\\obsolete},
+ \o \l {18-qdoc-commands-relating.html#overload-command}{\\overload},
+ \o \l {16-qdoc-commands-status.html#preliminary-command}{\\preliminary},
+ \o \l {15-qdoc-commands-navigation.html#previouspage-command}{\\previouspage},
+ \o \l {17-qdoc-commands-thread.html#reentrant-command}{\\reentrant},
+ \o \l {18-qdoc-commands-relating.html#reimp-command}{\\reimp},
+ \o \l {18-qdoc-commands-relating.html#relates-command}{\\relates},
+ \o \l {16-qdoc-commands-status.html#since-command}{\\since},
+ \o \l {15-qdoc-commands-navigation.html#startpage-command}{\\startpage},
+ \o \l {20-qdoc-commands-namingthings.html#subtitle-command}{\\subtitle}
+ \o \l {17-qdoc-commands-thread.html#threadsafe-command}{\\threadsafe},
+ \o \l {20-qdoc-commands-namingthings.html#title-command}{\\title}
\endlist
+
*/
/*!
\page 15-qdoc-commands-navigation.html
- \previouspage Contextual Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Status Commands
-
- \title Navigation Commands
-
- The navigation commands allow you to link the pages of a multipage
- document together. They provide the components of a navigation bar
- at the top and bottom of the document. They also provide browser
- and search engine support.
+ \previouspage Context Commands
+ \contentspage Table of Contents
+ \nextpage Reporting Status
- \section1 Alphabetical List
+ \title Document Navigation
- \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage},
- \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage},
- \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage},
- \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage},
- \l {15-qdoc-commands-navigation.html#startpage}{\\startpage}
+ The navigation commands are for linking the pages of a document in
+ a meaningful sequence. Below is a sequence of QDoc comments that
+ shows a typical use of the navigation commands.
- \section1 General Description
-
- The QDoc comments below shows a typical example using the
- navigation commands.
+ \section1 Example
\code
/ *!
\page basicqt.html
- \contentspage {Basic Qt}{Contents}
+ \contentspage {Basic Qt} {Contents}
\nextpage Getting Started
\indexpage Index
@@ -5885,7 +5706,7 @@
/ *!
\page gettingstarted.html
\previouspage Basic Qt
- \contentspage {Basic Qt}{Contents}
+ \contentspage {Basic Qt} {Contents}
\nextpage Creating Dialogs
\indexpage Index
@@ -5901,7 +5722,7 @@
/ *!
\page creatingdialogs.html
\previouspage Getting Started
- \contentspage {Basic Qt}{Contents}
+ \contentspage {Basic Qt} {Contents}
\indexpage Index
\startpage Basic Qt
@@ -5927,8 +5748,7 @@
* /
\endcode
- The second page of this multipage document, "Getting Started",
- will be rendered as
+ QDoc renders the "Getting Started" page in \c{creatingdialogs.html}:
\quotation
\raw HTML
@@ -5963,18 +5783,16 @@
\endraw
\endquotation
- in creatingdialogs.html.
-
- In addition, the \l {indexpage}{\\indexpage} and \l
- {startpage}{\\startpage} commands specifies links to the page's
- index page and start page. These links are used by browsers and
- search engines.
+ The \l {indexpage-command} {\\indexpage} and \l
+ {startpage-command} {\\startpage} commands create links to the
+ page's index page and start page. These links can be used by
+ browsers and search engines.
The index page is typically an alphabetical list of the document's
titles and topics, while the start page is the page considered by
the author to be the starting point of a multipage document.
- The links are included in the generated HTML source code but has
+ The links are included in the generated HTML source code but have
no visual effect on the documentation:
\code
@@ -5986,414 +5804,377 @@
</head>
\endcode
- \section1 Command Descriptions
-
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\previouspage \target previouspage
- \o \bold {The \\previouspage command links the current page
- to the previous one in an ordered series of documents}.
-
- The command has two arguments, each enclosed by curly
- braces: The first is the link target, i.e. the title of the
- previous page, the second is the link text. If the page's
- title is equivalent to the link text, the second argument
- can be omitted.
-
- The command must stand alone on its own line.
-
- In the end, the link is rendered at the top and bottom of
- the current page. For an example, see the \l {General
- Description} section.
+ \section1 Commands
- \row
- \o \bold \\nextpage \target nextpage
- \o \bold {The \\nextpage command links the current
- page to the next page in an ordered series of documents}.
-
- The command follows the same syntax and argument convention
- as the \l {previouspage}{\\previouspage} command.
+ \target previouspage-command
+ \section2 \\previouspage
- For an example, see the \l {General Description} section.
-
- \row
- \o \bold \\startpage \target startpage
- \o \bold {The \\startpage command specifies the first document
- in a collection of documents.}
+ The \\previouspage command links the current page to the previous
+ page in a sequence.a The command has two arguments, each enclosed
+ by curly braces: The first is the link target, i.e. the title of
+ the previous page, the second is the link text. If the page's
+ title is equivalent to the link text, the second argument can be
+ omitted.
- The command must stand alone on its own line, and its
- unique argument is the title of the first document.
+ The command must stand alone on its own line.
- QDoc will generate a link to the specified document which
- is included in the HTML file but has no visual effect on
- the documentation. The generated link type tells browsers
- and search engines which document is considered by the
- author to be the starting point of the collection.
+ \target nextpage-command
+ \section2 \\nextpage
- For an example, see the \l {General Description} section.
+ The \\nextpage command links the current page to the next page in
+ a sequence. The command follows the same syntax and argument
+ convention as the \l {previouspage-command} {\\previouspage}
+ command.
- \row
- \o \bold \\contentspage \target contentspage
- \o \bold {The \\contentspage command links the current
- page to a contents page}.
+ \target startpage-command
+ \section2 \\startpage
- The command follows the same syntax and argument convention
- as the \l {previouspage}{\\previouspage} command.
+ The \\startpage command specifies the first page of a sequence of
+ pages. The command must stand alone on its own line, and its
+ unique argument is the title of the first document.
- For an example, see the \l {General Description} section.
+ QDoc will generate a link to the start page and include it in the
+ generated HTML file, but this has no visual effect on the
+ documentation. The generated link type tells browsers and search
+ engines which document is considered by the author to be the
+ starting point of the collection.
- \row
- \o \bold \\indexpage \target indexpage
- \o \bold {The \\indexpage command specifies a document providing
- an index for the current document}.
+ \target contentspage-command
+ \section2 \\contentspage
- The command must stand alone on its own line, and its
- unique argument is the title of the index document.
+ The \\contentspage command links the current page to a table of
+ contents page. The command follows the same syntax and argument
+ convention as the \l {previouspage-command} {\\previouspage}
+ command.
- QDoc will generate a link to the specified document which
- is included in the HTML file but has no visual effect on
- the documentation. The generated link type tells browsers
- and search engines which document is considered by the
- author to be the index page for the current document.
+ \target indexpage-command
+ \section2 \\indexpage
- For an example, see the \l {General Description} section.
+ The \\indexpage command specifies an index page for the current
+ document. The command must stand alone on its own line, and its
+ unique argument is the title of the index document.
- \endtable
+ QDoc will generate a link to the index page and include it in the
+ generated HTML file, but this has no visual effect on the
+ documentation. The generated link type tells browsers and search
+ engines which document is considered by the author to be the
+ index page of the collection.
*/
/*!
\page 16-qdoc-commands-status.html
- \previouspage Navigation Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Thread Support Commands
-
- \title Status Commands
+ \previouspage Document Navigation
+ \contentspage Table of Contents
+ \nextpage Thread Support
- The usage commands can indicate whether a documented object is
- under development, becoming obsolete, provided for compatibility
- reasons or simply not part of the public interface. They can
- describe the history of minor versions. And they can also describe
- a documented object's ability to handle multithreaded programming.
+ \title Reporting Status
- \section1 Alphabetical List
+ These commands are for indicating that a documented element is
+ still under development, is becoming obsolete, is provided for
+ compatibility reasons, or is simply not to be included in the
+ public interface. The \l {since-command}{\\since} command is for
+ including information about the version when a function or class
+ first appeared.
- \l {16-qdoc-commands-status.html#compat}{\\compat},
- \l {16-qdoc-commands-status.html#internal}{\\internal},
- \l {16-qdoc-commands-status.html#obsolete}{\\obsolete},
- \l {16-qdoc-commands-status.html#preliminary}{\\preliminary},
- \l {16-qdoc-commands-status.html#since}{\\since}
+ \target compat-command
+ \section1 \\compat
- \section1 Command Description
+ The \\compat command is for indicating that a class or function is
+ part of the support library provided to keep old source code
+ working.
- \table
- \header
- \o Command
- \o Description
-
- \row
- \o \bold \\preliminary \target preliminary
- \o \bold {The \\preliminary command indicates that the
- referenced function is under development.}
-
- The command must stand on its own line.
+ The command must stand on its own line.
- The \\preliminary command expands to a notification in the
- function documentation, and marks the function as
- preliminary when it appears in lists. For example:
-
- \code
- / *!
- \preliminary
+ Usually an equivalent function or class is provided as an
+ alternative.
- Returns information about the joining properties of the
- character (needed for certain languages such as
- Arabic).
- * /
- QChar::Joining QChar::joining() const
- {
- return ::joining(*this);
- }
- \endcode
+ If the command is used in the documentation of a class, the
+ command expands to a warning that the referenced class is part of
+ the support library. The warning is located at the top of the
+ documentation page.
- will be rendered as
+ \code
+ / *!
+ \class MyQt3SupportClass
+ \compat
+ * /
+ \endcode
- \quotation
- \raw HTML
- <h3>
- <a href="http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum">Joining</a>
- QChar::joining () const</h3>
- \endraw
+ QDoc renders this at the top of the MyQt3SupportClass class
+ reference page.
- \bold {This function is under development and
- is subject to change.}
+ \quotation
+ \bold {This class is part of the Qt 3 support
+ library.} It is provided to keep old source code
+ working. We strongly advise against using it in new
+ code. See the \l
+ {http://qt.nokia.com/doc/4.0/porting4.html} {Porting
+ Guide} for more information.
+ \endquotation
- Returns information about the joining properties of the
- character (needed for certain languages such as
- Arabic).
- \endquotation
+ If the command is used when documenting a function, QDoc will
+ create and link to a separate page documenting Qt 3 support
+ members when generating the reference documentation for the
+ associated class.
- And the function's entry in QChar's list of functions will
- be rendered as
+ \code
+ / *!
+ \fn MyClass::MyQt3SupportMemberFunction
+ \compat
- \quotation
- \list
- \o ...
- \o Joining
- \l {http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum}
- {joining}()
- const \c (preliminary)
- \o ...
- \endlist
- \endquotation
+ Use MyNewFunction() instead.
+ * /
+ \endcode
- \row
- \o \bold \\obsolete \target obsolete
- \o \bold {The \\obsolete command indicates that the referenced
- function no longer should be used in new code;
- there is no guarantee for how long it will remain in
- the library.}
+ QDoc renders this in \c{myclass-qt3.html} as:
- The command must stand on its own line.
+ \quotation
+ \raw HTML
+ <h1>Qt 3 Support Members for MyClass</h1>
+ \endraw
- When generating the reference documentation for a class,
- QDoc will create and link to a separate page documenting
- its obsolete functions. Usually an equivalent function is
- provided as an alternative.
+ \bold {The following class members are part of the Qt 3
+ support layer.} They are provided to help you port old code to
+ Qt 4. We advise against using them in new code.
- For example:
+ ...
- \code
- / *!
- \fn MyClass::MyObsoleteFunction
- \obsolete
+ \list
+ \o void MyQt3SupportMemberFunction()
+ \o ...
+ \endlist
- Use MyNewFunction() instead.
- * /
- \endcode
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ <h3>void MyQt3SupportMemberFunction ()</h3>
+ <p>Use MyNewFunction() instead.</p>
+ \endraw
+ ...
+ \endquotation
- will be rendered as
+ \target default-command
+ \section1 \\default \span {class="newStuff"} {(new)}
- \quotation
- \raw HTML
- <h1>Obsolete Members for MyClass</h1>
- \endraw
+ The \\default command is for marking a QML property as the
+ \l {http://doc.trolltech.com/4.7/qdeclarativeintroduction.html#default-properties}
+ {default property}. The word \span {class="newStuff"} {default} is shown in red in
+ the documentation of the property.
- \bold {The following class members are obsolete.} They
- are provided to keep old source code working. We
- strongly advise against using them in new code.
+ \code
+ / *!
+ \qmlproperty list<Change> State::changes
+ This property holds the changes to apply for this state
+ \default
- ...
+ By default these changes are applied against the default state. If the state
+ extends another state, then the changes are applied against the state being
+ extended.
+ * /
+ \endcode
- \list
- \o void MyObsoleteFunction() \c (obsolete)
- \o ...
- \endlist
+ See how QDoc renders this property on the reference page for the
+ \l {http://doc.trolltech.com/4.7/qml-state.html#changes-prop} {State}
+ element.
- \raw HTML
- <hr />
- <h2>Member Function Documentation</h2>
- <h3>void MyObsoleteFunction ()</h3>
- <p>Use MyNewFunction() instead.</p>
- \endraw
+ \target obsolete-command
+ \section1 \\obsolete
- ...
- \endquotation
+ The \\obsolete command is for indicating that a function is being
+ deprecated, and it should no longer be used in new code. There is
+ no guarantee for how long it will remain in the library.
- in myclass-obsolete.html
+ The command must stand on its own line.
+ When generating the reference documentation for a class, QDoc will
+ create and link to a separate page documenting its obsolete
+ functions. Usually an equivalent function is provided as an
+ alternative.
- \row
- \o \bold \\compat \target compat
- \o \bold {The \\compat command indicates that the referenced class
- or function is part of the support library provided to keep
- old source code working.}
+ \code
+ / *!
+ \fn MyClass::MyObsoleteFunction
+ \obsolete
- The command must stand on its own line.
+ Use MyNewFunction() instead.
+ * /
+ \endcode
- Usually an equivalent function or class is provided as an
- alternative.
+ QDoc renders this in \c{myclass-obsolete.html} as:
- If the command is used within the documentation of a class,
- the command expands to a warning that the referenced class
- is part of the support library. The warning is located on
- top of the associated documentation. For example:
+ \quotation
+ \raw HTML
+ <h1>Obsolete Members for MyClass</h1>
+ \endraw
- \code
- / *!
- \class MyQt3SupportClass
- \compat
- * /
- \endcode
+ \bold {The following class members are obsolete.} They are
+ provided to keep old source code working. We strongly advise
+ against using them in new code.
- will be rendered as
+ ...
- \quotation
- \bold {This class is part of the Qt 3 support
- library.} It is provided to keep old source code
- working. We strongly advise against using it in new
- code. See the \l
- {http://qt.nokia.com/doc/4.0/porting4.html}{Porting
- Guide} for more information.
- \endquotation
+ \list
+ \o void MyObsoleteFunction() \c (obsolete)
+ \o ...
+ \endlist
- on the top of the MyQt3SupportClass class reference.
+ \raw HTML
+ <hr />
+ <h2>Member Function Documentation</h2>
+ <h3>void MyObsoleteFunction ()</h3>
+ <p>Use MyNewFunction() instead.</p>
+ \endraw
+ ...
+ \endquotation
- If the command is used when documenting a function, QDoc
- will create and link to a separate page documenting Qt 3
- support members when generating the reference documentation
- for the associated class. For example:
+ \target internal-command
+ \section1 \\internal
- \code
- / *!
- \fn MyClass::MyQt3SupportMemberFunction
- \compat
+ The \\internal command indicates that the referenced
+ function is not part of the public interface.
- Use MyNewFunction() instead.
- * /
- \endcode
+ The command must stand on its own line.
- will be rendered as
+ QDoc ignores the documentation as well as the documented item,
+ when generating the associated class reference documenation.
- \quotation
- \raw HTML
- <h1>Qt 3 Support Members for MyClass</h1>
- \endraw
+ \code
+ / *!
+ \internal
- \bold {The following class members are part of the Qt
- 3 support layer.} They are provided to help you port
- old code to Qt 4. We advise against using them in new
- code.
+ Tries to find the decimal separator. If it can't find
+ it and the thousand delimiter is != '.' it will try to
+ find a '.';
+ * /
+ int QDoubleSpinBoxPrivate::findDelimiter
+ (const QString &str, int index) const
+ {
+ int dotindex = str.indexOf(delimiter, index);
+ if (dotindex == -1 && thousand != dot && delimiter != dot)
+ dotindex = str.indexOf(dot, index);
+ return dotindex;
+ }
+ \endcode
- ...
+ This function will not be included in the documentation.
- \list
- \o void MyQt3SupportMemberFunction()
- \o ...
- \endlist
+ \target preliminary-command
+ \section1 \\preliminary
- \raw HTML
- <hr />
- <h2>Member Function Documentation</h2>
- <h3>void MyQt3SupportMemberFunction ()</h3>
- <p>Use MyNewFunction() instead.</p>
- \endraw
+ The \\preliminary command is for indicating that a referenced
+ function is still under development.
- ...
- \endquotation
+ The command must stand on its own line.
- in myclass-qt3.html
+ The \\preliminary command expands to a notification in the
+ function documentation, and marks the function as preliminary when
+ it appears in lists.
+ \code
+ / *!
+ \preliminary
- \row
- \o \bold \\internal \target internal
- \o \bold {The \\internal command indicates that the referenced
- function is not part of the public interface.}
+ Returns information about the joining properties of the
+ character (needed for certain languages such as
+ Arabic).
+ * /
+ QChar::Joining QChar::joining() const
+ {
+ return ::joining(*this);
+ }
+ \endcode
- The command must stand on its own line.
+ QDoc renders this as:
- QDoc ignores the documentation as well as the documented
- item, when generating the associated class reference
- documenation. For example:
+ \quotation
+ \raw HTML
+ <h3>
+ <a href="http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum">Joining</a>
+ QChar::joining () const</h3>
+ \endraw
- \code
- / *!
- \internal
+ \bold {This function is under development and
+ subject to change.}
- Tries to find the decimal separator. If it can't find
- it and the thousand delimiter is != '.' it will try to
- find a '.';
- * /
- int QDoubleSpinBoxPrivate::findDelimiter
- (const QString &str, int index) const
- {
- int dotindex = str.indexOf(delimiter, index);
- if (dotindex == -1 && thousand != dot && delimiter != dot)
- dotindex = str.indexOf(dot, index);
- return dotindex;
- }
- \endcode
+ Returns information about the joining properties of the
+ character (needed for certain languages such as
+ Arabic).
+ \endquotation
- in qspinbox.cpp, will not be rendered at all.
+ And the function's entry in QChar's list of functions will be
+ rendered as:
- \row
- \o \bold \\since \target since
- \o \bold {The \\since command tells in which minor release
- the associated functionality was added.}
+ \quotation
+ \list
+ \o ...
+ \o Joining
+ \l {http://qt.nokia.com/doc/4.0/qchar.html#Joining-enum}
+ {joining}()
+ const \c (preliminary)
+ \o ...
+ \endlist
+ \endquotation
- For example:
+ \target since-command
+ \section1 \\since
- \code
- / *!
- \since 4.1
+ The \\since command tells in which minor release
+ the associated functionality was added.
- Returns an icon for \a standardIcon.
+ \code
+ / *!
+ \since 4.1
- ...
+ Returns an icon for \a standardIcon.
- \sa standardIconImplementation(), standardPixmap()
- * /
- QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const
- {
- }
- \endcode
+ ...
- will be rendered as
+ \sa standardIconImplementation(), standardPixmap()
+ * /
+ QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const
+ {
+ }
+ \endcode
- \quotation
- \raw HTML
- <h3>QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const</h3>
- \endraw
+ QDoc renders this as:
- This function was introduced in Qt version 4.1
+ \quotation
+ \raw HTML
+ <h3>QIcon QStyle::standardIcon(StandardPixmap standardIcon, const QStyleOption *option, const QWidget *widget) const</h3>
+ \endraw
- Returns an icon for \a standardIcon.
+ This function was introduced in Qt version 4.1
- ...
+ Returns an icon for \a standardIcon.
- See also \l
- {QStyle::standardIconImplementation()}{standardIconImplementation()}
- and \l {QStyle::standardPixmap()}{standardPixmap()}.
- \endquotation
+ ...
- QDoc generates the "Qt" reference from the \l
- {25-qdoc-configuration-derivedprojects.html#project}{\c
- project} configuration variable. For that reason this
- reference will change according to the current
- documentation project.
+ See also \l {QStyle::standardIconImplementation()}
+ {standardIconImplementation()} and \l
+ {QStyle::standardPixmap()} {standardPixmap()}.
+ \endquotation
- See also \l
- {25-qdoc-configuration-derivedprojects.html#project}{\c
- project}.
+ QDoc generates the "Qt" reference from the \l
+ {25-qdoc-configuration-derivedprojects.html#project} {\c project}
+ configuration variable. For that reason this reference will change
+ according to the current documentation project.
- \endtable
+ See also \l {25-qdoc-configuration-derivedprojects.html#project}
+ {\c project}.
*/
/*!
\page 17-qdoc-commands-thread.html
- \previouspage Status Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Relating Commands
-
- \title Thread Support Commands
-
- The thread support commands specify the level of support for
- multithreaded programming of a class or function.
-
- \section1 Alphabetical List
-
- \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant},
- \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant},
- \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe}
+ \previouspage Reporting Status
+ \contentspage Table of Contents
+ \nextpage Relating Things
- \section1 General Description
+ \title Thread Support
- There are three levels of support for multithreaded programming of
- a class or function: \c threadsafe, \c reentrant and \c
- nonreentrant.
+ The thread support commands are for specifying the level of
+ support for multithreaded programming in a class or function.
+ There are three levels of support: \c threadsafe, \c reentrant and
+ \c nonreentrant.
The default is \c nonreentrant which means that the associated
class or function cannot be called by multiple threads. \c
@@ -6406,15 +6187,14 @@
can be called simultaneously by multiple threads even when each
invocation references shared data.
- When a class is declared \c reentrant or \c threadsafe, using the
- \l {reentrant}{\\reentrant} and \l {threadsafe}{\\threadsafe}
- commands respectively, functions in the referenced class can be
- declared \c nonreentrant, using the \l
- {nonreentrant}{\\nonreentrant} command, excluding the functions
- from the general view.
+ When a class is marked \l {reentrant-command} {\\reentrant} or \l
+ {threadsafe-command} {\\threadsafe}, functions in that class can
+ be marked \c nonreentrant using the \l {nonreentrant-command}
+ {\\nonreentrant} command.
- For example:
+ \section1 Example
+ \target reentrant-example
\code
/ *!
\class QLocale
@@ -6453,7 +6233,7 @@
}
\endcode
- will be rendered as
+ QDoc renders this as:
\quotation
\raw HTML
@@ -6468,8 +6248,8 @@
\endcode
\bold {Note:} All the functions in this class are \l
- {threads.html#reentrant}{reentrant}, except \l
- {QLocale::setDefault()}{setDefault()}.
+ {threads.html#reentrant} {reentrant}, except \l
+ {QLocale::setDefault()} {setDefault()}.
...
@@ -6495,8 +6275,8 @@
\warning This function is not reentrant.
- See also \l {QLocale::system()}{system()} and \l
- {QLocale::c()}{c()}.
+ See also \l {QLocale::system()} {system()} and \l
+ {QLocale::c()} {c()}.
...
\endquotation
@@ -6504,7 +6284,7 @@
As shown above, QDoc generates a notification when a class is
declared reentrant, and lists the exceptions (the declared
nonreentrant functions). A link to the general documentation on \l
- {threads.html#reentrant}{reentrancy and thread-safety} is
+ {threads.html#reentrant} {reentrancy and thread-safety} is
included. In addition a warning, "\bold Warning: This function is
not reentrant.", is generated in the nonreentrant functions'
documentation.
@@ -6513,477 +6293,469 @@
is declared threadsafe.
For more information see the general documentation on \l
- {threads.html#reentrant}{reentrancy and thread-safety}.
+ {threads.html#reentrant} {reentrancy and thread-safety}.
- \section1 Command Descriptions
+ \section1 Commands
- \table
- \header
- \o Command
- \o Description
+ \target threadsafe-command
+ \section2 \\threadsafe
- \row
- \o \bold \\threadsafe \target threadsafe
- \o \bold {The \\threadsafe command indicates that the
- associated class or function can be called simultaneously by
- multiple threads even when each invocation references
- shared data.}
+ The \\threadsafe command includes a line in the documentation to
+ indicate that the associated class or function is \e threadsafe
+ and can be called simultaneously by multiple threads, even when
+ separate invocations reference shared data.
- The command must stand on its own line.
+ The command must stand on its own line.
- The generated documentation resulting from using the
- \\threadsafe command is similar to the result of using the
- \l {reentrant}{\\reentrant} command. For an example, see
- the \l {General Description} section.
+ The documentation generated from this command will be similar to
+ the what is generated for the \l {reentrant-command} {\\reentrant}
+ command. See the example above in the \l {reentrant-example}
+ {introduction}.
- See also \l{reentrant}{\\reentrant} and
- \l{nonreentrant}{\\nonreentrant}.
+ See also \l{reentrant-command} {\\reentrant} and
+ \l{nonreentrant-command} {\\nonreentrant}.
- \row
- \o \bold \\reentrant \target reentrant
- \o \bold {The \\reentrant command indicates that the associated
- class or function can be called simultaneously
- by multiple threads, provided that each invocation of the
- functions reference unique data.}
+ \target reentrant-command
+ \section2 \\reentrant
- The command must stand on its own line.
+ The \\reentrant command indicates that the associated class or
+ function can be called simultaneously by multiple threads,
+ provided that each invocation references its own data. See the \l
+ {reentrant-example} {example} above.
- For an example, see the \l {General Description} section.
+ The command must stand on its own line.
- See also \l{nonreentrant}{\\nonreentrant} and
- \l{threadsafe}{\\threadsafe}.
+ See also \l{nonreentrant-command} {\\nonreentrant} and
+ \l{threadsafe-command} {\\threadsafe}.
- \row
- \o \bold \\nonreentrant \target nonreentrant
- \o \bold {The \\nonreentrant command indicates that the
- associated class or function cannot be called by
- multiple threads.}
+ \target nonreentrant-command
+ \section2 \\nonreentrant
- The command must stand on its own line.
+ The \\nonreentrant command indicates that the associated class or
+ function cannot be called by multiple threads. Nonreentrant is the
+ default case.
- For an example, see the \l {General Description} section.
+ The command must stand on its own line.
- See also \l{reentrant}{\\reentrant} and
- \l{threadsafe}{\\threadsafe}.
+ When a class is marked \l {reentrant-command} {\\reentrant} or \l
+ {threadsafe-command} {\\threadsafe}, functions in that class can
+ be marked \c nonreentrant using this command in the \l{fn-command}
+ {\\fn} comment of the functions to be excluded.
- \endtable
+ See also \l{reentrant-command} {\\reentrant} and
+ \l{threadsafe-command} {\\threadsafe}.
*/
/*!
\page 18-qdoc-commands-relating.html
- \previouspage Thread Support Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Grouping Commands
+ \previouspage Thread Support
+ \contentspage Table of Contents
+ \nextpage Grouping Things
- \title Relating Commands
+ \title Relating Things
- The relation commands discribe how the documented object relates
- to its context: Whether it is an overloaded function, a
- reimplemented function or a global function related to a specified
- class or header file.
+ The relating commands are for specifying how one documented
+ element relates to another documented element. e.g., This function
+ is an overload of another function, or this function is a
+ reimplementation of another function, or this typedef is \e
+ related to some class or header file. There is also a command
+ for documenting that a QML element inherits some other QML
+ element.
- \section1 Alphabetical List
+ \section1 Commands
- \l {18-qdoc-commands-relating.html#overload}{\\overload},
- \l {18-qdoc-commands-relating.html#reimp}{\\reimp},
- \l {18-qdoc-commands-relating.html#relates}{\\relates},
+ \target inherits-command
+ \section2 \\inherits \span {class="newStuff"} {(new)}
- \section1 Command Descriptions
+ The \\inherits command is for documenting that one QML element
+ inherits some other QML element. It must be included in the
+ inheriting element's \l{qmlclass-command}{\\qmlclass} comment.
+ The argument is the name of the inherited QML element.
- \table
- \header
- \o Command
- \o Description
+ \code
+ / *!
+ \qmlclass PauseAnimation QDeclarativePauseAnimation
+ \ingroup qml-animation-transition
+ \since 4.7
+ \inherits Animation
+ \brief The PauseAnimation element provides a pause for an animation.
- \row
- \o \bold \\overload \target overload
- \o \bold {The \\overload command indicates that the
- function is a secondary overload of its name.}
+ When used in a SequentialAnimation, PauseAnimation is a step
+ when nothing happens, for a specified duration.
- The command must stand on its own line.
+ A 500ms animation sequence, with a 100ms pause between two animations:
- For any overloaded function (except constructors), QDoc
- expects one primary version of the function and all the
- the overloads marked with the \bold{\\overload command}.
- The primary version should be fully documented. Each
- overload can have whatever extra documentation you want
- to add for just that overload.
+ SequentialAnimation {
+ NumberAnimation { ... duration: 200 }
+ PauseAnimation { duration: 100 }
+ NumberAnimation { ... duration: 200 }
+ }
- From Qt 4.5, you can include the function name plus '()'
- as a parameter to the \bold{\\overload} command, which
- will include a standard \i{This function overloads...}
- line of text with a link to the documentation for the
- primary version of the function.
+ \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}
+ * /
+ \endcode
- For example:
+ QDoc includes this line on the reference page for the
+ \l{http://doc.trolltech.com/4.7/qml-pauseanimation.html} {PauseAnimation}
+ element:
- \code
- / *!
- \overload addAction()
+ \quotation
+ Inherits \l{http://doc.trolltech.com/4.7/qml-animation.html} {Animation}
+ \endquotation
- This convenience function creates a new action with an
- \a icon and some \a text. The function adds the newly
- created action to the menu's list of actions, and
- returns it.
+ \target overload-command
+ \section2 \\overload
- \sa QWidget::addAction()
- * /
- QAction *QMenu::addAction(const QIcon &icon, const QString &text)
- {
- QAction *ret = new QAction(icon, text, this);
- addAction(ret);
- return ret;
- }
- \endcode
+ The \\overload command is for indicating that a function is a
+ secondary overload of its name.
- will be rendered as
+ The command must stand on its own line.
- \quotation
- \raw HTML
- <h3><a href="http://qt.nokia.com/doc/4.0/qaction.html">QAction</a>
- * QMenu::addAction ( const QIcon & <i>icon</i>,
- const QString & <i>text</i> )
- </h3>
- \endraw
+ For a function name that is overloaded (except constructors), QDoc
+ expects one primary version of the function, and all the others
+ marked with the \bold {\\overload command}. The primary version
+ should be fully documented. Each overload can have whatever extra
+ documentation you want to add for just that overloaded version.
- This function overloads \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}{addAction()}
+ From Qt 4.5, you can include the function name plus '()' as a
+ parameter to the \bold{\\overload} command, which will include a
+ standard \e{This function overloads...} line of text with a link
+ to the documentation for the primary version of the function.
- This convenience function creates a new action with an
- \i icon and some \i text. The function adds the newly
- created action to the menu's list of actions, and
- returns it.
+ \code
+ / *!
+ \overload addAction()
- See also
- \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}
- {QWidget::addAction}().
- \endquotation
+ This convenience function creates a new action with an
+ \a icon and some \a text. The function adds the newly
+ created action to the menu's list of actions, and
+ returns it.
- If you don't include the function name with the
- \bold{\\overlaod} command, then instead of the "This
- function overloads..." line with the link to the
- documentation for the primary version, you get the old
- standard line:
+ \sa QWidget::addAction()
+ * /
+ QAction *QMenu::addAction(const QIcon &icon, const QString &text)
+ {
+ QAction *ret = new QAction(icon, text, this);
+ addAction(ret);
+ return ret;
+ }
+ \endcode
- \quotation
- This is an overloaded member function, provided for
- convenience.
- \endquotation.
+ QDoc renders this as:
- \row
- \o \bold \\reimp \target reimp
- \o \bold {The \\reimp command indicates that the
- referenced function is a reimplementation of a virtual function,
- where the reimplementation has no effect on the interface.}
+ \quotation
+ \raw HTML
+ <h3><a href="http://qt.nokia.com/doc/4.0/qaction.html">QAction</a>
+ * QMenu::addAction ( const QIcon & <i>icon</i>,
+ const QString & <i>text</i> )
+ </h3>
+ \endraw
- The command must stand on its own line.
+ This function overloads \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction} {addAction()}
- QDoc will omit the reimplemented function from the class
- reference. For example:
+ This convenience function creates a new action with an
+ \e icon and some \e text. The function adds the newly
+ created action to the menu's list of actions, and
+ returns it.
- \code
- / *!
- \reimp
- * /
- void QToolButton::nextCheckState()
- {
- Q_D(QToolButton);
- if (!d->defaultAction)
- QAbstractButton::nextCheckState();
- else
- d->defaultAction->trigger();
- }
- \endcode
+ See also
+ \l {http://qt.nokia.com/doc/4.0/qwidget.html#addAction}
+ {QWidget::addAction}().
+ \endquotation
- will not be rendered at all; only a link to the inherited
- QAbstractButton::nextCheckState() will appear in the
- documentation.
+ If you don't include the function name with the \bold{\\overlaod}
+ command, then instead of the "This function overloads..." line
+ with the link to the documentation for the primary version, you
+ get the old standard line:
- \row
- \o \bold \\relates \target relates
- \o \bold {The \\relates command attaches the documentation of
- a global function to that of a related class or header file.}
+ \quotation
+ This is an overloaded member function, provided for
+ convenience.
+ \endquotation.
- The command's argument is a class name, an the command (and
- its argument) must stand on its own line.
+ \target reimp-command
+ \section2 \\reimp
- \code
- / *!
- \relates QChar
+ The \\reimp command is for indicating that a function is a
+ reimplementation of a virtual function.
- Reads a char from the stream \a in into char \a chr.
+ The command must stand on its own line.
- \sa {Format of the QDataStream operators}
- * /
- QDataStream &operator>>(QDataStream &in, QChar &chr)
- {
- quint16 u;
- in >> u;
- chr.unicode() = ushort(u);
- return in;
- }
- \endcode
+ QDoc will omit the reimplemented function from the class
+ reference.
+
+ \code
+ / *!
+ \reimp
+ * /
+ void QToolButton::nextCheckState()
+ {
+ Q_D(QToolButton);
+ if (!d->defaultAction)
+ QAbstractButton::nextCheckState();
+ else
+ d->defaultAction->trigger();
+ }
+ \endcode
- will be rendered with the QChar documentation.
+ This function will not be included in the documentation. Instead,
+ a link to the base function QAbstractButton::nextCheckState() will
+ appear in the documentation.
- \endtable
+ \target relates-command
+ \section2 \\relates
+
+ The \\relates command is for including the documentation of a
+ global element to some class or header file. The argument is a
+ class name or header file.
+
+ \code
+ / *!
+ \relates QChar
+
+ Reads a char from the stream \a in into char \a chr.
+
+ \sa {Format of the QDataStream operators}
+ * /
+ QDataStream &operator>>(QDataStream &in, QChar &chr)
+ {
+ quint16 u;
+ in >> u;
+ chr.unicode() = ushort(u);
+ return in;
+ }
+ \endcode
+
+ The documentation for this function will be included on the reference page
+ for class QChra.
*/
/*!
\page 19-qdoc-commands-grouping.html
- \previouspage Relating Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage Title Commands
+ \previouspage Relating Things
+ \contentspage Table of Contents
+ \nextpage Naming Things
- \title Grouping Commands
+ \title Grouping Things
The grouping commands relate classes to defined groups and
modules. The groups are used when generating lists of related
classes in the documentation, while the modules are elements of
Qt's structure.
- \section1 Alphabetical List
+ \section1 Commands
- \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup},
- \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule},
- \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass},
+ \target mainclass-command
+ \section2 \\mainclass
- \section1 Command Descriptions
+ The \\mainclass command relates the documented class to
+ a group called mainclasses.
- \table
- \header
- \o Command
- \o Description
+ The command must stand on its own line.
- \row
- \o \bold \\mainclass \target mainclass
- \o \bold {The \\mainclass command relates the documented class to
- a group called mainclasses.}
+ \code
+ / *!
+ \class QWidget qwidget.h
+ \brief The QWidget class is the base class of
+ all user interface objects.
- The command must stand on its own line.
+ \mainclass
- For example:
+ ...
+ * /
+ \endcode
- \code
- / *!
- \class QWidget qwidget.h
- \brief The QWidget class is the base class of
- all user interface objects.
+ This will include the QWidget class in the \e mainclasses
+ group, which means, for example, that the class will appear on the
+ list created by calling the \l {generatelist-command}
+ {\\generatelist} command with the \c mainclasses argument:
- \mainclass
+ \l http://qt.nokia.com/doc/4.0/mainclasses.html
- ...
- * /
- \endcode
+ \note The Qt documentation no longer includes the \e mainclasses
+ page.
- will ensure that the QWidget class is included in the \c
- mainclasses group, which means, for example, that the class
- will appear on the list created by calling the \l
- {generatelist}{\\generatelist} command with the \c
- mainclasses argument:
+ See also \l {generatelist-command} {\\generatelist}.
- \l http://qt.nokia.com/doc/4.0/mainclasses.html
+ \target ingroup-command
+ \section2 \\ingroup
- See also \l {generatelist}{\\generatelist}.
+ The \\ingroup command indicates that the given
+ overview or documented class belongs to a certain group of
+ related docmentation.
- \row
- \o \bold \\ingroup \target ingroup
+ A class or overview may belong to many groups.
- \o \bold {The \\ingroup command indicates that the given
- overview or documented class belongs to a certain group of
- related docmentation.}
+ The \\ingroup command's argument is a group name, but note
+ that the command considers the rest of the line as part of
+ its argument. Make sure that the group name is followed by
+ a linebreak.
- A class or overview may belong to many groups.
+ \code
+ / *!
+ \class QDir
+ \brief The QDir class provides access to directory
+ structures and their contents.
- The \\ingroup command's argument is a group name, but note
- that the command considers the rest of the line as part of
- its argument. Make sure that the group name is followed by
- a linebreak. For example:
+ \ingroup io
+ ...
+ * /
+ \endcode
- \code
- / *!
- \class QDir
- \brief The QDir class provides access to directory
- structures and their contents.
+ This will include the QDir class in the \c io group, which means,
+ for example, that QDir will appear on the list created by calling
+ the \l {group-command} {\\group} command with the \c io argument.
- \ingroup io
- ...
- * /
- \endcode
+ To list overviews that are related to a certain group, you must
+ generate the list explicitly using the \l {generatelist-command}
+ {\\generatelist} command with the \c related argument.
- will ensure that the QDir class is included in the \c io
- group, which means, for example, that QDir will appear on
- the list created by calling the \l {group}{\\group} command
- with the \c io argument.
+ See also \l {group-command} {\\group}.
- Note that to list overviews that are related to a given
- group, you must generate the list exlicitly by using the \l
- {generatelist}{\\generatelist} command with the \c related
- argument.
+ \target inmodule-command
+ \section2 \\inmodule
- See also \l {group}{\\group}.
- \row
- \o \bold \\inmodule \target inmodule
- \o \bold {The \\inmodule command relates the documented class
- to the module specified by the command's argument.}
+ The \\inmodule command relates a class to the module specified by
+ the command's argument.
- For the basic classes in Qt, a class's module is determined
- by its location, i.e. its directory. However, for
- extensions, like ActiveQt and Qt Designer, a class needs to
- be related to a module explicitly.
+ For the basic classes in Qt, a class's module is determined by its
+ location, i.e. its directory. However, for extensions, like
+ ActiveQt and Qt Designer, a class must be related to a module
+ explicitly.
- The command's argument is a module name, but note that the
- command considers the rest of the line as part of its
- argument. Make sure that the module name is followed by a
- linebreak. For example:
+ The command's argument is a module name, but note that the command
+ considers the rest of the line as part of its argument. Make sure
+ that the module name is followed by a linebreak.
- \code
- /*!
- \class QDesignerTaskMenuExtension
- \inmodule QtDesigner
- * /
- \endcode
+ \code
+ /*!
+ \class QDesignerTaskMenuExtension
+ \inmodule QtDesigner
+ * /
+ \endcode
- will ensure that the QDesignerTaskMenuExtension class is
- included in the \c QtDesigner module, which means, for
- example, that the class will appear on the list created by
- calling the \l {generatelist}{\\generatelist} command with
- the \c {{classesbymodule QtDesigner}} argument.
+ This ensures that the QDesignerTaskMenuExtension class is included
+ in the \c QtDesigner module, which means, for example, that the
+ class will appear on the list created by calling the \l
+ {generatelist-command} {\\generatelist} command with the \c
+ {{classesbymodule QtDesigner}} argument.
- See also \l {module}{\\module} and \l
- {generatelist}{\\generatelist}.
- \endtable
+ See also \l {module-command} {\\module} and \l
+ {generatelist-command} {\\generatelist}.
*/
/*!
- \page 20-qdoc-commands-title.html
- \previouspage Grouping Commands
- \contentspage QDoc Manual - Table of Contents
- \nextpage QDoc Configuration
-
- \title Title Commands
-
- In general a title command considers everything that follows it
- until the first line break as its argument. If the title needs to
- be spanned over several lines, make sure to end each line (except
- the last one) with a backslash.
-
- \section1 Alphabetical List
-
- \l {20-qdoc-commands-title.html#title}{\\title},
- \l {20-qdoc-commands-title.html#subtitle}{\\subtitle}
-
- \section1 Command Descriptions
+ \page 20-qdoc-commands-namingthings.html
+ \previouspage Grouping Things
+ \contentspage Table of Contents
+ \nextpage Markup Commands
- \table
- \header
- \o Command
- \o Description
+ \title Naming Things
- \row
- \o \bold \\title \target title
- \o \bold {The \\title command sets the title for a
- documentation page, or allows you to override it.}
+ In general, a title command considers everything that follows it
+ until the first line break as its argument. If the title is so
+ long it must span multiple lines, end each line (except the last
+ one) with a backslash.
- For example:
+ \section1 Commands
- \code
- / *!
- \page signalandslots.html
+ \target title-command
+ \section2 \\title
- \title Signals and Slots
+ The \\title command sets the title for a documentation page, or
+ allows you to override it.
- Signals and slots are used for communication between
- objects. The signals and slots mechanism is a central
- feature of Qt and probably the part that differs most
- from the features provided by other frameworks.
+ \code
+ / *!
+ \page signalandslots.html
- ...
- * /
- \endcode
+ \title Signals & Slots
- will be rendered as
+ Signals and slots are used for communication between
+ objects. The signals and slots mechanism is a central
+ feature of Qt and probably the part that differs most
+ from the features provided by other frameworks.
- \quotation
- \raw HTML
- <h1><center>Signal and Slots</center></h1>
- \endraw
+ ...
+ * /
+ \endcode
- Signals and slots are used for communication between
- objects. The signals and slots mechanism is a central
- feature of Qt and probably the part that differs most
- from the features provided by other frameworks.
+ QDoc renders this as:
- ...
- \endquotation
- See also \l {subtitle}{\\subtitle}.
+ \quotation
+ \raw HTML
+ <h1><center>Signal and Slots</center></h1>
+ \endraw
- \row
- \o \bold \\subtitle \target subtitle
- \o \bold {The \\subtitle command sets a subtitle for a
- documentation page.}
+ Signals and slots are used for communication between
+ objects. The signals and slots mechanism is a central
+ feature of Qt and probably the part that differs most
+ from the features provided by other frameworks.
+ ...
+ \endquotation
+ See also \l {subtitle-command} {\\subtitle}.
- For example:
+ \target subtitle-command
+ \section2 \\subtitle
- \code
- / *!
- \page qtopiacore-overview.html
+ The \\subtitle command sets a subtitle for a documentation page.
- \title Qtopia Core
- \subtitle Qt for Embedded Linux
+ \code
+ / *!
+ \page qtopiacore-overview.html
- Qt/Embedded, the embedded Linux port of Qt, is a
- complete and self-contained C++ GUI and platform
- development tool for Linux-based embedded development.
+ \title Qtopia Core
+ \subtitle Qt for Embedded Linux
- ...
- * /
- \endcode
+ Qt/Embedded, the embedded Linux port of Qt, is a
+ complete and self-contained C++ GUI and platform
+ development tool for Linux-based embedded development.
+ ...
+ * /
+ \endcode
- will be rendered as
+ QDoc renders this as:
- \quotation
- \raw HTML
- <h1><center>Qtopia Core</center></h1>
- <h2><center>Qt for Embedded Linux</center></h2>
- \endraw
+ \quotation
+ \raw HTML
+ <h1><center>Qtopia Core</center></h1>
+ <h2><center>Qt for Embedded Linux</center></h2>
+ \endraw
- Qt/Embedded, the embedded Linux port of Qt, is a
- complete and self-contained C++ GUI and platform
- development tool for Linux-based embedded development.
+ Qt/Embedded, the embedded Linux port of Qt, is a
+ complete and self-contained C++ GUI and platform
+ development tool for Linux-based embedded development.
+ ...
+ \endquotation
- ...
- \endquotation
+ See also \l {title-command} {\\title}.
- See also \l {title}{\\title}.
- \endtable
*/
/*!
\page 21-0-qdoc-configuration.html
- \previouspage Title Commands
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Miscellaneous
+ \contentspage Table of Contents
\nextpage General Configuration Variables
- \title QDoc Configuration
+ \title The QDoc Configuration File
- \tableofcontents
+ Before running QDoc to to extract and format your QDOC comments,
+ you must create a QDoc configuration file to tell QDoc where to find
+ them.
\list
\o \l {Supporting Derived Projects}
- \o \l {QDoc Compatibility}
+ \o \l {Compatibility Issues}
\endlist
When running QDoc to generate the documentation, you must specify
a configuration file on the command line:
- \quotation
- \bold {/currentdirectory$ qdoc3 my-documentation.qdocconf}
- \endquotation
-
\section1 General Description
The configuration file is a list of entries of entries of the form
- \i {"variable = value"}. Using the configuration variables, you
+ \e {"variable = value"}. Using the configuration variables, you
can define where QDoc should find the various source files, images
and examples, where to put generated documentation etc. The
configuration file can also contain directives like \c
@@ -6998,7 +6770,7 @@
projects.
If some of the variable keys have the same values, they can be set
- at the same time. For example:
+ at the same time.
\code
{header, source}dirs = kernel
@@ -7020,7 +6792,7 @@
provide a variable of the latter type with several strings they
will simply be concatenated. The quotes around the value string
are optional. But applying them allows you to use special
- characters like '=' and ' \" ' within the string. For example:
+ characters like '=' and ' \" ' within the string.
\code
HTML.postheader = "<a href=\"index.html\">Home</a>"
@@ -7037,51 +6809,43 @@
\section1 Configuration Variables
- \section2 Alphabetical List
-
- \l {22-qdoc-configuration-generalvariables.html#alias}{alias},
- \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoredirectives}
- {Cpp.ignoredirectives},
- \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoretoken}
- {Cpp.ignoretokens},
- \l {22-qdoc-configuration-generalvariables.html#definesvariable}{defines},
- \l {22-qdoc-configuration-generalvariables.html#edition}{edition},
- \l {22-qdoc-configuration-generalvariables.html#exampledirs}{exampledirs},
- \l {22-qdoc-configuration-generalvariables.html#examples}{examples},
- \l {22-qdoc-configuration-generalvariables.html#examples.fileextensions}
- {examples.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#extraimages}{extraimages},
- \l {22-qdoc-configuration-generalvariables.html#falsehoods}{falsehoods},
- \l {22-qdoc-configuration-generalvariables.html#headerdirs}{headerdirs},
- \l {22-qdoc-configuration-generalvariables.html#headers}{headers},
- \l {22-qdoc-configuration-generalvariables.html#headers.fileextensions}
- {headers.fileextensions},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.footer}{HTML.footer},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.postheader}
- {HTML.postheader},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.style}{HTML.style},
- \l {22-qdoc-configuration-generalvariables.html#imagedirs}{imagedirs},
- \l {22-qdoc-configuration-generalvariables.html#images}{images},
- \l {22-qdoc-configuration-generalvariables.html#images.fileextensions}
- {images.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#language}{language},
- \l {22-qdoc-configuration-generalvariables.html#macro}{macro},
- \l {22-qdoc-configuration-generalvariables.html#outputdir}{outputdir},
- \l {22-qdoc-configuration-generalvariables.html#outputformats}
- {outputformats},
- \l {22-qdoc-configuration-generalvariables.html#outputprefixes}
- {outputprefixes},
- \l {22-qdoc-configuration-generalvariables.html#slow}{slow},
- \l {22-qdoc-configuration-generalvariables.html#sourcedirs}{sourcedirs},
- \l {22-qdoc-configuration-generalvariables.html#sources}{sources},
- \l {22-qdoc-configuration-generalvariables.html#sources.fileextensions}
- {sources.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#spurious}{spurious},
- \l {22-qdoc-configuration-generalvariables.html#tabsize}{tabsize},
- \l {22-qdoc-configuration-generalvariables.html#version}{version},
- \l {22-qdoc-configuration-generalvariables.html#versionsym}{versionsym}
-
- \section2 Categories
+ \section1 Variable List
+
+ \list
+ \o \l {22-qdoc-configuration-generalvariables.html#alias-variable} {alias}
+ \o \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoredirectives-variable} {Cpp.ignoredirectives}
+ \o \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoretokens-variable} {Cpp.ignoretokens}
+ \o \l {22-qdoc-configuration-generalvariables.html#defines-variable} {defines}
+ \o \l {22-qdoc-configuration-generalvariables.html#edition-variable} {edition}
+ \o \l {22-qdoc-configuration-generalvariables.html#exampledirs-variable} {exampledirs}
+ \o \l {22-qdoc-configuration-generalvariables.html#examples-variable} {examples}
+ \o \l {22-qdoc-configuration-generalvariables.html#examples.fileextensions-variable} {examples.fileextensions}
+ \o \l {22-qdoc-configuration-generalvariables.html#extraimages-variable} {extraimages}
+ \o \l {22-qdoc-configuration-generalvariables.html#falsehoods-variable} {falsehoods}
+ \o \l {22-qdoc-configuration-generalvariables.html#headerdirs-variable} {headerdirs}
+ \o \l {22-qdoc-configuration-generalvariables.html#headers-variable} {headers}
+ \o \l {22-qdoc-configuration-generalvariables.html#headers.fileextensions-variable} {headers.fileextensions}
+ \o \l {24-qdoc-configuration-htmlvariables.html#HTML.footer-variable} {HTML.footer}
+ \o \l {24-qdoc-configuration-htmlvariables.html#HTML.postheader-variable} {HTML.postheader}
+ \o \l {24-qdoc-configuration-htmlvariables.html#HTML.style-variable} {HTML.style}
+ \o \l {22-qdoc-configuration-generalvariables.html#imagedirs-variable} {imagedirs}
+ \o \l {22-qdoc-configuration-generalvariables.html#images-variable} {images}
+ \o \l {22-qdoc-configuration-generalvariables.html#images.fileextensions-variable} {images.fileextensions}
+ \o \l {22-qdoc-configuration-generalvariables.html#language-variable} {language}
+ \o \l {22-qdoc-configuration-generalvariables.html#macro-variable} {macro}
+ \o \l {22-qdoc-configuration-generalvariables.html#outputdir-variable} {outputdir}
+ \o \l {22-qdoc-configuration-generalvariables.html#outputformats-variable} {outputformats}
+ \o \l {22-qdoc-configuration-generalvariables.html#slow-variable} {slow}
+ \o \l {22-qdoc-configuration-generalvariables.html#sourcedirs-variable} {sourcedirs}
+ \o \l {22-qdoc-configuration-generalvariables.html#sources-variable} {sources}
+ \o \l {22-qdoc-configuration-generalvariables.html#sources.fileextensions-variable} {sources.fileextensions}
+ \o \l {22-qdoc-configuration-generalvariables.html#spurious-variable} {spurious}
+ \o \l {22-qdoc-configuration-generalvariables.html#tabsize-variable} {tabsize}
+ \o \l {22-qdoc-configuration-generalvariables.html#version-variable} {version}
+ \o \l {22-qdoc-configuration-generalvariables.html#versionsym-variable} {versionsym}
+ \endlist
+
+ \section1 Categories
\list
\o \l {General Configuration Variables}
@@ -7099,8 +6863,9 @@
/*!
\page 21-1-minimum-qdocconf.html
- \previouspage QDoc Configuration
- \contentspage QDoc Manual - Table of Contents
+ \previouspage qt.qdocconf
+ \contentspage Table of Contents
+ \nextpage Table of Contents
\title minimum.qdocconf
@@ -7109,8 +6874,9 @@
/*!
\page 21-2-qt-qdocconf.html
- \previouspage QDoc Configuration
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Compatibility Issues
+ \contentspage Table of Contents
+ \nextpage minimum.qdocconf
\title qt.qdocconf
@@ -7119,8 +6885,8 @@
/*!
\page 22-qdoc-configuration-generalvariables.html
- \previouspage QDoc Configuration
- \contentspage QDoc Manual - Table of Contents
+ \previouspage The QDoc Configuration File
+ \contentspage Table of Contents
\nextpage Creating Help Project Files
\title General Configuration Variables
@@ -7131,938 +6897,877 @@
documentation. You can also do some minor manipulation of QDoc
itself, controlling its output and processing behavior.
- \section1 Alphabetical List
-
- \l {22-qdoc-configuration-generalvariables.html#alias}{alias},
- \l {22-qdoc-configuration-generalvariables.html#codeindent}{codeindent},
- \l {22-qdoc-configuration-generalvariables.html#definesvariable}{defines},
- \l {22-qdoc-configuration-generalvariables.html#edition}{edition},
- \l {22-qdoc-configuration-generalvariables.html#exampledirs}{exampledirs},
- \l {22-qdoc-configuration-generalvariables.html#examples}{examples},
- \l {22-qdoc-configuration-generalvariables.html#examples.fileextensions}
- {examples.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#extraimages}{extraimages},
- \l {22-qdoc-configuration-generalvariables.html#falsehoods}{falsehoods},
- \l {22-qdoc-configuration-generalvariables.html#generateindex}{generateindex},
- \l {22-qdoc-configuration-generalvariables.html#headerdirs}{headerdirs},
- \l {22-qdoc-configuration-generalvariables.html#headers}{headers},
- \l {22-qdoc-configuration-generalvariables.html#headers.fileextensions}
- {headers.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#imagedirs}{imagedirs},
- \l {22-qdoc-configuration-generalvariables.html#images}{images},
- \l {22-qdoc-configuration-generalvariables.html#images.fileextensions}
- {images.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#language}{language},
- \l {22-qdoc-configuration-generalvariables.html#macro}{macro},
- \l {22-qdoc-configuration-generalvariables.html#outputdir}{outputdir},
- \l {22-qdoc-configuration-generalvariables.html#outputformats}
- {outputformats},
- \l {22-qdoc-configuration-generalvariables.html#outputprefixes}
- {outputprefixes},
- \l {22-qdoc-configuration-generalvariables.html#slow}{slow},
- \l {22-qdoc-configuration-generalvariables.html#sourcedirs}{sourcedirs},
- \l {22-qdoc-configuration-generalvariables.html#sources}{sources},
- \l {22-qdoc-configuration-generalvariables.html#sources.fileextensions}
- {sources.fileextensions},
- \l {22-qdoc-configuration-generalvariables.html#spurious}{spurious},
- \l {22-qdoc-configuration-generalvariables.html#tabsize}{tabsize},
- \l {22-qdoc-configuration-generalvariables.html#tagfile}{tagfile},
- \l {22-qdoc-configuration-generalvariables.html#version}{version},
- \l {22-qdoc-configuration-generalvariables.html#versionsym}{versionsym}
-
- \section1 Variable Descriptions
+ \target alias-variable
+ \section1 alias
- \table
+ The \c alias variable renames a QDoc command.
- \header
- \o Variable
- \o Description
+ The general syntax is \tt {alias.\e{original-command-name} = \e
+ temporary-command-name}.
- \row
- \o \bold alias \target alias
- \o \bold {The \c alias variable renames a QDoc command.}
+ \code
+ alias.i = e
+ \endcode
- The general syntax is \tt {alias.\i{original-command-name}
- = \i temporary-command-name}.
+ This renames the built-in command \\i (italics) to \\e. The \c
+ alias variable is often used for compatibility reasons; for more
+ information see the \l {Compatibility Issues} {compatibility
+ section}.
- For example:
+ See also \l {macro-command} {macro}.
- \code
- alias.i = e
- \endcode
+ \target codeindent-variable
+ \section1 codeindent
- renames the built-in command \\i (italics) to \\e.
+ The \c codeindent variable specifies the level of indentation that
+ QDoc uses when writing code snippets.
- The \c alias variable is often used for compatibility
- reasons; for more information see the \l {QDoc
- Compatibility}{compatibility section}.
+ QDoc originally used a hard-coded value of four spaces for code
+ indentation to ensure that code snippets could be easily
+ distinguished from surrounding text. Since we can use \l{HTML
+ Specific Configuration Variables#HTML.stylesheets} {stylesheets}
+ to adjust the appearance of certain types of HTML elements, this
+ level of indentation is not always required.
- See also \l macro.
+ \target defines-variable
+ \section1 defines
- \row
- \o \bold codeindent \target codeindent
- \o \bold {The \c codeindent variable specifies the level of
- indentation that QDoc uses when writing code snippets.}
+ The \c defines variable specifies the C++ preprocessor symbols
+ that QDoc will recognize and respond to.
- QDoc originally used a hard-coded value of four spaces for
- code indentation to ensure that code snippets could be easily
- distinguished from surrounding text. Since we can use
- \l{HTML Specific Configuration Variables#HTML.stylesheets}{stylesheets} to
- adjust the appearance of certain types of HTML elements, this
- level of indentation is not always required.
+ When a preprocessor symbol is specified using the \c defines
+ variable, you can also use the \l {if-command} {\\if} command to
+ enclose documentation that only will be included if the
+ preprocessor symbol is defined.
- \row
- \o \bold defines \target definesvariable
- \o \bold {The \c defines variable specifies the C++ preprocessor
- symbols that QDoc will recognize and respond to.}
+ The values of the variable are regular expressions (see QRegExp
+ for details). By default, no symbol is defined, meaning that code
+ protected with #ifdef...#endif will be ignored.
- When a preprocessor symbol is specified using the \c
- defines variable, you can also use the \l {if}{\\if}
- command to enclose documentation that only will be included
- if the preprocessor symbol is defined.
+ \code
+ defines = Q_QDOC \
+ QT_.*_SUPPORT \
+ QT_.*_LIB \
+ QT_COMPAT \
+ QT3_SUPPORT \
+ Q_WS_.* \
+ Q_OS_.* \
+ Q_BYTE_ORDER \
+ __cplusplus
+ \endcode
- The values of the variable are regular expressions (see
- QRegExp for details). By default, no symbol is defined,
- meaning that code protected with #ifdef...#endif will be
- ignored.
+ This ensures that QDoc will process the code that requires these
+ symbols to be defined. For example:
- For example:
+ \code
+ #ifdef Q_WS_WIN
+ HDC getDC() const;
+ void releaseDC(HDC) const;
+ #endif
+ \endcode
- \code
- defines = Q_QDOC \
- QT_.*_SUPPORT \
- QT_.*_LIB \
- QT_COMPAT \
- QT3_SUPPORT \
- Q_WS_.* \
- Q_OS_.* \
- Q_BYTE_ORDER \
- __cplusplus
- \endcode
+ Since the Q_WS_.* regular expression (specified using the \c
+ defines variable) matches Q_WS_WIN, QDoc will process the code
+ within #ifdef and #endif in our example.
- ensures that QDoc will process the code that requires these
- symbols to be defined. For example:
+ You can also define preprocessor symbols manually on the command
+ line using the -D option. For example:
- \code
- #ifdef Q_WS_WIN
- HDC getDC() const;
- void releaseDC(HDC) const;
- #endif
- \endcode
+ \code
+ currentdirectory$ qdoc3 -Dconsoleedition qt.qdocconf
+ \endcode
- Since the Q_WS_.* regular expression (specified using the
- \c defines variable) matches Q_WS_WIN, QDoc will process
- the code within #ifdef and #endif in our example.
+ In this case the -D option ensures that the \c consoleedition
+ preprocessor symbol is defined when QDoc processes the source
+ files defined in the qt.qdocconf file.
- You can also define preprocessor symbols manually on the
- command line using the -D option. For example:
+ See also \l {falsehoods-variable} {falsehoods} and \l {if-command} {\\if}.
- \code
- currentdirectory$ qdoc3 -Dconsoleedition qt.qdocconf
- \endcode
+ \target edition-variable
+ \section1 edition
- In this case the -D option ensures that the \c
- consoleedition preprocessor symbol is defined when QDoc
- processes the source files defined in the qt.qdocconf file.
+ The \c edition variable specifies which modules are included in
+ each edition of a package, and provides QDoc with information to
+ provide class lists for each edition.
- See also \l falsehoods and \l {if}{\\if}.
+ This feature is mostly used when providing documentation for Qt
+ packages.
- \row
- \o \bold edition \target edition
- \o \bold {The \c edition variable specifies which modules are
- included in each edition of a package, and provides QDoc
- with information to provide class lists for each edition.}
+ The \c edition variable is always used with a particular edition
+ name to define the modules for that edition:
- This feature is mostly used when providing documentation
- for Qt packages.
+ \code
+ edition.Console = QtCore QtNetwork QtSql QtXml
+ edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtXml \
+ QtDesigner QtAssistant Qt3Support QAxContainer \
+ QAxServer
+ edition.DesktopLight = QtCore QtGui Qt3SupportLight
+ \endcode
- The \c edition variable is always used with a particular
- edition name to define the modules for that edition:
+ In the above examples, the \c Console edition only includes the
+ contents of four modules. Only the classes from these modules will
+ be used when the \l{Miscellaneous#generatelist-command}
+ {generatelist} command is used to generate a list of classes for
+ this edition:
- \code
- edition.Console = QtCore QtNetwork QtSql QtXml
- edition.Desktop = QtCore QtGui QtNetwork QtOpenGL QtSql QtXml \
- QtDesigner QtAssistant Qt3Support QAxContainer \
- QAxServer
- edition.DesktopLight = QtCore QtGui Qt3SupportLight
- \endcode
+ \code
+ \generatelist{classesbyedition Console}
+ \endcode
- In the above examples, the \c Console edition only includes
- the contents of four modules. Only the classes from these
- modules will be used when the
- \l{Miscellaneous Commands#generatelist}{generatelist} command
- is used to generate a list of classes for this edition:
+ \target exampledirs-variable
+ \section1 exampledirs
- \code
- \generatelist{classesbyedition Console}
- \endcode
+ The \c exampledirs variable specifies the directories containing
+ the source code of the example files.
- \row
- \o \bold exampledirs \target exampledirs
- \o \bold {The \c exampledirs variable specifies the directories
- containing the source code of the example files.}
+ The \l {examples-variable} {examples} {examples} and \l
+ {exampledirs-variable} {exampledirs} variables are used by the \l
+ {quotefromfile-command} {\\quotefromfile}, \l {quotefile-command}
+ {\\quotefile} and \l {example-command} {\\example} commands. If
+ both the \l {examples-variable} {examples} and \l
+ {exampledirs-variable} {exampledirs} variables are defined, QDoc
+ will search in both, first in \l {examples-variable} {examples}
+ then in \l {exampledirs-variable} {exampledirs}.
- The \l {examples}{\c examples} and \c exampledirs variables
- are used by the \l {quotefromfile}{\\quotefromfile}, \l
- {quotefile}{\\quotefile} and \l {example}{\\example}
- commands. If both the \l {examples}{\c examples} and \c
- exampledirs variables are defined, QDoc will search in
- both, first in \l {examples}{\c examples} then in \c
- exampledirs.
+ QDoc will search through the directories in the specified order,
+ and accept the first matching file it finds. It will only search
+ in the specified directories, \e not in subdirectories.
- QDoc will search through the directories in the specified
- order, and accept the first matching file it finds. It will
- only search in the specified directories, \i not in
- subdirectories.
+ \code
+ exampledirs = $QTDIR/doc/src \
+ $QTDIR/examples \
+ $QTDIR \
+ $QTDIR/qmake/examples
- For example:
+ examples = $QTDIR/examples/widgets/analogclock/analogclock.cpp
+ \endcode
- \code
- exampledirs = $QTDIR/doc/src \
- $QTDIR/examples \
- $QTDIR \
- $QTDIR/qmake/examples
+ When processing
- examples = $QTDIR/examples/widgets/analogclock/analogclock.cpp
- \endcode
+ \code
+ \quotefromfile widgets/calculator/calculator.cpp
+ \endcode
- When processing
+ QDoc will then see if there exists a file called \c calculator.cpp
+ listed as a value in the \l {examples} {\c examples} variable. If
+ it doesn't, it will search in the \c exampledirs variable, and
+ first see if there exists a file called
- \code
- \quotefromfile widgets/calculator/calculator.cpp
- \endcode
+ \code
+ $QTDIR/doc/src/widgets/calculator/calculator.cpp
+ \endcode
- QDoc will then see if there exists a file called \c
- calculator.cpp listed as a value in the \l {examples}{\c
- examples} variable. If it doesn't, it will search in the \c
- exampledirs variable, and first see if there exists a file
- called
+ If it doesn't, QDoc will continue looking for a file called
- \code
- $QTDIR/doc/src/widgets/calculator/calculator.cpp
- \endcode
+ \code
+ $QTDIR/examples/widgets/calculator/calculator.cpp
+ \endcode
- If it doesn't, QDoc will continue looking for a file
- called
+ and so forth.
- \code
- $QTDIR/examples/widgets/calculator/calculator.cpp
- \endcode
+ See also \l examples.
- and so forth.
+ \target examples-variable
+ \section1 examples
- See also \l examples.
+ The \c examples variable allows you to specify individual example
+ files in addition to those located in the directories specified by
+ the \l {exampledirs-variable} {\c exampledirs} variable.
- \row
- \o \bold examples \target examples
- \o \bold {The \c examples variable allows you to specify individual
- example files in addition to those located in the directories
- specified by the \l {exampledirs}{\c exampledirs} variable.}
-
- The \c examples and \l {exampledirs}{\c exampledirs}
- variables are used by the \l
- {quotefromfile}{\\quotefromfile}, \l
- {quotefile}{\\quotefile} and \l {example}{\\example}
- commands. If both the \c examples and \l {exampledirs}{\c
- exampledirs} variables are defined, QDoc will search in
- both, first in \c examples then in \l {exampledirs}{\c
- exampledirs}.
-
- QDoc will search through the values listed for the \c
- examples variable, in the specified order, and accept
- the first one it finds.
-
- For an extensive example, see the \l {exampledirs}{\c
- exampledirs} command. But note that if you know the file is
- listed in the \c examples variable, you don't need to
- specify its path:
+ The \c examples and \l {exampledirs-variable} {\c exampledirs}
+ variables are used by the \l {quotefromfile-command}
+ {\\quotefromfile}, \l {quotefile-command} {\\quotefile} and \l
+ {example} {\\example} commands. If both the \c examples and \l
+ {exampledirs-variable} {\c exampledirs} variables are defined,
+ QDoc will search in both, first in \c examples then in \l
+ {exampledirs-variable} {\c exampledirs}.
- \code
- \quotefromfile calculator.cpp
- \endcode
+ QDoc will search through the values listed for the \c examples
+ variable, in the specified order, and accept the first one it
+ finds.
- See also \l exampledirs.
+ For an extensive example, see the \l {exampledirs-variable} {\c
+ exampledirs} command. But note that if you know the file is listed
+ in the \c examples variable, you don't need to specify its path:
- \row
- \o \bold examples.fileextensions \target examples.fileextensions
- \o \bold {The \c examples.fileextensions variable specifies the
- file extensions that qdoc will look for when collecting example
- files for display in the documentation.}
+ \code
+ \quotefromfile calculator.cpp
+ \endcode
- The default extensions are *.cpp, *.h, *.js, *.xq, *.svg, *.xml
- and *.ui. However, if
+ See also \l {exampledirs-variable} {exampledirs}.
- The extensions are given as standard wildcard expressions.
- You can add a file extension to the filter using '+='. For
- example:
+ \target examples.fileextensions-variable
+ \section1 examples.fileextensions
- \code
- examples.fileextensions += *.qrc
- \endcode
+ The \c examples.fileextensions variable specifies the file
+ extensions that qdoc will look for when collecting example files
+ for display in the documentation.
- See also \l{headers.fileextensions}.
+ The default extensions are *.cpp, *.h, *.js, *.xq, *.svg, *.xml
+ and *.ui. However, if
- \row
- \o \bold extraimages \target extraimages
- \o \bold {The \c extraimages variable tells QDoc to incorporate
- specific images in the generated documentation.}
+ The extensions are given as standard wildcard expressions. You
+ can add a file extension to the filter using '+='. For example:
- QDoc will not recognize images used within HTML (or any
- other markup language). If we want the images to be copied
- from the directories specified by \l {imagedirs}{\c
- imagedirs} (the images in question must be located in these
- directories) to the output directory, we must specify the
- images using the \c extraimages variable.
+ \code
+ examples.fileextensions += *.qrc
+ \endcode
- The general syntax is \tt {extraimages.\i{format} = \i
- image}. The file extension is optional.
+ See also \l{headers.fileextensions}.
- For example, in \l qt.qdocconf we use a couple of images
- within the HTML.postheader variable which value is pure
- HTML. For that reason, these images are specified using the
- \c extraimages variable:
+ \target extraimages-variable
+ \section1 extraimages
- \code
- extraimages.HTML = qt-logo
- \endcode
+ The \c extraimages variable tells QDoc to incorporate specific
+ images in the generated documentation.
- See also \l images and \l imagedirs.
+ QDoc will not recognize images used within HTML (or any other
+ markup language). If we want the images to be copied from the
+ directories specified by \l {imagedirs} {\c imagedirs} (the images
+ in question must be located in these directories) to the output
+ directory, we must specify the images using the \c extraimages
+ variable.
- \row
- \o \bold falsehoods \target falsehoods
- \o \bold {The \c falsehoods variable defines the truth value of
- specified preprocessor symbols as false.}
+ The general syntax is \tt {extraimages.\e{format} = \e image}. The
+ file extension is optional.
- If this variable is not set for a preprocessor symbol, QDoc
- assumes its truth value is true. The exception is '0',
- which value always is false.
+ For example, in \l qt.qdocconf we use a couple of images within
+ the HTML.postheader variable which value is pure HTML. For that
+ reason, these images are specified using the \c extraimages
+ variable:
- QDoc will recognize, and is able to evaluate, the following
- preprocessor syntax:
+ \code
+ extraimages.HTML = qt-logo
+ \endcode
- \code
- #ifdef NOTYET
- ...
- #endif
+ See also \l images and \l imagedirs.
- #if defined (NOTYET)
- ...
- #end if
- \endcode
+ \target falsehoods-variable
+ \section1 falsehoods
- However, faced with unknown syntax like
+ The \c falsehoods variable defines the truth value of specified
+ preprocessor symbols as false.
- \code
- #if NOTYET
- ...
- #endif
- \endcode
+ If this variable is not set for a preprocessor symbol, QDoc
+ assumes its truth value is true. The exception is '0', which value
+ always is false.
- QDoc will evaluate it as true by default, \i unless the
- preprocessor symbol is specified within the \c falsehoods
- variable entry:
+ QDoc will recognize, and is able to evaluate, the following
+ preprocessor syntax:
- \code
- falsehoods = NOTYET
- \endcode
+ \code
+ #ifdef NOTYET
+ ...
+ #endif
- See also \l defines.
+ #if defined (NOTYET)
+ ...
+ #end if
+ \endcode
- \row
- \o \bold generateindex \target generateindex
- \o \bold{The \c generateindex variable contains a boolean value that
- specifies whether to generate an index file when HTML documentation
- is generated.}
-
- By default, an index file is always generated with HTML documentation,
- so this variable is typically only used when disabling this feature
- (by setting the value to \c false) or when enabling index generation
- for the WebXML output (by setting the value to \c true).
- \row
- \o \bold headerdirs \target headerdirs
- \o \bold {The \c headerdirs variable specifies the directories
- containing the header files associated with the \c .cpp source
- files used in the documentation.}
+ However, faced with unknown syntax like
- For example:
+ \code
+ #if NOTYET
+ ...
+ #endif
+ \endcode
- \code
- headerdirs = $QTDIR/src \
- $QTDIR/extensions/activeqt \
- $QTDIR/extensions/motif \
- $QTDIR/tools/designer/src/lib/extension \
- $QTDIR/tools/designer/src/lib/sdk \
- $QTDIR/tools/designer/src/lib/uilib
- \endcode
+ QDoc will evaluate it as true by default, \e unless the
+ preprocessor symbol is specified within the \c falsehoods variable
+ entry:
- When executed, the first QDoc will do is to read through
- the headers specified in the \l {headers}{\c headers}
- variable, and the ones located in the directories specified
- in the \c headerdir variable (including all
- subdirectories), building an internal structure of the
- classes and their functions.
-
- Then it will read through the sources specified in the \l
- {sources}{\c sources}, and the ones located in the
- directories specified in the \l {sourcedirs}{\c sourcedirs}
- varible (including all subdirectories), merging the
- documentation with the structure it retrieved from the
- header files.
-
- If both the \c headers and \c headerdirs variables are
- defined, QDoc will read through both, first \l {headers}{\c
- headers} then \c headerdirs.
-
- In the specified directories, QDoc will only read the files
- with the fileextensions specified in the \l
- {headers.fileextensions}{\c headers.fileextensions}
- variable. The default extensions are *.ch, *.h, *.h++,
- *.hh, *.hpp and *.hxx". The files specified by \l
- {headers}{\c headers} will be read independent of their
- fileextensions.
-
- See also \l headers and \l headers.fileextensions.
+ \code
+ falsehoods = NOTYET
+ \endcode
- \row
- \o \bold headers \target headers
- \o \bold {The \c headers variable allows you to specify individual
- header files in addition to those located in the directories
- specified by the \l {headerdirs}{\c headerdirs} variable.}
+ See also \l defines.
- For example:
+ \target generateindex-variable
+ \section1 generateindex
- \code
- headers = $QTDIR/src/gui/widgets/qlineedit.h \
- $QTDIR/src/gui/widgets/qpushbutton.h
- \endcode
+ The \c generateindex variable contains a boolean value that
+ specifies whether to generate an index file when HTML
+ documentation is generated.
- When processing the \c headers variable, QDoc behaves in the
- same way as it does when processing the \l {headerdirs}{\c
- headerdirs} variable. For more information, see the \l
- {headerdirs}{\c headerdirs} variable.
+ By default, an index file is always generated with HTML
+ documentation, so this variable is typically only used when
+ disabling this feature (by setting the value to \c false) or when
+ enabling index generation for the WebXML output (by setting the
+ value to \c true).
- See also \l headerdirs.
+ \target headerdirs-variable
+ \section1 headerdirs
- \row
- \o \bold headers.fileextensions \target headers.fileextensions
- \o \bold {The \c headers.fileextensions variable specify the
- extension used by the headers.}
+ The \c headerdirs variable specifies the directories containing
+ the header files associated with the \c .cpp source files used in
+ the documentation.
- When processing the header files specified in the \l
- {headerdirs}{\c headerdirs} variable, QDoc will only read
- the files with the fileextensions specified in the \c
- headers.fileextensions variable. In this way QDoc avoid
- spending time reading irrelevant files.
+ \code
+ headerdirs = $QTDIR/src \
+ $QTDIR/extensions/activeqt \
+ $QTDIR/extensions/motif \
+ $QTDIR/tools/designer/src/lib/extension \
+ $QTDIR/tools/designer/src/lib/sdk \
+ $QTDIR/tools/designer/src/lib/uilib
+ \endcode
- The default extensions are *.ch, *.h, *.h++, *.hh, *.hpp
- and *.hxx.
+ When executed, the first QDoc will do is to read through the
+ headers specified in the \l {headers} {\c headers} variable, and
+ the ones located in the directories specified in the \c headerdir
+ variable (including all subdirectories), building an internal
+ structure of the classes and their functions.
- The extensions are given as standard wildcard expressions.
- You can add a file extension to the filter using '+='. For
- example:
+ Then it will read through the sources specified in the \l
+ {sources-variable} {\c sources}, and the ones located in the
+ directories specified in the \l {sourcedirs-variable} {\c
+ sourcedirs} varible (including all subdirectories), merging the
+ documentation with the structure it retrieved from the header
+ files.
- \code
- header.fileextensions += *.H
- \endcode
+ If both the \c headers and \c headerdirs variables are defined,
+ QDoc will read through both, first \l {headers} {\c headers} then
+ \c headerdirs.
- \warning The above assignment may not work as described.
+ In the specified directories, QDoc will only read the files with
+ the fileextensions specified in the \l {headers.fileextensions}
+ {\c headers.fileextensions} variable. The default extensions are
+ *.ch, *.h, *.h++, *.hh, *.hpp and *.hxx". The files specified by
+ \l {headers} {\c headers} will be read independent of their
+ fileextensions.
- See also \l headerdirs.
+ See also \l headers and \l headers.fileextensions.
- \row
- \o \bold imagedirs \target imagedirs
- \o \bold {The \c imagedirs variable specifies the directories
- containing the images used in the documentation.}
+ \target headers-variable
+ \section1 headers
- The \l {images}{\c images} and \c imagedirs variables are
- used by the \l {image}{\\image} and \l
- {inlineimage}{\\inlineimage} commands. If both the \l
- {images}{\c images} and \c imagedirs variables are defined,
- QDoc will search in both, first in \l {images}{\c images}
- then in \c imagedirs.
+ The \c headers variable allows you to specify individual header
+ files in addition to those located in the directories specified by
+ the \l {headerdirs} {\c headerdirs} variable.
- QDoc will search through the directories in the specified
- order, and accept the first matching file it finds. It will
- only search in the specified directories, \i not in
- subdirectories.
+ \code
+ headers = $QTDIR/src/gui/widgets/qlineedit.h \
+ $QTDIR/src/gui/widgets/qpushbutton.h
+ \endcode
- For example:
+ When processing the \c headers variable, QDoc behaves in the same
+ way as it does when processing the \l {headerdirs} {\c headerdirs}
+ variable. For more information, see the \l {headerdirs} {\c
+ headerdirs} variable.
- \code
- imagedirs = $QTDIR/doc/src/images \
- $QTDIR/examples
+ See also \l headerdirs.
- images = $QTDIR/doc/src/images/calculator-example.png
- \endcode
+ \target headers.fileextensions-variable
+ \section1 headers.fileextensions
- When processing
+ The \c headers.fileextensions variable specify the extension used
+ by the headers.
- \code
- \image calculator-example.png
- \endcode
+ When processing the header files specified in the \l {headerdirs}
+ {\c headerdirs} variable, QDoc will only read the files with the
+ fileextensions specified in the \c headers.fileextensions
+ variable. In this way QDoc avoid spending time reading irrelevant
+ files.
- QDoc will then see if there exists a file called
- calculator-example.png listed as a value in the \c images
- variable. If it doesn't, it will search in the \c imagedirs
- variable, and first see if there exists a file called
+ The default extensions are *.ch, *.h, *.h++, *.hh, *.hpp and
+ *.hxx.
- \code
- $QTDIR/doc/src/images/calculator-example.png
- \endcode
+ The extensions are given as standard wildcard expressions. You
+ can add a file extension to the filter using '+='. For example:
- If it doesn't, QDoc will look for a file called
+ \code
+ header.fileextensions += *.H
+ \endcode
- \code
- $QTDIR/examples/calculator-example.png
- \endcode
+ \warning The above assignment may not work as described.
- You can filter the images in an image directory using the
- \l {images.fileextensions}{\c images.fileextensions}
- variable. The general idea behind the \l
- {images.fileextensions}{\c images.fileextensions} variable
- is to enable different image format for different output
- format.
+ See also \l headerdirs.
- \warning The \l {images.fileextensions}{\c
- images.fileextensions} variable's functionality is
- preliminay since QDoc at this point only support HTML.
+ \target imagedirs-variable
+ \section1 imagedirs
- See also \l images and \l images.fileextensions.
+ The \c imagedirs variable specifies the directories containing the
+ images used in the documentation.
- \row
- \o \bold images \target images
- \o \bold {The \c images variable allows you to specify individual
- image files in addition to those located in the directories
- specified by the \l {imagedirs}{\c imagedirs} variable.}
+ The \l {images} {\c images} and \c imagedirs variables are used by
+ the \l {image-command} {\\image} and \l {inlineimage-command}
+ {\\inlineimage} commands. If both the \l {images} {\c images} and
+ \c imagedirs variables are defined, QDoc will search in both,
+ first in \l {images} {\c images} then in \c imagedirs.
- For example:
+ QDoc will search through the directories in the specified order,
+ and accept the first matching file it finds. It will only search
+ in the specified directories, \e not in subdirectories.
- \code
- images = $QTDIR/doc/src/images/calculator-example.png
- \endcode
+ \code
+ imagedirs = $QTDIR/doc/src/images \
+ $QTDIR/examples
- When processing the \c images variable, QDoc behaves in the
- same way as it does when processing the \l {imagedirs}{\c
- imagedirs} variable. For more information, see the \l
- {imagedirs}{\c imagedirs} variable.
+ images = $QTDIR/doc/src/images/calculator-example.png
+ \endcode
- See also \l imagedirs and \l images.fileextensions.
+ When processing
- \row
- \o \bold images.fileextensions \target images.fileextensions
- \o \bold {The images.fileextensions variable filters the files within
- an image directory.}
+ \code
+ \image calculator-example.png
+ \endcode
- The variable's values (the extensions) are given as
- standard wildcard expressions. The general syntax is: \tt
- {images.fileextensions.\i{format} = *.\i{extension}}.
+ QDoc will then see if there exists a file called
+ calculator-example.png listed as a value in the \c images
+ variable. If it doesn't, it will search in the \c imagedirs
+ variable, and first see if there exists a file called
- The idea is to enable different image format for different
- output format. For example:
+ \code
+ $QTDIR/doc/src/images/calculator-example.png
+ \endcode
- \code
- images.fileextensions.HTML = *.png
- images.fileextensions.LOUT = *.eps
- \endcode
+ If it doesn't, QDoc will look for a file called
- Then, when processing the \l {image}{\\image} and \l
- {inlineimage}{\\inlineimage} commands, QDoc will only
- search for files with extensions specified in the output
- format's associated image extension variable.
+ \code
+ $QTDIR/examples/calculator-example.png
+ \endcode
- \warning This is preliminary functionality since QDoc at
- this point only support HTML.
+ You can filter the images in an image directory using the \l
+ {images.fileextensions} {\c images.fileextensions} variable. The
+ general idea behind the \l {images.fileextensions} {\c images.fileextensions}
+ variable is to enable different image format for different output format.
- The default extensions for HTML are *.png, *.jpg, *.jpeg
- and *.gif.
+ \warning The \l {images.fileextensions} {\c images.fileextensions}
+ variable's functionality is preliminay since QDoc at this point
+ only support HTML.
- You can add a file extension to the filter using '+='. For
- example:
+ See also \l images and \l images.fileextensions.
- \code
- images.fileextensions.HTML += *.eps
- \endcode
+ \target images-variable
+ \section1 images
- See also \l imagedirs and \l images.
+ The \c images variable allows you to specify individual image
+ files in addition to those located in the directories specified by
+ the \l {imagedirs} {\c imagedirs} variable.
- \row
- \o \bold language \target language
- \o \bold {The \c language variable specifies the language of the
- source code that is used in the documentation.}
+ \code
+ images = $QTDIR/doc/src/images/calculator-example.png
+ \endcode
- Currently, C++ is the only language that QDoc
- understands. It is also the default language, and doesn't
- really need to be specified. But for example in \l
- qt.qdocconf:
+ When processing the \c images variable, QDoc behaves in the same
+ way as it does when processing the \l {imagedirs} {\c imagedirs}
+ variable. For more information, see the \l {imagedirs} {\c
+ imagedirs} variable.
- \code
- language = Cpp
- \endcode
+ See also \l imagedirs and \l images.fileextensions.
- identifies the language of the Qt source code as C++.
+ \target images.fileextensions-variable
+ \section1 images.fileextensions
- \row
- \o \bold macro \target macro
- \o \bold {The \c macro variable can be used to create your
- own QDoc commands.}
+ The images.fileextensions variable filters the files within an
+ image directory.
- The general syntax is \tt {macro.\i{command} =
- "\i{definition}}". The definition can be described using
- QDoc syntax. In addition it is possible to provide an HTML
- definition by appending .HTML to the variable.
+ The variable's values (the extensions) are given as standard
+ wildcard expressions. The general syntax is: \tt
+ {images.fileextensions.\e{format} = *.\e{extension}}.
- For example in \l qt.qdocconf:
+ The idea is to enable different image format for different output
+ format.
- \code
- macro.gui = "\\bold"
- macro.raisedaster.HTML = "<sup>*</sup>"
- \endcode
+ \code
+ images.fileextensions.HTML = *.png
+ images.fileextensions.LOUT = *.eps
+ \endcode
- makes sure that the \\gui command renders its argument using a
- bold font, and that \\raisedaster renders a '*'.
+ Then, when processing the \l {image-command} {\\image} and \l
+ {inlineimage-command} {\\inlineimage} commands, QDoc will only
+ search for files with extensions specified in the output format's
+ associated image extension variable.
- \row
- \o \bold naturallanguage \target naturallanguage
- \o \bold {The \c naturallanguage variable specifies the natural
- language used for the documentation generated by qdoc.}
+ \warning This is preliminary functionality since QDoc at this
+ point only support HTML.
- For example:
+ The default extensions for HTML are *.png, *.jpg, *.jpeg and
+ *.gif.
- \code
- naturallanguage = zh-Hans
- \endcode
+ You can add a file extension to the filter using '+='. For
+ example:
- By default, the natural language is \c en for compatibility
- with legacy documentation.
+ \code
+ images.fileextensions.HTML += *.eps
+ \endcode
- qdoc will add the natural language information to the HTML
- it generates, using the \c lang and \c xml:lang attributes.
+ See also \l imagedirs and \l images.
- See also \l sourceencoding, \l outputencoding,
- \l{http://www.w3.org/TR/xhtml1/#C_7}{C.7. The lang and xml:lang Attributes} and
- \l{http://www.w3.org/TR/i18n-html-tech-lang/#ri20040429.113217290}{Best Practice 13: Using Hans and Hant codes}.
+ \target language-variable
+ \section1 language
- \row
- \o \bold outputdir \target outputdir
- \o \bold {The \c outputdir variable specifies the directory
- where QDoc will put the generated documentation.}
+ The \c language variable specifies the language of the source code
+ that is used in the documentation.
- In qt.qdocconf:
+ Currently, C++ is the only language that QDoc understands. It is
+ also the default language, and doesn't really need to be
+ specified. But for example in \l qt.qdocconf:
- \code
- outputdir = $QTDIR/doc/html
- \endcode
+ \code
+ language = Cpp
+ \endcode
- locates the generated Qt reference documentation in
- $QTDIR/doc/html. For example, the documentation of the
- QWidget class is located in
+ identifies the language of the Qt source code as C++.
- \code
- $QTDIR/doc/html/qwidget.html
- \endcode
+ \target macro-variable
+ \section1 macro
- The associated images will be put in an \c images subdirectory.
+ The \c macro variable can be used to create your own QDoc
+ commands.
- \warning When running QDoc multiple times using the same output
- directory, all files from the previous run will be lost.
+ The general syntax is \tt {macro.\e{command} =
+ "\e{definition}}". The definition can be described using QDoc
+ syntax. In addition it is possible to provide an HTML definition
+ by appending .HTML to the variable.
- \row
- \o \bold outputencoding \target outputencoding
- \o \bold {The \c outputencoding variable specifies the encoding
- used for the documentation generated by qdoc.}
+ For example in \l qt.qdocconf:
- For example:
+ \code
+ macro.gui = "\\bold"
+ macro.raisedaster.HTML = "<sup>*</sup>"
+ \endcode
- \code
- outputencoding = UTF-8
- \endcode
+ makes sure that the \\gui command renders its argument using a
+ bold font, and that \\raisedaster renders a '*'.
- By default, the output encoding is \c ISO-8859-1 (Latin1) for
- compatibility with legacy documentation. When generating
- documentation for some languages, particularly non-European
- languages, this is not sufficient and an encoding such as UTF-8
- is required.
+ \target naturallanguage-variable
+ \section1 naturallanguage
- qdoc will encode HTML using this encoding and generate the
- correct declarations to indicate to browsers which encoding
- is being used. The \l naturallanguage configuration variable
- should also be specified to provide browsers with a complete
- set of character encoding and language information.
+ The \c naturallanguage variable specifies the natural language
+ used for the documentation generated by qdoc.
- See also \l outputencoding and \l naturallanguage.
+ \code
+ naturallanguage = zh-Hans
+ \endcode
- \row
- \o \bold outputformats \target outputformats
- \o \bold {The \c outputformats variable specifies the format of
- the generated documentation.}
+ By default, the natural language is \c en for compatibility with
+ legacy documentation.
- Currently, QDoc only supports the HTML format. It is also
- the default format, and doesn't need to be specified.
+ qdoc will add the natural language information to the HTML it
+ generates, using the \c lang and \c xml:lang attributes.
- \row
- \o \bold outputprefixes \target outputprefixes
- \o \bold {The \c outputprefixes variable specifies a mapping between
- types of files and the prefixes to prepend to the HTML file names
- in the generated documentation.}
+ See also \l {sourceencoding-variable} {sourceencoding},
+ \l {outputencoding-variable} {outputencoding},
+ \l{http://www.w3.org/TR/xhtml1/#C_7}
+ {C.7. The lang and xml:lang Attributes} and
+ \l{http://www.w3.org/TR/i18n-html-tech-lang/#ri20040429.113217290}
+ {Best Practice 13: Using Hans and Hant codes}.
- For example:
+ \target outputdir-variable
+ \section1 outputdir
- \code
- outputprefixes = QML
- outputprefixes.QML = qt-components-
- \endcode
+ The \c outputdir variable specifies the directory where QDoc will
+ put the generated documentation.
- Be default, files containing the API documentation for QML elements
- or components are prefixed with "qml-". In the above example, the
- prefix "qt-components-" is used instead.
+ In qt.qdocconf:
- \row
- \o \bold qhp \target qhp
- \o \bold{The \c qhp variable is used to define the information to be
- written out to Qt Help Project (\c{qhp}) files.}
+ \code
+ outputdir = $QTDIR/doc/html
+ \endcode
- See the \l{Creating Help Project Files} chapter for information
- about this process.
+ locates the generated Qt reference documentation in
+ $QTDIR/doc/html. For example, the documentation of the QWidget
+ class is located in
- \row
- \o \bold slow (removed) \target slow
- \o \bold {The \c slow variable previously specified whether QDoc should
- do time-consuming processing, such as syntax highlighting.}
+ \code
+ $QTDIR/doc/html/qwidget.html
+ \endcode
- This option has been replaced by the \l{syntaxhighlighing} option.
+ The associated images will be put in an \c images subdirectory.
- For compatibility, the \c -slow command-line option has been
- retained. This has the effect of enabling syntax highlighting.
+ \warning When running QDoc multiple times using the same output
+ directory, all files from the previous run will be lost.
- \row
- \o \bold sourcedirs \target sourcedirs
- \o \bold {The \c sourcedirs variable specifies the directories
- containing the \c .cpp or \c .qdoc files used in
- the documentation.}
+ \target outputencoding-variable
+ \section1 outputencoding
- For example in \l qt.qdocconf
+ The \c outputencoding variable specifies the encoding used for the
+ documentation generated by qdoc.
- \code
- sourcedirs = $QTDIR/src \
- $QTDIR/doc/src \
- $QTDIR/extensions/activeqt \
- $QTDIR/extensions/motif \
- $QTDIR/tools/designer/src/lib/extension \
- $QTDIR/tools/designer/src/lib/sdk \
- $QTDIR/tools/designer/src/lib/uilib
- \endcode
+ \code
+ outputencoding = UTF-8
+ \endcode
- When executed, the first QDoc will do is to read through
- the headers specified in the \l {header}{\c header}
- variable, and the ones located in the directories specified
- in the \c headerdir variable (including all
- subdirectories), building an internal structure of the
- classes and their functions.
-
- Then it will read through the sources specified in the \l
- {sources}{\c sources}, and the ones located in the
- directories specified in the \l {sourcedirs}{\c sourcedirs}
- varible (including all subdirectories), merging the
- documentation with the structure it retrieved from the
- header files.
-
- If both the \c sources and \c sourcedirs variables are
- defined, QDoc will read through both, first \l {sources}{\c
- sources} then \c sourcedirs.
-
- In the specified directories, QDoc will only read the files
- with the fileextensions specified in the \l
- {sources.fileextensions}{\c sources.fileextensions}
- variable. The default extensions are *.c++, *.cc, *.cpp and
- *.cxx. The files specified by \l {sources}{\c sources} will
- be read independent of their fileextensions.
-
- See also \l sources and \l sources.fileextensions.
+ By default, the output encoding is \c ISO-8859-1 (Latin1) for
+ compatibility with legacy documentation. When generating
+ documentation for some languages, particularly non-European
+ languages, this is not sufficient and an encoding such as UTF-8 is
+ required.
- \row
- \o \bold sourceencoding \target sourceencoding
- \o \bold {The \c sourceencoding variable specifies the encoding
- used for the source code and documentation.}
+ qdoc will encode HTML using this encoding and generate the correct
+ declarations to indicate to browsers which encoding is being
+ used. The \l naturallanguage configuration variable should also be
+ specified to provide browsers with a complete set of character
+ encoding and language information.
- For example:
+ See also \l outputencoding and \l naturallanguage.
- \code
- sourceencoding = UTF-8
- \endcode
+ \target outputformats-variable
+ \section1 outputformats
- By default, the source encoding is \c ISO-8859-1 (Latin1) for
- compatibility with legacy documentation. For some languages,
- particularly non-European languages, this is not sufficient
- and an encoding such as UTF-8 is required.
+ The \c outputformats variable specifies the format of
+ the generated documentation.
- Although qdoc will use the encoding to read source and
- documentation files, limitations of C++ compilers may prevent
- you from using non-ASCII characters in source code comments.
- In cases like these, it is possible to write API documentation
- completely in documentation files.
+ Currently, QDoc only supports the HTML format. It is also
+ the default format, and doesn't need to be specified.
- See also \l naturallanguage and \l outputencoding.
+ \target outputprefixes
+ \section1 outputprefixes
- \row
- \o \bold sources \target sources
- \o \bold {The \c sources variable allows you to specify
- individual source files in addition to those located in the
- directories specified by the \l {sourcedir}{\c sourcedir}
- variable.}
+ The \c outputprefixes variable specifies a mapping between types of files
+ and the prefixes to prepend to the HTML file names in the generated
+ documentation.
- For example:
+ \code
+ outputprefixes = QML
+ outputprefixes.QML = qt-components-
+ \endcode
- \code
- sources = $QTDIR/src/gui/widgets/qlineedit.cpp \
- $QTDIR/src/gui/widgets/qpushbutton.cpp
- \endcode
+ By default, files containing the API documentation for QML elements
+ or components are prefixed with "qml-". In the above example, the
+ prefix "qt-components-" is used instead.
- When processing the \c sources variable, QDoc behaves in the
- same way as it does when processing the \l {sourcedirs}{\c
- sourcedirs} variable. For more information, see the \l
- {sourcedirs}{\c sourcedirs} variable.
+ \target qhp-variable
+ \section1 qhp
- See also \l sourcedirs.
+ The \c qhp variable is used to define the information to be
+ written out to Qt Help Project (\c{qhp}) files.
- \row
- \o \bold sources.fileextensions \target sources.fileextensions
- \o \bold {The \c sources.fileextensions variable filters the
- files within a source directory.}
+ See the \l{Creating Help Project Files} chapter for information
+ about this process.
- When processing the source files specified in the \l
- {sourcedirs}{\c sourcedirs} variable, QDoc will only read
- the files with the fileextensions specified in the \c
- sources.fileextensions variable. In this way QDoc avoid
- spending time reading irrelevant files.
- The default extensions are *.c++, *.cc, *.cpp and *.cxx.
+ \target slow-variable
+ \section1 slow
- The extensions are given as standard wildcard expressions.
- You can add a file extension to the filter using '+='. For
- example:
+ The \c slow variable specifies whether QDoc should do
+ time-consuming processing, such as syntax highlighting. The
+ default value is false.
- \code
- sources.fileextensions += *.CC
- \endcode
+ \note This option has been replaced by the \l{syntaxhighlighting} option.
- \warning The above assignment may not work as described.
+ For compatibility, the \c -slow command-line option has been
+ retained. This has the effect of enabling syntax highlighting.
- See also \l sourcedirs and \l sources.
+ \target sourcedirs-variable
+ \section1 sourcedirs
- \row
- \o \bold spurious \target spurious
- \o \bold {The \c spurious variable excludes specified
- QDoc warnings from the output.}
+ The \c sourcedirs variable specifies the directories containing
+ the \c .cpp or \c .qdoc files used in the documentation.
- The warnings are specified using standard wildcard
- expressions. For example:
+ For example in \l qt.qdocconf
- \code
- spurious = "Cannot find .*" \
- "Missing .*"
- \endcode
+ \code
+ sourcedirs = $QTDIR/src \
+ $QTDIR/doc/src \
+ $QTDIR/extensions/activeqt \
+ $QTDIR/extensions/motif \
+ $QTDIR/tools/designer/src/lib/extension \
+ $QTDIR/tools/designer/src/lib/sdk \
+ $QTDIR/tools/designer/src/lib/uilib
+ \endcode
- makes sure that warnings matching either of these
- expressions, will not be part of the output when running
- QDoc. For example would the following warning be omitted
- from the output:
+ When executed, the first QDoc will do is to read through the
+ headers specified in the \l {header-command} {\c header} variable,
+ and the ones located in the directories specified in the \c
+ headerdir variable (including all subdirectories), building an
+ internal structure of the classes and their functions.
- \code
- qt-4.0/src/opengl/qgl_mac.cpp:156: Missing parameter name
- \endcode
+ Then it will read through the sources specified in the \l
+ {sources} {\c sources}, and the ones located in the directories
+ specified in the \l {sourcedirs} {\c sourcedirs} varible
+ (including all subdirectories), merging the documentation with the
+ structure it retrieved from the header files.
- \row
- \o \bold syntaxhighlighting \target syntaxhighlighting
- \o \bold{The \c syntaxhighlighting variable specifies whether QDoc
- should perform syntax highlighting on source code quoted in the
- documentation it output.}
+ If both the \c sources and \c sourcedirs variables are defined,
+ QDoc will read through both, first \l {sources} {\c sources} then
+ \c sourcedirs.
- For example:
+ In the specified directories, QDoc will only read the files with
+ the fileextensions specified in the \l {sources.fileextensions}
+ {\c sources.fileextensions} variable. The default extensions are
+ *.c++, *.cc, *.cpp and *.cxx. The files specified by \l {sources}
+ {\c sources} will be read independent of their fileextensions.
- \code
- syntaxhighlighting = true
- \endcode
+ See also \l {sources-variable} {sources} and
+ \l {sources.fileextensions-variable} {sources.fileextensions}.
- will enable syntax highlighting for all supported programming
- languages.
+ \target sourceencoding-variable
+ \section1 sourceencoding
- \row
- \o \bold tabsize \target tabsize
- \o \bold {The \c tabsize variable defines the size of a tab
- character.}
+ The \c sourceencoding variable specifies the encoding used for the
+ source code and documentation.
- For example:
+ \code
+ sourceencoding = UTF-8
+ \endcode
- \code
- tabsize = 4
- \endcode
+ By default, the source encoding is \c ISO-8859-1 (Latin1) for
+ compatibility with legacy documentation. For some languages,
+ particularly non-European languages, this is not sufficient and an
+ encoding such as UTF-8 is required.
- will give the tab character the size of 4 spaces.
+ Although qdoc will use the encoding to read source and
+ documentation files, limitations of C++ compilers may prevent you
+ from using non-ASCII characters in source code comments. In cases
+ like these, it is possible to write API documentation completely
+ in documentation files.
- The default value of the variable is 8, and doesn't need to
- be specified.
+ See also \l {naturallanguage-variable} {naturallanguage} and
+ \l {outputencoding-variable} {outputencoding}.
- \row
- \o \bold tagfile \target tagfile
- \o \bold{The \c tagfile variable specifies the Doxygen tag file to be written
- when HTML is generated.}
- \row
- \o \bold version \target version
- \o \bold {The \c version variable specifies the version number of the
- documented software.}
+ \target sources-variable
+ \section1 sources
- For example:
+ The \c sources variable allows you to specify individual source
+ files in addition to those located in the directories specified by
+ the \l {sourcedirs-variable} {sourcedirs} variable.
- \code
- version = 4.0.1
- \endcode
+ \code
+ sources = $QTDIR/src/gui/widgets/qlineedit.cpp \
+ $QTDIR/src/gui/widgets/qpushbutton.cpp
+ \endcode
- When a version number is specified (using the \tt{\l
- version} or \tt {\l versionsym} variables in a \c .qdocconf
- file), it is accessible through the corresponding \\version
- command for use in the documentation.
+ When processing the \c sources variable, QDoc behaves in the same
+ way as it does when processing the \l {sourcedirs-variable}
+ {sourcedirs} variable. For more information, see the \l
+ {sourcedirs-variable} {sourcedirs} variable.
- \warning The \\version command's functionality is not
- fully implemented; currently it only works within raw HTML
- code.
+ See also \l {sourcedirs-variable} {sourcedirs}.
- See also \l versionsym.
+ \target sources.fileextensions-variable
+ \section1 sources.fileextensions
- \row
- \o \bold versionsym \target versionsym
- \o \bold {The \c versionsym variable specifies a C++
- preprocessor symbol that defines the version number
- of the documented software.}
+ The \c sources.fileextensions variable filters the files within a
+ source directory.
- For example in \l qt.qdocconf:
+ When processing the source files specified in the \l {sourcedirs}
+ {\c sourcedirs} variable, QDoc will only read the files with the
+ fileextensions specified in the \c sources.fileextensions
+ variable. In this way QDoc avoid spending time reading irrelevant
+ files.
- \code
- versionsym = QT_VERSION_STR
- \endcode
+ The default extensions are *.c++, *.cc, *.cpp and *.cxx.
- QT_VERSION_STR is defined in qglobal.h as follows
+ The extensions are given as standard wildcard expressions. You
+ can add a file extension to the filter using '+='. For example:
- \code
- #define QT_VERSION_STR "4.0.1"
- \endcode
+ \code
+ sources.fileextensions += *.CC
+ \endcode
- When a version number is specified (using the \tt{\l
- version} or \tt {\l versionsym} variables in a \c .qdocconf
- file), it is accessible through the corresponding \\version
- command for use in the documentation.
+ \warning The above assignment may not work as described.
- \warning The \\version command's functionality is not fully
- implemented; currently it only works within raw HTML code.
+ See also \l {sourcedirs-variable} {sourcedirs} and \l
+ (sources-variable} {sources}.
- See also \l {version}{\\version}.
- \endtable
+ \target spurious-variable
+ \section1 spurious
+
+ The \c spurious variable excludes specified QDoc warnings from the
+ output. The warnings are specified using standard wildcard
+ expressions.
+
+ \code
+ spurious = "Cannot find .*" \
+ "Missing .*"
+ \endcode
+
+ makes sure that warnings matching either of these expressions,
+ will not be part of the output when running QDoc. For example
+ would the following warning be omitted from the output:
+
+ \code
+ qt-4.0/src/opengl/qgl_mac.cpp:156: Missing parameter name
+ \endcode
+
+ \target syntaxhighlighting
+ \section1 syntaxhighlighting
+
+ The \c syntaxhighlighting variable specifies whether QDoc should
+ perform syntax highlighting on source code quoted in the
+ documentation it generates.
+
+ \code
+ syntaxhighlighting = true
+ \endcode
+
+ will enable syntax highlighting for all supported programming
+ languages.
+
+ \target tabsize-variable
+ \section1 tabsize
+
+ The \c tabsize variable defines the size of a tab character.
+
+ \code
+ tabsize = 4
+ \endcode
+
+ will give the tab character the size of 4 spaces. The default
+ value of the variable is 8, and doesn't need to be specified.
+
+ \target tagfile-variable
+ \section1 tagfile
+
+ The \c tagfile variable specifies the Doxygen tag file to be
+ written when HTML is generated.
+
+ \target version-variable
+ \section1 version
+
+ The \c version variable specifies the version number of the
+ documented software.
+
+ \code
+ version = 4.0.1
+ \endcode
+
+ When a version number is specified (using the \tt{\l version} or
+ \tt {\l versionsym} variables in a \c .qdocconf file), it is
+ accessible through the corresponding \\version command for use in
+ the documentation.
+
+ \warning The \\version command's functionality is not fully
+ implemented; currently it only works within raw HTML code.
+
+ See also \l versionsym.
+
+ \target versionsym-variable
+ \section1 versionsym
+
+ The \c versionsym variable specifies a C++ preprocessor symbol
+ that defines the version number of the documented software.
+
+ For example in \l qt.qdocconf:
+
+ \code
+ versionsym = QT_VERSION_STR
+ \endcode
+
+ QT_VERSION_STR is defined in qglobal.h as follows
+
+ \code
+ #define QT_VERSION_STR "4.0.1"
+ \endcode
+
+ When a version number is specified (using the \tt{\l version} or
+ \tt {\l versionsym} variables in a \c .qdocconf file), it is
+ accessible through the corresponding \\version command for use in
+ the documentation.
+
+ \warning The \\version command's functionality is not fully
+ implemented; currently it only works within raw HTML code.
+
+ See also \l {version} {\\version}.
*/
/*!
\page 22-creating-help-project-files.html
\previouspage General Configuration Variables
- \contentspage QDoc Manual - Table of Contents
+ \contentspage Table of Contents
\nextpage C++ Specific Configuration Variables
\title Creating Help Project Files
@@ -8131,7 +7836,7 @@
/*!
\page 23-qdoc-configuration-cppvariables.html
\previouspage Creating Help Project Files
- \contentspage QDoc Manual - Table of Contents
+ \contentspage Table of Contents
\nextpage HTML Specific Configuration Variables
\title C++ Specific Configuration Variables
@@ -8139,137 +7844,114 @@
The C++ specific configuration variables are provided to avoid
erroneous documentation due to non-standard C++ constructs.
- \section1 Alphabetical List
-
- \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoredirectives}
- {Cpp.ignoredirectives},
- \l {23-qdoc-configuration-cppvariables.html#Cpp.ignoretoken}
- {Cpp.ignoretokens}
-
- \section1 Variable Descriptions
+ \target Cpp.ignoredirectives-variable
+ \section1 Cpp.ignoredirectives
- \table
-
- \header
- \o Variable
- \o Description
+ The \c Cpp.ignoredirectives variable makes QDoc ignore the
+ specified non-standard constructs, within C++ source code.
- \row
- \o \bold Cpp.ignoredirectives \target Cpp.ignoredirectives
- \o \bold {The \c Cpp.ignoredirectives variable makes QDoc ignore
- the specified non-standard constructs, within C++ source code.}
-
- If not specified by the \tt {\l Cpp.ignoretokens} or \tt
- {\l Cpp.ignoredirectives} variables, non-standard
- constructs (typically macros) can result in erroneous
- documentation.
+ If not specified by the \tt {\l Cpp.ignoretokens} or \tt {\l
+ Cpp.ignoredirectives} variables, non-standard constructs
+ (typically macros) can result in erroneous documentation.
- In \l qt.qdocconf:
+ In \l qt.qdocconf:
- \code
- Cpp.ignoredirectives = Q_DECLARE_INTERFACE \
- Q_DECLARE_OPERATORS_FOR_FLAGS \
- Q_DECLARE_PRIVATE \
- Q_DECLARE_PUBLIC \
- Q_DISABLE_COPY \
- Q_DUMMY_COMPARISON_OPERATOR \
- Q_ENUMS \
- Q_FLAGS \
- Q_INTERFACES \
- __attribute__
- \endcode
+ \code
+ Cpp.ignoredirectives = Q_DECLARE_INTERFACE \
+ Q_DECLARE_OPERATORS_FOR_FLAGS \
+ Q_DECLARE_PRIVATE \
+ Q_DECLARE_PUBLIC \
+ Q_DISABLE_COPY \
+ Q_DUMMY_COMPARISON_OPERATOR \
+ Q_ENUMS \
+ Q_FLAGS \
+ Q_INTERFACES \
+ __attribute__
+ \endcode
- makes sure that when processing the code below, for
- example, QDoc will simply ignore the 'Q_ENUMS' and
- 'Q_FLAGS' expressions:
+ makes sure that when processing the code below, for example, QDoc
+ will simply ignore the 'Q_ENUMS' and 'Q_FLAGS' expressions:
- \code
- class Q_CORE_EXPORT Qt {
- Q_OBJECT
- Q_ENUMS(Orientation TextFormat BackgroundMode
- DateFormat ScrollBarPolicy FocusPolicy
- ContextMenuPolicy CaseSensitivity
- LayoutDirection ArrowType)
- Q_ENUMS(ToolButtonStyle)
- Q_FLAGS(Alignment)
- Q_FLAGS(Orientations)
- Q_FLAGS(DockWidgetAreas)
-
- public:
- ...
- };
- \endcode
+ \code
+ class Q_CORE_EXPORT Qt {
+ Q_OBJECT
+ Q_ENUMS(Orientation TextFormat BackgroundMode
+ DateFormat ScrollBarPolicy FocusPolicy
+ ContextMenuPolicy CaseSensitivity
+ LayoutDirection ArrowType)
+ Q_ENUMS(ToolButtonStyle)
+ Q_FLAGS(Alignment)
+ Q_FLAGS(Orientations)
+ Q_FLAGS(DockWidgetAreas)
+
+ public:
+ ...
+ };
+ \endcode
- The Q_OBJECT macro, however, is an exception: QDoc
- recognizes this particular non-standard construct, so there
- is no need specifying it using the \tt {\l
- Cpp.ignoredirectives} variable.
+ The Q_OBJECT macro, however, is an exception: QDoc recognizes this
+ particular non-standard construct, so there is no need specifying
+ it using the \tt {\l Cpp.ignoredirectives} variable.
- Regarding the Q_CORE_EXPORT macro; see the documentation of
- the \tt {\l Cpp.ignoretokens} variable.
+ Regarding the Q_CORE_EXPORT macro; see the documentation of the
+ \tt {\l Cpp.ignoretokens} variable.
- See also \l Cpp.ignoretokens.
+ See also \l Cpp.ignoretokens.
- \row
- \o \bold Cpp.ignoretokens \target Cpp.ignoretokens
- \o \bold {The \c Cpp.ignoretokens variable makes QDoc ignore
- the specified non-standard constructs, within C++ source code.}
+ \target Cpp.ignoretokens-variable
+ \section1 Cpp.ignoretokens
- If not specified by the \tt {\l Cpp.ignoretokens} or \tt
- {\l Cpp.ignoredirectives} variables, non-standard
- constructs (typically macros) can result in erroneous
- documentation.
+ The \c Cpp.ignoretokens variable makes QDoc ignore the specified
+ non-standard constructs, within C++ source code.
- In \l qt.qdocconf:
+ If not specified by the \tt {\l Cpp.ignoretokens} or \tt {\l
+ Cpp.ignoredirectives} variables, non-standard constructs
+ (typically macros) can result in erroneous documentation.
- \code
- Cpp.ignoretokens = QAXFACTORY_EXPORT \
- QM_EXPORT_CANVAS \
- ...
- Q_COMPAT_EXPORT \
- Q_CORE_EXPORT \
- Q_EXPLICIT \
- Q_EXPORT \
- ...
- Q_TYPENAME \
- Q_XML_EXPORT
- \endcode
+ In \l qt.qdocconf:
- makes sure that when processing the code below, for
- example, QDoc will simply ignore the 'Q_CORE_EXPORT'
- expression:
+ \code
+ Cpp.ignoretokens = QAXFACTORY_EXPORT \
+ QM_EXPORT_CANVAS \
+ ...
+ Q_COMPAT_EXPORT \
+ Q_CORE_EXPORT \
+ Q_EXPLICIT \
+ Q_EXPORT \
+ ...
+ Q_TYPENAME \
+ Q_XML_EXPORT
+ \endcode
- \code
- class Q_CORE_EXPORT Qt {
- Q_OBJECT
- Q_ENUMS(Orientation TextFormat BackgroundMode
- DateFormat ScrollBarPolicy FocusPolicy
- ContextMenuPolicy CaseSensitivity
- LayoutDirection ArrowType)
- Q_ENUMS(ToolButtonStyle)
- Q_FLAGS(Alignment)
- Q_FLAGS(Orientations)
- Q_FLAGS(DockWidgetAreas)
-
- public:
- ...
- };
- \endcode
+ makes sure that when processing the code below, for example, QDoc
+ will simply ignore the 'Q_CORE_EXPORT' expression:
- Regarding the Q_OBJECT, Q_ENUMS and Q_FLAGS macros; see the
- documentation of the \tt {\l Cpp.ignoredirectives}
- variable.
+ \code
+ class Q_CORE_EXPORT Qt {
+ Q_OBJECT
+ Q_ENUMS(Orientation TextFormat BackgroundMode
+ DateFormat ScrollBarPolicy FocusPolicy
+ ContextMenuPolicy CaseSensitivity
+ LayoutDirection ArrowType)
+ Q_ENUMS(ToolButtonStyle)
+ Q_FLAGS(Alignment)
+ Q_FLAGS(Orientations)
+ Q_FLAGS(DockWidgetAreas)
+ public:
+ ...
+ };
+ \endcode
- See also \l Cpp.ignoredirectives.
+ Regarding the Q_OBJECT, Q_ENUMS and Q_FLAGS macros; see the
+ documentation of the \tt {\l Cpp.ignoredirectives} variable.
- \endtable
+ See also \l Cpp.ignoredirectives.
*/
-
/*!
\page 24-qdoc-configuration-htmlvariables.html
\previouspage C++ Specific Configuration Variables
- \contentspage QDoc Manual - Table of Contents
+ \contentspage Table of Contents
\nextpage Supporting Derived Projects
\title HTML Specific Configuration Variables
@@ -8279,219 +7961,188 @@
documentation's footer or postheader. The format of the variable
values are raw HTML.
- \section1 Alphabetical List
-
- \l {24-qdoc-configuration-htmlvariables.html#HTML.footer}{HTML.footer},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.postheader}
- {HTML.postheader},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.style}{HTML.style},
- \l {24-qdoc-configuration-htmlvariables.html#HTML.stylesheets}{HTML.stylesheets}
+ \target HTML.footer-variable
+ \section1 HTML.footer
+ The \c HTML.footer variable defines the content of the generated
+ HTML documentation's footer.
- \section1 Variable Descriptions
+ The footer is rendered at the bottom of the generated
+ documentation page.
- \table
+ The variable's value is given as raw HTML code enclosed by
+ quotation marks. Note that if the value spans several lines, each
+ line needs to be enclosed by quotation marks.
- \header
- \o Variable
- \o Description
+ For example in \l qt.qdocconf:
- \row
- \o \bold HTML.footer \target HTML.footer
- \o \bold {The \c HTML.footer variable defines the content
- of the generated HTML documentation's footer.}
+ \code
+ HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
+ ...
+ "</tr></table></div></address>"
+ \endcode
- The footer is rendered at the bottom of the generated
- documentation page.
+ The complete variable entry in \l qt.qdocconf provides the
+ standard footer of the \l {http://qt.nokia.com/doc/4.0/index.html}
+ {Qt Reference Documentation}.
- The variable's value is given as raw HTML code enclosed by
- quotation marks. Note that if the value spans several
- lines, each line needs to be enclosed by quotation marks.
+ \target HTML.postheader-variable
+ \section1 HTML.postheader
- For example in \l qt.qdocconf:
+ The \c HTML.postheader variable defines the content of the
+ generated HTML documentation's postheader.
- \code
- HTML.footer = "<p /><address><hr /><div align=\"center\">\n" \
- ...
- "</tr></table></div></address>"
- \endcode
+ The header is rendered at the top of the generated documentation
+ page.
- The complete variable entry in \l qt.qdocconf provides the
- standard footer of the \l
- {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
- Documentation}.
+ The variable's value is given as raw HTML enclosed by quotation
+ marks. Note that if the value spans several lines, each line needs
+ to be enclosed by quotation marks.
- \row
- \o \bold HTML.postheader \target HTML.postheader
- \o \bold {The \c HTML.postheader variable defines the content
- of the generated HTML documentation's postheader.}
+ For example in \l qt.qdocconf:
- The header is rendered at the top of the generated
- documentation page.
+ \code
+ HTML.postheader = "<table border=\"0\"..." \
+ ...
+ "<img src=\"images/trolltech-logo.png\" \
+ "align=\"right\" width=\"203\" height=\"32\""\
+ "border=\"0\" />" \
+ "</td></tr>" \
+ "</table>"
+ \endcode
- The variable's value is given as raw HTML enclosed by
- quotation marks. Note that if the value spans several
- lines, each line needs to be enclosed by quotation marks.
+ The complete variable entry in \l qt.qdocconf provides the
+ standard header of the \l {http://qt.nokia.com/doc/4.0/index.html}
+ {Qt Reference Documentation}.
- For example in \l qt.qdocconf:
+ \target HTML.style-variable
+ \section1 HTML.style
- \code
- HTML.postheader = "<table border=\"0\"..." \
- ...
- "<img src=\"images/trolltech-logo.png\" \
- "align=\"right\" width=\"203\" height=\"32\""\
- "border=\"0\" />" \
- "</td></tr>" \
- "</table>"
- \endcode
+ The HTML.style variable defines the style for
+ the generated HTML documentation.
- The complete variable entry in \l qt.qdocconf provides the
- standard header of the \l
- {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
- Documentation}.
+ The variable's value is given as raw HTML enclosed by quotation
+ marks. Note that if the value spans several lines, each line needs
+ to be enclosed by quotation marks.
- \row
- \o \bold HTML.style \target HTML.style
- \o \bold {The HTML.style variable defines the style for
- the generated HTML documentation.}
+ For example in \l qt.qdocconf:
- The variable's value is given as raw HTML enclosed by
- quotation marks. Note that if the value spans several
- lines, each line needs to be enclosed by quotation marks.
+ \code
+ HTML.style = "h3.fn,span.fn" \
+ "{ margin-left: 1cm; text-indent: -1cm; }\n" \
+ "a:link { color: #004faf; text-decoration: none }\n" \
+ "a:visited" \
+ "{ color: #672967; text-decoration: none }\n" \
+ "td.postheader { font-family: sans-serif }\n" \
+ "tr.address { font-family: sans-serif }\n" \
+ "body { background: #ffffff; color: black; }"
+ \endcode
- For example in \l qt.qdocconf:
+ provides the HTML style for the \l
+ {http://qt.nokia.com/doc/4.0/index.html} {Qt Reference
+ Documentation}.
- \code
- HTML.style = "h3.fn,span.fn" \
- "{ margin-left: 1cm; text-indent: -1cm; }\n" \
- "a:link { color: #004faf; text-decoration: none }\n" \
- "a:visited" \
- "{ color: #672967; text-decoration: none }\n" \
- "td.postheader { font-family: sans-serif }\n" \
- "tr.address { font-family: sans-serif }\n" \
- "body { background: #ffffff; color: black; }"
- \endcode
+ \target HTML.stylesheets-variable
+ \section1 HTML.stylesheets
- provides the HTML style for the \l
- {http://qt.nokia.com/doc/4.0/index.html}{Qt Reference
- Documentation}.
+ The HTML.stylesheets variable defines a list of stylesheets
+ to use for the generated HTML documentation.
- \row
- \o \bold HTML.stylesheets \target HTML.stylesheets
- \o \bold {The HTML.stylesheets variable defines a list of stylesheets
- to use for the generated HTML documentation.}
+ Using separate stylesheets for the documentation makes it easier
+ to customize and experiment with the style used once the contents
+ has been generated. Typically, it is only necessary to define a
+ single stylesheet for any set of documentation; for example:
- Using separate stylesheets for the documentation makes it easier to
- customize and experiment with the style used once the contents has
- been generated. Typically, it is only necessary to define a single
- stylesheet for any set of documentation; for example:
+ \code
+ HTML.stylesheets = classic.css
+ \endcode
- \code
- HTML.stylesheets = classic.css
- \endcode
+ QDoc expects to find stylesheets in the directory containing the
+ \l qt.qdocconf file, and it will copy those specified to the output
+ directory alongside the HTML pages.
- QDoc expects to find stylesheets in the directory containing the
- \l qt.qdocconf file, and it will copy those specified to the output
- directory alongside the HTML pages.
- \endtable
*/
/*!
\page 25-qdoc-configuration-derivedprojects.html
\previouspage HTML Specific Configuration Variables
- \contentspage QDoc Manual - Table of Contents
- \nextpage QDoc Compatibility
+ \contentspage Table of Contents
+ \nextpage Compatibility Issues
\title Supporting Derived Projects
- \tableofcontents
+ Some configuration variables allow you to use QDoc to support
+ Qt-based projects; i.e allow your project to contain links to the
+ online Qt documentation. This means that QDoc will be able to
+ create links to the class reference documentation, without any
+ explicit linking command.
- Some particular configuration variables allow you to use QDoc to
- support Qt-based projects; i.e to make projects, such as Qt Solutions,
- contain references to the online Qt documentation. This
- means that QDoc will be able to create links to the class reference
- documentation, without any explicit linking command.
+ \target description-variable
+ \section1 description
- \section1 The Configuration Variables
+ The description variable holds a short description of the
+ associated project.
- \section2 Alphabetical List
+ See also \l project.
- \l{25-qdoc-configuration-derivedprojects.html#description}{description},
- \l{25-qdoc-configuration-derivedprojects.html#indexes}{indexes},
- \l{25-qdoc-configuration-derivedprojects.html#project}{project},
- \l{25-qdoc-configuration-derivedprojects.html#url}{url}
+ \target indexes-variable
+ \section1 indexes
- \section2 Variable Descriptions
+ The \c indexes variable lists the index files that will be used to
+ generate references.
- \table
- \header
- \o Variable
- \o Description
- \row
- \o \bold description \target description
- \o \bold {The description variable holds a short description of
- the associated project.}
+ For example. to make a derived Qt project contain links to the Qt
+ Reference documentation, you need to specify the associated index
+ file:
- See also \l project.
-
- \row
- \o \bold indexes \target indexes
- \o \bold {The \c indexes variable lists the index files
- that will be used to generate references.}
-
- For example. to make a derived Qt project contain links to
- the Qt Reference documentation, you need to specify the
- associated index file:
+ \code
+ indexes = $QTDIR/doc/html/qt.index
+ \endcode
- \code
- indexes = $QTDIR/doc/html/qt.index
- \endcode
+ See also \l project and \l url.
- See also \l project and \l url.
+ \target project-variable
+ \section1 project
- \row
- \o \bold project \target project
- \o \bold {The \c project variable provides a name for the project
- associated with the \c .qdocconf file.}
+ The \c project variable provides a name for the project associated
+ with the \c .qdocconf file.
- The project's name is used to form a file name for the
- associated project's \i index file. For example:
+ The project's name is used to form a file name for the associated
+ project's \e index file.
- \code
- project = QtMotif
- \endcode
+ \code
+ project = QtMotif
+ \endcode
- This will cause an index file called \c qtmotif.index to be
- created.
+ This will cause an index file called \c qtmotif.index to be
+ created.
- See also \l description and \l indexes.
- \row
- \o \bold url \target url
- \o \bold {The \c url variable holds the base URL for the
- reference documentation associated with the current project.}
+ See also \l description and \l indexes.
- The URL is stored in the generated index file for the
- project. When we use the index on its own, QDoc will use
- this as the base URL when constructing links to classes,
- functions, and other things listed in the index.
+ \target url-variable
+ \section1 url
- For example:
+ The \c url variable holds the base URL for the reference
+ documentation associated with the current project.
- \code
- project = Qt
- description = Qt Reference Documentation
- url = http://qt.nokia.com/doc/4.0
+ The URL is stored in the generated index file for the
+ project. When we use the index on its own, QDoc will use this as
+ the base URL when constructing links to classes, functions, and
+ other things listed in the index.
- ...
- \endcode
+ \code
+ project = Qt
+ description = Qt Reference Documentation
+ url = http://qt.nokia.com/doc/4.0
- This makes sure that whenever \c qt.index is used to generate
- references to for example Qt classes, the base URL is
- \c http://qt.nokia.com/doc/4.0.
+ ...
+ \endcode
- See also \l indexes.
+ This makes sure that whenever \c qt.index is used to generate
+ references to for example Qt classes, the base URL is \c
+ http://qt.nokia.com/doc/4.0.
- \endtable
+ See also \l indexes.
\target howto
\section1 How to Support Derived Projects
@@ -8544,7 +8195,7 @@
The code above requires that you run QDoc from the directory that
contains this file. You need to include the compat.qdocconf
file for compatibility reasons; this is further explained in the
- \l {QDoc Compatibility} section.
+ \l {Compatibility Issues} section.
\bold {To resolve the actual links to Qt classes, the
mini-project's \c .qdocconf file needs to assign a value to the \l
@@ -8561,47 +8212,43 @@
/*!
\page 26-qdoc-commands-compatibility.html
\previouspage Supporting Derived Projects
- \contentspage QDoc Manual - Table of Contents
- \nextpage QDoc Commands - Alphabetical List
+ \contentspage Table of Contents
+ \nextpage qt.qdocconf
- \title QDoc Compatibility
-
- \tableofcontents
+ \title Compatibility Issues
\section1 General Description
\target reason
- QDoc is a tool that constantly evolves to suit our needs, for that
- reason there are some compatibility issues in the transition
- between old and new practices.
+ Because QDoc evolves to suit our documentation needs, there can be
+ some compatibility issues when converting to a new version.
- To make the transition as smooth and rapid as possible, the
- general idea is to adopt the new commands and usage in new
- documentation. While waiting for the occurrences of the old
- practices to be eliminated from the old parts of the
- documentation, you can map the new commands and usage to the old
- ones using a compat.qdocconf file.
+ To allow you to proceed at your own speed when converting your
+ qdoc comments to use new qdoc commands and formats, the ability to
+ include a configuration file called \c {compat.qdocconf} is
+ provided.
- A compat.qdocconf file is a separate \c .qdocconf file which you
- can include in your main configuration file. It typically contains
- the mapping between old and new commands using the \l alias and \l
- {22-qdoc-configuration-generalvariables.html#macro}{macro}
- configuration variables.
+ A \c {compat.qdocconf} file is a separate configuration file,
+ which you include in your main configuration file. It typically
+ contains the mappings from old qdoc commands to new ones using
+ \l {alias} and
+ \l {22-qdoc-configuration-generalvariables.html#macro-variable}
+ {macro} configuration variables.
\section1 Qt Compatibility
In Qt's documentation there still exist occurrences of old
- commands, and the Qt \l {qt.qdocconf}{configuration file} needs to
+ commands, and the Qt \l {qt.qdocconf} {configuration file} needs to
include the compat.qdocconf file tailored for Qt. For more
detailed information about the commands creating compatibility
- issues, see the \l {Command Comments}{command comments}.
+ issues, see the \l {Command Comments} {command comments}.
- \section2 Qt's current compat.qdocconf file
+ \section1 Qt's current compat.qdocconf file
\quotefile files/compat.qdocconf
- \section2 Command Comments
+ \section1 Command Comments
\table
\header
@@ -8619,7 +8266,7 @@
\\e command name.
\bold {We still need to use the \\e command to render in
- italic in new documentation for \l {reason}{compatibility
+ italic in new documentation for \l {reason} {compatibility
reasons}}.
\row
@@ -8633,7 +8280,7 @@
\bold {We still need to use the \\input command to include
plain text in new documentation for \l
- {reason}{compatibility reasons}}.
+ {reason} {compatibility reasons}}.
\row
\o \\quotefile \target quotefile-versus-include
@@ -8646,7 +8293,7 @@
\bold {We still need to use the \\include command to quote
the entire contents of a source file in new documentation
- for \l {reason}{compatibility reasons}}.
+ for \l {reason} {compatibility reasons}}.
\row
\o \\quotefromfile \target quotefromfile-versus-quotefile
@@ -8656,7 +8303,7 @@
that command to quote an entire file, we introduce the new
\\quotefromfile command to quote from file.
- \bold {Use \l {quotefromfile}{\\quotefromfile} to quote
+ \bold {Use \l {quotefromfile-command} {\\quotefromfile} to quote
parts from a source file in new documentation}.
\row
@@ -8667,7 +8314,7 @@
in italic instead, we introduce the new \\o command for
this purpose.
- \bold {Use \l {o}{\\o} to indicate list and table items in
+ \bold {Use \l {o-command} {\\o} to indicate list and table items in
new documentation}.
\row
@@ -8676,7 +8323,7 @@
\o These commands are equivalent, and represent a simple name
change.
- \bold {Use \l {quotation}{\\quotation} in new
+ \bold {Use \l {quotation} {\\quotation} in new
documentation}.
\row
@@ -8685,116 +8332,129 @@
\o These commands are equivalent, and represent a simple name
change.
- \bold {Use \l {image}{\\image} in new documentation}.
+ \bold {Use \l {image-command} {\\image} in new documentation}.
\endtable
*/
/*!
\page 27-qdoc-commmands-alphabetical.html
- \previouspage QDoc Compatibility
- \contentspage QDoc Manual - Table of Contents
+ \previouspage Introduction to QDoc
+ \contentspage Table of Contents
+ \nextpage Topic Commands
+
+ \title Command Index
- \title QDoc Commands - Alphabetical List
+ This is a complete, alphabetized list of the QDoc commands.
\list
- \o \l {04-qdoc-commands-textformatting.html#a}{\\a}
- \o \l {11-qdoc-commands-documentcontents.html#abstract}{\\abstract}
- \o \l {06-qdoc-commands-verbatimcode.html#badcode}{\\badcode}
- \o \l {04-qdoc-commands-textformatting.html#bold}{\\bold}
- \o \l {11-qdoc-commands-documentcontents.html#brief}{\\brief}
- \o \l {04-qdoc-commands-textformatting.html#c}{\\c}
- \o \l {09-qdoc-commands-graphic.html#caption}{\\caption}
- \o \l {05-qdoc-commands-documentstructuring.html#chapter}{\\chapter}
- \o \l {13-qdoc-commands-topical.html#class}{\\class}
- \o \l {06-qdoc-commands-verbatimcode.html#code}{\\code}
- \o \l {07-0-qdoc-commands-quoting.html#codeline}{\\codeline},
- \o \l {16-qdoc-commands-status.html#compat}{\\compat}
- \o \l {15-qdoc-commands-navigation.html#contentspage}{\\contentspage}
- \o \l {07-0-qdoc-commands-quoting.html#dots}{\\dots}
- \o \l {12-0-qdoc-commands-miscellaneous.html#else}{\\else}
- \o \l {12-0-qdoc-commands-miscellaneous.html#endif}{\\endif}
- \o \l {13-qdoc-commands-topical.html#enum}{\\enum}
- \o \l {13-qdoc-commands-topical.html#example-command}{\\example}
- \o \l {12-0-qdoc-commands-miscellaneous.html#expire}{\\expire}
- \o \l {13-qdoc-commands-topical.html#externalpage}{\\externalpage}
- \o \l {13-qdoc-commands-topical.html#fn}{\\fn}
- \o \l {11-qdoc-commands-documentcontents.html#footnote}{\\footnote}
- \o \l {12-0-qdoc-commands-miscellaneous.html#generatelist}{\\generatelist}
- \o \l {13-qdoc-commands-topical.html#group}{\\group}
- \o \l {10-qdoc-commands-container.html#header}{\\header}
- \o \l {13-qdoc-commands-topical.html#headerfile}{\\headerfile}
- \o \l {04-qdoc-commands-textformatting.html#i}{\\i}
- \o \l {12-0-qdoc-commands-miscellaneous.html#if}{\\if}
- \o \l {09-qdoc-commands-graphic.html#image}{\\image}
- \o \l {12-0-qdoc-commands-miscellaneous.html#include}{\\include}
- \o \l {15-qdoc-commands-navigation.html#indexpage}{\\indexpage}
- \o \l {19-qdoc-commands-grouping.html#ingroup}{\\ingroup}
- \o \l {19-qdoc-commands-grouping.html#inmodule}{\\inmodule}
- \o \l {09-qdoc-commands-graphic.html#inlineimage}{\\inlineimage}
- \o \l {16-qdoc-commands-status.html#internal}{\\internal}
- \o \l {08-qdoc-commands-linking.html#keyword}{\\keyword}
- \o \l {08-qdoc-commands-linking.html#l}{\\l}
- \o \l {11-qdoc-commands-documentcontents.html#legalese}{\\legalese}
- \o \l {10-qdoc-commands-container.html#list}{\\list}
- \o \l {13-qdoc-commands-topical.html#macro}{\\macro}
- \o \l {19-qdoc-commands-grouping.html#mainclass}{\\mainclass}
- \o \l {12-0-qdoc-commands-miscellaneous.html#meta}{\\meta}
- \o \l {13-qdoc-commands-topical.html#module}{\\module}
- \o \l {13-qdoc-commands-topical.html#namespace}{\\namespace}
- \o \l {15-qdoc-commands-navigation.html#nextpage}{\\nextpage}
- \o \l {06-qdoc-commands-verbatimcode.html#newcode}{\\newcode}
- \o \l {17-qdoc-commands-thread.html#nonreentrant}{\\nonreentrant}
- \o \l {10-qdoc-commands-container.html#o}{\\o}
- \o \l {16-qdoc-commands-status.html#obsolete}{\\obsolete}
- \o \l {06-qdoc-commands-verbatimcode.html#oldcode}{\\oldcode}
- \o \l {12-0-qdoc-commands-miscellaneous.html#omit}{\\omit}
- \o \l {10-qdoc-commands-container.html#omitvalue}{\\omitvalue}
- \o \l {18-qdoc-commands-relating.html#overload}{\\overload}
- \o \l {13-qdoc-commands-topical.html#page}{\\page}
- \o \l {05-qdoc-commands-documentstructuring.html#part}{\\part}
- \o \l {16-qdoc-commands-status.html#preliminary}{\\preliminary}
- \o \l {15-qdoc-commands-navigation.html#previouspage}{\\previouspage}
- \o \l {07-0-qdoc-commands-quoting.html#printline}{\\printline}
- \o \l {07-0-qdoc-commands-quoting.html#printto}{\\printto}
- \o \l {07-0-qdoc-commands-quoting.html#printuntil}{\\printuntil}
- \o \l {13-qdoc-commands-topical.html#property}{\\property}
- \o \l {11-qdoc-commands-documentcontents.html#quotation}{\\quotation}
- \o \l {07-0-qdoc-commands-quoting.html#quotefile}{\\quotefile}
- \o \l {07-0-qdoc-commands-quoting.html#quotefromfile}{\\quotefromfile}
- \o \l {12-0-qdoc-commands-miscellaneous.html#raw}{\\raw}
- \o \l {17-qdoc-commands-thread.html#reentrant}{\\reentrant}
- \o \l {18-qdoc-commands-relating.html#reimp}{\\reimp}
- \o \l {18-qdoc-commands-relating.html#relates}{\\relates}
- \o \l {10-qdoc-commands-container.html#row}{\\row}
- \o \l {08-qdoc-commands-linking.html#sa}{\\sa}
- \o \l {05-qdoc-commands-documentstructuring.html#sectionOne}{\\section1}
- \o \l {05-qdoc-commands-documentstructuring.html#sectionTwo}{\\section2}
- \o \l {05-qdoc-commands-documentstructuring.html#sectionThree}{\\section3}
- \o \l {05-qdoc-commands-documentstructuring.html#sectionFour}{\\section4}
- \o \l {13-qdoc-commands-topical.html#service}{\\service}
- \o \l {16-qdoc-commands-status.html#since}{\\since}
- \o \l {07-0-qdoc-commands-quoting.html#skipline}{\\skipline}
- \o \l {07-0-qdoc-commands-quoting.html#skipto}{\\skipto}
- \o \l {07-0-qdoc-commands-quoting.html#skipuntil}{\\skipuntil}
- \o \l {07-0-qdoc-commands-quoting.html#snippet}{\\snippet},
- \o \l {15-qdoc-commands-navigation.html#startpage}{\\startpage}
- \o \l {04-qdoc-commands-textformatting.html#sub}{\\sub}
- \o \l {20-qdoc-commands-title.html#subtitle}{\\subtitle}
- \o \l {04-qdoc-commands-textformatting.html#sup}{\\sup}
- \o \l {10-qdoc-commands-container.html#table}{\\table}
- \o \l {11-qdoc-commands-documentcontents.html#tableofcontents}
- {\\tableofcontents}
- \o \l {08-qdoc-commands-linking.html#target}{\\target}
- \o \l {17-qdoc-commands-thread.html#threadsafe}{\\threadsafe}
- \o \l {20-qdoc-commands-title.html#title}{\\title}
- \o \l {04-qdoc-commands-textformatting.html#tt}{\\tt}
- \o \l {13-qdoc-commands-topical.html#typedef}{\\typedef}
- \o \l {04-qdoc-commands-textformatting.html#underline}{\\underline}
- \o \l {13-qdoc-commands-topical.html#variable}{\\variable}
- \o \l {10-qdoc-commands-container.html#value}{\\value}
- \o \l {11-qdoc-commands-documentcontents.html#warning}{\\warning}
+ \o \l {04-qdoc-commands-textmarkup.html#a-command} {\\a}
+ \o \l {11-qdoc-commands-specialcontent.html#abstract-command} {\\abstract}
+ \o \l {06-qdoc-commands-includecodeinline.html#badcode-command} {\\badcode}
+ \o \l {04-qdoc-commands-textmarkup.html#bold-command} {\\bold}
+ \o \l {11-qdoc-commands-specialcontent.html#brief-command} {\\brief}
+ \o \l {04-qdoc-commands-textmarkup.html#c-command} {\\c}
+ \o \l {09-qdoc-commands-includingimages.html#caption-command} {\\caption}
+ \o \l {05-qdoc-commands-documentstructure.html#chapter-command} {\\chapter}
+ \o \l {13-qdoc-commands-topics.html#class-command} {\\class}
+ \o \l {06-qdoc-commands-includecodeinline.html#code-command} {\\code}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#codeline-command} {\\codeline},
+ \o \l {16-qdoc-commands-status.html#compat-command} {\\compat}
+ \o \l {15-qdoc-commands-navigation.html#contentspage-command} {\\contentspage}
+ \o \l {16-qdoc-commands-status.html#default-command} {\\default} \span {class="newStuff"} {(new)}
+ \o \l {04-qdoc-commands-textmarkup.html#div-command} {\\div} \span {class="newStuff"} {(new)}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#dots-command} {\\dots}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#else-command} {\\else}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#endif-command} {\\endif}
+ \o \l {13-qdoc-commands-topics.html#enum-command} {\\enum}
+ \o \l {13-qdoc-commands-topics.html#example-command} {\\example}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#expire-command} {\\expire}
+ \o \l {13-qdoc-commands-topics.html#externalpage-command} {\\externalpage}
+ \o \l {13-qdoc-commands-topics.html#fn-command} {\\fn}
+ \o \l {11-qdoc-commands-specialcontent.html#footnote-command} {\\footnote}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#generatelist-command} {\\generatelist}
+ \o \l {13-qdoc-commands-topics.html#group-command} {\\group}
+ \o \l {10-qdoc-commands-tablesandlists.html#header-command} {\\header}
+ \o \l {13-qdoc-commands-topics.html#headerfile-command} {\\headerfile}
+ \o \l {04-qdoc-commands-textmarkup.html#i-command} {\\i}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#if-command} {\\if}
+ \o \l {09-qdoc-commands-includingimages.html#image-command} {\\image}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#include-command} {\\include}
+ \o \l {15-qdoc-commands-navigation.html#indexpage-command} {\\indexpage}
+ \o \l {19-qdoc-commands-grouping.html#ingroup-command} {\\ingroup}
+ \o \l {18-qdoc-commands-relating.html#inherits-command}{\\inherits} \span {class="newStuff"} {(new)}
+ \o \l {19-qdoc-commands-grouping.html#inmodule-command} {\\inmodule}
+ \o \l {09-qdoc-commands-includingimages.html#inlineimage-command} {\\inlineimage}
+ \o \l {16-qdoc-commands-status.html#internal-command} {\\internal}
+ \o \l {08-qdoc-commands-creatinglinks.html#keyword-command} {\\keyword}
+ \o \l {08-qdoc-commands-creatinglinks.html#l-command} {\\l}
+ \o \l {11-qdoc-commands-specialcontent.html#legalese-command} {\\legalese}
+ \o \l {10-qdoc-commands-tablesandlists.html#list-command} {\\list}
+ \o \l {13-qdoc-commands-topics.html#macro-command} {\\macro}
+ \o \l {19-qdoc-commands-grouping.html#mainclass-command} {\\mainclass}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#meta-command} {\\meta}
+ \o \l {13-qdoc-commands-topics.html#module-command} {\\module}
+ \o \l {13-qdoc-commands-topics.html#namespace-command} {\\namespace}
+ \o \l {15-qdoc-commands-navigation.html#nextpage-command} {\\nextpage}
+ \o \l {06-qdoc-commands-includecodeinline.html#newcode-command} {\\newcode}
+ \o \l {17-qdoc-commands-thread.html#nonreentrant-command} {\\nonreentrant}
+ \o \l {10-qdoc-commands-tablesandlists.html#o-command} {\\o}
+ \o \l {16-qdoc-commands-status.html#obsolete-command} {\\obsolete}
+ \o \l {06-qdoc-commands-includecodeinline.html#oldcode-command} {\\oldcode}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#omit-command} {\\omit}
+ \o \l {10-qdoc-commands-tablesandlists.html#omitvalue-command} {\\omitvalue}
+ \o \l {18-qdoc-commands-relating.html#overload-command} {\\overload}
+ \o \l {13-qdoc-commands-topics.html#page-command} {\\page}
+ \o \l {05-qdoc-commands-documentstructure.html#part-command} {\\part}
+ \o \l {16-qdoc-commands-status.html#preliminary-command} {\\preliminary}
+ \o \l {15-qdoc-commands-navigation.html#previouspage-command} {\\previouspage}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printline-command} {\\printline}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printto-command} {\\printto}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#printuntil-command} {\\printuntil}
+ \o \l {13-qdoc-commands-topics.html#property-command} {\\property}
+ \o \l {13-qdoc-commands-topics.html#qmlattachedproperty-command} {\\qmlattachedproperty} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlattachedsignal-command} {\\qmlattachedsignal} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlbasictype-command} {\\qmlbasictype} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlclass-command} {\\qmlclass} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlmethod-command} {\\qmlmethod} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlproperty-command} {\\qmlproperty} \span {class="newStuff"} {(new)}
+ \o \l {13-qdoc-commands-topics.html#qmlsignal-command} {\\qmlsignal} \span {class="newStuff"} {(new)}
+ \o \l {11-qdoc-commands-specialcontent.html#quotation-command} {\\quotation}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#quotefile-command} {\\quotefile}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#quotefromfile-command} {\\quotefromfile}
+ \o \l {12-0-qdoc-commands-miscellaneous.html#raw-command} {\\raw} \span {class="newStuff"} {(avoid)}
+ \o \l {17-qdoc-commands-thread.html#reentrant-command} {\\reentrant}
+ \o \l {18-qdoc-commands-relating.html#reimp-command} {\\reimp}
+ \o \l {18-qdoc-commands-relating.html#relates-command} {\\relates}
+ \o \l {10-qdoc-commands-tablesandlists.html#row-command} {\\row}
+ \o \l {08-qdoc-commands-creatinglinks.html#sa-command} {\\sa}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionOne-command} {\\section1}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionTwo-command} {\\section2}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionThree-command} {\\section3}
+ \o \l {05-qdoc-commands-documentstructure.html#sectionFour-command} {\\section4}
+ \o \l {13-qdoc-commands-topics.html#service-command} {\\service}
+ \o \l {16-qdoc-commands-status.html#since-command} {\\since}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipline-command} {\\skipline}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipto-command} {\\skipto}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#skipuntil-command} {\\skipuntil}
+ \o \l {07-0-qdoc-commands-includingexternalcode.html#snippet-command} {\\snippet},
+ \o \l {04-qdoc-commands-textmarkup.html#span-command} {\\span} \span {class="newStuff"} {(new)}
+ \o \l {15-qdoc-commands-navigation.html#startpage-command} {\\startpage}
+ \o \l {04-qdoc-commands-textmarkup.html#sub-command} {\\sub}
+ \o \l {20-qdoc-commands-namingthings.html#subtitle-command} {\\subtitle}
+ \o \l {04-qdoc-commands-textmarkup.html#sup-command} {\\sup}
+ \o \l {10-qdoc-commands-tablesandlists.html#table-command} {\\table}
+ \o \l {11-qdoc-commands-specialcontent.html#tableofcontents-command} {\\tableofcontents}
+ \o \l {08-qdoc-commands-creatinglinks.html#target-command} {\\target}
+ \o \l {17-qdoc-commands-thread.html#threadsafe-command} {\\threadsafe}
+ \o \l {20-qdoc-commands-namingthings.html#title-command} {\\title}
+ \o \l {04-qdoc-commands-textmarkup.html#tt-command} {\\tt}
+ \o \l {13-qdoc-commands-topics.html#typedef-command} {\\typedef}
+ \o \l {04-qdoc-commands-textmarkup.html#underline-command} {\\underline}
+ \o \l {13-qdoc-commands-topics.html#variable-command} {\\variable}
+ \o \l {10-qdoc-commands-tablesandlists.html#value-command} {\\value}
+ \o \l {11-qdoc-commands-specialcontent.html#warning-command} {\\warning}
\endlist
*/
diff --git a/tools/qdoc3/doc/qdoc-manual.qdocconf b/tools/qdoc3/doc/qdoc-manual.qdocconf
deleted file mode 100644
index 53486be..0000000
--- a/tools/qdoc3/doc/qdoc-manual.qdocconf
+++ /dev/null
@@ -1,234 +0,0 @@
-project = QDoc
-description = QDoc3 Manual
-
-indexes = ../../../doc/html/qt.index
-
-outputdir = html
-
-sources = qdoc-manual.qdoc
-sourcedirs = $PWD
-
-exampledirs += $PWD \
- ../../../examples
-
-imagedirs += images
-
-extraimages.HTML = qt-logo
-
-HTML.stylesheets = style/style.css \
- style/OfflineStyle.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style_ie6.css
-
-HTML.postheader = " <div class=\"header\" id=\"qtdocheader\">\n" \
- " <div class=\"content\"> \n" \
- " <div id=\"nav-logo\">\n" \
- " <a href=\"index.html\">Home</a></div>\n" \
- " <a href=\"index.html\" class=\"qtref\"><span>Qt Reference Documentation</span></a>\n" \
- " <div id=\"narrowsearch\"></div>\n" \
- " <div id=\"nav-topright\">\n" \
- " <ul>\n" \
- " <li class=\"nav-topright-home\"><a href=\"http://qt.nokia.com/\">Qt HOME</a></li>\n" \
- " <li class=\"nav-topright-dev\"><a href=\"http://developer.qt.nokia.com/\">DEV</a></li>\n" \
- " <li class=\"nav-topright-labs\"><a href=\"http://labs.qt.nokia.com/blogs/\">LABS</a></li>\n" \
- " <li class=\"nav-topright-doc nav-topright-doc-active\"><a href=\"http://doc.qt.nokia.com/\">\n" \
- " DOC</a></li>\n" \
- " <li class=\"nav-topright-blog\"><a href=\"http://blog.qt.nokia.com/\">BLOG</a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " <div id=\"shortCut\">\n" \
- " <ul>\n" \
- " <li class=\"shortCut-topleft-inactive\"><span><a href=\"index.html\">Qt 4.8</a></span></li>\n" \
- " <li class=\"shortCut-topleft-active\"><a href=\"http://doc.qt.nokia.com\">ALL VERSIONS" \
- " </a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " <ul class=\"sf-menu\" id=\"narrowmenu\"> \n" \
- " <li><a href=\"#\">API Lookup</a> \n" \
- " <ul> \n" \
- " <li><a href=\"classes.html\">Class index</a></li> \n" \
- " <li><a href=\"functions.html\">Function index</a></li> \n" \
- " <li><a href=\"modules.html\">Modules</a></li> \n" \
- " <li><a href=\"namespaces.html\">Namespaces</a></li> \n" \
- " <li><a href=\"qtglobal.html\">Global Declarations</a></li> \n" \
- " <li><a href=\"qdeclarativeelements.html\">QML elements</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " <li><a href=\"#\">Qt Topics</a> \n" \
- " <ul> \n" \
- " <li><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
- " <li><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
- " <li><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
- " <li><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
- " <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " <li><a href=\"#\">Examples</a> \n" \
- " <ul> \n" \
- " <li><a href=\"all-examples.html\">Examples</a></li> \n" \
- " <li><a href=\"tutorials.html\">Tutorials</a></li> \n" \
- " <li><a href=\"demos.html\">Demos</a></li> \n" \
- " <li><a href=\"qdeclarativeexamples.html\">QML Examples</a></li> \n" \
- " </ul> \n" \
- " </li> \n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"wrapper\">\n" \
- " <div class=\"hd\">\n" \
- " <span></span>\n" \
- " </div>\n" \
- " <div class=\"bd group\">\n" \
- " <div class=\"sidebar\">\n" \
- " <div class=\"searchlabel\">\n" \
- " Search index:</div>\n" \
- " <div class=\"search\" id=\"sidebarsearch\">\n" \
- " <form id=\"qtdocsearch\" action=\"\" onsubmit=\"return false;\">\n" \
- " <fieldset>\n" \
- " <input type=\"text\" name=\"searchstring\" id=\"pageType\" value=\"\" />\n" \
- " <div id=\"resultdialog\"> \n" \
- " <a href=\"#\" id=\"resultclose\">Close</a> \n" \
- " <p id=\"resultlinks\" class=\"all\"><a href=\"#\" id=\"showallresults\">All</a> | <a href=\"#\" id=\"showapiresults\">API</a> | <a href=\"#\" id=\"showarticleresults\">Articles</a> | <a href=\"#\" id=\"showexampleresults\">Examples</a></p> \n" \
- " <p id=\"searchcount\" class=\"all\"><span id=\"resultcount\"></span><span id=\"apicount\"></span><span id=\"articlecount\"></span><span id=\"examplecount\"></span>&nbsp;results:</p> \n" \
- " <ul id=\"resultlist\" class=\"all\"> \n" \
- " </ul> \n" \
- " </div> \n" \
- " </fieldset>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div class=\"box first bottombar\" id=\"lookup\">\n" \
- " <h2 title=\"API Lookup\"><span></span>\n" \
- " API Lookup</h2>\n" \
- " <div id=\"list001\" class=\"list\">\n" \
- " <ul id=\"ul001\" >\n" \
- " <li class=\"defaultLink\"><a href=\"classes.html\">Class index</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"functions.html\">Function index</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"modules.html\">Modules</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"namespaces.html\">Namespaces</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qtglobal.html\">Global Declarations</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeelements.html\">QML elements</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box bottombar\" id=\"topics\">\n" \
- " <h2 title=\"Qt Topics\"><span></span>\n" \
- " Qt Topics</h2>\n" \
- " <div id=\"list002\" class=\"list\">\n" \
- " <ul id=\"ul002\" >\n" \
- " <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"box\" id=\"examples\">\n" \
- " <h2 title=\"Examples\"><span></span>\n" \
- " Examples</h2>\n" \
- " <div id=\"list003\" class=\"list\">\n" \
- " <ul id=\"ul003\">\n" \
- " <li class=\"defaultLink\"><a href=\"all-examples.html\">Examples</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"tutorials.html\">Tutorials</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"demos.html\">Demos</a></li>\n" \
- " <li class=\"defaultLink\"><a href=\"qdeclarativeexamples.html\">QML Examples</a></li>\n" \
- " </ul> \n" \
- " </div>\n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"wrap\">\n" \
- " <div class=\"toolbar\">\n" \
- " <div class=\"breadcrumb toolblock\">\n" \
- " <ul>\n" \
- " <li class=\"first\"><a href=\"index.html\">Home</a></li>\n" \
- " <!-- Bread crumbs goes here -->\n"
-
-HTML.postpostheader = " </ul>\n" \
- " </div>\n" \
- " <div class=\"toolbuttons toolblock\">\n" \
- " <ul>\n" \
- " <li id=\"smallA\" class=\"t_button\">A</li>\n" \
- " <li id=\"medA\" class=\"t_button active\">A</li>\n" \
- " <li id=\"bigA\" class=\"t_button\">A</li>\n" \
- " <li id=\"print\" class=\"t_button\"><a href=\"javascript:this.print();\">\n" \
- " <span>Print</span></a></li>\n" \
- " </ul>\n" \
- " </div>\n" \
- " </div>\n" \
- " <div class=\"content mainContent\">\n"
-
-HTML.footer = "" \
- " <div class=\"feedback t_button\">\n" \
- " [+] Documentation Feedback</div>\n" \
- " </div>\n" \
- " </div>\n" \
- " </div> \n" \
- " <div class=\"ft\">\n" \
- " <span></span>\n" \
- " </div>\n" \
- " </div> \n" \
- " <div class=\"footer\">\n" \
- " <p>\n" \
- " <acronym title=\"Copyright\">&copy;</acronym> 2008-2011 Nokia Corporation and/or its\n" \
- " subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation \n" \
- " in Finland and/or other countries worldwide.</p>\n" \
- " <p>\n" \
- " All other trademarks are property of their respective owners. <a title=\"Privacy Policy\"\n" \
- " href=\"http://qt.nokia.com/about/privacy-policy\">Privacy Policy</a></p>\n" \
- " <br />\n" \
- " <p>\n" \
- " Licensees holding valid Qt Commercial licenses may use this document in accordance with the" \
- " Qt Commercial License Agreement provided with the Software or, alternatively, in accordance" \
- " with the terms contained in a written agreement between you and Nokia.</p>\n" \
- " <p>\n" \
- " Alternatively, this document may be used under the terms of the <a href=\"http://www.gnu.org/licenses/fdl.html\">GNU\n" \
- " Free Documentation License version 1.3</a>\n" \
- " as published by the Free Software Foundation.</p>\n" \
- " </div>\n" \
- " <div id=\"feedbackBox\">\n" \
- " <div id=\"feedcloseX\" class=\"feedclose t_button\">X</div>\n" \
- " <form id=\"feedform\" action=\"http://doc.qt.nokia.com/docFeedbck/feedback.php\" method=\"get\">\n" \
- " <p id=\"noteHead\">Thank you for giving your feedback.</p> <p class=\"note\">Make sure it is related to this specific page. For more general bugs and \n" \
- " requests, please use the <a href=\"http://bugreports.qt.nokia.com/secure/Dashboard.jspa\">Qt Bug Tracker</a>.</p>\n" \
- " <p><textarea id=\"feedbox\" name=\"feedText\" rows=\"5\" cols=\"40\"></textarea></p>\n" \
- " <p><input id=\"feedsubmit\" class=\"feedclose\" type=\"submit\" name=\"feedback\" /></p>\n" \
- " </form>\n" \
- " </div>\n" \
- " <div id=\"blurpage\">\n" \
- " </div>\n"
-
-# This stuff is used by the Qt 4.7 doc format.
-scriptdirs = ../../../doc/src/template/scripts
-styledirs = ../../../doc/src/template/style
-
-scripts.HTML = functions.js \
- narrow.js \
- superfish.js \
- jquery.js
-
-styles.HTML = style.css \
- narrow.css \
- superfish.css \
- superfish_skin.css \
- style_ie6.css \
- style_ie7.css \
- style_ie8.css
-
-# Files not referenced in any qdoc file (last four are needed by qtdemo)
-# See also extraimages.HTML
-qhp.Qt.extraFiles = scripts/functions.js \
- scripts/jquery.js \
- scripts/narrow.js \
- scripts/superfish.js \
- style/narrow.css \
- style/superfish.css \
- style/style_ie6.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style.css
-
diff --git a/tools/qdoc3/helpprojectwriter.cpp b/tools/qdoc3/helpprojectwriter.cpp
index f2e2f04..1c7fcbf 100644
--- a/tools/qdoc3/helpprojectwriter.cpp
+++ b/tools/qdoc3/helpprojectwriter.cpp
@@ -350,6 +350,14 @@ bool HelpProjectWriter::generateSection(HelpProject &project,
}
break;
+ case Node::Variable:
+ {
+ QString location = HtmlGenerator::fullDocumentLocation(node);
+ project.files.insert(location.left(location.lastIndexOf(QLatin1Char('#'))));
+ project.keywords.append(keywordDetails(node));
+ }
+ break;
+
// Fake nodes (such as manual pages) contain subtypes, titles and other
// attributes.
case Node::Fake: {
@@ -694,6 +702,8 @@ void HelpProjectWriter::generateProject(HelpProject &project)
}
} else {
// Find a contents node and navigate from there, using the NextLink values.
+ QSet<QString> visited;
+
foreach (const Node *node, subproject.nodes) {
QString nextTitle = node->links().value(Node::NextLink).first;
if (!nextTitle.isEmpty() &&
@@ -707,9 +717,10 @@ void HelpProjectWriter::generateProject(HelpProject &project)
while (nextPage) {
writeNode(project, writer, nextPage);
nextTitle = nextPage->links().value(Node::NextLink).first;
- if(nextTitle.isEmpty())
+ if (nextTitle.isEmpty() || visited.contains(nextTitle))
break;
nextPage = const_cast<FakeNode *>(tree->findFakeNodeByTitle(nextTitle));
+ visited.insert(nextTitle);
}
break;
}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 0ff28af..2019e85 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -79,9 +79,9 @@ QString HtmlGenerator::sinceTitles[] =
" New Properties",
" New Variables",
" New QML Elements",
- " New Qml Properties",
- " New Qml Signals",
- " New Qml Methods",
+ " New QML Properties",
+ " New QML Signals",
+ " New QML Methods",
""
};
@@ -401,6 +401,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
switch (atom->type()) {
case Atom::AbstractLeft:
+ if (relative)
+ relative->doc().location().warning(tr("\abstract is not implemented."));
+ else
+ Location::information(tr("\abstract is not implemented."));
break;
case Atom::AbstractRight:
break;
@@ -476,6 +480,17 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
out() << formattingRightMap()[ATOM_FORMATTING_TELETYPE];
break;
+ case Atom::CaptionLeft:
+ out() << "<p class=\"figCaption\">";
+ in_para = true;
+ break;
+ case Atom::CaptionRight:
+ endLink();
+ if (in_para) {
+ out() << "</p>\n";
+ in_para = false;
+ }
+ break;
case Atom::Code:
out() << "<pre class=\"cpp\">"
<< trimmedTrailing(highlightedCode(indent(codeIndent,atom->string()),
@@ -511,12 +526,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
<< trimmedTrailing(protectEnc(plainCode(indent(codeIndent,atom->string()))))
<< "</pre>\n";
break;
- case Atom::Div:
+ case Atom::DivLeft:
out() << "<div";
if (!atom->string().isEmpty())
- out() << " class=\"" << atom->string() << "\">";
- else
- out() << ">";
+ out() << " " << atom->string();
+ out() << ">";
+ break;
+ case Atom::DivRight:
+ out() << "</div>";
break;
case Atom::FootnoteLeft:
// ### For now
@@ -535,7 +552,11 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Atom::FormatIf:
break;
case Atom::FormattingLeft:
- out() << formattingLeftMap()[atom->string()];
+ if (atom->string().startsWith("span ")) {
+ out() << "<" + atom->string() << ">";
+ }
+ else
+ out() << formattingLeftMap()[atom->string()];
if (atom->string() == ATOM_FORMATTING_PARAMETER) {
if (atom->next() != 0 && atom->next()->type() == Atom::String) {
QRegExp subscriptRegExp("([a-z]+)_([0-9n])");
@@ -551,6 +572,9 @@ int HtmlGenerator::generateAtom(const Atom *atom,
if (atom->string() == ATOM_FORMATTING_LINK) {
endLink();
}
+ else if (atom->string().startsWith("span ")) {
+ out() << "</span>";
+ }
else {
out() << formattingRightMap()[atom->string()];
}
@@ -891,9 +915,9 @@ int HtmlGenerator::generateAtom(const Atom *atom,
if (threeColumnEnumValueTable) {
out() << "<table class=\"valuelist\">";
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
out() << "<th class=\"tblConst\">Constant</th>"
<< "<th class=\"tblval\">Value</th>"
@@ -935,10 +959,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else { // (atom->string() == ATOM_LIST_VALUE)
// ### Trenton
- out() << "<tr><td class=\"topAlign\"><tt>"
+ out() << "<tr><td class=\"topAlign\"><tt>"
<< protectEnc(plainCode(marker->markedUpEnumValue(atom->next()->string(),
relative)))
- << "</tt></td><td class=\" topAlign\">";
+ << "</tt></td><td class=\"topAlign\">";
QString itemValue;
if (relative->type() == Node::Enum) {
@@ -964,7 +988,7 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
else if (atom->string() == ATOM_LIST_VALUE) {
if (threeColumnEnumValueTable) {
- out() << "</td><td class=\"topAlign\">";
+ out() << "</td><td class=\"topAlign\">";
if (matchAhead(atom, Atom::ListItemRight))
out() << "&nbsp;";
}
@@ -1056,8 +1080,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
in_para = false;
}
if (!atom->string().isEmpty()) {
- if (atom->string().contains("%"))
- out() << "<table class=\"generic\">\n "; // width=\"" << atom->string() << "\">\n ";
+ if (atom->string().contains("%")) {
+ out() << "<table class=\"generic\" width=\""
+ << atom->string() << "\">\n ";
+ }
else {
out() << "<table class=\"generic\">\n";
}
@@ -1071,14 +1097,14 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "</table>\n";
break;
case Atom::TableHeaderLeft:
- out() << "<thead><tr class=\"qt-style topAlign\">";
+ out() << "<thead><tr class=\"qt-style\">";
inTableHeader = true;
break;
case Atom::TableHeaderRight:
out() << "</tr>";
if (matchAhead(atom, Atom::TableHeaderLeft)) {
skipAhead = 1;
- out() << "\n<tr class=\"qt-style topAlign\">";
+ out() << "\n<tr class=\"qt-style\">";
}
else {
out() << "</thead>\n";
@@ -1086,10 +1112,12 @@ int HtmlGenerator::generateAtom(const Atom *atom,
}
break;
case Atom::TableRowLeft:
- if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd topAlign\">";
+ if (!atom->string().isEmpty())
+ out() << "<tr " << atom->string() << ">";
+ else if (++numTableRows % 2 == 1)
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even topAlign\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
break;
case Atom::TableRowRight:
out() << "</tr>\n";
@@ -1101,16 +1129,28 @@ int HtmlGenerator::generateAtom(const Atom *atom,
else
out() << "<td ";
- QStringList spans = atom->string().split(",");
- if (spans.size() == 2) {
- if (spans.at(0) != "1")
- out() << " colspan=\"" << spans.at(0) << "\"";
- if (spans.at(1) != "1")
- out() << " rowspan=\"" << spans.at(1) << "\"";
+ for (int i=0; i<atom->count(); ++i) {
+ if (i > 0)
+ out() << " ";
+ QString p = atom->string(i);
+ if (p.contains('=')) {
+ out() << p;
+ }
+ else {
+ QStringList spans = p.split(",");
+ if (spans.size() == 2) {
+ if (spans.at(0) != "1")
+ out() << " colspan=\"" << spans.at(0) << "\"";
+ if (spans.at(1) != "1")
+ out() << " rowspan=\"" << spans.at(1) << "\"";
+ }
+ }
+ }
if (inTableHeader)
out() << ">";
- else
- out() << "><p>";
+ else {
+ out() << ">";
+ //out() << "><p>";
}
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
@@ -1119,8 +1159,10 @@ int HtmlGenerator::generateAtom(const Atom *atom,
case Atom::TableItemRight:
if (inTableHeader)
out() << "</th>";
- else
- out() << "</p></td>";
+ else {
+ out() << "</td>";
+ //out() << "</p></td>";
+ }
if (matchAhead(atom, Atom::ParaLeft))
skipAhead = 1;
break;
@@ -1136,9 +1178,6 @@ int HtmlGenerator::generateAtom(const Atom *atom,
out() << "<b class=\"redFont\"><code>\\" << protectEnc(atom->string())
<< "</code></b>";
break;
- case Atom::EndDiv:
- out() << "</div>";
- break;
#ifdef QDOC_QML
case Atom::QmlText:
case Atom::EndQmlText:
@@ -2571,7 +2610,7 @@ void HtmlGenerator::generateSection(const NodeList& nl,
else {
if (twoColumn)
out() << "<table class=\"propsummary\">\n"
- << "<tr><td class=\"topAlign\">";
+ << "<tr><td class=\"topAlign\">";
out() << "<ul>\n";
}
@@ -2588,7 +2627,7 @@ void HtmlGenerator::generateSection(const NodeList& nl,
}
else {
if (twoColumn && i == (int) (nl.count() + 1) / 2)
- out() << "</ul></td><td class=\"topAlign\"><ul>\n";
+ out() << "</ul></td><td class=\"topAlign\"><ul>\n";
out() << "<li class=\"fn\">";
}
@@ -2632,7 +2671,7 @@ void HtmlGenerator::generateSectionList(const Section& section,
else {
if (twoColumn)
out() << "<table class=\"propsummary\">\n"
- << "<tr><td class=\"topAlign\">";
+ << "<tr><td class=\"topAlign\">";
out() << "<ul>\n";
}
@@ -3833,9 +3872,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
if ((*p)->type() == Node::QmlProperty) {
qpn = static_cast<const QmlPropertyNode*>(*p);
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
out() << "<td class=\"tblQmlPropNode\"><p>";
@@ -3860,9 +3899,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<table class=\"qmlname\">";
//out() << "<tr>";
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
out() << "<td class=\"tblQmlFuncNode\"><p>";
out() << "<a name=\"" + refForNode(qsn) + "\"></a>";
generateSynopsis(qsn,relative,marker,CodeMarker::Detailed,false);
@@ -3877,9 +3916,9 @@ void HtmlGenerator::generateDetailedQmlMember(const Node *node,
out() << "<table class=\"qmlname\">";
//out() << "<tr>";
if (++numTableRows % 2 == 1)
- out() << "<tr class=\"odd\">";
+ out() << "<tr valign=\"top\" class=\"odd\">";
else
- out() << "<tr class=\"even\">";
+ out() << "<tr valign=\"top\" class=\"even\">";
out() << "<td class=\"tblQmlFuncNode\"><p>";
out() << "<a name=\"" + refForNode(qmn) + "\"></a>";
generateSynopsis(qmn,relative,marker,CodeMarker::Detailed,false);
diff --git a/tools/qdoc3/node.cpp b/tools/qdoc3/node.cpp
index 7195322..0f85d37 100644
--- a/tools/qdoc3/node.cpp
+++ b/tools/qdoc3/node.cpp
@@ -771,6 +771,30 @@ void InnerNode::removeChild(Node *child)
}
}
+/*! \fn QString InnerNode::author() const
+ Returns the author.
+ */
+
+/*! \fn void InnerNode::setAuthor(const QString& author)
+ Sets the \a author.
+ */
+
+/*! \fn QString InnerNode::publisher() const
+ Returns the publisher.
+ */
+
+/*! \fn void InnerNode::setPublisher(const QString& publisher)
+ Sets the \a publisher.
+ */
+
+/*! \fn QString InnerNode::permissions() const
+ Returns the permissions.
+ */
+
+/*! \fn void InnerNode::setPermissions(const QString& permissions)
+ Sets the \a permissions.
+ */
+
/*!
Find the module (QtCore, QtGui, etc.) to which the class belongs.
We do this by obtaining the full path to the header file's location
@@ -834,6 +858,21 @@ void InnerNode::removeRelated(Node *pseudoChild)
related.removeAll(pseudoChild);
}
+/*! \fn bool InnerNode::hasOtherMetadata() const
+ Returns tru if the other metadata map is not empty.
+ */
+
+/*!
+ Insert the pair \a name and \a content into the other metadata map.
+ */
+void insertOtherMetadata(const QString& name, const QString& content)
+{
+}
+
+/*! \fn const QMap<QString, QString>& InnerNode::otherMetadata() cont
+ Returns the map containing pairs for output as \c {<othermetadata>}.
+ */
+
/*!
\class LeafNode
*/
@@ -947,10 +986,35 @@ void ClassNode::fixBaseClasses()
Search the child list to find the property node with the
specified \a name.
*/
-const PropertyNode* ClassNode::findPropertyNode(const QString& name) const
+const PropertyNode *ClassNode::findPropertyNode(const QString &name) const
{
- const Node* n = findNode(name,Node::Property);
- return (n ? static_cast<const PropertyNode*>(n) : 0);
+ const Node *n = findNode(name, Node::Property);
+
+ if (n)
+ return static_cast<const PropertyNode*>(n);
+
+ const PropertyNode *pn = 0;
+
+ const QList<RelatedClass> &bases = baseClasses();
+ if (!bases.isEmpty()) {
+ for (int i = 0; i < bases.size(); ++i) {
+ const ClassNode *cn = bases[i].node;
+ pn = cn->findPropertyNode(name);
+ if (pn)
+ break;
+ }
+ }
+ const QList<RelatedClass>& ignoredBases = ignoredBaseClasses();
+ if (!ignoredBases.isEmpty()) {
+ for (int i = 0; i < ignoredBases.size(); ++i) {
+ const ClassNode *cn = ignoredBases[i].node;
+ pn = cn->findPropertyNode(name);
+ if (pn)
+ break;
+ }
+ }
+
+ return pn;
}
/*!
@@ -1406,6 +1470,7 @@ PropertyNode::PropertyNode(InnerNode *parent, const QString& name)
usr(Trool_Default),
cst(false),
fnl(false),
+ rev(-1),
overrides(0)
{
// nothing.
@@ -1657,7 +1722,7 @@ bool QmlPropertyNode::fromTrool(Trool troolean, bool defaultValue)
}
}
-static QString valueType(const QString& n)
+static QString valueType(const QString &n)
{
if (n == "QPoint")
return "QDeclarativePointValueType";
@@ -1700,6 +1765,19 @@ bool QmlPropertyNode::isWritable(const Tree* tree) const
if (wri != Trool_Default)
return fromTrool(wri, false);
+ const PropertyNode *pn = correspondingProperty(tree);
+ if (pn)
+ return pn->isWritable();
+ else {
+ location().warning(tr("Can't determine read-only status of QML property %1; writable assumed.").arg(name()));
+ return true;
+ }
+}
+
+const PropertyNode *QmlPropertyNode::correspondingProperty(const Tree *tree) const
+{
+ const PropertyNode *pn;
+
Node* n = parent();
while (n && n->subType() != Node::QmlClass)
n = n->parent();
@@ -1708,93 +1786,35 @@ bool QmlPropertyNode::isWritable(const Tree* tree) const
const ClassNode* cn = qcn->classNode();
if (cn) {
QStringList dotSplit = name().split(QChar('.'));
- const PropertyNode* pn = cn->findPropertyNode(dotSplit[0]);
+ pn = cn->findPropertyNode(dotSplit[0]);
if (pn) {
if (dotSplit.size() > 1) {
+ // Find the C++ property corresponding to the QML property in
+ // the property group, <group>.<property>.
+
QStringList path(extractClassName(pn->qualifiedDataType()));
const Node* nn = tree->findNode(path,Class);
if (nn) {
const ClassNode* cn = static_cast<const ClassNode*>(nn);
- pn = cn->findPropertyNode(dotSplit[1]);
- if (pn) {
- return pn->isWritable();
- }
- else {
- const QList<RelatedClass>& bases = cn->baseClasses();
- if (!bases.isEmpty()) {
- for (int i=0; i<bases.size(); ++i) {
- const ClassNode* cn = bases[i].node;
- pn = cn->findPropertyNode(dotSplit[1]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- const QList<RelatedClass>& ignoredBases = cn->ignoredBaseClasses();
- if (!ignoredBases.isEmpty()) {
- for (int i=0; i<ignoredBases.size(); ++i) {
- const ClassNode* cn = ignoredBases[i].node;
- pn = cn->findPropertyNode(dotSplit[1]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- QString vt = valueType(cn->name());
- if (!vt.isEmpty()) {
- QStringList path(vt);
- const Node* vtn = tree->findNode(path,Class);
- if (vtn) {
- const ClassNode* cn = static_cast<const ClassNode*>(vtn);
- pn = cn->findPropertyNode(dotSplit[1]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- }
+ const PropertyNode *pn2 = cn->findPropertyNode(dotSplit[1]);
+ if (pn2)
+ return pn2; // Return the property for the QML property.
+ else
+ return pn; // Return the property for the QML group.
}
}
- else {
- return pn->isWritable();
- }
+ else
+ return pn;
}
else {
- const QList<RelatedClass>& bases = cn->baseClasses();
- if (!bases.isEmpty()) {
- for (int i=0; i<bases.size(); ++i) {
- const ClassNode* cn = bases[i].node;
- pn = cn->findPropertyNode(dotSplit[0]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- const QList<RelatedClass>& ignoredBases = cn->ignoredBaseClasses();
- if (!ignoredBases.isEmpty()) {
- for (int i=0; i<ignoredBases.size(); ++i) {
- const ClassNode* cn = ignoredBases[i].node;
- pn = cn->findPropertyNode(dotSplit[0]);
- if (pn) {
- return pn->isWritable();
- }
- }
- }
- if (isAttached()) {
- QString classNameAttached = cn->name() + "Attached";
- QStringList path(classNameAttached);
- const Node* nn = tree->findNode(path,Class);
- const ClassNode* acn = static_cast<const ClassNode*>(nn);
- pn = acn->findPropertyNode(dotSplit[0]);
- if (pn) {
- return pn->isWritable();
- }
- }
+ pn = cn->findPropertyNode(dotSplit[0]);
+ if (pn)
+ return pn;
}
}
}
- location().warning(tr("Can't determine read-only status of QML property %1; writable assumed.").arg(name()));
- return true;
+
+ return 0;
}
#endif
diff --git a/tools/qdoc3/node.h b/tools/qdoc3/node.h
index aa7c78a..2de2b5a 100644
--- a/tools/qdoc3/node.h
+++ b/tools/qdoc3/node.h
@@ -262,12 +262,21 @@ class InnerNode : public Node
NodeList overloads(const QString &funcName) const;
const QStringList& includes() const { return inc; }
+ QString author() const { return author_; }
+ void setAuthor(const QString& author) { author_ = author; }
+ QString publisher() const { return publisher_; }
+ void setPublisher(const QString& publisher) { publisher_ = publisher; }
+ QString permissions() const { return permissions_; }
+ void setPermissions(const QString& permissions) { permissions_ = permissions; }
QStringList primaryKeys();
QStringList secondaryKeys();
const QStringList& pageKeywords() const { return pageKeywds; }
virtual void addPageKeywords(const QString& t) { pageKeywds << t; }
virtual bool isAbstract() const { return false; }
virtual void setAbstract(bool ) { }
+ bool hasOtherMetadata() const { return !otherMetadataMap.isEmpty(); }
+ void insertOtherMetadata(const QString& name, const QString& content);
+ const QMap<QString, QString>& otherMetadata() const { return otherMetadataMap; }
protected:
InnerNode(Type type, InnerNode* parent, const QString& name);
@@ -280,6 +289,9 @@ class InnerNode : public Node
void removeChild(Node* child);
void removeRelated(Node* pseudoChild);
+ QString author_;
+ QString publisher_;
+ QString permissions_;
QStringList pageKeywds;
QStringList inc;
NodeList children;
@@ -288,6 +300,7 @@ class InnerNode : public Node
QMap<QString, Node*> childMap;
QMap<QString, Node*> primaryFunctionMap;
QMap<QString, NodeList> secondaryFunctionMap;
+ QMap<QString, QString> otherMetadataMap;
};
class LeafNode : public Node
@@ -466,6 +479,8 @@ class QmlPropertyNode : public LeafNode
bool isAttached() const { return att; }
virtual bool isQmlNode() const { return true; }
+ const PropertyNode *correspondingProperty(const Tree *tree) const;
+
const QString& element() const { return static_cast<QmlPropGroupNode*>(parent())->element(); }
private:
@@ -689,6 +704,7 @@ class PropertyNode : public LeafNode
void setRuntimeScrFunc(const QString& scrf) { runtimeScrFunc = scrf; }
void setConstant() { cst = true; }
void setFinal() { fnl = true; }
+ void setRevision(int revision) { rev = revision; }
const QString &dataType() const { return dt; }
QString qualifiedDataType() const;
@@ -732,6 +748,7 @@ class PropertyNode : public LeafNode
Trool usr;
bool cst;
bool fnl;
+ int rev;
const PropertyNode* overrides;
};
diff --git a/tools/qdoc3/qdoc3.pro b/tools/qdoc3/qdoc3.pro
index 2fedc0f..5b4131f 100644
--- a/tools/qdoc3/qdoc3.pro
+++ b/tools/qdoc3/qdoc3.pro
@@ -93,10 +93,24 @@ include($$QT_SOURCE_TREE/src/declarative/qml/parser/parser.pri)
### Documentation for qdoc3 ###
qtPrepareTool(QDOC, qdoc3)
+qtPrepareTool(QHELPGENERATOR, qhelpgenerator)
-html-docs.commands = cd \"$$PWD/doc\" && $$QDOC qdoc-manual.qdocconf
+$$unixstyle {
+ QDOC = QT_BUILD_TREE=$$QT_BUILD_TREE QT_SOURCE_TREE=$$QT_SOURCE_TREE $$QDOC
+} else {
+ QDOC = set QT_BUILD_TREE=$$QT_BUILD_TREE&& set QT_SOURCE_TREE=$$QT_SOURCE_TREE&& $$QDOC
+ QDOC = $$replace(QDOC, "/", "\\")
+}
+
+html-docs.commands = cd \"$$QT_BUILD_TREE/doc\" && $$QDOC $$QT_SOURCE_TREE/tools/qdoc3/doc/config/qdoc.qdocconf
+html-docs.files = $$QT_BUILD_TREE/doc/html
+
+qch-docs.commands = cd \"$$QT_BUILD_TREE/doc\" && $$QHELPGENERATOR $$QT_BUILD_TREE/tools/qdoc3/doc/html/qdoc.qhp -o $$QT_BUILD_TREE/tools/qdoc3/doc/qch/qdoc.qch
+qch-docs.files = $$QT_BUILD_TREE/tools/qdoc3/doc/qch
+qch-docs.path = $$[QT_INSTALL_DOCS]
+qch-docs.CONFIG += no_check_exist directory
-QMAKE_EXTRA_TARGETS += html-docs
+QMAKE_EXTRA_TARGETS += html-docs qch-docs
target.path = $$[QT_INSTALL_BINS]
INSTALLS += target
diff --git a/tools/qdoc3/qmlcodeparser.cpp b/tools/qdoc3/qmlcodeparser.cpp
index 269a566..9652322 100644
--- a/tools/qdoc3/qmlcodeparser.cpp
+++ b/tools/qdoc3/qmlcodeparser.cpp
@@ -142,7 +142,7 @@ void QmlCodeParser::doneParsingSourceFiles(Tree *tree)
}
/*!
- Returns the set of strings reopresenting the topic commands.
+ Returns the set of strings representing the topic commands.
*/
QSet<QString> QmlCodeParser::topicCommands()
{
diff --git a/tools/qdoc3/test/qt-html-templates-online.qdocconf b/tools/qdoc3/test/qt-html-templates-online.qdocconf
index dc84e7d..77ab3c5 100644
--- a/tools/qdoc3/test/qt-html-templates-online.qdocconf
+++ b/tools/qdoc3/test/qt-html-templates-online.qdocconf
@@ -40,8 +40,7 @@ HTML.postheader = \
" <li><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
" <li><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
" <li><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li><a href=\"supported-platforms.html\">Supported Platforms</a></li> \n" \
" <li><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
" <li><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
" </ul> \n" \
@@ -101,8 +100,7 @@ HTML.postheader = \
" <li class=\"defaultLink\"><a href=\"qt-basic-concepts.html\">Programming with Qt</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"qtquick.html\">Device UIs &amp; Qt Quick</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"qt-gui-concepts.html\">UI Design with Qt</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"developing-with-qt.html\">Cross-platform and Platform-specific</a></li> \n" \
- " <li class=\"defaultLink\"><a href=\"platform-specific.html\">Platform-specific info</a></li> \n" \
+ " <li class=\"defaultLink\"><a href=\"supported-platforms.html\">Supported Platforms</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"technology-apis.html\">Qt and Key Technologies</a></li> \n" \
" <li class=\"defaultLink\"><a href=\"best-practices.html\">How-To's and Best Practices</a></li> \n" \
" </ul> \n" \
@@ -196,37 +194,3 @@ HTML.footer = \
" var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);\n" \
" })();\n" \
" </script>\n"
-
-
-# Files not referenced in any qdoc file.
-# See also extraimages.HTML
-qhp.Qt.extraFiles = index.html \
- images/bg_l.png \
- images/bg_l_blank.png \
- images/bg_ll_blank.png \
- images/bg_ul_blank.png \
- images/header_bg.png \
- images/bg_r.png \
- images/box_bg.png \
- images/breadcrumb.png \
- images/bullet_gt.png \
- images/bullet_dn.png \
- images/bullet_sq.png \
- images/bullet_up.png \
- images/arrow_down.png \
- images/feedbackground.png \
- images/horBar.png \
- images/page.png \
- images/page_bg.png \
- images/sprites-combined.png \
- images/spinner.gif \
- scripts/functions.js \
- scripts/jquery.js \
- scripts/narrow.js \
- scripts/superfish.js \
- style/narrow.css \
- style/superfish.css \
- style/style_ie6.css \
- style/style_ie7.css \
- style/style_ie8.css \
- style/style.css
diff --git a/tools/shared/qtpropertybrowser/qtpropertybrowserutils.pri b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.pri
new file mode 100644
index 0000000..1755448
--- /dev/null
+++ b/tools/shared/qtpropertybrowser/qtpropertybrowserutils.pri
@@ -0,0 +1,4 @@
+INCLUDEPATH += $$PWD
+DEPENDPATH += $$PWD
+SOURCES += $$PWD/qtpropertybrowserutils.cpp
+HEADERS += $$PWD/qtpropertybrowserutils_p.h
diff --git a/translations/translations.pri b/translations/translations.pri
deleted file mode 100644
index 1576bd5..0000000
--- a/translations/translations.pri
+++ /dev/null
@@ -1,80 +0,0 @@
-qtPrepareTool(LCONVERT, lconvert)
-qtPrepareTool(LUPDATE, lupdate)
-LUPDATE += -locations relative -no-ui-lines
-
-TS_TARGETS =
-
-# meta target name, target name, lupdate base options, files
-defineTest(addTsTarget) {
- cv = $${2}.commands
- $$cv = cd $$QT_SOURCE_TREE/src && $$LUPDATE $$3 -ts $$4
- export($$cv)
- dv = $${1}.depends
- $$dv += $$2
- export($$dv)
- TS_TARGETS += $$1 $$2
- export(TS_TARGETS)
-}
-
-# target basename, lupdate base options
-defineTest(addTsTargets) {
- files = $$files($$PWD/$${1}_??.ts) $$files($$PWD/$${1}_??_??.ts)
- for(file, files) {
- lang = $$replace(file, .*_((.._)?..)\\.ts$, \\1)
- addTsTarget(ts-$$lang, ts-$$1-$$lang, $$2, $$file)
- }
- addTsTarget(ts-untranslated, ts-$$1-untranslated, $$2, $$PWD/$${1}_untranslated.ts)
- addTsTarget(ts-all, ts-$$1-all, $$2, $$PWD/$${1}_untranslated.ts $$files)
-}
-
-addTsTargets(qt, -I../include -I../include/Qt \
- 3rdparty/phonon \
- 3rdparty/webkit \
- activeqt \
- corelib \
- declarative \
- gui \
- multimedia \
- network \
- opengl \
- plugins \
- qt3support \
- script \
- scripttools \
- sql \
- svg \
- xml \
- xmlpatterns \
-)
-addTsTargets(designer, ../tools/designer/designer.pro)
-addTsTargets(linguist, ../tools/linguist/linguist.pro)
-addTsTargets(assistant, ../tools/assistant/tools/tools.pro)
-addTsTargets(qt_help, ../tools/assistant/lib/lib.pro)
-addTsTargets(qtconfig, ../tools/qtconfig/qtconfig.pro)
-addTsTargets(qvfb, ../tools/qvfb/qvfb.pro)
-
-check-ts.commands = (cd $$PWD && perl check-ts.pl)
-check-ts.depends = ts-all
-
-isEqual(QMAKE_DIR_SEP, /) {
- commit-ts.commands = \
- cd $$PWD/..; \
- for f in `git diff-files --name-only translations/*_??.ts`; do \
- $$LCONVERT -locations none -i \$\$f -o \$\$f; \
- done; \
- git add translations/*_??.ts && git commit
-} else {
- wd = $$replace(PWD, /, \\)\\..
- commit-ts.commands = \
- cd $$wd && \
- for /f usebackq %%f in (`git diff-files --name-only translations/*_??.ts`) do \
- $$LCONVERT -locations none -i %%f -o %%f $$escape_expand(\\n\\t) \
- cd $$wd && git add translations/*_??.ts && git commit
-}
-
-ts.commands = \
- @echo \"The \'ts\' target has been removed in favor of more fine-grained targets.\" && \
- echo \"Use \'ts-<target>-<lang>\' or \'ts-<lang>\' instead. To add a language,\" && \
- echo \"use \'untranslated\' for <lang>, rename the files and re-run \'qmake\'.\"
-
-QMAKE_EXTRA_TARGETS += $$unique(TS_TARGETS) ts commit-ts check-ts
diff --git a/translations/translations.pro b/translations/translations.pro
index 14c1177..311b032 100644
--- a/translations/translations.pro
+++ b/translations/translations.pro
@@ -1,8 +1,86 @@
TRANSLATIONS = $$files(*.ts)
qtPrepareTool(LRELEASE, lrelease)
+qtPrepareTool(LCONVERT, lconvert)
+qtPrepareTool(LUPDATE, lupdate)
+LUPDATE += -locations relative -no-ui-lines
-contains(TEMPLATE_PREFIX, vc):vcproj = 1
+TS_TARGETS =
+
+# meta target name, target name, lupdate base options, files
+defineTest(addTsTarget) {
+ cv = $${2}.commands
+ $$cv = cd $$QT_SOURCE_TREE/src && $$LUPDATE $$3 -ts $$4
+ export($$cv)
+ dv = $${1}.depends
+ $$dv += $$2
+ export($$dv)
+ TS_TARGETS += $$1 $$2
+ export(TS_TARGETS)
+}
+
+# target basename, lupdate base options
+defineTest(addTsTargets) {
+ files = $$files($$PWD/$${1}_??.ts) $$files($$PWD/$${1}_??_??.ts)
+ for(file, files) {
+ lang = $$replace(file, .*_((.._)?..)\\.ts$, \\1)
+ addTsTarget(ts-$$lang, ts-$$1-$$lang, $$2, $$file)
+ }
+ addTsTarget(ts-untranslated, ts-$$1-untranslated, $$2, $$PWD/$${1}_untranslated.ts)
+ addTsTarget(ts-all, ts-$$1-all, $$2, $$PWD/$${1}_untranslated.ts $$files)
+}
+
+addTsTargets(qt, -I../include -I../include/Qt \
+ 3rdparty/phonon \
+ 3rdparty/webkit \
+ activeqt \
+ corelib \
+ declarative \
+ gui \
+ multimedia \
+ network \
+ opengl \
+ plugins \
+ qt3support \
+ script \
+ scripttools \
+ sql \
+ svg \
+ xml \
+ xmlpatterns \
+)
+addTsTargets(designer, ../tools/designer/designer.pro)
+addTsTargets(linguist, ../tools/linguist/linguist.pro)
+addTsTargets(assistant, ../tools/assistant/tools/tools.pro)
+addTsTargets(qt_help, ../tools/assistant/lib/lib.pro)
+addTsTargets(qtconfig, ../tools/qtconfig/qtconfig.pro)
+addTsTargets(qvfb, ../tools/qvfb/qvfb.pro)
+
+check-ts.commands = (cd $$PWD && perl check-ts.pl)
+check-ts.depends = ts-all
+
+isEqual(QMAKE_DIR_SEP, /) {
+ commit-ts.commands = \
+ cd $$PWD/..; \
+ for f in `git diff-files --name-only translations/*_??.ts`; do \
+ $$LCONVERT -locations none -i \$\$f -o \$\$f; \
+ done; \
+ git add translations/*_??.ts && git commit
+} else {
+ wd = $$replace(PWD, /, \\)\\..
+ commit-ts.commands = \
+ cd $$wd && \
+ for /f usebackq %%f in (`git diff-files --name-only translations/*_??.ts`) do \
+ $$LCONVERT -locations none -i %%f -o %%f $$escape_expand(\\n\\t) \
+ cd $$wd && git add translations/*_??.ts && git commit
+}
+
+ts.commands = \
+ @echo \"The \'ts\' target has been removed in favor of more fine-grained targets.\" && \
+ echo \"Use \'ts-<target>-<lang>\' or \'ts-<lang>\' instead. To add a language,\" && \
+ echo \"use \'untranslated\' for <lang>, rename the files and re-run \'qmake\'.\"
+
+QMAKE_EXTRA_TARGETS += $$unique(TS_TARGETS) ts commit-ts check-ts
TEMPLATE = app
TARGET = qm_phony_target
@@ -11,6 +89,8 @@ CONFIG += no_icon
QT =
LIBS =
+contains(TEMPLATE_PREFIX, vc):vcproj = 1
+
updateqm.input = TRANSLATIONS
updateqm.output = ${QMAKE_FILE_BASE}.qm
isEmpty(vcproj):updateqm.variable_out = PRE_TARGETDEPS